File: /www/wwwroot/www.waciwang.com/wp-content/plugins/gutenberg/build/scripts/editor/index.js.map
{
"version": 3,
"sources": ["package-external:@wordpress/data", "package-external:@wordpress/core-data", "package-external:@wordpress/element", "package-external:@wordpress/compose", "package-external:@wordpress/hooks", "package-external:@wordpress/block-editor", "package-external:@wordpress/blocks", "package-external:@wordpress/date", "package-external:@wordpress/url", "package-external:@wordpress/deprecated", "package-external:@wordpress/preferences", "package-external:@wordpress/primitives", "vendor-external:react/jsx-runtime", "package-external:@wordpress/private-apis", "package-external:@wordpress/a11y", "package-external:@wordpress/api-fetch", "package-external:@wordpress/notices", "package-external:@wordpress/i18n", "package-external:@wordpress/html-entities", "package-external:@wordpress/components", "package-external:@wordpress/patterns", "package-external:@wordpress/blob", "package-external:@wordpress/media-utils", "../../../node_modules/remove-accents/index.js", "package-external:@wordpress/style-engine", "../../../node_modules/fast-deep-equal/es6/index.js", "../../../node_modules/deepmerge/dist/cjs.js", "package-external:@wordpress/commands", "package-external:@wordpress/viewport", "package-external:@wordpress/plugins", "package-external:@wordpress/keyboard-shortcuts", "package-external:@wordpress/keycodes", "../../../node_modules/fast-deep-equal/index.js", "package-external:@wordpress/dom", "package-external:@wordpress/rich-text", "package-external:@wordpress/warning", "vendor-external:react", "../../../node_modules/react-is/cjs/react-is.development.js", "../../../node_modules/react-is/index.js", "../../../node_modules/object-assign/index.js", "../../../node_modules/prop-types/lib/ReactPropTypesSecret.js", "../../../node_modules/prop-types/lib/has.js", "../../../node_modules/prop-types/checkPropTypes.js", "../../../node_modules/prop-types/factoryWithTypeCheckers.js", "../../../node_modules/prop-types/index.js", "../../../node_modules/autosize/dist/autosize.js", "../../../node_modules/computed-style/dist/computedStyle.commonjs.js", "../../../node_modules/line-height/lib/line-height.js", "../../../node_modules/react-autosize-textarea/lib/TextareaAutosize.js", "../../../node_modules/react-autosize-textarea/lib/index.js", "package-external:@wordpress/wordcount", "package-external:@wordpress/server-side-render", "vendor-external:react-dom", "../../../packages/editor/src/hooks/custom-sources-backwards-compatibility.js", "../../../packages/editor/src/store/index.js", "../../../packages/editor/src/store/reducer.js", "../../../packages/editor/src/store/defaults.js", "../../../packages/editor/src/dataviews/store/reducer.ts", "../../../packages/editor/src/store/selectors.js", "../../../packages/editor/src/store/constants.ts", "../../../packages/icons/src/icon/index.ts", "../../../packages/icons/src/library/add-template.tsx", "../../../packages/icons/src/library/archive.tsx", "../../../packages/icons/src/library/audio.tsx", "../../../packages/icons/src/library/background.tsx", "../../../packages/icons/src/library/backup.tsx", "../../../packages/icons/src/library/block-default.tsx", "../../../packages/icons/src/library/check.tsx", "../../../packages/icons/src/library/chevron-left-small.tsx", "../../../packages/icons/src/library/chevron-left.tsx", "../../../packages/icons/src/library/chevron-right-small.tsx", "../../../packages/icons/src/library/chevron-right.tsx", "../../../packages/icons/src/library/close-small.tsx", "../../../packages/icons/src/library/cloud-upload.tsx", "../../../packages/icons/src/library/cloud.tsx", "../../../packages/icons/src/library/code.tsx", "../../../packages/icons/src/library/color.tsx", "../../../packages/icons/src/library/comment-author-avatar.tsx", "../../../packages/icons/src/library/comment.tsx", "../../../packages/icons/src/library/copy-small.tsx", "../../../packages/icons/src/library/desktop.tsx", "../../../packages/icons/src/library/download.tsx", "../../../packages/icons/src/library/drafts.tsx", "../../../packages/icons/src/library/drawer-left.tsx", "../../../packages/icons/src/library/drawer-right.tsx", "../../../packages/icons/src/library/external.tsx", "../../../packages/icons/src/library/file.tsx", "../../../packages/icons/src/library/footer.tsx", "../../../packages/icons/src/library/format-list-bullets.tsx", "../../../packages/icons/src/library/header.tsx", "../../../packages/icons/src/library/info.tsx", "../../../packages/icons/src/library/keyboard.tsx", "../../../packages/icons/src/library/layout.tsx", "../../../packages/icons/src/library/list-view.tsx", "../../../packages/icons/src/library/lock-small.tsx", "../../../packages/icons/src/library/mobile.tsx", "../../../packages/icons/src/library/more-vertical.tsx", "../../../packages/icons/src/library/navigation.tsx", "../../../packages/icons/src/library/next.tsx", "../../../packages/icons/src/library/not-allowed.tsx", "../../../packages/icons/src/library/page.tsx", "../../../packages/icons/src/library/pencil.tsx", "../../../packages/icons/src/library/pending.tsx", "../../../packages/icons/src/library/plus.tsx", "../../../packages/icons/src/library/previous.tsx", "../../../packages/icons/src/library/published.tsx", "../../../packages/icons/src/library/redo.tsx", "../../../packages/icons/src/library/reset.tsx", "../../../packages/icons/src/library/rotate-left.tsx", "../../../packages/icons/src/library/rotate-right.tsx", "../../../packages/icons/src/library/scheduled.tsx", "../../../packages/icons/src/library/seen.tsx", "../../../packages/icons/src/library/settings.tsx", "../../../packages/icons/src/library/shadow.tsx", "../../../packages/icons/src/library/shuffle.tsx", "../../../packages/icons/src/library/sidebar.tsx", "../../../packages/icons/src/library/square.tsx", "../../../packages/icons/src/library/star-empty.tsx", "../../../packages/icons/src/library/star-filled.tsx", "../../../packages/icons/src/library/styles.tsx", "../../../packages/icons/src/library/symbol-filled.tsx", "../../../packages/icons/src/library/symbol.tsx", "../../../packages/icons/src/library/table-column-after.tsx", "../../../packages/icons/src/library/tablet.tsx", "../../../packages/icons/src/library/trash.tsx", "../../../packages/icons/src/library/typography.tsx", "../../../packages/icons/src/library/undo.tsx", "../../../packages/icons/src/library/verse.tsx", "../../../packages/icons/src/library/video.tsx", "../../../packages/icons/src/library/wordpress.tsx", "../../../packages/editor/src/utils/get-template-part-icon.js", "../../../packages/editor/src/lock-unlock.js", "../../../packages/editor/src/utils/get-template-info.js", "../../../packages/editor/src/store/actions.js", "../../../packages/editor/src/store/local-autosave.js", "../../../packages/editor/src/store/utils/notice-builder.js", "../../../packages/editor/src/store/private-actions.js", "../../../packages/editor/src/store/utils/is-template-revertable.js", "../../../packages/editor/src/dataviews/store/private-actions.ts", "../../../packages/fields/src/fields/slug/index.ts", "../../../packages/fields/src/fields/slug/slug-edit.tsx", "../../../packages/fields/src/fields/slug/utils.ts", "../../../packages/fields/src/actions/utils.ts", "../../../packages/fields/src/fields/slug/slug-view.tsx", "../../../packages/fields/src/fields/title/index.ts", "../../../node_modules/clsx/dist/clsx.mjs", "../../../packages/fields/src/fields/title/view.tsx", "../../../packages/fields/src/fields/page-title/index.ts", "../../../packages/fields/src/fields/page-title/view.tsx", "../../../packages/fields/src/lock-unlock.ts", "../../../packages/fields/src/fields/template-title/index.ts", "../../../packages/fields/src/fields/pattern-title/index.ts", "../../../packages/fields/src/fields/pattern-title/view.tsx", "../../../packages/fields/src/fields/featured-image/index.tsx", "../../../packages/fields/src/components/media-edit/index.tsx", "../../../packages/fields/src/fields/featured-image/featured-image-view.tsx", "../../../packages/fields/src/fields/template/index.ts", "../../../packages/fields/src/fields/template/template-edit.tsx", "../../../packages/fields/src/fields/parent/index.ts", "../../../packages/fields/src/fields/parent/parent-edit.tsx", "../../../packages/fields/src/fields/parent/utils.ts", "../../../packages/fields/src/fields/parent/parent-view.tsx", "../../../packages/fields/src/fields/password/index.tsx", "../../../packages/fields/src/fields/password/edit.tsx", "../../../packages/fields/src/fields/status/index.tsx", "../../../packages/fields/src/fields/status/status-view.tsx", "../../../packages/fields/src/fields/status/status-elements.tsx", "../../../packages/fields/src/fields/comment-status/index.tsx", "../../../packages/fields/src/fields/ping-status/index.tsx", "../../../packages/fields/src/fields/discussion/index.tsx", "../../../packages/fields/src/fields/date/index.tsx", "../../../packages/fields/src/fields/date/date-view.tsx", "../../../packages/fields/src/fields/author/index.tsx", "../../../packages/fields/src/fields/author/author-view.tsx", "../../../packages/fields/src/fields/notes/index.tsx", "../../../packages/fields/src/actions/view-post.tsx", "../../../packages/fields/src/actions/reorder-page.tsx", "../../../packages/fields/src/actions/duplicate-post.tsx", "../../../packages/fields/src/actions/rename-post.tsx", "../../../packages/fields/src/actions/reset-post.tsx", "../../../packages/fields/src/actions/duplicate-pattern.tsx", "../../../node_modules/tslib/tslib.es6.mjs", "../../../node_modules/lower-case/src/index.ts", "../../../node_modules/no-case/src/index.ts", "../../../node_modules/dot-case/src/index.ts", "../../../node_modules/param-case/src/index.ts", "../../../node_modules/client-zip/index.js", "../../../packages/fields/src/actions/export-pattern.tsx", "../../../packages/fields/src/actions/view-post-revisions.tsx", "../../../packages/fields/src/actions/permanently-delete-post.tsx", "../../../packages/fields/src/actions/restore-post.tsx", "../../../packages/fields/src/actions/trash-post.tsx", "../../../packages/fields/src/actions/delete-post.tsx", "../../../packages/fields/src/mutation/index.ts", "../../../packages/fields/src/actions/duplicate-template-part.tsx", "../../../packages/fields/src/components/create-template-part-modal/index.tsx", "../../../packages/fields/src/components/create-template-part-modal/utils.js", "../../../packages/editor/src/dataviews/fields/content-preview/index.tsx", "../../../packages/editor/src/dataviews/fields/content-preview/content-preview-view.tsx", "../../../packages/editor/src/components/provider/index.js", "../../../packages/editor/src/components/provider/with-registry-provider.js", "../../../packages/editor/src/components/provider/use-block-editor-settings.js", "../../../packages/editor/src/components/media-categories/index.js", "../../../node_modules/uuid/dist/esm-browser/rng.js", "../../../node_modules/uuid/dist/esm-browser/stringify.js", "../../../node_modules/uuid/dist/esm-browser/native.js", "../../../node_modules/uuid/dist/esm-browser/v4.js", "../../../packages/editor/src/utils/media-upload/index.js", "../../../packages/editor/src/utils/url.js", "../../../packages/editor/src/utils/media-sideload/index.js", "../../../packages/editor/src/components/global-styles-provider/index.js", "../../../packages/global-styles-engine/src/utils/object.ts", "../../../packages/global-styles-engine/src/settings/get-setting.ts", "../../../packages/global-styles-engine/src/settings/set-setting.ts", "../../../packages/global-styles-engine/src/utils/common.ts", "../../../packages/global-styles-engine/src/utils/fluid.ts", "../../../packages/global-styles-engine/src/utils/typography.ts", "../../../packages/global-styles-engine/src/settings/get-style.ts", "../../../packages/global-styles-engine/src/settings/set-style.ts", "../../../packages/global-styles-engine/src/core/equal.ts", "../../../packages/global-styles-engine/src/core/merge.ts", "../../../node_modules/is-plain-object/dist/is-plain-object.mjs", "../../../node_modules/memize/dist/index.js", "../../../packages/global-styles-engine/src/utils/get-global-styles-changes.ts", "../../../packages/global-styles-engine/src/core/render.tsx", "../../../packages/global-styles-engine/src/core/selectors.ts", "../../../node_modules/colord/index.mjs", "../../../packages/global-styles-engine/src/utils/duotone.ts", "../../../packages/global-styles-engine/src/utils/string.ts", "../../../packages/global-styles-engine/src/utils/spacing.ts", "../../../packages/global-styles-engine/src/utils/gap.ts", "../../../packages/global-styles-engine/src/utils/background.ts", "../../../packages/global-styles-engine/src/utils/layout.ts", "../../../packages/editor/src/components/provider/disable-non-page-content-blocks.js", "../../../packages/editor/src/components/provider/use-post-content-blocks.js", "../../../packages/editor/src/components/provider/navigation-block-editing-mode.js", "../../../packages/editor/src/components/provider/use-hide-blocks-from-inserter.js", "../../../packages/editor/src/components/commands/index.js", "../../../packages/interface/src/components/complementary-area/index.js", "../../../packages/interface/src/components/complementary-area-toggle/index.js", "../../../packages/interface/src/store/index.js", "../../../packages/interface/src/store/actions.js", "../../../packages/interface/src/store/deprecated.js", "../../../packages/interface/src/store/selectors.js", "../../../packages/interface/src/store/reducer.js", "../../../packages/interface/src/store/constants.js", "../../../packages/interface/src/components/complementary-area-header/index.js", "../../../packages/interface/src/components/complementary-area-more-menu-item/index.js", "../../../packages/interface/src/components/action-item/index.js", "../../../packages/interface/src/components/pinned-items/index.js", "../../../packages/interface/src/components/fullscreen-mode/index.js", "../../../packages/admin-ui/src/navigable-region/index.tsx", "../../../packages/interface/src/components/interface-skeleton/index.js", "../../../packages/editor/src/components/pattern-rename-modal/index.js", "../../../packages/editor/src/components/pattern-duplicate-modal/index.js", "../../../packages/editor/src/components/block-removal-warnings/index.js", "../../../packages/editor/src/components/start-page-options/index.js", "../../../packages/editor/src/components/keyboard-shortcut-help-modal/index.js", "../../../packages/editor/src/components/keyboard-shortcut-help-modal/config.js", "../../../packages/editor/src/components/keyboard-shortcut-help-modal/shortcut.js", "../../../packages/editor/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js", "../../../packages/editor/src/components/start-template-options/index.js", "../../../packages/editor/src/components/global-keyboard-shortcuts/index.js", "../../../packages/editor/src/components/template-part-menu-items/index.js", "../../../packages/editor/src/components/template-part-menu-items/convert-to-regular.js", "../../../packages/editor/src/components/template-part-menu-items/convert-to-template-part.js", "../../../packages/editor/src/components/global-styles/index.js", "../../../packages/global-styles-ui/src/global-styles-ui.tsx", "../../../packages/global-styles-ui/src/provider.tsx", "../../../packages/global-styles-ui/src/context.ts", "../../../packages/global-styles-ui/src/screen-root.tsx", "../../../packages/global-styles-ui/src/icon-with-current-color.tsx", "../../../packages/global-styles-ui/src/navigation-button.tsx", "../../../packages/global-styles-ui/src/root-menu.tsx", "../../../node_modules/colord/plugins/a11y.mjs", "../../../packages/global-styles-ui/src/hooks.ts", "../../../packages/global-styles-ui/src/utils.ts", "../../../packages/global-styles-ui/src/lock-unlock.ts", "../../../packages/global-styles-ui/src/preview-styles.tsx", "../../../packages/global-styles-ui/src/preview-hooks.tsx", "../../../packages/global-styles-ui/src/typography-example.tsx", "../../../packages/global-styles-ui/src/font-library/utils/preview-styles.ts", "../../../packages/global-styles-ui/src/highlighted-colors.tsx", "../../../packages/global-styles-ui/src/preview-wrapper.tsx", "../../../packages/global-styles-ui/src/screen-block-list.tsx", "../../../packages/global-styles-ui/src/variations/variations-panel.tsx", "../../../packages/global-styles-ui/src/screen-header.tsx", "../../../packages/global-styles-ui/src/screen-block.tsx", "../../../packages/global-styles-ui/src/block-preview-panel.tsx", "../../../packages/global-styles-ui/src/subtitle.tsx", "../../../packages/global-styles-ui/src/screen-typography.tsx", "../../../packages/global-styles-ui/src/screen-body.tsx", "../../../packages/global-styles-ui/src/typography-elements.tsx", "../../../packages/global-styles-ui/src/variations/variations-typography.tsx", "../../../packages/global-styles-ui/src/preview-typography.tsx", "../../../packages/global-styles-ui/src/variations/variation.tsx", "../../../packages/global-styles-ui/src/font-families.tsx", "../../../packages/global-styles-ui/src/font-library/context.tsx", "../../../packages/global-styles-ui/src/font-library/api.ts", "../../../packages/global-styles-ui/src/font-library/utils/index.ts", "../../../packages/global-styles-ui/src/font-library/utils/constants.ts", "../../../packages/global-styles-ui/src/font-library/utils/set-immutably.ts", "../../../packages/global-styles-ui/src/font-library/utils/toggleFont.ts", "../../../packages/global-styles-ui/src/font-library/modal.tsx", "../../../packages/global-styles-ui/src/font-library/installed-fonts.tsx", "../../../packages/global-styles-ui/src/font-library/font-card.tsx", "../../../packages/global-styles-ui/src/font-library/font-demo.tsx", "../../../packages/global-styles-ui/src/font-library/library-font-variant.tsx", "../../../packages/global-styles-ui/src/font-library/utils/sort-font-faces.ts", "../../../packages/global-styles-ui/src/font-library/font-collection.tsx", "../../../packages/global-styles-ui/src/font-library/utils/filter-fonts.ts", "../../../packages/global-styles-ui/src/font-library/utils/fonts-outline.ts", "../../../packages/global-styles-ui/src/font-library/google-fonts-confirm-dialog.tsx", "../../../packages/global-styles-ui/src/font-library/collection-font-variant.tsx", "../../../packages/global-styles-ui/src/font-library/upload-fonts.tsx", "../../../packages/global-styles-ui/src/font-library/lib/unbrotli.js", "../../../packages/global-styles-ui/src/font-library/lib/inflate.js", "../../../packages/global-styles-ui/src/font-library/lib/lib-font.browser.js", "../../../packages/global-styles-ui/src/font-library/utils/make-families-from-faces.ts", "../../../packages/global-styles-ui/src/font-family-item.tsx", "../../../packages/global-styles-ui/src/font-sizes/font-sizes-count.tsx", "../../../packages/global-styles-ui/src/screen-typography-element.tsx", "../../../packages/global-styles-ui/src/typography-panel.tsx", "../../../packages/global-styles-ui/src/typography-preview.tsx", "../../../packages/global-styles-ui/src/screen-colors.tsx", "../../../packages/global-styles-ui/src/palette.tsx", "../../../packages/global-styles-ui/src/color-indicator-wrapper.tsx", "../../../packages/global-styles-ui/src/screen-color-palette.tsx", "../../../packages/global-styles-ui/src/color-palette-panel.tsx", "../../../packages/global-styles-ui/src/variations/variations-color.tsx", "../../../packages/global-styles-ui/src/preview-colors.tsx", "../../../packages/global-styles-ui/src/preset-colors.tsx", "../../../packages/global-styles-ui/src/gradients-palette-panel.tsx", "../../../packages/global-styles-ui/src/screen-background.tsx", "../../../packages/global-styles-ui/src/background-panel.tsx", "../../../packages/global-styles-ui/src/shadows-panel.tsx", "../../../packages/global-styles-ui/src/confirm-reset-shadow-dialog.tsx", "../../../packages/global-styles-ui/src/shadows-edit-panel.tsx", "../../../packages/global-styles-ui/src/shadow-utils.ts", "../../../packages/global-styles-ui/src/screen-shadows.tsx", "../../../packages/global-styles-ui/src/screen-layout.tsx", "../../../packages/global-styles-ui/src/dimensions-panel.tsx", "../../../packages/global-styles-ui/src/screen-style-variations.tsx", "../../../packages/global-styles-ui/src/style-variations-content.tsx", "../../../packages/global-styles-ui/src/style-variations-container.tsx", "../../../packages/global-styles-ui/src/screen-css.tsx", "../../../packages/global-styles-ui/src/screen-revisions/index.tsx", "../../../packages/global-styles-ui/src/screen-revisions/use-global-styles-revisions.tsx", "../../../packages/global-styles-ui/src/screen-revisions/revisions-buttons.tsx", "../../../packages/global-styles-ui/src/pagination/index.tsx", "../../../packages/global-styles-ui/src/font-sizes/font-sizes.tsx", "../../../packages/global-styles-ui/src/font-sizes/confirm-reset-font-sizes-dialog.tsx", "../../../packages/global-styles-ui/src/font-sizes/font-size.tsx", "../../../packages/global-styles-ui/src/font-sizes/font-size-preview.tsx", "../../../packages/global-styles-ui/src/font-sizes/confirm-delete-font-size-dialog.tsx", "../../../packages/global-styles-ui/src/font-sizes/rename-font-size-dialog.tsx", "../../../packages/global-styles-ui/src/size-control/index.tsx", "../../../packages/global-styles-ui/src/with-global-styles-provider.tsx", "../../../packages/global-styles-ui/src/style-variations.tsx", "../../../packages/global-styles-ui/src/color-variations.tsx", "../../../packages/global-styles-ui/src/typography-variations.tsx", "../../../packages/global-styles-ui/src/font-library/font-library.tsx", "../../../packages/editor/src/components/global-styles/block-link.js", "../../../packages/editor/src/components/global-styles/hooks.js", "../../../packages/editor/src/store/private-selectors.js", "../../../packages/editor/src/dataviews/store/private-selectors.ts", "../../../packages/editor/src/hooks/default-autocompleters.js", "../../../packages/editor/src/components/autocompleters/user.js", "../../../packages/editor/src/components/autosave-monitor/index.js", "../../../packages/editor/src/components/document-bar/index.js", "../../../packages/editor/src/utils/pageTypeBadge.js", "../../../packages/editor/src/components/styles-canvas/index.js", "../../../packages/editor/src/components/styles-canvas/style-book.js", "../../../packages/editor/src/components/style-book/index.js", "../../../packages/editor/src/components/style-book/constants.ts", "../../../packages/editor/src/components/style-book/categories.ts", "../../../packages/editor/src/components/style-book/examples.tsx", "../../../packages/editor/src/components/style-book/color-examples.tsx", "../../../packages/editor/src/components/style-book/duotone-examples.tsx", "../../../packages/editor/src/components/global-styles-renderer/index.js", "../../../packages/editor/src/hooks/use-global-styles-output.js", "../../../packages/editor/src/components/styles-canvas/revisions.js", "../../../packages/editor/src/components/resizable-editor/index.js", "../../../packages/editor/src/components/resizable-editor/resize-handle.js", "../../../packages/editor/src/components/document-bar/useEditedSectionDetails.js", "../../../packages/editor/src/components/document-outline/index.js", "../../../packages/editor/src/components/document-outline/item.js", "../../../packages/editor/src/components/document-outline/check.js", "../../../packages/editor/src/components/global-keyboard-shortcuts/register-shortcuts.js", "../../../packages/editor/src/components/editor-history/redo.js", "../../../packages/editor/src/components/editor-history/undo.js", "../../../packages/editor/src/components/editor-notices/index.js", "../../../packages/editor/src/components/template-validation-notice/index.js", "../../../packages/editor/src/components/editor-snackbars/index.js", "../../../packages/editor/src/components/entities-saved-states/index.js", "../../../packages/editor/src/components/entities-saved-states/entity-type-list.js", "../../../packages/editor/src/components/entities-saved-states/entity-record-item.js", "../../../packages/editor/src/components/entities-saved-states/hooks/use-is-dirty.js", "../../../packages/editor/src/components/error-boundary/index.js", "../../../packages/editor/src/components/local-autosave-monitor/index.js", "../../../packages/editor/src/components/page-attributes/check.js", "../../../packages/editor/src/components/page-attributes/order.js", "../../../packages/editor/src/components/post-type-support-check/index.js", "../../../packages/editor/src/components/page-attributes/panel.js", "../../../packages/editor/src/components/page-attributes/parent.js", "../../../packages/editor/src/components/post-panel-row/index.js", "../../../packages/editor/src/utils/terms.js", "../../../packages/editor/src/components/post-template/classic-theme.js", "../../../packages/editor/src/components/post-template/create-new-template-modal.js", "../../../packages/editor/src/components/post-template/hooks.js", "../../../packages/editor/src/components/plugin-document-setting-panel/index.js", "../../../packages/editor/src/components/preferences-modal/enable-plugin-document-setting-panel.js", "../../../packages/editor/src/components/preferences-modal/enable-panel.js", "../../../packages/editor/src/components/block-settings-menu/plugin-block-settings-menu-item.js", "../../../packages/editor/src/components/plugin-more-menu-item/index.js", "../../../packages/editor/src/components/plugin-post-publish-panel/index.js", "../../../packages/editor/src/components/plugin-post-status-info/index.js", "../../../packages/editor/src/components/plugin-pre-publish-panel/index.js", "../../../packages/editor/src/components/plugin-preview-menu-item/index.js", "../../../packages/editor/src/components/plugin-sidebar/index.js", "../../../packages/editor/src/components/plugin-sidebar-more-menu-item/index.js", "../../../packages/editor/src/components/post-template/panel.js", "../../../packages/editor/src/components/post-template/block-theme.js", "../../../packages/editor/src/components/post-template/swap-template-button.js", "../../../packages/editor/src/utils/search-templates.js", "../../../packages/editor/src/components/post-template/reset-default-template.js", "../../../packages/editor/src/components/post-template/create-new-template.js", "../../../packages/editor/src/components/post-author/index.js", "../../../packages/editor/src/components/post-author/combobox.js", "../../../packages/editor/src/components/post-author/hook.js", "../../../packages/editor/src/components/post-author/constants.js", "../../../packages/editor/src/components/post-author/select.js", "../../../packages/editor/src/components/post-author/check.js", "../../../packages/editor/src/components/post-author/panel.js", "../../../packages/editor/src/components/post-comments/index.js", "../../../packages/editor/src/components/post-discussion/panel.js", "../../../packages/editor/src/components/post-pingbacks/index.js", "../../../packages/editor/src/components/post-excerpt/index.js", "../../../packages/editor/src/components/post-excerpt/check.js", "../../../packages/editor/src/components/post-excerpt/panel.js", "../../../packages/editor/src/components/post-excerpt/plugin.js", "../../../packages/editor/src/components/post-featured-image/index.js", "../../../packages/editor/src/components/theme-support-check/index.js", "../../../packages/editor/src/components/post-featured-image/check.js", "../../../packages/editor/src/components/post-featured-image/panel.js", "../../../packages/editor/src/components/post-format/index.js", "../../../packages/editor/src/components/post-format/check.js", "../../../packages/editor/src/components/post-last-revision/index.js", "../../../packages/editor/src/components/post-last-revision/check.js", "../../../packages/editor/src/components/post-last-revision/panel.js", "../../../packages/editor/src/components/post-locked-modal/index.js", "../../../packages/editor/src/components/post-pending-status/index.js", "../../../packages/editor/src/components/post-pending-status/check.js", "../../../packages/editor/src/components/post-preview-button/index.js", "../../../packages/editor/src/components/post-publish-button/index.js", "../../../packages/editor/src/components/post-publish-button/label.js", "../../../packages/editor/src/components/post-publish-panel/index.js", "../../../packages/editor/src/components/post-publish-panel/prepublish.js", "../../../packages/editor/src/components/post-visibility/index.js", "../../../packages/editor/src/components/post-visibility/utils.js", "../../../packages/editor/src/components/post-visibility/label.js", "../../../node_modules/date-fns/toDate.mjs", "../../../node_modules/date-fns/constants.mjs", "../../../node_modules/date-fns/endOfMonth.mjs", "../../../node_modules/date-fns/startOfMonth.mjs", "../../../node_modules/date-fns/parseISO.mjs", "../../../packages/editor/src/components/post-schedule/index.js", "../../../packages/editor/src/components/post-schedule/label.js", "../../../packages/editor/src/components/post-publish-panel/maybe-tags-panel.js", "../../../packages/editor/src/components/post-taxonomies/flat-term-selector.js", "../../../packages/editor/src/components/post-taxonomies/most-used-terms.js", "../../../packages/editor/src/components/post-publish-panel/maybe-post-format-panel.js", "../../../packages/editor/src/components/post-publish-panel/maybe-category-panel.js", "../../../packages/editor/src/components/post-taxonomies/hierarchical-term-selector.js", "../../../packages/editor/src/components/post-publish-panel/maybe-upload-media.js", "../../../packages/editor/src/components/post-publish-panel/media-util.js", "../../../packages/editor/src/components/post-publish-panel/postpublish.js", "../../../packages/editor/src/components/post-saved-state/index.js", "../../../packages/editor/src/components/post-status/index.js", "../../../packages/editor/src/components/post-sticky/index.js", "../../../packages/editor/src/components/post-sticky/check.js", "../../../packages/editor/src/components/post-schedule/check.js", "../../../packages/editor/src/components/post-schedule/panel.js", "../../../packages/editor/src/components/post-switch-to-draft-button/index.js", "../../../packages/editor/src/components/post-sync-status/index.js", "../../../packages/editor/src/components/post-taxonomies/index.js", "../../../packages/editor/src/components/post-taxonomies/check.js", "../../../packages/editor/src/components/post-taxonomies/panel.js", "../../../packages/editor/src/components/post-text-editor/index.js", "../../../packages/editor/src/components/post-title/index.js", "../../../packages/editor/src/components/post-title/constants.js", "../../../packages/editor/src/components/post-title/use-post-title-focus.js", "../../../packages/editor/src/components/post-title/use-post-title.js", "../../../packages/editor/src/components/post-title/post-title-raw.js", "../../../packages/editor/src/components/post-trash/index.js", "../../../packages/editor/src/components/post-trash/check.js", "../../../packages/editor/src/components/post-url/index.js", "../../../packages/editor/src/components/post-url/check.js", "../../../packages/editor/src/components/post-url/label.js", "../../../packages/editor/src/components/post-url/panel.js", "../../../packages/editor/src/components/post-visibility/check.js", "../../../packages/editor/src/components/table-of-contents/index.js", "../../../packages/editor/src/components/table-of-contents/panel.js", "../../../packages/editor/src/components/word-count/index.js", "../../../packages/editor/src/components/time-to-read/index.js", "../../../packages/editor/src/components/character-count/index.js", "../../../packages/editor/src/components/unsaved-changes-warning/index.js", "../../../packages/editor/src/components/deprecated.js", "../../../packages/editor/src/components/index.js", "../../../packages/editor/src/hooks/media-upload.js", "../../../packages/editor/src/hooks/pattern-overrides.js", "../../../packages/editor/src/hooks/navigation-link-view-button.js", "../../../packages/editor/src/hooks/template-part-navigation-edit-button.js", "../../../packages/editor/src/hooks/push-changes-to-global-styles/index.js", "../../../packages/editor/src/utils/set-nested-value.js", "../../../packages/editor/src/components/header/back-button.js", "../../../packages/editor/src/components/editor/index.js", "../../../packages/editor/src/utils/block-selection-path.js", "../../../packages/editor/src/components/editor-interface/index.js", "../../../packages/editor/src/components/header/index.js", "../../../packages/editor/src/components/collapsible-block-toolbar/index.js", "../../../packages/editor/src/components/document-tools/index.js", "../../../packages/editor/src/components/more-menu/index.js", "../../../packages/editor/src/components/more-menu/copy-content-menu-item.js", "../../../packages/editor/src/components/mode-switcher/index.js", "../../../packages/editor/src/components/more-menu/tools-more-menu-group.js", "../../../packages/editor/src/components/more-menu/view-more-menu-group.js", "../../../packages/editor/src/components/post-publish-button/post-publish-button-or-toggle.js", "../../../packages/editor/src/components/post-view-link/index.js", "../../../packages/editor/src/components/preview-dropdown/index.js", "../../../packages/editor/src/components/zoom-out-toggle/index.js", "../../../packages/editor/src/components/inserter-sidebar/index.js", "../../../packages/editor/src/components/list-view-sidebar/index.js", "../../../packages/editor/src/components/list-view-sidebar/list-view-outline.js", "../../../packages/editor/src/components/save-publish-panels/index.js", "../../../packages/editor/src/components/text-editor/index.js", "../../../packages/editor/src/components/visual-editor/index.js", "../../../packages/editor/src/components/visual-editor/edit-template-blocks-notification.js", "../../../packages/editor/src/components/visual-editor/use-select-nearest-editable-block.js", "../../../packages/editor/src/components/visual-editor/use-zoom-out-mode-exit.js", "../../../packages/editor/src/components/visual-editor/use-padding-appender.js", "../../../packages/editor/src/components/visual-editor/use-edit-content-only-section-exit.js", "../../../packages/editor/src/components/sidebar/index.js", "../../../packages/editor/src/components/pattern-overrides-panel/index.js", "../../../packages/editor/src/components/sidebar/post-summary.js", "../../../packages/editor/src/components/post-card-panel/index.js", "../../../packages/editor/src/components/post-actions/index.js", "../../../packages/editor/src/components/post-actions/actions.js", "../../../packages/editor/src/components/post-actions/set-as-homepage.js", "../../../packages/editor/src/utils/get-item-title.js", "../../../packages/editor/src/components/post-actions/set-as-posts-page.js", "../../../packages/editor/src/components/post-content-information/index.js", "../../../packages/editor/src/components/post-format/panel.js", "../../../packages/editor/src/components/post-last-edited-panel/index.js", "../../../packages/editor/src/components/post-panel-section/index.js", "../../../packages/editor/src/components/blog-title/index.js", "../../../packages/editor/src/components/posts-per-page/index.js", "../../../packages/editor/src/components/site-discussion/index.js", "../../../packages/editor/src/components/post-transform-panel/index.js", "../../../packages/editor/src/components/post-transform-panel/hooks.js", "../../../packages/editor/src/components/sidebar/header.js", "../../../packages/editor/src/components/sidebar/constants.js", "../../../packages/editor/src/components/template-content-panel/index.js", "../../../packages/editor/src/components/template-part-content-panel/index.js", "../../../packages/editor/src/components/provider/use-auto-switch-editor-sidebars.js", "../../../packages/editor/src/components/collab-sidebar/index.js", "../../../packages/editor/src/components/collab-sidebar/constants.js", "../../../packages/editor/src/components/collab-sidebar/comments.js", "../../../packages/editor/src/components/collab-sidebar/comment-author-info.js", "../../../packages/editor/src/components/collab-sidebar/utils.js", "../../../packages/editor/src/components/collab-sidebar/comment-form.js", "../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs", "../../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs", "../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs", "../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs", "../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs", "../../../packages/editor/src/components/collab-sidebar/hooks.js", "../../../packages/editor/src/components/collab-sidebar/add-comment.js", "../../../packages/editor/src/components/collab-sidebar/comment-menu-item.js", "../../../packages/editor/src/components/collab-sidebar/comment-indicator-toolbar.js", "../../../packages/editor/src/components/global-styles-sidebar/index.js", "../../../packages/editor/src/components/global-styles/menu.js", "../../../packages/editor/src/components/global-styles-sidebar/default-sidebar.js", "../../../packages/editor/src/components/global-styles-sidebar/welcome-guide.js", "../../../packages/editor/src/components/global-styles-sidebar/welcome-guide-image.js", "../../../packages/editor/src/components/preferences-modal/index.js", "../../../packages/editor/src/components/preferences-modal/enable-publish-sidebar.js", "../../../packages/editor/src/components/block-visibility/index.js", "../../../packages/editor/src/components/post-fields/index.ts", "../../../packages/editor/src/bindings/api.js", "../../../packages/editor/src/bindings/pattern-overrides.js", "../../../packages/editor/src/bindings/post-data.js", "../../../packages/editor/src/bindings/post-meta.js", "../../../packages/editor/src/bindings/term-data.js", "../../../packages/editor/src/private-apis.js", "../../../packages/editor/src/dataviews/api.js", "../../../packages/editor/src/index.js"],
"sourcesContent": ["module.exports = window.wp.data;", "module.exports = window.wp.coreData;", "module.exports = window.wp.element;", "module.exports = window.wp.compose;", "module.exports = window.wp.hooks;", "module.exports = window.wp.blockEditor;", "module.exports = window.wp.blocks;", "module.exports = window.wp.date;", "module.exports = window.wp.url;", "module.exports = window.wp.deprecated;", "module.exports = window.wp.preferences;", "module.exports = window.wp.primitives;", "module.exports = window.ReactJSXRuntime;", "module.exports = window.wp.privateApis;", "module.exports = window.wp.a11y;", "module.exports = window.wp.apiFetch;", "module.exports = window.wp.notices;", "module.exports = window.wp.i18n;", "module.exports = window.wp.htmlEntities;", "module.exports = window.wp.components;", "module.exports = window.wp.patterns;", "module.exports = window.wp.blob;", "module.exports = window.wp.mediaUtils;", "var characterMap = {\n\t\"\u00C0\": \"A\",\n\t\"\u00C1\": \"A\",\n\t\"\u00C2\": \"A\",\n\t\"\u00C3\": \"A\",\n\t\"\u00C4\": \"A\",\n\t\"\u00C5\": \"A\",\n\t\"\u1EA4\": \"A\",\n\t\"\u1EAE\": \"A\",\n\t\"\u1EB2\": \"A\",\n\t\"\u1EB4\": \"A\",\n\t\"\u1EB6\": \"A\",\n\t\"\u00C6\": \"AE\",\n\t\"\u1EA6\": \"A\",\n\t\"\u1EB0\": \"A\",\n\t\"\u0202\": \"A\",\n\t\"\u1EA2\": \"A\",\n\t\"\u1EA0\": \"A\",\n\t\"\u1EA8\": \"A\",\n\t\"\u1EAA\": \"A\",\n\t\"\u1EAC\": \"A\",\n\t\"\u00C7\": \"C\",\n\t\"\u1E08\": \"C\",\n\t\"\u00C8\": \"E\",\n\t\"\u00C9\": \"E\",\n\t\"\u00CA\": \"E\",\n\t\"\u00CB\": \"E\",\n\t\"\u1EBE\": \"E\",\n\t\"\u1E16\": \"E\",\n\t\"\u1EC0\": \"E\",\n\t\"\u1E14\": \"E\",\n\t\"\u1E1C\": \"E\",\n\t\"\u0206\": \"E\",\n\t\"\u1EBA\": \"E\",\n\t\"\u1EBC\": \"E\",\n\t\"\u1EB8\": \"E\",\n\t\"\u1EC2\": \"E\",\n\t\"\u1EC4\": \"E\",\n\t\"\u1EC6\": \"E\",\n\t\"\u00CC\": \"I\",\n\t\"\u00CD\": \"I\",\n\t\"\u00CE\": \"I\",\n\t\"\u00CF\": \"I\",\n\t\"\u1E2E\": \"I\",\n\t\"\u020A\": \"I\",\n\t\"\u1EC8\": \"I\",\n\t\"\u1ECA\": \"I\",\n\t\"\u00D0\": \"D\",\n\t\"\u00D1\": \"N\",\n\t\"\u00D2\": \"O\",\n\t\"\u00D3\": \"O\",\n\t\"\u00D4\": \"O\",\n\t\"\u00D5\": \"O\",\n\t\"\u00D6\": \"O\",\n\t\"\u00D8\": \"O\",\n\t\"\u1ED0\": \"O\",\n\t\"\u1E4C\": \"O\",\n\t\"\u1E52\": \"O\",\n\t\"\u020E\": \"O\",\n\t\"\u1ECE\": \"O\",\n\t\"\u1ECC\": \"O\",\n\t\"\u1ED4\": \"O\",\n\t\"\u1ED6\": \"O\",\n\t\"\u1ED8\": \"O\",\n\t\"\u1EDC\": \"O\",\n\t\"\u1EDE\": \"O\",\n\t\"\u1EE0\": \"O\",\n\t\"\u1EDA\": \"O\",\n\t\"\u1EE2\": \"O\",\n\t\"\u00D9\": \"U\",\n\t\"\u00DA\": \"U\",\n\t\"\u00DB\": \"U\",\n\t\"\u00DC\": \"U\",\n\t\"\u1EE6\": \"U\",\n\t\"\u1EE4\": \"U\",\n\t\"\u1EEC\": \"U\",\n\t\"\u1EEE\": \"U\",\n\t\"\u1EF0\": \"U\",\n\t\"\u00DD\": \"Y\",\n\t\"\u00E0\": \"a\",\n\t\"\u00E1\": \"a\",\n\t\"\u00E2\": \"a\",\n\t\"\u00E3\": \"a\",\n\t\"\u00E4\": \"a\",\n\t\"\u00E5\": \"a\",\n\t\"\u1EA5\": \"a\",\n\t\"\u1EAF\": \"a\",\n\t\"\u1EB3\": \"a\",\n\t\"\u1EB5\": \"a\",\n\t\"\u1EB7\": \"a\",\n\t\"\u00E6\": \"ae\",\n\t\"\u1EA7\": \"a\",\n\t\"\u1EB1\": \"a\",\n\t\"\u0203\": \"a\",\n\t\"\u1EA3\": \"a\",\n\t\"\u1EA1\": \"a\",\n\t\"\u1EA9\": \"a\",\n\t\"\u1EAB\": \"a\",\n\t\"\u1EAD\": \"a\",\n\t\"\u00E7\": \"c\",\n\t\"\u1E09\": \"c\",\n\t\"\u00E8\": \"e\",\n\t\"\u00E9\": \"e\",\n\t\"\u00EA\": \"e\",\n\t\"\u00EB\": \"e\",\n\t\"\u1EBF\": \"e\",\n\t\"\u1E17\": \"e\",\n\t\"\u1EC1\": \"e\",\n\t\"\u1E15\": \"e\",\n\t\"\u1E1D\": \"e\",\n\t\"\u0207\": \"e\",\n\t\"\u1EBB\": \"e\",\n\t\"\u1EBD\": \"e\",\n\t\"\u1EB9\": \"e\",\n\t\"\u1EC3\": \"e\",\n\t\"\u1EC5\": \"e\",\n\t\"\u1EC7\": \"e\",\n\t\"\u00EC\": \"i\",\n\t\"\u00ED\": \"i\",\n\t\"\u00EE\": \"i\",\n\t\"\u00EF\": \"i\",\n\t\"\u1E2F\": \"i\",\n\t\"\u020B\": \"i\",\n\t\"\u1EC9\": \"i\",\n\t\"\u1ECB\": \"i\",\n\t\"\u00F0\": \"d\",\n\t\"\u00F1\": \"n\",\n\t\"\u00F2\": \"o\",\n\t\"\u00F3\": \"o\",\n\t\"\u00F4\": \"o\",\n\t\"\u00F5\": \"o\",\n\t\"\u00F6\": \"o\",\n\t\"\u00F8\": \"o\",\n\t\"\u1ED1\": \"o\",\n\t\"\u1E4D\": \"o\",\n\t\"\u1E53\": \"o\",\n\t\"\u020F\": \"o\",\n\t\"\u1ECF\": \"o\",\n\t\"\u1ECD\": \"o\",\n\t\"\u1ED5\": \"o\",\n\t\"\u1ED7\": \"o\",\n\t\"\u1ED9\": \"o\",\n\t\"\u1EDD\": \"o\",\n\t\"\u1EDF\": \"o\",\n\t\"\u1EE1\": \"o\",\n\t\"\u1EDB\": \"o\",\n\t\"\u1EE3\": \"o\",\n\t\"\u00F9\": \"u\",\n\t\"\u00FA\": \"u\",\n\t\"\u00FB\": \"u\",\n\t\"\u00FC\": \"u\",\n\t\"\u1EE7\": \"u\",\n\t\"\u1EE5\": \"u\",\n\t\"\u1EED\": \"u\",\n\t\"\u1EEF\": \"u\",\n\t\"\u1EF1\": \"u\",\n\t\"\u00FD\": \"y\",\n\t\"\u00FF\": \"y\",\n\t\"\u0100\": \"A\",\n\t\"\u0101\": \"a\",\n\t\"\u0102\": \"A\",\n\t\"\u0103\": \"a\",\n\t\"\u0104\": \"A\",\n\t\"\u0105\": \"a\",\n\t\"\u0106\": \"C\",\n\t\"\u0107\": \"c\",\n\t\"\u0108\": \"C\",\n\t\"\u0109\": \"c\",\n\t\"\u010A\": \"C\",\n\t\"\u010B\": \"c\",\n\t\"\u010C\": \"C\",\n\t\"\u010D\": \"c\",\n\t\"C\u0306\": \"C\",\n\t\"c\u0306\": \"c\",\n\t\"\u010E\": \"D\",\n\t\"\u010F\": \"d\",\n\t\"\u0110\": \"D\",\n\t\"\u0111\": \"d\",\n\t\"\u0112\": \"E\",\n\t\"\u0113\": \"e\",\n\t\"\u0114\": \"E\",\n\t\"\u0115\": \"e\",\n\t\"\u0116\": \"E\",\n\t\"\u0117\": \"e\",\n\t\"\u0118\": \"E\",\n\t\"\u0119\": \"e\",\n\t\"\u011A\": \"E\",\n\t\"\u011B\": \"e\",\n\t\"\u011C\": \"G\",\n\t\"\u01F4\": \"G\",\n\t\"\u011D\": \"g\",\n\t\"\u01F5\": \"g\",\n\t\"\u011E\": \"G\",\n\t\"\u011F\": \"g\",\n\t\"\u0120\": \"G\",\n\t\"\u0121\": \"g\",\n\t\"\u0122\": \"G\",\n\t\"\u0123\": \"g\",\n\t\"\u0124\": \"H\",\n\t\"\u0125\": \"h\",\n\t\"\u0126\": \"H\",\n\t\"\u0127\": \"h\",\n\t\"\u1E2A\": \"H\",\n\t\"\u1E2B\": \"h\",\n\t\"\u0128\": \"I\",\n\t\"\u0129\": \"i\",\n\t\"\u012A\": \"I\",\n\t\"\u012B\": \"i\",\n\t\"\u012C\": \"I\",\n\t\"\u012D\": \"i\",\n\t\"\u012E\": \"I\",\n\t\"\u012F\": \"i\",\n\t\"\u0130\": \"I\",\n\t\"\u0131\": \"i\",\n\t\"\u0132\": \"IJ\",\n\t\"\u0133\": \"ij\",\n\t\"\u0134\": \"J\",\n\t\"\u0135\": \"j\",\n\t\"\u0136\": \"K\",\n\t\"\u0137\": \"k\",\n\t\"\u1E30\": \"K\",\n\t\"\u1E31\": \"k\",\n\t\"K\u0306\": \"K\",\n\t\"k\u0306\": \"k\",\n\t\"\u0139\": \"L\",\n\t\"\u013A\": \"l\",\n\t\"\u013B\": \"L\",\n\t\"\u013C\": \"l\",\n\t\"\u013D\": \"L\",\n\t\"\u013E\": \"l\",\n\t\"\u013F\": \"L\",\n\t\"\u0140\": \"l\",\n\t\"\u0141\": \"l\",\n\t\"\u0142\": \"l\",\n\t\"\u1E3E\": \"M\",\n\t\"\u1E3F\": \"m\",\n\t\"M\u0306\": \"M\",\n\t\"m\u0306\": \"m\",\n\t\"\u0143\": \"N\",\n\t\"\u0144\": \"n\",\n\t\"\u0145\": \"N\",\n\t\"\u0146\": \"n\",\n\t\"\u0147\": \"N\",\n\t\"\u0148\": \"n\",\n\t\"\u0149\": \"n\",\n\t\"N\u0306\": \"N\",\n\t\"n\u0306\": \"n\",\n\t\"\u014C\": \"O\",\n\t\"\u014D\": \"o\",\n\t\"\u014E\": \"O\",\n\t\"\u014F\": \"o\",\n\t\"\u0150\": \"O\",\n\t\"\u0151\": \"o\",\n\t\"\u0152\": \"OE\",\n\t\"\u0153\": \"oe\",\n\t\"P\u0306\": \"P\",\n\t\"p\u0306\": \"p\",\n\t\"\u0154\": \"R\",\n\t\"\u0155\": \"r\",\n\t\"\u0156\": \"R\",\n\t\"\u0157\": \"r\",\n\t\"\u0158\": \"R\",\n\t\"\u0159\": \"r\",\n\t\"R\u0306\": \"R\",\n\t\"r\u0306\": \"r\",\n\t\"\u0212\": \"R\",\n\t\"\u0213\": \"r\",\n\t\"\u015A\": \"S\",\n\t\"\u015B\": \"s\",\n\t\"\u015C\": \"S\",\n\t\"\u015D\": \"s\",\n\t\"\u015E\": \"S\",\n\t\"\u0218\": \"S\",\n\t\"\u0219\": \"s\",\n\t\"\u015F\": \"s\",\n\t\"\u0160\": \"S\",\n\t\"\u0161\": \"s\",\n\t\"\u0162\": \"T\",\n\t\"\u0163\": \"t\",\n\t\"\u021B\": \"t\",\n\t\"\u021A\": \"T\",\n\t\"\u0164\": \"T\",\n\t\"\u0165\": \"t\",\n\t\"\u0166\": \"T\",\n\t\"\u0167\": \"t\",\n\t\"T\u0306\": \"T\",\n\t\"t\u0306\": \"t\",\n\t\"\u0168\": \"U\",\n\t\"\u0169\": \"u\",\n\t\"\u016A\": \"U\",\n\t\"\u016B\": \"u\",\n\t\"\u016C\": \"U\",\n\t\"\u016D\": \"u\",\n\t\"\u016E\": \"U\",\n\t\"\u016F\": \"u\",\n\t\"\u0170\": \"U\",\n\t\"\u0171\": \"u\",\n\t\"\u0172\": \"U\",\n\t\"\u0173\": \"u\",\n\t\"\u0216\": \"U\",\n\t\"\u0217\": \"u\",\n\t\"V\u0306\": \"V\",\n\t\"v\u0306\": \"v\",\n\t\"\u0174\": \"W\",\n\t\"\u0175\": \"w\",\n\t\"\u1E82\": \"W\",\n\t\"\u1E83\": \"w\",\n\t\"X\u0306\": \"X\",\n\t\"x\u0306\": \"x\",\n\t\"\u0176\": \"Y\",\n\t\"\u0177\": \"y\",\n\t\"\u0178\": \"Y\",\n\t\"Y\u0306\": \"Y\",\n\t\"y\u0306\": \"y\",\n\t\"\u0179\": \"Z\",\n\t\"\u017A\": \"z\",\n\t\"\u017B\": \"Z\",\n\t\"\u017C\": \"z\",\n\t\"\u017D\": \"Z\",\n\t\"\u017E\": \"z\",\n\t\"\u017F\": \"s\",\n\t\"\u0192\": \"f\",\n\t\"\u01A0\": \"O\",\n\t\"\u01A1\": \"o\",\n\t\"\u01AF\": \"U\",\n\t\"\u01B0\": \"u\",\n\t\"\u01CD\": \"A\",\n\t\"\u01CE\": \"a\",\n\t\"\u01CF\": \"I\",\n\t\"\u01D0\": \"i\",\n\t\"\u01D1\": \"O\",\n\t\"\u01D2\": \"o\",\n\t\"\u01D3\": \"U\",\n\t\"\u01D4\": \"u\",\n\t\"\u01D5\": \"U\",\n\t\"\u01D6\": \"u\",\n\t\"\u01D7\": \"U\",\n\t\"\u01D8\": \"u\",\n\t\"\u01D9\": \"U\",\n\t\"\u01DA\": \"u\",\n\t\"\u01DB\": \"U\",\n\t\"\u01DC\": \"u\",\n\t\"\u1EE8\": \"U\",\n\t\"\u1EE9\": \"u\",\n\t\"\u1E78\": \"U\",\n\t\"\u1E79\": \"u\",\n\t\"\u01FA\": \"A\",\n\t\"\u01FB\": \"a\",\n\t\"\u01FC\": \"AE\",\n\t\"\u01FD\": \"ae\",\n\t\"\u01FE\": \"O\",\n\t\"\u01FF\": \"o\",\n\t\"\u00DE\": \"TH\",\n\t\"\u00FE\": \"th\",\n\t\"\u1E54\": \"P\",\n\t\"\u1E55\": \"p\",\n\t\"\u1E64\": \"S\",\n\t\"\u1E65\": \"s\",\n\t\"X\u0301\": \"X\",\n\t\"x\u0301\": \"x\",\n\t\"\u0403\": \"\u0413\",\n\t\"\u0453\": \"\u0433\",\n\t\"\u040C\": \"\u041A\",\n\t\"\u045C\": \"\u043A\",\n\t\"A\u030B\": \"A\",\n\t\"a\u030B\": \"a\",\n\t\"E\u030B\": \"E\",\n\t\"e\u030B\": \"e\",\n\t\"I\u030B\": \"I\",\n\t\"i\u030B\": \"i\",\n\t\"\u01F8\": \"N\",\n\t\"\u01F9\": \"n\",\n\t\"\u1ED2\": \"O\",\n\t\"\u1ED3\": \"o\",\n\t\"\u1E50\": \"O\",\n\t\"\u1E51\": \"o\",\n\t\"\u1EEA\": \"U\",\n\t\"\u1EEB\": \"u\",\n\t\"\u1E80\": \"W\",\n\t\"\u1E81\": \"w\",\n\t\"\u1EF2\": \"Y\",\n\t\"\u1EF3\": \"y\",\n\t\"\u0200\": \"A\",\n\t\"\u0201\": \"a\",\n\t\"\u0204\": \"E\",\n\t\"\u0205\": \"e\",\n\t\"\u0208\": \"I\",\n\t\"\u0209\": \"i\",\n\t\"\u020C\": \"O\",\n\t\"\u020D\": \"o\",\n\t\"\u0210\": \"R\",\n\t\"\u0211\": \"r\",\n\t\"\u0214\": \"U\",\n\t\"\u0215\": \"u\",\n\t\"B\u030C\": \"B\",\n\t\"b\u030C\": \"b\",\n\t\"\u010C\u0323\": \"C\",\n\t\"\u010D\u0323\": \"c\",\n\t\"\u00CA\u030C\": \"E\",\n\t\"\u00EA\u030C\": \"e\",\n\t\"F\u030C\": \"F\",\n\t\"f\u030C\": \"f\",\n\t\"\u01E6\": \"G\",\n\t\"\u01E7\": \"g\",\n\t\"\u021E\": \"H\",\n\t\"\u021F\": \"h\",\n\t\"J\u030C\": \"J\",\n\t\"\u01F0\": \"j\",\n\t\"\u01E8\": \"K\",\n\t\"\u01E9\": \"k\",\n\t\"M\u030C\": \"M\",\n\t\"m\u030C\": \"m\",\n\t\"P\u030C\": \"P\",\n\t\"p\u030C\": \"p\",\n\t\"Q\u030C\": \"Q\",\n\t\"q\u030C\": \"q\",\n\t\"\u0158\u0329\": \"R\",\n\t\"\u0159\u0329\": \"r\",\n\t\"\u1E66\": \"S\",\n\t\"\u1E67\": \"s\",\n\t\"V\u030C\": \"V\",\n\t\"v\u030C\": \"v\",\n\t\"W\u030C\": \"W\",\n\t\"w\u030C\": \"w\",\n\t\"X\u030C\": \"X\",\n\t\"x\u030C\": \"x\",\n\t\"Y\u030C\": \"Y\",\n\t\"y\u030C\": \"y\",\n\t\"A\u0327\": \"A\",\n\t\"a\u0327\": \"a\",\n\t\"B\u0327\": \"B\",\n\t\"b\u0327\": \"b\",\n\t\"\u1E10\": \"D\",\n\t\"\u1E11\": \"d\",\n\t\"\u0228\": \"E\",\n\t\"\u0229\": \"e\",\n\t\"\u0190\u0327\": \"E\",\n\t\"\u025B\u0327\": \"e\",\n\t\"\u1E28\": \"H\",\n\t\"\u1E29\": \"h\",\n\t\"I\u0327\": \"I\",\n\t\"i\u0327\": \"i\",\n\t\"\u0197\u0327\": \"I\",\n\t\"\u0268\u0327\": \"i\",\n\t\"M\u0327\": \"M\",\n\t\"m\u0327\": \"m\",\n\t\"O\u0327\": \"O\",\n\t\"o\u0327\": \"o\",\n\t\"Q\u0327\": \"Q\",\n\t\"q\u0327\": \"q\",\n\t\"U\u0327\": \"U\",\n\t\"u\u0327\": \"u\",\n\t\"X\u0327\": \"X\",\n\t\"x\u0327\": \"x\",\n\t\"Z\u0327\": \"Z\",\n\t\"z\u0327\": \"z\",\n\t\"\u0439\":\"\u0438\",\n\t\"\u0419\":\"\u0418\",\n\t\"\u0451\":\"\u0435\",\n\t\"\u0401\":\"\u0415\",\n};\n\nvar chars = Object.keys(characterMap).join('|');\nvar allAccents = new RegExp(chars, 'g');\nvar firstAccent = new RegExp(chars, '');\n\nfunction matcher(match) {\n\treturn characterMap[match];\n}\n\nvar removeAccents = function(string) {\n\treturn string.replace(allAccents, matcher);\n};\n\nvar hasAccents = function(string) {\n\treturn !!string.match(firstAccent);\n};\n\nmodule.exports = removeAccents;\nmodule.exports.has = hasAccents;\nmodule.exports.remove = removeAccents;\n", "module.exports = window.wp.styleEngine;", "'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n var envHasBigInt64Array = typeof BigInt64Array !== 'undefined';\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n if ((a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n for (i of a.entries())\n if (!b.has(i[0])) return false;\n for (i of a.entries())\n if (!equal(i[1], b.get(i[0]))) return false;\n return true;\n }\n\n if ((a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n for (i of a.entries())\n if (!b.has(i[0])) return false;\n return true;\n }\n\n if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n", "'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn Object.propertyIsEnumerable.call(target, symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n", "module.exports = window.wp.commands;", "module.exports = window.wp.viewport;", "module.exports = window.wp.plugins;", "module.exports = window.wp.keyboardShortcuts;", "module.exports = window.wp.keycodes;", "'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n", "module.exports = window.wp.dom;", "module.exports = window.wp.richText;", "module.exports = window.wp.warning;", "module.exports = window.React;", "/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n", "/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n", "module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\n", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = require('./lib/has');\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) { /**/ }\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar has = require('./lib/has');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message, data) {\n this.message = message;\n this.data = data && typeof data === 'object' ? data: {};\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n {expectedType: expectedType}\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError(\n (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n );\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n", "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n", "/*!\n\tautosize 4.0.2\n\tlicense: MIT\n\thttp://www.jacklmoore.com/autosize\n*/\n(function (global, factory) {\n\tif (typeof define === \"function\" && define.amd) {\n\t\tdefine(['module', 'exports'], factory);\n\t} else if (typeof exports !== \"undefined\") {\n\t\tfactory(module, exports);\n\t} else {\n\t\tvar mod = {\n\t\t\texports: {}\n\t\t};\n\t\tfactory(mod, mod.exports);\n\t\tglobal.autosize = mod.exports;\n\t}\n})(this, function (module, exports) {\n\t'use strict';\n\n\tvar map = typeof Map === \"function\" ? new Map() : function () {\n\t\tvar keys = [];\n\t\tvar values = [];\n\n\t\treturn {\n\t\t\thas: function has(key) {\n\t\t\t\treturn keys.indexOf(key) > -1;\n\t\t\t},\n\t\t\tget: function get(key) {\n\t\t\t\treturn values[keys.indexOf(key)];\n\t\t\t},\n\t\t\tset: function set(key, value) {\n\t\t\t\tif (keys.indexOf(key) === -1) {\n\t\t\t\t\tkeys.push(key);\n\t\t\t\t\tvalues.push(value);\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelete: function _delete(key) {\n\t\t\t\tvar index = keys.indexOf(key);\n\t\t\t\tif (index > -1) {\n\t\t\t\t\tkeys.splice(index, 1);\n\t\t\t\t\tvalues.splice(index, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}();\n\n\tvar createEvent = function createEvent(name) {\n\t\treturn new Event(name, { bubbles: true });\n\t};\n\ttry {\n\t\tnew Event('test');\n\t} catch (e) {\n\t\t// IE does not support `new Event()`\n\t\tcreateEvent = function createEvent(name) {\n\t\t\tvar evt = document.createEvent('Event');\n\t\t\tevt.initEvent(name, true, false);\n\t\t\treturn evt;\n\t\t};\n\t}\n\n\tfunction assign(ta) {\n\t\tif (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || map.has(ta)) return;\n\n\t\tvar heightOffset = null;\n\t\tvar clientWidth = null;\n\t\tvar cachedHeight = null;\n\n\t\tfunction init() {\n\t\t\tvar style = window.getComputedStyle(ta, null);\n\n\t\t\tif (style.resize === 'vertical') {\n\t\t\t\tta.style.resize = 'none';\n\t\t\t} else if (style.resize === 'both') {\n\t\t\t\tta.style.resize = 'horizontal';\n\t\t\t}\n\n\t\t\tif (style.boxSizing === 'content-box') {\n\t\t\t\theightOffset = -(parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));\n\t\t\t} else {\n\t\t\t\theightOffset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);\n\t\t\t}\n\t\t\t// Fix when a textarea is not on document body and heightOffset is Not a Number\n\t\t\tif (isNaN(heightOffset)) {\n\t\t\t\theightOffset = 0;\n\t\t\t}\n\n\t\t\tupdate();\n\t\t}\n\n\t\tfunction changeOverflow(value) {\n\t\t\t{\n\t\t\t\t// Chrome/Safari-specific fix:\n\t\t\t\t// When the textarea y-overflow is hidden, Chrome/Safari do not reflow the text to account for the space\n\t\t\t\t// made available by removing the scrollbar. The following forces the necessary text reflow.\n\t\t\t\tvar width = ta.style.width;\n\t\t\t\tta.style.width = '0px';\n\t\t\t\t// Force reflow:\n\t\t\t\t/* jshint ignore:start */\n\t\t\t\tta.offsetWidth;\n\t\t\t\t/* jshint ignore:end */\n\t\t\t\tta.style.width = width;\n\t\t\t}\n\n\t\t\tta.style.overflowY = value;\n\t\t}\n\n\t\tfunction getParentOverflows(el) {\n\t\t\tvar arr = [];\n\n\t\t\twhile (el && el.parentNode && el.parentNode instanceof Element) {\n\t\t\t\tif (el.parentNode.scrollTop) {\n\t\t\t\t\tarr.push({\n\t\t\t\t\t\tnode: el.parentNode,\n\t\t\t\t\t\tscrollTop: el.parentNode.scrollTop\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tel = el.parentNode;\n\t\t\t}\n\n\t\t\treturn arr;\n\t\t}\n\n\t\tfunction resize() {\n\t\t\tif (ta.scrollHeight === 0) {\n\t\t\t\t// If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar overflows = getParentOverflows(ta);\n\t\t\tvar docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240)\n\n\t\t\tta.style.height = '';\n\t\t\tta.style.height = ta.scrollHeight + heightOffset + 'px';\n\n\t\t\t// used to check if an update is actually necessary on window.resize\n\t\t\tclientWidth = ta.clientWidth;\n\n\t\t\t// prevents scroll-position jumping\n\t\t\toverflows.forEach(function (el) {\n\t\t\t\tel.node.scrollTop = el.scrollTop;\n\t\t\t});\n\n\t\t\tif (docTop) {\n\t\t\t\tdocument.documentElement.scrollTop = docTop;\n\t\t\t}\n\t\t}\n\n\t\tfunction update() {\n\t\t\tresize();\n\n\t\t\tvar styleHeight = Math.round(parseFloat(ta.style.height));\n\t\t\tvar computed = window.getComputedStyle(ta, null);\n\n\t\t\t// Using offsetHeight as a replacement for computed.height in IE, because IE does not account use of border-box\n\t\t\tvar actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(computed.height)) : ta.offsetHeight;\n\n\t\t\t// The actual height not matching the style height (set via the resize method) indicates that \n\t\t\t// the max-height has been exceeded, in which case the overflow should be allowed.\n\t\t\tif (actualHeight < styleHeight) {\n\t\t\t\tif (computed.overflowY === 'hidden') {\n\t\t\t\t\tchangeOverflow('scroll');\n\t\t\t\t\tresize();\n\t\t\t\t\tactualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands.\n\t\t\t\tif (computed.overflowY !== 'hidden') {\n\t\t\t\t\tchangeOverflow('hidden');\n\t\t\t\t\tresize();\n\t\t\t\t\tactualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (cachedHeight !== actualHeight) {\n\t\t\t\tcachedHeight = actualHeight;\n\t\t\t\tvar evt = createEvent('autosize:resized');\n\t\t\t\ttry {\n\t\t\t\t\tta.dispatchEvent(evt);\n\t\t\t\t} catch (err) {\n\t\t\t\t\t// Firefox will throw an error on dispatchEvent for a detached element\n\t\t\t\t\t// https://bugzilla.mozilla.org/show_bug.cgi?id=889376\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar pageResize = function pageResize() {\n\t\t\tif (ta.clientWidth !== clientWidth) {\n\t\t\t\tupdate();\n\t\t\t}\n\t\t};\n\n\t\tvar destroy = function (style) {\n\t\t\twindow.removeEventListener('resize', pageResize, false);\n\t\t\tta.removeEventListener('input', update, false);\n\t\t\tta.removeEventListener('keyup', update, false);\n\t\t\tta.removeEventListener('autosize:destroy', destroy, false);\n\t\t\tta.removeEventListener('autosize:update', update, false);\n\n\t\t\tObject.keys(style).forEach(function (key) {\n\t\t\t\tta.style[key] = style[key];\n\t\t\t});\n\n\t\t\tmap.delete(ta);\n\t\t}.bind(ta, {\n\t\t\theight: ta.style.height,\n\t\t\tresize: ta.style.resize,\n\t\t\toverflowY: ta.style.overflowY,\n\t\t\toverflowX: ta.style.overflowX,\n\t\t\twordWrap: ta.style.wordWrap\n\t\t});\n\n\t\tta.addEventListener('autosize:destroy', destroy, false);\n\n\t\t// IE9 does not fire onpropertychange or oninput for deletions,\n\t\t// so binding to onkeyup to catch most of those events.\n\t\t// There is no way that I know of to detect something like 'cut' in IE9.\n\t\tif ('onpropertychange' in ta && 'oninput' in ta) {\n\t\t\tta.addEventListener('keyup', update, false);\n\t\t}\n\n\t\twindow.addEventListener('resize', pageResize, false);\n\t\tta.addEventListener('input', update, false);\n\t\tta.addEventListener('autosize:update', update, false);\n\t\tta.style.overflowX = 'hidden';\n\t\tta.style.wordWrap = 'break-word';\n\n\t\tmap.set(ta, {\n\t\t\tdestroy: destroy,\n\t\t\tupdate: update\n\t\t});\n\n\t\tinit();\n\t}\n\n\tfunction destroy(ta) {\n\t\tvar methods = map.get(ta);\n\t\tif (methods) {\n\t\t\tmethods.destroy();\n\t\t}\n\t}\n\n\tfunction update(ta) {\n\t\tvar methods = map.get(ta);\n\t\tif (methods) {\n\t\t\tmethods.update();\n\t\t}\n\t}\n\n\tvar autosize = null;\n\n\t// Do nothing in Node.js environment and IE8 (or lower)\n\tif (typeof window === 'undefined' || typeof window.getComputedStyle !== 'function') {\n\t\tautosize = function autosize(el) {\n\t\t\treturn el;\n\t\t};\n\t\tautosize.destroy = function (el) {\n\t\t\treturn el;\n\t\t};\n\t\tautosize.update = function (el) {\n\t\t\treturn el;\n\t\t};\n\t} else {\n\t\tautosize = function autosize(el, options) {\n\t\t\tif (el) {\n\t\t\t\tArray.prototype.forEach.call(el.length ? el : [el], function (x) {\n\t\t\t\t\treturn assign(x, options);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn el;\n\t\t};\n\t\tautosize.destroy = function (el) {\n\t\t\tif (el) {\n\t\t\t\tArray.prototype.forEach.call(el.length ? el : [el], destroy);\n\t\t\t}\n\t\t\treturn el;\n\t\t};\n\t\tautosize.update = function (el) {\n\t\t\tif (el) {\n\t\t\t\tArray.prototype.forEach.call(el.length ? el : [el], update);\n\t\t\t}\n\t\t\treturn el;\n\t\t};\n\t}\n\n\texports.default = autosize;\n\tmodule.exports = exports['default'];\n});", "// This code has been refactored for 140 bytes\n// You can see the original here: https://github.com/twolfson/computedStyle/blob/04cd1da2e30fa45844f95f5cb1ac898e9b9ef050/lib/computedStyle.js\nvar computedStyle = function (el, prop, getComputedStyle) {\n getComputedStyle = window.getComputedStyle;\n\n // In one fell swoop\n return (\n // If we have getComputedStyle\n getComputedStyle ?\n // Query it\n // TODO: From CSS-Query notes, we might need (node, null) for FF\n getComputedStyle(el) :\n\n // Otherwise, we are in IE and use currentStyle\n el.currentStyle\n )[\n // Switch to camelCase for CSSOM\n // DEV: Grabbed from jQuery\n // https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194\n // https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597\n prop.replace(/-(\\w)/gi, function (word, letter) {\n return letter.toUpperCase();\n })\n ];\n};\n\nmodule.exports = computedStyle;\n", "// Load in dependencies\nvar computedStyle = require('computed-style');\n\n/**\n * Calculate the `line-height` of a given node\n * @param {HTMLElement} node Element to calculate line height of. Must be in the DOM.\n * @returns {Number} `line-height` of the element in pixels\n */\nfunction lineHeight(node) {\n // Grab the line-height via style\n var lnHeightStr = computedStyle(node, 'line-height');\n var lnHeight = parseFloat(lnHeightStr, 10);\n\n // If the lineHeight did not contain a unit (i.e. it was numeric), convert it to ems (e.g. '2.3' === '2.3em')\n if (lnHeightStr === lnHeight + '') {\n // Save the old lineHeight style and update the em unit to the element\n var _lnHeightStyle = node.style.lineHeight;\n node.style.lineHeight = lnHeightStr + 'em';\n\n // Calculate the em based height\n lnHeightStr = computedStyle(node, 'line-height');\n lnHeight = parseFloat(lnHeightStr, 10);\n\n // Revert the lineHeight style\n if (_lnHeightStyle) {\n node.style.lineHeight = _lnHeightStyle;\n } else {\n delete node.style.lineHeight;\n }\n }\n\n // If the lineHeight is in `pt`, convert it to pixels (4px for 3pt)\n // DEV: `em` units are converted to `pt` in IE6\n // Conversion ratio from https://developer.mozilla.org/en-US/docs/Web/CSS/length\n if (lnHeightStr.indexOf('pt') !== -1) {\n lnHeight *= 4;\n lnHeight /= 3;\n // Otherwise, if the lineHeight is in `mm`, convert it to pixels (96px for 25.4mm)\n } else if (lnHeightStr.indexOf('mm') !== -1) {\n lnHeight *= 96;\n lnHeight /= 25.4;\n // Otherwise, if the lineHeight is in `cm`, convert it to pixels (96px for 2.54cm)\n } else if (lnHeightStr.indexOf('cm') !== -1) {\n lnHeight *= 96;\n lnHeight /= 2.54;\n // Otherwise, if the lineHeight is in `in`, convert it to pixels (96px for 1in)\n } else if (lnHeightStr.indexOf('in') !== -1) {\n lnHeight *= 96;\n // Otherwise, if the lineHeight is in `pc`, convert it to pixels (12pt for 1pc)\n } else if (lnHeightStr.indexOf('pc') !== -1) {\n lnHeight *= 16;\n }\n\n // Continue our computation\n lnHeight = Math.round(lnHeight);\n\n // If the line-height is \"normal\", calculate by font-size\n if (lnHeightStr === 'normal') {\n // Create a temporary node\n var nodeName = node.nodeName;\n var _node = document.createElement(nodeName);\n _node.innerHTML = ' ';\n\n // If we have a text area, reset it to only 1 row\n // https://github.com/twolfson/line-height/issues/4\n if (nodeName.toUpperCase() === 'TEXTAREA') {\n _node.setAttribute('rows', '1');\n }\n\n // Set the font-size of the element\n var fontSizeStr = computedStyle(node, 'font-size');\n _node.style.fontSize = fontSizeStr;\n\n // Remove default padding/border which can affect offset height\n // https://github.com/twolfson/line-height/issues/4\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight\n _node.style.padding = '0px';\n _node.style.border = '0px';\n\n // Append it to the body\n var body = document.body;\n body.appendChild(_node);\n\n // Assume the line height of the element is the height\n var height = _node.offsetHeight;\n lnHeight = height;\n\n // Remove our child from the DOM\n body.removeChild(_node);\n }\n\n // Return the calculated height\n return lnHeight;\n}\n\n// Export lineHeight\nmodule.exports = lineHeight;\n", "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\n t[p[i]] = s[p[i]];\n return t;\n};\nexports.__esModule = true;\nvar React = require(\"react\");\nvar PropTypes = require(\"prop-types\");\nvar autosize = require(\"autosize\");\nvar _getLineHeight = require(\"line-height\");\nvar getLineHeight = _getLineHeight;\nvar RESIZED = \"autosize:resized\";\n/**\n * A light replacement for built-in textarea component\n * which automaticaly adjusts its height to match the content\n */\nvar TextareaAutosizeClass = /** @class */ (function (_super) {\n __extends(TextareaAutosizeClass, _super);\n function TextareaAutosizeClass() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n lineHeight: null\n };\n _this.textarea = null;\n _this.onResize = function (e) {\n if (_this.props.onResize) {\n _this.props.onResize(e);\n }\n };\n _this.updateLineHeight = function () {\n if (_this.textarea) {\n _this.setState({\n lineHeight: getLineHeight(_this.textarea)\n });\n }\n };\n _this.onChange = function (e) {\n var onChange = _this.props.onChange;\n _this.currentValue = e.currentTarget.value;\n onChange && onChange(e);\n };\n return _this;\n }\n TextareaAutosizeClass.prototype.componentDidMount = function () {\n var _this = this;\n var _a = this.props, maxRows = _a.maxRows, async = _a.async;\n if (typeof maxRows === \"number\") {\n this.updateLineHeight();\n }\n if (typeof maxRows === \"number\" || async) {\n /*\n the defer is needed to:\n - force \"autosize\" to activate the scrollbar when this.props.maxRows is passed\n - support StyledComponents (see #71)\n */\n setTimeout(function () { return _this.textarea && autosize(_this.textarea); });\n }\n else {\n this.textarea && autosize(this.textarea);\n }\n if (this.textarea) {\n this.textarea.addEventListener(RESIZED, this.onResize);\n }\n };\n TextareaAutosizeClass.prototype.componentWillUnmount = function () {\n if (this.textarea) {\n this.textarea.removeEventListener(RESIZED, this.onResize);\n autosize.destroy(this.textarea);\n }\n };\n TextareaAutosizeClass.prototype.render = function () {\n var _this = this;\n var _a = this, _b = _a.props, onResize = _b.onResize, maxRows = _b.maxRows, onChange = _b.onChange, style = _b.style, innerRef = _b.innerRef, children = _b.children, props = __rest(_b, [\"onResize\", \"maxRows\", \"onChange\", \"style\", \"innerRef\", \"children\"]), lineHeight = _a.state.lineHeight;\n var maxHeight = maxRows && lineHeight ? lineHeight * maxRows : null;\n return (React.createElement(\"textarea\", __assign({}, props, { onChange: this.onChange, style: maxHeight ? __assign({}, style, { maxHeight: maxHeight }) : style, ref: function (element) {\n _this.textarea = element;\n if (typeof _this.props.innerRef === 'function') {\n _this.props.innerRef(element);\n }\n else if (_this.props.innerRef) {\n _this.props.innerRef.current = element;\n }\n } }), children));\n };\n TextareaAutosizeClass.prototype.componentDidUpdate = function () {\n this.textarea && autosize.update(this.textarea);\n };\n TextareaAutosizeClass.defaultProps = {\n rows: 1,\n async: false\n };\n TextareaAutosizeClass.propTypes = {\n rows: PropTypes.number,\n maxRows: PropTypes.number,\n onResize: PropTypes.func,\n innerRef: PropTypes.any,\n async: PropTypes.bool\n };\n return TextareaAutosizeClass;\n}(React.Component));\nexports.TextareaAutosize = React.forwardRef(function (props, ref) {\n return React.createElement(TextareaAutosizeClass, __assign({}, props, { innerRef: ref }));\n});\n", "\"use strict\";\nvar TextareaAutosize_1 = require(\"./TextareaAutosize\");\nmodule.exports = TextareaAutosize_1.TextareaAutosize;\n", "module.exports = window.wp.wordcount;", "module.exports = window.wp.serverSideRender;", "module.exports = window.ReactDOM;", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useEntityProp } from '@wordpress/core-data';\nimport { useMemo } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../store';\n\n/** @typedef {import('@wordpress/compose').WPHigherOrderComponent} WPHigherOrderComponent */\n/** @typedef {import('@wordpress/blocks').WPBlockSettings} WPBlockSettings */\n\n/**\n * Object whose keys are the names of block attributes, where each value\n * represents the meta key to which the block attribute is intended to save.\n *\n * @see https://developer.wordpress.org/reference/functions/register_meta/\n *\n * @typedef {Object<string,string>} WPMetaAttributeMapping\n */\n\n/**\n * Given a mapping of attribute names (meta source attributes) to their\n * associated meta key, returns a higher order component that overrides its\n * `attributes` and `setAttributes` props to sync any changes with the edited\n * post's meta keys.\n *\n * @param {WPMetaAttributeMapping} metaAttributes Meta attribute mapping.\n *\n * @return {WPHigherOrderComponent} Higher-order component.\n */\nconst createWithMetaAttributeSource = ( metaAttributes ) =>\n\tcreateHigherOrderComponent(\n\t\t( BlockEdit ) =>\n\t\t\t( { attributes, setAttributes, ...props } ) => {\n\t\t\t\tconst postType = useSelect(\n\t\t\t\t\t( select ) => select( editorStore ).getCurrentPostType(),\n\t\t\t\t\t[]\n\t\t\t\t);\n\t\t\t\tconst [ meta, setMeta ] = useEntityProp(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\t'meta'\n\t\t\t\t);\n\n\t\t\t\tconst mergedAttributes = useMemo(\n\t\t\t\t\t() => ( {\n\t\t\t\t\t\t...attributes,\n\t\t\t\t\t\t...Object.fromEntries(\n\t\t\t\t\t\t\tObject.entries( metaAttributes ).map(\n\t\t\t\t\t\t\t\t( [ attributeKey, metaKey ] ) => [\n\t\t\t\t\t\t\t\t\tattributeKey,\n\t\t\t\t\t\t\t\t\tmeta[ metaKey ],\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t} ),\n\t\t\t\t\t[ attributes, meta ]\n\t\t\t\t);\n\n\t\t\t\treturn (\n\t\t\t\t\t<BlockEdit\n\t\t\t\t\t\tattributes={ mergedAttributes }\n\t\t\t\t\t\tsetAttributes={ ( nextAttributes ) => {\n\t\t\t\t\t\t\tconst nextMeta = Object.fromEntries(\n\t\t\t\t\t\t\t\tObject.entries( nextAttributes ?? {} )\n\t\t\t\t\t\t\t\t\t.filter(\n\t\t\t\t\t\t\t\t\t\t// Filter to intersection of keys between the updated\n\t\t\t\t\t\t\t\t\t\t// attributes and those with an associated meta key.\n\t\t\t\t\t\t\t\t\t\t( [ key ] ) => key in metaAttributes\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t.map( ( [ attributeKey, value ] ) => [\n\t\t\t\t\t\t\t\t\t\t// Rename the keys to the expected meta key name.\n\t\t\t\t\t\t\t\t\t\tmetaAttributes[ attributeKey ],\n\t\t\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t\t\t] )\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif ( Object.entries( nextMeta ).length ) {\n\t\t\t\t\t\t\t\tsetMeta( nextMeta );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tsetAttributes( nextAttributes );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t},\n\t\t'withMetaAttributeSource'\n\t);\n\n/**\n * Filters a registered block's settings to enhance a block's `edit` component\n * to upgrade meta-sourced attributes to use the post's meta entity property.\n *\n * @param {WPBlockSettings} settings Registered block settings.\n *\n * @return {WPBlockSettings} Filtered block settings.\n */\nfunction shimAttributeSource( settings ) {\n\t/** @type {WPMetaAttributeMapping} */\n\tconst metaAttributes = Object.fromEntries(\n\t\tObject.entries( settings.attributes ?? {} )\n\t\t\t.filter( ( [ , { source } ] ) => source === 'meta' )\n\t\t\t.map( ( [ attributeKey, { meta } ] ) => [ attributeKey, meta ] )\n\t);\n\tif ( Object.entries( metaAttributes ).length ) {\n\t\tsettings.edit = createWithMetaAttributeSource( metaAttributes )(\n\t\t\tsettings.edit\n\t\t);\n\t}\n\n\treturn settings;\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/editor/custom-sources-backwards-compatibility/shim-attribute-source',\n\tshimAttributeSource\n);\n", "/**\n * WordPress dependencies\n */\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as selectors from './selectors';\nimport * as actions from './actions';\nimport * as privateActions from './private-actions';\nimport * as privateSelectors from './private-selectors';\nimport { STORE_NAME } from './constants';\nimport { unlock } from '../lock-unlock';\n\n/**\n * Post editor data store configuration.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore\n */\nexport const storeConfig = {\n\treducer,\n\tselectors,\n\tactions,\n};\n\n/**\n * Store definition for the editor namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n */\nexport const store = createReduxStore( STORE_NAME, {\n\t...storeConfig,\n} );\n\nregister( store );\nunlock( store ).registerPrivateActions( privateActions );\nunlock( store ).registerPrivateSelectors( privateSelectors );\n", "/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { EDITOR_SETTINGS_DEFAULTS } from './defaults';\nimport dataviewsReducer from '../dataviews/store/reducer';\n\n/**\n * Returns a post attribute value, flattening nested rendered content using its\n * raw value in place of its original object form.\n *\n * @param {*} value Original value.\n *\n * @return {*} Raw value.\n */\nexport function getPostRawValue( value ) {\n\tif ( value && 'object' === typeof value && 'raw' in value ) {\n\t\treturn value.raw;\n\t}\n\n\treturn value;\n}\n\n/**\n * Returns true if the two object arguments have the same keys, or false\n * otherwise.\n *\n * @param {Object} a First object.\n * @param {Object} b Second object.\n *\n * @return {boolean} Whether the two objects have the same keys.\n */\nexport function hasSameKeys( a, b ) {\n\tconst keysA = Object.keys( a ).sort();\n\tconst keysB = Object.keys( b ).sort();\n\treturn (\n\t\tkeysA.length === keysB.length &&\n\t\tkeysA.every( ( key, index ) => keysB[ index ] === key )\n\t);\n}\n\n/**\n * Returns true if, given the currently dispatching action and the previously\n * dispatched action, the two actions are editing the same post property, or\n * false otherwise.\n *\n * @param {Object} action Currently dispatching action.\n * @param {Object} previousAction Previously dispatched action.\n *\n * @return {boolean} Whether actions are updating the same post property.\n */\nexport function isUpdatingSamePostProperty( action, previousAction ) {\n\treturn (\n\t\taction.type === 'EDIT_POST' &&\n\t\thasSameKeys( action.edits, previousAction.edits )\n\t);\n}\n\n/**\n * Returns true if, given the currently dispatching action and the previously\n * dispatched action, the two actions are modifying the same property such that\n * undo history should be batched.\n *\n * @param {Object} action Currently dispatching action.\n * @param {Object} previousAction Previously dispatched action.\n *\n * @return {boolean} Whether to overwrite present state.\n */\nexport function shouldOverwriteState( action, previousAction ) {\n\tif ( action.type === 'RESET_EDITOR_BLOCKS' ) {\n\t\treturn ! action.shouldCreateUndoLevel;\n\t}\n\n\tif ( ! previousAction || action.type !== previousAction.type ) {\n\t\treturn false;\n\t}\n\n\treturn isUpdatingSamePostProperty( action, previousAction );\n}\n\nexport function postId( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITED_POST':\n\t\t\treturn action.postId;\n\t}\n\n\treturn state;\n}\n\nexport function templateId( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_CURRENT_TEMPLATE_ID':\n\t\t\treturn action.id;\n\t}\n\n\treturn state;\n}\n\nexport function postType( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITED_POST':\n\t\t\treturn action.postType;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning whether the post blocks match the defined template or not.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {boolean} Updated state.\n */\nexport function template( state = { isValid: true }, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_TEMPLATE_VALIDITY':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisValid: action.isValid,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning current network request state (whether a request to\n * the WP REST API is in progress, successful, or failed).\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function saving( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'REQUEST_POST_UPDATE_START':\n\t\tcase 'REQUEST_POST_UPDATE_FINISH':\n\t\t\treturn {\n\t\t\t\tpending: action.type === 'REQUEST_POST_UPDATE_START',\n\t\t\t\toptions: action.options || {},\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning deleting post request state.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function deleting( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'REQUEST_POST_DELETE_START':\n\t\tcase 'REQUEST_POST_DELETE_FINISH':\n\t\t\treturn {\n\t\t\t\tpending: action.type === 'REQUEST_POST_DELETE_START',\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Post Lock State.\n *\n * @typedef {Object} PostLockState\n *\n * @property {boolean} isLocked Whether the post is locked.\n * @property {?boolean} isTakeover Whether the post editing has been taken over.\n * @property {?boolean} activePostLock Active post lock value.\n * @property {?Object} user User that took over the post.\n */\n\n/**\n * Reducer returning the post lock status.\n *\n * @param {PostLockState} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {PostLockState} Updated state.\n */\nexport function postLock( state = { isLocked: false }, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_POST_LOCK':\n\t\t\treturn action.lock;\n\t}\n\n\treturn state;\n}\n\n/**\n * Post saving lock.\n *\n * When post saving is locked, the post cannot be published or updated.\n *\n * @param {PostLockState} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {PostLockState} Updated state.\n */\nexport function postSavingLock( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'LOCK_POST_SAVING':\n\t\t\treturn { ...state, [ action.lockName ]: true };\n\n\t\tcase 'UNLOCK_POST_SAVING': {\n\t\t\tconst { [ action.lockName ]: removedLockName, ...restState } =\n\t\t\t\tstate;\n\t\t\treturn restState;\n\t\t}\n\t}\n\treturn state;\n}\n\n/**\n * Post autosaving lock.\n *\n * When post autosaving is locked, the post will not autosave.\n *\n * @param {PostLockState} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {PostLockState} Updated state.\n */\nexport function postAutosavingLock( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'LOCK_POST_AUTOSAVING':\n\t\t\treturn { ...state, [ action.lockName ]: true };\n\n\t\tcase 'UNLOCK_POST_AUTOSAVING': {\n\t\t\tconst { [ action.lockName ]: removedLockName, ...restState } =\n\t\t\t\tstate;\n\t\t\treturn restState;\n\t\t}\n\t}\n\treturn state;\n}\n\n/**\n * Reducer returning the post editor setting.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function editorSettings( state = EDITOR_SETTINGS_DEFAULTS, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_EDITOR_SETTINGS':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t...action.settings,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\nexport function renderingMode( state = 'post-only', action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_RENDERING_MODE':\n\t\t\treturn action.mode;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the editing canvas device type.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function deviceType( state = 'Desktop', action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_DEVICE_TYPE':\n\t\t\treturn action.deviceType;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer storing the list of all programmatically removed panels.\n *\n * @param {Array} state Current state.\n * @param {Object} action Action object.\n *\n * @return {Array} Updated state.\n */\nexport function removedPanels( state = [], action ) {\n\tswitch ( action.type ) {\n\t\tcase 'REMOVE_PANEL':\n\t\t\tif ( ! state.includes( action.panelName ) ) {\n\t\t\t\treturn [ ...state, action.panelName ];\n\t\t\t}\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer to set the block inserter panel open or closed.\n *\n * Note: this reducer interacts with the list view panel reducer\n * to make sure that only one of the two panels is open at the same time.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nexport function blockInserterPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_LIST_VIEW_OPENED':\n\t\t\treturn action.isOpen ? false : state;\n\t\tcase 'SET_IS_INSERTER_OPENED':\n\t\t\treturn action.value;\n\t}\n\treturn state;\n}\n\n/**\n * Reducer to set the list view panel open or closed.\n *\n * Note: this reducer interacts with the inserter panel reducer\n * to make sure that only one of the two panels is open at the same time.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nexport function listViewPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_INSERTER_OPENED':\n\t\t\treturn action.value ? false : state;\n\t\tcase 'SET_IS_LIST_VIEW_OPENED':\n\t\t\treturn action.isOpen;\n\t}\n\treturn state;\n}\n\n/**\n * This reducer does nothing aside initializing a ref to the list view toggle.\n * We will have a unique ref per \"editor\" instance.\n *\n * @param {Object} state\n * @return {Object} Reference to the list view toggle button.\n */\nexport function listViewToggleRef( state = { current: null } ) {\n\treturn state;\n}\n\n/**\n * This reducer does nothing aside initializing a ref to the inserter sidebar toggle.\n * We will have a unique ref per \"editor\" instance.\n *\n * @param {Object} state\n * @return {Object} Reference to the inserter sidebar toggle button.\n */\nexport function inserterSidebarToggleRef( state = { current: null } ) {\n\treturn state;\n}\n\nexport function publishSidebarActive( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'OPEN_PUBLISH_SIDEBAR':\n\t\t\treturn true;\n\t\tcase 'CLOSE_PUBLISH_SIDEBAR':\n\t\t\treturn false;\n\t\tcase 'TOGGLE_PUBLISH_SIDEBAR':\n\t\t\treturn ! state;\n\t}\n\treturn state;\n}\n\n/**\n * Reducer for the current global styles navigation path.\n *\n * @param {string} state Current state.\n * @param {Object} action Dispatched action.\n * @return {string} Updated state.\n */\nexport function stylesPath( state = '/', action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_STYLES_PATH':\n\t\t\treturn action.path;\n\t\tcase 'RESET_STYLES_NAVIGATION':\n\t\t\treturn '/';\n\t}\n\treturn state;\n}\n\n/**\n * Reducer for whether the stylebook is visible.\n *\n * @param {boolean} state Current state.\n * @param {Object} action Dispatched action.\n * @return {boolean} Updated state.\n */\nexport function showStylebook( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_SHOW_STYLEBOOK':\n\t\t\treturn action.show;\n\t\tcase 'RESET_STYLES_NAVIGATION':\n\t\t\treturn false;\n\t}\n\treturn state;\n}\n\n/**\n * Reducer for the canvas minimum height.\n *\n * @param {number} state Current state.\n * @param {Object} action Dispatched action.\n * @return {number} Updated state.\n */\nexport function canvasMinHeight( state = 0, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_CANVAS_MIN_HEIGHT':\n\t\t\treturn action.minHeight;\n\t}\n\treturn state;\n}\n\nexport default combineReducers( {\n\tpostId,\n\tpostType,\n\ttemplateId,\n\tsaving,\n\tdeleting,\n\tpostLock,\n\ttemplate,\n\tpostSavingLock,\n\teditorSettings,\n\tpostAutosavingLock,\n\trenderingMode,\n\tdeviceType,\n\tremovedPanels,\n\tblockInserterPanel,\n\tinserterSidebarToggleRef,\n\tlistViewPanel,\n\tlistViewToggleRef,\n\tpublishSidebarActive,\n\tstylesPath,\n\tshowStylebook,\n\tcanvasMinHeight,\n\tdataviews: dataviewsReducer,\n} );\n", "/**\n * WordPress dependencies\n */\nimport { SETTINGS_DEFAULTS } from '@wordpress/block-editor';\n\n/**\n * The default post editor settings.\n *\n * @property {boolean|Array} allowedBlockTypes Allowed block types\n * @property {boolean} richEditingEnabled Whether rich editing is enabled or not\n * @property {boolean} codeEditingEnabled Whether code editing is enabled or not\n * @property {boolean} fontLibraryEnabled Whether the font library is enabled or not.\n * @property {boolean} enableCustomFields Whether the WordPress custom fields are enabled or not.\n * true = the user has opted to show the Custom Fields panel at the bottom of the editor.\n * false = the user has opted to hide the Custom Fields panel at the bottom of the editor.\n * undefined = the current environment does not support Custom Fields, so the option toggle in Preferences -> Panels to enable the Custom Fields panel is not displayed.\n * @property {number} autosaveInterval How often in seconds the post will be auto-saved via the REST API.\n * @property {number} localAutosaveInterval How often in seconds the post will be backed up to sessionStorage.\n * @property {Array?} availableTemplates The available post templates\n * @property {boolean} disablePostFormats Whether or not the post formats are disabled\n * @property {Array?} allowedMimeTypes List of allowed mime types and file extensions\n * @property {number} maxUploadFileSize Maximum upload file size\n * @property {boolean} supportsLayout Whether the editor supports layouts.\n */\nexport const EDITOR_SETTINGS_DEFAULTS = {\n\t...SETTINGS_DEFAULTS,\n\n\trichEditingEnabled: true,\n\tcodeEditingEnabled: true,\n\tfontLibraryEnabled: true,\n\tenableCustomFields: undefined,\n\tdefaultRenderingMode: 'post-only',\n};\n", "/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\nimport type { Action, Field } from '@wordpress/dataviews';\n\ntype ReduxAction =\n\t| ReturnType< typeof import('./private-actions').registerEntityAction >\n\t| ReturnType< typeof import('./private-actions').unregisterEntityAction >\n\t| ReturnType< typeof import('./private-actions').registerEntityField >\n\t| ReturnType< typeof import('./private-actions').unregisterEntityField >\n\t| ReturnType< typeof import('./private-actions').setIsReady >;\n\nexport type ActionState = Record< string, Record< string, Action< any >[] > >;\nexport type FieldsState = Record< string, Record< string, Field< any >[] > >;\nexport type ReadyState = Record< string, Record< string, boolean > >;\nexport type State = {\n\tactions: ActionState;\n\tfields: FieldsState;\n\tisReady: ReadyState;\n};\n\nfunction isReady( state: ReadyState = {}, action: ReduxAction ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_READY':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.kind ]: {\n\t\t\t\t\t...state[ action.kind ],\n\t\t\t\t\t[ action.name ]: true,\n\t\t\t\t},\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\nfunction actions( state: ActionState = {}, action: ReduxAction ) {\n\tswitch ( action.type ) {\n\t\tcase 'REGISTER_ENTITY_ACTION':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.kind ]: {\n\t\t\t\t\t...state[ action.kind ],\n\t\t\t\t\t[ action.name ]: [\n\t\t\t\t\t\t...(\n\t\t\t\t\t\t\tstate[ action.kind ]?.[ action.name ] ?? []\n\t\t\t\t\t\t).filter(\n\t\t\t\t\t\t\t( _action ) => _action.id !== action.config.id\n\t\t\t\t\t\t),\n\t\t\t\t\t\taction.config,\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t};\n\t\tcase 'UNREGISTER_ENTITY_ACTION': {\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.kind ]: {\n\t\t\t\t\t...state[ action.kind ],\n\t\t\t\t\t[ action.name ]: (\n\t\t\t\t\t\tstate[ action.kind ]?.[ action.name ] ?? []\n\t\t\t\t\t).filter( ( _action ) => _action.id !== action.actionId ),\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t}\n\n\treturn state;\n}\n\nfunction fields( state: FieldsState = {}, action: ReduxAction ) {\n\tswitch ( action.type ) {\n\t\tcase 'REGISTER_ENTITY_FIELD':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.kind ]: {\n\t\t\t\t\t...state[ action.kind ],\n\t\t\t\t\t[ action.name ]: [\n\t\t\t\t\t\t...(\n\t\t\t\t\t\t\tstate[ action.kind ]?.[ action.name ] ?? []\n\t\t\t\t\t\t).filter(\n\t\t\t\t\t\t\t( _field ) => _field.id !== action.config.id\n\t\t\t\t\t\t),\n\t\t\t\t\t\taction.config,\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t};\n\t\tcase 'UNREGISTER_ENTITY_FIELD':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.kind ]: {\n\t\t\t\t\t...state[ action.kind ],\n\t\t\t\t\t[ action.name ]: (\n\t\t\t\t\t\tstate[ action.kind ]?.[ action.name ] ?? []\n\t\t\t\t\t).filter( ( _field ) => _field.id !== action.fieldId ),\n\t\t\t\t},\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\nexport default combineReducers( {\n\tactions,\n\tfields,\n\tisReady,\n} );\n", "/**\n * WordPress dependencies\n */\nimport {\n\tgetFreeformContentHandlerName,\n\tgetDefaultBlockName,\n\t__unstableSerializeAndClean,\n\tparse,\n} from '@wordpress/blocks';\nimport { isInTheFuture, getDate } from '@wordpress/date';\nimport { addQueryArgs, cleanForSlug } from '@wordpress/url';\nimport { createSelector, createRegistrySelector } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { Platform } from '@wordpress/element';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport {\n\tEDIT_MERGE_PROPERTIES,\n\tPERMALINK_POSTNAME_REGEX,\n\tONE_MINUTE_IN_MS,\n\tAUTOSAVE_PROPERTIES,\n} from './constants';\nimport { getPostRawValue } from './reducer';\nimport { getTemplatePartIcon } from '../utils/get-template-part-icon';\nimport { unlock } from '../lock-unlock';\nimport { getTemplateInfo } from '../utils/get-template-info';\n\n/**\n * Shared reference to an empty object for cases where it is important to avoid\n * returning a new object reference on every invocation, as in a connected or\n * other pure component which performs `shouldComponentUpdate` check on props.\n * This should be used as a last resort, since the normalized data should be\n * maintained by the reducer result in state.\n */\nconst EMPTY_OBJECT = {};\n\n/**\n * Returns true if any past editor history snapshots exist, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether undo history exists.\n */\nexport const hasEditorUndo = createRegistrySelector( ( select ) => () => {\n\treturn select( coreStore ).hasUndo();\n} );\n\n/**\n * Returns true if any future editor history snapshots exist, or false\n * otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether redo history exists.\n */\nexport const hasEditorRedo = createRegistrySelector( ( select ) => () => {\n\treturn select( coreStore ).hasRedo();\n} );\n\n/**\n * Returns true if the currently edited post is yet to be saved, or false if\n * the post has been saved.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post is new.\n */\nexport function isEditedPostNew( state ) {\n\treturn getCurrentPost( state ).status === 'auto-draft';\n}\n\n/**\n * Returns true if content includes unsaved changes, or false otherwise.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether content includes unsaved changes.\n */\nexport function hasChangedContent( state ) {\n\tconst edits = getPostEdits( state );\n\treturn 'content' in edits;\n}\n\n/**\n * Returns true if there are unsaved values for the current edit session, or\n * false if the editing state matches the saved or new post.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether unsaved values exist.\n */\nexport const isEditedPostDirty = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\t// Edits should contain only fields which differ from the saved post (reset\n\t\t// at initial load and save complete). Thus, a non-empty edits state can be\n\t\t// inferred to contain unsaved values.\n\t\tconst postType = getCurrentPostType( state );\n\t\tconst postId = getCurrentPostId( state );\n\t\treturn select( coreStore ).hasEditsForEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t}\n);\n\n/**\n * Returns true if there are unsaved edits for entities other than\n * the editor's post, and false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether there are edits or not.\n */\nexport const hasNonPostEntityChanges = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst dirtyEntityRecords =\n\t\t\tselect( coreStore ).__experimentalGetDirtyEntityRecords();\n\t\tconst { type, id } = getCurrentPost( state );\n\t\treturn dirtyEntityRecords.some(\n\t\t\t( entityRecord ) =>\n\t\t\t\tentityRecord.kind !== 'postType' ||\n\t\t\t\tentityRecord.name !== type ||\n\t\t\t\tentityRecord.key !== id\n\t\t);\n\t}\n);\n\n/**\n * Returns true if there are no unsaved values for the current edit session and\n * if the currently edited post is new (has never been saved before).\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether new post and unsaved values exist.\n */\nexport function isCleanNewPost( state ) {\n\treturn ! isEditedPostDirty( state ) && isEditedPostNew( state );\n}\n\n/**\n * Returns the post currently being edited in its last known saved state, not\n * including unsaved edits. Returns an object containing relevant default post\n * values if the post has not yet been saved.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Post object.\n */\nexport const getCurrentPost = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst postId = getCurrentPostId( state );\n\t\tconst postType = getCurrentPostType( state );\n\n\t\tconst post = select( coreStore ).getRawEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t\tif ( post ) {\n\t\t\treturn post;\n\t\t}\n\n\t\t// This exists for compatibility with the previous selector behavior\n\t\t// which would guarantee an object return based on the editor reducer's\n\t\t// default empty object state.\n\t\treturn EMPTY_OBJECT;\n\t}\n);\n\n/**\n * Returns the post type of the post currently being edited.\n *\n * @param {Object} state Global application state.\n *\n * @example\n *\n *```js\n * const currentPostType = wp.data.select( 'core/editor' ).getCurrentPostType();\n *```\n * @return {string} Post type.\n */\nexport function getCurrentPostType( state ) {\n\treturn state.postType;\n}\n\n/**\n * Returns the ID of the post currently being edited, or null if the post has\n * not yet been saved.\n *\n * @param {Object} state Global application state.\n *\n * @return {?(number|string)} The current post ID (number) or template slug (string).\n */\nexport function getCurrentPostId( state ) {\n\treturn state.postId;\n}\n\n/**\n * Returns the template ID currently being rendered/edited\n *\n * @param {Object} state Global application state.\n *\n * @return {?string} Template ID.\n */\nexport function getCurrentTemplateId( state ) {\n\treturn state.templateId;\n}\n\n/**\n * Returns the number of revisions of the post currently being edited.\n *\n * @param {Object} state Global application state.\n *\n * @return {number} Number of revisions.\n */\nexport function getCurrentPostRevisionsCount( state ) {\n\treturn (\n\t\tgetCurrentPost( state )._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0\n\t);\n}\n\n/**\n * Returns the last revision ID of the post currently being edited,\n * or null if the post has no revisions.\n *\n * @param {Object} state Global application state.\n *\n * @return {?number} ID of the last revision.\n */\nexport function getCurrentPostLastRevisionId( state ) {\n\treturn (\n\t\tgetCurrentPost( state )._links?.[ 'predecessor-version' ]?.[ 0 ]?.id ??\n\t\tnull\n\t);\n}\n\n/**\n * Returns any post values which have been changed in the editor but not yet\n * been saved.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Object of key value pairs comprising unsaved edits.\n */\nexport const getPostEdits = createRegistrySelector( ( select ) => ( state ) => {\n\tconst postType = getCurrentPostType( state );\n\tconst postId = getCurrentPostId( state );\n\treturn (\n\t\tselect( coreStore ).getEntityRecordEdits(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t) || EMPTY_OBJECT\n\t);\n} );\n\n/**\n * Returns an attribute value of the saved post.\n *\n * @param {Object} state Global application state.\n * @param {string} attributeName Post attribute name.\n *\n * @return {*} Post attribute value.\n */\nexport function getCurrentPostAttribute( state, attributeName ) {\n\tswitch ( attributeName ) {\n\t\tcase 'type':\n\t\t\treturn getCurrentPostType( state );\n\n\t\tcase 'id':\n\t\t\treturn getCurrentPostId( state );\n\n\t\tdefault:\n\t\t\tconst post = getCurrentPost( state );\n\t\t\tif ( ! post.hasOwnProperty( attributeName ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn getPostRawValue( post[ attributeName ] );\n\t}\n}\n\n/**\n * Returns a single attribute of the post being edited, preferring the unsaved\n * edit if one exists, but merging with the attribute value for the last known\n * saved state of the post (this is needed for some nested attributes like meta).\n *\n * @param {Object} state Global application state.\n * @param {string} attributeName Post attribute name.\n *\n * @return {*} Post attribute value.\n */\nconst getNestedEditedPostProperty = createSelector(\n\t( state, attributeName ) => {\n\t\tconst edits = getPostEdits( state );\n\t\tif ( ! edits.hasOwnProperty( attributeName ) ) {\n\t\t\treturn getCurrentPostAttribute( state, attributeName );\n\t\t}\n\n\t\treturn {\n\t\t\t...getCurrentPostAttribute( state, attributeName ),\n\t\t\t...edits[ attributeName ],\n\t\t};\n\t},\n\t( state, attributeName ) => [\n\t\tgetCurrentPostAttribute( state, attributeName ),\n\t\tgetPostEdits( state )[ attributeName ],\n\t]\n);\n\n/**\n * Returns a single attribute of the post being edited, preferring the unsaved\n * edit if one exists, but falling back to the attribute for the last known\n * saved state of the post.\n *\n * @param {Object} state Global application state.\n * @param {string} attributeName Post attribute name.\n *\n * @example\n *\n *```js\n * \t// Get specific media size based on the featured media ID\n * \t// Note: change sizes?.large for any registered size\n * \tconst getFeaturedMediaUrl = useSelect( ( select ) => {\n * \t\tconst getFeaturedMediaId =\n * \t\t\tselect( 'core/editor' ).getEditedPostAttribute( 'featured_media' );\n * \t\tconst media = select( 'core' ).getEntityRecord(\n * \t\t\t'postType',\n * \t\t\t'attachment',\n * \t\t\tgetFeaturedMediaId\n * \t\t);\n *\n * \t\treturn (\n * \t\t\tmedia?.media_details?.sizes?.large?.source_url || media?.source_url || ''\n * \t\t);\n * }, [] );\n *```\n *\n * @return {*} Post attribute value.\n */\nexport function getEditedPostAttribute( state, attributeName ) {\n\t// Special cases.\n\tswitch ( attributeName ) {\n\t\tcase 'content':\n\t\t\treturn getEditedPostContent( state );\n\t}\n\n\t// Fall back to saved post value if not edited.\n\tconst edits = getPostEdits( state );\n\tif ( ! edits.hasOwnProperty( attributeName ) ) {\n\t\treturn getCurrentPostAttribute( state, attributeName );\n\t}\n\n\t// Merge properties are objects which contain only the patch edit in state,\n\t// and thus must be merged with the current post attribute.\n\tif ( EDIT_MERGE_PROPERTIES.has( attributeName ) ) {\n\t\treturn getNestedEditedPostProperty( state, attributeName );\n\t}\n\n\treturn edits[ attributeName ];\n}\n\n/**\n * Returns an attribute value of the current autosave revision for a post, or\n * null if there is no autosave for the post.\n *\n * @deprecated since 5.6. Callers should use the `getAutosave( postType, postId, userId )` selector\n * \t\t\t from the '@wordpress/core-data' package and access properties on the returned\n * \t\t\t autosave object using getPostRawValue.\n *\n * @param {Object} state Global application state.\n * @param {string} attributeName Autosave attribute name.\n *\n * @return {*} Autosave attribute value.\n */\nexport const getAutosaveAttribute = createRegistrySelector(\n\t( select ) => ( state, attributeName ) => {\n\t\tif (\n\t\t\t! AUTOSAVE_PROPERTIES.includes( attributeName ) &&\n\t\t\tattributeName !== 'preview_link'\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst postType = getCurrentPostType( state );\n\t\tconst postId = getCurrentPostId( state );\n\t\tconst currentUserId = select( coreStore ).getCurrentUser()?.id;\n\t\tconst autosave = select( coreStore ).getAutosave(\n\t\t\tpostType,\n\t\t\tpostId,\n\t\t\tcurrentUserId\n\t\t);\n\n\t\tif ( autosave ) {\n\t\t\treturn getPostRawValue( autosave[ attributeName ] );\n\t\t}\n\t}\n);\n\n/**\n * Returns the current visibility of the post being edited, preferring the\n * unsaved value if different than the saved post. The return value is one of\n * \"private\", \"password\", or \"public\".\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Post visibility.\n */\nexport function getEditedPostVisibility( state ) {\n\tconst status = getEditedPostAttribute( state, 'status' );\n\tif ( status === 'private' ) {\n\t\treturn 'private';\n\t}\n\n\tconst password = getEditedPostAttribute( state, 'password' );\n\tif ( password ) {\n\t\treturn 'password';\n\t}\n\n\treturn 'public';\n}\n\n/**\n * Returns true if post is pending review.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether current post is pending review.\n */\nexport function isCurrentPostPending( state ) {\n\treturn getCurrentPost( state ).status === 'pending';\n}\n\n/**\n * Return true if the current post has already been published.\n *\n * @param {Object} state Global application state.\n * @param {Object} [currentPost] Explicit current post for bypassing registry selector.\n *\n * @return {boolean} Whether the post has been published.\n */\nexport function isCurrentPostPublished( state, currentPost ) {\n\tconst post = currentPost || getCurrentPost( state );\n\n\treturn (\n\t\t[ 'publish', 'private' ].indexOf( post.status ) !== -1 ||\n\t\t( post.status === 'future' &&\n\t\t\t! isInTheFuture(\n\t\t\t\tnew Date( Number( getDate( post.date ) ) - ONE_MINUTE_IN_MS )\n\t\t\t) )\n\t);\n}\n\n/**\n * Returns true if post is already scheduled.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether current post is scheduled to be posted.\n */\nexport function isCurrentPostScheduled( state ) {\n\treturn (\n\t\tgetCurrentPost( state ).status === 'future' &&\n\t\t! isCurrentPostPublished( state )\n\t);\n}\n\n/**\n * Return true if the post being edited can be published.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post can been published.\n */\nexport function isEditedPostPublishable( state ) {\n\tconst post = getCurrentPost( state );\n\n\t// TODO: Post being publishable should be superset of condition of post\n\t// being saveable. Currently this restriction is imposed at UI.\n\t//\n\t// See: <PostPublishButton /> (`isButtonEnabled` assigned by `isSaveable`).\n\n\treturn (\n\t\tisEditedPostDirty( state ) ||\n\t\t[ 'publish', 'private', 'future' ].indexOf( post.status ) === -1\n\t);\n}\n\n/**\n * Returns true if the post can be saved, or false otherwise. A post must\n * contain a title, an excerpt, or non-empty content to be valid for save.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post can be saved.\n */\nexport function isEditedPostSaveable( state ) {\n\tif ( isSavingPost( state ) ) {\n\t\treturn false;\n\t}\n\n\t// TODO: Post should not be saveable if not dirty. Cannot be added here at\n\t// this time since posts where meta boxes are present can be saved even if\n\t// the post is not dirty. Currently this restriction is imposed at UI, but\n\t// should be moved here.\n\t//\n\t// See: `isEditedPostPublishable` (includes `isEditedPostDirty` condition)\n\t// See: <PostSavedState /> (`forceIsDirty` prop)\n\t// See: <PostPublishButton /> (`forceIsDirty` prop)\n\t// See: https://github.com/WordPress/gutenberg/pull/4184.\n\n\treturn (\n\t\t!! getEditedPostAttribute( state, 'title' ) ||\n\t\t!! getEditedPostAttribute( state, 'excerpt' ) ||\n\t\t! isEditedPostEmpty( state ) ||\n\t\tPlatform.OS === 'native'\n\t);\n}\n\n/**\n * Returns true if the edited post has content. A post has content if it has at\n * least one saveable block or otherwise has a non-empty content property\n * assigned.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether post has content.\n */\nexport const isEditedPostEmpty = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\t// While the condition of truthy content string is sufficient to determine\n\t\t// emptiness, testing saveable blocks length is a trivial operation. Since\n\t\t// this function can be called frequently, optimize for the fast case as a\n\t\t// condition of the mere existence of blocks. Note that the value of edited\n\t\t// content takes precedent over block content, and must fall through to the\n\t\t// default logic.\n\t\tconst postId = getCurrentPostId( state );\n\t\tconst postType = getCurrentPostType( state );\n\t\tconst record = select( coreStore ).getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t\tif ( typeof record.content !== 'function' ) {\n\t\t\treturn ! record.content;\n\t\t}\n\n\t\tconst blocks = getEditedPostAttribute( state, 'blocks' );\n\n\t\tif ( blocks.length === 0 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Pierce the abstraction of the serializer in knowing that blocks are\n\t\t// joined with newlines such that even if every individual block\n\t\t// produces an empty save result, the serialized content is non-empty.\n\t\tif ( blocks.length > 1 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// There are two conditions under which the optimization cannot be\n\t\t// assumed, and a fallthrough to getEditedPostContent must occur:\n\t\t//\n\t\t// 1. getBlocksForSerialization has special treatment in omitting a\n\t\t// single unmodified default block.\n\t\t// 2. Comment delimiters are omitted for a freeform or unregistered\n\t\t// block in its serialization. The freeform block specifically may\n\t\t// produce an empty string in its saved output.\n\t\t//\n\t\t// For all other content, the single block is assumed to make a post\n\t\t// non-empty, if only by virtue of its own comment delimiters.\n\t\tconst blockName = blocks[ 0 ].name;\n\t\tif (\n\t\t\tblockName !== getDefaultBlockName() &&\n\t\t\tblockName !== getFreeformContentHandlerName()\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn ! getEditedPostContent( state );\n\t}\n);\n\n/**\n * Returns true if the post can be autosaved, or false otherwise.\n *\n * @param {Object} state Global application state.\n * @param {Object} autosave A raw autosave object from the REST API.\n *\n * @return {boolean} Whether the post can be autosaved.\n */\nexport const isEditedPostAutosaveable = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\t// A post must contain a title, an excerpt, or non-empty content to be valid for autosaving.\n\t\tif ( ! isEditedPostSaveable( state ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// A post is not autosavable when there is a post autosave lock.\n\t\tif ( isPostAutosavingLocked( state ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst postType = getCurrentPostType( state );\n\t\tconst postTypeObject = select( coreStore ).getPostType( postType );\n\n\t\tif ( ! postTypeObject?.supports?.autosave ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst postId = getCurrentPostId( state );\n\t\tconst hasFetchedAutosave = select( coreStore ).hasFetchedAutosaves(\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t\tconst currentUserId = select( coreStore ).getCurrentUser()?.id;\n\n\t\t// Disable reason - this line causes the side-effect of fetching the autosave\n\t\t// via a resolver, moving below the return would result in the autosave never\n\t\t// being fetched.\n\t\t// eslint-disable-next-line @wordpress/no-unused-vars-before-return\n\t\tconst autosave = select( coreStore ).getAutosave(\n\t\t\tpostType,\n\t\t\tpostId,\n\t\t\tcurrentUserId\n\t\t);\n\n\t\t// If any existing autosaves have not yet been fetched, this function is\n\t\t// unable to determine if the post is autosaveable, so return false.\n\t\tif ( ! hasFetchedAutosave ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If we don't already have an autosave, the post is autosaveable.\n\t\tif ( ! autosave ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// To avoid an expensive content serialization, use the content dirtiness\n\t\t// flag in place of content field comparison against the known autosave.\n\t\t// This is not strictly accurate, and relies on a tolerance toward autosave\n\t\t// request failures for unnecessary saves.\n\t\tif ( hasChangedContent( state ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// If title, excerpt, or meta have changed, the post is autosaveable.\n\t\treturn [ 'title', 'excerpt', 'meta' ].some(\n\t\t\t( field ) =>\n\t\t\t\tgetPostRawValue( autosave[ field ] ) !==\n\t\t\t\tgetEditedPostAttribute( state, field )\n\t\t);\n\t}\n);\n\n/**\n * Return true if the post being edited is being scheduled. Preferring the\n * unsaved status values.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post has been published.\n */\nexport function isEditedPostBeingScheduled( state ) {\n\tconst date = getEditedPostAttribute( state, 'date' );\n\t// Offset the date by one minute (network latency).\n\tconst checkedDate = new Date(\n\t\tNumber( getDate( date ) ) - ONE_MINUTE_IN_MS\n\t);\n\n\treturn isInTheFuture( checkedDate );\n}\n\n/**\n * Returns whether the current post should be considered to have a \"floating\"\n * date (i.e. that it would publish \"Immediately\" rather than at a set time).\n *\n * Unlike in the PHP backend, the REST API returns a full date string for posts\n * where the 0000-00-00T00:00:00 placeholder is present in the database. To\n * infer that a post is set to publish \"Immediately\" we check whether the date\n * and modified date are the same.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether the edited post has a floating date value.\n */\nexport function isEditedPostDateFloating( state ) {\n\tconst date = getEditedPostAttribute( state, 'date' );\n\tconst modified = getEditedPostAttribute( state, 'modified' );\n\n\t// This should be the status of the persisted post\n\t// It shouldn't use the \"edited\" status otherwise it breaks the\n\t// inferred post data floating status\n\t// See https://github.com/WordPress/gutenberg/issues/28083.\n\tconst status = getCurrentPost( state ).status;\n\tif (\n\t\tstatus === 'draft' ||\n\t\tstatus === 'auto-draft' ||\n\t\tstatus === 'pending'\n\t) {\n\t\treturn date === modified || date === null;\n\t}\n\treturn false;\n}\n\n/**\n * Returns true if the post is currently being deleted, or false otherwise.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether post is being deleted.\n */\nexport function isDeletingPost( state ) {\n\treturn !! state.deleting.pending;\n}\n\n/**\n * Returns true if the post is currently being saved, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether post is being saved.\n */\nexport function isSavingPost( state ) {\n\treturn !! state.saving.pending;\n}\n\n/**\n * Returns true if non-post entities are currently being saved, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether non-post entities are being saved.\n */\nexport const isSavingNonPostEntityChanges = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst entitiesBeingSaved =\n\t\t\tselect( coreStore ).__experimentalGetEntitiesBeingSaved();\n\t\tconst { type, id } = getCurrentPost( state );\n\t\treturn entitiesBeingSaved.some(\n\t\t\t( entityRecord ) =>\n\t\t\t\tentityRecord.kind !== 'postType' ||\n\t\t\t\tentityRecord.name !== type ||\n\t\t\t\tentityRecord.key !== id\n\t\t);\n\t}\n);\n\n/**\n * Returns true if a previous post save was attempted successfully, or false\n * otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post was saved successfully.\n */\nexport const didPostSaveRequestSucceed = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst postType = getCurrentPostType( state );\n\t\tconst postId = getCurrentPostId( state );\n\t\treturn ! select( coreStore ).getLastEntitySaveError(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t}\n);\n\n/**\n * Returns true if a previous post save was attempted but failed, or false\n * otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post save failed.\n */\nexport const didPostSaveRequestFail = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst postType = getCurrentPostType( state );\n\t\tconst postId = getCurrentPostId( state );\n\t\treturn !! select( coreStore ).getLastEntitySaveError(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t}\n);\n\n/**\n * Returns true if the post is autosaving, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post is autosaving.\n */\nexport function isAutosavingPost( state ) {\n\treturn isSavingPost( state ) && Boolean( state.saving.options?.isAutosave );\n}\n\n/**\n * Returns true if the post is being previewed, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post is being previewed.\n */\nexport function isPreviewingPost( state ) {\n\treturn isSavingPost( state ) && Boolean( state.saving.options?.isPreview );\n}\n\n/**\n * Returns the post preview link\n *\n * @param {Object} state Global application state.\n *\n * @return {string | undefined} Preview Link.\n */\nexport function getEditedPostPreviewLink( state ) {\n\tif ( state.saving.pending || isSavingPost( state ) ) {\n\t\treturn;\n\t}\n\n\tlet previewLink = getAutosaveAttribute( state, 'preview_link' );\n\t// Fix for issue: https://github.com/WordPress/gutenberg/issues/33616\n\t// If the post is draft, ignore the preview link from the autosave record,\n\t// because the preview could be a stale autosave if the post was switched from\n\t// published to draft.\n\t// See: https://github.com/WordPress/gutenberg/pull/37952.\n\tif ( ! previewLink || 'draft' === getCurrentPost( state ).status ) {\n\t\tpreviewLink = getEditedPostAttribute( state, 'link' );\n\t\tif ( previewLink ) {\n\t\t\tpreviewLink = addQueryArgs( previewLink, { preview: true } );\n\t\t}\n\t}\n\tconst featuredImageId = getEditedPostAttribute( state, 'featured_media' );\n\n\tif ( previewLink && featuredImageId ) {\n\t\treturn addQueryArgs( previewLink, { _thumbnail_id: featuredImageId } );\n\t}\n\n\treturn previewLink;\n}\n\n/**\n * Returns a suggested post format for the current post, inferred only if there\n * is a single block within the post and it is of a type known to match a\n * default post format. Returns null if the format cannot be determined.\n *\n * @return {?string} Suggested post format.\n */\nexport const getSuggestedPostFormat = createRegistrySelector(\n\t( select ) => () => {\n\t\tconst blocks = select( blockEditorStore ).getBlocks();\n\n\t\tif ( blocks.length > 2 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tlet name;\n\t\t// If there is only one block in the content of the post grab its name\n\t\t// so we can derive a suitable post format from it.\n\t\tif ( blocks.length === 1 ) {\n\t\t\tname = blocks[ 0 ].name;\n\t\t\t// Check for core/embed `video` and `audio` eligible suggestions.\n\t\t\tif ( name === 'core/embed' ) {\n\t\t\t\tconst provider = blocks[ 0 ].attributes?.providerNameSlug;\n\t\t\t\tif ( [ 'youtube', 'vimeo' ].includes( provider ) ) {\n\t\t\t\t\tname = 'core/video';\n\t\t\t\t} else if ( [ 'spotify', 'soundcloud' ].includes( provider ) ) {\n\t\t\t\t\tname = 'core/audio';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If there are two blocks in the content and the last one is a text blocks\n\t\t// grab the name of the first one to also suggest a post format from it.\n\t\tif ( blocks.length === 2 && blocks[ 1 ].name === 'core/paragraph' ) {\n\t\t\tname = blocks[ 0 ].name;\n\t\t}\n\n\t\t// We only convert to default post formats in core.\n\t\tswitch ( name ) {\n\t\t\tcase 'core/image':\n\t\t\t\treturn 'image';\n\t\t\tcase 'core/quote':\n\t\t\tcase 'core/pullquote':\n\t\t\t\treturn 'quote';\n\t\t\tcase 'core/gallery':\n\t\t\t\treturn 'gallery';\n\t\t\tcase 'core/video':\n\t\t\t\treturn 'video';\n\t\t\tcase 'core/audio':\n\t\t\t\treturn 'audio';\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t}\n);\n\n/**\n * Returns the content of the post being edited.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Post content.\n */\nexport const getEditedPostContent = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst postId = getCurrentPostId( state );\n\t\tconst postType = getCurrentPostType( state );\n\t\tconst record = select( coreStore ).getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t\tif ( record ) {\n\t\t\tif ( typeof record.content === 'function' ) {\n\t\t\t\treturn record.content( record );\n\t\t\t} else if ( record.blocks ) {\n\t\t\t\treturn __unstableSerializeAndClean( record.blocks );\n\t\t\t} else if ( record.content ) {\n\t\t\t\treturn record.content;\n\t\t\t}\n\t\t}\n\t\treturn '';\n\t}\n);\n\n/**\n * Returns true if the post is being published, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether post is being published.\n */\nexport function isPublishingPost( state ) {\n\treturn (\n\t\tisSavingPost( state ) &&\n\t\t! isCurrentPostPublished( state ) &&\n\t\tgetEditedPostAttribute( state, 'status' ) === 'publish'\n\t);\n}\n\n/**\n * Returns whether the permalink is editable or not.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether or not the permalink is editable.\n */\nexport function isPermalinkEditable( state ) {\n\tconst permalinkTemplate = getEditedPostAttribute(\n\t\tstate,\n\t\t'permalink_template'\n\t);\n\n\treturn PERMALINK_POSTNAME_REGEX.test( permalinkTemplate );\n}\n\n/**\n * Returns the permalink for the post.\n *\n * @param {Object} state Editor state.\n *\n * @return {?string} The permalink, or null if the post is not viewable.\n */\nexport function getPermalink( state ) {\n\tconst permalinkParts = getPermalinkParts( state );\n\tif ( ! permalinkParts ) {\n\t\treturn null;\n\t}\n\n\tconst { prefix, postName, suffix } = permalinkParts;\n\n\tif ( isPermalinkEditable( state ) ) {\n\t\treturn prefix + postName + suffix;\n\t}\n\n\treturn prefix;\n}\n\n/**\n * Returns the slug for the post being edited, preferring a manually edited\n * value if one exists, then a sanitized version of the current post title, and\n * finally the post ID.\n *\n * @param {Object} state Editor state.\n *\n * @return {string} The current slug to be displayed in the editor\n */\nexport function getEditedPostSlug( state ) {\n\treturn (\n\t\tgetEditedPostAttribute( state, 'slug' ) ||\n\t\tcleanForSlug( getEditedPostAttribute( state, 'title' ) ) ||\n\t\tgetCurrentPostId( state )\n\t);\n}\n\n/**\n * Returns the permalink for a post, split into its three parts: the prefix,\n * the postName, and the suffix.\n *\n * @param {Object} state Editor state.\n *\n * @return {Object} An object containing the prefix, postName, and suffix for\n * the permalink, or null if the post is not viewable.\n */\nexport function getPermalinkParts( state ) {\n\tconst permalinkTemplate = getEditedPostAttribute(\n\t\tstate,\n\t\t'permalink_template'\n\t);\n\tif ( ! permalinkTemplate ) {\n\t\treturn null;\n\t}\n\n\tconst postName =\n\t\tgetEditedPostAttribute( state, 'slug' ) ||\n\t\tgetEditedPostAttribute( state, 'generated_slug' );\n\n\tconst [ prefix, suffix ] = permalinkTemplate.split(\n\t\tPERMALINK_POSTNAME_REGEX\n\t);\n\n\treturn {\n\t\tprefix,\n\t\tpostName,\n\t\tsuffix,\n\t};\n}\n\n/**\n * Returns whether the post is locked.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Is locked.\n */\nexport function isPostLocked( state ) {\n\treturn state.postLock.isLocked;\n}\n\n/**\n * Returns whether post saving is locked.\n *\n * @param {Object} state Global application state.\n *\n * @example\n * ```jsx\n * import { __ } from '@wordpress/i18n';\n * import { store as editorStore } from '@wordpress/editor';\n * import { useSelect } from '@wordpress/data';\n *\n * const ExampleComponent = () => {\n * \tconst isSavingLocked = useSelect(\n * \t\t( select ) => select( editorStore ).isPostSavingLocked(),\n * \t\t[]\n * \t);\n *\n * \treturn isSavingLocked ? (\n * \t\t<p>{ __( 'Post saving is locked' ) }</p>\n * \t) : (\n * \t\t<p>{ __( 'Post saving is not locked' ) }</p>\n * \t);\n * };\n * ```\n *\n * @return {boolean} Is locked.\n */\nexport function isPostSavingLocked( state ) {\n\treturn Object.keys( state.postSavingLock ).length > 0;\n}\n\n/**\n * Returns whether post autosaving is locked.\n *\n * @param {Object} state Global application state.\n *\n * @example\n * ```jsx\n * import { __ } from '@wordpress/i18n';\n * import { store as editorStore } from '@wordpress/editor';\n * import { useSelect } from '@wordpress/data';\n *\n * const ExampleComponent = () => {\n * \tconst isAutoSavingLocked = useSelect(\n * \t\t( select ) => select( editorStore ).isPostAutosavingLocked(),\n * \t\t[]\n * \t);\n *\n * \treturn isAutoSavingLocked ? (\n * \t\t<p>{ __( 'Post auto saving is locked' ) }</p>\n * \t) : (\n * \t\t<p>{ __( 'Post auto saving is not locked' ) }</p>\n * \t);\n * };\n * ```\n *\n * @return {boolean} Is locked.\n */\nexport function isPostAutosavingLocked( state ) {\n\treturn Object.keys( state.postAutosavingLock ).length > 0;\n}\n\n/**\n * Returns whether the edition of the post has been taken over.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Is post lock takeover.\n */\nexport function isPostLockTakeover( state ) {\n\treturn state.postLock.isTakeover;\n}\n\n/**\n * Returns details about the post lock user.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} A user object.\n */\nexport function getPostLockUser( state ) {\n\treturn state.postLock.user;\n}\n\n/**\n * Returns the active post lock.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The lock object.\n */\nexport function getActivePostLock( state ) {\n\treturn state.postLock.activePostLock;\n}\n\n/**\n * Returns whether or not the user has the unfiltered_html capability.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether the user can or can't post unfiltered HTML.\n */\nexport function canUserUseUnfilteredHTML( state ) {\n\treturn Boolean(\n\t\tgetCurrentPost( state )._links?.hasOwnProperty(\n\t\t\t'wp:action-unfiltered-html'\n\t\t)\n\t);\n}\n\n/**\n * Returns whether the pre-publish panel should be shown\n * or skipped when the user clicks the \"publish\" button.\n *\n * @return {boolean} Whether the pre-publish panel should be shown or not.\n */\nexport const isPublishSidebarEnabled = createRegistrySelector(\n\t( select ) => () =>\n\t\t!! select( preferencesStore ).get( 'core', 'isPublishSidebarEnabled' )\n);\n\n/**\n * Return the current block list.\n *\n * @param {Object} state\n * @return {Array} Block list.\n */\nexport const getEditorBlocks = createSelector(\n\t( state ) => {\n\t\treturn (\n\t\t\tgetEditedPostAttribute( state, 'blocks' ) ||\n\t\t\tparse( getEditedPostContent( state ) )\n\t\t);\n\t},\n\t( state ) => [\n\t\tgetEditedPostAttribute( state, 'blocks' ),\n\t\tgetEditedPostContent( state ),\n\t]\n);\n\n/**\n * Returns true if the given panel was programmatically removed, or false otherwise.\n * All panels are not removed by default.\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is removed.\n */\nexport function isEditorPanelRemoved( state, panelName ) {\n\treturn state.removedPanels.includes( panelName );\n}\n\n/**\n * Returns true if the given panel is enabled, or false otherwise. Panels are\n * enabled by default.\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is enabled.\n */\nexport const isEditorPanelEnabled = createRegistrySelector(\n\t( select ) => ( state, panelName ) => {\n\t\t// For backward compatibility, we check edit-post\n\t\t// even though now this is in \"editor\" package.\n\t\tconst inactivePanels = select( preferencesStore ).get(\n\t\t\t'core',\n\t\t\t'inactivePanels'\n\t\t);\n\t\treturn (\n\t\t\t! isEditorPanelRemoved( state, panelName ) &&\n\t\t\t! inactivePanels?.includes( panelName )\n\t\t);\n\t}\n);\n\n/**\n * Returns true if the given panel is open, or false otherwise. Panels are\n * closed by default.\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is open.\n */\nexport const isEditorPanelOpened = createRegistrySelector(\n\t( select ) => ( state, panelName ) => {\n\t\t// For backward compatibility, we check edit-post\n\t\t// even though now this is in \"editor\" package.\n\t\tconst openPanels = select( preferencesStore ).get(\n\t\t\t'core',\n\t\t\t'openPanels'\n\t\t);\n\t\treturn !! openPanels?.includes( panelName );\n\t}\n);\n\n/**\n * A block selection object.\n *\n * @typedef {Object} WPBlockSelection\n *\n * @property {string} clientId A block client ID.\n * @property {string} attributeKey A block attribute key.\n * @property {number} offset An attribute value offset, based on the rich\n * text value. See `wp.richText.create`.\n */\n\n/**\n * Returns the current selection start.\n *\n * @deprecated since Gutenberg 10.0.0.\n *\n * @param {Object} state\n * @return {WPBlockSelection} The selection start.\n */\nexport function getEditorSelectionStart( state ) {\n\tdeprecated( \"select('core/editor').getEditorSelectionStart\", {\n\t\tsince: '5.8',\n\t\talternative: \"select('core/editor').getEditorSelection\",\n\t} );\n\treturn getEditedPostAttribute( state, 'selection' )?.selectionStart;\n}\n\n/**\n * Returns the current selection end.\n *\n * @deprecated since Gutenberg 10.0.0.\n *\n * @param {Object} state\n * @return {WPBlockSelection} The selection end.\n */\nexport function getEditorSelectionEnd( state ) {\n\tdeprecated( \"select('core/editor').getEditorSelectionStart\", {\n\t\tsince: '5.8',\n\t\talternative: \"select('core/editor').getEditorSelection\",\n\t} );\n\treturn getEditedPostAttribute( state, 'selection' )?.selectionEnd;\n}\n\n/**\n * Returns the current selection.\n *\n * @param {Object} state\n * @return {WPBlockSelection} The selection end.\n */\nexport function getEditorSelection( state ) {\n\treturn getEditedPostAttribute( state, 'selection' );\n}\n\n/**\n * Is the editor ready\n *\n * @param {Object} state\n * @return {boolean} is Ready.\n */\nexport function __unstableIsEditorReady( state ) {\n\treturn !! state.postId;\n}\n\n/**\n * Returns the post editor settings.\n *\n * @param {Object} state Editor state.\n *\n * @return {Object} The editor settings object.\n */\nexport function getEditorSettings( state ) {\n\treturn state.editorSettings;\n}\n\n/**\n * Returns the post editor's rendering mode.\n *\n * @param {Object} state Editor state.\n *\n * @return {string} Rendering mode.\n */\nexport function getRenderingMode( state ) {\n\treturn state.renderingMode;\n}\n\n/**\n * Returns the current editing canvas device type.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Device type.\n */\nexport const getDeviceType = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst isZoomOut = unlock( select( blockEditorStore ) ).isZoomOut();\n\t\tif ( isZoomOut ) {\n\t\t\treturn 'Desktop';\n\t\t}\n\t\treturn state.deviceType;\n\t}\n);\n\n/**\n * Returns true if the list view is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the list view is opened.\n */\nexport function isListViewOpened( state ) {\n\treturn state.listViewPanel;\n}\n\n/**\n * Returns true if the inserter is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the inserter is opened.\n */\nexport function isInserterOpened( state ) {\n\treturn !! state.blockInserterPanel;\n}\n\n/**\n * Returns the current editing mode.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Editing mode.\n */\nexport const getEditorMode = createRegistrySelector(\n\t( select ) => () =>\n\t\tselect( preferencesStore ).get( 'core', 'editorMode' ) ?? 'visual'\n);\n\n/*\n * Backward compatibility\n */\n\n/**\n * Returns state object prior to a specified optimist transaction ID, or `null`\n * if the transaction corresponding to the given ID cannot be found.\n *\n * @deprecated since Gutenberg 9.7.0.\n */\nexport function getStateBeforeOptimisticTransaction() {\n\tdeprecated( \"select('core/editor').getStateBeforeOptimisticTransaction\", {\n\t\tsince: '5.7',\n\t\thint: 'No state history is kept on this store anymore',\n\t} );\n\n\treturn null;\n}\n/**\n * Returns true if an optimistic transaction is pending commit, for which the\n * before state satisfies the given predicate function.\n *\n * @deprecated since Gutenberg 9.7.0.\n */\nexport function inSomeHistory() {\n\tdeprecated( \"select('core/editor').inSomeHistory\", {\n\t\tsince: '5.7',\n\t\thint: 'No state history is kept on this store anymore',\n\t} );\n\treturn false;\n}\n\nfunction getBlockEditorSelector( name ) {\n\treturn createRegistrySelector( ( select ) => ( state, ...args ) => {\n\t\tdeprecated( \"`wp.data.select( 'core/editor' ).\" + name + '`', {\n\t\t\tsince: '5.3',\n\t\t\talternative: \"`wp.data.select( 'core/block-editor' ).\" + name + '`',\n\t\t\tversion: '6.2',\n\t\t} );\n\n\t\treturn select( blockEditorStore )[ name ]( ...args );\n\t} );\n}\n\n/**\n * @see getBlockName in core/block-editor store.\n */\nexport const getBlockName = getBlockEditorSelector( 'getBlockName' );\n\n/**\n * @see isBlockValid in core/block-editor store.\n */\nexport const isBlockValid = getBlockEditorSelector( 'isBlockValid' );\n\n/**\n * @see getBlockAttributes in core/block-editor store.\n */\nexport const getBlockAttributes =\n\tgetBlockEditorSelector( 'getBlockAttributes' );\n\n/**\n * @see getBlock in core/block-editor store.\n */\nexport const getBlock = getBlockEditorSelector( 'getBlock' );\n\n/**\n * @see getBlocks in core/block-editor store.\n */\nexport const getBlocks = getBlockEditorSelector( 'getBlocks' );\n\n/**\n * @see getClientIdsOfDescendants in core/block-editor store.\n */\nexport const getClientIdsOfDescendants = getBlockEditorSelector(\n\t'getClientIdsOfDescendants'\n);\n\n/**\n * @see getClientIdsWithDescendants in core/block-editor store.\n */\nexport const getClientIdsWithDescendants = getBlockEditorSelector(\n\t'getClientIdsWithDescendants'\n);\n\n/**\n * @see getGlobalBlockCount in core/block-editor store.\n */\nexport const getGlobalBlockCount = getBlockEditorSelector(\n\t'getGlobalBlockCount'\n);\n\n/**\n * @see getBlocksByClientId in core/block-editor store.\n */\nexport const getBlocksByClientId = getBlockEditorSelector(\n\t'getBlocksByClientId'\n);\n\n/**\n * @see getBlockCount in core/block-editor store.\n */\nexport const getBlockCount = getBlockEditorSelector( 'getBlockCount' );\n\n/**\n * @see getBlockSelectionStart in core/block-editor store.\n */\nexport const getBlockSelectionStart = getBlockEditorSelector(\n\t'getBlockSelectionStart'\n);\n\n/**\n * @see getBlockSelectionEnd in core/block-editor store.\n */\nexport const getBlockSelectionEnd = getBlockEditorSelector(\n\t'getBlockSelectionEnd'\n);\n\n/**\n * @see getSelectedBlockCount in core/block-editor store.\n */\nexport const getSelectedBlockCount = getBlockEditorSelector(\n\t'getSelectedBlockCount'\n);\n\n/**\n * @see hasSelectedBlock in core/block-editor store.\n */\nexport const hasSelectedBlock = getBlockEditorSelector( 'hasSelectedBlock' );\n\n/**\n * @see getSelectedBlockClientId in core/block-editor store.\n */\nexport const getSelectedBlockClientId = getBlockEditorSelector(\n\t'getSelectedBlockClientId'\n);\n\n/**\n * @see getSelectedBlock in core/block-editor store.\n */\nexport const getSelectedBlock = getBlockEditorSelector( 'getSelectedBlock' );\n\n/**\n * @see getBlockRootClientId in core/block-editor store.\n */\nexport const getBlockRootClientId = getBlockEditorSelector(\n\t'getBlockRootClientId'\n);\n\n/**\n * @see getBlockHierarchyRootClientId in core/block-editor store.\n */\nexport const getBlockHierarchyRootClientId = getBlockEditorSelector(\n\t'getBlockHierarchyRootClientId'\n);\n\n/**\n * @see getAdjacentBlockClientId in core/block-editor store.\n */\nexport const getAdjacentBlockClientId = getBlockEditorSelector(\n\t'getAdjacentBlockClientId'\n);\n\n/**\n * @see getPreviousBlockClientId in core/block-editor store.\n */\nexport const getPreviousBlockClientId = getBlockEditorSelector(\n\t'getPreviousBlockClientId'\n);\n\n/**\n * @see getNextBlockClientId in core/block-editor store.\n */\nexport const getNextBlockClientId = getBlockEditorSelector(\n\t'getNextBlockClientId'\n);\n\n/**\n * @see getSelectedBlocksInitialCaretPosition in core/block-editor store.\n */\nexport const getSelectedBlocksInitialCaretPosition = getBlockEditorSelector(\n\t'getSelectedBlocksInitialCaretPosition'\n);\n\n/**\n * @see getMultiSelectedBlockClientIds in core/block-editor store.\n */\nexport const getMultiSelectedBlockClientIds = getBlockEditorSelector(\n\t'getMultiSelectedBlockClientIds'\n);\n\n/**\n * @see getMultiSelectedBlocks in core/block-editor store.\n */\nexport const getMultiSelectedBlocks = getBlockEditorSelector(\n\t'getMultiSelectedBlocks'\n);\n\n/**\n * @see getFirstMultiSelectedBlockClientId in core/block-editor store.\n */\nexport const getFirstMultiSelectedBlockClientId = getBlockEditorSelector(\n\t'getFirstMultiSelectedBlockClientId'\n);\n\n/**\n * @see getLastMultiSelectedBlockClientId in core/block-editor store.\n */\nexport const getLastMultiSelectedBlockClientId = getBlockEditorSelector(\n\t'getLastMultiSelectedBlockClientId'\n);\n\n/**\n * @see isFirstMultiSelectedBlock in core/block-editor store.\n */\nexport const isFirstMultiSelectedBlock = getBlockEditorSelector(\n\t'isFirstMultiSelectedBlock'\n);\n\n/**\n * @see isBlockMultiSelected in core/block-editor store.\n */\nexport const isBlockMultiSelected = getBlockEditorSelector(\n\t'isBlockMultiSelected'\n);\n\n/**\n * @see isAncestorMultiSelected in core/block-editor store.\n */\nexport const isAncestorMultiSelected = getBlockEditorSelector(\n\t'isAncestorMultiSelected'\n);\n\n/**\n * @see getMultiSelectedBlocksStartClientId in core/block-editor store.\n */\nexport const getMultiSelectedBlocksStartClientId = getBlockEditorSelector(\n\t'getMultiSelectedBlocksStartClientId'\n);\n\n/**\n * @see getMultiSelectedBlocksEndClientId in core/block-editor store.\n */\nexport const getMultiSelectedBlocksEndClientId = getBlockEditorSelector(\n\t'getMultiSelectedBlocksEndClientId'\n);\n\n/**\n * @see getBlockOrder in core/block-editor store.\n */\nexport const getBlockOrder = getBlockEditorSelector( 'getBlockOrder' );\n\n/**\n * @see getBlockIndex in core/block-editor store.\n */\nexport const getBlockIndex = getBlockEditorSelector( 'getBlockIndex' );\n\n/**\n * @see isBlockSelected in core/block-editor store.\n */\nexport const isBlockSelected = getBlockEditorSelector( 'isBlockSelected' );\n\n/**\n * @see hasSelectedInnerBlock in core/block-editor store.\n */\nexport const hasSelectedInnerBlock = getBlockEditorSelector(\n\t'hasSelectedInnerBlock'\n);\n\n/**\n * @see isBlockWithinSelection in core/block-editor store.\n */\nexport const isBlockWithinSelection = getBlockEditorSelector(\n\t'isBlockWithinSelection'\n);\n\n/**\n * @see hasMultiSelection in core/block-editor store.\n */\nexport const hasMultiSelection = getBlockEditorSelector( 'hasMultiSelection' );\n\n/**\n * @see isMultiSelecting in core/block-editor store.\n */\nexport const isMultiSelecting = getBlockEditorSelector( 'isMultiSelecting' );\n\n/**\n * @see isSelectionEnabled in core/block-editor store.\n */\nexport const isSelectionEnabled =\n\tgetBlockEditorSelector( 'isSelectionEnabled' );\n\n/**\n * @see getBlockMode in core/block-editor store.\n */\nexport const getBlockMode = getBlockEditorSelector( 'getBlockMode' );\n\n/**\n * @see isTyping in core/block-editor store.\n */\nexport const isTyping = getBlockEditorSelector( 'isTyping' );\n\n/**\n * @see isCaretWithinFormattedText in core/block-editor store.\n */\nexport const isCaretWithinFormattedText = getBlockEditorSelector(\n\t'isCaretWithinFormattedText'\n);\n\n/**\n * @see getBlockInsertionPoint in core/block-editor store.\n */\nexport const getBlockInsertionPoint = getBlockEditorSelector(\n\t'getBlockInsertionPoint'\n);\n\n/**\n * @see isBlockInsertionPointVisible in core/block-editor store.\n */\nexport const isBlockInsertionPointVisible = getBlockEditorSelector(\n\t'isBlockInsertionPointVisible'\n);\n\n/**\n * @see isValidTemplate in core/block-editor store.\n */\nexport const isValidTemplate = getBlockEditorSelector( 'isValidTemplate' );\n\n/**\n * @see getTemplate in core/block-editor store.\n */\nexport const getTemplate = getBlockEditorSelector( 'getTemplate' );\n\n/**\n * @see getTemplateLock in core/block-editor store.\n */\nexport const getTemplateLock = getBlockEditorSelector( 'getTemplateLock' );\n\n/**\n * @see canInsertBlockType in core/block-editor store.\n */\nexport const canInsertBlockType =\n\tgetBlockEditorSelector( 'canInsertBlockType' );\n\n/**\n * @see getInserterItems in core/block-editor store.\n */\nexport const getInserterItems = getBlockEditorSelector( 'getInserterItems' );\n\n/**\n * @see hasInserterItems in core/block-editor store.\n */\nexport const hasInserterItems = getBlockEditorSelector( 'hasInserterItems' );\n\n/**\n * @see getBlockListSettings in core/block-editor store.\n */\nexport const getBlockListSettings = getBlockEditorSelector(\n\t'getBlockListSettings'\n);\n\nexport const __experimentalGetDefaultTemplateTypes = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t\"select('core/editor').__experimentalGetDefaultTemplateTypes\",\n\t\t\t{\n\t\t\t\tsince: '6.8',\n\t\t\t\talternative:\n\t\t\t\t\t\"select('core/core-data').getCurrentTheme()?.default_template_types\",\n\t\t\t}\n\t\t);\n\t\treturn select( coreStore ).getCurrentTheme()?.default_template_types;\n\t}\n);\n\n/**\n * Returns the default template part areas.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} The template part areas.\n */\nexport const __experimentalGetDefaultTemplatePartAreas = createRegistrySelector(\n\t( select ) =>\n\t\tcreateSelector( () => {\n\t\t\tdeprecated(\n\t\t\t\t\"select('core/editor').__experimentalGetDefaultTemplatePartAreas\",\n\t\t\t\t{\n\t\t\t\t\tsince: '6.8',\n\t\t\t\t\talternative:\n\t\t\t\t\t\t\"select('core/core-data').getCurrentTheme()?.default_template_part_areas\",\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tconst areas =\n\t\t\t\tselect( coreStore ).getCurrentTheme()\n\t\t\t\t\t?.default_template_part_areas || [];\n\n\t\t\treturn areas.map( ( item ) => {\n\t\t\t\treturn { ...item, icon: getTemplatePartIcon( item.icon ) };\n\t\t\t} );\n\t\t} )\n);\n\n/**\n * Returns a default template type searched by slug.\n *\n * @param {Object} state Global application state.\n * @param {string} slug The template type slug.\n *\n * @return {Object} The template type.\n */\nexport const __experimentalGetDefaultTemplateType = createRegistrySelector(\n\t( select ) =>\n\t\tcreateSelector( ( state, slug ) => {\n\t\t\tdeprecated(\n\t\t\t\t\"select('core/editor').__experimentalGetDefaultTemplateType\",\n\t\t\t\t{\n\t\t\t\t\tsince: '6.8',\n\t\t\t\t}\n\t\t\t);\n\t\t\tconst templateTypes =\n\t\t\t\tselect( coreStore ).getCurrentTheme()?.default_template_types;\n\n\t\t\tif ( ! templateTypes ) {\n\t\t\t\treturn EMPTY_OBJECT;\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\tObject.values( templateTypes ).find(\n\t\t\t\t\t( type ) => type.slug === slug\n\t\t\t\t) ?? EMPTY_OBJECT\n\t\t\t);\n\t\t} )\n);\n\n/**\n * Given a template entity, return information about it which is ready to be\n * rendered, such as the title, description, and icon.\n *\n * @param {Object} state Global application state.\n * @param {Object} template The template for which we need information.\n * @return {Object} Information about the template, including title, description, and icon.\n */\nexport const __experimentalGetTemplateInfo = createRegistrySelector(\n\t( select ) =>\n\t\tcreateSelector( ( state, template ) => {\n\t\t\tdeprecated( \"select('core/editor').__experimentalGetTemplateInfo\", {\n\t\t\t\tsince: '6.8',\n\t\t\t} );\n\n\t\t\tif ( ! template ) {\n\t\t\t\treturn EMPTY_OBJECT;\n\t\t\t}\n\n\t\t\tconst currentTheme = select( coreStore ).getCurrentTheme();\n\n\t\t\tconst templateTypes = currentTheme?.default_template_types || [];\n\t\t\tconst templateAreas =\n\t\t\t\tcurrentTheme?.default_template_part_areas || [];\n\n\t\t\treturn getTemplateInfo( {\n\t\t\t\ttemplate,\n\t\t\t\ttemplateAreas,\n\t\t\t\ttemplateTypes,\n\t\t\t} );\n\t\t} )\n);\n\n/**\n * Returns a post type label depending on the current post.\n *\n * @param {Object} state Global application state.\n *\n * @return {string|undefined} The post type label if available, otherwise undefined.\n */\nexport const getPostTypeLabel = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst currentPostType = getCurrentPostType( state );\n\t\tconst postType = select( coreStore ).getPostType( currentPostType );\n\t\treturn postType?.labels?.singular_name;\n\t}\n);\n\n/**\n * Returns true if the publish sidebar is opened.\n *\n * @param {Object} state Global application state\n *\n * @return {boolean} Whether the publish sidebar is open.\n */\nexport function isPublishSidebarOpened( state ) {\n\treturn state.publishSidebarActive;\n}\n", "/**\n * Set of post properties for which edits should assume a merging behavior,\n * assuming an object value.\n *\n * @type {Set}\n */\nexport const EDIT_MERGE_PROPERTIES = new Set( [ 'meta' ] );\n\n/**\n * Constant for the store module (or reducer) key.\n */\nexport const STORE_NAME = 'core/editor';\n\nexport const PERMALINK_POSTNAME_REGEX = /%(?:postname|pagename)%/;\nexport const ONE_MINUTE_IN_MS = 60 * 1000;\nexport const AUTOSAVE_PROPERTIES = [ 'title', 'excerpt', 'content' ];\nexport const TEMPLATE_PART_AREA_DEFAULT_CATEGORY = 'uncategorized';\nexport const TEMPLATE_POST_TYPE = 'wp_template';\nexport const TEMPLATE_PART_POST_TYPE = 'wp_template_part';\nexport const PATTERN_POST_TYPE = 'wp_block';\nexport const NAVIGATION_POST_TYPE = 'wp_navigation';\nexport const TEMPLATE_ORIGINS = {\n\tcustom: 'custom',\n\ttheme: 'theme',\n\tplugin: 'plugin',\n};\nexport const TEMPLATE_POST_TYPES = [ 'wp_template', 'wp_template_part' ];\nexport const GLOBAL_POST_TYPES = [\n\t...TEMPLATE_POST_TYPES,\n\t'wp_block',\n\t'wp_navigation',\n];\nexport const DESIGN_POST_TYPES = [\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tPATTERN_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n];\n", "/**\n * WordPress dependencies\n */\nimport { cloneElement, forwardRef } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport type { ReactElement } from 'react';\nimport type { SVGProps } from '@wordpress/primitives';\n\nexport interface IconProps extends SVGProps {\n\t/**\n\t * The SVG component to render\n\t */\n\ticon: ReactElement;\n\t/**\n\t * The size of the icon in pixels\n\t *\n\t * @default 24\n\t */\n\tsize?: number;\n}\n\n/**\n * Return an SVG icon.\n *\n * @param props The component props.\n *\n * @return Icon component\n */\nexport default forwardRef< HTMLElement, IconProps >(\n\t( { icon, size = 24, ...props }: IconProps, ref ) => {\n\t\treturn cloneElement( icon, {\n\t\t\twidth: size,\n\t\t\theight: size,\n\t\t\t...props,\n\t\t\tref,\n\t\t} );\n\t}\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t<Path fillRule=\"evenodd\"\n\t clipRule=\"evenodd\"\n\t d=\"M18.5 5.5V8H20V5.5H22.5V4H20V1.5H18.5V4H16V5.5H18.5ZM13.9624 4H6C4.89543 4 4 4.89543 4 6V18C4 19.1046 4.89543 20 6 20H18C19.1046 20 20 19.1046 20 18V10.0391H18.5V18C18.5 18.2761 18.2761 18.5 18 18.5H10L10 10.4917L16.4589 10.5139L16.4641 9.01389L5.5 8.97618V6C5.5 5.72386 5.72386 5.5 6 5.5H13.9624V4ZM5.5 10.4762V18C5.5 18.2761 5.72386 18.5 6 18.5H8.5L8.5 10.4865L5.5 10.4762Z\"\n\t />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t<Path fillRule=\"evenodd\"\n\t clipRule=\"evenodd\"\n\t d=\"M11.934 7.406a1 1 0 0 0 .914.594H19a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5.764a.5.5 0 0 1 .447.276l.723 1.63Zm1.064-1.216a.5.5 0 0 0 .462.31H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.764a2 2 0 0 1 1.789 1.106l.445 1.084ZM8.5 10.5h7V12h-7v-1.5Zm7 3.5h-7v1.5h7V14Z\"\n\t />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t<Path d=\"M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path fillRule=\"evenodd\"\n\t clipRule=\"evenodd\"\n\t d=\"M11.53 4.47a.75.75 0 1 0-1.06 1.06l8 8a.75.75 0 1 0 1.06-1.06l-8-8Zm5 1a.75.75 0 1 0-1.06 1.06l2 2a.75.75 0 1 0 1.06-1.06l-2-2Zm-11.06 10a.75.75 0 0 1 1.06 0l2 2a.75.75 0 1 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06Zm.06-5a.75.75 0 0 0-1.06 1.06l8 8a.75.75 0 1 0 1.06-1.06l-8-8Zm-.06-3a.75.75 0 0 1 1.06 0l10 10a.75.75 0 1 1-1.06 1.06l-10-10a.75.75 0 0 1 0-1.06Zm3.06-2a.75.75 0 0 0-1.06 1.06l10 10a.75.75 0 1 0 1.06-1.06l-10-10Z\"\n\t />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M17.3 10.1C17.3 7.60001 15.2 5.70001 12.5 5.70001C10.3 5.70001 8.4 7.10001 7.9 9.00001H7.7C5.7 9.00001 4 10.7 4 12.8C4 14.9 5.7 16.6 7.7 16.6H9.5V15.2H7.7C6.5 15.2 5.5 14.1 5.5 12.9C5.5 11.7 6.5 10.5 7.7 10.5H9L9.3 9.40001C9.7 8.10001 11 7.20001 12.5 7.20001C14.3 7.20001 15.8 8.50001 15.8 10.1V11.4L17.1 11.6C17.9 11.7 18.5 12.5 18.5 13.4C18.5 14.4 17.7 15.2 16.8 15.2H14.5V16.6H16.7C18.5 16.6 19.9 15.1 19.9 13.3C20 11.7 18.8 10.4 17.3 10.1Z M14.1245 14.2426L15.1852 13.182L12.0032 10L8.82007 13.1831L9.88072 14.2438L11.25 12.8745V18H12.75V12.8681L14.1245 14.2426Z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-9c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4h1.3l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8-.1 1-.9 1.8-1.8 1.8z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t<Path d=\"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t<Path d=\"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path fillRule=\"evenodd\"\n\t d=\"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z\"\n\t clipRule=\"evenodd\"\n\t />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t<Path d=\"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path fillRule=\"evenodd\"\n\t clipRule=\"evenodd\"\n\t d=\"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z\"\n\t />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path fillRule=\"evenodd\"\n\t clipRule=\"evenodd\"\n\t d=\"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 0 4-4H8a4 4 0 0 0 4 4Z\"\n\t />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path fillRule=\"evenodd\"\n\t clipRule=\"evenodd\"\n\t d=\"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.5 18.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h2.5v13zm10-.5c0 .3-.2.5-.5.5h-8v-13h8c.3 0 .5.2.5.5v12z\"\n\t />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path fillRule=\"evenodd\"\n\t clipRule=\"evenodd\"\n\t d=\"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z\"\n\t />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t<Path fillRule=\"evenodd\"\n\t clipRule=\"evenodd\"\n\t d=\"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z\"\n\t />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path fillRule=\"evenodd\"\n\t d=\"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z\"\n\t />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M18.5 10.5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t<Path fillRule=\"evenodd\"\n\t clipRule=\"evenodd\"\n\t d=\"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z\"\n\t />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"m16 15.5h-8v-1.5h8zm-7.5-2.5h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm-9-3h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2z\" />\n\t <Path d=\"m18.5 6.5h-13a.5.5 0 0 0 -.5.5v9.5a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-9.5a.5.5 0 0 0 -.5-.5zm-13-1.5h13a2 2 0 0 1 2 2v9.5a2 2 0 0 1 -2 2h-13a2 2 0 0 1 -2-2v-9.5a2 2 0 0 1 2-2z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t<Path d=\"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t<Path fillRule=\"evenodd\"\n\t clipRule=\"evenodd\"\n\t d=\"M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z\"\n\t />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t<Path d=\"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<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\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path fillRule=\"evenodd\"\n\t clipRule=\"evenodd\"\n\t d=\"M12 18.5A6.5 6.5 0 0 1 6.93 7.931l9.139 9.138A6.473 6.473 0 0 1 12 18.5Zm5.123-2.498a6.5 6.5 0 0 0-9.124-9.124l9.124 9.124ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z\"\n\t />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z\" />\n\t <Path d=\"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path fillRule=\"evenodd\"\n\t clipRule=\"evenodd\"\n\t d=\"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 1-4-4h4V8a4 4 0 0 1 0 8Z\"\n\t />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<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\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path fillRule=\"evenodd\"\n\t clipRule=\"evenodd\"\n\t d=\"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z\"\n\t />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M7 11.5h10V13H7z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M12 4V2.2L9 4.8l3 2.5V5.5c3.6 0 6.5 2.9 6.5 6.5 0 2.9-1.9 5.3-4.5 6.2v.2l-.1-.2c-.4.1-.7.2-1.1.2l.2 1.5c.3 0 .6-.1 1-.2 3.5-.9 6-4 6-7.7 0-4.4-3.6-8-8-8zm-7.9 7l1.5.2c.1-1.2.5-2.3 1.2-3.2l-1.1-.9C4.8 8.2 4.3 9.6 4.1 11zm1.5 1.8l-1.5.2c.1.7.3 1.4.5 2 .3.7.6 1.3 1 1.8l1.2-.8c-.3-.5-.6-1-.8-1.5s-.4-1.1-.4-1.7zm1.5 5.5c1.1.9 2.4 1.4 3.8 1.6l.2-1.5c-1.1-.1-2.2-.5-3.1-1.2l-.9 1.1z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path fillRule=\"evenodd\"\n\t clipRule=\"evenodd\"\n\t d=\"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm9 1V8h-1.5v3.5h-2V13H13Z\"\n\t />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t<Path d=\"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z\" />\n\t <Path d=\"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t<Path d=\"M12 8c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6.5c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12.8 3h-1.5v3h1.5V3zm-1.6 18h1.5v-3h-1.5v3zm6.8-9.8v1.5h3v-1.5h-3zm-12 0H3v1.5h3v-1.5zm9.7 5.6 2.1 2.1 1.1-1.1-2.1-2.1-1.1 1.1zM8.3 7.2 6.2 5.1 5.1 6.2l2.1 2.1 1.1-1.1zM5.1 17.8l1.1 1.1 2.1-2.1-1.1-1.1-2.1 2.1zM18.9 6.2l-1.1-1.1-2.1 2.1 1.1 1.1 2.1-2.1z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/SVG\">\n\t<Path d=\"M17.192 6.75L15.47 5.03l1.06-1.06 3.537 3.53-3.537 3.53-1.06-1.06 1.723-1.72h-3.19c-.602 0-.993.202-1.28.498-.309.319-.538.792-.695 1.383-.13.488-.222 1.023-.296 1.508-.034.664-.116 1.413-.303 2.117-.193.721-.513 1.467-1.068 2.04-.575.594-1.359.954-2.357.954H4v-1.5h4.003c.601 0 .993-.202 1.28-.498.308-.319.538-.792.695-1.383.149-.557.216-1.093.288-1.662l.039-.31a9.653 9.653 0 0 1 .272-1.653c.193-.722.513-1.467 1.067-2.04.576-.594 1.36-.954 2.358-.954h3.19zM8.004 6.75c.8 0 1.46.23 1.988.628a6.24 6.24 0 0 0-.684 1.396 1.725 1.725 0 0 0-.024-.026c-.287-.296-.679-.498-1.28-.498H4v-1.5h4.003zM12.699 14.726c-.161.459-.38.94-.684 1.396.527.397 1.188.628 1.988.628h3.19l-1.722 1.72 1.06 1.06L20.067 16l-3.537-3.53-1.06 1.06 1.723 1.72h-3.19c-.602 0-.993-.202-1.28-.498a1.96 1.96 0 0 1-.024-.026z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path fill=\"none\"\n\t d=\"M5.75 12.75V18.25H11.25M12.75 5.75H18.25V11.25\"\n\t stroke=\"currentColor\"\n\t strokeWidth=\"1.5\"\n\t strokeLinecap=\"square\"\n\t />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path fillRule=\"evenodd\"\n\t d=\"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z\"\n\t clipRule=\"evenodd\"\n\t />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t<Path fillRule=\"evenodd\"\n\t clipRule=\"evenodd\"\n\t d=\"M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z\"\n\t />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M19 3H5c-1.1 0-2 .9-2 2v14.2c.1.9.9 1.7 1.8 1.8H19.2c1-.1 1.8-1 1.8-2V5c0-1.1-.9-2-2-2ZM8.5 19.5H5c-.3 0-.5-.2-.5-.5v-3.5h4v4Zm0-5.5h-4v-4h4v4Zm0-5.5h-4V5c0-.3.2-.5.5-.5h3.5v4Zm11 10.5c0 .3-.2.5-.5.5h-9v-15h9c.3 0 .5.2.5.5v14Zm-4-10.8H14v3h-3v1.5h3v3h1.5v-3h3v-1.5h-3v-3Z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path fillRule=\"evenodd\"\n\t clipRule=\"evenodd\"\n\t d=\"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z\"\n\t />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"m8.6 7 3.9 10.8h-1.7l-1-2.8H5.7l-1 2.8H3L6.9 7h1.7Zm-2.4 6.6h3L7.7 9.3l-1.5 4.3ZM17.691 8.879c.473 0 .88.055 1.221.165.352.1.643.264.875.495.274.253.456.572.544.957.088.374.132.83.132 1.37v4.554c0 .274.033.472.099.593.077.11.198.166.363.166.11 0 .215-.028.313-.083.11-.055.237-.137.38-.247l.165.28a3.304 3.304 0 0 1-.71.446c-.23.11-.527.165-.89.165-.352 0-.639-.055-.858-.165-.22-.11-.386-.27-.495-.479-.1-.209-.149-.468-.149-.775-.286.462-.627.814-1.023 1.056-.396.242-.858.363-1.386.363-.462 0-.858-.088-1.188-.264a1.752 1.752 0 0 1-.742-.726 2.201 2.201 0 0 1-.248-1.056c0-.484.11-.875.33-1.172.22-.308.5-.556.841-.742.352-.187.721-.341 1.106-.462.396-.132.765-.253 1.106-.363.351-.121.637-.259.857-.413.232-.154.347-.357.347-.61V10.81c0-.396-.066-.71-.198-.941a1.05 1.05 0 0 0-.511-.511 1.763 1.763 0 0 0-.76-.149c-.253 0-.522.039-.808.116a1.165 1.165 0 0 0-.677.412 1.1 1.1 0 0 1 .595.396c.165.187.247.424.247.71 0 .307-.104.55-.313.726-.198.176-.451.263-.76.263-.34 0-.594-.104-.758-.313a1.231 1.231 0 0 1-.248-.759c0-.297.072-.539.214-.726.154-.187.352-.363.595-.528.264-.176.6-.324 1.006-.445.418-.121.88-.182 1.386-.182Zm.99 3.729a1.57 1.57 0 0 1-.528.462c-.231.121-.479.248-.742.38a5.377 5.377 0 0 0-.76.462c-.23.165-.423.38-.577.643-.154.264-.231.6-.231 1.007 0 .429.11.77.33 1.023.22.242.517.363.891.363.308 0 .594-.088.858-.264.275-.176.528-.44.759-.792v-3.284Z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t<Path d=\"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t<Path d=\"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t<Path d=\"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"-2 -2 24 24\">\n\t<Path d=\"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z\" />\n\t</SVG>\n);\n", "/**\n * WordPress dependencies\n */\nimport {\n\theader as headerIcon,\n\tfooter as footerIcon,\n\tsidebar as sidebarIcon,\n\ttableColumnAfter as overlayIcon,\n\tsymbolFilled as symbolFilledIcon,\n} from '@wordpress/icons';\n\n/**\n * Helper function to retrieve the corresponding icon by area name or icon name.\n *\n * @param {string} areaOrIconName The area name (e.g., 'header', 'navigation-overlay') or icon name (e.g., 'menu').\n *\n * @return {Object} The corresponding icon.\n */\nexport function getTemplatePartIcon( areaOrIconName ) {\n\t// Handle area names first\n\tif ( 'header' === areaOrIconName ) {\n\t\treturn headerIcon;\n\t} else if ( 'footer' === areaOrIconName ) {\n\t\treturn footerIcon;\n\t} else if ( 'sidebar' === areaOrIconName ) {\n\t\treturn sidebarIcon;\n\t} else if ( 'overlay' === areaOrIconName ) {\n\t\t// TODO: Replace with a proper overlay icon when available.\n\t\t// Using tableColumnAfter as a placeholder.\n\t\treturn overlayIcon;\n\t}\n\t// Handle icon names for backwards compatibility\n\tif ( 'menu' === areaOrIconName ) {\n\t\t// TODO: Replace with a proper overlay icon when available.\n\t\t// Using tableColumnAfter as a placeholder.\n\t\treturn overlayIcon;\n\t}\n\treturn symbolFilledIcon;\n}\n", "/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',\n\t\t'@wordpress/editor'\n\t);\n", "/**\n * WordPress dependencies\n */\nimport { layout } from '@wordpress/icons';\n/**\n * Internal dependencies\n */\nimport { getTemplatePartIcon } from './get-template-part-icon';\nconst EMPTY_OBJECT = {};\n\n/**\n * Helper function to retrieve the corresponding template info for a given template.\n * @param {Object} params\n * @param {Array} params.templateTypes\n * @param {Array} [params.templateAreas]\n * @param {Object} params.template\n */\nexport const getTemplateInfo = ( params ) => {\n\tif ( ! params ) {\n\t\treturn EMPTY_OBJECT;\n\t}\n\n\tconst { templateTypes, templateAreas, template } = params;\n\n\tconst { description, slug, title, area } = template;\n\n\tconst { title: defaultTitle, description: defaultDescription } =\n\t\tObject.values( templateTypes ).find( ( type ) => type.slug === slug ) ??\n\t\tEMPTY_OBJECT;\n\n\tconst templateTitle = typeof title === 'string' ? title : title?.rendered;\n\tconst templateDescription =\n\t\ttypeof description === 'string' ? description : description?.raw;\n\n\tconst templateAreasWithIcon = templateAreas?.map( ( item ) => ( {\n\t\t...item,\n\t\ticon: getTemplatePartIcon( item.icon ),\n\t} ) );\n\n\tconst templateIcon =\n\t\ttemplateAreasWithIcon?.find( ( item ) => area === item.area )?.icon ||\n\t\tlayout;\n\n\treturn {\n\t\ttitle:\n\t\t\ttemplateTitle && templateTitle !== slug\n\t\t\t\t? templateTitle\n\t\t\t\t: defaultTitle || slug,\n\t\tdescription: templateDescription || defaultDescription,\n\t\ticon: templateIcon,\n\t};\n};\n", "/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\nimport apiFetch from '@wordpress/api-fetch';\nimport deprecated from '@wordpress/deprecated';\nimport {\n\tparse,\n\tsynchronizeBlocksWithTemplate,\n\t__unstableSerializeAndClean,\n} from '@wordpress/blocks';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport {\n\tapplyFilters,\n\tapplyFiltersAsync,\n\tdoActionAsync,\n} from '@wordpress/hooks';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { localAutosaveSet } from './local-autosave';\nimport {\n\tgetNotificationArgumentsForSaveSuccess,\n\tgetNotificationArgumentsForSaveFail,\n\tgetNotificationArgumentsForTrashFail,\n} from './utils/notice-builder';\nimport { unlock } from '../lock-unlock';\n/**\n * Returns an action generator used in signalling that editor has initialized with\n * the specified post object and editor settings.\n *\n * @param {Object} post Post object.\n * @param {Object} edits Initial edited attributes object.\n * @param {Array} [template] Block Template.\n */\nexport const setupEditor =\n\t( post, edits, template ) =>\n\t( { dispatch } ) => {\n\t\tdispatch.setEditedPost( post.type, post.id );\n\t\t// Apply a template for new posts only, if exists.\n\t\tconst isNewPost = post.status === 'auto-draft';\n\t\tif ( isNewPost && template ) {\n\t\t\t// In order to ensure maximum of a single parse during setup, edits are\n\t\t\t// included as part of editor setup action. Assume edited content as\n\t\t\t// canonical if provided, falling back to post.\n\t\t\tlet content;\n\t\t\tif ( 'content' in edits ) {\n\t\t\t\tcontent = edits.content;\n\t\t\t} else {\n\t\t\t\tcontent = post.content.raw;\n\t\t\t}\n\t\t\tlet blocks = parse( content );\n\t\t\tblocks = synchronizeBlocksWithTemplate( blocks, template );\n\t\t\tdispatch.resetEditorBlocks( blocks, {\n\t\t\t\t__unstableShouldCreateUndoLevel: false,\n\t\t\t} );\n\t\t}\n\t\tif (\n\t\t\tedits &&\n\t\t\tObject.entries( edits ).some(\n\t\t\t\t( [ key, edit ] ) =>\n\t\t\t\t\tedit !== ( post[ key ]?.raw ?? post[ key ] )\n\t\t\t)\n\t\t) {\n\t\t\tdispatch.editPost( edits );\n\t\t}\n\t};\n\n/**\n * Returns an action object signalling that the editor is being destroyed and\n * that any necessary state or side-effect cleanup should occur.\n *\n * @deprecated\n *\n * @return {Object} Action object.\n */\nexport function __experimentalTearDownEditor() {\n\tdeprecated(\n\t\t\"wp.data.dispatch( 'core/editor' ).__experimentalTearDownEditor\",\n\t\t{\n\t\t\tsince: '6.5',\n\t\t}\n\t);\n\treturn { type: 'DO_NOTHING' };\n}\n\n/**\n * Returns an action object used in signalling that the latest version of the\n * post has been received, either by initialization or save.\n *\n * @deprecated Since WordPress 6.0.\n */\nexport function resetPost() {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).resetPost\", {\n\t\tsince: '6.0',\n\t\tversion: '6.3',\n\t\talternative: 'Initialize the editor with the setupEditorState action',\n\t} );\n\treturn { type: 'DO_NOTHING' };\n}\n\n/**\n * Returns an action object used in signalling that a patch of updates for the\n * latest version of the post have been received.\n *\n * @return {Object} Action object.\n * @deprecated since Gutenberg 9.7.0.\n */\nexport function updatePost() {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).updatePost\", {\n\t\tsince: '5.7',\n\t\talternative: 'Use the core entities store instead',\n\t} );\n\treturn {\n\t\ttype: 'DO_NOTHING',\n\t};\n}\n\n/**\n * Setup the editor state.\n *\n * @deprecated\n *\n * @param {Object} post Post object.\n */\nexport function setupEditorState( post ) {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).setupEditorState\", {\n\t\tsince: '6.5',\n\t\talternative: \"wp.data.dispatch( 'core/editor' ).setEditedPost\",\n\t} );\n\treturn setEditedPost( post.type, post.id );\n}\n\n/**\n * Returns an action that sets the current post Type and post ID.\n *\n * @param {string} postType Post Type.\n * @param {string} postId Post ID.\n *\n * @return {Object} Action object.\n */\nexport function setEditedPost( postType, postId ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType,\n\t\tpostId,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that attributes of the post have\n * been edited.\n *\n * @param {Object} edits Post attributes to edit.\n * @param {Object} [options] Options for the edit.\n *\n * @example\n * ```js\n * // Update the post title\n * wp.data.dispatch( 'core/editor' ).editPost( { title: `${ newTitle }` } );\n * ```\n *\n * @return {Object} Action object\n */\nexport const editPost =\n\t( edits, options ) =>\n\t( { select, registry } ) => {\n\t\tconst { id, type } = select.getCurrentPost();\n\t\tregistry\n\t\t\t.dispatch( coreStore )\n\t\t\t.editEntityRecord( 'postType', type, id, edits, options );\n\t};\n\n/**\n * Action for saving the current post in the editor.\n *\n * @param {Object} [options]\n */\nexport const savePost =\n\t( options = {} ) =>\n\tasync ( { select, dispatch, registry } ) => {\n\t\tif ( ! select.isEditedPostSaveable() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst content = select.getEditedPostContent();\n\n\t\tif ( ! options.isAutosave ) {\n\t\t\tdispatch.editPost( { content }, { undoIgnore: true } );\n\t\t}\n\n\t\tconst previousRecord = select.getCurrentPost();\n\t\tlet edits = {\n\t\t\tid: previousRecord.id,\n\t\t\t...registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getEntityRecordNonTransientEdits(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpreviousRecord.type,\n\t\t\t\t\tpreviousRecord.id\n\t\t\t\t),\n\t\t\tcontent,\n\t\t};\n\t\tdispatch( { type: 'REQUEST_POST_UPDATE_START', options } );\n\n\t\tlet error = false;\n\t\ttry {\n\t\t\tedits = await applyFiltersAsync(\n\t\t\t\t'editor.preSavePost',\n\t\t\t\tedits,\n\t\t\t\toptions\n\t\t\t);\n\t\t} catch ( err ) {\n\t\t\terror = err;\n\t\t}\n\n\t\tif ( ! error ) {\n\t\t\ttry {\n\t\t\t\tawait registry\n\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t.saveEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\tpreviousRecord.type,\n\t\t\t\t\t\tedits,\n\t\t\t\t\t\toptions\n\t\t\t\t\t);\n\t\t\t} catch ( err ) {\n\t\t\t\terror =\n\t\t\t\t\terr.message && err.code !== 'unknown_error'\n\t\t\t\t\t\t? err.message\n\t\t\t\t\t\t: __( 'An error occurred while updating.' );\n\t\t\t}\n\t\t}\n\n\t\tif ( ! error ) {\n\t\t\terror = registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getLastEntitySaveError(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpreviousRecord.type,\n\t\t\t\t\tpreviousRecord.id\n\t\t\t\t);\n\t\t}\n\n\t\t// Run the hook with legacy unstable name for backward compatibility\n\t\tif ( ! error ) {\n\t\t\ttry {\n\t\t\t\tawait applyFilters(\n\t\t\t\t\t'editor.__unstableSavePost',\n\t\t\t\t\tPromise.resolve(),\n\t\t\t\t\toptions\n\t\t\t\t);\n\t\t\t} catch ( err ) {\n\t\t\t\terror = err;\n\t\t\t}\n\t\t}\n\n\t\tif ( ! error ) {\n\t\t\ttry {\n\t\t\t\tawait doActionAsync(\n\t\t\t\t\t'editor.savePost',\n\t\t\t\t\t{ id: previousRecord.id, type: previousRecord.type },\n\t\t\t\t\toptions\n\t\t\t\t);\n\t\t\t} catch ( err ) {\n\t\t\t\terror = err;\n\t\t\t}\n\t\t}\n\t\tdispatch( { type: 'REQUEST_POST_UPDATE_FINISH', options } );\n\n\t\tif (\n\t\t\ttypeof window !== 'undefined' &&\n\t\t\twindow.__experimentalTemplateActivate &&\n\t\t\t! options.isAutosave &&\n\t\t\tpreviousRecord.type === 'wp_template' &&\n\t\t\t( typeof previousRecord.id === 'number' ||\n\t\t\t\t/^\\d+$/.test( previousRecord.id ) )\n\t\t) {\n\t\t\ttemplateActivationNotice( { select, dispatch, registry } );\n\t\t}\n\n\t\tif ( error ) {\n\t\t\tconst args = getNotificationArgumentsForSaveFail( {\n\t\t\t\tpost: previousRecord,\n\t\t\t\tedits,\n\t\t\t\terror,\n\t\t\t} );\n\t\t\tif ( args.length ) {\n\t\t\t\tregistry.dispatch( noticesStore ).createErrorNotice( ...args );\n\t\t\t}\n\t\t} else {\n\t\t\tconst updatedRecord = select.getCurrentPost();\n\t\t\tconst args = getNotificationArgumentsForSaveSuccess( {\n\t\t\t\tpreviousPost: previousRecord,\n\t\t\t\tpost: updatedRecord,\n\t\t\t\tpostType: await registry\n\t\t\t\t\t.resolveSelect( coreStore )\n\t\t\t\t\t.getPostType( updatedRecord.type ),\n\t\t\t\toptions,\n\t\t\t} );\n\t\t\tif ( args.length ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createSuccessNotice( ...args );\n\t\t\t}\n\t\t\t// Make sure that any edits after saving create an undo level and are\n\t\t\t// considered for change detection.\n\t\t\tif ( ! options.isAutosave ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( blockEditorStore )\n\t\t\t\t\t.__unstableMarkLastChangeAsPersistent();\n\t\t\t}\n\t\t}\n\t};\n\nasync function templateActivationNotice( { select, registry } ) {\n\tconst editorSettings = select.getEditorSettings();\n\n\t// Don't open for focused entity.\n\tif ( editorSettings.onNavigateToPreviousEntityRecord ) {\n\t\treturn;\n\t}\n\n\tconst { id, slug } = select.getCurrentPost();\n\tconst site = await registry\n\t\t.select( coreStore )\n\t\t.getEntityRecord( 'root', 'site' );\n\n\t// Already active.\n\tif ( site.active_templates[ slug ] === id ) {\n\t\treturn;\n\t}\n\n\tconst currentTheme = await registry\n\t\t.resolveSelect( coreStore )\n\t\t.getCurrentTheme();\n\tconst templateType = currentTheme?.default_template_types.find(\n\t\t( type ) => type.slug === slug\n\t);\n\n\tawait registry.dispatch( noticesStore ).createNotice(\n\t\t'info',\n\t\tsprintf(\n\t\t\t// translators: %s: The name (or slug) of the type of template.\n\t\t\t__( 'Do you want to activate this \"%s\" template?' ),\n\t\t\ttemplateType?.title ?? slug\n\t\t),\n\t\t{\n\t\t\tid: 'template-activate-notice',\n\t\t\tactions: [\n\t\t\t\t{\n\t\t\t\t\tlabel: __( 'Activate' ),\n\t\t\t\t\tonClick: async () => {\n\t\t\t\t\t\tawait registry\n\t\t\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t\t\t.createNotice(\n\t\t\t\t\t\t\t\t'info',\n\t\t\t\t\t\t\t\t__( 'Activating template\u2026' ),\n\t\t\t\t\t\t\t\t{ id: 'template-activate-notice' }\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst currentSite = await registry\n\t\t\t\t\t\t\t\t.select( coreStore )\n\t\t\t\t\t\t\t\t.getEntityRecord( 'root', 'site' );\n\t\t\t\t\t\t\tawait registry\n\t\t\t\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t\t\t\t.saveEntityRecord(\n\t\t\t\t\t\t\t\t\t'root',\n\t\t\t\t\t\t\t\t\t'site',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tactive_templates: {\n\t\t\t\t\t\t\t\t\t\t\t...currentSite.active_templates,\n\t\t\t\t\t\t\t\t\t\t\t[ slug ]: id,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{ throwOnError: true }\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tawait registry\n\t\t\t\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t\t\t\t.createSuccessNotice(\n\t\t\t\t\t\t\t\t\t__( 'Template activated.' ),\n\t\t\t\t\t\t\t\t\t{ id: 'template-activate-notice' }\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} catch ( error ) {\n\t\t\t\t\t\t\tawait registry\n\t\t\t\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t\t\t\t.createErrorNotice(\n\t\t\t\t\t\t\t\t\t__( 'Template activation failed.' ),\n\t\t\t\t\t\t\t\t\t{ id: 'template-activate-notice' }\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t// Rethrow for debugging.\n\t\t\t\t\t\t\tthrow error;\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t}\n\t);\n}\n\n/**\n * Action for refreshing the current post.\n *\n * @deprecated Since WordPress 6.0.\n */\nexport function refreshPost() {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).refreshPost\", {\n\t\tsince: '6.0',\n\t\tversion: '6.3',\n\t\talternative: 'Use the core entities store instead',\n\t} );\n\treturn { type: 'DO_NOTHING' };\n}\n\n/**\n * Action for trashing the current post in the editor.\n */\nexport const trashPost =\n\t() =>\n\tasync ( { select, dispatch, registry } ) => {\n\t\tconst postTypeSlug = select.getCurrentPostType();\n\t\tconst postType = await registry\n\t\t\t.resolveSelect( coreStore )\n\t\t\t.getPostType( postTypeSlug );\n\t\tconst { rest_base: restBase, rest_namespace: restNamespace = 'wp/v2' } =\n\t\t\tpostType;\n\t\tdispatch( { type: 'REQUEST_POST_DELETE_START' } );\n\t\ttry {\n\t\t\tconst post = select.getCurrentPost();\n\t\t\tawait apiFetch( {\n\t\t\t\tpath: `/${ restNamespace }/${ restBase }/${ post.id }`,\n\t\t\t\tmethod: 'DELETE',\n\t\t\t} );\n\n\t\t\tawait dispatch.savePost();\n\t\t} catch ( error ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice(\n\t\t\t\t\t...getNotificationArgumentsForTrashFail( { error } )\n\t\t\t\t);\n\t\t}\n\t\tdispatch( { type: 'REQUEST_POST_DELETE_FINISH' } );\n\t};\n\n/**\n * Action that autosaves the current post. This\n * includes server-side autosaving (default) and client-side (a.k.a. local)\n * autosaving (e.g. on the Web, the post might be committed to Session\n * Storage).\n *\n * @param {Object} [options] Extra flags to identify the autosave.\n * @param {boolean} [options.local] Whether to perform a local autosave.\n */\nexport const autosave =\n\t( { local = false, ...options } = {} ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tconst post = select.getCurrentPost();\n\n\t\tif ( local ) {\n\t\t\tconst isPostNew = select.isEditedPostNew();\n\t\t\tconst title = select.getEditedPostAttribute( 'title' );\n\t\t\tconst content = select.getEditedPostAttribute( 'content' );\n\t\t\tconst excerpt = select.getEditedPostAttribute( 'excerpt' );\n\t\t\tlocalAutosaveSet( post.id, isPostNew, title, content, excerpt );\n\t\t} else {\n\t\t\tawait dispatch.savePost( { isAutosave: true, ...options } );\n\t\t}\n\t};\n\n/**\n * Save for preview.\n *\n * @param {Object} options Options object.\n * @param {boolean} options.forceIsAutosaveable Whether to force the post to be autosaveable.\n *\n * @return {Function} Thunk that saves for preview and returns the preview link.\n */\nexport const __unstableSaveForPreview =\n\t( { forceIsAutosaveable } = {} ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tif (\n\t\t\t( forceIsAutosaveable || select.isEditedPostAutosaveable() ) &&\n\t\t\t! select.isPostLocked()\n\t\t) {\n\t\t\tconst isDraft = [ 'draft', 'auto-draft' ].includes(\n\t\t\t\tselect.getEditedPostAttribute( 'status' )\n\t\t\t);\n\t\t\tif ( isDraft ) {\n\t\t\t\tawait dispatch.savePost( { isPreview: true } );\n\t\t\t} else {\n\t\t\t\tawait dispatch.autosave( { isPreview: true } );\n\t\t\t}\n\t\t}\n\n\t\treturn select.getEditedPostPreviewLink();\n\t};\n\n/**\n * Action that restores last popped state in undo history.\n */\nexport const redo =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( coreStore ).redo();\n\t};\n\n/**\n * Action that pops a record from undo history and undoes the edit.\n */\nexport const undo =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( coreStore ).undo();\n\t};\n\n/**\n * Action that creates an undo history record.\n *\n * @deprecated Since WordPress 6.0\n */\nexport function createUndoLevel() {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).createUndoLevel\", {\n\t\tsince: '6.0',\n\t\tversion: '6.3',\n\t\talternative: 'Use the core entities store instead',\n\t} );\n\treturn { type: 'DO_NOTHING' };\n}\n\n/**\n * Action that locks the editor.\n *\n * @param {Object} lock Details about the post lock status, user, and nonce.\n * @return {Object} Action object.\n */\nexport function updatePostLock( lock ) {\n\treturn {\n\t\ttype: 'UPDATE_POST_LOCK',\n\t\tlock,\n\t};\n}\n\n/**\n * Enable the publish sidebar.\n */\nexport const enablePublishSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'isPublishSidebarEnabled', true );\n\t};\n\n/**\n * Disables the publish sidebar.\n */\nexport const disablePublishSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'isPublishSidebarEnabled', false );\n\t};\n\n/**\n * Action that locks post saving.\n *\n * @param {string} lockName The lock name.\n *\n * @example\n * ```\n * const { subscribe } = wp.data;\n *\n * const initialPostStatus = wp.data.select( 'core/editor' ).getEditedPostAttribute( 'status' );\n *\n * // Only allow publishing posts that are set to a future date.\n * if ( 'publish' !== initialPostStatus ) {\n *\n * \t// Track locking.\n * \tlet locked = false;\n *\n * \t// Watch for the publish event.\n * \tlet unssubscribe = subscribe( () => {\n * \t\tconst currentPostStatus = wp.data.select( 'core/editor' ).getEditedPostAttribute( 'status' );\n * \t\tif ( 'publish' !== currentPostStatus ) {\n *\n * \t\t\t// Compare the post date to the current date, lock the post if the date isn't in the future.\n * \t\t\tconst postDate = new Date( wp.data.select( 'core/editor' ).getEditedPostAttribute( 'date' ) );\n * \t\t\tconst currentDate = new Date();\n * \t\t\tif ( postDate.getTime() <= currentDate.getTime() ) {\n * \t\t\t\tif ( ! locked ) {\n * \t\t\t\t\tlocked = true;\n * \t\t\t\t\twp.data.dispatch( 'core/editor' ).lockPostSaving( 'futurelock' );\n * \t\t\t\t}\n * \t\t\t} else {\n * \t\t\t\tif ( locked ) {\n * \t\t\t\t\tlocked = false;\n * \t\t\t\t\twp.data.dispatch( 'core/editor' ).unlockPostSaving( 'futurelock' );\n * \t\t\t\t}\n * \t\t\t}\n * \t\t}\n * \t} );\n * }\n * ```\n *\n * @return {Object} Action object\n */\nexport function lockPostSaving( lockName ) {\n\treturn {\n\t\ttype: 'LOCK_POST_SAVING',\n\t\tlockName,\n\t};\n}\n\n/**\n * Action that unlocks post saving.\n *\n * @param {string} lockName The lock name.\n *\n * @example\n * ```\n * // Unlock post saving with the lock key `mylock`:\n * wp.data.dispatch( 'core/editor' ).unlockPostSaving( 'mylock' );\n * ```\n *\n * @return {Object} Action object\n */\nexport function unlockPostSaving( lockName ) {\n\treturn {\n\t\ttype: 'UNLOCK_POST_SAVING',\n\t\tlockName,\n\t};\n}\n\n/**\n * Action that locks post autosaving.\n *\n * @param {string} lockName The lock name.\n *\n * @example\n * ```\n * // Lock post autosaving with the lock key `mylock`:\n * wp.data.dispatch( 'core/editor' ).lockPostAutosaving( 'mylock' );\n * ```\n *\n * @return {Object} Action object\n */\nexport function lockPostAutosaving( lockName ) {\n\treturn {\n\t\ttype: 'LOCK_POST_AUTOSAVING',\n\t\tlockName,\n\t};\n}\n\n/**\n * Action that unlocks post autosaving.\n *\n * @param {string} lockName The lock name.\n *\n * @example\n * ```\n * // Unlock post saving with the lock key `mylock`:\n * wp.data.dispatch( 'core/editor' ).unlockPostAutosaving( 'mylock' );\n * ```\n *\n * @return {Object} Action object\n */\nexport function unlockPostAutosaving( lockName ) {\n\treturn {\n\t\ttype: 'UNLOCK_POST_AUTOSAVING',\n\t\tlockName,\n\t};\n}\n\n/**\n * Returns an action object used to signal that the blocks have been updated.\n *\n * @param {Array} blocks Block Array.\n * @param {Object} [options] Optional options.\n */\nexport const resetEditorBlocks =\n\t( blocks, options = {} ) =>\n\t( { select, dispatch, registry } ) => {\n\t\tconst { __unstableShouldCreateUndoLevel, selection } = options;\n\t\tconst edits = { blocks, selection };\n\n\t\tif ( __unstableShouldCreateUndoLevel !== false ) {\n\t\t\tconst { id, type } = select.getCurrentPost();\n\t\t\tconst noChange =\n\t\t\t\tregistry\n\t\t\t\t\t.select( coreStore )\n\t\t\t\t\t.getEditedEntityRecord( 'postType', type, id ).blocks ===\n\t\t\t\tedits.blocks;\n\t\t\tif ( noChange ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t.__unstableCreateUndoLevel( 'postType', type, id );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// We create a new function here on every persistent edit\n\t\t\t// to make sure the edit makes the post dirty and creates\n\t\t\t// a new undo level.\n\t\t\tedits.content = ( { blocks: blocksForSerialization = [] } ) =>\n\t\t\t\t__unstableSerializeAndClean( blocksForSerialization );\n\t\t}\n\n\t\tdispatch.editPost( edits );\n\t};\n\n/*\n * Returns an action object used in signalling that the post editor settings have been updated.\n *\n * @param {Object} settings Updated settings\n *\n * @return {Object} Action object\n */\nexport function updateEditorSettings( settings ) {\n\treturn {\n\t\ttype: 'UPDATE_EDITOR_SETTINGS',\n\t\tsettings,\n\t};\n}\n\n/**\n * Returns an action used to set the rendering mode of the post editor. We support multiple rendering modes:\n *\n * - `post-only`: This mode extracts the post blocks from the template and renders only those. The idea is to allow the user to edit the post/page in isolation without the wrapping template.\n * - `template-locked`: This mode renders both the template and the post blocks but the template blocks are locked and can't be edited. The post blocks are editable.\n *\n * @param {string} mode Mode (one of 'post-only' or 'template-locked').\n */\nexport const setRenderingMode =\n\t( mode ) =>\n\t( { dispatch, registry, select } ) => {\n\t\tif (\n\t\t\tselect.__unstableIsEditorReady() &&\n\t\t\t! select.getEditorSettings().isPreviewMode\n\t\t) {\n\t\t\t// We clear the block selection but we also need to clear the selection from the core store.\n\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\n\t\t\tdispatch.editPost( { selection: undefined }, { undoIgnore: true } );\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'SET_RENDERING_MODE',\n\t\t\tmode,\n\t\t} );\n\t};\n\n/**\n * Action that changes the width of the editing canvas.\n *\n * @param {string} deviceType\n *\n * @return {Object} Action object.\n */\nexport function setDeviceType( deviceType ) {\n\treturn {\n\t\ttype: 'SET_DEVICE_TYPE',\n\t\tdeviceType,\n\t};\n}\n\n/**\n * Returns an action object used to enable or disable a panel in the editor.\n *\n * @param {string} panelName A string that identifies the panel to enable or disable.\n *\n * @return {Object} Action object.\n */\nexport const toggleEditorPanelEnabled =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tconst inactivePanels =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core', 'inactivePanels' ) ?? [];\n\n\t\tconst isPanelInactive = !! inactivePanels?.includes( panelName );\n\n\t\t// If the panel is inactive, remove it to enable it, else add it to\n\t\t// make it inactive.\n\t\tlet updatedInactivePanels;\n\t\tif ( isPanelInactive ) {\n\t\t\tupdatedInactivePanels = inactivePanels.filter(\n\t\t\t\t( invactivePanelName ) => invactivePanelName !== panelName\n\t\t\t);\n\t\t} else {\n\t\t\tupdatedInactivePanels = [ ...inactivePanels, panelName ];\n\t\t}\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'inactivePanels', updatedInactivePanels );\n\t};\n\n/**\n * Opens a closed panel and closes an open panel.\n *\n * @param {string} panelName A string that identifies the panel to open or close.\n */\nexport const toggleEditorPanelOpened =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tconst openPanels =\n\t\t\tregistry.select( preferencesStore ).get( 'core', 'openPanels' ) ??\n\t\t\t[];\n\n\t\tconst isPanelOpen = !! openPanels?.includes( panelName );\n\n\t\t// If the panel is open, remove it to close it, else add it to\n\t\t// make it open.\n\t\tlet updatedOpenPanels;\n\t\tif ( isPanelOpen ) {\n\t\t\tupdatedOpenPanels = openPanels.filter(\n\t\t\t\t( openPanelName ) => openPanelName !== panelName\n\t\t\t);\n\t\t} else {\n\t\t\tupdatedOpenPanels = [ ...openPanels, panelName ];\n\t\t}\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'openPanels', updatedOpenPanels );\n\t};\n\n/**\n * Returns an action object used to remove a panel from the editor.\n *\n * @param {string} panelName A string that identifies the panel to remove.\n *\n * @return {Object} Action object.\n */\nexport function removeEditorPanel( panelName ) {\n\treturn {\n\t\ttype: 'REMOVE_PANEL',\n\t\tpanelName,\n\t};\n}\n\n/**\n * Returns an action object used to open/close the inserter.\n *\n * @param {boolean|Object} value Whether the inserter should be\n * opened (true) or closed (false).\n * To specify an insertion point,\n * use an object.\n * @param {string} value.rootClientId The root client ID to insert at.\n * @param {number} value.insertionIndex The index to insert at.\n * @param {string} value.filterValue A query to filter the inserter results.\n * @param {Function} value.onSelect A callback when an item is selected.\n * @param {string} value.tab The tab to open in the inserter.\n * @param {string} value.category The category to initialize in the inserter.\n *\n * @return {Object} Action object.\n */\nexport const setIsInserterOpened =\n\t( value ) =>\n\t( { dispatch, registry } ) => {\n\t\tif (\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue.hasOwnProperty( 'rootClientId' ) &&\n\t\t\tvalue.hasOwnProperty( 'insertionIndex' )\n\t\t) {\n\t\t\tunlock( registry.dispatch( blockEditorStore ) ).setInsertionPoint( {\n\t\t\t\trootClientId: value.rootClientId,\n\t\t\t\tindex: value.insertionIndex,\n\t\t\t} );\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'SET_IS_INSERTER_OPENED',\n\t\t\tvalue,\n\t\t} );\n\t};\n\n/**\n * Returns an action object used to open/close the list view.\n *\n * @param {boolean} isOpen A boolean representing whether the list view should be opened or closed.\n * @return {Object} Action object.\n */\nexport function setIsListViewOpened( isOpen ) {\n\treturn {\n\t\ttype: 'SET_IS_LIST_VIEW_OPENED',\n\t\tisOpen,\n\t};\n}\n\n/**\n * Action that toggles Distraction free mode.\n * Distraction free mode expects there are no sidebars, as due to the\n * z-index values set, you can't close sidebars.\n *\n * @param {Object} [options={}] Optional configuration object\n * @param {boolean} [options.createNotice=true] Whether to create a notice\n */\nexport const toggleDistractionFree =\n\t( { createNotice = true } = {} ) =>\n\t( { dispatch, registry } ) => {\n\t\tconst isDistractionFree = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core', 'distractionFree' );\n\t\tif ( isDistractionFree ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set( 'core', 'fixedToolbar', false );\n\t\t}\n\t\tif ( ! isDistractionFree ) {\n\t\t\tregistry.batch( () => {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t.set( 'core', 'fixedToolbar', true );\n\t\t\t\tdispatch.setIsInserterOpened( false );\n\t\t\t\tdispatch.setIsListViewOpened( false );\n\t\t\t\tunlock(\n\t\t\t\t\tregistry.dispatch( blockEditorStore )\n\t\t\t\t).resetZoomLevel();\n\t\t\t} );\n\t\t}\n\t\tregistry.batch( () => {\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set( 'core', 'distractionFree', ! isDistractionFree );\n\n\t\t\tif ( createNotice ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createInfoNotice(\n\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t? __( 'Distraction free mode deactivated.' )\n\t\t\t\t\t\t\t: __( 'Distraction free mode activated.' ),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tid: 'core/editor/distraction-free-mode/notice',\n\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tregistry.batch( () => {\n\t\t\t\t\t\t\t\t\t\t\tregistry\n\t\t\t\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t\t\t\t.set(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'core',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'fixedToolbar',\n\t\t\t\t\t\t\t\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\tregistry\n\t\t\t\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t\t\t\t.toggle(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'core',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'distractionFree'\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t}\n\t\t} );\n\t};\n\n/**\n * Action that toggles the Spotlight Mode view option.\n */\nexport const toggleSpotlightMode =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( preferencesStore ).toggle( 'core', 'focusMode' );\n\n\t\tconst isFocusMode = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core', 'focusMode' );\n\n\t\tregistry\n\t\t\t.dispatch( noticesStore )\n\t\t\t.createInfoNotice(\n\t\t\t\tisFocusMode\n\t\t\t\t\t? __( 'Spotlight mode activated.' )\n\t\t\t\t\t: __( 'Spotlight mode deactivated.' ),\n\t\t\t\t{\n\t\t\t\t\tid: 'core/editor/toggle-spotlight-mode/notice',\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\tregistry\n\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t.toggle( 'core', 'focusMode' );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}\n\t\t\t);\n\t};\n\n/**\n * Action that toggles the Top Toolbar view option.\n */\nexport const toggleTopToolbar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( preferencesStore ).toggle( 'core', 'fixedToolbar' );\n\n\t\tconst isTopToolbar = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core', 'fixedToolbar' );\n\n\t\tregistry\n\t\t\t.dispatch( noticesStore )\n\t\t\t.createInfoNotice(\n\t\t\t\tisTopToolbar\n\t\t\t\t\t? __( 'Top toolbar activated.' )\n\t\t\t\t\t: __( 'Top toolbar deactivated.' ),\n\t\t\t\t{\n\t\t\t\t\tid: 'core/editor/toggle-top-toolbar/notice',\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\n\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\tregistry\n\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t.toggle( 'core', 'fixedToolbar' );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}\n\t\t\t);\n\t};\n\n/**\n * Triggers an action used to switch editor mode.\n *\n * @param {string} mode The editor mode.\n */\nexport const switchEditorMode =\n\t( mode ) =>\n\t( { dispatch, registry } ) => {\n\t\tregistry.dispatch( preferencesStore ).set( 'core', 'editorMode', mode );\n\n\t\tif ( mode !== 'visual' ) {\n\t\t\t// Unselect blocks when we switch to a non visual mode.\n\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\n\t\t\t// Exit zoom out state when switching to a non visual mode.\n\t\t\tunlock( registry.dispatch( blockEditorStore ) ).resetZoomLevel();\n\t\t}\n\n\t\tif ( mode === 'visual' ) {\n\t\t\tspeak( __( 'Visual editor selected' ), 'assertive' );\n\t\t} else if ( mode === 'text' ) {\n\t\t\tconst isDistractionFree = registry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core', 'distractionFree' );\n\t\t\tif ( isDistractionFree ) {\n\t\t\t\tdispatch.toggleDistractionFree();\n\t\t\t}\n\t\t\tspeak( __( 'Code editor selected' ), 'assertive' );\n\t\t}\n\t};\n\n/**\n * Returns an action object used in signalling that the user opened the publish\n * sidebar.\n *\n * @return {Object} Action object\n */\nexport function openPublishSidebar() {\n\treturn {\n\t\ttype: 'OPEN_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user closed the\n * publish sidebar.\n *\n * @return {Object} Action object.\n */\nexport function closePublishSidebar() {\n\treturn {\n\t\ttype: 'CLOSE_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user toggles the publish sidebar.\n *\n * @return {Object} Action object\n */\nexport function togglePublishSidebar() {\n\treturn {\n\t\ttype: 'TOGGLE_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Backward compatibility\n */\n\nconst getBlockEditorAction =\n\t( name ) =>\n\t( ...args ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"`wp.data.dispatch( 'core/editor' ).\" + name + '`', {\n\t\t\tsince: '5.3',\n\t\t\talternative:\n\t\t\t\t\"`wp.data.dispatch( 'core/block-editor' ).\" + name + '`',\n\t\t\tversion: '6.2',\n\t\t} );\n\t\tregistry.dispatch( blockEditorStore )[ name ]( ...args );\n\t};\n\n/**\n * @see resetBlocks in core/block-editor store.\n */\nexport const resetBlocks = getBlockEditorAction( 'resetBlocks' );\n\n/**\n * @see receiveBlocks in core/block-editor store.\n */\nexport const receiveBlocks = getBlockEditorAction( 'receiveBlocks' );\n\n/**\n * @see updateBlock in core/block-editor store.\n */\nexport const updateBlock = getBlockEditorAction( 'updateBlock' );\n\n/**\n * @see updateBlockAttributes in core/block-editor store.\n */\nexport const updateBlockAttributes = getBlockEditorAction(\n\t'updateBlockAttributes'\n);\n\n/**\n * @see selectBlock in core/block-editor store.\n */\nexport const selectBlock = getBlockEditorAction( 'selectBlock' );\n\n/**\n * @see startMultiSelect in core/block-editor store.\n */\nexport const startMultiSelect = getBlockEditorAction( 'startMultiSelect' );\n\n/**\n * @see stopMultiSelect in core/block-editor store.\n */\nexport const stopMultiSelect = getBlockEditorAction( 'stopMultiSelect' );\n\n/**\n * @see multiSelect in core/block-editor store.\n */\nexport const multiSelect = getBlockEditorAction( 'multiSelect' );\n\n/**\n * @see clearSelectedBlock in core/block-editor store.\n */\nexport const clearSelectedBlock = getBlockEditorAction( 'clearSelectedBlock' );\n\n/**\n * @see toggleSelection in core/block-editor store.\n */\nexport const toggleSelection = getBlockEditorAction( 'toggleSelection' );\n\n/**\n * @see replaceBlocks in core/block-editor store.\n */\nexport const replaceBlocks = getBlockEditorAction( 'replaceBlocks' );\n\n/**\n * @see replaceBlock in core/block-editor store.\n */\nexport const replaceBlock = getBlockEditorAction( 'replaceBlock' );\n\n/**\n * @see moveBlocksDown in core/block-editor store.\n */\nexport const moveBlocksDown = getBlockEditorAction( 'moveBlocksDown' );\n\n/**\n * @see moveBlocksUp in core/block-editor store.\n */\nexport const moveBlocksUp = getBlockEditorAction( 'moveBlocksUp' );\n\n/**\n * @see moveBlockToPosition in core/block-editor store.\n */\nexport const moveBlockToPosition = getBlockEditorAction(\n\t'moveBlockToPosition'\n);\n\n/**\n * @see insertBlock in core/block-editor store.\n */\nexport const insertBlock = getBlockEditorAction( 'insertBlock' );\n\n/**\n * @see insertBlocks in core/block-editor store.\n */\nexport const insertBlocks = getBlockEditorAction( 'insertBlocks' );\n\n/**\n * @see showInsertionPoint in core/block-editor store.\n */\nexport const showInsertionPoint = getBlockEditorAction( 'showInsertionPoint' );\n\n/**\n * @see hideInsertionPoint in core/block-editor store.\n */\nexport const hideInsertionPoint = getBlockEditorAction( 'hideInsertionPoint' );\n\n/**\n * @see setTemplateValidity in core/block-editor store.\n */\nexport const setTemplateValidity = getBlockEditorAction(\n\t'setTemplateValidity'\n);\n\n/**\n * @see synchronizeTemplate in core/block-editor store.\n */\nexport const synchronizeTemplate = getBlockEditorAction(\n\t'synchronizeTemplate'\n);\n\n/**\n * @see mergeBlocks in core/block-editor store.\n */\nexport const mergeBlocks = getBlockEditorAction( 'mergeBlocks' );\n\n/**\n * @see removeBlocks in core/block-editor store.\n */\nexport const removeBlocks = getBlockEditorAction( 'removeBlocks' );\n\n/**\n * @see removeBlock in core/block-editor store.\n */\nexport const removeBlock = getBlockEditorAction( 'removeBlock' );\n\n/**\n * @see toggleBlockMode in core/block-editor store.\n */\nexport const toggleBlockMode = getBlockEditorAction( 'toggleBlockMode' );\n\n/**\n * @see startTyping in core/block-editor store.\n */\nexport const startTyping = getBlockEditorAction( 'startTyping' );\n\n/**\n * @see stopTyping in core/block-editor store.\n */\nexport const stopTyping = getBlockEditorAction( 'stopTyping' );\n\n/**\n * @see enterFormattedText in core/block-editor store.\n */\nexport const enterFormattedText = getBlockEditorAction( 'enterFormattedText' );\n\n/**\n * @see exitFormattedText in core/block-editor store.\n */\nexport const exitFormattedText = getBlockEditorAction( 'exitFormattedText' );\n\n/**\n * @see insertDefaultBlock in core/block-editor store.\n */\nexport const insertDefaultBlock = getBlockEditorAction( 'insertDefaultBlock' );\n\n/**\n * @see updateBlockListSettings in core/block-editor store.\n */\nexport const updateBlockListSettings = getBlockEditorAction(\n\t'updateBlockListSettings'\n);\n", "/**\n * Function returning a sessionStorage key to set or retrieve a given post's\n * automatic session backup.\n *\n * Keys are crucially prefixed with 'wp-autosave-' so that wp-login.php's\n * `loggedout` handler can clear sessionStorage of any user-private content.\n *\n * @see https://github.com/WordPress/wordpress-develop/blob/6dad32d2aed47e6c0cf2aee8410645f6d7aba6bd/src/wp-login.php#L103\n *\n * @param {string} postId Post ID.\n * @param {boolean} isPostNew Whether post new.\n *\n * @return {string} sessionStorage key\n */\nfunction postKey( postId, isPostNew ) {\n\treturn `wp-autosave-block-editor-post-${\n\t\tisPostNew ? 'auto-draft' : postId\n\t}`;\n}\n\nexport function localAutosaveGet( postId, isPostNew ) {\n\treturn window.sessionStorage.getItem( postKey( postId, isPostNew ) );\n}\n\nexport function localAutosaveSet( postId, isPostNew, title, content, excerpt ) {\n\twindow.sessionStorage.setItem(\n\t\tpostKey( postId, isPostNew ),\n\t\tJSON.stringify( {\n\t\t\tpost_title: title,\n\t\t\tcontent,\n\t\t\texcerpt,\n\t\t} )\n\t);\n}\n\nexport function localAutosaveClear( postId, isPostNew ) {\n\twindow.sessionStorage.removeItem( postKey( postId, isPostNew ) );\n}\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Builds the arguments for a success notification dispatch.\n *\n * @param {Object} data Incoming data to build the arguments from.\n *\n * @return {Array} Arguments for dispatch. An empty array signals no\n * notification should be sent.\n */\nexport function getNotificationArgumentsForSaveSuccess( data ) {\n\tconst { previousPost, post, postType } = data;\n\t// Autosaves are neither shown a notice nor redirected.\n\tif ( data.options?.isAutosave ) {\n\t\treturn [];\n\t}\n\n\tconst publishStatus = [ 'publish', 'private', 'future' ];\n\tconst isPublished = publishStatus.includes( previousPost.status );\n\tconst willPublish = publishStatus.includes( post.status );\n\tconst willTrash =\n\t\tpost.status === 'trash' && previousPost.status !== 'trash';\n\n\tlet noticeMessage;\n\tlet shouldShowLink = postType?.viewable ?? false;\n\tlet isDraft;\n\n\t// Always should a notice, which will be spoken for accessibility.\n\tif ( willTrash ) {\n\t\tnoticeMessage = postType.labels.item_trashed;\n\t\tshouldShowLink = false;\n\t} else if ( ! isPublished && ! willPublish ) {\n\t\t// If saving a non-published post, don't show notice.\n\t\tnoticeMessage = __( 'Draft saved.' );\n\t\tisDraft = true;\n\t} else if ( isPublished && ! willPublish ) {\n\t\t// If undoing publish status, show specific notice.\n\t\tnoticeMessage = postType.labels.item_reverted_to_draft;\n\t\tshouldShowLink = false;\n\t} else if ( ! isPublished && willPublish ) {\n\t\t// If publishing or scheduling a post, show the corresponding\n\t\t// publish message.\n\t\tnoticeMessage = {\n\t\t\tpublish: postType.labels.item_published,\n\t\t\tprivate: postType.labels.item_published_privately,\n\t\t\tfuture: postType.labels.item_scheduled,\n\t\t}[ post.status ];\n\t} else {\n\t\t// Generic fallback notice.\n\t\tnoticeMessage = postType.labels.item_updated;\n\t}\n\n\tconst actions = [];\n\tif ( shouldShowLink ) {\n\t\tactions.push( {\n\t\t\tlabel: isDraft ? __( 'View Preview' ) : postType.labels.view_item,\n\t\t\turl: post.link,\n\t\t\topenInNewTab: true,\n\t\t} );\n\t}\n\treturn [\n\t\tnoticeMessage,\n\t\t{\n\t\t\tid: 'editor-save',\n\t\t\ttype: 'snackbar',\n\t\t\tactions,\n\t\t},\n\t];\n}\n\n/**\n * Builds the fail notification arguments for dispatch.\n *\n * @param {Object} data Incoming data to build the arguments with.\n *\n * @return {Array} Arguments for dispatch. An empty array signals no\n * notification should be sent.\n */\nexport function getNotificationArgumentsForSaveFail( data ) {\n\tconst { post, edits, error } = data;\n\tif ( error && 'rest_autosave_no_changes' === error.code ) {\n\t\t// Autosave requested a new autosave, but there were no changes. This shouldn't\n\t\t// result in an error notice for the user.\n\t\treturn [];\n\t}\n\n\tconst publishStatus = [ 'publish', 'private', 'future' ];\n\tconst isPublished = publishStatus.indexOf( post.status ) !== -1;\n\n\tif ( error.code === 'offline_error' ) {\n\t\tconst messages = {\n\t\t\tpublish: __(\n\t\t\t\t'Publishing failed because you were offline. Please verify your connection and try again.'\n\t\t\t),\n\t\t\tprivate: __(\n\t\t\t\t'Publishing failed because you were offline. Please verify your connection and try again.'\n\t\t\t),\n\t\t\tfuture: __(\n\t\t\t\t'Scheduling failed because you were offline. Please verify your connection and try again.'\n\t\t\t),\n\t\t\tdefault: __(\n\t\t\t\t'Updating failed because you were offline. Please verify your connection and try again.'\n\t\t\t),\n\t\t};\n\n\t\tconst noticeMessage =\n\t\t\t! isPublished && edits.status in messages\n\t\t\t\t? messages[ edits.status ]\n\t\t\t\t: messages.default;\n\n\t\treturn [ noticeMessage, { id: 'editor-save' } ];\n\t}\n\n\tconst messages = {\n\t\tpublish: __( 'Publishing failed.' ),\n\t\tprivate: __( 'Publishing failed.' ),\n\t\tfuture: __( 'Scheduling failed.' ),\n\t\tdefault: __( 'Updating failed.' ),\n\t};\n\n\tlet noticeMessage =\n\t\t! isPublished && edits.status in messages\n\t\t\t? messages[ edits.status ]\n\t\t\t: messages.default;\n\n\t// Check if message string contains HTML. Notice text is currently only\n\t// supported as plaintext, and stripping the tags may muddle the meaning.\n\tif ( error.message && ! /<\\/?[^>]*>/.test( error.message ) ) {\n\t\tnoticeMessage = [ noticeMessage, error.message ].join( ' ' );\n\t}\n\treturn [\n\t\tnoticeMessage,\n\t\t{\n\t\t\tid: 'editor-save',\n\t\t},\n\t];\n}\n\n/**\n * Builds the trash fail notification arguments for dispatch.\n *\n * @param {Object} data\n *\n * @return {Array} Arguments for dispatch.\n */\nexport function getNotificationArgumentsForTrashFail( data ) {\n\treturn [\n\t\tdata.error.message && data.error.code !== 'unknown_error'\n\t\t\t? data.error.message\n\t\t\t: __( 'Trashing failed' ),\n\t\t{\n\t\t\tid: 'editor-trash-fail',\n\t\t},\n\t];\n}\n", "/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { addQueryArgs } from '@wordpress/url';\nimport apiFetch from '@wordpress/api-fetch';\nimport { parse, __unstableSerializeAndClean } from '@wordpress/blocks';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport isTemplateRevertable from './utils/is-template-revertable';\nexport * from '../dataviews/store/private-actions';\n\n/**\n * Returns an action object used to set which template is currently being used/edited.\n *\n * @param {string} id Template Id.\n *\n * @return {Object} Action object.\n */\nexport function setCurrentTemplateId( id ) {\n\treturn {\n\t\ttype: 'SET_CURRENT_TEMPLATE_ID',\n\t\tid,\n\t};\n}\n\n/**\n * Create a block based template.\n *\n * @param {?Object} template Template to create and assign.\n */\nexport const createTemplate =\n\t( template ) =>\n\tasync ( { select, dispatch, registry } ) => {\n\t\tconst savedTemplate = await registry\n\t\t\t.dispatch( coreStore )\n\t\t\t.saveEntityRecord( 'postType', 'wp_template', template );\n\t\tregistry\n\t\t\t.dispatch( coreStore )\n\t\t\t.editEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tselect.getCurrentPostType(),\n\t\t\t\tselect.getCurrentPostId(),\n\t\t\t\t{\n\t\t\t\t\ttemplate: savedTemplate.slug,\n\t\t\t\t}\n\t\t\t);\n\t\tregistry\n\t\t\t.dispatch( noticesStore )\n\t\t\t.createSuccessNotice(\n\t\t\t\t__( \"Custom template created. You're in template mode now.\" ),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Go back' ),\n\t\t\t\t\t\t\tonClick: () =>\n\t\t\t\t\t\t\t\tdispatch.setRenderingMode(\n\t\t\t\t\t\t\t\t\tselect.getEditorSettings()\n\t\t\t\t\t\t\t\t\t\t.defaultRenderingMode\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}\n\t\t\t);\n\t\treturn savedTemplate;\n\t};\n\n/**\n * Update the provided block types to be visible.\n *\n * @param {string[]} blockNames Names of block types to show.\n */\nexport const showBlockTypes =\n\t( blockNames ) =>\n\t( { registry } ) => {\n\t\tconst existingBlockNames =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core', 'hiddenBlockTypes' ) ?? [];\n\n\t\tconst newBlockNames = existingBlockNames.filter(\n\t\t\t( type ) =>\n\t\t\t\t! (\n\t\t\t\t\tArray.isArray( blockNames ) ? blockNames : [ blockNames ]\n\t\t\t\t).includes( type )\n\t\t);\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'hiddenBlockTypes', newBlockNames );\n\t};\n\n/**\n * Update the provided block types to be hidden.\n *\n * @param {string[]} blockNames Names of block types to hide.\n */\nexport const hideBlockTypes =\n\t( blockNames ) =>\n\t( { registry } ) => {\n\t\tconst existingBlockNames =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core', 'hiddenBlockTypes' ) ?? [];\n\n\t\tconst mergedBlockNames = new Set( [\n\t\t\t...existingBlockNames,\n\t\t\t...( Array.isArray( blockNames ) ? blockNames : [ blockNames ] ),\n\t\t] );\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'hiddenBlockTypes', [ ...mergedBlockNames ] );\n\t};\n\n/**\n * Save entity records marked as dirty.\n *\n * @param {Object} options Options for the action.\n * @param {Function} [options.onSave] Callback when saving happens.\n * @param {object[]} [options.dirtyEntityRecords] Array of dirty entities.\n * @param {object[]} [options.entitiesToSkip] Array of entities to skip saving.\n * @param {Function} [options.close] Callback when the actions is called. It should be consolidated with `onSave`.\n */\nexport const saveDirtyEntities =\n\t( { onSave, dirtyEntityRecords = [], entitiesToSkip = [], close } = {} ) =>\n\t( { registry } ) => {\n\t\tconst PUBLISH_ON_SAVE_ENTITIES = [\n\t\t\t{ kind: 'postType', name: 'wp_navigation' },\n\t\t];\n\t\tconst saveNoticeId = 'site-editor-save-success';\n\t\tconst homeUrl = registry\n\t\t\t.select( coreStore )\n\t\t\t.getEntityRecord( 'root', '__unstableBase' )?.home;\n\t\tregistry.dispatch( noticesStore ).removeNotice( saveNoticeId );\n\t\tconst entitiesToSave = dirtyEntityRecords.filter(\n\t\t\t( { kind, name, key, property } ) => {\n\t\t\t\treturn ! entitiesToSkip.some(\n\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\telt.kind === kind &&\n\t\t\t\t\t\telt.name === name &&\n\t\t\t\t\t\telt.key === key &&\n\t\t\t\t\t\telt.property === property\n\t\t\t\t);\n\t\t\t}\n\t\t);\n\t\tclose?.( entitiesToSave );\n\t\tconst siteItemsToSave = [];\n\t\tconst pendingSavedRecords = [];\n\t\tentitiesToSave.forEach( ( { kind, name, key, property } ) => {\n\t\t\tif ( 'root' === kind && 'site' === name ) {\n\t\t\t\tsiteItemsToSave.push( property );\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tPUBLISH_ON_SAVE_ENTITIES.some(\n\t\t\t\t\t\t( typeToPublish ) =>\n\t\t\t\t\t\t\ttypeToPublish.kind === kind &&\n\t\t\t\t\t\t\ttypeToPublish.name === name\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t\t.editEntityRecord( kind, name, key, {\n\t\t\t\t\t\t\tstatus: 'publish',\n\t\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tpendingSavedRecords.push(\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t\t.saveEditedEntityRecord( kind, name, key )\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\t\tif ( siteItemsToSave.length ) {\n\t\t\tpendingSavedRecords.push(\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t.__experimentalSaveSpecifiedEntityEdits(\n\t\t\t\t\t\t'root',\n\t\t\t\t\t\t'site',\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\tsiteItemsToSave\n\t\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\tregistry\n\t\t\t.dispatch( blockEditorStore )\n\t\t\t.__unstableMarkLastChangeAsPersistent();\n\t\tPromise.all( pendingSavedRecords )\n\t\t\t.then( ( values ) => {\n\t\t\t\treturn onSave ? onSave( values ) : values;\n\t\t\t} )\n\t\t\t.then( ( values ) => {\n\t\t\t\tif (\n\t\t\t\t\tvalues.some( ( value ) => typeof value === 'undefined' )\n\t\t\t\t) {\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t\t.createErrorNotice( __( 'Saving failed.' ) );\n\t\t\t\t} else {\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t\t.createSuccessNotice( __( 'Site updated.' ), {\n\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\tid: saveNoticeId,\n\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: __( 'View site' ),\n\t\t\t\t\t\t\t\t\turl: homeUrl,\n\t\t\t\t\t\t\t\t\topenInNewTab: true,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.catch( ( error ) =>\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createErrorNotice(\n\t\t\t\t\t\t`${ __( 'Saving failed.' ) } ${ error }`\n\t\t\t\t\t)\n\t\t\t);\n\t};\n\n/**\n * Reverts a template to its original theme-provided file.\n *\n * @param {Object} template The template to revert.\n * @param {Object} [options]\n * @param {boolean} [options.allowUndo] Whether to allow the user to undo\n * reverting the template. Default true.\n */\nexport const revertTemplate =\n\t( template, { allowUndo = true } = {} ) =>\n\tasync ( { registry } ) => {\n\t\tconst noticeId = 'edit-site-template-reverted';\n\t\tregistry.dispatch( noticesStore ).removeNotice( noticeId );\n\t\tif ( ! isTemplateRevertable( template ) ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice( __( 'This template is not revertable.' ), {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t} );\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tconst templateEntityConfig = registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getEntityConfig( 'postType', template.type );\n\n\t\t\tif ( ! templateEntityConfig ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createErrorNotice(\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'The editor has encountered an unexpected error. Please reload.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{ type: 'snackbar' }\n\t\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst fileTemplatePath = addQueryArgs(\n\t\t\t\t`${ templateEntityConfig.baseURL }/${ template.id }`,\n\t\t\t\t{ context: 'edit', source: template.origin }\n\t\t\t);\n\n\t\t\tconst fileTemplate = await apiFetch( { path: fileTemplatePath } );\n\t\t\tif ( ! fileTemplate ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createErrorNotice(\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'The editor has encountered an unexpected error. Please reload.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{ type: 'snackbar' }\n\t\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst serializeBlocks = ( {\n\t\t\t\tblocks: blocksForSerialization = [],\n\t\t\t} ) => __unstableSerializeAndClean( blocksForSerialization );\n\n\t\t\tconst edited = registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getEditedEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\ttemplate.type,\n\t\t\t\t\ttemplate.id\n\t\t\t\t);\n\n\t\t\t// We are fixing up the undo level here to make sure we can undo\n\t\t\t// the revert in the header toolbar correctly.\n\t\t\tregistry.dispatch( coreStore ).editEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\ttemplate.type,\n\t\t\t\ttemplate.id,\n\t\t\t\t{\n\t\t\t\t\tcontent: serializeBlocks, // Required to make the `undo` behave correctly.\n\t\t\t\t\tblocks: edited.blocks, // Required to revert the blocks in the editor.\n\t\t\t\t\tsource: 'custom', // required to avoid turning the editor into a dirty state\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tundoIgnore: true, // Required to merge this edit with the last undo level.\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tconst blocks = parse( fileTemplate?.content?.raw );\n\t\t\tregistry\n\t\t\t\t.dispatch( coreStore )\n\t\t\t\t.editEntityRecord( 'postType', template.type, fileTemplate.id, {\n\t\t\t\t\tcontent: serializeBlocks,\n\t\t\t\t\tblocks,\n\t\t\t\t\tsource: 'theme',\n\t\t\t\t} );\n\n\t\t\tif ( allowUndo ) {\n\t\t\t\tconst undoRevert = () => {\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t\t.editEntityRecord(\n\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\ttemplate.type,\n\t\t\t\t\t\t\tedited.id,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcontent: serializeBlocks,\n\t\t\t\t\t\t\t\tblocks: edited.blocks,\n\t\t\t\t\t\t\t\tsource: 'custom',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t};\n\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createSuccessNotice( __( 'Template reset.' ), {\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\tid: noticeId,\n\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\t\tonClick: undoRevert,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t} );\n\t\t\t}\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __( 'Template revert failed. Please reload.' );\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t}\n\t};\n\n/**\n * Action that removes an array of templates, template parts or patterns.\n *\n * @param {Array} items An array of template,template part or pattern objects to remove.\n */\nexport const removeTemplates =\n\t( items ) =>\n\tasync ( { registry } ) => {\n\t\tconst isResetting = items.every( ( item ) => item?.has_theme_file );\n\n\t\tconst promiseResult = await Promise.allSettled(\n\t\t\titems.map( ( item ) => {\n\t\t\t\treturn registry\n\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t.deleteEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\titem.type,\n\t\t\t\t\t\titem.id,\n\t\t\t\t\t\t{ force: true },\n\t\t\t\t\t\t{ throwOnError: true }\n\t\t\t\t\t);\n\t\t\t} )\n\t\t);\n\n\t\t// If all the promises were fulfilled with success.\n\t\tif ( promiseResult.every( ( { status } ) => status === 'fulfilled' ) ) {\n\t\t\tlet successMessage;\n\n\t\t\tif ( items.length === 1 ) {\n\t\t\t\t// Depending on how the entity was retrieved its title might be\n\t\t\t\t// an object or simple string.\n\t\t\t\tlet title;\n\t\t\t\tif ( typeof items[ 0 ].title === 'string' ) {\n\t\t\t\t\ttitle = items[ 0 ].title;\n\t\t\t\t} else if ( typeof items[ 0 ].title?.rendered === 'string' ) {\n\t\t\t\t\ttitle = items[ 0 ].title?.rendered;\n\t\t\t\t} else if ( typeof items[ 0 ].title?.raw === 'string' ) {\n\t\t\t\t\ttitle = items[ 0 ].title?.raw;\n\t\t\t\t}\n\t\t\t\tsuccessMessage = isResetting\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t/* translators: %s: The template/part's name. */\n\t\t\t\t\t\t\t__( '\"%s\" reset.' ),\n\t\t\t\t\t\t\tdecodeEntities( title )\n\t\t\t\t\t )\n\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t/* translators: %s: The template/part's name. */\n\t\t\t\t\t\t\t_x( '\"%s\" deleted.', 'template part' ),\n\t\t\t\t\t\t\tdecodeEntities( title )\n\t\t\t\t\t );\n\t\t\t} else {\n\t\t\t\tsuccessMessage = isResetting\n\t\t\t\t\t? __( 'Items reset.' )\n\t\t\t\t\t: __( 'Items deleted.' );\n\t\t\t}\n\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createSuccessNotice( successMessage, {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tid: 'editor-template-deleted-success',\n\t\t\t\t} );\n\t\t} else {\n\t\t\t// If there was at lease one failure.\n\t\t\tlet errorMessage;\n\t\t\t// If we were trying to delete a single template.\n\t\t\tif ( promiseResult.length === 1 ) {\n\t\t\t\tif ( promiseResult[ 0 ].reason?.message ) {\n\t\t\t\t\terrorMessage = promiseResult[ 0 ].reason.message;\n\t\t\t\t} else {\n\t\t\t\t\terrorMessage = isResetting\n\t\t\t\t\t\t? __( 'An error occurred while reverting the item.' )\n\t\t\t\t\t\t: __( 'An error occurred while deleting the item.' );\n\t\t\t\t}\n\t\t\t\t// If we were trying to delete a multiple templates\n\t\t\t} else {\n\t\t\t\tconst errorMessages = new Set();\n\t\t\t\tconst failedPromises = promiseResult.filter(\n\t\t\t\t\t( { status } ) => status === 'rejected'\n\t\t\t\t);\n\t\t\t\tfor ( const failedPromise of failedPromises ) {\n\t\t\t\t\tif ( failedPromise.reason?.message ) {\n\t\t\t\t\t\terrorMessages.add( failedPromise.reason.message );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( errorMessages.size === 0 ) {\n\t\t\t\t\terrorMessage = __(\n\t\t\t\t\t\t'An error occurred while deleting the items.'\n\t\t\t\t\t);\n\t\t\t\t} else if ( errorMessages.size === 1 ) {\n\t\t\t\t\terrorMessage = isResetting\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: an error message */\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'An error occurred while reverting the items: %s'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t[ ...errorMessages ][ 0 ]\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: an error message */\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'An error occurred while deleting the items: %s'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t[ ...errorMessages ][ 0 ]\n\t\t\t\t\t\t );\n\t\t\t\t} else {\n\t\t\t\t\terrorMessage = isResetting\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: a list of comma separated error messages */\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'Some errors occurred while reverting the items: %s'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t[ ...errorMessages ].join( ',' )\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: a list of comma separated error messages */\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'Some errors occurred while deleting the items: %s'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t[ ...errorMessages ].join( ',' )\n\t\t\t\t\t\t );\n\t\t\t\t}\n\t\t\t}\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t}\n\t};\n\n/**\n * Set the default rendering mode preference for the current post type.\n *\n * @param {string} mode The rendering mode to set as default.\n */\nexport const setDefaultRenderingMode =\n\t( mode ) =>\n\t( { select, registry } ) => {\n\t\tconst postType = select.getCurrentPostType();\n\t\tconst theme = registry\n\t\t\t.select( coreStore )\n\t\t\t.getCurrentTheme()?.stylesheet;\n\t\tconst renderingModes =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core', 'renderingModes' )?.[ theme ] ?? {};\n\n\t\tif ( renderingModes[ postType ] === mode ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst newModes = {\n\t\t\t[ theme ]: {\n\t\t\t\t...renderingModes,\n\t\t\t\t[ postType ]: mode,\n\t\t\t},\n\t\t};\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'renderingModes', newModes );\n\t};\n\n/**\n * Set the current global styles navigation path.\n *\n * @param {string} path The navigation path.\n * @return {Object} Action object.\n */\nexport function setStylesPath( path ) {\n\treturn {\n\t\ttype: 'SET_STYLES_PATH',\n\t\tpath,\n\t};\n}\n\n/**\n * Set whether the stylebook is visible.\n *\n * @param {boolean} show Whether to show the stylebook.\n * @return {Object} Action object.\n */\nexport function setShowStylebook( show ) {\n\treturn {\n\t\ttype: 'SET_SHOW_STYLEBOOK',\n\t\tshow,\n\t};\n}\n\n/**\n * Reset the global styles navigation to initial state.\n *\n * @return {Object} Action object.\n */\nexport function resetStylesNavigation() {\n\treturn {\n\t\ttype: 'RESET_STYLES_NAVIGATION',\n\t};\n}\n\n/**\n * Set the minimum height of the canvas.\n *\n * @param {number} minHeight\n * @return {Object} Action object.\n */\nexport function setCanvasMinHeight( minHeight ) {\n\treturn {\n\t\ttype: 'SET_CANVAS_MIN_HEIGHT',\n\t\tminHeight,\n\t};\n}\n", "/**\n * Internal dependencies\n */\nimport { TEMPLATE_ORIGINS } from '../constants';\n\n// Copy of the function from packages/edit-site/src/utils/is-template-revertable.js\n\n/**\n * Check if a template or template part is revertable to its original theme-provided file.\n *\n * @param {Object} templateOrTemplatePart The entity to check.\n * @return {boolean} Whether the entity is revertable.\n */\nexport default function isTemplateRevertable( templateOrTemplatePart ) {\n\tif ( ! templateOrTemplatePart ) {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\ttemplateOrTemplatePart.source === TEMPLATE_ORIGINS.custom &&\n\t\t( Boolean( templateOrTemplatePart?.plugin ) ||\n\t\t\ttemplateOrTemplatePart?.has_theme_file )\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport type { Action, Field } from '@wordpress/dataviews';\nimport { doAction } from '@wordpress/hooks';\nimport type { PostType } from '@wordpress/fields';\nimport {\n\tviewPost,\n\tviewPostRevisions,\n\tduplicatePost,\n\tduplicatePattern,\n\treorderPage,\n\texportPattern,\n\tpermanentlyDeletePost,\n\trestorePost,\n\ttrashPost,\n\trenamePost,\n\tresetPost,\n\tdeletePost,\n\tduplicateTemplatePart,\n\tfeaturedImageField,\n\tdateField,\n\tparentField,\n\tpasswordField,\n\tcommentStatusField,\n\tpingStatusField,\n\tdiscussionField,\n\tslugField,\n\tstatusField,\n\tauthorField,\n\ttitleField,\n\ttemplateField,\n\ttemplateTitleField,\n\tpageTitleField,\n\tpatternTitleField,\n\tnotesField,\n} from '@wordpress/fields';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { DESIGN_POST_TYPES } from '../../store/constants';\nimport postPreviewField from '../fields/content-preview';\nimport { unlock } from '../../lock-unlock';\n\ndeclare global {\n\tinterface Window {\n\t\t__experimentalTemplateActivate?: boolean;\n\t}\n}\n\n/**\n * Check if a post type supports editor notes.\n *\n * @param supports The post type supports object.\n * @return Whether editor notes are supported.\n */\nfunction hasEditorNotesSupport( supports?: PostType[ 'supports' ] ): boolean {\n\tconst editor = supports?.editor;\n\tif ( Array.isArray( editor ) ) {\n\t\treturn !! editor[ 0 ]?.notes;\n\t}\n\treturn false;\n}\n\nexport function registerEntityAction< Item >(\n\tkind: string,\n\tname: string,\n\tconfig: Action< Item >\n) {\n\treturn {\n\t\ttype: 'REGISTER_ENTITY_ACTION' as const,\n\t\tkind,\n\t\tname,\n\t\tconfig,\n\t};\n}\n\nexport function unregisterEntityAction(\n\tkind: string,\n\tname: string,\n\tactionId: string\n) {\n\treturn {\n\t\ttype: 'UNREGISTER_ENTITY_ACTION' as const,\n\t\tkind,\n\t\tname,\n\t\tactionId,\n\t};\n}\n\nexport function registerEntityField< Item >(\n\tkind: string,\n\tname: string,\n\tconfig: Field< Item >\n) {\n\treturn {\n\t\ttype: 'REGISTER_ENTITY_FIELD' as const,\n\t\tkind,\n\t\tname,\n\t\tconfig,\n\t};\n}\n\nexport function unregisterEntityField(\n\tkind: string,\n\tname: string,\n\tfieldId: string\n) {\n\treturn {\n\t\ttype: 'UNREGISTER_ENTITY_FIELD' as const,\n\t\tkind,\n\t\tname,\n\t\tfieldId,\n\t};\n}\n\nexport function setIsReady( kind: string, name: string ) {\n\treturn {\n\t\ttype: 'SET_IS_READY' as const,\n\t\tkind,\n\t\tname,\n\t};\n}\n\nexport const registerPostTypeSchema =\n\t( postType: string ) =>\n\tasync ( { registry }: { registry: any } ) => {\n\t\tconst isReady = unlock( registry.select( editorStore ) ).isEntityReady(\n\t\t\t'postType',\n\t\t\tpostType\n\t\t);\n\t\tif ( isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\tunlock( registry.dispatch( editorStore ) ).setIsReady(\n\t\t\t'postType',\n\t\t\tpostType\n\t\t);\n\n\t\tconst postTypeConfig = ( await registry\n\t\t\t.resolveSelect( coreStore )\n\t\t\t.getPostType( postType ) ) as PostType;\n\n\t\tconst canCreate = await registry\n\t\t\t.resolveSelect( coreStore )\n\t\t\t.canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: postType,\n\t\t\t} );\n\t\tconst currentTheme = await registry\n\t\t\t.resolveSelect( coreStore )\n\t\t\t.getCurrentTheme();\n\n\t\tlet canDuplicate =\n\t\t\t! [ 'wp_block', 'wp_template_part' ].includes(\n\t\t\t\tpostTypeConfig.slug\n\t\t\t) &&\n\t\t\tcanCreate &&\n\t\t\tduplicatePost;\n\n\t\t// @ts-ignore\n\t\tif ( ! globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t\t// Outside Gutenberg, disable duplication except for wp_template.\n\t\t\tif ( 'wp_template' !== postTypeConfig.slug ) {\n\t\t\t\tcanDuplicate = undefined;\n\t\t\t}\n\t\t}\n\n\t\t// When template activation experiment is disabled, templates cannot be duplicated.\n\t\t// @ts-ignore\n\t\tif (\n\t\t\tpostTypeConfig.slug === 'wp_template' &&\n\t\t\t! window?.__experimentalTemplateActivate\n\t\t) {\n\t\t\tcanDuplicate = undefined;\n\t\t}\n\n\t\tconst actions = [\n\t\t\tpostTypeConfig.viewable ? viewPost : undefined,\n\t\t\t!! postTypeConfig.supports?.revisions\n\t\t\t\t? viewPostRevisions\n\t\t\t\t: undefined,\n\t\t\t// @ts-ignore\n\t\t\tcanDuplicate,\n\t\t\tpostTypeConfig.slug === 'wp_template_part' &&\n\t\t\tcanCreate &&\n\t\t\tcurrentTheme?.is_block_theme\n\t\t\t\t? duplicateTemplatePart\n\t\t\t\t: undefined,\n\t\t\tcanCreate && postTypeConfig.slug === 'wp_block'\n\t\t\t\t? duplicatePattern\n\t\t\t\t: undefined,\n\t\t\tpostTypeConfig.supports?.title ? renamePost : undefined,\n\t\t\tpostTypeConfig.supports?.[ 'page-attributes' ]\n\t\t\t\t? reorderPage\n\t\t\t\t: undefined,\n\t\t\tpostTypeConfig.slug === 'wp_block' ? exportPattern : undefined,\n\t\t\trestorePost,\n\t\t\tresetPost,\n\t\t\tdeletePost,\n\t\t\ttrashPost,\n\t\t\tpermanentlyDeletePost,\n\t\t].filter( Boolean );\n\n\t\tconst fields = [\n\t\t\tpostTypeConfig.supports?.thumbnail &&\n\t\t\t\tcurrentTheme?.theme_supports?.[ 'post-thumbnails' ] &&\n\t\t\t\tfeaturedImageField,\n\t\t\tpostTypeConfig.supports?.author && authorField,\n\t\t\tstatusField,\n\t\t\t! DESIGN_POST_TYPES.includes( postTypeConfig.slug ) && dateField,\n\t\t\tslugField,\n\t\t\tpostTypeConfig.supports?.[ 'page-attributes' ] && parentField,\n\t\t\tpostTypeConfig.supports?.comments && commentStatusField,\n\t\t\tpostTypeConfig.supports?.trackbacks && pingStatusField,\n\t\t\t( postTypeConfig.supports?.comments ||\n\t\t\t\tpostTypeConfig.supports?.trackbacks ) &&\n\t\t\t\tdiscussionField,\n\t\t\ttemplateField,\n\t\t\tpasswordField,\n\t\t\tpostTypeConfig.supports?.editor &&\n\t\t\t\tpostTypeConfig.viewable &&\n\t\t\t\tpostPreviewField,\n\t\t\thasEditorNotesSupport( postTypeConfig.supports ) && notesField,\n\t\t].filter( Boolean );\n\t\tif ( postTypeConfig.supports?.title ) {\n\t\t\tlet _titleField;\n\t\t\tif ( postType === 'page' ) {\n\t\t\t\t_titleField = pageTitleField;\n\t\t\t} else if ( postType === 'wp_template' ) {\n\t\t\t\t_titleField = templateTitleField;\n\t\t\t} else if ( postType === 'wp_block' ) {\n\t\t\t\t_titleField = patternTitleField;\n\t\t\t} else {\n\t\t\t\t_titleField = titleField;\n\t\t\t}\n\t\t\tfields.push( _titleField );\n\t\t}\n\n\t\tregistry.batch( () => {\n\t\t\tactions.forEach( ( action ) => {\n\t\t\t\tunlock( registry.dispatch( editorStore ) ).registerEntityAction(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\taction\n\t\t\t\t);\n\t\t\t} );\n\t\t\tfields.forEach( ( field ) => {\n\t\t\t\tunlock( registry.dispatch( editorStore ) ).registerEntityField(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tfield\n\t\t\t\t);\n\t\t\t} );\n\t\t} );\n\n\t\tdoAction( 'core.registerPostTypeSchema', postType );\n\t};\n", "/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport SlugEdit from './slug-edit';\nimport SlugView from './slug-view';\n\nconst slugField: Field< BasePost > = {\n\tid: 'slug',\n\ttype: 'text',\n\tlabel: __( 'Slug' ),\n\tEdit: SlugEdit,\n\trender: SlugView,\n\tfilterBy: false,\n};\n\n/**\n * Slug field for BasePost.\n */\nexport default slugField;\n", "/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tExternalLink,\n\t__experimentalInputControl as InputControl,\n\t__experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,\n\t__experimentalInputControlSuffixWrapper as InputControlSuffixWrapper,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { copySmall } from '@wordpress/icons';\nimport { useCopyToClipboard, useInstanceId } from '@wordpress/compose';\nimport { useDispatch } from '@wordpress/data';\nimport { useCallback, useEffect, useRef } from '@wordpress/element';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { safeDecodeURIComponent } from '@wordpress/url';\nimport type { DataFormControlProps } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport { getSlug } from './utils';\n\nconst SlugEdit = ( {\n\tfield,\n\tonChange,\n\tdata,\n}: DataFormControlProps< BasePost > ) => {\n\tconst { id } = field;\n\n\tconst slug = field.getValue( { item: data } ) || getSlug( data );\n\tconst permalinkTemplate = data.permalink_template || '';\n\tconst PERMALINK_POSTNAME_REGEX = /%(?:postname|pagename)%/;\n\tconst [ prefix, suffix ] = permalinkTemplate.split(\n\t\tPERMALINK_POSTNAME_REGEX\n\t);\n\tconst permalinkPrefix = prefix;\n\tconst permalinkSuffix = suffix;\n\tconst isEditable = PERMALINK_POSTNAME_REGEX.test( permalinkTemplate );\n\tconst originalSlugRef = useRef( slug );\n\tconst slugToDisplay = slug || originalSlugRef.current;\n\tconst permalink = isEditable\n\t\t? `${ permalinkPrefix }${ slugToDisplay }${ permalinkSuffix }`\n\t\t: safeDecodeURIComponent( data.link || '' );\n\n\tuseEffect( () => {\n\t\tif ( slug && originalSlugRef.current === undefined ) {\n\t\t\toriginalSlugRef.current = slug;\n\t\t}\n\t}, [ slug ] );\n\n\tconst onChangeControl = useCallback(\n\t\t( newValue?: string ) =>\n\t\t\tonChange( {\n\t\t\t\t[ id ]: newValue,\n\t\t\t} ),\n\t\t[ id, onChange ]\n\t);\n\n\tconst { createNotice } = useDispatch( noticesStore );\n\n\tconst copyButtonRef = useCopyToClipboard( permalink, () => {\n\t\tcreateNotice( 'info', __( 'Copied Permalink to clipboard.' ), {\n\t\t\tisDismissible: true,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t} );\n\n\tconst postUrlSlugDescriptionId =\n\t\t'editor-post-url__slug-description-' + useInstanceId( SlugEdit );\n\n\treturn (\n\t\t<fieldset className=\"fields-controls__slug\">\n\t\t\t{ isEditable && (\n\t\t\t\t<VStack>\n\t\t\t\t\t<VStack spacing=\"0px\">\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Customize the last part of the Permalink.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<ExternalLink href=\"https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink\">\n\t\t\t\t\t\t\t{ __( 'Learn more' ) }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t</VStack>\n\t\t\t\t\t<InputControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tprefix={\n\t\t\t\t\t\t\t<InputControlPrefixWrapper>\n\t\t\t\t\t\t\t\t/\n\t\t\t\t\t\t\t</InputControlPrefixWrapper>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsuffix={\n\t\t\t\t\t\t\t<InputControlSuffixWrapper variant=\"control\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\ticon={ copySmall }\n\t\t\t\t\t\t\t\t\tref={ copyButtonRef }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Copy' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</InputControlSuffixWrapper>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlabel={ __( 'Link' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\tvalue={ slug }\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\tspellCheck=\"false\"\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tclassName=\"fields-controls__slug-input\"\n\t\t\t\t\t\tonChange={ ( newValue?: string ) => {\n\t\t\t\t\t\t\tonChangeControl( newValue );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonBlur={ () => {\n\t\t\t\t\t\t\tif ( slug === '' ) {\n\t\t\t\t\t\t\t\tonChangeControl( originalSlugRef.current );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t\taria-describedby={ postUrlSlugDescriptionId }\n\t\t\t\t\t/>\n\t\t\t\t\t<div className=\"fields-controls__slug-help\">\n\t\t\t\t\t\t<span className=\"fields-controls__slug-help-visual-label\">\n\t\t\t\t\t\t\t{ __( 'Permalink:' ) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\tclassName=\"fields-controls__slug-help-link\"\n\t\t\t\t\t\t\thref={ permalink }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span className=\"fields-controls__slug-help-prefix\">\n\t\t\t\t\t\t\t\t{ permalinkPrefix }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span className=\"fields-controls__slug-help-slug\">\n\t\t\t\t\t\t\t\t{ slugToDisplay }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span className=\"fields-controls__slug-help-suffix\">\n\t\t\t\t\t\t\t\t{ permalinkSuffix }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t</div>\n\t\t\t\t</VStack>\n\t\t\t) }\n\t\t\t{ ! isEditable && (\n\t\t\t\t<ExternalLink\n\t\t\t\t\tclassName=\"fields-controls__slug-help\"\n\t\t\t\t\thref={ permalink }\n\t\t\t\t>\n\t\t\t\t\t{ permalink }\n\t\t\t\t</ExternalLink>\n\t\t\t) }\n\t\t</fieldset>\n\t);\n};\n\nexport default SlugEdit;\n", "/**\n * WordPress dependencies\n */\nimport { cleanForSlug } from '@wordpress/url';\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport { getItemTitle } from '../../actions/utils';\n\nexport const getSlug = ( item: BasePost ): string => {\n\tif ( typeof item !== 'object' ) {\n\t\treturn '';\n\t}\n\n\treturn (\n\t\titem.slug || cleanForSlug( getItemTitle( item ) ) || item.id.toString()\n\t);\n};\n", "/**\n * WordPress dependencies\n */\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { Post, TemplatePart, Template } from '../types';\n\nexport function isTemplate( post: Post ): post is Template {\n\treturn post.type === 'wp_template';\n}\n\nexport function isTemplatePart( post: Post ): post is TemplatePart {\n\treturn post.type === 'wp_template_part';\n}\n\nexport function isTemplateOrTemplatePart(\n\tp: Post\n): p is Template | TemplatePart {\n\treturn p.type === 'wp_template' || p.type === 'wp_template_part';\n}\n\nexport function getItemTitle(\n\titem: {\n\t\ttitle: string | { rendered: string } | { raw: string };\n\t},\n\tfallback: string = __( '(no title)' )\n) {\n\tlet title = '';\n\tif ( typeof item.title === 'string' ) {\n\t\ttitle = decodeEntities( item.title );\n\t} else if ( item.title && 'rendered' in item.title ) {\n\t\ttitle = decodeEntities( item.title.rendered );\n\t} else if ( item.title && 'raw' in item.title ) {\n\t\ttitle = decodeEntities( item.title.raw );\n\t}\n\treturn title || fallback;\n}\n\n/**\n * Check if a template is removable.\n *\n * @param template The template entity to check.\n * @return Whether the template is removable.\n */\nexport function isTemplateRemovable( template: Template | TemplatePart ) {\n\tif ( ! template ) {\n\t\treturn false;\n\t}\n\t// In patterns list page we map the templates parts to a different object\n\t// than the one returned from the endpoint. This is why we need to check for\n\t// two props whether is custom or has a theme file.\n\treturn (\n\t\t[ template.source, template.source ].includes( 'custom' ) &&\n\t\t! Boolean( template.type === 'wp_template' && template?.plugin ) &&\n\t\t! template.has_theme_file\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport { getSlug } from './utils';\n\nconst SlugView = ( { item }: { item: BasePost } ) => {\n\tconst slug = getSlug( item );\n\tconst originalSlugRef = useRef( slug );\n\n\tuseEffect( () => {\n\t\tif ( slug && originalSlugRef.current === undefined ) {\n\t\t\toriginalSlugRef.current = slug;\n\t\t}\n\t}, [ slug ] );\n\n\tconst slugToDisplay = slug || originalSlugRef.current;\n\n\treturn `${ slugToDisplay }`;\n};\n\nexport default SlugView;\n", "/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { CommonPost } from '../../types';\nimport { getItemTitle } from '../../actions/utils';\nimport TitleView from './view';\n\nconst titleField: Field< CommonPost > = {\n\ttype: 'text',\n\tid: 'title',\n\tlabel: __( 'Title' ),\n\tplaceholder: __( 'No title' ),\n\tgetValue: ( { item } ) => getItemTitle( item ),\n\trender: TitleView,\n\tenableHiding: true,\n\tenableGlobalSearch: true,\n\tfilterBy: false,\n};\n\n/**\n * Title for the any entity with a `title` property.\n * For patterns, pages or templates you should use the respective field\n * because there are some differences in the rendering, labels, etc.\n */\nexport default titleField;\n", "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}export 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}export default clsx;", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ReactNode } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { CommonPost } from '../../types';\nimport { getItemTitle } from '../../actions/utils';\n\nexport function BaseTitleView( {\n\titem,\n\tclassName,\n\tchildren,\n}: {\n\titem: CommonPost;\n\tclassName?: string;\n\tchildren?: ReactNode;\n} ) {\n\tconst renderedTitle = getItemTitle( item );\n\treturn (\n\t\t<HStack\n\t\t\tclassName={ clsx( 'fields-field__title', className ) }\n\t\t\talignment=\"center\"\n\t\t\tjustify=\"flex-start\"\n\t\t>\n\t\t\t<span>{ renderedTitle || __( '(no title)' ) }</span>\n\t\t\t{ children }\n\t\t</HStack>\n\t);\n}\n\nexport default function TitleView( { item }: { item: CommonPost } ) {\n\treturn <BaseTitleView item={ item } />;\n}\n", "/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport { getItemTitle } from '../../actions/utils';\nimport PageTitleView from './view';\n\nconst pageTitleField: Field< BasePost > = {\n\ttype: 'text',\n\tid: 'title',\n\tlabel: __( 'Title' ),\n\tplaceholder: __( 'No title' ),\n\tgetValue: ( { item } ) => getItemTitle( item ),\n\trender: PageTitleView,\n\tenableHiding: false,\n\tenableGlobalSearch: true,\n\tfilterBy: false,\n};\n\n/**\n * Title for the page entity.\n */\nexport default pageTitleField;\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport type { Settings } from '@wordpress/core-data';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport type { CommonPost } from '../../types';\nimport { BaseTitleView } from '../title/view';\nimport { unlock } from '../../lock-unlock';\nconst { Badge } = unlock( componentsPrivateApis );\n\nexport default function PageTitleView( { item }: { item: CommonPost } ) {\n\tconst { frontPageId, postsPageId } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord } = select( coreStore );\n\t\tconst siteSettings = getEntityRecord(\n\t\t\t'root',\n\t\t\t'site'\n\t\t) as Partial< Settings >;\n\t\treturn {\n\t\t\tfrontPageId: siteSettings?.page_on_front,\n\t\t\tpostsPageId: siteSettings?.page_for_posts,\n\t\t};\n\t}, [] );\n\treturn (\n\t\t<BaseTitleView item={ item } className=\"fields-field__page-title\">\n\t\t\t{ [ frontPageId, postsPageId ].includes( item.id as number ) && (\n\t\t\t\t<Badge>\n\t\t\t\t\t{ item.id === frontPageId\n\t\t\t\t\t\t? __( 'Homepage' )\n\t\t\t\t\t\t: __( 'Posts Page' ) }\n\t\t\t\t</Badge>\n\t\t\t) }\n\t\t</BaseTitleView>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',\n\t\t'@wordpress/fields'\n\t);\n", "/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { Template } from '../../types';\nimport { getItemTitle } from '../../actions/utils';\nimport TitleView from '../title/view';\n\nconst templateTitleField: Field< Template > = {\n\ttype: 'text',\n\tlabel: __( 'Template' ),\n\tplaceholder: __( 'No title' ),\n\tid: 'title',\n\tgetValue: ( { item } ) => getItemTitle( item ),\n\trender: TitleView,\n\tenableHiding: false,\n\tenableGlobalSearch: true,\n\tfilterBy: false,\n};\n\n/**\n * Title for the template entity.\n */\nexport default templateTitleField;\n", "/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { Pattern } from '../../types';\nimport { getItemTitle } from '../../actions/utils';\nimport PatternTitleView from './view';\n\nconst patternTitleField: Field< Pattern > = {\n\ttype: 'text',\n\tid: 'title',\n\tlabel: __( 'Title' ),\n\tplaceholder: __( 'No title' ),\n\tgetValue: ( { item } ) => getItemTitle( item ),\n\trender: PatternTitleView,\n\tenableHiding: false,\n\tenableGlobalSearch: true,\n\tfilterBy: false,\n};\n\n/**\n * Title for the pattern entity.\n */\nexport default patternTitleField;\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Icon, lockSmall } from '@wordpress/icons';\nimport { Tooltip } from '@wordpress/components';\n// @ts-ignore\nimport { privateApis as patternPrivateApis } from '@wordpress/patterns';\n\n/**\n * Internal dependencies\n */\nimport type { CommonPost } from '../../types';\nimport { BaseTitleView } from '../title/view';\nimport { unlock } from '../../lock-unlock';\n\nexport const { PATTERN_TYPES } = unlock( patternPrivateApis );\n\nexport default function PatternTitleView( { item }: { item: CommonPost } ) {\n\treturn (\n\t\t<BaseTitleView item={ item } className=\"fields-field__pattern-title\">\n\t\t\t{ item.type === PATTERN_TYPES.theme && (\n\t\t\t\t<Tooltip\n\t\t\t\t\tplacement=\"top\"\n\t\t\t\t\ttext={ __( 'This pattern cannot be edited.' ) }\n\t\t\t\t>\n\t\t\t\t\t<Icon icon={ lockSmall } size={ 24 } />\n\t\t\t\t</Tooltip>\n\t\t\t) }\n\t\t</BaseTitleView>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport MediaEdit from '../../components/media-edit';\nimport type { BasePostWithEmbeddedFeaturedMedia } from '../../types';\nimport { FeaturedImageView } from './featured-image-view';\n\nconst featuredImageField: Field< BasePostWithEmbeddedFeaturedMedia > = {\n\tid: 'featured_media',\n\ttype: 'media',\n\tlabel: __( 'Featured Image' ),\n\tEdit: MediaEdit,\n\trender: FeaturedImageView,\n\tsetValue: ( { value } ) => ( {\n\t\tfeatured_media: value ?? 0,\n\t} ),\n\tenableSorting: false,\n\tfilterBy: false,\n};\n\n/**\n * Featured Image field for BasePostWithEmbeddedFeaturedMedia.\n */\nexport default featuredImageField;\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tDropZone,\n\tIcon,\n\tSpinner,\n\t__experimentalText as Text,\n\t__experimentalTruncate as Truncate,\n\t__experimentalVStack as VStack,\n\tBaseControl,\n\tTooltip,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { isBlobURL, getBlobTypeByURL } from '@wordpress/blob';\nimport { store as coreStore, type Attachment } from '@wordpress/core-data';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useCallback, useMemo, useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { archive, audio, video, file, closeSmall } from '@wordpress/icons';\nimport {\n\tMediaUpload,\n\tuploadMedia,\n\tprivateApis as mediaUtilsPrivateApis,\n} from '@wordpress/media-utils';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport type { MediaEditProps } from '../../types';\n\nconst { MediaUploadModal } = unlock( mediaUtilsPrivateApis );\n\ntype BlobItem = {\n\tid: string;\n\tsource_url: string;\n\tmime_type: string | undefined;\n\talt_text?: string;\n};\n\n/**\n * Conditional Media component that uses MediaUploadModal when experiment is enabled,\n * otherwise falls back to media-utils MediaUpload.\n *\n * @param root0 Component props.\n * @param root0.render Render prop function that receives { open } object.\n * @param root0.multiple Whether to allow multiple media selections.\n * @return The component.\n */\nfunction ConditionalMediaUpload( { render, multiple, ...props }: any ) {\n\tconst [ isModalOpen, setIsModalOpen ] = useState( false );\n\tif ( ( window as any ).__experimentalDataViewsMediaModal ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ render && render( { open: () => setIsModalOpen( true ) } ) }\n\t\t\t\t{ isModalOpen && (\n\t\t\t\t\t<MediaUploadModal\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\tmultiple={ multiple }\n\t\t\t\t\t\tisOpen={ isModalOpen }\n\t\t\t\t\t\tonClose={ () => {\n\t\t\t\t\t\t\tsetIsModalOpen( false );\n\t\t\t\t\t\t\tprops.onClose?.();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonSelect={ ( media: any ) => {\n\t\t\t\t\t\t\tsetIsModalOpen( false );\n\t\t\t\t\t\t\tprops.onSelect?.( media );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t}\n\t// Fallback to media-utils MediaUpload when experiment is disabled.\n\treturn (\n\t\t<MediaUpload\n\t\t\t{ ...props }\n\t\t\trender={ render }\n\t\t\tmultiple={ multiple ? 'add' : undefined }\n\t\t/>\n\t);\n}\n\nfunction MediaPickerButton( {\n\topen,\n\tchildren,\n\tlabel,\n\tshowTooltip = false,\n\tonFilesDrop,\n\tattachment,\n\tisUploading = false,\n}: {\n\topen: () => void;\n\tchildren: React.ReactNode;\n\tlabel: string;\n\tshowTooltip?: boolean;\n\tonFilesDrop: MediaEditAttachmentsProps[ 'onFilesDrop' ];\n\tattachment?: MediaEditAttachment;\n\tisUploading?: boolean;\n} ) {\n\tconst isBlob = attachment && isBlobURL( attachment.source_url );\n\tconst mediaPickerButton = (\n\t\t<div\n\t\t\tclassName=\"fields__media-edit-picker-button\"\n\t\t\trole=\"button\"\n\t\t\ttabIndex={ 0 }\n\t\t\tonClick={ () => {\n\t\t\t\tif ( ! isUploading ) {\n\t\t\t\t\topen();\n\t\t\t\t}\n\t\t\t} }\n\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\tif ( isUploading ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( event.key === 'Enter' || event.key === ' ' ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\topen();\n\t\t\t\t}\n\t\t\t} }\n\t\t\taria-label={ label }\n\t\t\taria-disabled={ isUploading }\n\t\t>\n\t\t\t{ children }\n\t\t\t{ isBlob && (\n\t\t\t\t<span className=\"fields__media-edit-picker-button-spinner\">\n\t\t\t\t\t<Spinner />\n\t\t\t\t</span>\n\t\t\t) }\n\t\t\t{ ! isUploading && (\n\t\t\t\t<DropZone\n\t\t\t\t\tonFilesDrop={ ( files ) =>\n\t\t\t\t\t\tonFilesDrop( files, attachment?.id as number )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n\tif ( ! showTooltip ) {\n\t\treturn mediaPickerButton;\n\t}\n\treturn <Tooltip text={ label }>{ mediaPickerButton }</Tooltip>;\n}\n\nconst archiveMimeTypes = [\n\t'application/zip',\n\t'application/x-zip-compressed',\n\t'application/x-rar-compressed',\n\t'application/x-7z-compressed',\n\t'application/x-tar',\n\t'application/x-gzip',\n];\n\nfunction MediaTitle( { attachment }: { attachment: Attachment< 'view' > } ) {\n\treturn (\n\t\t<Truncate className=\"fields__media-edit-filename\">\n\t\t\t{ attachment.title.rendered }\n\t\t</Truncate>\n\t);\n}\n\nfunction MediaEditPlaceholder( props: {\n\topen: () => void;\n\tlabel: string;\n\tonFilesDrop: MediaEditAttachmentsProps[ 'onFilesDrop' ];\n\tisUploading: boolean;\n} ) {\n\treturn (\n\t\t<MediaPickerButton { ...props }>\n\t\t\t<span className=\"fields__media-edit-placeholder\">\n\t\t\t\t{ props.label }\n\t\t\t</span>\n\t\t</MediaPickerButton>\n\t);\n}\n\nfunction MediaPreview( { attachment }: { attachment: MediaEditAttachment } ) {\n\tconst url = attachment.source_url;\n\tconst mimeType = attachment.mime_type || '';\n\tif ( mimeType.startsWith( 'image' ) ) {\n\t\treturn (\n\t\t\t<img\n\t\t\t\tclassName=\"fields__media-edit-thumbnail\"\n\t\t\t\talt={ attachment.alt_text || '' }\n\t\t\t\tsrc={ url }\n\t\t\t/>\n\t\t);\n\t} else if ( mimeType.startsWith( 'audio' ) ) {\n\t\treturn <Icon icon={ audio } />;\n\t} else if ( mimeType.startsWith( 'video' ) ) {\n\t\treturn <Icon icon={ video } />;\n\t} else if ( archiveMimeTypes.includes( mimeType ) ) {\n\t\treturn <Icon icon={ archive } />;\n\t}\n\treturn <Icon icon={ file } />;\n}\n\ntype MediaEditAttachment = Attachment< 'view' > | BlobItem;\ninterface MediaEditAttachmentsProps {\n\tallItems: Array< MediaEditAttachment > | null;\n\taddButtonLabel: string;\n\tmultiple?: boolean;\n\tremoveItem: ( itemId: number ) => void;\n\topen: () => void;\n\tonFilesDrop: ( files: File[], attachmentId?: number ) => void;\n\tisUploading: boolean;\n}\n\nfunction ExpandedMediaEditAttachments( {\n\tallItems,\n\taddButtonLabel,\n\tmultiple,\n\tremoveItem,\n\topen,\n\tonFilesDrop,\n\tisUploading,\n}: MediaEditAttachmentsProps ) {\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx( 'fields__media-edit-expanded', {\n\t\t\t\t'is-multiple': multiple,\n\t\t\t\t'is-single': ! multiple,\n\t\t\t\t'is-empty': ! allItems?.length,\n\t\t\t} ) }\n\t\t>\n\t\t\t{ allItems?.map( ( attachment ) => {\n\t\t\t\tconst hasPreviewImage =\n\t\t\t\t\tattachment.mime_type?.startsWith( 'image' );\n\t\t\t\tconst isBlob = isBlobURL( attachment.source_url );\n\t\t\t\treturn (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={ attachment.id }\n\t\t\t\t\t\tclassName={ clsx( 'fields__media-edit-expanded-item', {\n\t\t\t\t\t\t\t'has-preview-image': hasPreviewImage,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<MediaPickerButton\n\t\t\t\t\t\t\topen={ open }\n\t\t\t\t\t\t\tlabel={ __( 'Replace' ) }\n\t\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\t\tonFilesDrop={ onFilesDrop }\n\t\t\t\t\t\t\tattachment={ attachment }\n\t\t\t\t\t\t\tisUploading={ isUploading }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"fields__media-edit-expanded-preview\">\n\t\t\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\t\t\t\talignment=\"center\"\n\t\t\t\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\t\t\t\tclassName=\"fields__media-edit-expanded-preview-stack\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ ( ! isBlob || hasPreviewImage ) && (\n\t\t\t\t\t\t\t\t\t\t<MediaPreview\n\t\t\t\t\t\t\t\t\t\t\tattachment={ attachment }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ ! isBlob &&\n\t\t\t\t\t\t\t\t\t\t( ! hasPreviewImage ? (\n\t\t\t\t\t\t\t\t\t\t\t<MediaTitle\n\t\t\t\t\t\t\t\t\t\t\t\tattachment={\n\t\t\t\t\t\t\t\t\t\t\t\t\tattachment as Attachment< 'view' >\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"fields__media-edit-expanded-overlay\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"fields__media-edit-expanded-title\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<MediaTitle\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tattachment={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tattachment as Attachment< 'view' >\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</MediaPickerButton>\n\t\t\t\t\t\t{ ! isBlob && (\n\t\t\t\t\t\t\t<div className=\"fields__media-edit-expanded-overlay\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\tclassName=\"fields__media-edit-expanded-remove\"\n\t\t\t\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Remove' ) }\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\tdisabled={ isUploading }\n\t\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\t\tonClick={ (\n\t\t\t\t\t\t\t\t\t\tevent: React.MouseEvent< HTMLButtonElement >\n\t\t\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\t\t\t\tremoveItem( attachment.id as number );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t\t{ ( multiple || ! allItems?.length ) && (\n\t\t\t\t<MediaEditPlaceholder\n\t\t\t\t\topen={ open }\n\t\t\t\t\tlabel={ addButtonLabel }\n\t\t\t\t\tonFilesDrop={ onFilesDrop }\n\t\t\t\t\tisUploading={ isUploading }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nfunction CompactMediaEditAttachments( {\n\tallItems,\n\taddButtonLabel,\n\tmultiple,\n\tremoveItem,\n\topen,\n\tonFilesDrop,\n\tisUploading,\n}: MediaEditAttachmentsProps ) {\n\treturn (\n\t\t<>\n\t\t\t{ !! allItems?.length && (\n\t\t\t\t<VStack spacing={ 2 }>\n\t\t\t\t\t{ allItems.map( ( attachment ) => {\n\t\t\t\t\t\tconst isBlob = isBlobURL( attachment.source_url );\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tkey={ attachment.id }\n\t\t\t\t\t\t\t\tclassName=\"fields__media-edit-compact\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<MediaPickerButton\n\t\t\t\t\t\t\t\t\topen={ open }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Replace' ) }\n\t\t\t\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\t\t\t\tonFilesDrop={ onFilesDrop }\n\t\t\t\t\t\t\t\t\tattachment={ attachment }\n\t\t\t\t\t\t\t\t\tisUploading={ isUploading }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<MediaPreview\n\t\t\t\t\t\t\t\t\t\t\tattachment={ attachment }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t{ ! isBlob && (\n\t\t\t\t\t\t\t\t\t\t\t<MediaTitle\n\t\t\t\t\t\t\t\t\t\t\t\tattachment={\n\t\t\t\t\t\t\t\t\t\t\t\t\tattachment as Attachment< 'view' >\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t</MediaPickerButton>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\tclassName=\"fields__media-edit-remove\"\n\t\t\t\t\t\t\t\t\ttext={ __( 'Remove' ) }\n\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\tdisabled={ isUploading }\n\t\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\t\tonClick={ (\n\t\t\t\t\t\t\t\t\t\tevent: React.MouseEvent< HTMLButtonElement >\n\t\t\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\ttypeof attachment.id === 'number'\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\tremoveItem( attachment.id );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t} ) }\n\t\t\t\t</VStack>\n\t\t\t) }\n\t\t\t{ ( multiple || ! allItems?.length ) && (\n\t\t\t\t<MediaEditPlaceholder\n\t\t\t\t\topen={ open }\n\t\t\t\t\tlabel={ addButtonLabel }\n\t\t\t\t\tonFilesDrop={ onFilesDrop }\n\t\t\t\t\tisUploading={ isUploading }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\n/**\n * A media edit control component that provides a media picker UI with upload functionality\n * for selecting WordPress media attachments. Supports both the traditional WordPress media\n * library and the experimental DataViews media modal.\n *\n * This component is intended to be used as the `Edit` property of a field definition when\n * registering fields with `registerEntityField` from `@wordpress/editor`.\n *\n * @template Item - The type of the item being edited.\n *\n * @param {MediaEditProps<Item>} props - The component props.\n * @param {Item} props.data - The item being edited.\n * @param {Object} props.field - The field configuration with getValue and setValue methods.\n * @param {Function} props.onChange - Callback function when the media selection changes.\n * @param {string[]} [props.allowedTypes] - Array of allowed media types. Default `['image']`.\n * @param {boolean} [props.multiple] - Whether to allow multiple media selections. Default `false`.\n * @param {boolean} [props.hideLabelFromVision] - Whether the label should be hidden from vision.\n * @param {boolean} [props.isExpanded] - Whether to render in an expanded form. Default `false`.\n *\n * @return {JSX.Element} The media edit control component.\n *\n * @example\n * ```tsx\n * import { MediaEdit } from '@wordpress/fields';\n * import type { DataFormControlProps } from '@wordpress/dataviews';\n *\n * const featuredImageField = {\n * id: 'featured_media',\n * type: 'media',\n * label: 'Featured Image',\n * Edit: (props: DataFormControlProps<MyPostType>) => (\n * <MediaEdit\n * {...props}\n * allowedTypes={['image']}\n * />\n * ),\n * };\n * ```\n */\nexport default function MediaEdit< Item >( {\n\tdata,\n\tfield,\n\tonChange,\n\thideLabelFromVision,\n\tallowedTypes = [ 'image' ],\n\tmultiple,\n\tisExpanded,\n}: MediaEditProps< Item > ) {\n\tconst value = field.getValue( { item: data } );\n\tconst attachments = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! value ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tconst normalizedValue = Array.isArray( value ) ? value : [ value ];\n\t\t\tconst { getEntityRecords } = select( coreStore );\n\t\t\treturn getEntityRecords( 'postType', 'attachment', {\n\t\t\t\tinclude: normalizedValue,\n\t\t\t} ) as Attachment< 'view' >[] | null;\n\t\t},\n\t\t[ value ]\n\t);\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\t// Support one upload action at a time for now.\n\tconst [ replacementId, setReplacementId ] = useState< number >();\n\tconst [ blobs, setBlobs ] = useState< string[] >( [] );\n\tconst onChangeControl = useCallback(\n\t\t( newValue: number | number[] | undefined ) =>\n\t\t\tonChange( field.setValue( { item: data, value: newValue } ) ),\n\t\t[ data, field, onChange ]\n\t);\n\tconst removeItem = ( itemId: number ) => {\n\t\tconst currentIds = Array.isArray( value ) ? value : [ value ];\n\t\tconst newIds = currentIds.filter( ( id ) => id !== itemId );\n\t\tonChangeControl( newIds.length ? newIds : undefined );\n\t};\n\tconst onFilesDrop = useCallback(\n\t\t( files: File[], _replacementId?: number ) => {\n\t\t\tuploadMedia( {\n\t\t\t\tallowedTypes: allowedTypes?.length ? allowedTypes : undefined,\n\t\t\t\tfilesList: files,\n\t\t\t\tonFileChange( uploadedMedia: any[] ) {\n\t\t\t\t\tsetReplacementId( _replacementId );\n\t\t\t\t\tconst { blobItems, uploadedItems } = uploadedMedia.reduce(\n\t\t\t\t\t\t( accumulator, item ) => {\n\t\t\t\t\t\t\tif ( isBlobURL( item.url ) ) {\n\t\t\t\t\t\t\t\taccumulator.blobItems.push( item.url );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\taccumulator.uploadedItems.push( item.id );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn accumulator;\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tblobItems: [] as string[],\n\t\t\t\t\t\t\tuploadedItems: [] as number[],\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tsetBlobs( blobItems );\n\t\t\t\t\t// If all uploads are complete reset the replacementId.\n\t\t\t\t\tif ( uploadedItems.length === uploadedMedia.length ) {\n\t\t\t\t\t\tsetReplacementId( undefined );\n\t\t\t\t\t}\n\t\t\t\t\tif ( ! uploadedItems.length ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif ( ! multiple ) {\n\t\t\t\t\t\tonChangeControl( uploadedItems[ 0 ] );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif ( ! value ) {\n\t\t\t\t\t\tonChangeControl( uploadedItems );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst normalizedValue = Array.isArray( value )\n\t\t\t\t\t\t? value\n\t\t\t\t\t\t: [ value ];\n\t\t\t\t\tconst newIds = [\n\t\t\t\t\t\t...( _replacementId\n\t\t\t\t\t\t\t? normalizedValue.filter(\n\t\t\t\t\t\t\t\t\t( id: any ) => id !== _replacementId\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: normalizedValue ),\n\t\t\t\t\t\t...uploadedItems,\n\t\t\t\t\t];\n\t\t\t\t\tonChangeControl( newIds );\n\t\t\t\t},\n\t\t\t\tonError( error: Error ) {\n\t\t\t\t\tsetReplacementId( undefined );\n\t\t\t\t\tsetBlobs( [] );\n\t\t\t\t\tcreateErrorNotice( error.message, { type: 'snackbar' } );\n\t\t\t\t},\n\t\t\t\tmultiple: !! multiple,\n\t\t\t} );\n\t\t},\n\t\t[ allowedTypes, value, multiple, createErrorNotice, onChangeControl ]\n\t);\n\tconst addButtonLabel =\n\t\tfield.placeholder ||\n\t\t( multiple ? __( 'Choose files' ) : __( 'Choose file' ) );\n\t// Merge real attachments with any existing blob items that are being uploaded.\n\tconst allItems: Array< MediaEditAttachment > | null = useMemo( () => {\n\t\tif ( ! blobs.length ) {\n\t\t\treturn attachments;\n\t\t}\n\t\tconst items: Array< MediaEditAttachment > = [\n\t\t\t...( attachments || [] ),\n\t\t];\n\t\tconst blobItems = blobs.map( ( url ) => ( {\n\t\t\tid: url,\n\t\t\tsource_url: url,\n\t\t\tmime_type: getBlobTypeByURL( url ),\n\t\t} ) );\n\t\tconst replacementIndex = items.findIndex(\n\t\t\t( a ) => a.id === replacementId\n\t\t);\n\t\t// Place blobs at the replacement index, when files\n\t\t// dropped in existing media item.\n\t\tif ( replacementIndex !== -1 ) {\n\t\t\treturn [\n\t\t\t\t...items.slice( 0, replacementIndex ),\n\t\t\t\t...blobItems,\n\t\t\t\t...items.slice( replacementIndex + 1 ),\n\t\t\t];\n\t\t}\n\t\titems.push( ...blobItems );\n\t\treturn items;\n\t}, [ attachments, replacementId, blobs ] );\n\treturn (\n\t\t<fieldset className=\"fields__media-edit\" data-field-id={ field.id }>\n\t\t\t<ConditionalMediaUpload\n\t\t\t\tonSelect={ ( selectedMedia: any ) => {\n\t\t\t\t\tif ( multiple ) {\n\t\t\t\t\t\tconst newIds = Array.isArray( selectedMedia )\n\t\t\t\t\t\t\t? selectedMedia.map( ( m: any ) => m.id )\n\t\t\t\t\t\t\t: [ selectedMedia.id ];\n\t\t\t\t\t\tonChangeControl( newIds );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tonChangeControl( selectedMedia.id );\n\t\t\t\t\t}\n\t\t\t\t} }\n\t\t\t\tallowedTypes={ allowedTypes }\n\t\t\t\tvalue={ value }\n\t\t\t\tmultiple={ multiple }\n\t\t\t\ttitle={ field.label }\n\t\t\t\trender={ ( { open }: any ) => {\n\t\t\t\t\tconst AttachmentsComponent = isExpanded\n\t\t\t\t\t\t? ExpandedMediaEditAttachments\n\t\t\t\t\t\t: CompactMediaEditAttachments;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<VStack spacing={ 2 }>\n\t\t\t\t\t\t\t{ field.label &&\n\t\t\t\t\t\t\t\t( hideLabelFromVision ? (\n\t\t\t\t\t\t\t\t\t<VisuallyHidden as=\"legend\">\n\t\t\t\t\t\t\t\t\t\t{ field.label }\n\t\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<BaseControl.VisualLabel as=\"legend\">\n\t\t\t\t\t\t\t\t\t\t{ field.label }\n\t\t\t\t\t\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t<AttachmentsComponent\n\t\t\t\t\t\t\t\tallItems={ allItems }\n\t\t\t\t\t\t\t\taddButtonLabel={ addButtonLabel }\n\t\t\t\t\t\t\t\tmultiple={ multiple }\n\t\t\t\t\t\t\t\tremoveItem={ removeItem }\n\t\t\t\t\t\t\t\topen={ open }\n\t\t\t\t\t\t\t\tonFilesDrop={ onFilesDrop }\n\t\t\t\t\t\t\t\tisUploading={ !! blobs.length }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ field.description && (\n\t\t\t\t\t\t\t\t<Text variant=\"muted\">\n\t\t\t\t\t\t\t\t\t{ field.description }\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t/>\n\t\t</fieldset>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport type { DataViewRenderFieldProps } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport type { BasePostWithEmbeddedFeaturedMedia } from '../../types';\n\nexport const FeaturedImageView = ( {\n\titem,\n\tconfig,\n}: DataViewRenderFieldProps< BasePostWithEmbeddedFeaturedMedia > ) => {\n\tconst media = item?._embedded?.[ 'wp:featuredmedia' ]?.[ 0 ];\n\tconst url = media?.source_url;\n\n\tif ( url ) {\n\t\treturn (\n\t\t\t<img\n\t\t\t\tclassName=\"fields-controls__featured-image-image\"\n\t\t\t\tsrc={ url }\n\t\t\t\talt=\"\"\n\t\t\t\tsrcSet={\n\t\t\t\t\tmedia?.media_details?.sizes\n\t\t\t\t\t\t? Object.values( media.media_details.sizes )\n\t\t\t\t\t\t\t\t.map(\n\t\t\t\t\t\t\t\t\t( size: any ) =>\n\t\t\t\t\t\t\t\t\t\t`${ size.source_url } ${ size.width }w`\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t.join( ', ' )\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\tsizes={ config?.sizes || '100vw' }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn <span className=\"fields-controls__featured-image-placeholder\" />;\n};\n", "/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport type { BasePost } from '../../types';\nimport { TemplateEdit } from './template-edit';\n\nconst templateField: Field< BasePost > = {\n\tid: 'template',\n\ttype: 'text',\n\tlabel: __( 'Template' ),\n\tEdit: TemplateEdit,\n\tenableSorting: false,\n\tfilterBy: false,\n};\n\n/**\n * Template field for BasePost.\n */\nexport default templateField;\n", "/**\n * WordPress dependencies\n */\nimport { useCallback, useMemo, useState } from '@wordpress/element';\n// @ts-ignore\nimport { parse } from '@wordpress/blocks';\nimport type { WpTemplate } from '@wordpress/core-data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport type { DataFormControlProps } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\n// @ts-expect-error block-editor is not typed correctly.\nimport { __experimentalBlockPatternsList as BlockPatternsList } from '@wordpress/block-editor';\nimport {\n\tButton,\n\tDropdown,\n\tMenuGroup,\n\tMenuItem,\n\tModal,\n} from '@wordpress/components';\nimport { useAsyncList } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __ } from '@wordpress/i18n';\nimport { getItemTitle } from '../../actions/utils';\nimport type { BasePost } from '../../types';\nimport { unlock } from '../../lock-unlock';\n\nconst EMPTY_ARRAY: [] = [];\n\nexport const TemplateEdit = ( {\n\tdata,\n\tfield,\n\tonChange,\n}: DataFormControlProps< BasePost > ) => {\n\tconst { id } = field;\n\tconst postType = data.type;\n\tconst postId =\n\t\ttypeof data.id === 'number' ? data.id : parseInt( data.id, 10 );\n\tconst slug = data.slug;\n\n\tconst { canSwitchTemplate, templates } = useSelect(\n\t\t( select ) => {\n\t\t\tconst allTemplates =\n\t\t\t\tselect( coreStore ).getEntityRecords< WpTemplate >(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_template',\n\t\t\t\t\t{\n\t\t\t\t\t\tper_page: -1,\n\t\t\t\t\t\tpost_type: postType,\n\t\t\t\t\t}\n\t\t\t\t) ?? EMPTY_ARRAY;\n\n\t\t\tconst { getHomePage, getPostsPageId } = unlock(\n\t\t\t\tselect( coreStore )\n\t\t\t);\n\n\t\t\tconst isPostsPage = getPostsPageId() === +postId;\n\t\t\tconst isFrontPage =\n\t\t\t\tpostType === 'page' && getHomePage()?.postId === +postId;\n\n\t\t\tconst allowSwitchingTemplate = ! isPostsPage && ! isFrontPage;\n\n\t\t\treturn {\n\t\t\t\ttemplates: allTemplates,\n\t\t\t\tcanSwitchTemplate: allowSwitchingTemplate,\n\t\t\t};\n\t\t},\n\t\t[ postId, postType ]\n\t);\n\n\tconst templatesAsPatterns = useMemo( () => {\n\t\tif ( ! canSwitchTemplate ) {\n\t\t\treturn [];\n\t\t}\n\t\treturn templates\n\t\t\t.filter(\n\t\t\t\t( template ) =>\n\t\t\t\t\ttemplate.is_custom &&\n\t\t\t\t\ttemplate.slug !== data.template &&\n\t\t\t\t\t// Skip empty templates.\n\t\t\t\t\t!! template.content.raw\n\t\t\t)\n\t\t\t.map( ( template ) => ( {\n\t\t\t\tname: template.slug,\n\t\t\t\tblocks: parse( template.content.raw ),\n\t\t\t\ttitle: decodeEntities( template.title.rendered ),\n\t\t\t\tid: template.id,\n\t\t\t} ) );\n\t}, [ canSwitchTemplate, data.template, templates ] );\n\n\tconst shownTemplates = useAsyncList( templatesAsPatterns );\n\n\tconst value = field.getValue( { item: data } );\n\tconst foundTemplate = templates.find(\n\t\t( template ) => template.slug === value\n\t);\n\n\tconst currentTemplate = useSelect(\n\t\t( select ) => {\n\t\t\tif ( foundTemplate ) {\n\t\t\t\treturn foundTemplate;\n\t\t\t}\n\n\t\t\tlet slugToCheck;\n\t\t\t// In `draft` status we might not have a slug available, so we use the `single`\n\t\t\t// post type templates slug(ex page, single-post, single-product etc..).\n\t\t\t// Pages do not need the `single` prefix in the slug to be prioritized\n\t\t\t// through template hierarchy.\n\t\t\tif ( slug ) {\n\t\t\t\tslugToCheck =\n\t\t\t\t\tpostType === 'page'\n\t\t\t\t\t\t? `${ postType }-${ slug }`\n\t\t\t\t\t\t: `single-${ postType }-${ slug }`;\n\t\t\t} else {\n\t\t\t\tslugToCheck =\n\t\t\t\t\tpostType === 'page' ? 'page' : `single-${ postType }`;\n\t\t\t}\n\n\t\t\tif ( postType ) {\n\t\t\t\tconst templateId = select( coreStore ).getDefaultTemplateId( {\n\t\t\t\t\tslug: slugToCheck,\n\t\t\t\t} );\n\n\t\t\t\treturn select( coreStore ).getEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_template',\n\t\t\t\t\ttemplateId\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ foundTemplate, postType, slug ]\n\t);\n\n\tconst [ showModal, setShowModal ] = useState( false );\n\n\tconst onChangeControl = useCallback(\n\t\t( newValue: string ) =>\n\t\t\tonChange( {\n\t\t\t\t[ id ]: newValue,\n\t\t\t} ),\n\t\t[ id, onChange ]\n\t);\n\n\treturn (\n\t\t<fieldset className=\"fields-controls__template\">\n\t\t\t<Dropdown\n\t\t\t\tpopoverProps={ { placement: 'bottom-start' } }\n\t\t\t\trenderToggle={ ( { onToggle } ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ currentTemplate\n\t\t\t\t\t\t\t? getItemTitle( currentTemplate )\n\t\t\t\t\t\t\t: '' }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t\trenderContent={ ( { onToggle } ) => (\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tsetShowModal( true );\n\t\t\t\t\t\t\t\tonToggle();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Change template' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// The default template in a post is indicated by an empty string\n\t\t\t\t\t\t\tvalue !== '' && (\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tonChangeControl( '' );\n\t\t\t\t\t\t\t\t\t\tonToggle();\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Use default template' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t{ showModal && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={ __( 'Choose a template' ) }\n\t\t\t\t\tonRequestClose={ () => setShowModal( false ) }\n\t\t\t\t\toverlayClassName=\"fields-controls__template-modal\"\n\t\t\t\t\tisFullScreen\n\t\t\t\t>\n\t\t\t\t\t<div className=\"fields-controls__template-content\">\n\t\t\t\t\t\t<BlockPatternsList\n\t\t\t\t\t\t\tlabel={ __( 'Templates' ) }\n\t\t\t\t\t\t\tblockPatterns={ templatesAsPatterns }\n\t\t\t\t\t\t\tshownPatterns={ shownTemplates }\n\t\t\t\t\t\t\tonClickPattern={ (\n\t\t\t\t\t\t\t\ttemplate: ( typeof templatesAsPatterns )[ 0 ]\n\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\tonChangeControl( template.name );\n\t\t\t\t\t\t\t\tsetShowModal( false );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</fieldset>\n\t);\n};\n", "/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport { ParentEdit } from './parent-edit';\nimport { ParentView } from './parent-view';\n\nconst parentField: Field< BasePost > = {\n\tid: 'parent',\n\ttype: 'text',\n\tlabel: __( 'Parent' ),\n\tEdit: ParentEdit,\n\trender: ParentView,\n\tenableSorting: true,\n\tfilterBy: false,\n};\n\n/**\n * Parent field for BasePost.\n */\nexport default parentField;\n", "/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\n/**\n * WordPress dependencies\n */\nimport { ComboboxControl, ExternalLink } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tcreateInterpolateElement,\n\tuseCallback,\n\tuseMemo,\n\tuseState,\n} from '@wordpress/element';\n// @ts-ignore\nimport { store as coreStore } from '@wordpress/core-data';\nimport type { DataFormControlProps } from '@wordpress/dataviews';\nimport { debounce } from '@wordpress/compose';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { filterURLForDisplay } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport { getTitleWithFallbackName } from './utils';\n\ntype TreeBase = {\n\tid: number;\n\tname: string;\n\t[ key: string ]: any;\n};\n\ntype TreeWithParent = TreeBase & {\n\tparent: number;\n};\n\ntype TreeWithoutParent = TreeBase & {\n\tparent: null;\n};\n\ntype Tree = TreeWithParent | TreeWithoutParent;\n\nfunction buildTermsTree( flatTerms: Tree[] ) {\n\tconst flatTermsWithParentAndChildren = flatTerms.map( ( term ) => {\n\t\treturn {\n\t\t\tchildren: [],\n\t\t\t...term,\n\t\t};\n\t} );\n\n\t// All terms should have a `parent` because we're about to index them by it.\n\tif (\n\t\tflatTermsWithParentAndChildren.some(\n\t\t\t( { parent } ) => parent === null || parent === undefined\n\t\t)\n\t) {\n\t\treturn flatTermsWithParentAndChildren as TreeWithParent[];\n\t}\n\n\tconst termsByParent = (\n\t\tflatTermsWithParentAndChildren as TreeWithParent[]\n\t ).reduce(\n\t\t( acc, term ) => {\n\t\t\tconst { parent } = term;\n\t\t\tif ( ! acc[ parent ] ) {\n\t\t\t\tacc[ parent ] = [];\n\t\t\t}\n\t\t\tacc[ parent ].push( term );\n\t\t\treturn acc;\n\t\t},\n\t\t{} as Record< string, Array< TreeWithParent > >\n\t);\n\n\tconst fillWithChildren = (\n\t\tterms: Array< TreeWithParent >\n\t): Array< TreeWithParent > => {\n\t\treturn terms.map( ( term ) => {\n\t\t\tconst children = termsByParent[ term.id ];\n\t\t\treturn {\n\t\t\t\t...term,\n\t\t\t\tchildren:\n\t\t\t\t\tchildren && children.length\n\t\t\t\t\t\t? fillWithChildren( children )\n\t\t\t\t\t\t: [],\n\t\t\t};\n\t\t} );\n\t};\n\n\treturn fillWithChildren( termsByParent[ '0' ] || [] );\n}\n\nexport const getItemPriority = ( name: string, searchValue: string ) => {\n\tconst normalizedName = removeAccents( name || '' ).toLowerCase();\n\tconst normalizedSearch = removeAccents( searchValue || '' ).toLowerCase();\n\tif ( normalizedName === normalizedSearch ) {\n\t\treturn 0;\n\t}\n\n\tif ( normalizedName.startsWith( normalizedSearch ) ) {\n\t\treturn normalizedName.length;\n\t}\n\n\treturn Infinity;\n};\n\nexport function PageAttributesParent( {\n\tdata,\n\tonChangeControl,\n}: {\n\tdata: BasePost;\n\tonChangeControl: ( newValue: number ) => void;\n} ) {\n\tconst [ fieldValue, setFieldValue ] = useState< null | string >( null );\n\n\tconst pageId = data.parent;\n\tconst postId = data.id;\n\tconst postTypeSlug = data.type;\n\n\tconst { parentPostTitle, pageItems, isHierarchical } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord, getEntityRecords, getPostType } =\n\t\t\t\tselect( coreStore );\n\n\t\t\tconst postTypeInfo = getPostType( postTypeSlug );\n\n\t\t\tconst postIsHierarchical =\n\t\t\t\tpostTypeInfo?.hierarchical && postTypeInfo.viewable;\n\n\t\t\tconst parentPost = pageId\n\t\t\t\t? getEntityRecord< BasePost >(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\tpostTypeSlug,\n\t\t\t\t\t\tpageId\n\t\t\t\t )\n\t\t\t\t: null;\n\n\t\t\tconst query = {\n\t\t\t\tper_page: 100,\n\t\t\t\texclude: postId,\n\t\t\t\tparent_exclude: postId,\n\t\t\t\torderby: 'menu_order',\n\t\t\t\torder: 'asc',\n\t\t\t\t_fields: 'id,title,parent',\n\t\t\t\t...( fieldValue !== null && {\n\t\t\t\t\t// Perform a search by relevance when the field is changed.\n\t\t\t\t\tsearch: fieldValue,\n\t\t\t\t\torderby: 'relevance',\n\t\t\t\t} ),\n\t\t\t};\n\n\t\t\treturn {\n\t\t\t\tisHierarchical: postIsHierarchical,\n\t\t\t\tparentPostTitle: parentPost\n\t\t\t\t\t? getTitleWithFallbackName( parentPost )\n\t\t\t\t\t: '',\n\t\t\t\tpageItems: postIsHierarchical\n\t\t\t\t\t? getEntityRecords< BasePost >(\n\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\tpostTypeSlug,\n\t\t\t\t\t\t\tquery\n\t\t\t\t\t )\n\t\t\t\t\t: null,\n\t\t\t};\n\t\t},\n\t\t[ fieldValue, pageId, postId, postTypeSlug ]\n\t);\n\n\t/**\n\t * This logic has been copied from https://github.com/WordPress/gutenberg/blob/0249771b519d5646171fb9fae422006c8ab773f2/packages/editor/src/components/page-attributes/parent.js#L106.\n\t */\n\tconst parentOptions = useMemo( () => {\n\t\tconst getOptionsFromTree = (\n\t\t\ttree: Array< Tree >,\n\t\t\tlevel = 0\n\t\t): Array< {\n\t\t\tvalue: number;\n\t\t\tlabel: string;\n\t\t\trawName: string;\n\t\t} > => {\n\t\t\tconst mappedNodes = tree.map( ( treeNode ) => [\n\t\t\t\t{\n\t\t\t\t\tvalue: treeNode.id,\n\t\t\t\t\tlabel:\n\t\t\t\t\t\t'\u2014 '.repeat( level ) + decodeEntities( treeNode.name ),\n\t\t\t\t\trawName: treeNode.name,\n\t\t\t\t},\n\t\t\t\t...getOptionsFromTree( treeNode.children || [], level + 1 ),\n\t\t\t] );\n\n\t\t\tconst sortedNodes = mappedNodes.sort( ( [ a ], [ b ] ) => {\n\t\t\t\tconst priorityA = getItemPriority(\n\t\t\t\t\ta.rawName,\n\t\t\t\t\tfieldValue ?? ''\n\t\t\t\t);\n\t\t\t\tconst priorityB = getItemPriority(\n\t\t\t\t\tb.rawName,\n\t\t\t\t\tfieldValue ?? ''\n\t\t\t\t);\n\t\t\t\treturn priorityA >= priorityB ? 1 : -1;\n\t\t\t} );\n\n\t\t\treturn sortedNodes.flat();\n\t\t};\n\n\t\tif ( ! pageItems ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet tree = pageItems.map( ( item ) => ( {\n\t\t\tid: item.id as number,\n\t\t\tparent: item.parent ?? null,\n\t\t\tname: getTitleWithFallbackName( item ),\n\t\t} ) );\n\n\t\t// Only build a hierarchical tree when not searching.\n\t\tif ( ! fieldValue ) {\n\t\t\ttree = buildTermsTree( tree );\n\t\t}\n\n\t\tconst opts = getOptionsFromTree( tree );\n\n\t\t// Ensure the current parent is in the options list.\n\t\tconst optsHasParent = opts.find( ( item ) => item.value === pageId );\n\t\tif ( pageId && parentPostTitle && ! optsHasParent ) {\n\t\t\topts.unshift( {\n\t\t\t\tvalue: pageId,\n\t\t\t\tlabel: parentPostTitle,\n\t\t\t\trawName: '',\n\t\t\t} );\n\t\t}\n\t\treturn opts.map( ( option ) => ( {\n\t\t\t...option,\n\t\t\tvalue: option.value.toString(),\n\t\t} ) );\n\t}, [ pageItems, fieldValue, parentPostTitle, pageId ] );\n\n\tif ( ! isHierarchical ) {\n\t\treturn null;\n\t}\n\n\t/**\n\t * Handle user input.\n\t *\n\t * @param {string} inputValue The current value of the input field.\n\t */\n\tconst handleKeydown = ( inputValue: string ) => {\n\t\tsetFieldValue( inputValue );\n\t};\n\n\t/**\n\t * Handle author selection.\n\t *\n\t * @param {Object} selectedPostId The selected Author.\n\t */\n\tconst handleChange = ( selectedPostId: string | null | undefined ) => {\n\t\tif ( selectedPostId ) {\n\t\t\treturn onChangeControl( parseInt( selectedPostId, 10 ) ?? 0 );\n\t\t}\n\n\t\tonChangeControl( 0 );\n\t};\n\n\treturn (\n\t\t<ComboboxControl\n\t\t\t__next40pxDefaultSize\n\t\t\tlabel={ __( 'Parent' ) }\n\t\t\thelp={ __( 'Choose a parent page.' ) }\n\t\t\tvalue={ pageId?.toString() }\n\t\t\toptions={ parentOptions }\n\t\t\tonFilterValueChange={ debounce(\n\t\t\t\t( value: unknown ) => handleKeydown( value as string ),\n\t\t\t\t300\n\t\t\t) }\n\t\t\tonChange={ handleChange }\n\t\t\thideLabelFromVision\n\t\t/>\n\t);\n}\n\nexport const ParentEdit = ( {\n\tdata,\n\tfield,\n\tonChange,\n}: DataFormControlProps< BasePost > ) => {\n\tconst { id } = field;\n\n\tconst homeUrl = useSelect( ( select ) => {\n\t\treturn select( coreStore ).getEntityRecord< {\n\t\t\thome: string;\n\t\t} >( 'root', '__unstableBase' )?.home as string;\n\t}, [] );\n\n\tconst onChangeControl = useCallback(\n\t\t( newValue?: number ) =>\n\t\t\tonChange( {\n\t\t\t\t[ id ]: newValue,\n\t\t\t} ),\n\t\t[ id, onChange ]\n\t);\n\n\treturn (\n\t\t<fieldset className=\"fields-controls__parent\">\n\t\t\t<div>\n\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\t/* translators: %1$s The home URL of the WordPress installation without the scheme. */\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'Child pages inherit characteristics from their parent, such as URL structure. For instance, if \"Pricing\" is a child of \"Services\", its URL would be %1$s<wbr />/services<wbr />/pricing.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tfilterURLForDisplay( homeUrl ).replace(\n\t\t\t\t\t\t\t/([/.])/g,\n\t\t\t\t\t\t\t'<wbr />$1'\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t{\n\t\t\t\t\t\twbr: <wbr />,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\t<p>\n\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'They also show up as sub-items in the default navigation menu. <a>Learn more.</a>'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ta: (\n\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tchildren={ undefined }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t</p>\n\t\t\t\t<PageAttributesParent\n\t\t\t\t\tdata={ data }\n\t\t\t\t\tonChangeControl={ onChangeControl }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</fieldset>\n\t);\n};\n", "/**\n * WordPress dependencies\n */\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\n\nexport function getTitleWithFallbackName( post: BasePost ) {\n\treturn typeof post.title === 'object' &&\n\t\t'rendered' in post.title &&\n\t\tpost.title.rendered\n\t\t? decodeEntities( post.title.rendered )\n\t\t: `#${ post?.id } (${ __( 'no title' ) })`;\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport type { DataViewRenderFieldProps } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport { getTitleWithFallbackName } from './utils';\n\nexport const ParentView = ( {\n\titem,\n}: DataViewRenderFieldProps< BasePost > ) => {\n\tconst parent = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\t\t\treturn item?.parent\n\t\t\t\t? getEntityRecord( 'postType', item.type, item.parent )\n\t\t\t\t: null;\n\t\t},\n\t\t[ item.parent, item.type ]\n\t);\n\n\tif ( parent ) {\n\t\treturn <>{ getTitleWithFallbackName( parent ) }</>;\n\t}\n\n\treturn <>{ __( 'None' ) }</>;\n};\n", "/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport PasswordEdit from './edit';\n\nconst passwordField: Field< BasePost > = {\n\tid: 'password',\n\ttype: 'text',\n\tlabel: __( 'Password' ),\n\tEdit: PasswordEdit,\n\tenableSorting: false,\n\tenableHiding: false,\n\tisVisible: ( item ) => item.status !== 'private',\n\tfilterBy: false,\n};\n\n/**\n * Password field for BasePost.\n */\nexport default passwordField;\n", "/**\n * WordPress dependencies\n */\nimport {\n\tCheckboxControl,\n\t__experimentalVStack as VStack,\n\tTextControl,\n} from '@wordpress/components';\nimport type { DataFormControlProps } from '@wordpress/dataviews';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\n\nfunction PasswordEdit( {\n\tdata,\n\tonChange,\n\tfield,\n}: DataFormControlProps< BasePost > ) {\n\tconst [ showPassword, setShowPassword ] = useState(\n\t\t!! field.getValue( { item: data } )\n\t);\n\n\tconst handleTogglePassword = ( value: boolean ) => {\n\t\tsetShowPassword( value );\n\t\tif ( ! value ) {\n\t\t\tonChange( { password: '' } );\n\t\t}\n\t};\n\n\treturn (\n\t\t<VStack\n\t\t\tas=\"fieldset\"\n\t\t\tspacing={ 4 }\n\t\t\tclassName=\"fields-controls__password\"\n\t\t>\n\t\t\t<CheckboxControl\n\t\t\t\tlabel={ __( 'Password protected' ) }\n\t\t\t\thelp={ __( 'Only visible to those who know the password' ) }\n\t\t\t\tchecked={ showPassword }\n\t\t\t\tonChange={ handleTogglePassword }\n\t\t\t/>\n\t\t\t{ showPassword && (\n\t\t\t\t<div className=\"fields-controls__password-input\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\tlabel={ __( 'Password' ) }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tonChange( {\n\t\t\t\t\t\t\t\tpassword: value,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalue={ field.getValue( { item: data } ) || '' }\n\t\t\t\t\t\tplaceholder={ __( 'Use a secure password' ) }\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tmaxLength={ 255 }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\nexport default PasswordEdit;\n", "/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport StatusView from './status-view';\nimport STATUSES from './status-elements';\n\nconst OPERATOR_IS_ANY = 'isAny';\n\nconst statusField: Field< BasePost > = {\n\tlabel: __( 'Status' ),\n\tid: 'status',\n\ttype: 'text',\n\telements: STATUSES,\n\trender: StatusView,\n\tEdit: 'radio',\n\tenableSorting: false,\n\tfilterBy: {\n\t\toperators: [ OPERATOR_IS_ANY ],\n\t},\n};\n\n/**\n * Status field for BasePost.\n */\nexport default statusField;\n", "/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack, Icon } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport STATUSES from './status-elements';\n\nfunction StatusView( { item }: { item: BasePost } ) {\n\tconst status = STATUSES.find( ( { value } ) => value === item.status );\n\tconst label = status?.label || item.status;\n\tconst icon = status?.icon;\n\treturn (\n\t\t<HStack alignment=\"left\" spacing={ 0 }>\n\t\t\t{ icon && (\n\t\t\t\t<div className=\"edit-site-post-list__status-icon\">\n\t\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<span>{ label }</span>\n\t\t</HStack>\n\t);\n}\n\nexport default StatusView;\n", "/**\n * WordPress dependencies\n */\nimport {\n\ttrash,\n\tdrafts,\n\tpublished,\n\tscheduled,\n\tpending,\n\tnotAllowed,\n} from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\n// See https://github.com/WordPress/gutenberg/issues/55886\n// We do not support custom statutes at the moment.\nconst STATUSES = [\n\t{\n\t\tvalue: 'draft',\n\t\tlabel: __( 'Draft' ),\n\t\ticon: drafts,\n\t\tdescription: __( 'Not ready to publish.' ),\n\t},\n\t{\n\t\tvalue: 'future',\n\t\tlabel: __( 'Scheduled' ),\n\t\ticon: scheduled,\n\t\tdescription: __( 'Publish automatically on a chosen date.' ),\n\t},\n\t{\n\t\tvalue: 'pending',\n\t\tlabel: __( 'Pending Review' ),\n\t\ticon: pending,\n\t\tdescription: __( 'Waiting for review before publishing.' ),\n\t},\n\t{\n\t\tvalue: 'private',\n\t\tlabel: __( 'Private' ),\n\t\ticon: notAllowed,\n\t\tdescription: __( 'Only visible to site admins and editors.' ),\n\t},\n\t{\n\t\tvalue: 'publish',\n\t\tlabel: __( 'Published' ),\n\t\ticon: published,\n\t\tdescription: __( 'Visible to everyone.' ),\n\t},\n\t{ value: 'trash', label: __( 'Trash' ), icon: trash },\n];\n\nexport default STATUSES;\n", "/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\n\nconst commentStatusField: Field< BasePost > = {\n\tid: 'comment_status',\n\tlabel: __( 'Comments' ),\n\ttype: 'text',\n\tEdit: 'radio',\n\tenableSorting: false,\n\tenableHiding: false,\n\tfilterBy: false,\n\telements: [\n\t\t{\n\t\t\tvalue: 'open',\n\t\t\tlabel: __( 'Open' ),\n\t\t\tdescription: __( 'Visitors can add new comments and replies.' ),\n\t\t},\n\t\t{\n\t\t\tvalue: 'closed',\n\t\t\tlabel: __( 'Closed' ),\n\t\t\tdescription: __(\n\t\t\t\t'Visitors cannot add new comments or replies. Existing comments remain visible.'\n\t\t\t),\n\t\t},\n\t],\n};\n\n/**\n * Comment status field for BasePost.\n */\nexport default commentStatusField;\n", "/**\n * WordPress dependencies\n */\nimport type { DataFormControlProps, Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\nimport { CheckboxControl, ExternalLink } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\n\nfunction PingStatusEdit( {\n\tdata,\n\tonChange,\n}: DataFormControlProps< BasePost > ) {\n\tconst pingStatus = data?.ping_status ?? 'open';\n\n\tconst onTogglePingback = ( checked: boolean ) => {\n\t\tonChange( {\n\t\t\t...data,\n\t\t\tping_status: checked ? 'open' : 'closed',\n\t\t} );\n\t};\n\n\treturn (\n\t\t<CheckboxControl\n\t\t\tlabel={ __( 'Enable pingbacks & trackbacks' ) }\n\t\t\tchecked={ pingStatus === 'open' }\n\t\t\tonChange={ onTogglePingback }\n\t\t\thelp={\n\t\t\t\t<ExternalLink\n\t\t\t\t\thref={ __(\n\t\t\t\t\t\t'https://wordpress.org/documentation/article/trackbacks-and-pingbacks/'\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Learn more about pingbacks & trackbacks' ) }\n\t\t\t\t</ExternalLink>\n\t\t\t}\n\t\t/>\n\t);\n}\n\nconst pingStatusField: Field< BasePost > = {\n\tid: 'ping_status',\n\tlabel: __( 'Trackbacks & Pingbacks' ),\n\ttype: 'text',\n\tEdit: PingStatusEdit,\n\tenableSorting: false,\n\tenableHiding: false,\n\tfilterBy: false,\n\telements: [\n\t\t{\n\t\t\tvalue: 'open',\n\t\t\tlabel: __( 'Allow' ),\n\t\t\tdescription: __(\n\t\t\t\t'Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.'\n\t\t\t),\n\t\t},\n\t\t{\n\t\t\tvalue: 'closed',\n\t\t\tlabel: __( \"Don't allow\" ),\n\t\t\tdescription: __(\n\t\t\t\t\"Don't allow link notifications from other blogs (pingbacks and trackbacks) on new articles.\"\n\t\t\t),\n\t\t},\n\t],\n};\n\n/**\n * Ping status field for BasePost.\n */\nexport default pingStatusField;\n", "/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\n\nconst discussionField: Field< BasePost > = {\n\tid: 'discussion',\n\tlabel: __( 'Discussion' ),\n\ttype: 'text',\n\trender: ( { item } ) => {\n\t\tconst commentsOpen = item.comment_status === 'open';\n\t\tconst pingsOpen = item.ping_status === 'open';\n\n\t\tif ( commentsOpen && pingsOpen ) {\n\t\t\treturn __( 'Open' );\n\t\t}\n\t\tif ( commentsOpen && ! pingsOpen ) {\n\t\t\treturn __( 'Comments only' );\n\t\t}\n\t\tif ( ! commentsOpen && pingsOpen ) {\n\t\t\treturn __( 'Pings only' );\n\t\t}\n\t\treturn __( 'Closed' );\n\t},\n\tfilterBy: false,\n};\n\n/**\n * Discussion field for BasePost with custom render logic.\n */\nexport default discussionField;\n", "/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport DateView from './date-view';\n\nconst dateField: Field< BasePost > = {\n\tid: 'date',\n\ttype: 'datetime',\n\tlabel: __( 'Date' ),\n\trender: DateView,\n\tfilterBy: {\n\t\toperators: [ 'before', 'after' ],\n\t},\n};\n\n/**\n * Date field for BasePost.\n */\nexport default dateField;\n", "/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { dateI18n, getDate, getSettings } from '@wordpress/date';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\n\nconst getFormattedDate = ( dateToDisplay: string | null ) =>\n\tdateI18n(\n\t\tgetSettings().formats.datetimeAbbreviated,\n\t\tgetDate( dateToDisplay )\n\t);\n\nconst DateView = ( { item }: { item: BasePost } ) => {\n\tconst isDraftOrPrivate = [ 'draft', 'private' ].includes(\n\t\titem.status ?? ''\n\t);\n\tif ( isDraftOrPrivate ) {\n\t\treturn createInterpolateElement(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: page creation or modification date. */\n\t\t\t\t__( '<span>Modified: <time>%s</time></span>' ),\n\t\t\t\tgetFormattedDate( item.date ?? null )\n\t\t\t),\n\t\t\t{\n\t\t\t\tspan: <span />,\n\t\t\t\ttime: <time />,\n\t\t\t}\n\t\t);\n\t}\n\n\tconst isScheduled = item.status === 'future';\n\tif ( isScheduled ) {\n\t\treturn createInterpolateElement(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: page creation date */\n\t\t\t\t__( '<span>Scheduled: <time>%s</time></span>' ),\n\t\t\t\tgetFormattedDate( item.date ?? null )\n\t\t\t),\n\t\t\t{\n\t\t\t\tspan: <span />,\n\t\t\t\ttime: <time />,\n\t\t\t}\n\t\t);\n\t}\n\n\tconst isPublished = item.status === 'publish';\n\tif ( isPublished ) {\n\t\treturn createInterpolateElement(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: page creation time */\n\t\t\t\t__( '<span>Published: <time>%s</time></span>' ),\n\t\t\t\tgetFormattedDate( item.date ?? null )\n\t\t\t),\n\t\t\t{\n\t\t\t\tspan: <span />,\n\t\t\t\ttime: <time />,\n\t\t\t}\n\t\t);\n\t}\n\n\t// Pending posts show the modified date if it's newer.\n\tconst dateToDisplay =\n\t\tgetDate( item.modified ?? null ) > getDate( item.date ?? null )\n\t\t\t? item.modified\n\t\t\t: item.date;\n\n\tconst isPending = item.status === 'pending';\n\tif ( isPending ) {\n\t\treturn createInterpolateElement(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: page creation or modification date. */\n\t\t\t\t__( '<span>Modified: <time>%s</time></span>' ),\n\t\t\t\tgetFormattedDate( dateToDisplay ?? null )\n\t\t\t),\n\t\t\t{\n\t\t\t\tspan: <span />,\n\t\t\t\ttime: <time />,\n\t\t\t}\n\t\t);\n\t}\n\n\t// Unknow status.\n\treturn <time>{ getFormattedDate( item.date ?? null ) }</time>;\n};\n\nexport default DateView;\n", "/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\nimport { resolveSelect } from '@wordpress/data';\nimport { store as coreDataStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport type { BasePostWithEmbeddedAuthor } from '../../types';\nimport AuthorView from './author-view';\n\ninterface Author {\n\tid: number;\n\tname: string;\n}\n\nconst authorField: Field< BasePostWithEmbeddedAuthor > = {\n\tlabel: __( 'Author' ),\n\tid: 'author',\n\ttype: 'integer',\n\tgetElements: async () => {\n\t\tconst authors: Author[] =\n\t\t\t( await resolveSelect( coreDataStore ).getEntityRecords(\n\t\t\t\t'root',\n\t\t\t\t'user',\n\t\t\t\t{\n\t\t\t\t\tper_page: -1,\n\t\t\t\t}\n\t\t\t) ) ?? [];\n\t\treturn authors.map( ( { id, name } ) => ( {\n\t\t\tvalue: id,\n\t\t\tlabel: name,\n\t\t} ) );\n\t},\n\tsetValue: ( { value } ) => ( { author: Number( value ) } ),\n\trender: AuthorView,\n\tsort: ( a, b, direction ) => {\n\t\tconst nameA = a._embedded?.author?.[ 0 ]?.name || '';\n\t\tconst nameB = b._embedded?.author?.[ 0 ]?.name || '';\n\n\t\treturn direction === 'asc'\n\t\t\t? nameA.localeCompare( nameB )\n\t\t\t: nameB.localeCompare( nameA );\n\t},\n\tfilterBy: {\n\t\toperators: [ 'isAny', 'isNone' ],\n\t},\n};\n\n/**\n * Author field for BasePost.\n */\nexport default authorField;\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { commentAuthorAvatar as authorIcon } from '@wordpress/icons';\nimport { __experimentalHStack as HStack, Icon } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport type { BasePostWithEmbeddedAuthor } from '../../types';\n\nfunction AuthorView( { item }: { item: BasePostWithEmbeddedAuthor } ) {\n\t// When editing, item.author may differ from _embedded.author (which preserves\n\t// the saved record). Fetch the updated author only when they differ, so the\n\t// view reflects edits while lists preserve original data.\n\tconst authorId = item?.author;\n\tconst embeddedAuthorId = item?._embedded?.author?.[ 0 ]?.id;\n\tconst shouldFetch = Boolean(\n\t\tauthorId && embeddedAuthorId && authorId !== embeddedAuthorId\n\t);\n\tconst author = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! shouldFetch ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\t\t\t// This doesn't make extra REST requests because the records are\n\t\t\t// already in the store from the field's getElements function.\n\t\t\treturn authorId\n\t\t\t\t? getEntityRecord( 'root', 'user', authorId )\n\t\t\t\t: null;\n\t\t},\n\t\t[ authorId, shouldFetch ]\n\t);\n\t// Use fetched author if available, otherwise use _embedded.\n\tconst text = author?.name || item?._embedded?.author?.[ 0 ]?.name;\n\tconst imageUrl =\n\t\tauthor?.avatar_urls?.[ 48 ] ||\n\t\titem?._embedded?.author?.[ 0 ]?.avatar_urls?.[ 48 ];\n\tconst [ isImageLoaded, setIsImageLoaded ] = useState( false );\n\treturn (\n\t\t<HStack alignment=\"left\" spacing={ 0 }>\n\t\t\t{ !! imageUrl && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={ clsx( 'page-templates-author-field__avatar', {\n\t\t\t\t\t\t'is-loaded': isImageLoaded,\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t<img\n\t\t\t\t\t\tonLoad={ () => setIsImageLoaded( true ) }\n\t\t\t\t\t\talt={ __( 'Author avatar' ) }\n\t\t\t\t\t\tsrc={ imageUrl }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ ! imageUrl && (\n\t\t\t\t<div className=\"page-templates-author-field__icon\">\n\t\t\t\t\t<Icon icon={ authorIcon } />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<span className=\"page-templates-author-field__name\">{ text }</span>\n\t\t</HStack>\n\t);\n}\n\nexport default AuthorView;\n", "/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\n\ninterface PostWithNotesCount extends BasePost {\n\tnotesCount?: number;\n}\n\nconst notesField: Field< PostWithNotesCount > = {\n\tid: 'notesCount',\n\tlabel: __( 'Notes' ),\n\ttype: 'integer',\n\tenableSorting: false,\n\tfilterBy: false,\n};\n\n/**\n * Notes count field for post types that support editor.notes.\n */\nexport default notesField;\n", "/**\n * WordPress dependencies\n */\nimport { external } from '@wordpress/icons';\nimport { _x } from '@wordpress/i18n';\nimport type { Action } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../types';\n\nconst viewPost: Action< BasePost > = {\n\tid: 'view-post',\n\tlabel: _x( 'View', 'verb' ),\n\tisPrimary: true,\n\ticon: external,\n\tisEligible( post ) {\n\t\treturn post.status !== 'trash';\n\t},\n\tcallback( posts, { onActionPerformed } ) {\n\t\tconst post = posts[ 0 ];\n\t\twindow.open( post?.link, '_blank' );\n\t\tif ( onActionPerformed ) {\n\t\t\tonActionPerformed( posts );\n\t\t}\n\t},\n};\n\n/**\n * View post action for BasePost.\n */\nexport default viewPost;\n", "/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __ } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { useState } from '@wordpress/element';\nimport {\n\tButton,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalInputControl as InputControl,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport type { CoreDataError, BasePost } from '../types';\n\ninterface RenderModalProps< Item > {\n\titems: Item[];\n\tcloseModal?: () => void;\n\tonActionPerformed?: ( items: Item[] ) => void;\n}\n\ninterface Action< Item > {\n\tid: string;\n\tlabel: string;\n\tisEligible?: ( item: Item ) => boolean;\n\tmodalFocusOnMount?: string;\n\tRenderModal: ( props: RenderModalProps< Item > ) => JSX.Element;\n}\n\nfunction isItemValid( item: BasePost ): boolean {\n\treturn (\n\t\ttypeof item.menu_order === 'number' &&\n\t\tNumber.isInteger( item.menu_order )\n\t);\n}\n\nfunction ReorderModal( {\n\titems,\n\tcloseModal,\n\tonActionPerformed,\n}: RenderModalProps< BasePost > ) {\n\tconst [ item, setItem ] = useState( items[ 0 ] );\n\tconst { editEntityRecord, saveEditedEntityRecord } =\n\t\tuseDispatch( coreStore );\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tconst isValid = isItemValid( item );\n\n\tasync function onOrder( event: React.FormEvent ) {\n\t\tevent.preventDefault();\n\n\t\tif ( ! isValid ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tawait editEntityRecord( 'postType', item.type, item.id, {\n\t\t\t\tmenu_order: item.menu_order,\n\t\t\t} );\n\t\t\tcloseModal?.();\n\t\t\t// Persist edited entity.\n\t\t\tawait saveEditedEntityRecord( 'postType', item.type, item.id, {\n\t\t\t\tthrowOnError: true,\n\t\t\t} );\n\t\t\tcreateSuccessNotice( __( 'Order updated.' ), {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t\tonActionPerformed?.( items );\n\t\t} catch ( error ) {\n\t\t\tconst typedError = error as CoreDataError;\n\t\t\tconst errorMessage =\n\t\t\t\ttypedError.message && typedError.code !== 'unknown_error'\n\t\t\t\t\t? typedError.message\n\t\t\t\t\t: __( 'An error occurred while updating the order' );\n\t\t\tcreateErrorNotice( errorMessage, {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t}\n\t}\n\n\treturn (\n\t\t<form onSubmit={ onOrder }>\n\t\t\t<VStack spacing=\"5\">\n\t\t\t\t<div>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Determines the order of pages. Pages with the same order value are sorted alphabetically. Negative order values are supported.'\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t\t<InputControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'Order' ) }\n\t\t\t\t\ttype=\"number\"\n\t\t\t\t\tvalue={\n\t\t\t\t\t\ttypeof item.menu_order === 'number' &&\n\t\t\t\t\t\tNumber.isInteger( item.menu_order )\n\t\t\t\t\t\t\t? String( item.menu_order )\n\t\t\t\t\t\t\t: ''\n\t\t\t\t\t}\n\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\tconst parsed = parseInt( value as string, 10 ); // absorbs '' and undefined\n\t\t\t\t\t\tsetItem( {\n\t\t\t\t\t\t\t...item,\n\t\t\t\t\t\t\tmenu_order: isNaN( parsed ) ? undefined : parsed,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tcloseModal?.();\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\tdisabled={ ! isValid }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Save' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t</form>\n\t);\n}\n\nconst reorderPage: Action< BasePost > = {\n\tid: 'order-pages',\n\tlabel: __( 'Order' ),\n\tisEligible( { status } ) {\n\t\treturn status !== 'trash';\n\t},\n\tmodalFocusOnMount: 'firstContentElement',\n\tRenderModal: ReorderModal,\n};\n\n/**\n * Reorder action for BasePost.\n */\nexport default reorderPage;\n", "/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __, sprintf, _x } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { useState } from '@wordpress/element';\nimport {\n\tButton,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalInputControl as InputControl,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost, CoreDataError } from '../types';\nimport { getItemTitle } from './utils';\n\ninterface RenderModalProps< Item > {\n\titems: Item[];\n\tcloseModal?: () => void;\n\tonActionPerformed?: ( items: Item[] ) => void;\n}\n\ninterface Action< Item > {\n\tid: string;\n\tlabel: string;\n\tisEligible?: ( item: Item ) => boolean;\n\tmodalFocusOnMount?: string;\n\tRenderModal: ( props: RenderModalProps< Item > ) => JSX.Element;\n}\n\nconst duplicatePost: Action< BasePost > = {\n\tid: 'duplicate-post',\n\tlabel: _x( 'Duplicate', 'action label' ),\n\tisEligible( { status } ) {\n\t\treturn status !== 'trash';\n\t},\n\tmodalFocusOnMount: 'firstContentElement',\n\tRenderModal: ( { items, closeModal, onActionPerformed } ) => {\n\t\tconst [ item, setItem ] = useState< BasePost >( {\n\t\t\t...items[ 0 ],\n\t\t\ttitle: sprintf(\n\t\t\t\t/* translators: %s: Existing post title */\n\t\t\t\t_x( '%s (Copy)', 'post' ),\n\t\t\t\tgetItemTitle( items[ 0 ] )\n\t\t\t),\n\t\t} );\n\n\t\tconst [ isCreatingPage, setIsCreatingPage ] = useState( false );\n\t\tconst { saveEntityRecord } = useDispatch( coreStore );\n\t\tconst { createSuccessNotice, createErrorNotice } =\n\t\t\tuseDispatch( noticesStore );\n\n\t\tasync function createPage( event: React.FormEvent ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tif ( isCreatingPage ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst isTemplate = item.type === 'wp_template';\n\n\t\t\tconst newItemObject = {\n\t\t\t\tstatus: isTemplate ? 'publish' : 'draft',\n\t\t\t\ttitle: item.title,\n\t\t\t\tslug: isTemplate ? item.slug : item.title || __( 'No title' ),\n\t\t\t\tcomment_status: item.comment_status,\n\t\t\t\tcontent:\n\t\t\t\t\ttypeof item.content === 'string'\n\t\t\t\t\t\t? item.content\n\t\t\t\t\t\t: item.content.raw,\n\t\t\t\texcerpt:\n\t\t\t\t\ttypeof item.excerpt === 'string'\n\t\t\t\t\t\t? item.excerpt\n\t\t\t\t\t\t: item.excerpt?.raw,\n\t\t\t\tmeta: item.meta,\n\t\t\t\tparent: item.parent,\n\t\t\t\tpassword: item.password,\n\t\t\t\ttemplate: item.template,\n\t\t\t\tformat: item.format,\n\t\t\t\tfeatured_media: item.featured_media,\n\t\t\t\tmenu_order: item.menu_order,\n\t\t\t\tping_status: item.ping_status,\n\t\t\t};\n\t\t\tconst assignablePropertiesPrefix = 'wp:action-assign-';\n\t\t\t// Get all the properties that the current user is able to assign normally author, categories, tags,\n\t\t\t// and custom taxonomies.\n\t\t\tconst assignableProperties = Object.keys( item?._links || {} )\n\t\t\t\t.filter( ( property ) =>\n\t\t\t\t\tproperty.startsWith( assignablePropertiesPrefix )\n\t\t\t\t)\n\t\t\t\t.map( ( property ) =>\n\t\t\t\t\tproperty.slice( assignablePropertiesPrefix.length )\n\t\t\t\t);\n\t\t\tassignableProperties.forEach( ( property ) => {\n\t\t\t\tif ( item.hasOwnProperty( property ) ) {\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\tnewItemObject[ property ] = item[ property ];\n\t\t\t\t}\n\t\t\t} );\n\t\t\tsetIsCreatingPage( true );\n\t\t\ttry {\n\t\t\t\tconst newItem = await saveEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\titem.type,\n\t\t\t\t\tnewItemObject,\n\t\t\t\t\t{ throwOnError: true }\n\t\t\t\t);\n\n\t\t\t\tcreateSuccessNotice(\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\t// translators: %s: Title of the created post, e.g: \"Hello world\".\n\t\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\t\tgetItemTitle( newItem )\n\t\t\t\t\t),\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'duplicate-post-action',\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\tif ( onActionPerformed ) {\n\t\t\t\t\tonActionPerformed( [ newItem ] );\n\t\t\t\t}\n\t\t\t} catch ( error ) {\n\t\t\t\tconst typedError = error as CoreDataError;\n\t\t\t\tconst errorMessage =\n\t\t\t\t\ttypedError.message && typedError.code !== 'unknown_error'\n\t\t\t\t\t\t? typedError.message\n\t\t\t\t\t\t: __( 'An error occurred while duplicating the page.' );\n\n\t\t\t\tcreateErrorNotice( errorMessage, {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t} );\n\t\t\t} finally {\n\t\t\t\tsetIsCreatingPage( false );\n\t\t\t\tcloseModal?.();\n\t\t\t}\n\t\t}\n\n\t\treturn (\n\t\t\t<form onSubmit={ createPage }>\n\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t{ typeof item.id === 'string' && (\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'You are about to duplicate a bundled template. Changes will not be live until you activate the new template.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t\t<InputControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tlabel={ __( 'Title' ) }\n\t\t\t\t\t\tplaceholder={ __( 'No title' ) }\n\t\t\t\t\t\tvalue={ getItemTitle( item ) }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetItem( ( prev ) => ( {\n\t\t\t\t\t\t\t\t...prev,\n\t\t\t\t\t\t\t\ttitle: value || __( 'No title' ),\n\t\t\t\t\t\t\t} ) )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t<HStack spacing={ 2 } justify=\"end\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ closeModal }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\tisBusy={ isCreatingPage }\n\t\t\t\t\t\t\taria-disabled={ isCreatingPage }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ _x( 'Duplicate', 'action label' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</VStack>\n\t\t\t</form>\n\t\t);\n\t},\n};\n\n/**\n * Duplicate action for BasePost.\n */\nexport default duplicatePost;\n", "/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\n// @ts-ignore\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\nimport {\n\tButton,\n\tTextControl,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport type { Action } from '@wordpress/dataviews';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\n\nimport { unlock } from '../lock-unlock';\nimport {\n\tgetItemTitle,\n\tisTemplateRemovable,\n\tisTemplate,\n\tisTemplatePart,\n} from './utils';\nimport type { CoreDataError, PostWithPermissions } from '../types';\n\n// Patterns.\nconst { PATTERN_TYPES } = unlock( patternsPrivateApis );\n\nconst renamePost: Action< PostWithPermissions > = {\n\tid: 'rename-post',\n\tlabel: __( 'Rename' ),\n\tmodalFocusOnMount: 'firstContentElement',\n\tisEligible( post ) {\n\t\tif ( post.status === 'trash' ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Non-database template cannot be edited.\n\t\tif (\n\t\t\tpost.type === 'wp_template' &&\n\t\t\ttypeof post.id === 'string' &&\n\t\t\twindow?.__experimentalTemplateActivate\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst specialChecks = [ 'wp_template', 'wp_template_part' ];\n\n\t\tif ( ! window?.__experimentalTemplateActivate ) {\n\t\t\tspecialChecks.push( 'wp_template' );\n\t\t}\n\n\t\t// Templates, template parts and patterns have special checks for renaming.\n\t\tif ( ! specialChecks.includes( post.type ) ) {\n\t\t\treturn post.permissions?.update;\n\t\t}\n\n\t\t// In the case of templates, we can only rename custom templates.\n\t\tif ( isTemplate( post ) && ! window?.__experimentalTemplateActivate ) {\n\t\t\treturn (\n\t\t\t\tisTemplateRemovable( post ) &&\n\t\t\t\tpost.is_custom &&\n\t\t\t\tpost.permissions?.update\n\t\t\t);\n\t\t}\n\n\t\tif ( isTemplatePart( post ) ) {\n\t\t\treturn (\n\t\t\t\tpost.source === 'custom' &&\n\t\t\t\t! post?.has_theme_file &&\n\t\t\t\tpost.permissions?.update\n\t\t\t);\n\t\t}\n\n\t\treturn post.type === PATTERN_TYPES.user && post.permissions?.update;\n\t},\n\tRenderModal: ( { items, closeModal, onActionPerformed } ) => {\n\t\tconst [ item ] = items;\n\t\tconst [ title, setTitle ] = useState( () => getItemTitle( item, '' ) );\n\t\tconst { editEntityRecord, saveEditedEntityRecord } =\n\t\t\tuseDispatch( coreStore );\n\t\tconst { createSuccessNotice, createErrorNotice } =\n\t\t\tuseDispatch( noticesStore );\n\n\t\tasync function onRename( event: React.FormEvent ) {\n\t\t\tevent.preventDefault();\n\t\t\ttry {\n\t\t\t\tawait editEntityRecord( 'postType', item.type, item.id, {\n\t\t\t\t\ttitle,\n\t\t\t\t} );\n\t\t\t\t// Update state before saving rerenders the list.\n\t\t\t\tsetTitle( '' );\n\t\t\t\tcloseModal?.();\n\t\t\t\t// Persist edited entity.\n\t\t\t\tawait saveEditedEntityRecord( 'postType', item.type, item.id, {\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t} );\n\t\t\t\tcreateSuccessNotice( __( 'Name updated' ), {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t} );\n\t\t\t\tonActionPerformed?.( items );\n\t\t\t} catch ( error ) {\n\t\t\t\tconst typedError = error as CoreDataError;\n\t\t\t\tconst errorMessage =\n\t\t\t\t\ttypedError.message && typedError.code !== 'unknown_error'\n\t\t\t\t\t\t? typedError.message\n\t\t\t\t\t\t: __( 'An error occurred while updating the name' );\n\t\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t\t}\n\t\t}\n\n\t\treturn (\n\t\t\t<form onSubmit={ onRename }>\n\t\t\t\t<VStack spacing=\"5\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\t\tvalue={ title }\n\t\t\t\t\t\tonChange={ setTitle }\n\t\t\t\t\t\trequired\n\t\t\t\t\t/>\n\t\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tcloseModal?.();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Save' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</VStack>\n\t\t\t</form>\n\t\t);\n\t},\n};\n\n/**\n * Rename action for PostWithPermissions.\n */\nexport default renamePost;\n", "/**\n * WordPress dependencies\n */\nimport { backup } from '@wordpress/icons';\nimport { dispatch, select, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { useState } from '@wordpress/element';\n// @ts-ignore\nimport { parse, __unstableSerializeAndClean } from '@wordpress/blocks';\nimport {\n\tButton,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport type { Action } from '@wordpress/dataviews';\nimport { addQueryArgs } from '@wordpress/url';\nimport apiFetch from '@wordpress/api-fetch';\n\n/**\n * Internal dependencies\n */\nimport { getItemTitle, isTemplateOrTemplatePart } from './utils';\nimport type { CoreDataError, Template, TemplatePart } from '../types';\n\ndeclare global {\n\tinterface Window {\n\t\t__experimentalTemplateActivate?: boolean;\n\t}\n}\n\nconst isTemplateRevertable = (\n\ttemplateOrTemplatePart: Template | TemplatePart\n) => {\n\tif ( ! templateOrTemplatePart ) {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\ttemplateOrTemplatePart.source === 'custom' &&\n\t\t( Boolean( templateOrTemplatePart?.plugin ) ||\n\t\t\ttemplateOrTemplatePart?.has_theme_file )\n\t);\n};\n\n/**\n * Copied - pasted from https://github.com/WordPress/gutenberg/blob/bf1462ad37d4637ebbf63270b9c244b23c69e2a8/packages/editor/src/store/private-actions.js#L233-L365\n *\n * @param {Object} template The template to revert.\n * @param {Object} [options]\n * @param {boolean} [options.allowUndo] Whether to allow the user to undo\n * reverting the template. Default true.\n */\nconst revertTemplate = async (\n\ttemplate: TemplatePart | Template,\n\t{ allowUndo = true } = {}\n) => {\n\tconst noticeId = 'edit-site-template-reverted';\n\tdispatch( noticesStore ).removeNotice( noticeId );\n\tif ( ! isTemplateRevertable( template ) ) {\n\t\tdispatch( noticesStore ).createErrorNotice(\n\t\t\t__( 'This template is not revertable.' ),\n\t\t\t{\n\t\t\t\ttype: 'snackbar',\n\t\t\t}\n\t\t);\n\t\treturn;\n\t}\n\n\ttry {\n\t\tconst templateEntityConfig = select( coreStore ).getEntityConfig(\n\t\t\t'postType',\n\t\t\ttemplate.type\n\t\t);\n\n\t\tif ( ! templateEntityConfig ) {\n\t\t\tdispatch( noticesStore ).createErrorNotice(\n\t\t\t\t__(\n\t\t\t\t\t'The editor has encountered an unexpected error. Please reload.'\n\t\t\t\t),\n\t\t\t\t{ type: 'snackbar' }\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconst fileTemplatePath = addQueryArgs(\n\t\t\t`${ templateEntityConfig.baseURL }/${ template.id }`,\n\t\t\t{ context: 'edit', source: template.origin }\n\t\t);\n\n\t\tconst fileTemplate = ( await apiFetch( {\n\t\t\tpath: fileTemplatePath,\n\t\t} ) ) as any;\n\t\tif ( ! fileTemplate ) {\n\t\t\tdispatch( noticesStore ).createErrorNotice(\n\t\t\t\t__(\n\t\t\t\t\t'The editor has encountered an unexpected error. Please reload.'\n\t\t\t\t),\n\t\t\t\t{ type: 'snackbar' }\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconst serializeBlocks = ( { blocks: blocksForSerialization = [] } ) =>\n\t\t\t__unstableSerializeAndClean( blocksForSerialization );\n\n\t\tconst edited = select( coreStore ).getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\ttemplate.type,\n\t\t\ttemplate.id\n\t\t) as any;\n\n\t\t// We are fixing up the undo level here to make sure we can undo\n\t\t// the revert in the header toolbar correctly.\n\t\tdispatch( coreStore ).editEntityRecord(\n\t\t\t'postType',\n\t\t\ttemplate.type,\n\t\t\ttemplate.id,\n\t\t\t{\n\t\t\t\tcontent: serializeBlocks, // Required to make the `undo` behave correctly.\n\t\t\t\tblocks: edited.blocks, // Required to revert the blocks in the editor.\n\t\t\t\tsource: 'custom', // required to avoid turning the editor into a dirty state\n\t\t\t},\n\t\t\t{\n\t\t\t\tundoIgnore: true, // Required to merge this edit with the last undo level.\n\t\t\t}\n\t\t);\n\n\t\tconst blocks = parse( fileTemplate?.content?.raw );\n\n\t\tdispatch( coreStore ).editEntityRecord(\n\t\t\t'postType',\n\t\t\ttemplate.type,\n\t\t\tfileTemplate.id,\n\t\t\t{\n\t\t\t\tcontent: serializeBlocks,\n\t\t\t\tblocks,\n\t\t\t\tsource: 'theme',\n\t\t\t}\n\t\t);\n\n\t\tif ( allowUndo ) {\n\t\t\tconst undoRevert = () => {\n\t\t\t\tdispatch( coreStore ).editEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\ttemplate.type,\n\t\t\t\t\tedited.id,\n\t\t\t\t\t{\n\t\t\t\t\t\tcontent: serializeBlocks,\n\t\t\t\t\t\tblocks: edited.blocks,\n\t\t\t\t\t\tsource: 'custom',\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t};\n\n\t\t\tdispatch( noticesStore ).createSuccessNotice(\n\t\t\t\t__( 'Template reset.' ),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tid: noticeId,\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\tonClick: undoRevert,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t} catch ( error: any ) {\n\t\tconst errorMessage =\n\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t? error.message\n\t\t\t\t: __( 'Template revert failed. Please reload.' );\n\n\t\tdispatch( noticesStore ).createErrorNotice( errorMessage, {\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t}\n};\n\nconst resetPostAction: Action< Template | TemplatePart > = {\n\tid: 'reset-post',\n\tlabel: __( 'Reset' ),\n\tisEligible: ( item ) => {\n\t\tif ( window?.__experimentalTemplateActivate ) {\n\t\t\treturn (\n\t\t\t\titem.type === 'wp_template_part' &&\n\t\t\t\titem?.source === 'custom' &&\n\t\t\t\titem?.has_theme_file\n\t\t\t);\n\t\t}\n\n\t\t// When experiment is disabled: use wp/6.9 logic for both templates and template parts.\n\t\treturn (\n\t\t\tisTemplateOrTemplatePart( item ) &&\n\t\t\titem?.source === 'custom' &&\n\t\t\t( Boolean( item.type === 'wp_template' && item?.plugin ) ||\n\t\t\t\titem?.has_theme_file )\n\t\t);\n\t},\n\ticon: backup,\n\tsupportsBulk: true,\n\thideModalHeader: true,\n\tmodalFocusOnMount: 'firstContentElement',\n\tRenderModal: ( { items, closeModal, onActionPerformed } ) => {\n\t\tconst [ isBusy, setIsBusy ] = useState( false );\n\n\t\tconst { saveEditedEntityRecord } = useDispatch( coreStore );\n\t\tconst { createSuccessNotice, createErrorNotice } =\n\t\t\tuseDispatch( noticesStore );\n\t\tconst onConfirm = async () => {\n\t\t\ttry {\n\t\t\t\tfor ( const template of items ) {\n\t\t\t\t\tawait revertTemplate( template, {\n\t\t\t\t\t\tallowUndo: false,\n\t\t\t\t\t} );\n\t\t\t\t\tawait saveEditedEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\ttemplate.type,\n\t\t\t\t\t\ttemplate.id\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tcreateSuccessNotice(\n\t\t\t\t\titems.length > 1\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t/* translators: %d: The number of items. */\n\t\t\t\t\t\t\t\t__( '%d items reset.' ),\n\t\t\t\t\t\t\t\titems.length\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: The template/part's name. */\n\t\t\t\t\t\t\t\t__( '\"%s\" reset.' ),\n\t\t\t\t\t\t\t\tgetItemTitle( items[ 0 ] )\n\t\t\t\t\t\t ),\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\tid: 'revert-template-action',\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t} catch ( error ) {\n\t\t\t\tlet fallbackErrorMessage;\n\t\t\t\tif ( items[ 0 ].type === 'wp_template' ) {\n\t\t\t\t\tfallbackErrorMessage =\n\t\t\t\t\t\titems.length === 1\n\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t'An error occurred while reverting the template.'\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t'An error occurred while reverting the templates.'\n\t\t\t\t\t\t\t );\n\t\t\t\t} else {\n\t\t\t\t\tfallbackErrorMessage =\n\t\t\t\t\t\titems.length === 1\n\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t'An error occurred while reverting the template part.'\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t'An error occurred while reverting the template parts.'\n\t\t\t\t\t\t\t );\n\t\t\t\t}\n\n\t\t\t\tconst typedError = error as CoreDataError;\n\t\t\t\tconst errorMessage =\n\t\t\t\t\ttypedError.message && typedError.code !== 'unknown_error'\n\t\t\t\t\t\t? typedError.message\n\t\t\t\t\t\t: fallbackErrorMessage;\n\n\t\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t\t}\n\t\t};\n\t\treturn (\n\t\t\t<VStack spacing=\"5\">\n\t\t\t\t<Text>\n\t\t\t\t\t{ __( 'Reset to default and clear all customizations?' ) }\n\t\t\t\t</Text>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ closeModal }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ async () => {\n\t\t\t\t\t\t\tsetIsBusy( true );\n\t\t\t\t\t\t\tawait onConfirm();\n\t\t\t\t\t\t\tonActionPerformed?.( items );\n\t\t\t\t\t\t\tsetIsBusy( false );\n\t\t\t\t\t\t\tcloseModal?.();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisBusy={ isBusy }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t);\n\t},\n};\n\n/**\n * Reset action for Template and TemplatePart.\n */\nexport default resetPostAction;\n", "/**\n * WordPress dependencies\n */\nimport { _x } from '@wordpress/i18n';\n// @ts-ignore\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\nimport type { Action } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport type { Pattern } from '../types';\n\n// Patterns.\nconst { CreatePatternModalContents, useDuplicatePatternProps } =\n\tunlock( patternsPrivateApis );\n\nconst duplicatePattern: Action< Pattern > = {\n\tid: 'duplicate-pattern',\n\tlabel: _x( 'Duplicate', 'action label' ),\n\tisEligible: ( item ) => item.type !== 'wp_template_part',\n\tmodalHeader: _x( 'Duplicate pattern', 'action label' ),\n\tmodalFocusOnMount: 'firstContentElement',\n\tRenderModal: ( { items, closeModal } ) => {\n\t\tconst [ item ] = items;\n\t\tconst duplicatedProps = useDuplicatePatternProps( {\n\t\t\tpattern: item,\n\t\t\tonSuccess: () => closeModal?.(),\n\t\t} );\n\t\treturn (\n\t\t\t<CreatePatternModalContents\n\t\t\t\tonClose={ closeModal }\n\t\t\t\tconfirmLabel={ _x( 'Duplicate', 'action label' ) }\n\t\t\t\t{ ...duplicatedProps }\n\t\t\t/>\n\t\t);\n\t},\n};\n\n/**\n * Duplicate action for Pattern.\n */\nexport default duplicatePattern;\n", "/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n", "/**\n * Locale character mapping rules.\n */\ninterface Locale {\n regexp: RegExp;\n map: Record<string, string>;\n}\n\n/**\n * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt\n */\nconst SUPPORTED_LOCALE: Record<string, Locale> = {\n tr: {\n regexp: /\\u0130|\\u0049|\\u0049\\u0307/g,\n map: {\n İ: \"\\u0069\",\n I: \"\\u0131\",\n İ: \"\\u0069\",\n },\n },\n az: {\n regexp: /\\u0130/g,\n map: {\n İ: \"\\u0069\",\n I: \"\\u0131\",\n İ: \"\\u0069\",\n },\n },\n lt: {\n regexp: /\\u0049|\\u004A|\\u012E|\\u00CC|\\u00CD|\\u0128/g,\n map: {\n I: \"\\u0069\\u0307\",\n J: \"\\u006A\\u0307\",\n Į: \"\\u012F\\u0307\",\n Ì: \"\\u0069\\u0307\\u0300\",\n Í: \"\\u0069\\u0307\\u0301\",\n Ĩ: \"\\u0069\\u0307\\u0303\",\n },\n },\n};\n\n/**\n * Localized lower case.\n */\nexport function localeLowerCase(str: string, locale: string) {\n const lang = SUPPORTED_LOCALE[locale.toLowerCase()];\n if (lang) return lowerCase(str.replace(lang.regexp, (m) => lang.map[m]));\n return lowerCase(str);\n}\n\n/**\n * Lower case as a function.\n */\nexport function lowerCase(str: string) {\n return str.toLowerCase();\n}\n", "import { lowerCase } from \"lower-case\";\n\nexport interface Options {\n splitRegexp?: RegExp | RegExp[];\n stripRegexp?: RegExp | RegExp[];\n delimiter?: string;\n transform?: (part: string, index: number, parts: string[]) => string;\n}\n\n// Support camel case (\"camelCase\" -> \"camel Case\" and \"CAMELCase\" -> \"CAMEL Case\").\nconst DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];\n\n// Remove all non-word characters.\nconst DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;\n\n/**\n * Normalize the string into something other libraries can manipulate easier.\n */\nexport function noCase(input: string, options: Options = {}) {\n const {\n splitRegexp = DEFAULT_SPLIT_REGEXP,\n stripRegexp = DEFAULT_STRIP_REGEXP,\n transform = lowerCase,\n delimiter = \" \",\n } = options;\n\n let result = replace(\n replace(input, splitRegexp, \"$1\\0$2\"),\n stripRegexp,\n \"\\0\"\n );\n let start = 0;\n let end = result.length;\n\n // Trim the delimiter from around the output string.\n while (result.charAt(start) === \"\\0\") start++;\n while (result.charAt(end - 1) === \"\\0\") end--;\n\n // Transform each token independently.\n return result.slice(start, end).split(\"\\0\").map(transform).join(delimiter);\n}\n\n/**\n * Replace `re` in the input string with the replacement value.\n */\nfunction replace(input: string, re: RegExp | RegExp[], value: string) {\n if (re instanceof RegExp) return input.replace(re, value);\n return re.reduce((input, re) => input.replace(re, value), input);\n}\n", "import { noCase, Options } from \"no-case\";\n\nexport { Options };\n\nexport function dotCase(input: string, options: Options = {}) {\n return noCase(input, {\n delimiter: \".\",\n ...options,\n });\n}\n", "import { dotCase, Options } from \"dot-case\";\n\nexport { Options };\n\nexport function paramCase(input: string, options: Options = {}) {\n return dotCase(input, {\n delimiter: \"-\",\n ...options,\n });\n}\n", "\"stream\"in Blob.prototype||Object.defineProperty(Blob.prototype,\"stream\",{value(){return new Response(this).body}}),\"setBigUint64\"in DataView.prototype||Object.defineProperty(DataView.prototype,\"setBigUint64\",{value(e,n,t){const i=Number(0xffffffffn&n),r=Number(n>>32n);this.setUint32(e+(t?0:4),i,t),this.setUint32(e+(t?4:0),r,t)}});var e=e=>new DataView(new ArrayBuffer(e)),n=e=>new Uint8Array(e.buffer||e),t=e=>(new TextEncoder).encode(String(e)),i=e=>Math.min(4294967295,Number(e)),r=e=>Math.min(65535,Number(e));function f(e,i){if(void 0===i||i instanceof Date||(i=new Date(i)),e instanceof File)return{isFile:1,t:i||new Date(e.lastModified),i:e.stream()};if(e instanceof Response)return{isFile:1,t:i||new Date(e.headers.get(\"Last-Modified\")||Date.now()),i:e.body};if(void 0===i)i=new Date;else if(isNaN(i))throw new Error(\"Invalid modification date.\");if(void 0===e)return{isFile:0,t:i};if(\"string\"==typeof e)return{isFile:1,t:i,i:t(e)};if(e instanceof Blob)return{isFile:1,t:i,i:e.stream()};if(e instanceof Uint8Array||e instanceof ReadableStream)return{isFile:1,t:i,i:e};if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return{isFile:1,t:i,i:n(e)};if(Symbol.asyncIterator in e)return{isFile:1,t:i,i:o(e[Symbol.asyncIterator]())};throw new TypeError(\"Unsupported input format.\")}function o(e,n=e){return new ReadableStream({async pull(n){let t=0;for(;n.desiredSize>t;){const i=await e.next();if(!i.value){n.close();break}{const e=a(i.value);n.enqueue(e),t+=e.byteLength}}},cancel(e){n.throw?.(e)}})}function a(e){return\"string\"==typeof e?t(e):e instanceof Uint8Array?e:n(e)}function s(e,i,r){let[f,o]=function(e){return e?e instanceof Uint8Array?[e,1]:ArrayBuffer.isView(e)||e instanceof ArrayBuffer?[n(e),1]:[t(e),0]:[void 0,0]}(i);if(e instanceof File)return{o:d(f||t(e.name)),u:BigInt(e.size),l:o};if(e instanceof Response){const n=e.headers.get(\"content-disposition\"),i=n&&n.match(/;\\s*filename\\*?=[\"']?(.*?)[\"']?$/i),a=i&&i[1]||e.url&&new URL(e.url).pathname.split(\"/\").findLast(Boolean),s=a&&decodeURIComponent(a),u=r||+e.headers.get(\"content-length\");return{o:d(f||t(s)),u:BigInt(u),l:o}}return f=d(f,void 0!==e||void 0!==r),\"string\"==typeof e?{o:f,u:BigInt(t(e).length),l:o}:e instanceof Blob?{o:f,u:BigInt(e.size),l:o}:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?{o:f,u:BigInt(e.byteLength),l:o}:{o:f,u:u(e,r),l:o}}function u(e,n){return n>-1?BigInt(n):e?void 0:0n}function d(e,n=1){if(!e||e.every((c=>47===c)))throw new Error(\"The file must have a name.\");if(n)for(;47===e[e.length-1];)e=e.subarray(0,-1);else 47!==e[e.length-1]&&(e=new Uint8Array([...e,47]));return e}var l=new Uint32Array(256);for(let e=0;e<256;++e){let n=e;for(let e=0;e<8;++e)n=n>>>1^(1&n&&3988292384);l[e]=n}function y(e,n=0){n^=-1;for(var t=0,i=e.length;t<i;t++)n=n>>>8^l[255&n^e[t]];return(-1^n)>>>0}function w(e,n,t=0){const i=e.getSeconds()>>1|e.getMinutes()<<5|e.getHours()<<11,r=e.getDate()|e.getMonth()+1<<5|e.getFullYear()-1980<<9;n.setUint16(t,i,1),n.setUint16(t+2,r,1)}function B({o:e,l:n},t){return 8*(!n||(t??function(e){try{b.decode(e)}catch{return 0}return 1}(e)))}var b=new TextDecoder(\"utf8\",{fatal:1});function p(t,i=0){const r=e(30);return r.setUint32(0,1347093252),r.setUint32(4,754976768|i),w(t.t,r,10),r.setUint16(26,t.o.length,1),n(r)}async function*g(e){let{i:n}=e;if(\"then\"in n&&(n=await n),n instanceof Uint8Array)yield n,e.m=y(n,0),e.u=BigInt(n.length);else{e.u=0n;const t=n.getReader();for(;;){const{value:n,done:i}=await t.read();if(i)break;e.m=y(n,e.m),e.u+=BigInt(n.length),yield n}}}function I(t,r){const f=e(16+(r?8:0));return f.setUint32(0,1347094280),f.setUint32(4,t.isFile?t.m:0,1),r?(f.setBigUint64(8,t.u,1),f.setBigUint64(16,t.u,1)):(f.setUint32(8,i(t.u),1),f.setUint32(12,i(t.u),1)),n(f)}function v(t,r,f=0,o=0){const a=e(46);return a.setUint32(0,1347092738),a.setUint32(4,755182848),a.setUint16(8,2048|f),w(t.t,a,12),a.setUint32(16,t.isFile?t.m:0,1),a.setUint32(20,i(t.u),1),a.setUint32(24,i(t.u),1),a.setUint16(28,t.o.length,1),a.setUint16(30,o,1),a.setUint16(40,t.isFile?33204:16893,1),a.setUint32(42,i(r),1),n(a)}function h(t,i,r){const f=e(r);return f.setUint16(0,1,1),f.setUint16(2,r-4,1),16&r&&(f.setBigUint64(4,t.u,1),f.setBigUint64(12,t.u,1)),f.setBigUint64(r-8,i,1),n(f)}function D(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified]]}var S=e=>function(e){let n=BigInt(22),t=0n,i=0;for(const r of e){if(!r.o)throw new Error(\"Every file must have a non-empty name.\");if(void 0===r.u)throw new Error(`Missing size for file \"${(new TextDecoder).decode(r.o)}\".`);const e=r.u>=0xffffffffn,f=t>=0xffffffffn;t+=BigInt(46+r.o.length+(e&&8))+r.u,n+=BigInt(r.o.length+46+(12*f|28*e)),i||(i=e)}return(i||t>=0xffffffffn)&&(n+=BigInt(76)),n+t}(function*(e){for(const n of e)yield s(...D(n)[0])}(e));function A(e,n={}){const t={\"Content-Type\":\"application/zip\",\"Content-Disposition\":\"attachment\"};return(\"bigint\"==typeof n.length||Number.isInteger(n.length))&&n.length>0&&(t[\"Content-Length\"]=String(n.length)),n.metadata&&(t[\"Content-Length\"]=String(S(n.metadata))),new Response(N(e,n),{headers:t})}function N(t,a={}){const u=function(e){const n=e[Symbol.iterator in e?Symbol.iterator:Symbol.asyncIterator]();return{async next(){const e=await n.next();if(e.done)return e;const[t,i]=D(e.value);return{done:0,value:Object.assign(f(...i),s(...t))}},throw:n.throw?.bind(n),[Symbol.asyncIterator](){return this}}}(t);return o(async function*(t,f){const o=[];let a=0n,s=0n,u=0;for await(const e of t){const n=B(e,f.buffersAreUTF8);yield p(e,n),yield new Uint8Array(e.o),e.isFile&&(yield*g(e));const t=e.u>=0xffffffffn,i=12*(a>=0xffffffffn)|28*t;yield I(e,t),o.push(v(e,a,n,i)),o.push(e.o),i&&o.push(h(e,a,i)),t&&(a+=8n),s++,a+=BigInt(46+e.o.length)+e.u,u||(u=t)}let d=0n;for(const e of o)yield e,d+=BigInt(e.length);if(u||a>=0xffffffffn){const t=e(76);t.setUint32(0,1347094022),t.setBigUint64(4,BigInt(44),1),t.setUint32(12,755182848),t.setBigUint64(24,s,1),t.setBigUint64(32,s,1),t.setBigUint64(40,d,1),t.setBigUint64(48,a,1),t.setUint32(56,1347094023),t.setBigUint64(64,a+d,1),t.setUint32(72,1,1),yield n(t)}const l=e(22);l.setUint32(0,1347093766),l.setUint16(8,r(s),1),l.setUint16(10,r(s),1),l.setUint32(12,i(d),1),l.setUint32(16,i(a),1),yield n(l)}(u,a),u)}export{A as downloadZip,N as makeZip,S as predictLength};", "/**\n * External dependencies\n */\nimport { paramCase as kebabCase } from 'change-case';\nimport { downloadZip } from 'client-zip';\n\n/**\n * WordPress dependencies\n */\nimport { downloadBlob } from '@wordpress/blob';\nimport { __ } from '@wordpress/i18n';\nimport { download } from '@wordpress/icons';\nimport type { Action } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport type { Pattern } from '../types';\nimport { getItemTitle } from './utils';\n\nfunction getJsonFromItem( item: Pattern ) {\n\treturn JSON.stringify(\n\t\t{\n\t\t\t__file: item.type,\n\t\t\ttitle: getItemTitle( item ),\n\t\t\tcontent:\n\t\t\t\ttypeof item.content === 'string'\n\t\t\t\t\t? item.content\n\t\t\t\t\t: item.content?.raw,\n\t\t\tsyncStatus: item.wp_pattern_sync_status,\n\t\t},\n\t\tnull,\n\t\t2\n\t);\n}\n\nconst exportPattern: Action< Pattern > = {\n\tid: 'export-pattern',\n\tlabel: __( 'Export as JSON' ),\n\ticon: download,\n\tsupportsBulk: true,\n\tisEligible: ( item ) => item.type === 'wp_block',\n\tcallback: async ( items ) => {\n\t\tif ( items.length === 1 ) {\n\t\t\treturn downloadBlob(\n\t\t\t\t`${ kebabCase(\n\t\t\t\t\tgetItemTitle( items[ 0 ] ) || items[ 0 ].slug\n\t\t\t\t) }.json`,\n\t\t\t\tgetJsonFromItem( items[ 0 ] ),\n\t\t\t\t'application/json'\n\t\t\t);\n\t\t}\n\t\tconst nameCount: Record< string, number > = {};\n\t\tconst filesToZip = items.map( ( item ) => {\n\t\t\tconst name = kebabCase( getItemTitle( item ) || item.slug );\n\t\t\tnameCount[ name ] = ( nameCount[ name ] || 0 ) + 1;\n\t\t\treturn {\n\t\t\t\tname: `${\n\t\t\t\t\tname +\n\t\t\t\t\t( nameCount[ name ] > 1\n\t\t\t\t\t\t? '-' + ( nameCount[ name ] - 1 )\n\t\t\t\t\t\t: '' )\n\t\t\t\t}.json`,\n\t\t\t\tlastModified: new Date(),\n\t\t\t\tinput: getJsonFromItem( item ),\n\t\t\t};\n\t\t} );\n\t\treturn downloadBlob(\n\t\t\t__( 'patterns-export' ) + '.zip',\n\t\t\tawait downloadZip( filesToZip ).blob(),\n\t\t\t'application/zip'\n\t\t);\n\t},\n};\n\n/**\n * Export action as JSON for Pattern.\n */\nexport default exportPattern;\n", "/**\n * WordPress dependencies\n */\nimport { addQueryArgs } from '@wordpress/url';\nimport { __, sprintf } from '@wordpress/i18n';\nimport type { Action } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport type { Post } from '../types';\n\nconst viewPostRevisions: Action< Post > = {\n\tid: 'view-post-revisions',\n\tcontext: 'list',\n\tlabel( items ) {\n\t\tconst revisionsCount =\n\t\t\titems[ 0 ]._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0;\n\t\treturn sprintf(\n\t\t\t/* translators: %d: number of revisions. */\n\t\t\t__( 'View revisions (%d)' ),\n\t\t\trevisionsCount\n\t\t);\n\t},\n\tisEligible( post ) {\n\t\tif ( post.status === 'trash' ) {\n\t\t\treturn false;\n\t\t}\n\t\tconst lastRevisionId =\n\t\t\tpost?._links?.[ 'predecessor-version' ]?.[ 0 ]?.id ?? null;\n\t\tconst revisionsCount =\n\t\t\tpost?._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0;\n\t\treturn !! lastRevisionId && revisionsCount > 1;\n\t},\n\tcallback( posts, { onActionPerformed } ) {\n\t\tconst post = posts[ 0 ];\n\t\tconst href = addQueryArgs( 'revision.php', {\n\t\t\trevision: post?._links?.[ 'predecessor-version' ]?.[ 0 ]?.id,\n\t\t} );\n\t\tdocument.location.href = href;\n\t\tif ( onActionPerformed ) {\n\t\t\tonActionPerformed( posts );\n\t\t}\n\t},\n};\n\n/**\n * View post revisions action for Post.\n */\nexport default viewPostRevisions;\n", "/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport type { Action } from '@wordpress/dataviews';\nimport { trash } from '@wordpress/icons';\nimport { useState } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport {\n\tButton,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { getItemTitle, isTemplateOrTemplatePart } from './utils';\nimport type { CoreDataError, PostWithPermissions } from '../types';\n\nconst permanentlyDeletePost: Action< PostWithPermissions > = {\n\tid: 'permanently-delete',\n\tlabel: __( 'Permanently delete' ),\n\tsupportsBulk: true,\n\ticon: trash,\n\tisEligible( item ) {\n\t\tif ( isTemplateOrTemplatePart( item ) || item.type === 'wp_block' ) {\n\t\t\treturn false;\n\t\t}\n\t\tconst { status, permissions } = item;\n\t\treturn status === 'trash' && permissions?.delete;\n\t},\n\thideModalHeader: true,\n\tmodalFocusOnMount: 'firstContentElement',\n\tRenderModal: ( { items, closeModal, onActionPerformed } ) => {\n\t\tconst [ isBusy, setIsBusy ] = useState( false );\n\t\tconst { createSuccessNotice, createErrorNotice } =\n\t\t\tuseDispatch( noticesStore );\n\t\tconst { deleteEntityRecord } = useDispatch( coreStore );\n\n\t\treturn (\n\t\t\t<VStack spacing=\"5\">\n\t\t\t\t<Text>\n\t\t\t\t\t{ items.length > 1\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t// translators: %d: number of items to delete.\n\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t'Are you sure you want to permanently delete %d item?',\n\t\t\t\t\t\t\t\t\t'Are you sure you want to permanently delete %d items?',\n\t\t\t\t\t\t\t\t\titems.length\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\titems.length\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: The post's title\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'Are you sure you want to permanently delete \"%s\"?'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tdecodeEntities( getItemTitle( items[ 0 ] ) )\n\t\t\t\t\t\t ) }\n\t\t\t\t</Text>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ closeModal }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ async () => {\n\t\t\t\t\t\t\tsetIsBusy( true );\n\t\t\t\t\t\t\tconst promiseResult = await Promise.allSettled(\n\t\t\t\t\t\t\t\titems.map( ( post ) =>\n\t\t\t\t\t\t\t\t\tdeleteEntityRecord(\n\t\t\t\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\t\t\t\tpost.type,\n\t\t\t\t\t\t\t\t\t\tpost.id,\n\t\t\t\t\t\t\t\t\t\t{ force: true },\n\t\t\t\t\t\t\t\t\t\t{ throwOnError: true }\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t// If all the promises were fulfilled with success.\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tpromiseResult.every(\n\t\t\t\t\t\t\t\t\t( { status } ) => status === 'fulfilled'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tlet successMessage;\n\t\t\t\t\t\t\t\tif ( promiseResult.length === 1 ) {\n\t\t\t\t\t\t\t\t\tsuccessMessage = sprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: %s: The posts's title. */\n\t\t\t\t\t\t\t\t\t\t__( '\"%s\" permanently deleted.' ),\n\t\t\t\t\t\t\t\t\t\tgetItemTitle( items[ 0 ] )\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tsuccessMessage = __(\n\t\t\t\t\t\t\t\t\t\t'The items were permanently deleted.'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcreateSuccessNotice( successMessage, {\n\t\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\t\tid: 'permanently-delete-post-action',\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\tonActionPerformed?.( items );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// If there was at lease one failure.\n\t\t\t\t\t\t\t\tlet errorMessage;\n\t\t\t\t\t\t\t\t// If we were trying to permanently delete a single post.\n\t\t\t\t\t\t\t\tif ( promiseResult.length === 1 ) {\n\t\t\t\t\t\t\t\t\tconst typedError = promiseResult[ 0 ] as {\n\t\t\t\t\t\t\t\t\t\treason?: CoreDataError;\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\tif ( typedError.reason?.message ) {\n\t\t\t\t\t\t\t\t\t\terrorMessage =\n\t\t\t\t\t\t\t\t\t\t\ttypedError.reason.message;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\terrorMessage = __(\n\t\t\t\t\t\t\t\t\t\t\t'An error occurred while permanently deleting the item.'\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// If we were trying to permanently delete multiple posts\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tconst errorMessages = new Set< string >();\n\t\t\t\t\t\t\t\t\tconst failedPromises = promiseResult.filter(\n\t\t\t\t\t\t\t\t\t\t( { status } ) => status === 'rejected'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tfor ( const failedPromise of failedPromises ) {\n\t\t\t\t\t\t\t\t\t\tconst typedError = failedPromise as {\n\t\t\t\t\t\t\t\t\t\t\treason?: CoreDataError;\n\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\tif ( typedError.reason?.message ) {\n\t\t\t\t\t\t\t\t\t\t\terrorMessages.add(\n\t\t\t\t\t\t\t\t\t\t\t\ttypedError.reason.message\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( errorMessages.size === 0 ) {\n\t\t\t\t\t\t\t\t\t\terrorMessage = __(\n\t\t\t\t\t\t\t\t\t\t\t'An error occurred while permanently deleting the items.'\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t} else if ( errorMessages.size === 1 ) {\n\t\t\t\t\t\t\t\t\t\terrorMessage = sprintf(\n\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: an error message */\n\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t'An error occurred while permanently deleting the items: %s'\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t[ ...errorMessages ][ 0 ]\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\terrorMessage = sprintf(\n\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: a list of comma separated error messages */\n\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t'Some errors occurred while permanently deleting the items: %s'\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t[ ...errorMessages ].join( ',' )\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcreateErrorNotice( errorMessage, {\n\t\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tsetIsBusy( false );\n\t\t\t\t\t\t\tcloseModal?.();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisBusy={ isBusy }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Delete permanently' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t);\n\t},\n};\n\n/**\n * Delete action for PostWithPermissions.\n */\nexport default permanentlyDeletePost;\n", "/**\n * WordPress dependencies\n */\nimport { backup } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport type { Action } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport { getItemTitle, isTemplateOrTemplatePart } from './utils';\nimport type { CoreDataError, PostWithPermissions } from '../types';\n\nconst restorePost: Action< PostWithPermissions > = {\n\tid: 'restore',\n\tlabel: __( 'Restore' ),\n\tisPrimary: true,\n\ticon: backup,\n\tsupportsBulk: true,\n\tisEligible( item ) {\n\t\treturn (\n\t\t\t! isTemplateOrTemplatePart( item ) &&\n\t\t\titem.type !== 'wp_block' &&\n\t\t\titem.status === 'trash' &&\n\t\t\titem.permissions?.update\n\t\t);\n\t},\n\tasync callback( posts, { registry, onActionPerformed } ) {\n\t\tconst { createSuccessNotice, createErrorNotice } =\n\t\t\tregistry.dispatch( noticesStore );\n\t\tconst { editEntityRecord, saveEditedEntityRecord } =\n\t\t\tregistry.dispatch( coreStore );\n\t\tawait Promise.allSettled(\n\t\t\tposts.map( ( post ) => {\n\t\t\t\treturn editEntityRecord( 'postType', post.type, post.id, {\n\t\t\t\t\tstatus: 'draft',\n\t\t\t\t} );\n\t\t\t} )\n\t\t);\n\t\tconst promiseResult = await Promise.allSettled(\n\t\t\tposts.map( ( post ) => {\n\t\t\t\treturn saveEditedEntityRecord( 'postType', post.type, post.id, {\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t} );\n\t\t\t} )\n\t\t);\n\n\t\tif ( promiseResult.every( ( { status } ) => status === 'fulfilled' ) ) {\n\t\t\tlet successMessage;\n\t\t\tif ( posts.length === 1 ) {\n\t\t\t\tsuccessMessage = sprintf(\n\t\t\t\t\t/* translators: %s: The number of posts. */\n\t\t\t\t\t__( '\"%s\" has been restored.' ),\n\t\t\t\t\tgetItemTitle( posts[ 0 ] )\n\t\t\t\t);\n\t\t\t} else if ( posts[ 0 ].type === 'page' ) {\n\t\t\t\tsuccessMessage = sprintf(\n\t\t\t\t\t/* translators: %d: The number of posts. */\n\t\t\t\t\t__( '%d pages have been restored.' ),\n\t\t\t\t\tposts.length\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tsuccessMessage = sprintf(\n\t\t\t\t\t/* translators: %d: The number of posts. */\n\t\t\t\t\t__( '%d posts have been restored.' ),\n\t\t\t\t\tposts.length\n\t\t\t\t);\n\t\t\t}\n\t\t\tcreateSuccessNotice( successMessage, {\n\t\t\t\ttype: 'snackbar',\n\t\t\t\tid: 'restore-post-action',\n\t\t\t} );\n\t\t\tif ( onActionPerformed ) {\n\t\t\t\tonActionPerformed( posts );\n\t\t\t}\n\t\t} else {\n\t\t\t// If there was at lease one failure.\n\t\t\tlet errorMessage;\n\t\t\t// If we were trying to move a single post to the trash.\n\t\t\tif ( promiseResult.length === 1 ) {\n\t\t\t\tconst typedError = promiseResult[ 0 ] as {\n\t\t\t\t\treason?: CoreDataError;\n\t\t\t\t};\n\t\t\t\tif ( typedError.reason?.message ) {\n\t\t\t\t\terrorMessage = typedError.reason.message;\n\t\t\t\t} else {\n\t\t\t\t\terrorMessage = __(\n\t\t\t\t\t\t'An error occurred while restoring the post.'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// If we were trying to move multiple posts to the trash\n\t\t\t} else {\n\t\t\t\tconst errorMessages = new Set< string >();\n\t\t\t\tconst failedPromises = promiseResult.filter(\n\t\t\t\t\t( { status } ) => status === 'rejected'\n\t\t\t\t);\n\t\t\t\tfor ( const failedPromise of failedPromises ) {\n\t\t\t\t\tconst typedError = failedPromise as {\n\t\t\t\t\t\treason?: CoreDataError;\n\t\t\t\t\t};\n\t\t\t\t\tif ( typedError.reason?.message ) {\n\t\t\t\t\t\terrorMessages.add( typedError.reason.message );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( errorMessages.size === 0 ) {\n\t\t\t\t\terrorMessage = __(\n\t\t\t\t\t\t'An error occurred while restoring the posts.'\n\t\t\t\t\t);\n\t\t\t\t} else if ( errorMessages.size === 1 ) {\n\t\t\t\t\terrorMessage = sprintf(\n\t\t\t\t\t\t/* translators: %s: an error message */\n\t\t\t\t\t\t__( 'An error occurred while restoring the posts: %s' ),\n\t\t\t\t\t\t[ ...errorMessages ][ 0 ]\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\terrorMessage = sprintf(\n\t\t\t\t\t\t/* translators: %s: a list of comma separated error messages */\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'Some errors occurred while restoring the posts: %s'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t[ ...errorMessages ].join( ',' )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcreateErrorNotice( errorMessage, {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t}\n\t},\n};\n\n/**\n * Restore action for PostWithPermissions.\n */\nexport default restorePost;\n", "/**\n * WordPress dependencies\n */\nimport { trash } from '@wordpress/icons';\nimport { useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __, _n, sprintf, _x } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { useState } from '@wordpress/element';\nimport {\n\tButton,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport type { Action } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport { getItemTitle } from './utils';\nimport type { CoreDataError, PostWithPermissions } from '../types';\n\nconst trashPost: Action< PostWithPermissions > = {\n\tid: 'move-to-trash',\n\tlabel: _x( 'Trash', 'verb' ),\n\tisPrimary: true,\n\ticon: trash,\n\tisEligible( item ) {\n\t\tif ( item.type === 'wp_template_part' || item.type === 'wp_block' ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Non-database template cannot be trashed.\n\t\tif ( item.type === 'wp_template' && typeof item.id === 'string' ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn (\n\t\t\t!! item.status &&\n\t\t\t! [ 'auto-draft', 'trash' ].includes( item.status ) &&\n\t\t\titem.permissions?.delete\n\t\t);\n\t},\n\tsupportsBulk: true,\n\thideModalHeader: true,\n\tmodalFocusOnMount: 'firstContentElement',\n\tRenderModal: ( { items, closeModal, onActionPerformed } ) => {\n\t\tconst [ isBusy, setIsBusy ] = useState( false );\n\t\tconst { createSuccessNotice, createErrorNotice } =\n\t\t\tuseDispatch( noticesStore );\n\t\tconst { deleteEntityRecord } = useDispatch( coreStore );\n\t\treturn (\n\t\t\t<VStack spacing=\"5\">\n\t\t\t\t<Text>\n\t\t\t\t\t{ items.length === 1\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: The item's title.\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'Are you sure you want to move \"%s\" to the trash?'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tgetItemTitle( items[ 0 ] )\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t// translators: %d: The number of items (2 or more).\n\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t'Are you sure you want to move %d item to the trash ?',\n\t\t\t\t\t\t\t\t\t'Are you sure you want to move %d items to the trash ?',\n\t\t\t\t\t\t\t\t\titems.length\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\titems.length\n\t\t\t\t\t\t ) }\n\t\t\t\t</Text>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ closeModal }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ async () => {\n\t\t\t\t\t\t\tsetIsBusy( true );\n\t\t\t\t\t\t\tconst promiseResult = await Promise.allSettled(\n\t\t\t\t\t\t\t\titems.map( ( item ) =>\n\t\t\t\t\t\t\t\t\tdeleteEntityRecord(\n\t\t\t\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\t\t\t\titem.type,\n\t\t\t\t\t\t\t\t\t\titem.id.toString(),\n\t\t\t\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t\t\t\t\t{ throwOnError: true }\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t// If all the promises were fulfilled with success.\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tpromiseResult.every(\n\t\t\t\t\t\t\t\t\t( { status } ) => status === 'fulfilled'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tlet successMessage;\n\t\t\t\t\t\t\t\tif ( promiseResult.length === 1 ) {\n\t\t\t\t\t\t\t\t\tsuccessMessage = sprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: %s: The item's title. */\n\t\t\t\t\t\t\t\t\t\t__( '\"%s\" moved to the trash.' ),\n\t\t\t\t\t\t\t\t\t\tgetItemTitle( items[ 0 ] )\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tsuccessMessage = sprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: %d: The number of items. */\n\t\t\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t\t\t'%d item moved to the trash.',\n\t\t\t\t\t\t\t\t\t\t\t'%d items moved to the trash.',\n\t\t\t\t\t\t\t\t\t\t\titems.length\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\titems.length\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcreateSuccessNotice( successMessage, {\n\t\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\t\tid: 'move-to-trash-action',\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// If there was at least one failure.\n\t\t\t\t\t\t\t\tlet errorMessage;\n\t\t\t\t\t\t\t\t// If we were trying to delete a single item.\n\t\t\t\t\t\t\t\tif ( promiseResult.length === 1 ) {\n\t\t\t\t\t\t\t\t\tconst typedError = promiseResult[ 0 ] as {\n\t\t\t\t\t\t\t\t\t\treason?: CoreDataError;\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\tif ( typedError.reason?.message ) {\n\t\t\t\t\t\t\t\t\t\terrorMessage =\n\t\t\t\t\t\t\t\t\t\t\ttypedError.reason.message;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\terrorMessage = __(\n\t\t\t\t\t\t\t\t\t\t\t'An error occurred while moving the item to the trash.'\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// If we were trying to delete multiple items.\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tconst errorMessages = new Set< string >();\n\t\t\t\t\t\t\t\t\tconst failedPromises = promiseResult.filter(\n\t\t\t\t\t\t\t\t\t\t( { status } ) => status === 'rejected'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tfor ( const failedPromise of failedPromises ) {\n\t\t\t\t\t\t\t\t\t\tconst typedError = failedPromise as {\n\t\t\t\t\t\t\t\t\t\t\treason?: CoreDataError;\n\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\tif ( typedError.reason?.message ) {\n\t\t\t\t\t\t\t\t\t\t\terrorMessages.add(\n\t\t\t\t\t\t\t\t\t\t\t\ttypedError.reason.message\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( errorMessages.size === 0 ) {\n\t\t\t\t\t\t\t\t\t\terrorMessage = __(\n\t\t\t\t\t\t\t\t\t\t\t'An error occurred while moving the items to the trash.'\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t} else if ( errorMessages.size === 1 ) {\n\t\t\t\t\t\t\t\t\t\terrorMessage = sprintf(\n\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: an error message */\n\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t'An error occurred while moving the item to the trash: %s'\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t[ ...errorMessages ][ 0 ]\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\terrorMessage = sprintf(\n\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: a list of comma separated error messages */\n\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t'Some errors occurred while moving the items to the trash: %s'\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t[ ...errorMessages ].join( ',' )\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcreateErrorNotice( errorMessage, {\n\t\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( onActionPerformed ) {\n\t\t\t\t\t\t\t\tonActionPerformed( items );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsetIsBusy( false );\n\t\t\t\t\t\t\tcloseModal?.();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisBusy={ isBusy }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ _x( 'Trash', 'verb' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t);\n\t},\n};\n\n/**\n * Trash action for PostWithPermissions.\n */\nexport default trashPost;\n", "/**\n * WordPress dependencies\n */\nimport { trash } from '@wordpress/icons';\nimport { __, _x, _n, sprintf } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport {\n\tButton,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n// @ts-ignore\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\nimport type { Action } from '@wordpress/dataviews';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport {\n\tgetItemTitle,\n\tisTemplateOrTemplatePart,\n\tisTemplateRemovable,\n} from './utils';\nimport type { Pattern, Template, TemplatePart } from '../types';\nimport type { NoticeSettings } from '../mutation';\nimport { deletePostWithNotices } from '../mutation';\nimport { unlock } from '../lock-unlock';\n\nconst { PATTERN_TYPES } = unlock( patternsPrivateApis );\n\n// This action is used for templates, patterns and template parts.\n// Every other post type uses the similar `trashPostAction` which\n// moves the post to trash.\nconst deletePostAction: Action< Template | TemplatePart | Pattern > = {\n\tid: 'delete-post',\n\tlabel: __( 'Delete' ),\n\tisPrimary: true,\n\ticon: trash,\n\tisEligible( post ) {\n\t\tif ( isTemplateOrTemplatePart( post ) ) {\n\t\t\treturn isTemplateRemovable( post );\n\t\t}\n\t\t// We can only remove user patterns.\n\t\treturn post.type === PATTERN_TYPES.user;\n\t},\n\tsupportsBulk: true,\n\thideModalHeader: true,\n\tmodalFocusOnMount: 'firstContentElement',\n\tRenderModal: ( { items, closeModal, onActionPerformed } ) => {\n\t\tconst [ isBusy, setIsBusy ] = useState( false );\n\t\tconst isResetting = items.every(\n\t\t\t( item ) => isTemplateOrTemplatePart( item ) && item?.has_theme_file\n\t\t);\n\t\treturn (\n\t\t\t<VStack spacing=\"5\">\n\t\t\t\t<Text>\n\t\t\t\t\t{ items.length > 1\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t// translators: %d: number of items to delete.\n\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t'Delete %d item?',\n\t\t\t\t\t\t\t\t\t'Delete %d items?',\n\t\t\t\t\t\t\t\t\titems.length\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\titems.length\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: The template or template part's title\n\t\t\t\t\t\t\t\t_x( 'Delete \"%s\"?', 'template part' ),\n\t\t\t\t\t\t\t\tgetItemTitle( items[ 0 ] )\n\t\t\t\t\t\t ) }\n\t\t\t\t</Text>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ closeModal }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ async () => {\n\t\t\t\t\t\t\tsetIsBusy( true );\n\t\t\t\t\t\t\tconst notice: NoticeSettings<\n\t\t\t\t\t\t\t\tTemplate | TemplatePart | Pattern\n\t\t\t\t\t\t\t> = {\n\t\t\t\t\t\t\t\tsuccess: {\n\t\t\t\t\t\t\t\t\tmessages: {\n\t\t\t\t\t\t\t\t\t\tgetMessage: ( item ) => {\n\t\t\t\t\t\t\t\t\t\t\treturn isResetting\n\t\t\t\t\t\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: The template/part's name. */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t__( '\"%s\" reset.' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdecodeEntities(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetItemTitle( item )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: The template/part's name. */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t_x(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'\"%s\" deleted.',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'template part'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdecodeEntities(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetItemTitle( item )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tgetBatchMessage: () => {\n\t\t\t\t\t\t\t\t\t\t\treturn isResetting\n\t\t\t\t\t\t\t\t\t\t\t\t? __( 'Items reset.' )\n\t\t\t\t\t\t\t\t\t\t\t\t: __( 'Items deleted.' );\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\terror: {\n\t\t\t\t\t\t\t\t\tmessages: {\n\t\t\t\t\t\t\t\t\t\tgetMessage: ( error ) => {\n\t\t\t\t\t\t\t\t\t\t\tif ( error.size === 1 ) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn [ ...error ][ 0 ];\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\treturn isResetting\n\t\t\t\t\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'An error occurred while reverting the item.'\n\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'An error occurred while deleting the item.'\n\t\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tgetBatchMessage: ( errors ) => {\n\t\t\t\t\t\t\t\t\t\t\tif ( errors.size === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn isResetting\n\t\t\t\t\t\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'An error occurred while reverting the items.'\n\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'An error occurred while deleting the items.'\n\t\t\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tif ( errors.size === 1 ) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn isResetting\n\t\t\t\t\t\t\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: an error message */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'An error occurred while reverting the items: %s'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[ ...errors ][ 0 ]\n\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: an error message */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'An error occurred while deleting the items: %s'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[ ...errors ][ 0 ]\n\t\t\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\treturn isResetting\n\t\t\t\t\t\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: a list of comma separated error messages */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Some errors occurred while reverting the items: %s'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t[ ...errors ].join(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t','\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: a list of comma separated error messages */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Some errors occurred while deleting the items: %s'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t[ ...errors ].join(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t','\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\tawait deletePostWithNotices( items, notice, {\n\t\t\t\t\t\t\t\tonActionPerformed,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\tsetIsBusy( false );\n\t\t\t\t\t\t\tcloseModal?.();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisBusy={ isBusy }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Delete' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t);\n\t},\n};\n\n/**\n * Delete action for Templates, Patterns and Template Parts.\n */\nexport default deletePostAction;\n", "/**\n * WordPress dependencies\n */\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { dispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport type { CoreDataError, Post } from '../types';\n\nfunction getErrorMessagesFromPromises< T >(\n\tallSettledResults: PromiseSettledResult< T >[]\n) {\n\tconst errorMessages = new Set< string >();\n\t// If there was at lease one failure.\n\tif ( allSettledResults.length === 1 ) {\n\t\tconst typedError = allSettledResults[ 0 ] as {\n\t\t\treason?: CoreDataError;\n\t\t};\n\t\tif ( typedError.reason?.message ) {\n\t\t\terrorMessages.add( typedError.reason.message );\n\t\t}\n\t} else {\n\t\tconst failedPromises = allSettledResults.filter(\n\t\t\t( { status } ) => status === 'rejected'\n\t\t);\n\t\tfor ( const failedPromise of failedPromises ) {\n\t\t\tconst typedError = failedPromise as {\n\t\t\t\treason?: CoreDataError;\n\t\t\t};\n\t\t\tif ( typedError.reason?.message ) {\n\t\t\t\terrorMessages.add( typedError.reason.message );\n\t\t\t}\n\t\t}\n\t}\n\treturn errorMessages;\n}\n\nexport type NoticeSettings< T extends Post > = {\n\tsuccess: {\n\t\tid?: string;\n\t\ttype?: string;\n\t\tmessages: {\n\t\t\tgetMessage: ( posts: T ) => string;\n\t\t\tgetBatchMessage: ( posts: T[] ) => string;\n\t\t};\n\t};\n\terror: {\n\t\tid?: string;\n\t\ttype?: string;\n\t\tmessages: {\n\t\t\tgetMessage: ( errors: Set< string > ) => string;\n\t\t\tgetBatchMessage: ( errors: Set< string > ) => string;\n\t\t};\n\t};\n};\n\nexport const deletePostWithNotices = async < T extends Post >(\n\tposts: T[],\n\tnotice: NoticeSettings< T >,\n\tcallbacks: {\n\t\tonActionPerformed?: ( posts: T[] ) => void;\n\t\tonActionError?: () => void;\n\t}\n) => {\n\tconst { createSuccessNotice, createErrorNotice } = dispatch( noticesStore );\n\tconst { deleteEntityRecord } = dispatch( coreStore );\n\tconst allSettledResults = await Promise.allSettled(\n\t\tposts.map( ( post ) => {\n\t\t\treturn deleteEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpost.type,\n\t\t\t\tpost.id,\n\t\t\t\t{ force: true },\n\t\t\t\t{ throwOnError: true }\n\t\t\t);\n\t\t} )\n\t);\n\t// If all the promises were fulfilled with success.\n\tif ( allSettledResults.every( ( { status } ) => status === 'fulfilled' ) ) {\n\t\tlet successMessage;\n\t\tif ( allSettledResults.length === 1 ) {\n\t\t\tsuccessMessage = notice.success.messages.getMessage( posts[ 0 ] );\n\t\t} else {\n\t\t\tsuccessMessage = notice.success.messages.getBatchMessage( posts );\n\t\t}\n\t\tcreateSuccessNotice( successMessage, {\n\t\t\ttype: notice.success.type ?? 'snackbar',\n\t\t\tid: notice.success.id,\n\t\t} );\n\t\tcallbacks.onActionPerformed?.( posts );\n\t} else {\n\t\tconst errorMessages = getErrorMessagesFromPromises( allSettledResults );\n\t\tlet errorMessage = '';\n\t\tif ( allSettledResults.length === 1 ) {\n\t\t\terrorMessage = notice.error.messages.getMessage( errorMessages );\n\t\t} else {\n\t\t\terrorMessage =\n\t\t\t\tnotice.error.messages.getBatchMessage( errorMessages );\n\t\t}\n\n\t\tcreateErrorNotice( errorMessage, {\n\t\t\ttype: notice.error.type ?? 'snackbar',\n\t\t\tid: notice.error.id,\n\t\t} );\n\t\tcallbacks.onActionError?.();\n\t}\n};\n\nexport const editPostWithNotices = async < T extends Post >(\n\tpostsWithUpdates: {\n\t\toriginalPost: T;\n\t\tchanges: Partial< T >;\n\t}[],\n\tnotice: NoticeSettings< T >,\n\tcallbacks: {\n\t\tonActionPerformed?: ( posts: T[] ) => void;\n\t\tonActionError?: () => void;\n\t}\n) => {\n\tconst { createSuccessNotice, createErrorNotice } = dispatch( noticesStore );\n\tconst { editEntityRecord, saveEditedEntityRecord } = dispatch( coreStore );\n\tawait Promise.allSettled(\n\t\tpostsWithUpdates.map( ( post ) => {\n\t\t\treturn editEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpost.originalPost.type,\n\t\t\t\tpost.originalPost.id,\n\t\t\t\t{\n\t\t\t\t\t...post.changes,\n\t\t\t\t}\n\t\t\t);\n\t\t} )\n\t);\n\tconst allSettledResults = await Promise.allSettled(\n\t\tpostsWithUpdates.map( ( post ) => {\n\t\t\treturn saveEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpost.originalPost.type,\n\t\t\t\tpost.originalPost.id,\n\t\t\t\t{\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t}\n\t\t\t);\n\t\t} )\n\t);\n\t// If all the promises were fulfilled with success.\n\tif ( allSettledResults.every( ( { status } ) => status === 'fulfilled' ) ) {\n\t\tlet successMessage;\n\t\tif ( allSettledResults.length === 1 ) {\n\t\t\tsuccessMessage = notice.success.messages.getMessage(\n\t\t\t\tpostsWithUpdates[ 0 ].originalPost\n\t\t\t);\n\t\t} else {\n\t\t\tsuccessMessage = notice.success.messages.getBatchMessage(\n\t\t\t\tpostsWithUpdates.map( ( post ) => post.originalPost )\n\t\t\t);\n\t\t}\n\t\tcreateSuccessNotice( successMessage, {\n\t\t\ttype: notice.success.type ?? 'snackbar',\n\t\t\tid: notice.success.id,\n\t\t} );\n\t\tcallbacks.onActionPerformed?.(\n\t\t\tpostsWithUpdates.map( ( post ) => post.originalPost )\n\t\t);\n\t} else {\n\t\tconst errorMessages = getErrorMessagesFromPromises( allSettledResults );\n\t\tlet errorMessage = '';\n\t\tif ( allSettledResults.length === 1 ) {\n\t\t\terrorMessage = notice.error.messages.getMessage( errorMessages );\n\t\t} else {\n\t\t\terrorMessage =\n\t\t\t\tnotice.error.messages.getBatchMessage( errorMessages );\n\t\t}\n\n\t\tcreateErrorNotice( errorMessage, {\n\t\t\ttype: notice.error.type ?? 'snackbar',\n\t\t\tid: notice.error.id,\n\t\t} );\n\t\tcallbacks.onActionError?.();\n\t}\n};\n", "/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { _x, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { useMemo } from '@wordpress/element';\n// @ts-ignore\nimport { parse } from '@wordpress/blocks';\nimport type { Action } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport type { Post, TemplatePart } from '../types';\nimport { CreateTemplatePartModalContents } from '../components/create-template-part-modal';\nimport { getItemTitle } from './utils';\n\n/**\n * This action is used to duplicate a template part.\n */\nconst duplicateTemplatePart: Action< TemplatePart > = {\n\tid: 'duplicate-template-part',\n\tlabel: _x( 'Duplicate', 'action label' ),\n\tisEligible: ( item ) => item.type === 'wp_template_part',\n\tmodalHeader: _x( 'Duplicate template part', 'action label' ),\n\tmodalFocusOnMount: 'firstContentElement',\n\tRenderModal: ( { items, closeModal } ) => {\n\t\tconst [ item ] = items;\n\t\tconst blocks = useMemo( () => {\n\t\t\treturn (\n\t\t\t\titem.blocks ??\n\t\t\t\tparse(\n\t\t\t\t\ttypeof item.content === 'string'\n\t\t\t\t\t\t? item.content\n\t\t\t\t\t\t: item.content.raw,\n\t\t\t\t\t{\n\t\t\t\t\t\t__unstableSkipMigrationLogs: true,\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t);\n\t\t}, [ item.content, item.blocks ] );\n\t\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\t\tfunction onTemplatePartSuccess( templatePart: Post ) {\n\t\t\tcreateSuccessNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t// translators: %s: The new template part's title e.g. 'Call to action (copy)'.\n\t\t\t\t\t_x( '\"%s\" duplicated.', 'template part' ),\n\t\t\t\t\tgetItemTitle( templatePart )\n\t\t\t\t),\n\t\t\t\t{ type: 'snackbar', id: 'edit-site-patterns-success' }\n\t\t\t);\n\t\t\tcloseModal?.();\n\t\t}\n\t\treturn (\n\t\t\t<CreateTemplatePartModalContents\n\t\t\t\tblocks={ blocks }\n\t\t\t\tdefaultArea={ item.area }\n\t\t\t\tdefaultTitle={ sprintf(\n\t\t\t\t\t/* translators: %s: Existing template part title */\n\t\t\t\t\t_x( '%s (Copy)', 'template part' ),\n\t\t\t\t\tgetItemTitle( item )\n\t\t\t\t) }\n\t\t\t\tonCreate={ onTemplatePartSuccess }\n\t\t\t\tonError={ closeModal }\n\t\t\t\tconfirmLabel={ _x( 'Duplicate', 'action label' ) }\n\t\t\t\tcloseModal={ closeModal ?? ( () => {} ) }\n\t\t\t/>\n\t\t);\n\t},\n};\n/**\n * Duplicate action for TemplatePart.\n */\nexport default duplicateTemplatePart;\n", "/**\n * WordPress dependencies\n */\nimport {\n\tIcon,\n\tBaseControl,\n\tTextControl,\n\tButton,\n\tModal,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport type { TemplatePartArea } from '@wordpress/core-data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tcheck,\n\tfooter as footerIcon,\n\theader as headerIcon,\n\tsidebar as sidebarIcon,\n\ttableColumnAfter as overlayIcon,\n\tsymbolFilled as symbolFilledIcon,\n} from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\n// @ts-expect-error serialize is not typed\nimport { serialize } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport {\n\tgetCleanTemplatePartSlug,\n\tgetUniqueTemplatePartTitle,\n\tuseExistingTemplateParts,\n} from './utils';\n\nfunction getAreaRadioId( value: string, instanceId: number ) {\n\treturn `fields-create-template-part-modal__area-option-${ value }-${ instanceId }`;\n}\nfunction getAreaRadioDescriptionId( value: string, instanceId: number ) {\n\treturn `fields-create-template-part-modal__area-option-description-${ value }-${ instanceId }`;\n}\n\ntype CreateTemplatePartModalContentsProps = {\n\tdefaultArea?: string;\n\tblocks: any[];\n\tconfirmLabel?: string;\n\tcloseModal: () => void;\n\tonCreate: ( templatePart: any ) => void;\n\tonError?: () => void;\n\tdefaultTitle?: string;\n};\n\n/**\n * A React component that renders a modal for creating a template part. The modal displays a title and the contents for creating the template part.\n * This component should not live in this package, it should be moved to a dedicated package responsible for managing template.\n * @param props The component props.\n * @param props.modalTitle\n */\nexport default function CreateTemplatePartModal( {\n\tmodalTitle,\n\t...restProps\n}: {\n\tmodalTitle?: string;\n} & CreateTemplatePartModalContentsProps ) {\n\tconst defaultModalTitle = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getPostType( 'wp_template_part' )?.labels\n\t\t\t\t?.add_new_item,\n\t\t[]\n\t);\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ modalTitle || defaultModalTitle }\n\t\t\tonRequestClose={ restProps.closeModal }\n\t\t\toverlayClassName=\"fields-create-template-part-modal\"\n\t\t\tfocusOnMount=\"firstContentElement\"\n\t\t\tsize=\"medium\"\n\t\t>\n\t\t\t<CreateTemplatePartModalContents { ...restProps } />\n\t\t</Modal>\n\t);\n}\n\n/**\n * Helper function to retrieve the corresponding icon by area name or icon name.\n *\n * @param {string} areaOrIconName The area name (e.g., 'header', 'navigation-overlay') or icon name (e.g., 'menu').\n *\n * @return {Object} The corresponding icon.\n */\nconst getTemplatePartIcon = ( areaOrIconName: string ) => {\n\t// Handle area names first\n\tif ( 'header' === areaOrIconName ) {\n\t\treturn headerIcon;\n\t} else if ( 'footer' === areaOrIconName ) {\n\t\treturn footerIcon;\n\t} else if ( 'sidebar' === areaOrIconName ) {\n\t\treturn sidebarIcon;\n\t} else if ( 'overlay' === areaOrIconName ) {\n\t\t// TODO: Replace with a proper overlay icon when available.\n\t\t// Using tableColumnAfter as a placeholder.\n\t\treturn overlayIcon;\n\t}\n\t// Handle icon names for backwards compatibility\n\tif ( 'menu' === areaOrIconName ) {\n\t\t// TODO: Replace with a proper overlay icon when available.\n\t\t// Using tableColumnAfter as a placeholder.\n\t\treturn overlayIcon;\n\t}\n\treturn symbolFilledIcon;\n};\n\n/**\n * A React component that renders the content of a model for creating a template part.\n * This component should not live in this package; it should be moved to a dedicated package responsible for managing template.\n *\n * @param {Object} props - The component props.\n * @param {string} [props.defaultArea=uncategorized] - The default area for the template part.\n * @param {Array} [props.blocks=[]] - The blocks to be included in the template part.\n * @param {string} [props.confirmLabel='Add'] - The label for the confirm button.\n * @param {Function} props.closeModal - Function to close the modal.\n * @param {Function} props.onCreate - Function to call when the template part is successfully created.\n * @param {Function} [props.onError] - Function to call when there is an error creating the template part.\n * @param {string} [props.defaultTitle=''] - The default title for the template part.\n */\nexport function CreateTemplatePartModalContents( {\n\tdefaultArea = 'uncategorized',\n\tblocks = [],\n\tconfirmLabel = __( 'Add' ),\n\tcloseModal,\n\tonCreate,\n\tonError,\n\tdefaultTitle = '',\n}: CreateTemplatePartModalContentsProps ) {\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst existingTemplateParts = useExistingTemplateParts();\n\n\tconst [ title, setTitle ] = useState( defaultTitle );\n\tconst [ area, setArea ] = useState( defaultArea );\n\tconst [ isSubmitting, setIsSubmitting ] = useState( false );\n\tconst instanceId = useInstanceId( CreateTemplatePartModal );\n\n\tconst defaultTemplatePartAreas = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getCurrentTheme()?.default_template_part_areas,\n\t\t[]\n\t);\n\n\tasync function createTemplatePart() {\n\t\tif ( ! title || isSubmitting ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tsetIsSubmitting( true );\n\t\t\tconst uniqueTitle = getUniqueTemplatePartTitle(\n\t\t\t\ttitle,\n\t\t\t\texistingTemplateParts\n\t\t\t);\n\t\t\tconst cleanSlug = getCleanTemplatePartSlug( uniqueTitle );\n\n\t\t\tconst templatePart = await saveEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'wp_template_part',\n\t\t\t\t{\n\t\t\t\t\tslug: cleanSlug,\n\t\t\t\t\ttitle: uniqueTitle,\n\t\t\t\t\tcontent: serialize( blocks ),\n\t\t\t\t\tarea,\n\t\t\t\t},\n\t\t\t\t{ throwOnError: true }\n\t\t\t);\n\t\t\tawait onCreate( templatePart );\n\n\t\t\t// TODO: Add a success notice?\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror instanceof Error &&\n\t\t\t\t'code' in error &&\n\t\t\t\terror.message &&\n\t\t\t\terror.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __(\n\t\t\t\t\t\t\t'An error occurred while creating the template part.'\n\t\t\t\t\t );\n\n\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\n\t\t\tonError?.();\n\t\t} finally {\n\t\t\tsetIsSubmitting( false );\n\t\t}\n\t}\n\treturn (\n\t\t<form\n\t\t\tonSubmit={ async ( event ) => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tawait createTemplatePart();\n\t\t\t} }\n\t\t>\n\t\t\t<VStack spacing=\"4\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\tvalue={ title }\n\t\t\t\t\tonChange={ setTitle }\n\t\t\t\t\trequired\n\t\t\t\t/>\n\t\t\t\t<fieldset className=\"fields-create-template-part-modal__area-fieldset\">\n\t\t\t\t\t<BaseControl.VisualLabel as=\"legend\">\n\t\t\t\t\t\t{ __( 'Area' ) }\n\t\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t\t<div className=\"fields-create-template-part-modal__area-radio-group\">\n\t\t\t\t\t\t{ ( defaultTemplatePartAreas ?? [] ).map(\n\t\t\t\t\t\t\t( item: TemplatePartArea ) => {\n\t\t\t\t\t\t\t\tconst icon = getTemplatePartIcon( item.icon );\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tkey={ item.area }\n\t\t\t\t\t\t\t\t\t\tclassName=\"fields-create-template-part-modal__area-radio-wrapper\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\tid={ getAreaRadioId(\n\t\t\t\t\t\t\t\t\t\t\t\titem.area,\n\t\t\t\t\t\t\t\t\t\t\t\tinstanceId\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\tname={ `fields-create-template-part-modal__area-${ instanceId }` }\n\t\t\t\t\t\t\t\t\t\t\tvalue={ item.area }\n\t\t\t\t\t\t\t\t\t\t\tchecked={ area === item.area }\n\t\t\t\t\t\t\t\t\t\t\tonChange={ () => {\n\t\t\t\t\t\t\t\t\t\t\t\tsetArea( item.area );\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\taria-describedby={ getAreaRadioDescriptionId(\n\t\t\t\t\t\t\t\t\t\t\t\titem.area,\n\t\t\t\t\t\t\t\t\t\t\t\tinstanceId\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"fields-create-template-part-modal__area-radio-icon\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<label\n\t\t\t\t\t\t\t\t\t\t\thtmlFor={ getAreaRadioId(\n\t\t\t\t\t\t\t\t\t\t\t\titem.area,\n\t\t\t\t\t\t\t\t\t\t\t\tinstanceId\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"fields-create-template-part-modal__area-radio-label\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ item.label }\n\t\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\ticon={ check }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"fields-create-template-part-modal__area-radio-checkmark\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<p\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"fields-create-template-part-modal__area-radio-description\"\n\t\t\t\t\t\t\t\t\t\t\tid={ getAreaRadioDescriptionId(\n\t\t\t\t\t\t\t\t\t\t\t\titem.area,\n\t\t\t\t\t\t\t\t\t\t\t\tinstanceId\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ item.description }\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t</div>\n\t\t\t\t</fieldset>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tcloseModal();\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\taria-disabled={ ! title || isSubmitting }\n\t\t\t\t\t\tisBusy={ isSubmitting }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ confirmLabel }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t</form>\n\t);\n}\n", "/**\n * External dependencies\n */\nimport { paramCase as kebabCase } from 'change-case';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\n\nexport const useExistingTemplateParts = () => {\n\treturn (\n\t\tuseSelect(\n\t\t\t( select ) =>\n\t\t\t\tselect( coreStore ).getEntityRecords(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_template_part',\n\t\t\t\t\t{\n\t\t\t\t\t\tper_page: -1,\n\t\t\t\t\t}\n\t\t\t\t),\n\t\t\t[]\n\t\t) ?? []\n\t);\n};\n\n/**\n * Return a unique template part title based on\n * the given title and existing template parts.\n *\n * @param {string} title The original template part title.\n * @param {Object} templateParts The array of template part entities.\n * @return {string} A unique template part title.\n */\nexport const getUniqueTemplatePartTitle = ( title, templateParts ) => {\n\tconst lowercaseTitle = title.toLowerCase();\n\tconst existingTitles = templateParts.map( ( templatePart ) =>\n\t\ttemplatePart.title.rendered.toLowerCase()\n\t);\n\n\tif ( ! existingTitles.includes( lowercaseTitle ) ) {\n\t\treturn title;\n\t}\n\n\tlet suffix = 2;\n\twhile ( existingTitles.includes( `${ lowercaseTitle } ${ suffix }` ) ) {\n\t\tsuffix++;\n\t}\n\n\treturn `${ title } ${ suffix }`;\n};\n\n/**\n * Get a valid slug for a template part.\n * Currently template parts only allow latin chars.\n * The fallback slug will receive suffix by default.\n *\n * @param {string} title The template part title.\n * @return {string} A valid template part slug.\n */\nexport const getCleanTemplatePartSlug = ( title ) => {\n\treturn kebabCase( title ).replace( /[^\\w-]+/g, '' ) || 'wp-custom-part';\n};\n", "/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport type { BasePost } from '@wordpress/fields';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport PostPreviewView from './content-preview-view';\n\nconst postPreviewField: Field< BasePost > = {\n\ttype: 'media',\n\tid: 'content-preview',\n\tlabel: __( 'Content preview' ),\n\trender: PostPreviewView,\n\tenableSorting: false,\n};\n\nexport default postPreviewField;\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t// @ts-ignore\n\tBlockPreview,\n\t// @ts-ignore\n} from '@wordpress/block-editor';\nimport type { BasePost } from '@wordpress/fields';\nimport { useSelect } from '@wordpress/data';\nimport { useEntityBlockEditor, store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { EditorProvider } from '../../../components/provider';\nimport { useStyle } from '../../../components/global-styles';\nimport { unlock } from '../../../lock-unlock';\n// @ts-ignore\nimport { store as editorStore } from '../../../store';\n\nfunction PostPreviewContainer( {\n\ttemplate,\n\tpost,\n}: {\n\ttemplate: any;\n\tpost: any;\n} ) {\n\tconst [ backgroundColor = 'white' ] = useStyle( 'color.background' );\n\tconst [ postBlocks ] = useEntityBlockEditor( 'postType', post.type, {\n\t\tid: post.id,\n\t} );\n\tconst [ templateBlocks ] = useEntityBlockEditor(\n\t\t'postType',\n\t\ttemplate?.type,\n\t\t{\n\t\t\tid: template?.id,\n\t\t}\n\t);\n\tconst blocks = template && templateBlocks ? templateBlocks : postBlocks;\n\tconst isEmpty = ! blocks?.length;\n\treturn (\n\t\t<div\n\t\t\tclassName=\"editor-fields-content-preview\"\n\t\t\tstyle={ {\n\t\t\t\tbackgroundColor,\n\t\t\t} }\n\t\t>\n\t\t\t{ isEmpty && (\n\t\t\t\t<span className=\"editor-fields-content-preview__empty\">\n\t\t\t\t\t{ __( 'Empty content' ) }\n\t\t\t\t</span>\n\t\t\t) }\n\t\t\t{ ! isEmpty && (\n\t\t\t\t<BlockPreview.Async>\n\t\t\t\t\t<BlockPreview blocks={ blocks } />\n\t\t\t\t</BlockPreview.Async>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport default function PostPreviewView( { item }: { item: BasePost } ) {\n\tconst { settings, template } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { canUser, getPostType, getTemplateId, getEntityRecord } =\n\t\t\t\tunlock( select( coreStore ) );\n\t\t\tconst canViewTemplate = canUser( 'read', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} );\n\t\t\tconst _settings = select( editorStore ).getEditorSettings();\n\t\t\t// @ts-ignore\n\t\t\tconst supportsTemplateMode = _settings.supportsTemplateMode;\n\t\t\tconst isViewable = getPostType( item.type )?.viewable ?? false;\n\n\t\t\tconst templateId =\n\t\t\t\tsupportsTemplateMode && isViewable && canViewTemplate\n\t\t\t\t\t? getTemplateId( item.type, item.id )\n\t\t\t\t\t: null;\n\t\t\treturn {\n\t\t\t\tsettings: _settings,\n\t\t\t\ttemplate: templateId\n\t\t\t\t\t? getEntityRecord( 'postType', 'wp_template', templateId )\n\t\t\t\t\t: undefined,\n\t\t\t};\n\t\t},\n\t\t[ item.type, item.id ]\n\t);\n\t// Wrap everything in a block editor provider to ensure 'styles' that are needed\n\t// for the previews are synced between the site editor store and the block editor store.\n\t// Additionally we need to have the `__experimentalBlockPatterns` setting in order to\n\t// render patterns inside the previews.\n\t// TODO: Same approach is used in the patterns list and it becomes obvious that some of\n\t// the block editor settings are needed in context where we don't have the block editor.\n\t// Explore how we can solve this in a better way.\n\treturn (\n\t\t<EditorProvider\n\t\t\tpost={ item }\n\t\t\tsettings={ settings }\n\t\t\t__unstableTemplate={ template }\n\t\t>\n\t\t\t<PostPreviewContainer template={ template } post={ item } />\n\t\t</EditorProvider>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useEffect, useLayoutEffect, useMemo } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tEntityProvider,\n\tuseEntityBlockEditor,\n\tstore as coreStore,\n} from '@wordpress/core-data';\nimport {\n\tBlockEditorProvider,\n\tBlockContextProvider,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { privateApis as editPatternsPrivateApis } from '@wordpress/patterns';\nimport { createBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport withRegistryProvider from './with-registry-provider';\nimport { store as editorStore } from '../../store';\nimport useBlockEditorSettings from './use-block-editor-settings';\nimport { unlock } from '../../lock-unlock';\nimport DisableNonPageContentBlocks from './disable-non-page-content-blocks';\nimport NavigationBlockEditingMode from './navigation-block-editing-mode';\nimport { useHideBlocksFromInserter } from './use-hide-blocks-from-inserter';\nimport useCommands from '../commands';\nimport BlockRemovalWarnings from '../block-removal-warnings';\nimport StartPageOptions from '../start-page-options';\nimport KeyboardShortcutHelpModal from '../keyboard-shortcut-help-modal';\nimport StartTemplateOptions from '../start-template-options';\nimport EditorKeyboardShortcuts from '../global-keyboard-shortcuts';\nimport PatternRenameModal from '../pattern-rename-modal';\nimport PatternDuplicateModal from '../pattern-duplicate-modal';\nimport TemplatePartMenuItems from '../template-part-menu-items';\n\nconst { ExperimentalBlockEditorProvider } = unlock( blockEditorPrivateApis );\nconst { PatternsMenuItems } = unlock( editPatternsPrivateApis );\n\nconst noop = () => {};\n\n/**\n * These are global entities that are only there to split blocks into logical units\n * They don't provide a \"context\" for the current post/page being rendered.\n * So we should not use their ids as post context. This is important to allow post blocks\n * (post content, post title) to be used within them without issues.\n */\nconst NON_CONTEXTUAL_POST_TYPES = [\n\t'wp_block',\n\t'wp_navigation',\n\t'wp_template_part',\n];\n\n/**\n * Depending on the post, template and template mode,\n * returns the appropriate blocks and change handlers for the block editor provider.\n *\n * @param {Array} post Block list.\n * @param {boolean} template Whether the page content has focus (and the surrounding template is inert). If `true` return page content blocks. Default `false`.\n * @param {string} mode Rendering mode.\n *\n * @example\n * ```jsx\n * const [ blocks, onInput, onChange ] = useBlockEditorProps( post, template, mode );\n * ```\n *\n * @return {Array} Block editor props.\n */\nfunction useBlockEditorProps( post, template, mode ) {\n\tconst rootLevelPost = mode === 'template-locked' ? 'template' : 'post';\n\tconst [ postBlocks, onInput, onChange ] = useEntityBlockEditor(\n\t\t'postType',\n\t\tpost.type,\n\t\t{ id: post.id }\n\t);\n\tconst [ templateBlocks, onInputTemplate, onChangeTemplate ] =\n\t\tuseEntityBlockEditor( 'postType', template?.type, {\n\t\t\tid: template?.id,\n\t\t} );\n\tconst maybeNavigationBlocks = useMemo( () => {\n\t\tif ( post.type === 'wp_navigation' ) {\n\t\t\treturn [\n\t\t\t\tcreateBlock( 'core/navigation', {\n\t\t\t\t\tref: post.id,\n\t\t\t\t\t// As the parent editor is locked with `templateLock`, the template locking\n\t\t\t\t\t// must be explicitly \"unset\" on the block itself to allow the user to modify\n\t\t\t\t\t// the block's content.\n\t\t\t\t\ttemplateLock: false,\n\t\t\t\t} ),\n\t\t\t];\n\t\t}\n\t}, [ post.type, post.id ] );\n\n\t// It is important that we don't create a new instance of blocks on every change\n\t// We should only create a new instance if the blocks them selves change, not a dependency of them.\n\tconst blocks = useMemo( () => {\n\t\tif ( maybeNavigationBlocks ) {\n\t\t\treturn maybeNavigationBlocks;\n\t\t}\n\n\t\tif ( rootLevelPost === 'template' ) {\n\t\t\treturn templateBlocks;\n\t\t}\n\n\t\treturn postBlocks;\n\t}, [ maybeNavigationBlocks, rootLevelPost, templateBlocks, postBlocks ] );\n\n\t// Handle fallback to postBlocks outside of the above useMemo, to ensure\n\t// that constructed block templates that call `createBlock` are not generated\n\t// too frequently. This ensures that clientIds are stable.\n\tconst disableRootLevelChanges =\n\t\t( !! template && mode === 'template-locked' ) ||\n\t\tpost.type === 'wp_navigation';\n\tif ( disableRootLevelChanges ) {\n\t\treturn [ blocks, noop, noop ];\n\t}\n\n\treturn [\n\t\tblocks,\n\t\trootLevelPost === 'post' ? onInput : onInputTemplate,\n\t\trootLevelPost === 'post' ? onChange : onChangeTemplate,\n\t];\n}\n\n/**\n * This component provides the editor context and manages the state of the block editor.\n *\n * @param {Object} props The component props.\n * @param {Object} props.post The post object.\n * @param {Object} props.settings The editor settings.\n * @param {boolean} props.recovery Indicates if the editor is in recovery mode.\n * @param {Array} props.initialEdits The initial edits for the editor.\n * @param {Object} props.children The child components.\n * @param {Object} [props.BlockEditorProviderComponent] The block editor provider component to use. Defaults to ExperimentalBlockEditorProvider.\n * @param {Object} [props.__unstableTemplate] The template object.\n *\n * @example\n * ```jsx\n * <ExperimentalEditorProvider\n * post={ post }\n * settings={ settings }\n * recovery={ recovery }\n * initialEdits={ initialEdits }\n * __unstableTemplate={ template }\n * >\n * { children }\n * </ExperimentalEditorProvider>\n *\n * @return {Object} The rendered ExperimentalEditorProvider component.\n */\nexport const ExperimentalEditorProvider = withRegistryProvider(\n\t( {\n\t\tpost,\n\t\tsettings,\n\t\trecovery,\n\t\tinitialEdits,\n\t\tchildren,\n\t\tBlockEditorProviderComponent = ExperimentalBlockEditorProvider,\n\t\t__unstableTemplate: template,\n\t} ) => {\n\t\tconst hasTemplate = !! template;\n\t\tconst {\n\t\t\teditorSettings,\n\t\t\tselection,\n\t\t\tisReady,\n\t\t\tmode,\n\t\t\tdefaultMode,\n\t\t\tpostTypeEntities,\n\t\t} = useSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst {\n\t\t\t\t\tgetEditorSettings,\n\t\t\t\t\tgetEditorSelection,\n\t\t\t\t\tgetRenderingMode,\n\t\t\t\t\t__unstableIsEditorReady,\n\t\t\t\t\tgetDefaultRenderingMode,\n\t\t\t\t} = unlock( select( editorStore ) );\n\t\t\t\tconst { getEntitiesConfig } = select( coreStore );\n\n\t\t\t\tconst _mode = getRenderingMode();\n\t\t\t\tconst _defaultMode = getDefaultRenderingMode( post.type );\n\t\t\t\t/**\n\t\t\t\t * To avoid content \"flash\", wait until rendering mode has been resolved.\n\t\t\t\t * This is important for the initial render of the editor.\n\t\t\t\t *\n\t\t\t\t * - Wait for template to be resolved if the default mode is 'template-locked'.\n\t\t\t\t * - Wait for default mode to be resolved otherwise.\n\t\t\t\t */\n\t\t\t\tconst hasResolvedDefaultMode =\n\t\t\t\t\t_defaultMode === 'template-locked'\n\t\t\t\t\t\t? hasTemplate\n\t\t\t\t\t\t: _defaultMode !== undefined;\n\t\t\t\t// Wait until the default mode is retrieved and start rendering canvas.\n\t\t\t\tconst isRenderingModeReady = _defaultMode !== undefined;\n\n\t\t\t\treturn {\n\t\t\t\t\teditorSettings: getEditorSettings(),\n\t\t\t\t\tisReady: __unstableIsEditorReady(),\n\t\t\t\t\tmode: isRenderingModeReady ? _mode : undefined,\n\t\t\t\t\tdefaultMode: hasResolvedDefaultMode\n\t\t\t\t\t\t? _defaultMode\n\t\t\t\t\t\t: undefined,\n\t\t\t\t\tselection: getEditorSelection(),\n\t\t\t\t\tpostTypeEntities:\n\t\t\t\t\t\tpost.type === 'wp_template'\n\t\t\t\t\t\t\t? getEntitiesConfig( 'postType' )\n\t\t\t\t\t\t\t: null,\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ post.type, hasTemplate ]\n\t\t);\n\n\t\tconst shouldRenderTemplate = hasTemplate && mode !== 'post-only';\n\t\tconst rootLevelPost = shouldRenderTemplate ? template : post;\n\t\tconst defaultBlockContext = useMemo( () => {\n\t\t\tconst postContext = {};\n\t\t\t// If it is a template, try to inherit the post type from the name.\n\t\t\tif ( post.type === 'wp_template' ) {\n\t\t\t\tif ( post.slug === 'page' ) {\n\t\t\t\t\tpostContext.postType = 'page';\n\t\t\t\t} else if ( post.slug === 'single' ) {\n\t\t\t\t\tpostContext.postType = 'post';\n\t\t\t\t} else if ( post.slug.split( '-' )[ 0 ] === 'single' ) {\n\t\t\t\t\t// If the slug is single-{postType}, infer the post type from the name.\n\t\t\t\t\tconst postTypeNames =\n\t\t\t\t\t\tpostTypeEntities?.map( ( entity ) => entity.name ) ||\n\t\t\t\t\t\t[];\n\t\t\t\t\tconst match = post.slug.match(\n\t\t\t\t\t\t`^single-(${ postTypeNames.join( '|' ) })(?:-.+)?$`\n\t\t\t\t\t);\n\t\t\t\t\tif ( match ) {\n\t\t\t\t\t\tpostContext.postType = match[ 1 ];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (\n\t\t\t\t! NON_CONTEXTUAL_POST_TYPES.includes( rootLevelPost.type ) ||\n\t\t\t\tshouldRenderTemplate\n\t\t\t) {\n\t\t\t\tpostContext.postId = post.id;\n\t\t\t\tpostContext.postType = post.type;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...postContext,\n\t\t\t\ttemplateSlug:\n\t\t\t\t\trootLevelPost.type === 'wp_template'\n\t\t\t\t\t\t? rootLevelPost.slug\n\t\t\t\t\t\t: undefined,\n\t\t\t};\n\t\t}, [\n\t\t\tshouldRenderTemplate,\n\t\t\tpost.id,\n\t\t\tpost.type,\n\t\t\tpost.slug,\n\t\t\trootLevelPost.type,\n\t\t\trootLevelPost.slug,\n\t\t\tpostTypeEntities,\n\t\t] );\n\t\tconst { id, type } = rootLevelPost;\n\t\tconst blockEditorSettings = useBlockEditorSettings(\n\t\t\teditorSettings,\n\t\t\ttype,\n\t\t\tid,\n\t\t\tmode\n\t\t);\n\t\tconst [ blocks, onInput, onChange ] = useBlockEditorProps(\n\t\t\tpost,\n\t\t\ttemplate,\n\t\t\tmode\n\t\t);\n\n\t\tconst {\n\t\t\tupdatePostLock,\n\t\t\tsetupEditor,\n\t\t\tupdateEditorSettings,\n\t\t\tsetCurrentTemplateId,\n\t\t\tsetEditedPost,\n\t\t\tsetRenderingMode,\n\t\t} = unlock( useDispatch( editorStore ) );\n\t\tconst { createWarningNotice, removeNotice } =\n\t\t\tuseDispatch( noticesStore );\n\n\t\t// Ideally this should be synced on each change and not just something you do once.\n\t\tuseLayoutEffect( () => {\n\t\t\t// Assume that we don't need to initialize in the case of an error recovery.\n\t\t\tif ( recovery ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tupdatePostLock( settings.postLock );\n\t\t\tsetupEditor( post, initialEdits, settings.template );\n\t\t\tif ( settings.autosave ) {\n\t\t\t\tcreateWarningNotice(\n\t\t\t\t\t__(\n\t\t\t\t\t\t'There is an autosave of this post that is more recent than the version below.'\n\t\t\t\t\t),\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'autosave-exists',\n\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'View the autosave' ),\n\t\t\t\t\t\t\t\turl: settings.autosave.editLink,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// The dependencies of the hook are omitted deliberately\n\t\t\t// We only want to run setupEditor (with initialEdits) only once per post.\n\t\t\t// A better solution in the future would be to split this effect into multiple ones.\n\t\t}, [] );\n\n\t\t// Synchronizes the active post with the state\n\t\tuseEffect( () => {\n\t\t\tsetEditedPost( post.type, post.id );\n\t\t\tif (\n\t\t\t\ttypeof window !== 'undefined' &&\n\t\t\t\twindow.__experimentalTemplateActivate\n\t\t\t) {\n\t\t\t\t// Clear any notices dependent on the post context.\n\t\t\t\tremoveNotice( 'template-activate-notice' );\n\t\t\t}\n\n\t\t\treturn () => setEditedPost( null, null );\n\t\t}, [ post.type, post.id, setEditedPost, removeNotice ] );\n\n\t\t// Synchronize the editor settings as they change.\n\t\tuseEffect( () => {\n\t\t\tupdateEditorSettings( settings );\n\t\t}, [ settings, updateEditorSettings ] );\n\n\t\t// Synchronizes the active template with the state.\n\t\tuseEffect( () => {\n\t\t\tsetCurrentTemplateId( template?.id );\n\t\t}, [ template?.id, setCurrentTemplateId ] );\n\n\t\t// Sets the right rendering mode when loading the editor.\n\t\tuseEffect( () => {\n\t\t\tif ( defaultMode ) {\n\t\t\t\tsetRenderingMode( defaultMode );\n\t\t\t}\n\t\t}, [ defaultMode, setRenderingMode ] );\n\n\t\tuseHideBlocksFromInserter( post.type, mode );\n\n\t\t// Register the editor commands.\n\t\tuseCommands();\n\n\t\tif ( ! isReady || ! mode ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<EntityProvider kind=\"root\" type=\"site\">\n\t\t\t\t<EntityProvider\n\t\t\t\t\tkind=\"postType\"\n\t\t\t\t\ttype={ post.type }\n\t\t\t\t\tid={ post.id }\n\t\t\t\t>\n\t\t\t\t\t<BlockContextProvider value={ defaultBlockContext }>\n\t\t\t\t\t\t<BlockEditorProviderComponent\n\t\t\t\t\t\t\tvalue={ blocks }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tonInput={ onInput }\n\t\t\t\t\t\t\tselection={ selection }\n\t\t\t\t\t\t\tsettings={ blockEditorSettings }\n\t\t\t\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t\t{ ! settings.isPreviewMode && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<PatternsMenuItems />\n\t\t\t\t\t\t\t\t\t<TemplatePartMenuItems />\n\t\t\t\t\t\t\t\t\t{ mode === 'template-locked' && (\n\t\t\t\t\t\t\t\t\t\t<DisableNonPageContentBlocks />\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ type === 'wp_navigation' && (\n\t\t\t\t\t\t\t\t\t\t<NavigationBlockEditingMode />\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t<EditorKeyboardShortcuts />\n\t\t\t\t\t\t\t\t\t<KeyboardShortcutHelpModal />\n\t\t\t\t\t\t\t\t\t<BlockRemovalWarnings />\n\t\t\t\t\t\t\t\t\t<StartPageOptions />\n\t\t\t\t\t\t\t\t\t<StartTemplateOptions />\n\t\t\t\t\t\t\t\t\t<PatternRenameModal />\n\t\t\t\t\t\t\t\t\t<PatternDuplicateModal />\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</BlockEditorProviderComponent>\n\t\t\t\t\t</BlockContextProvider>\n\t\t\t\t</EntityProvider>\n\t\t\t</EntityProvider>\n\t\t);\n\t}\n);\n\n/**\n * This component establishes a new post editing context, and serves as the entry point for a new post editor (or post with template editor).\n *\n * It supports a large number of post types, including post, page, templates,\n * custom post types, patterns, template parts.\n *\n * All modification and changes are performed to the `@wordpress/core-data` store.\n *\n * @param {Object} props The component props.\n * @param {Object} [props.post] The post object to edit. This is required.\n * @param {Object} [props.__unstableTemplate] The template object wrapper the edited post.\n * This is optional and can only be used when the post type supports templates (like posts and pages).\n * @param {Object} [props.settings] The settings object to use for the editor.\n * This is optional and can be used to override the default settings.\n * @param {React.ReactNode} [props.children] Children elements for which the BlockEditorProvider context should apply.\n * This is optional.\n *\n * @example\n * ```jsx\n * <EditorProvider\n * post={ post }\n * settings={ settings }\n * __unstableTemplate={ template }\n * >\n * { children }\n * </EditorProvider>\n * ```\n *\n * @return {React.ReactNode} The rendered EditorProvider component.\n */\nexport function EditorProvider( props ) {\n\treturn (\n\t\t<ExperimentalEditorProvider\n\t\t\t{ ...props }\n\t\t\tBlockEditorProviderComponent={ BlockEditorProvider }\n\t\t>\n\t\t\t{ props.children }\n\t\t</ExperimentalEditorProvider>\n\t);\n}\n\nexport default EditorProvider;\n", "/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { useRegistry, createRegistry, RegistryProvider } from '@wordpress/data';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { storeConfig as blockEditorStoreConfig } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { storeConfig } from '../../store';\n\nfunction getSubRegistry( subRegistries, registry, useSubRegistry ) {\n\tif ( ! useSubRegistry ) {\n\t\treturn registry;\n\t}\n\tlet subRegistry = subRegistries.get( registry );\n\tif ( ! subRegistry ) {\n\t\tsubRegistry = createRegistry(\n\t\t\t{\n\t\t\t\t'core/block-editor': blockEditorStoreConfig,\n\t\t\t},\n\t\t\tregistry\n\t\t);\n\t\t// Todo: The interface store should also be created per instance.\n\t\tsubRegistry.registerStore( 'core/editor', storeConfig );\n\t\tsubRegistries.set( registry, subRegistry );\n\t}\n\treturn subRegistry;\n}\n\nconst withRegistryProvider = createHigherOrderComponent(\n\t( WrappedComponent ) =>\n\t\t( { useSubRegistry = true, ...props } ) => {\n\t\t\tconst registry = useRegistry();\n\t\t\tconst [ subRegistries ] = useState( () => new WeakMap() );\n\t\t\tconst subRegistry = getSubRegistry(\n\t\t\t\tsubRegistries,\n\t\t\t\tregistry,\n\t\t\t\tuseSubRegistry\n\t\t\t);\n\n\t\t\tif ( subRegistry === registry ) {\n\t\t\t\treturn <WrappedComponent registry={ registry } { ...props } />;\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t<RegistryProvider value={ subRegistry }>\n\t\t\t\t\t<WrappedComponent registry={ subRegistry } { ...props } />\n\t\t\t\t</RegistryProvider>\n\t\t\t);\n\t\t},\n\t'withRegistryProvider'\n);\n\nexport default withRegistryProvider;\n", "/**\n * WordPress dependencies\n */\nimport { useMemo, useCallback } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tstore as coreStore,\n\t__experimentalFetchLinkSuggestions as fetchLinkSuggestions,\n\t__experimentalFetchUrlData as fetchUrlData,\n\tprivateApis as coreDataPrivateApis,\n} from '@wordpress/core-data';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tprivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport inserterMediaCategories from '../media-categories';\nimport { mediaUpload } from '../../utils';\nimport { default as mediaSideload } from '../../utils/media-sideload';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { useGlobalStylesContext } from '../global-styles-provider';\n\nconst EMPTY_OBJECT = {};\n\nfunction __experimentalReusableBlocksSelect( select ) {\n\tconst { RECEIVE_INTERMEDIATE_RESULTS } = unlock( coreDataPrivateApis );\n\tconst { getEntityRecords } = select( coreStore );\n\treturn getEntityRecords( 'postType', 'wp_block', {\n\t\tper_page: -1,\n\t\t[ RECEIVE_INTERMEDIATE_RESULTS ]: true,\n\t} );\n}\n\nconst BLOCK_EDITOR_SETTINGS = [\n\t'__experimentalBlockBindingsSupportedAttributes',\n\t'__experimentalBlockDirectory',\n\t'__experimentalDiscussionSettings',\n\t'__experimentalFeatures',\n\t'__experimentalGlobalStylesBaseStyles',\n\t'alignWide',\n\t'blockInspectorTabs',\n\t'maxUploadFileSize',\n\t'allowedMimeTypes',\n\t'bodyPlaceholder',\n\t'canLockBlocks',\n\t'canUpdateBlockBindings',\n\t'capabilities',\n\t'clearBlockSelection',\n\t'codeEditingEnabled',\n\t'colors',\n\t'disableCustomColors',\n\t'disableCustomFontSizes',\n\t'disableCustomSpacingSizes',\n\t'disableCustomGradients',\n\t'disableLayoutStyles',\n\t'enableCustomLineHeight',\n\t'enableCustomSpacing',\n\t'enableCustomUnits',\n\t'enableOpenverseMediaCategory',\n\t'fontSizes',\n\t'gradients',\n\t'generateAnchors',\n\t'onNavigateToEntityRecord',\n\t'imageDefaultSize',\n\t'imageDimensions',\n\t'imageEditing',\n\t'imageSizes',\n\t'isPreviewMode',\n\t'isRTL',\n\t'locale',\n\t'maxWidth',\n\t'postContentAttributes',\n\t'postsPerPage',\n\t'readOnly',\n\t'styles',\n\t'titlePlaceholder',\n\t'supportsLayout',\n\t'widgetTypesToHideFromLegacyWidgetBlock',\n\t'__unstableHasCustomAppender',\n\t'__unstableResolvedAssets',\n\t'__unstableIsBlockBasedTheme',\n];\n\nconst {\n\tglobalStylesDataKey,\n\tglobalStylesLinksDataKey,\n\tselectBlockPatternsKey,\n\treusableBlocksSelectKey,\n\tsectionRootClientIdKey,\n\tmediaEditKey,\n\tgetMediaSelectKey,\n\tisIsolatedEditorKey,\n\tdeviceTypeKey,\n} = unlock( privateApis );\n\n/**\n * React hook used to compute the block editor settings to use for the post editor.\n *\n * @param {Object} settings EditorProvider settings prop.\n * @param {string} postType Editor root level post type.\n * @param {string} postId Editor root level post ID.\n * @param {string} renderingMode Editor rendering mode.\n *\n * @return {Object} Block Editor Settings.\n */\nfunction useBlockEditorSettings( settings, postType, postId, renderingMode ) {\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst {\n\t\tallowRightClickOverrides,\n\t\tblockTypes,\n\t\tfocusMode,\n\t\thasFixedToolbar,\n\t\tisDistractionFree,\n\t\tkeepCaretInsideBlock,\n\t\thasUploadPermissions,\n\t\thiddenBlockTypes,\n\t\tcanUseUnfilteredHTML,\n\t\tuserCanCreatePages,\n\t\tpageOnFront,\n\t\tpageForPosts,\n\t\tuserPatternCategories,\n\t\trestBlockPatternCategories,\n\t\tsectionRootClientId,\n\t\tdeviceType,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tcanUser,\n\t\t\t\tgetRawEntityRecord,\n\t\t\t\tgetEntityRecord,\n\t\t\t\tgetUserPatternCategories,\n\t\t\t\tgetBlockPatternCategories,\n\t\t\t} = select( coreStore );\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\tconst { getBlockTypes } = select( blocksStore );\n\t\t\tconst { getDeviceType } = unlock( select( editorStore ) );\n\t\t\tconst { getBlocksByName, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst siteSettings = canUser( 'read', {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'site',\n\t\t\t} )\n\t\t\t\t? getEntityRecord( 'root', 'site' )\n\t\t\t\t: undefined;\n\n\t\t\tfunction getSectionRootBlock() {\n\t\t\t\tif ( renderingMode === 'template-locked' ) {\n\t\t\t\t\treturn getBlocksByName( 'core/post-content' )?.[ 0 ] ?? '';\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\tgetBlocksByName( 'core/group' ).find(\n\t\t\t\t\t\t( clientId ) =>\n\t\t\t\t\t\t\tgetBlockAttributes( clientId )?.tagName === 'main'\n\t\t\t\t\t) ?? ''\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tallowRightClickOverrides: get(\n\t\t\t\t\t'core',\n\t\t\t\t\t'allowRightClickOverrides'\n\t\t\t\t),\n\t\t\t\tblockTypes: getBlockTypes(),\n\t\t\t\tcanUseUnfilteredHTML: getRawEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId\n\t\t\t\t)?._links?.hasOwnProperty( 'wp:action-unfiltered-html' ),\n\t\t\t\tfocusMode: get( 'core', 'focusMode' ),\n\t\t\t\thasFixedToolbar:\n\t\t\t\t\tget( 'core', 'fixedToolbar' ) || ! isLargeViewport,\n\t\t\t\thiddenBlockTypes: get( 'core', 'hiddenBlockTypes' ),\n\t\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\t\tkeepCaretInsideBlock: get( 'core', 'keepCaretInsideBlock' ),\n\t\t\t\thasUploadPermissions:\n\t\t\t\t\tcanUser( 'create', {\n\t\t\t\t\t\tkind: 'postType',\n\t\t\t\t\t\tname: 'attachment',\n\t\t\t\t\t} ) ?? true,\n\t\t\t\tuserCanCreatePages: canUser( 'create', {\n\t\t\t\t\tkind: 'postType',\n\t\t\t\t\tname: 'page',\n\t\t\t\t} ),\n\t\t\t\tpageOnFront: siteSettings?.page_on_front,\n\t\t\t\tpageForPosts: siteSettings?.page_for_posts,\n\t\t\t\tuserPatternCategories: getUserPatternCategories(),\n\t\t\t\trestBlockPatternCategories: getBlockPatternCategories(),\n\t\t\t\tsectionRootClientId: getSectionRootBlock(),\n\t\t\t\tdeviceType: getDeviceType(),\n\t\t\t};\n\t\t},\n\t\t[ postType, postId, isLargeViewport, renderingMode ]\n\t);\n\n\tconst { merged: mergedGlobalStyles } = useGlobalStylesContext();\n\tconst globalStylesData = mergedGlobalStyles.styles ?? EMPTY_OBJECT;\n\tconst globalStylesLinksData = mergedGlobalStyles._links ?? EMPTY_OBJECT;\n\n\tconst settingsBlockPatterns =\n\t\tsettings.__experimentalAdditionalBlockPatterns ?? // WP 6.0\n\t\tsettings.__experimentalBlockPatterns; // WP 5.9\n\tconst settingsBlockPatternCategories =\n\t\tsettings.__experimentalAdditionalBlockPatternCategories ?? // WP 6.0\n\t\tsettings.__experimentalBlockPatternCategories; // WP 5.9\n\n\tconst blockPatterns = useMemo(\n\t\t() =>\n\t\t\t[ ...( settingsBlockPatterns || [] ) ].filter(\n\t\t\t\t( { postTypes } ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t! postTypes ||\n\t\t\t\t\t\t( Array.isArray( postTypes ) &&\n\t\t\t\t\t\t\tpostTypes.includes( postType ) )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t),\n\t\t[ settingsBlockPatterns, postType ]\n\t);\n\n\tconst blockPatternCategories = useMemo(\n\t\t() =>\n\t\t\t[\n\t\t\t\t...( settingsBlockPatternCategories || [] ),\n\t\t\t\t...( restBlockPatternCategories || [] ),\n\t\t\t].filter(\n\t\t\t\t( x, index, arr ) =>\n\t\t\t\t\tindex === arr.findIndex( ( y ) => x.name === y.name )\n\t\t\t),\n\t\t[ settingsBlockPatternCategories, restBlockPatternCategories ]\n\t);\n\n\tconst { undo, setIsInserterOpened } = useDispatch( editorStore );\n\tconst { editMediaEntity } = unlock( useDispatch( coreStore ) );\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\n\t/**\n\t * Creates a Post entity.\n\t * This is utilised by the Link UI to allow for on-the-fly creation of Posts/Pages.\n\t *\n\t * @param {Object} options parameters for the post being created. These mirror those used on 3rd param of saveEntityRecord.\n\t * @return {Object} the post type object that was created.\n\t */\n\tconst createPageEntity = useCallback(\n\t\t( options ) => {\n\t\t\tif ( ! userCanCreatePages ) {\n\t\t\t\treturn Promise.reject( {\n\t\t\t\t\tmessage: __(\n\t\t\t\t\t\t'You do not have permission to create Pages.'\n\t\t\t\t\t),\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn saveEntityRecord( 'postType', 'page', options );\n\t\t},\n\t\t[ saveEntityRecord, userCanCreatePages ]\n\t);\n\n\tconst { getSelectedBlockClientId } = useSelect( blockEditorStore );\n\n\t/**\n\t * Wraps onNavigateToEntityRecord to automatically include the currently selected block.\n\t * This ensures that navigation can restore the selection when returning to the previous entity.\n\t */\n\tconst wrappedOnNavigateToEntityRecord = useCallback(\n\t\t( params ) => {\n\t\t\tif ( ! settings.onNavigateToEntityRecord ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\n\t\t\treturn settings.onNavigateToEntityRecord( {\n\t\t\t\t...params,\n\t\t\t\tselectedBlockClientId,\n\t\t\t} );\n\t\t},\n\t\t[ settings, getSelectedBlockClientId ]\n\t);\n\n\tconst allowedBlockTypes = useMemo( () => {\n\t\t// Omit hidden block types if exists and non-empty.\n\t\tif ( hiddenBlockTypes && hiddenBlockTypes.length > 0 ) {\n\t\t\t// Defer to passed setting for `allowedBlockTypes` if provided as\n\t\t\t// anything other than `true` (where `true` is equivalent to allow\n\t\t\t// all block types).\n\t\t\tconst defaultAllowedBlockTypes =\n\t\t\t\ttrue === settings.allowedBlockTypes\n\t\t\t\t\t? blockTypes.map( ( { name } ) => name )\n\t\t\t\t\t: settings.allowedBlockTypes || [];\n\n\t\t\treturn defaultAllowedBlockTypes.filter(\n\t\t\t\t( type ) => ! hiddenBlockTypes.includes( type )\n\t\t\t);\n\t\t}\n\n\t\treturn settings.allowedBlockTypes;\n\t}, [ settings.allowedBlockTypes, hiddenBlockTypes, blockTypes ] );\n\n\tconst forceDisableFocusMode = settings.focusMode === false;\n\n\treturn useMemo( () => {\n\t\tconst blockEditorSettings = {\n\t\t\t...Object.fromEntries(\n\t\t\t\tObject.entries( settings )\n\t\t\t\t\t.filter( ( [ key ] ) =>\n\t\t\t\t\t\tBLOCK_EDITOR_SETTINGS.includes( key )\n\t\t\t\t\t)\n\t\t\t\t\t// Exclude onNavigateToEntityRecord since we're wrapping it\n\t\t\t\t\t.filter( ( [ key ] ) => key !== 'onNavigateToEntityRecord' )\n\t\t\t),\n\t\t\t[ globalStylesDataKey ]: globalStylesData,\n\t\t\t[ globalStylesLinksDataKey ]: globalStylesLinksData,\n\t\t\tallowedBlockTypes,\n\t\t\tallowRightClickOverrides,\n\t\t\tfocusMode: focusMode && ! forceDisableFocusMode,\n\t\t\thasFixedToolbar,\n\t\t\tisDistractionFree,\n\t\t\tkeepCaretInsideBlock,\n\t\t\tonNavigateToEntityRecord: settings.onNavigateToEntityRecord\n\t\t\t\t? wrappedOnNavigateToEntityRecord\n\t\t\t\t: undefined,\n\t\t\t[ getMediaSelectKey ]: ( select, attachmentId ) => {\n\t\t\t\treturn select( coreStore ).getEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'attachment',\n\t\t\t\t\tattachmentId\n\t\t\t\t);\n\t\t\t},\n\t\t\t[ mediaEditKey ]: hasUploadPermissions\n\t\t\t\t? editMediaEntity\n\t\t\t\t: undefined,\n\t\t\tmediaUpload: hasUploadPermissions ? mediaUpload : undefined,\n\t\t\tmediaSideload: hasUploadPermissions ? mediaSideload : undefined,\n\t\t\t__experimentalBlockPatterns: blockPatterns,\n\t\t\t[ selectBlockPatternsKey ]: ( select ) => {\n\t\t\t\tconst { hasFinishedResolution, getBlockPatternsForPostType } =\n\t\t\t\t\tunlock( select( coreStore ) );\n\t\t\t\tconst patterns = getBlockPatternsForPostType( postType );\n\t\t\t\treturn hasFinishedResolution( 'getBlockPatterns' )\n\t\t\t\t\t? patterns\n\t\t\t\t\t: undefined;\n\t\t\t},\n\t\t\t[ reusableBlocksSelectKey ]: __experimentalReusableBlocksSelect,\n\t\t\t__experimentalBlockPatternCategories: blockPatternCategories,\n\t\t\t__experimentalUserPatternCategories: userPatternCategories,\n\t\t\t__experimentalFetchLinkSuggestions: ( search, searchOptions ) =>\n\t\t\t\tfetchLinkSuggestions( search, searchOptions, settings ),\n\t\t\tinserterMediaCategories,\n\t\t\t__experimentalFetchRichUrlData: fetchUrlData,\n\t\t\t// Todo: This only checks the top level post, not the post within a template or any other entity that can be edited.\n\t\t\t// This might be better as a generic \"canUser\" selector.\n\t\t\t__experimentalCanUserUseUnfilteredHTML: canUseUnfilteredHTML,\n\t\t\t//Todo: this is only needed for native and should probably be removed.\n\t\t\t__experimentalUndo: undo,\n\t\t\t// Check whether we want all site editor frames to have outlines\n\t\t\t// including the navigation / pattern / parts editors.\n\t\t\toutlineMode: ! isDistractionFree && postType === 'wp_template',\n\t\t\t// Check these two properties: they were not present in the site editor.\n\t\t\t__experimentalCreatePageEntity: createPageEntity,\n\t\t\t__experimentalUserCanCreatePages: userCanCreatePages,\n\t\t\tpageOnFront,\n\t\t\tpageForPosts,\n\t\t\t__experimentalPreferPatternsOnRoot: postType === 'wp_template',\n\t\t\ttemplateLock:\n\t\t\t\tpostType === 'wp_navigation' ? 'insert' : settings.templateLock,\n\t\t\ttemplate:\n\t\t\t\tpostType === 'wp_navigation'\n\t\t\t\t\t? [ [ 'core/navigation', {}, [] ] ]\n\t\t\t\t\t: settings.template,\n\t\t\t__experimentalSetIsInserterOpened: setIsInserterOpened,\n\t\t\t[ sectionRootClientIdKey ]: sectionRootClientId,\n\t\t\teditorTool:\n\t\t\t\trenderingMode === 'post-only' && postType !== 'wp_template'\n\t\t\t\t\t? 'edit'\n\t\t\t\t\t: undefined,\n\t\t\t// When editing template parts, patterns, or navigation directly,\n\t\t\t// we're in an isolated editing context (focused on that entity alone).\n\t\t\t[ isIsolatedEditorKey ]: [\n\t\t\t\t'wp_template_part',\n\t\t\t\t'wp_block',\n\t\t\t\t'wp_navigation',\n\t\t\t].includes( postType ),\n\t\t\t...( window.__experimentalHideBlocksBasedOnScreenSize && deviceType\n\t\t\t\t? { [ deviceTypeKey ]: deviceType }\n\t\t\t\t: {} ),\n\t\t};\n\n\t\treturn blockEditorSettings;\n\t}, [\n\t\tallowedBlockTypes,\n\t\tallowRightClickOverrides,\n\t\tfocusMode,\n\t\tforceDisableFocusMode,\n\t\thasFixedToolbar,\n\t\tisDistractionFree,\n\t\tkeepCaretInsideBlock,\n\t\tsettings,\n\t\thasUploadPermissions,\n\t\tuserPatternCategories,\n\t\tblockPatterns,\n\t\tblockPatternCategories,\n\t\tcanUseUnfilteredHTML,\n\t\tundo,\n\t\tcreatePageEntity,\n\t\tuserCanCreatePages,\n\t\tpageOnFront,\n\t\tpageForPosts,\n\t\tpostType,\n\t\tsetIsInserterOpened,\n\t\tsectionRootClientId,\n\t\tglobalStylesData,\n\t\tglobalStylesLinksData,\n\t\trenderingMode,\n\t\teditMediaEntity,\n\t\twrappedOnNavigateToEntityRecord,\n\t\tdeviceType,\n\t] );\n}\n\nexport default useBlockEditorSettings;\n", "/**\n * The `editor` settings here need to be in sync with the corresponding ones in `editor` package.\n * See `packages/editor/src/components/media-categories/index.js`.\n *\n * In the future we could consider creating an Openvese package that can be used in both `editor` and `site-editor`.\n * The rest of the settings would still need to be in sync though.\n */\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf, _x } from '@wordpress/i18n';\nimport { resolveSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\n\n/** @typedef {import('@wordpress/block-editor').InserterMediaRequest} InserterMediaRequest */\n/** @typedef {import('@wordpress/block-editor').InserterMediaItem} InserterMediaItem */\n/** @typedef {import('@wordpress/block-editor').InserterMediaCategory} InserterMediaCategory */\n\nconst getExternalLink = ( url, text ) =>\n\t`<a ${ getExternalLinkAttributes( url ) }>${ text }</a>`;\n\nconst getExternalLinkAttributes = ( url ) =>\n\t`href=\"${ url }\" target=\"_blank\" rel=\"noreferrer noopener\"`;\n\nconst getOpenverseLicense = ( license, licenseVersion ) => {\n\tlet licenseName = license.trim();\n\t// PDM has no abbreviation\n\tif ( license !== 'pdm' ) {\n\t\tlicenseName = license.toUpperCase().replace( 'SAMPLING', 'Sampling' );\n\t}\n\t// If version is known, append version to the name.\n\t// The license has to have a version to be valid. Only\n\t// PDM (public domain mark) doesn't have a version.\n\tif ( licenseVersion ) {\n\t\tlicenseName += ` ${ licenseVersion }`;\n\t}\n\t// For licenses other than public-domain marks, prepend 'CC' to the name.\n\tif ( ! [ 'pdm', 'cc0' ].includes( license ) ) {\n\t\tlicenseName = `CC ${ licenseName }`;\n\t}\n\treturn licenseName;\n};\n\nconst getOpenverseCaption = ( item ) => {\n\tconst {\n\t\ttitle,\n\t\tforeign_landing_url: foreignLandingUrl,\n\t\tcreator,\n\t\tcreator_url: creatorUrl,\n\t\tlicense,\n\t\tlicense_version: licenseVersion,\n\t\tlicense_url: licenseUrl,\n\t} = item;\n\tconst fullLicense = getOpenverseLicense( license, licenseVersion );\n\tconst _creator = decodeEntities( creator );\n\tlet _caption;\n\tif ( _creator ) {\n\t\t_caption = title\n\t\t\t? sprintf(\n\t\t\t\t\t// translators: %1s: Title of a media work from Openverse; %2$s: Name of the work's creator; %3s: Work's licence e.g: \"CC0 1.0\".\n\t\t\t\t\t_x( '\"%1$s\" by %2$s/ %3$s', 'caption' ),\n\t\t\t\t\tgetExternalLink(\n\t\t\t\t\t\tforeignLandingUrl,\n\t\t\t\t\t\tdecodeEntities( title )\n\t\t\t\t\t),\n\t\t\t\t\tcreatorUrl\n\t\t\t\t\t\t? getExternalLink( creatorUrl, _creator )\n\t\t\t\t\t\t: _creator,\n\t\t\t\t\tlicenseUrl\n\t\t\t\t\t\t? getExternalLink(\n\t\t\t\t\t\t\t\t`${ licenseUrl }?ref=openverse`,\n\t\t\t\t\t\t\t\tfullLicense\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: fullLicense\n\t\t\t )\n\t\t\t: sprintf(\n\t\t\t\t\t// translators: %1s: Link attributes for a given Openverse media work; %2s: Name of the work's creator; %3s: Works's licence e.g: \"CC0 1.0\".\n\t\t\t\t\t_x( '<a %1$s>Work</a> by %2$s/ %3$s', 'caption' ),\n\t\t\t\t\tgetExternalLinkAttributes( foreignLandingUrl ),\n\t\t\t\t\tcreatorUrl\n\t\t\t\t\t\t? getExternalLink( creatorUrl, _creator )\n\t\t\t\t\t\t: _creator,\n\t\t\t\t\tlicenseUrl\n\t\t\t\t\t\t? getExternalLink(\n\t\t\t\t\t\t\t\t`${ licenseUrl }?ref=openverse`,\n\t\t\t\t\t\t\t\tfullLicense\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: fullLicense\n\t\t\t );\n\t} else {\n\t\t_caption = title\n\t\t\t? sprintf(\n\t\t\t\t\t// translators: %1s: Title of a media work from Openverse; %2s: Work's licence e.g: \"CC0 1.0\".\n\t\t\t\t\t_x( '\"%1$s\"/ %2$s', 'caption' ),\n\t\t\t\t\tgetExternalLink(\n\t\t\t\t\t\tforeignLandingUrl,\n\t\t\t\t\t\tdecodeEntities( title )\n\t\t\t\t\t),\n\t\t\t\t\tlicenseUrl\n\t\t\t\t\t\t? getExternalLink(\n\t\t\t\t\t\t\t\t`${ licenseUrl }?ref=openverse`,\n\t\t\t\t\t\t\t\tfullLicense\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: fullLicense\n\t\t\t )\n\t\t\t: sprintf(\n\t\t\t\t\t// translators: %1s: Link attributes for a given Openverse media work; %2s: Works's licence e.g: \"CC0 1.0\".\n\t\t\t\t\t_x( '<a %1$s>Work</a>/ %2$s', 'caption' ),\n\t\t\t\t\tgetExternalLinkAttributes( foreignLandingUrl ),\n\t\t\t\t\tlicenseUrl\n\t\t\t\t\t\t? getExternalLink(\n\t\t\t\t\t\t\t\t`${ licenseUrl }?ref=openverse`,\n\t\t\t\t\t\t\t\tfullLicense\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: fullLicense\n\t\t\t );\n\t}\n\treturn _caption.replace( /\\s{2}/g, ' ' );\n};\n\nconst coreMediaFetch = async ( query = {} ) => {\n\tconst mediaItems = await resolveSelect( coreStore ).getEntityRecords(\n\t\t'postType',\n\t\t'attachment',\n\t\t{\n\t\t\t...query,\n\t\t\torderBy: !! query?.search ? 'relevance' : 'date',\n\t\t}\n\t);\n\treturn mediaItems.map( ( mediaItem ) => ( {\n\t\t...mediaItem,\n\t\talt: mediaItem.alt_text,\n\t\turl: mediaItem.source_url,\n\t\tpreviewUrl: mediaItem.media_details?.sizes?.medium?.source_url,\n\t\tcaption: mediaItem.caption?.raw,\n\t} ) );\n};\n\n/** @type {InserterMediaCategory[]} */\nconst inserterMediaCategories = [\n\t{\n\t\tname: 'images',\n\t\tlabels: {\n\t\t\tname: __( 'Images' ),\n\t\t\tsearch_items: __( 'Search images' ),\n\t\t},\n\t\tmediaType: 'image',\n\t\tasync fetch( query = {} ) {\n\t\t\treturn coreMediaFetch( { ...query, media_type: 'image' } );\n\t\t},\n\t},\n\t{\n\t\tname: 'videos',\n\t\tlabels: {\n\t\t\tname: __( 'Videos' ),\n\t\t\tsearch_items: __( 'Search videos' ),\n\t\t},\n\t\tmediaType: 'video',\n\t\tasync fetch( query = {} ) {\n\t\t\treturn coreMediaFetch( { ...query, media_type: 'video' } );\n\t\t},\n\t},\n\t{\n\t\tname: 'audio',\n\t\tlabels: {\n\t\t\tname: __( 'Audio' ),\n\t\t\tsearch_items: __( 'Search audio' ),\n\t\t},\n\t\tmediaType: 'audio',\n\t\tasync fetch( query = {} ) {\n\t\t\treturn coreMediaFetch( { ...query, media_type: 'audio' } );\n\t\t},\n\t},\n\t{\n\t\tname: 'openverse',\n\t\tlabels: {\n\t\t\tname: __( 'Openverse' ),\n\t\t\tsearch_items: __( 'Search Openverse' ),\n\t\t},\n\t\tmediaType: 'image',\n\t\tasync fetch( query = {} ) {\n\t\t\tconst defaultArgs = {\n\t\t\t\tmature: false,\n\t\t\t\texcluded_source: 'flickr,inaturalist,wikimedia',\n\t\t\t\tlicense: 'pdm,cc0',\n\t\t\t};\n\t\t\tconst finalQuery = { ...query, ...defaultArgs };\n\t\t\tconst mapFromInserterMediaRequest = {\n\t\t\t\tper_page: 'page_size',\n\t\t\t\tsearch: 'q',\n\t\t\t};\n\t\t\tconst url = new URL( 'https://api.openverse.org/v1/images/' );\n\t\t\tObject.entries( finalQuery ).forEach( ( [ key, value ] ) => {\n\t\t\t\tconst queryKey = mapFromInserterMediaRequest[ key ] || key;\n\t\t\t\turl.searchParams.set( queryKey, value );\n\t\t\t} );\n\t\t\tconst response = await window.fetch( url, {\n\t\t\t\theaders: {\n\t\t\t\t\t'User-Agent': 'WordPress/inserter-media-fetch',\n\t\t\t\t},\n\t\t\t} );\n\t\t\tconst jsonResponse = await response.json();\n\t\t\tconst results = jsonResponse.results;\n\t\t\treturn results.map( ( result ) => ( {\n\t\t\t\t...result,\n\t\t\t\t// This is a temp solution for better titles, until Openverse API\n\t\t\t\t// completes the cleaning up of some titles of their upstream data.\n\t\t\t\ttitle: result.title?.toLowerCase().startsWith( 'file:' )\n\t\t\t\t\t? result.title.slice( 5 )\n\t\t\t\t\t: result.title,\n\t\t\t\tsourceId: result.id,\n\t\t\t\tid: undefined,\n\t\t\t\tcaption: getOpenverseCaption( result ),\n\t\t\t\tpreviewUrl: result.thumbnail,\n\t\t\t} ) );\n\t\t},\n\t\tgetReportUrl: ( { sourceId } ) =>\n\t\t\t`https://wordpress.org/openverse/image/${ sourceId }/report/`,\n\t\tisExternalResource: true,\n\t},\n];\n\nexport default inserterMediaCategories;\n", "// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}", "import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;", "const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};", "import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;", "/**\n * External dependencies\n */\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport { select, dispatch } from '@wordpress/data';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { uploadMedia } from '@wordpress/media-utils';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nconst noop = () => {};\n\n/**\n * Upload a media file when the file upload button is activated.\n * Wrapper around uploadMedia() that injects the current post ID.\n *\n * @param {Object} $0 Parameters object passed to the function.\n * @param {?Object} $0.additionalData Additional data to include in the request.\n * @param {string} $0.allowedTypes Array with the types of media that can be uploaded, if unset all types are allowed.\n * @param {Array} $0.filesList List of files.\n * @param {?number} $0.maxUploadFileSize Maximum upload size in bytes allowed for the site.\n * @param {Function} $0.onError Function called when an error happens.\n * @param {Function} $0.onFileChange Function called each time a file or a temporary representation of the file is available.\n * @param {Function} $0.onSuccess Function called after the final representation of the file is available.\n * @param {boolean} $0.multiple Whether to allow multiple files to be uploaded.\n */\nexport default function mediaUpload( {\n\tadditionalData = {},\n\tallowedTypes,\n\tfilesList,\n\tmaxUploadFileSize,\n\tonError = noop,\n\tonFileChange,\n\tonSuccess,\n\tmultiple = true,\n} ) {\n\tconst { receiveEntityRecords } = dispatch( coreDataStore );\n\tconst { getCurrentPost, getEditorSettings } = select( editorStore );\n\tconst {\n\t\tlockPostAutosaving,\n\t\tunlockPostAutosaving,\n\t\tlockPostSaving,\n\t\tunlockPostSaving,\n\t} = dispatch( editorStore );\n\n\tconst wpAllowedMimeTypes = getEditorSettings().allowedMimeTypes;\n\tconst lockKey = `image-upload-${ uuid() }`;\n\tlet imageIsUploading = false;\n\tmaxUploadFileSize =\n\t\tmaxUploadFileSize || getEditorSettings().maxUploadFileSize;\n\tconst currentPost = getCurrentPost();\n\t// Templates and template parts' numerical ID is stored in `wp_id`.\n\tconst currentPostId =\n\t\ttypeof currentPost?.id === 'number'\n\t\t\t? currentPost.id\n\t\t\t: currentPost?.wp_id;\n\tconst setSaveLock = () => {\n\t\tlockPostSaving( lockKey );\n\t\tlockPostAutosaving( lockKey );\n\t\timageIsUploading = true;\n\t};\n\n\tconst postData = currentPostId ? { post: currentPostId } : {};\n\tconst clearSaveLock = () => {\n\t\tunlockPostSaving( lockKey );\n\t\tunlockPostAutosaving( lockKey );\n\t\timageIsUploading = false;\n\t};\n\n\tuploadMedia( {\n\t\tallowedTypes,\n\t\tfilesList,\n\t\tonFileChange: ( file ) => {\n\t\t\tif ( ! imageIsUploading ) {\n\t\t\t\tsetSaveLock();\n\t\t\t} else {\n\t\t\t\tclearSaveLock();\n\t\t\t}\n\t\t\tonFileChange?.( file );\n\n\t\t\t// Files are initially received by `onFileChange` as a blob.\n\t\t\t// After that the function is called a second time with the file as an entity.\n\t\t\t// For core-data, we only care about receiving/invalidating entities.\n\t\t\tconst entityFiles = file.filter( ( _file ) => _file?.id );\n\t\t\tif ( entityFiles?.length ) {\n\t\t\t\tconst invalidateCache = true;\n\t\t\t\treceiveEntityRecords(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'attachment',\n\t\t\t\t\tentityFiles,\n\t\t\t\t\tundefined,\n\t\t\t\t\tinvalidateCache\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\tonSuccess,\n\t\tadditionalData: {\n\t\t\t...postData,\n\t\t\t...additionalData,\n\t\t},\n\t\tmaxUploadFileSize,\n\t\tonError: ( { message } ) => {\n\t\t\tclearSaveLock();\n\t\t\tonError( message );\n\t\t},\n\t\twpAllowedMimeTypes,\n\t\tmultiple,\n\t} );\n}\n", "/**\n * WordPress dependencies\n */\nimport { cleanForSlug as urlCleanForSlug } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Performs some basic cleanup of a string for use as a post slug\n *\n * This replicates some of what sanitize_title() does in WordPress core, but\n * is only designed to approximate what the slug will be.\n *\n * Converts Latin-1 Supplement and Latin Extended-A letters to basic Latin letters.\n * Removes combining diacritical marks. Converts whitespace, periods,\n * and forward slashes to hyphens. Removes any remaining non-word characters\n * except hyphens and underscores. Converts remaining string to lowercase.\n * It does not account for octets, HTML entities, or other encoded characters.\n *\n * @param {string} string Title or slug to be processed\n *\n * @return {string} Processed string\n */\nexport function cleanForSlug( string ) {\n\tdeprecated( 'wp.editor.cleanForSlug', {\n\t\tsince: '12.7',\n\t\tplugin: 'Gutenberg',\n\t\talternative: 'wp.url.cleanForSlug',\n\t} );\n\treturn urlCleanForSlug( string );\n}\n", "/**\n * WordPress dependencies\n */\nimport { privateApis } from '@wordpress/media-utils';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { sideloadMedia: mediaSideload } = unlock( privateApis );\n\nexport default mediaSideload;\n", "/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useMemo, useCallback } from '@wordpress/element';\nimport { mergeGlobalStyles } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { cleanEmptyObject } = unlock( blockEditorPrivateApis );\n\nfunction useGlobalStylesUserConfig() {\n\tconst { globalStylesId, isReady, settings, styles, _links } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEntityRecord,\n\t\t\t\tgetEditedEntityRecord,\n\t\t\t\thasFinishedResolution,\n\t\t\t\tcanUser,\n\t\t\t} = select( coreStore );\n\t\t\tconst _globalStylesId =\n\t\t\t\tselect( coreStore ).__experimentalGetCurrentGlobalStylesId();\n\n\t\t\tlet record;\n\n\t\t\t/*\n\t\t\t * Ensure that the global styles ID request is complete by testing `_globalStylesId`,\n\t\t\t * before firing off the `canUser` OPTIONS request for user capabilities, otherwise it will\n\t\t\t * fetch `/wp/v2/global-styles` instead of `/wp/v2/global-styles/{id}`.\n\t\t\t * NOTE: Please keep in sync any preload paths sent to `block_editor_rest_api_preload()`,\n\t\t\t * or set using the `block_editor_rest_api_preload_paths` filter, if this changes.\n\t\t\t */\n\t\t\tconst userCanEditGlobalStyles = _globalStylesId\n\t\t\t\t? canUser( 'update', {\n\t\t\t\t\t\tkind: 'root',\n\t\t\t\t\t\tname: 'globalStyles',\n\t\t\t\t\t\tid: _globalStylesId,\n\t\t\t\t } )\n\t\t\t\t: null;\n\n\t\t\tif (\n\t\t\t\t_globalStylesId &&\n\t\t\t\t/*\n\t\t\t\t * Test that the OPTIONS request for user capabilities is complete\n\t\t\t\t * before fetching the global styles entity record.\n\t\t\t\t * This is to avoid fetching the global styles entity unnecessarily.\n\t\t\t\t */\n\t\t\t\ttypeof userCanEditGlobalStyles === 'boolean'\n\t\t\t) {\n\t\t\t\t/*\n\t\t\t\t * Fetch the global styles entity record based on the user's capabilities.\n\t\t\t\t * The default context is `edit` for users who can edit global styles.\n\t\t\t\t * Otherwise, the context is `view`.\n\t\t\t\t * NOTE: There is an equivalent conditional check using `current_user_can()` in the backend\n\t\t\t\t * to preload the global styles entity. Please keep in sync any preload paths sent to `block_editor_rest_api_preload()`,\n\t\t\t\t * or set using `block_editor_rest_api_preload_paths` filter, if this changes.\n\t\t\t\t */\n\t\t\t\tif ( userCanEditGlobalStyles ) {\n\t\t\t\t\trecord = getEditedEntityRecord(\n\t\t\t\t\t\t'root',\n\t\t\t\t\t\t'globalStyles',\n\t\t\t\t\t\t_globalStylesId\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\trecord = getEntityRecord(\n\t\t\t\t\t\t'root',\n\t\t\t\t\t\t'globalStyles',\n\t\t\t\t\t\t_globalStylesId,\n\t\t\t\t\t\t{ context: 'view' }\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet hasResolved = false;\n\t\t\tif (\n\t\t\t\thasFinishedResolution(\n\t\t\t\t\t'__experimentalGetCurrentGlobalStylesId'\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tif ( _globalStylesId ) {\n\t\t\t\t\thasResolved = userCanEditGlobalStyles\n\t\t\t\t\t\t? hasFinishedResolution( 'getEditedEntityRecord', [\n\t\t\t\t\t\t\t\t'root',\n\t\t\t\t\t\t\t\t'globalStyles',\n\t\t\t\t\t\t\t\t_globalStylesId,\n\t\t\t\t\t\t ] )\n\t\t\t\t\t\t: hasFinishedResolution( 'getEntityRecord', [\n\t\t\t\t\t\t\t\t'root',\n\t\t\t\t\t\t\t\t'globalStyles',\n\t\t\t\t\t\t\t\t_globalStylesId,\n\t\t\t\t\t\t\t\t{ context: 'view' },\n\t\t\t\t\t\t ] );\n\t\t\t\t} else {\n\t\t\t\t\thasResolved = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tglobalStylesId: _globalStylesId,\n\t\t\t\tisReady: hasResolved,\n\t\t\t\tsettings: record?.settings,\n\t\t\t\tstyles: record?.styles,\n\t\t\t\t_links: record?._links,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst { getEditedEntityRecord } = useSelect( coreStore );\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst config = useMemo( () => {\n\t\treturn {\n\t\t\tsettings: settings ?? {},\n\t\t\tstyles: styles ?? {},\n\t\t\t_links: _links ?? {},\n\t\t};\n\t}, [ settings, styles, _links ] );\n\n\tconst setConfig = useCallback(\n\t\t/**\n\t\t * Set the global styles config.\n\t\t * @param {Function|Object} callbackOrObject If the callbackOrObject is a function, pass the current config to the callback so the consumer can merge values.\n\t\t * Otherwise, overwrite the current config with the incoming object.\n\t\t * @param {Object} options Options for editEntityRecord Core selector.\n\t\t */\n\t\t( callbackOrObject, options = {} ) => {\n\t\t\tconst record = getEditedEntityRecord(\n\t\t\t\t'root',\n\t\t\t\t'globalStyles',\n\t\t\t\tglobalStylesId\n\t\t\t);\n\n\t\t\tconst currentConfig = {\n\t\t\t\tstyles: record?.styles ?? {},\n\t\t\t\tsettings: record?.settings ?? {},\n\t\t\t\t_links: record?._links ?? {},\n\t\t\t};\n\n\t\t\tconst updatedConfig =\n\t\t\t\ttypeof callbackOrObject === 'function'\n\t\t\t\t\t? callbackOrObject( currentConfig )\n\t\t\t\t\t: callbackOrObject;\n\n\t\t\teditEntityRecord(\n\t\t\t\t'root',\n\t\t\t\t'globalStyles',\n\t\t\t\tglobalStylesId,\n\t\t\t\t{\n\t\t\t\t\tstyles: cleanEmptyObject( updatedConfig.styles ) || {},\n\t\t\t\t\tsettings: cleanEmptyObject( updatedConfig.settings ) || {},\n\t\t\t\t\t_links: cleanEmptyObject( updatedConfig._links ) || {},\n\t\t\t\t},\n\t\t\t\toptions\n\t\t\t);\n\t\t},\n\t\t[ globalStylesId, editEntityRecord, getEditedEntityRecord ]\n\t);\n\n\treturn [ isReady, config, setConfig ];\n}\n\nfunction useGlobalStylesBaseConfig() {\n\tconst baseConfig = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).__experimentalGetCurrentThemeBaseGlobalStyles(),\n\t\t[]\n\t);\n\treturn [ !! baseConfig, baseConfig ];\n}\n\nexport function useGlobalStylesContext() {\n\tconst [ isUserConfigReady, userConfig, setUserConfig ] =\n\t\tuseGlobalStylesUserConfig();\n\tconst [ isBaseConfigReady, baseConfig ] = useGlobalStylesBaseConfig();\n\n\tconst mergedConfig = useMemo( () => {\n\t\tif ( ! baseConfig || ! userConfig ) {\n\t\t\treturn {};\n\t\t}\n\n\t\treturn mergeGlobalStyles( baseConfig, userConfig );\n\t}, [ userConfig, baseConfig ] );\n\n\tconst context = useMemo( () => {\n\t\treturn {\n\t\t\tisReady: isUserConfigReady && isBaseConfigReady,\n\t\t\tuser: userConfig,\n\t\t\tbase: baseConfig,\n\t\t\tmerged: mergedConfig,\n\t\t\tsetUserConfig,\n\t\t};\n\t}, [\n\t\tmergedConfig,\n\t\tuserConfig,\n\t\tbaseConfig,\n\t\tsetUserConfig,\n\t\tisUserConfigReady,\n\t\tisBaseConfigReady,\n\t] );\n\n\treturn context;\n}\n", "/**\n * Immutably sets a value inside an object. Like `lodash#set`, but returning a\n * new object. Treats nullish initial values as empty objects. Clones any\n * nested objects. Supports arrays, too.\n *\n * @param object Object to set a value in.\n * @param path Path in the object to modify.\n * @param value New value to set.\n * @return Cloned object with the new value set.\n */\nexport function setImmutably(\n\tobject: Object,\n\tpath: string | number | ( string | number )[],\n\tvalue: any\n) {\n\t// Normalize path\n\tpath = Array.isArray( path ) ? [ ...path ] : [ path ];\n\n\t// Shallowly clone the base of the object\n\tobject = Array.isArray( object ) ? [ ...object ] : { ...object };\n\n\tconst leaf = path.pop();\n\n\t// Traverse object from root to leaf, shallowly cloning at each level\n\tlet prev = object;\n\tfor ( const key of path ) {\n\t\t// @ts-expect-error\n\t\tconst lvl = prev[ key ];\n\t\t// @ts-expect-error\n\t\tprev = prev[ key ] = Array.isArray( lvl ) ? [ ...lvl ] : { ...lvl };\n\t}\n\t// @ts-expect-error\n\tprev[ leaf ] = value;\n\n\treturn object;\n}\n\n/**\n * Helper util to return a value from a certain path of the object.\n *\n * Path is specified as either:\n * - a string of properties, separated by dots, for example: \"x.y\".\n * - an array of properties, for example `[ 'x', 'y' ]`.\n *\n * You can also specify a default value in case the result is nullish.\n *\n * @param object Input object.\n * @param path Path to the object property.\n * @param defaultValue Default value if the value at the specified path is nullish.\n * @return Value of the object property at the specified path.\n */\nexport const getValueFromObjectPath = (\n\tobject: Object,\n\tpath: string | string[],\n\tdefaultValue?: any\n) => {\n\tconst arrayPath = Array.isArray( path ) ? path : path.split( '.' );\n\tlet value = object;\n\tarrayPath.forEach( ( fieldName ) => {\n\t\t// @ts-expect-error\n\t\tvalue = value?.[ fieldName ];\n\t} );\n\treturn value ?? defaultValue;\n};\n", "/**\n * Internal dependencies\n */\nimport { getValueFromObjectPath, setImmutably } from '../utils/object';\nimport type { GlobalStylesConfig } from '../types';\n\nconst VALID_SETTINGS = [\n\t'appearanceTools',\n\t'useRootPaddingAwareAlignments',\n\t'background.backgroundImage',\n\t'background.backgroundRepeat',\n\t'background.backgroundSize',\n\t'background.backgroundPosition',\n\t'border.color',\n\t'border.radius',\n\t'border.radiusSizes',\n\t'border.style',\n\t'border.width',\n\t'shadow.presets',\n\t'shadow.defaultPresets',\n\t'color.background',\n\t'color.button',\n\t'color.caption',\n\t'color.custom',\n\t'color.customDuotone',\n\t'color.customGradient',\n\t'color.defaultDuotone',\n\t'color.defaultGradients',\n\t'color.defaultPalette',\n\t'color.duotone',\n\t'color.gradients',\n\t'color.heading',\n\t'color.link',\n\t'color.palette',\n\t'color.text',\n\t'custom',\n\t'dimensions.aspectRatio',\n\t'dimensions.height',\n\t'dimensions.minHeight',\n\t'dimensions.width',\n\t'dimensions.dimensionSizes',\n\t'layout.contentSize',\n\t'layout.definitions',\n\t'layout.wideSize',\n\t'lightbox.enabled',\n\t'lightbox.allowEditing',\n\t'position.fixed',\n\t'position.sticky',\n\t'spacing.customSpacingSize',\n\t'spacing.defaultSpacingSizes',\n\t'spacing.spacingSizes',\n\t'spacing.spacingScale',\n\t'spacing.blockGap',\n\t'spacing.margin',\n\t'spacing.padding',\n\t'spacing.units',\n\t'typography.fluid',\n\t'typography.customFontSize',\n\t'typography.defaultFontSizes',\n\t'typography.dropCap',\n\t'typography.fontFamilies',\n\t'typography.fontSizes',\n\t'typography.fontStyle',\n\t'typography.fontWeight',\n\t'typography.letterSpacing',\n\t'typography.lineHeight',\n\t'typography.textAlign',\n\t'typography.textColumns',\n\t'typography.textDecoration',\n\t'typography.textTransform',\n\t'typography.writingMode',\n];\n\nexport function getSetting< T = any >(\n\tglobalStyles: GlobalStylesConfig,\n\tpath: string,\n\tblockName?: string\n): T {\n\tconst appendedBlockPath = blockName ? '.blocks.' + blockName : '';\n\tconst appendedPropertyPath = path ? '.' + path : '';\n\tconst contextualPath = `settings${ appendedBlockPath }${ appendedPropertyPath }`;\n\tconst globalPath = `settings${ appendedPropertyPath }`;\n\n\tif ( path ) {\n\t\treturn ( getValueFromObjectPath( globalStyles, contextualPath ) ??\n\t\t\tgetValueFromObjectPath( globalStyles, globalPath ) ) as T;\n\t}\n\n\tlet result = {};\n\tVALID_SETTINGS.forEach( ( setting ) => {\n\t\tconst value =\n\t\t\tgetValueFromObjectPath(\n\t\t\t\tglobalStyles,\n\t\t\t\t`settings${ appendedBlockPath }.${ setting }`\n\t\t\t) ??\n\t\t\tgetValueFromObjectPath( globalStyles, `settings.${ setting }` );\n\t\tif ( value !== undefined ) {\n\t\t\tresult = setImmutably( result, setting.split( '.' ), value );\n\t\t}\n\t} );\n\treturn result as T;\n}\n", "/**\n * Internal dependencies\n */\nimport { setImmutably } from '../utils/object';\nimport type { GlobalStylesConfig } from '../types';\n\nexport function setSetting< T = any >(\n\tglobalStyles: GlobalStylesConfig,\n\tpath: string,\n\tnewValue: T | undefined,\n\tblockName?: string\n): GlobalStylesConfig {\n\tconst appendedBlockPath = blockName ? '.blocks.' + blockName : '';\n\tconst appendedPropertyPath = path ? '.' + path : '';\n\tconst finalPath = `settings${ appendedBlockPath }${ appendedPropertyPath }`;\n\n\treturn setImmutably(\n\t\tglobalStyles,\n\t\tfinalPath.split( '.' ),\n\t\tnewValue\n\t) as GlobalStylesConfig;\n}\n", "/**\n * WordPress dependencies\n */\nimport { getCSSValueFromRawStyle } from '@wordpress/style-engine';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tGlobalStylesSettings,\n\tThemeFileLink,\n\tTypographyPreset,\n\tUnresolvedValue,\n\tGlobalStylesConfig,\n} from '../types';\nimport { getTypographyFontSizeValue } from './typography';\nimport { getValueFromObjectPath } from './object';\n\nexport const ROOT_BLOCK_SELECTOR = 'body';\nexport const ROOT_CSS_PROPERTIES_SELECTOR = ':root';\n\nexport const PRESET_METADATA = [\n\t{\n\t\tpath: [ 'color', 'palette' ],\n\t\tvalueKey: 'color',\n\t\tcssVarInfix: 'color',\n\t\tclasses: [\n\t\t\t{ classSuffix: 'color', propertyName: 'color' },\n\t\t\t{\n\t\t\t\tclassSuffix: 'background-color',\n\t\t\t\tpropertyName: 'background-color',\n\t\t\t},\n\t\t\t{\n\t\t\t\tclassSuffix: 'border-color',\n\t\t\t\tpropertyName: 'border-color',\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tpath: [ 'color', 'gradients' ],\n\t\tvalueKey: 'gradient',\n\t\tcssVarInfix: 'gradient',\n\t\tclasses: [\n\t\t\t{\n\t\t\t\tclassSuffix: 'gradient-background',\n\t\t\t\tpropertyName: 'background',\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tpath: [ 'color', 'duotone' ],\n\t\tvalueKey: 'colors',\n\t\tcssVarInfix: 'duotone',\n\t\tvalueFunc: ( { slug }: { slug: string } ) =>\n\t\t\t`url( '#wp-duotone-${ slug }' )`,\n\t\tclasses: [],\n\t},\n\t{\n\t\tpath: [ 'shadow', 'presets' ],\n\t\tvalueKey: 'shadow',\n\t\tcssVarInfix: 'shadow',\n\t\tclasses: [],\n\t},\n\t{\n\t\tpath: [ 'typography', 'fontSizes' ],\n\t\tvalueFunc: (\n\t\t\tpreset: TypographyPreset,\n\t\t\tsettings: GlobalStylesSettings\n\t\t) => getTypographyFontSizeValue( preset, settings ),\n\t\tvalueKey: 'size',\n\t\tcssVarInfix: 'font-size',\n\t\tclasses: [ { classSuffix: 'font-size', propertyName: 'font-size' } ],\n\t},\n\t{\n\t\tpath: [ 'typography', 'fontFamilies' ],\n\t\tvalueKey: 'fontFamily',\n\t\tcssVarInfix: 'font-family',\n\t\tclasses: [\n\t\t\t{ classSuffix: 'font-family', propertyName: 'font-family' },\n\t\t],\n\t},\n\t{\n\t\tpath: [ 'spacing', 'spacingSizes' ],\n\t\tvalueKey: 'size',\n\t\tcssVarInfix: 'spacing',\n\t\tvalueFunc: ( { size }: { size: string } ) => size,\n\t\tclasses: [],\n\t},\n\t{\n\t\tpath: [ 'border', 'radiusSizes' ],\n\t\tvalueKey: 'size',\n\t\tcssVarInfix: 'border-radius',\n\t\tclasses: [],\n\t},\n\t{\n\t\tpath: [ 'dimensions', 'dimensionSizes' ],\n\t\tvalueKey: 'size',\n\t\tcssVarInfix: 'dimension',\n\t\tclasses: [],\n\t},\n];\n\nexport const STYLE_PATH_TO_CSS_VAR_INFIX: Record< string, string > = {\n\t'color.background': 'color',\n\t'color.text': 'color',\n\t'filter.duotone': 'duotone',\n\t'elements.link.color.text': 'color',\n\t'elements.link.:hover.color.text': 'color',\n\t'elements.link.typography.fontFamily': 'font-family',\n\t'elements.link.typography.fontSize': 'font-size',\n\t'elements.button.color.text': 'color',\n\t'elements.button.color.background': 'color',\n\t'elements.caption.color.text': 'color',\n\t'elements.button.typography.fontFamily': 'font-family',\n\t'elements.button.typography.fontSize': 'font-size',\n\t'elements.heading.color': 'color',\n\t'elements.heading.color.background': 'color',\n\t'elements.heading.typography.fontFamily': 'font-family',\n\t'elements.heading.gradient': 'gradient',\n\t'elements.heading.color.gradient': 'gradient',\n\t'elements.h1.color': 'color',\n\t'elements.h1.color.background': 'color',\n\t'elements.h1.typography.fontFamily': 'font-family',\n\t'elements.h1.color.gradient': 'gradient',\n\t'elements.h2.color': 'color',\n\t'elements.h2.color.background': 'color',\n\t'elements.h2.typography.fontFamily': 'font-family',\n\t'elements.h2.color.gradient': 'gradient',\n\t'elements.h3.color': 'color',\n\t'elements.h3.color.background': 'color',\n\t'elements.h3.typography.fontFamily': 'font-family',\n\t'elements.h3.color.gradient': 'gradient',\n\t'elements.h4.color': 'color',\n\t'elements.h4.color.background': 'color',\n\t'elements.h4.typography.fontFamily': 'font-family',\n\t'elements.h4.color.gradient': 'gradient',\n\t'elements.h5.color': 'color',\n\t'elements.h5.color.background': 'color',\n\t'elements.h5.typography.fontFamily': 'font-family',\n\t'elements.h5.color.gradient': 'gradient',\n\t'elements.h6.color': 'color',\n\t'elements.h6.color.background': 'color',\n\t'elements.h6.typography.fontFamily': 'font-family',\n\t'elements.h6.color.gradient': 'gradient',\n\t'color.gradient': 'gradient',\n\tshadow: 'shadow',\n\t'typography.fontSize': 'font-size',\n\t'typography.fontFamily': 'font-family',\n};\n\n/**\n * Function that scopes a selector with another one. This works a bit like\n * SCSS nesting except the `&` operator isn't supported.\n *\n * @example\n * ```js\n * const scope = '.a, .b .c';\n * const selector = '> .x, .y';\n * const merged = scopeSelector( scope, selector );\n * // merged is '.a > .x, .a .y, .b .c > .x, .b .c .y'\n * ```\n *\n * @param scope Selector to scope to.\n * @param selector Original selector.\n *\n * @return Scoped selector.\n */\nexport function scopeSelector( scope: string | undefined, selector: string ) {\n\tif ( ! scope || ! selector ) {\n\t\treturn selector;\n\t}\n\n\tconst scopes = scope.split( ',' );\n\tconst selectors = selector.split( ',' );\n\n\tconst selectorsScoped: string[] = [];\n\tscopes.forEach( ( outer ) => {\n\t\tselectors.forEach( ( inner ) => {\n\t\t\tselectorsScoped.push( `${ outer.trim() } ${ inner.trim() }` );\n\t\t} );\n\t} );\n\n\treturn selectorsScoped.join( ', ' );\n}\n\n/**\n * Scopes a collection of selectors for features and subfeatures.\n *\n * @example\n * ```js\n * const scope = '.custom-scope';\n * const selectors = {\n * color: '.wp-my-block p',\n * typography: { fontSize: '.wp-my-block caption' },\n * };\n * const result = scopeFeatureSelector( scope, selectors );\n * // result is {\n * // color: '.custom-scope .wp-my-block p',\n * // typography: { fonSize: '.custom-scope .wp-my-block caption' },\n * // }\n * ```\n *\n * @param scope Selector to scope collection of selectors with.\n * @param selectors Collection of feature selectors e.g.\n *\n * @return Scoped collection of feature selectors.\n */\nexport function scopeFeatureSelectors(\n\tscope: string | undefined,\n\tselectors: string | Record< string, string | Record< string, string > >\n) {\n\tif ( ! scope || ! selectors ) {\n\t\treturn;\n\t}\n\n\tconst featureSelectors: Record<\n\t\tstring,\n\t\tstring | Record< string, string >\n\t> = {};\n\n\tObject.entries( selectors ).forEach( ( [ feature, selector ] ) => {\n\t\tif ( typeof selector === 'string' ) {\n\t\t\tfeatureSelectors[ feature ] = scopeSelector( scope, selector );\n\t\t}\n\n\t\tif ( typeof selector === 'object' ) {\n\t\t\tfeatureSelectors[ feature ] = {};\n\n\t\t\tObject.entries( selector ).forEach(\n\t\t\t\t( [ subfeature, subfeatureSelector ] ) => {\n\t\t\t\t\t// @ts-expect-error\n\t\t\t\t\tfeatureSelectors[ feature ][ subfeature ] = scopeSelector(\n\t\t\t\t\t\tscope,\n\t\t\t\t\t\tsubfeatureSelector as string\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t} );\n\n\treturn featureSelectors;\n}\n\n/**\n * Appends a sub-selector to an existing one.\n *\n * Given the compounded `selector` \"h1, h2, h3\"\n * and the `toAppend` selector \".some-class\" the result will be\n * \"h1.some-class, h2.some-class, h3.some-class\".\n *\n * @param selector Original selector.\n * @param toAppend Selector to append.\n *\n * @return The new selector.\n */\nexport function appendToSelector( selector: string, toAppend: string ) {\n\tif ( ! selector.includes( ',' ) ) {\n\t\treturn selector + toAppend;\n\t}\n\tconst selectors = selector.split( ',' );\n\tconst newSelectors = selectors.map( ( sel ) => sel + toAppend );\n\treturn newSelectors.join( ',' );\n}\n\n/**\n * Generates the selector for a block style variation by creating the\n * appropriate CSS class and adding it to the ancestor portion of the block's\n * selector.\n *\n * For example, take the Button block which has a compound selector:\n * `.wp-block-button .wp-block-button__link`. With a variation named 'custom',\n * the class `.is-style-custom` should be added to the `.wp-block-button`\n * ancestor only.\n *\n * This function will take into account comma separated and complex selectors.\n *\n * @param variation Name for the variation.\n * @param blockSelector CSS selector for the block.\n *\n * @return CSS selector for the block style variation.\n */\nexport function getBlockStyleVariationSelector(\n\tvariation: string,\n\tblockSelector: string\n) {\n\tconst variationClass = `.is-style-${ variation }`;\n\n\tif ( ! blockSelector ) {\n\t\treturn variationClass;\n\t}\n\n\tconst ancestorRegex = /((?::\\([^)]+\\))?\\s*)([^\\s:]+)/;\n\tconst addVariationClass = (\n\t\t_match: string,\n\t\tgroup1: string,\n\t\tgroup2: string\n\t) => {\n\t\treturn group1 + group2 + variationClass;\n\t};\n\n\tconst result = blockSelector\n\t\t.split( ',' )\n\t\t.map( ( part ) => part.replace( ancestorRegex, addVariationClass ) );\n\n\treturn result.join( ',' );\n}\n\n/**\n * Resolves ref values in theme JSON.\n *\n * @param ruleValue A block style value that may contain a reference to a theme.json value.\n * @param tree A theme.json object.\n * @return The resolved value or incoming ruleValue.\n */\nexport function getResolvedRefValue(\n\truleValue: UnresolvedValue,\n\ttree?: GlobalStylesConfig\n): UnresolvedValue {\n\tif ( ! ruleValue || ! tree ) {\n\t\treturn ruleValue;\n\t}\n\n\t/*\n\t * Where the rule value is an object with a 'ref' property pointing\n\t * to a path, this converts that path into the value at that path.\n\t * For example: { \"ref\": \"style.color.background\" } => \"#fff\".\n\t */\n\tif (\n\t\ttypeof ruleValue === 'object' &&\n\t\t'ref' in ruleValue &&\n\t\truleValue?.ref\n\t) {\n\t\tconst resolvedRuleValue = getCSSValueFromRawStyle(\n\t\t\tgetValueFromObjectPath( tree, ruleValue.ref )\n\t\t) as UnresolvedValue;\n\n\t\t/*\n\t\t * Presence of another ref indicates a reference to another dynamic value.\n\t\t * Pointing to another dynamic value is not supported.\n\t\t */\n\t\tif (\n\t\t\ttypeof resolvedRuleValue === 'object' &&\n\t\t\tresolvedRuleValue !== null &&\n\t\t\t'ref' in resolvedRuleValue &&\n\t\t\tresolvedRuleValue?.ref\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif ( resolvedRuleValue === undefined ) {\n\t\t\treturn ruleValue;\n\t\t}\n\n\t\treturn resolvedRuleValue;\n\t}\n\treturn ruleValue;\n}\n\n/**\n * Looks up a theme file URI based on a relative path.\n *\n * @param file A relative path.\n * @param themeFileURIs A collection of absolute theme file URIs and their corresponding file paths.\n * @return A resolved theme file URI, if one is found in the themeFileURIs collection.\n */\nexport function getResolvedThemeFilePath(\n\tfile: string,\n\tthemeFileURIs?: ThemeFileLink[]\n) {\n\tif ( ! file || ! themeFileURIs || ! Array.isArray( themeFileURIs ) ) {\n\t\treturn file;\n\t}\n\n\tconst uri = themeFileURIs.find(\n\t\t( themeFileUri ) => themeFileUri?.name === file\n\t);\n\n\tif ( ! uri?.href ) {\n\t\treturn file;\n\t}\n\n\treturn uri?.href;\n}\n\n/**\n * Resolves ref and relative path values in theme JSON.\n *\n * @param ruleValue A block style value that may contain a reference to a theme.json value.\n * @param tree A theme.json object.\n * @return The resolved value or incoming ruleValue.\n */\nexport function getResolvedValue(\n\truleValue: UnresolvedValue,\n\ttree: GlobalStylesConfig | undefined\n) {\n\tif ( ! ruleValue || ! tree ) {\n\t\treturn ruleValue;\n\t}\n\n\t// Resolve ref values.\n\tconst resolvedValue = getResolvedRefValue( ruleValue, tree );\n\n\t// Resolve relative paths.\n\tif (\n\t\ttypeof resolvedValue === 'object' &&\n\t\tresolvedValue !== null &&\n\t\t'url' in resolvedValue &&\n\t\tresolvedValue?.url\n\t) {\n\t\tresolvedValue.url = getResolvedThemeFilePath(\n\t\t\tresolvedValue.url,\n\t\t\ttree?._links?.[ 'wp:theme-file' ]\n\t\t);\n\t}\n\n\treturn resolvedValue;\n}\n\nfunction findInPresetsBy(\n\tsettings: GlobalStylesSettings,\n\tblockName?: string,\n\tpresetPath: string[] = [],\n\tpresetProperty: string = 'slug',\n\tpresetValueValue?: string\n) {\n\t// Block presets take priority above root level presets.\n\tconst orderedPresetsByOrigin = [\n\t\tblockName\n\t\t\t? getValueFromObjectPath( settings, [\n\t\t\t\t\t'blocks',\n\t\t\t\t\tblockName,\n\t\t\t\t\t...presetPath,\n\t\t\t ] )\n\t\t\t: undefined,\n\t\tgetValueFromObjectPath( settings, presetPath ),\n\t].filter( Boolean );\n\n\tfor ( const presetByOrigin of orderedPresetsByOrigin ) {\n\t\tif ( presetByOrigin ) {\n\t\t\t// Preset origins ordered by priority.\n\t\t\tconst origins = [ 'custom', 'theme', 'default' ];\n\t\t\tfor ( const origin of origins ) {\n\t\t\t\t// @ts-expect-error\n\t\t\t\tconst presets = presetByOrigin[ origin ];\n\t\t\t\tif ( presets ) {\n\t\t\t\t\tconst presetObject = presets.find(\n\t\t\t\t\t\t( preset: any ) =>\n\t\t\t\t\t\t\tpreset[ presetProperty ] === presetValueValue\n\t\t\t\t\t);\n\t\t\t\t\tif ( presetObject ) {\n\t\t\t\t\t\tif ( presetProperty === 'slug' ) {\n\t\t\t\t\t\t\treturn presetObject;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// If there is a highest priority preset with the same slug but different value the preset we found was overwritten and should be ignored.\n\t\t\t\t\t\tconst highestPresetObjectWithSameSlug = findInPresetsBy(\n\t\t\t\t\t\t\tsettings,\n\t\t\t\t\t\t\tblockName,\n\t\t\t\t\t\t\tpresetPath,\n\t\t\t\t\t\t\t'slug',\n\t\t\t\t\t\t\tpresetObject.slug\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\thighestPresetObjectWithSameSlug[\n\t\t\t\t\t\t\t\tpresetProperty\n\t\t\t\t\t\t\t] === presetObject[ presetProperty ]\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\treturn presetObject;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getValueFromPresetVariable(\n\tfeatures: GlobalStylesConfig,\n\tblockName?: string,\n\tvariable?: string,\n\t[ presetType, slug ]: string[] = []\n) {\n\tconst metadata = PRESET_METADATA.find(\n\t\t( data ) => data.cssVarInfix === presetType\n\t);\n\tif ( ! metadata || ! features.settings ) {\n\t\treturn variable;\n\t}\n\n\tconst presetObject = findInPresetsBy(\n\t\tfeatures.settings,\n\t\tblockName,\n\t\tmetadata.path,\n\t\t'slug',\n\t\tslug\n\t);\n\n\tif ( presetObject ) {\n\t\tconst { valueKey } = metadata;\n\t\tconst result = presetObject[ valueKey ];\n\t\treturn getValueFromVariable( features, blockName, result );\n\t}\n\n\treturn variable;\n}\n\nfunction getValueFromCustomVariable(\n\tfeatures: GlobalStylesConfig,\n\tblockName?: string,\n\tvariable?: string,\n\tpath: string[] = []\n): string | undefined {\n\tconst result =\n\t\t( blockName\n\t\t\t? getValueFromObjectPath( features?.settings ?? {}, [\n\t\t\t\t\t'blocks',\n\t\t\t\t\tblockName,\n\t\t\t\t\t'custom',\n\t\t\t\t\t...path,\n\t\t\t ] )\n\t\t\t: undefined ) ??\n\t\tgetValueFromObjectPath( features?.settings ?? {}, [\n\t\t\t'custom',\n\t\t\t...path,\n\t\t] );\n\tif ( ! result ) {\n\t\treturn variable;\n\t}\n\t// A variable may reference another variable so we need recursion until we find the value.\n\treturn getValueFromVariable( features, blockName, result as string );\n}\n\n/**\n * Attempts to fetch the value of a theme.json CSS variable.\n *\n * This function resolves CSS variable references in two formats:\n * - User format: `var:preset|color|red` or `var:custom|spacing|small`\n * - Theme format: `var(--wp--preset--color--red)` or `var(--wp--custom--spacing--small)`\n *\n * It also handles ref-style variables in the format `{ ref: \"path.to.value\" }`.\n *\n * @param features GlobalStylesContext config (user, base, or merged). Represents the theme.json tree.\n * @param blockName The name of a block as represented in the styles property. E.g., 'root' for root-level, and 'core/block-name' for blocks.\n * @param variable An incoming style value. A CSS var value is expected, but it could be any value.\n * @return The value of the CSS var, if found. If not found, returns the original variable argument.\n */\nexport function getValueFromVariable(\n\tfeatures: GlobalStylesConfig,\n\tblockName?: string,\n\tvariable?: string | UnresolvedValue\n): any {\n\tif ( ! variable || typeof variable !== 'string' ) {\n\t\tif (\n\t\t\ttypeof variable === 'object' &&\n\t\t\tvariable !== null &&\n\t\t\t'ref' in variable &&\n\t\t\ttypeof variable.ref === 'string'\n\t\t) {\n\t\t\tconst resolvedVariable = getValueFromObjectPath(\n\t\t\t\tfeatures,\n\t\t\t\tvariable.ref\n\t\t\t);\n\t\t\t// Presence of another ref indicates a reference to another dynamic value.\n\t\t\t// Pointing to another dynamic value is not supported.\n\t\t\tif (\n\t\t\t\t! resolvedVariable ||\n\t\t\t\t( typeof resolvedVariable === 'object' &&\n\t\t\t\t\t'ref' in resolvedVariable )\n\t\t\t) {\n\t\t\t\treturn resolvedVariable;\n\t\t\t}\n\t\t\tvariable = resolvedVariable as string;\n\t\t} else {\n\t\t\treturn variable;\n\t\t}\n\t}\n\tconst USER_VALUE_PREFIX = 'var:';\n\tconst THEME_VALUE_PREFIX = 'var(--wp--';\n\tconst THEME_VALUE_SUFFIX = ')';\n\n\tlet parsedVar;\n\n\tif ( variable.startsWith( USER_VALUE_PREFIX ) ) {\n\t\tparsedVar = variable.slice( USER_VALUE_PREFIX.length ).split( '|' );\n\t} else if (\n\t\tvariable.startsWith( THEME_VALUE_PREFIX ) &&\n\t\tvariable.endsWith( THEME_VALUE_SUFFIX )\n\t) {\n\t\tparsedVar = variable\n\t\t\t.slice( THEME_VALUE_PREFIX.length, -THEME_VALUE_SUFFIX.length )\n\t\t\t.split( '--' );\n\t} else {\n\t\t// We don't know how to parse the value: either is raw of uses complex CSS such as `calc(1px * var(--wp--variable) )`\n\t\treturn variable;\n\t}\n\n\tconst [ type, ...path ] = parsedVar;\n\tif ( type === 'preset' ) {\n\t\treturn getValueFromPresetVariable(\n\t\t\tfeatures,\n\t\t\tblockName,\n\t\t\tvariable,\n\t\t\tpath\n\t\t);\n\t}\n\tif ( type === 'custom' ) {\n\t\treturn getValueFromCustomVariable(\n\t\t\tfeatures,\n\t\t\tblockName,\n\t\t\tvariable,\n\t\t\tpath\n\t\t);\n\t}\n\treturn variable;\n}\n\n/**\n * Encodes a value to a preset variable format if it matches a preset.\n * This is the inverse operation of getValueFromVariable().\n *\n * @example\n * ```js\n * const presetVar = getPresetVariableFromValue(\n * globalStyles.settings,\n * 'core/paragraph',\n * 'color.text',\n * '#ff0000'\n * );\n * // If #ff0000 is the 'red' preset color, returns 'var:preset|color|red'\n * // Otherwise returns '#ff0000'\n * ```\n *\n * @param features GlobalStylesContext settings object.\n * @param blockName The name of a block (e.g., 'core/paragraph').\n * @param variableStylePath The style path (e.g., 'color.text', 'typography.fontSize').\n * @param presetPropertyValue The value to encode (e.g., '#ff0000').\n * @return The preset variable if found, otherwise the original value.\n */\nexport function getPresetVariableFromValue(\n\tfeatures: GlobalStylesSettings,\n\tblockName: string | undefined,\n\tvariableStylePath: string,\n\tpresetPropertyValue: any\n): any {\n\tif ( ! presetPropertyValue ) {\n\t\treturn presetPropertyValue;\n\t}\n\n\tconst cssVarInfix = STYLE_PATH_TO_CSS_VAR_INFIX[ variableStylePath ];\n\n\tconst metadata = PRESET_METADATA.find(\n\t\t( data ) => data.cssVarInfix === cssVarInfix\n\t);\n\n\tif ( ! metadata ) {\n\t\t// The property doesn't have preset data\n\t\t// so the value should be returned as it is.\n\t\treturn presetPropertyValue;\n\t}\n\tconst { valueKey, path } = metadata;\n\n\tconst presetObject = findInPresetsBy(\n\t\tfeatures,\n\t\tblockName,\n\t\tpath,\n\t\tvalueKey,\n\t\tpresetPropertyValue\n\t);\n\n\tif ( ! presetObject ) {\n\t\t// Value wasn't found in the presets,\n\t\t// so it must be a custom value.\n\t\treturn presetPropertyValue;\n\t}\n\n\treturn `var:preset|${ cssVarInfix }|${ presetObject.slug }`;\n}\n", "/**\n * The fluid utilities must match the backend equivalent.\n * See: gutenberg_get_typography_font_size_value() in lib/block-supports/typography.php\n * ---------------------------------------------------------------\n */\n\n// Defaults.\nconst DEFAULT_MAXIMUM_VIEWPORT_WIDTH = '1600px';\nconst DEFAULT_MINIMUM_VIEWPORT_WIDTH = '320px';\nconst DEFAULT_SCALE_FACTOR = 1;\nconst DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN = 0.25;\nconst DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX = 0.75;\nconst DEFAULT_MINIMUM_FONT_SIZE_LIMIT = '14px';\n\n/**\n * Computes a fluid font-size value that uses clamp(). A minimum and maximum\n * font size OR a single font size can be specified.\n *\n * If a single font size is specified, it is scaled up and down using a logarithmic scale.\n *\n * @example\n * ```js\n * // Calculate fluid font-size value from a minimum and maximum value.\n * const fontSize = getComputedFluidTypographyValue( {\n * minimumFontSize: '20px',\n * maximumFontSize: '45px'\n * } );\n * // Calculate fluid font-size value from a single font size.\n * const fontSize = getComputedFluidTypographyValue( {\n * fontSize: '30px',\n * } );\n * ```\n *\n * @param {Object} args\n * @param {?string} args.minimumViewportWidth Minimum viewport size from which type will have fluidity. Optional if fontSize is specified.\n * @param {?string} args.maximumViewportWidth Maximum size up to which type will have fluidity. Optional if fontSize is specified.\n * @param {string|number} [args.fontSize] Size to derive maximumFontSize and minimumFontSize from, if necessary. Optional if minimumFontSize and maximumFontSize are specified.\n * @param {?string} args.maximumFontSize Maximum font size for any clamp() calculation. Optional.\n * @param {?string} args.minimumFontSize Minimum font size for any clamp() calculation. Optional.\n * @param {?number} args.scaleFactor A scale factor to determine how fast a font scales within boundaries. Optional.\n * @param {?string} args.minimumFontSizeLimit The smallest a calculated font size may be. Optional.\n *\n * @return {string|null} A font-size value using clamp().\n */\nexport function getComputedFluidTypographyValue( {\n\tminimumFontSize,\n\tmaximumFontSize,\n\tfontSize,\n\tminimumViewportWidth = DEFAULT_MINIMUM_VIEWPORT_WIDTH,\n\tmaximumViewportWidth = DEFAULT_MAXIMUM_VIEWPORT_WIDTH,\n\tscaleFactor = DEFAULT_SCALE_FACTOR,\n\tminimumFontSizeLimit,\n}: {\n\tminimumFontSize?: string;\n\tmaximumFontSize?: string;\n\tfontSize?: string | number;\n\tminimumViewportWidth?: string;\n\tmaximumViewportWidth?: string;\n\tscaleFactor?: number;\n\tminimumFontSizeLimit?: string;\n} ) {\n\t// Validate incoming settings and set defaults.\n\tminimumFontSizeLimit = !! getTypographyValueAndUnit( minimumFontSizeLimit )\n\t\t? minimumFontSizeLimit\n\t\t: DEFAULT_MINIMUM_FONT_SIZE_LIMIT;\n\n\t/*\n\t * Calculates missing minimumFontSize and maximumFontSize from\n\t * defaultFontSize if provided.\n\t */\n\tif ( fontSize ) {\n\t\t// Parses default font size.\n\t\tconst fontSizeParsed = getTypographyValueAndUnit( fontSize );\n\n\t\t// Protect against invalid units.\n\t\tif ( ! fontSizeParsed?.unit || ! fontSizeParsed?.value ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Parses the minimum font size limit, so we can perform checks using it.\n\t\tconst minimumFontSizeLimitParsed = getTypographyValueAndUnit(\n\t\t\tminimumFontSizeLimit,\n\t\t\t{\n\t\t\t\tcoerceTo: fontSizeParsed.unit,\n\t\t\t}\n\t\t);\n\n\t\t// Don't enforce minimum font size if a font size has explicitly set a min and max value.\n\t\tif (\n\t\t\t!! minimumFontSizeLimitParsed?.value &&\n\t\t\t! minimumFontSize &&\n\t\t\t! maximumFontSize\n\t\t) {\n\t\t\t/*\n\t\t\t * If a minimum size was not passed to this function\n\t\t\t * and the user-defined font size is lower than $minimum_font_size_limit,\n\t\t\t * do not calculate a fluid value.\n\t\t\t */\n\t\t\tif ( fontSizeParsed?.value <= minimumFontSizeLimitParsed?.value ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\t// If no fluid max font size is available use the incoming value.\n\t\tif ( ! maximumFontSize ) {\n\t\t\tmaximumFontSize = `${ fontSizeParsed.value }${ fontSizeParsed.unit }`;\n\t\t}\n\n\t\t/*\n\t\t * If no minimumFontSize is provided, create one using\n\t\t * the given font size multiplied by the min font size scale factor.\n\t\t */\n\t\tif ( ! minimumFontSize ) {\n\t\t\tconst fontSizeValueInPx =\n\t\t\t\tfontSizeParsed.unit === 'px'\n\t\t\t\t\t? fontSizeParsed.value\n\t\t\t\t\t: fontSizeParsed.value * 16;\n\n\t\t\t/*\n\t\t\t * The scale factor is a multiplier that affects how quickly the curve will move towards the minimum,\n\t\t\t * that is, how quickly the size factor reaches 0 given increasing font size values.\n\t\t\t * For a - b * log2(), lower values of b will make the curve move towards the minimum faster.\n\t\t\t * The scale factor is constrained between min and max values.\n\t\t\t */\n\t\t\tconst minimumFontSizeFactor = Math.min(\n\t\t\t\tMath.max(\n\t\t\t\t\t1 - 0.075 * Math.log2( fontSizeValueInPx ),\n\t\t\t\t\tDEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN\n\t\t\t\t),\n\t\t\t\tDEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX\n\t\t\t);\n\n\t\t\t// Calculates the minimum font size.\n\t\t\tconst calculatedMinimumFontSize = roundToPrecision(\n\t\t\t\tfontSizeParsed.value * minimumFontSizeFactor,\n\t\t\t\t3\n\t\t\t) as number;\n\n\t\t\t// Only use calculated min font size if it's > $minimum_font_size_limit value.\n\t\t\tif (\n\t\t\t\t!! minimumFontSizeLimitParsed?.value &&\n\t\t\t\tcalculatedMinimumFontSize < minimumFontSizeLimitParsed?.value\n\t\t\t) {\n\t\t\t\tminimumFontSize = `${ minimumFontSizeLimitParsed.value }${ minimumFontSizeLimitParsed.unit }`;\n\t\t\t} else {\n\t\t\t\tminimumFontSize = `${ calculatedMinimumFontSize }${ fontSizeParsed.unit }`;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Grab the minimum font size and normalize it in order to use the value for calculations.\n\tconst minimumFontSizeParsed = getTypographyValueAndUnit( minimumFontSize );\n\n\t// We get a 'preferred' unit to keep units consistent when calculating,\n\t// otherwise the result will not be accurate.\n\tconst fontSizeUnit = minimumFontSizeParsed?.unit || 'rem';\n\n\t// Grabs the maximum font size and normalize it in order to use the value for calculations.\n\tconst maximumFontSizeParsed = getTypographyValueAndUnit( maximumFontSize, {\n\t\tcoerceTo: fontSizeUnit,\n\t} );\n\n\t// Checks for mandatory min and max sizes, and protects against unsupported units.\n\tif ( ! minimumFontSizeParsed || ! maximumFontSizeParsed ) {\n\t\treturn null;\n\t}\n\n\t// Uses rem for accessible fluid target font scaling.\n\tconst minimumFontSizeRem = getTypographyValueAndUnit( minimumFontSize, {\n\t\tcoerceTo: 'rem',\n\t} );\n\n\t// Viewport widths defined for fluid typography. Normalize units\n\tconst maximumViewportWidthParsed = getTypographyValueAndUnit(\n\t\tmaximumViewportWidth,\n\t\t{ coerceTo: fontSizeUnit }\n\t);\n\tconst minimumViewportWidthParsed = getTypographyValueAndUnit(\n\t\tminimumViewportWidth,\n\t\t{ coerceTo: fontSizeUnit }\n\t);\n\n\t// Protect against unsupported units.\n\tif (\n\t\t! maximumViewportWidthParsed ||\n\t\t! minimumViewportWidthParsed ||\n\t\t! minimumFontSizeRem\n\t) {\n\t\treturn null;\n\t}\n\n\t// Calculates the linear factor denominator. If it's 0, we cannot calculate a fluid value.\n\tconst linearDenominator =\n\t\tmaximumViewportWidthParsed.value - minimumViewportWidthParsed.value;\n\tif ( ! linearDenominator ) {\n\t\treturn null;\n\t}\n\n\t// Build CSS rule.\n\t// Borrowed from https://websemantics.uk/tools/responsive-font-calculator/.\n\tconst minViewportWidthOffsetValue = roundToPrecision(\n\t\tminimumViewportWidthParsed.value / 100,\n\t\t3\n\t);\n\n\tconst viewportWidthOffset =\n\t\troundToPrecision( minViewportWidthOffsetValue, 3 ) + fontSizeUnit;\n\tconst linearFactor =\n\t\t100 *\n\t\t( ( maximumFontSizeParsed.value - minimumFontSizeParsed.value ) /\n\t\t\tlinearDenominator );\n\tconst linearFactorScaled = roundToPrecision(\n\t\t( linearFactor || 1 ) * scaleFactor,\n\t\t3\n\t);\n\tconst fluidTargetFontSize = `${ minimumFontSizeRem.value }${ minimumFontSizeRem.unit } + ((1vw - ${ viewportWidthOffset }) * ${ linearFactorScaled })`;\n\n\treturn `clamp(${ minimumFontSize }, ${ fluidTargetFontSize }, ${ maximumFontSize })`;\n}\n\n/**\n * Internal method that checks a string for a unit and value and returns an array consisting of `'value'` and `'unit'`, e.g., [ '42', 'rem' ].\n * A raw font size of `value + unit` is expected. If the value is an integer, it will convert to `value + 'px'`.\n *\n * @param rawValue Raw size value from theme.json.\n * @param options Calculation options.\n *\n * @return An object consisting of `'value'` and `'unit'` properties.\n */\nexport function getTypographyValueAndUnit(\n\trawValue?: string | number,\n\toptions = {}\n) {\n\tif ( typeof rawValue !== 'string' && typeof rawValue !== 'number' ) {\n\t\treturn null;\n\t}\n\n\t// Converts numeric values to pixel values by default.\n\tif ( isFinite( rawValue as number ) ) {\n\t\trawValue = `${ rawValue }px`;\n\t}\n\n\tconst { coerceTo, rootSizeValue, acceptableUnits } = {\n\t\tcoerceTo: '',\n\t\t// Default browser font size. Later we could inject some JS to compute this `getComputedStyle( document.querySelector( \"html\" ) ).fontSize`.\n\t\trootSizeValue: 16,\n\t\tacceptableUnits: [ 'rem', 'px', 'em' ],\n\t\t...options,\n\t};\n\n\tconst acceptableUnitsGroup = acceptableUnits?.join( '|' );\n\tconst regexUnits = new RegExp(\n\t\t`^(\\\\d*\\\\.?\\\\d+)(${ acceptableUnitsGroup }){1,1}$`\n\t);\n\n\tconst matches = rawValue.toString().match( regexUnits );\n\n\t// We need a number value and a unit.\n\tif ( ! matches || matches.length < 3 ) {\n\t\treturn null;\n\t}\n\n\tlet [ , value, unit ] = matches;\n\n\tlet returnValue = parseFloat( value );\n\n\tif ( 'px' === coerceTo && ( 'em' === unit || 'rem' === unit ) ) {\n\t\treturnValue = returnValue * rootSizeValue;\n\t\tunit = coerceTo;\n\t}\n\n\tif ( 'px' === unit && ( 'em' === coerceTo || 'rem' === coerceTo ) ) {\n\t\treturnValue = returnValue / rootSizeValue;\n\t\tunit = coerceTo;\n\t}\n\n\t/*\n\t * No calculation is required if swapping between em and rem yet,\n\t * since we assume a root size value. Later we might like to differentiate between\n\t * :root font size (rem) and parent element font size (em) relativity.\n\t */\n\tif (\n\t\t( 'em' === coerceTo || 'rem' === coerceTo ) &&\n\t\t( 'em' === unit || 'rem' === unit )\n\t) {\n\t\tunit = coerceTo;\n\t}\n\n\tif ( ! unit ) {\n\t\treturn null;\n\t}\n\n\treturn {\n\t\tvalue: roundToPrecision( returnValue, 3 ),\n\t\tunit,\n\t};\n}\n\n/**\n * Returns a value rounded to defined precision.\n * Returns `undefined` if the value is not a valid finite number.\n *\n * @param value Raw value.\n * @param digits The number of digits to appear after the decimal point\n *\n * @return Value rounded to standard precision.\n */\nexport function roundToPrecision( value: number, digits: number = 3 ) {\n\tconst base = Math.pow( 10, digits );\n\treturn Math.round( value * base ) / base;\n}\n", "/**\n * Internal dependencies\n */\nimport type {\n\tTypographyPreset,\n\tGlobalStylesSettings,\n\tFluidTypographySettings,\n\tTypographySettings,\n} from '../types';\nimport {\n\tgetTypographyValueAndUnit,\n\tgetComputedFluidTypographyValue,\n} from './fluid';\n\n/**\n * Checks if fluid typography is enabled in the given typography settings.\n *\n * Fluid typography is considered enabled if the fluid setting is explicitly set to true,\n * or if it's an object with properties (which would contain fluid typography configuration\n * like minViewportWidth, maxViewportWidth, etc.).\n *\n * @param typographySettings Typography settings object that may contain fluid typography configuration.\n * @param typographySettings.fluid Fluid typography configuration. Can be:\n * - `true` to enable with default settings\n * - An object with fluid settings (minViewportWidth, maxViewportWidth, etc.)\n * - `false` or `undefined` to disable\n *\n * @return True if fluid typography is enabled, false otherwise.\n */\nfunction isFluidTypographyEnabled(\n\ttypographySettings?: TypographySettings | TypographyPreset\n) {\n\tconst fluidSettings = typographySettings?.fluid;\n\treturn (\n\t\ttrue === fluidSettings ||\n\t\t( fluidSettings &&\n\t\t\ttypeof fluidSettings === 'object' &&\n\t\t\tObject.keys( fluidSettings ).length > 0 )\n\t);\n}\n\n/**\n * Returns fluid typography settings from theme.json setting object.\n *\n * @param settings Theme.json settings\n * @param settings.typography Theme.json typography settings\n * @param settings.layout Theme.json layout settings\n * @return Fluid typography settings\n */\nexport function getFluidTypographyOptionsFromSettings(\n\tsettings: GlobalStylesSettings\n): { fluid?: FluidTypographySettings | boolean | undefined } {\n\tconst typographySettings = settings?.typography ?? {};\n\tconst layoutSettings = settings?.layout;\n\tconst defaultMaxViewportWidth = getTypographyValueAndUnit(\n\t\tlayoutSettings?.wideSize\n\t)\n\t\t? layoutSettings?.wideSize\n\t\t: null;\n\treturn isFluidTypographyEnabled( typographySettings ) &&\n\t\tdefaultMaxViewportWidth\n\t\t? {\n\t\t\t\tfluid: {\n\t\t\t\t\tmaxViewportWidth: defaultMaxViewportWidth,\n\t\t\t\t\t...( typeof typographySettings.fluid === 'object'\n\t\t\t\t\t\t? typographySettings.fluid\n\t\t\t\t\t\t: {} ),\n\t\t\t\t},\n\t\t }\n\t\t: {\n\t\t\t\tfluid: typographySettings?.fluid,\n\t\t };\n}\n\n/**\n * Returns a font-size value based on a given font-size preset.\n * Takes into account fluid typography parameters and attempts to return a css formula depending on available, valid values.\n *\n * The Core PHP equivalent is wp_get_typography_font_size_value().\n *\n * @param preset A typography preset object containing size and fluid properties.\n * @param settings Global styles settings object containing typography and layout settings.\n *\n * @return A font-size value or the value of preset.size.\n */\nexport function getTypographyFontSizeValue(\n\tpreset: TypographyPreset,\n\tsettings: GlobalStylesSettings\n) {\n\tconst { size: defaultSize } = preset;\n\n\t/*\n\t * Catch falsy values and 0/'0'. Fluid calculations cannot be performed on `0`.\n\t * Also return early when a preset font size explicitly disables fluid typography with `false`.\n\t */\n\tif ( ! defaultSize || '0' === defaultSize || false === preset?.fluid ) {\n\t\treturn defaultSize;\n\t}\n\n\t/*\n\t * Return early when fluid typography is disabled in the settings, and there\n\t * are no local settings to enable it for the individual preset.\n\t *\n\t * If this condition isn't met, either the settings or individual preset settings\n\t * have enabled fluid typography.\n\t */\n\tif (\n\t\t! isFluidTypographyEnabled( settings?.typography ) &&\n\t\t! isFluidTypographyEnabled( preset )\n\t) {\n\t\treturn defaultSize;\n\t}\n\n\tconst fluidTypographySettings =\n\t\tgetFluidTypographyOptionsFromSettings( settings )?.fluid ?? {};\n\n\tconst fluidFontSizeValue = getComputedFluidTypographyValue( {\n\t\tminimumFontSize:\n\t\t\ttypeof preset?.fluid === 'boolean' ? undefined : preset?.fluid?.min,\n\t\tmaximumFontSize:\n\t\t\ttypeof preset?.fluid === 'boolean' ? undefined : preset?.fluid?.max,\n\t\tfontSize: defaultSize,\n\t\tminimumFontSizeLimit:\n\t\t\ttypeof fluidTypographySettings === 'object'\n\t\t\t\t? fluidTypographySettings?.minFontSize\n\t\t\t\t: undefined,\n\t\tmaximumViewportWidth:\n\t\t\ttypeof fluidTypographySettings === 'object'\n\t\t\t\t? fluidTypographySettings?.maxViewportWidth\n\t\t\t\t: undefined,\n\t\tminimumViewportWidth:\n\t\t\ttypeof fluidTypographySettings === 'object'\n\t\t\t\t? fluidTypographySettings?.minViewportWidth\n\t\t\t\t: undefined,\n\t} );\n\n\tif ( !! fluidFontSizeValue ) {\n\t\treturn fluidFontSizeValue;\n\t}\n\n\treturn defaultSize;\n}\n", "/**\n * Internal dependencies\n */\nimport { getValueFromObjectPath } from '../utils/object';\nimport { getValueFromVariable } from '../utils/common';\nimport type { GlobalStylesConfig, UnresolvedValue } from '../types';\n\nexport function getStyle< T = any >(\n\tglobalStyles?: GlobalStylesConfig,\n\tpath?: string,\n\tblockName?: string,\n\tshouldDecodeEncode = true\n): T | undefined {\n\tconst appendedPath = path ? '.' + path : '';\n\tconst finalPath = ! blockName\n\t\t? `styles${ appendedPath }`\n\t\t: `styles.blocks.${ blockName }${ appendedPath }`;\n\tif ( ! globalStyles ) {\n\t\treturn undefined;\n\t}\n\n\tconst rawResult = getValueFromObjectPath( globalStyles, finalPath ) as\n\t\t| string\n\t\t| UnresolvedValue;\n\tconst result = shouldDecodeEncode\n\t\t? getValueFromVariable( globalStyles, blockName, rawResult )\n\t\t: rawResult;\n\treturn result as T | undefined;\n}\n", "/**\n * Internal dependencies\n */\nimport { setImmutably } from '../utils/object';\nimport type { GlobalStylesConfig } from '../types';\n\nexport function setStyle< T = any >(\n\tglobalStyles: GlobalStylesConfig,\n\tpath: string,\n\tnewValue: T | undefined,\n\tblockName?: string\n): GlobalStylesConfig {\n\tconst appendedPath = path ? '.' + path : '';\n\tconst finalPath = ! blockName\n\t\t? `styles${ appendedPath }`\n\t\t: `styles.blocks.${ blockName }${ appendedPath }`;\n\n\treturn setImmutably(\n\t\tglobalStyles,\n\t\tfinalPath.split( '.' ),\n\t\tnewValue\n\t) as GlobalStylesConfig;\n}\n", "/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6/index.js';\n\n/**\n * Internal dependencies\n */\nimport type { GlobalStylesConfig } from '../types';\n\n/**\n * Compares global style variations according to their styles and settings properties.\n *\n * @param original A global styles object.\n * @param variation A global styles object.\n * @return Whether `original` and `variation` match.\n */\nexport function areGlobalStylesEqual(\n\toriginal: GlobalStylesConfig,\n\tvariation: GlobalStylesConfig\n): boolean {\n\tif ( typeof original !== 'object' || typeof variation !== 'object' ) {\n\t\treturn original === variation;\n\t}\n\treturn (\n\t\tfastDeepEqual( original?.styles, variation?.styles ) &&\n\t\tfastDeepEqual( original?.settings, variation?.settings )\n\t);\n}\n", "/**\n * External dependencies\n */\nimport deepmerge from 'deepmerge';\n// @ts-ignore - is-plain-object doesn't have proper types\nimport { isPlainObject } from 'is-plain-object';\n\n/**\n * Internal dependencies\n */\nimport type { GlobalStylesConfig } from '../types';\n\n/**\n * Merges base and user global styles configurations\n *\n * @param base Base global styles (theme + WordPress defaults)\n * @param user User customizations\n * @return Merged global styles configuration\n */\nexport function mergeGlobalStyles(\n\tbase: GlobalStylesConfig,\n\tuser: GlobalStylesConfig\n): GlobalStylesConfig {\n\treturn deepmerge( base, user, {\n\t\t/*\n\t\t * We only pass as arrays the presets,\n\t\t * in which case we want the new array of values\n\t\t * to override the old array (no merging).\n\t\t */\n\t\tisMergeableObject: isPlainObject,\n\t\t/*\n\t\t * Exceptions to the above rule.\n\t\t * Background images should be replaced, not merged,\n\t\t * as they themselves are specific object definitions for the style.\n\t\t */\n\t\tcustomMerge: ( key ) => {\n\t\t\tif ( key === 'backgroundImage' ) {\n\t\t\t\treturn ( baseConfig, userConfig ) => userConfig ?? baseConfig;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t},\n\t} );\n}\n", "/*!\n * is-plain-object <https://github.com/jonschlinkert/is-plain-object>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nfunction isObject(o) {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nfunction isPlainObject(o) {\n var ctor,prot;\n\n if (isObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (ctor === undefined) return true;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n}\n\nexport { isPlainObject };\n", "/**\n * Memize options object.\n *\n * @typedef MemizeOptions\n *\n * @property {number} [maxSize] Maximum size of the cache.\n */\n\n/**\n * Internal cache entry.\n *\n * @typedef MemizeCacheNode\n *\n * @property {?MemizeCacheNode|undefined} [prev] Previous node.\n * @property {?MemizeCacheNode|undefined} [next] Next node.\n * @property {Array<*>} args Function arguments for cache\n * entry.\n * @property {*} val Function result.\n */\n\n/**\n * Properties of the enhanced function for controlling cache.\n *\n * @typedef MemizeMemoizedFunction\n *\n * @property {()=>void} clear Clear the cache.\n */\n\n/**\n * Accepts a function to be memoized, and returns a new memoized function, with\n * optional options.\n *\n * @template {(...args: any[]) => any} F\n *\n * @param {F} fn Function to memoize.\n * @param {MemizeOptions} [options] Options object.\n *\n * @return {((...args: Parameters<F>) => ReturnType<F>) & MemizeMemoizedFunction} Memoized function.\n */\nfunction memize(fn, options) {\n\tvar size = 0;\n\n\t/** @type {?MemizeCacheNode|undefined} */\n\tvar head;\n\n\t/** @type {?MemizeCacheNode|undefined} */\n\tvar tail;\n\n\toptions = options || {};\n\n\tfunction memoized(/* ...args */) {\n\t\tvar node = head,\n\t\t\tlen = arguments.length,\n\t\t\targs,\n\t\t\ti;\n\n\t\tsearchCache: while (node) {\n\t\t\t// Perform a shallow equality test to confirm that whether the node\n\t\t\t// under test is a candidate for the arguments passed. Two arrays\n\t\t\t// are shallowly equal if their length matches and each entry is\n\t\t\t// strictly equal between the two sets. Avoid abstracting to a\n\t\t\t// function which could incur an arguments leaking deoptimization.\n\n\t\t\t// Check whether node arguments match arguments length\n\t\t\tif (node.args.length !== arguments.length) {\n\t\t\t\tnode = node.next;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Check whether node arguments match arguments values\n\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\tif (node.args[i] !== arguments[i]) {\n\t\t\t\t\tnode = node.next;\n\t\t\t\t\tcontinue searchCache;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// At this point we can assume we've found a match\n\n\t\t\t// Surface matched node to head if not already\n\t\t\tif (node !== head) {\n\t\t\t\t// As tail, shift to previous. Must only shift if not also\n\t\t\t\t// head, since if both head and tail, there is no previous.\n\t\t\t\tif (node === tail) {\n\t\t\t\t\ttail = node.prev;\n\t\t\t\t}\n\n\t\t\t\t// Adjust siblings to point to each other. If node was tail,\n\t\t\t\t// this also handles new tail's empty `next` assignment.\n\t\t\t\t/** @type {MemizeCacheNode} */ (node.prev).next = node.next;\n\t\t\t\tif (node.next) {\n\t\t\t\t\tnode.next.prev = node.prev;\n\t\t\t\t}\n\n\t\t\t\tnode.next = head;\n\t\t\t\tnode.prev = null;\n\t\t\t\t/** @type {MemizeCacheNode} */ (head).prev = node;\n\t\t\t\thead = node;\n\t\t\t}\n\n\t\t\t// Return immediately\n\t\t\treturn node.val;\n\t\t}\n\n\t\t// No cached value found. Continue to insertion phase:\n\n\t\t// Create a copy of arguments (avoid leaking deoptimization)\n\t\targs = new Array(len);\n\t\tfor (i = 0; i < len; i++) {\n\t\t\targs[i] = arguments[i];\n\t\t}\n\n\t\tnode = {\n\t\t\targs: args,\n\n\t\t\t// Generate the result from original function\n\t\t\tval: fn.apply(null, args),\n\t\t};\n\n\t\t// Don't need to check whether node is already head, since it would\n\t\t// have been returned above already if it was\n\n\t\t// Shift existing head down list\n\t\tif (head) {\n\t\t\thead.prev = node;\n\t\t\tnode.next = head;\n\t\t} else {\n\t\t\t// If no head, follows that there's no tail (at initial or reset)\n\t\t\ttail = node;\n\t\t}\n\n\t\t// Trim tail if we're reached max size and are pending cache insertion\n\t\tif (size === /** @type {MemizeOptions} */ (options).maxSize) {\n\t\t\ttail = /** @type {MemizeCacheNode} */ (tail).prev;\n\t\t\t/** @type {MemizeCacheNode} */ (tail).next = null;\n\t\t} else {\n\t\t\tsize++;\n\t\t}\n\n\t\thead = node;\n\n\t\treturn node.val;\n\t}\n\n\tmemoized.clear = function () {\n\t\thead = null;\n\t\ttail = null;\n\t\tsize = 0;\n\t};\n\n\t// Ignore reason: There's not a clear solution to create an intersection of\n\t// the function with additional properties, where the goal is to retain the\n\t// function signature of the incoming argument and add control properties\n\t// on the return value.\n\n\t// @ts-ignore\n\treturn memoized;\n}\n\nexport { memize as default };\n", "/**\n * External dependencies\n */\nimport memoize from 'memize';\n\n/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf } from '@wordpress/i18n';\n// @ts-expect-error blocks package not typed yet.\nimport { getBlockTypes } from '@wordpress/blocks';\n\ntype TranslationMap = Record< string, string >;\ntype BlockNamesMap = Record< string, string >;\ntype ChangeEntry = [ string, string ];\n\ninterface GetGlobalStylesChangesOptions {\n\tmaxResults?: number;\n}\n\nconst globalStylesChangesCache = new Map< string, ChangeEntry[] >();\nconst EMPTY_ARRAY: string[] = [];\nconst translationMap: TranslationMap = {\n\tcaption: __( 'Caption' ),\n\tlink: __( 'Link' ),\n\tbutton: __( 'Button' ),\n\theading: __( 'Heading' ),\n\th1: __( 'H1' ),\n\th2: __( 'H2' ),\n\th3: __( 'H3' ),\n\th4: __( 'H4' ),\n\th5: __( 'H5' ),\n\th6: __( 'H6' ),\n\t'settings.color': __( 'Color' ),\n\t'settings.typography': __( 'Typography' ),\n\t'settings.shadow': __( 'Shadow' ),\n\t'settings.layout': __( 'Layout' ),\n\t'styles.color': __( 'Colors' ),\n\t'styles.spacing': __( 'Spacing' ),\n\t'styles.background': __( 'Background' ),\n\t'styles.typography': __( 'Typography' ),\n};\nconst getBlockNames = memoize(\n\t(): BlockNamesMap =>\n\t\tgetBlockTypes().reduce< BlockNamesMap >(\n\t\t\t(\n\t\t\t\taccumulator: BlockNamesMap,\n\t\t\t\t{\n\t\t\t\t\tname,\n\t\t\t\t\ttitle,\n\t\t\t\t}: {\n\t\t\t\t\tname: string;\n\t\t\t\t\ttitle: string;\n\t\t\t\t}\n\t\t\t) => {\n\t\t\t\taccumulator[ name ] = title;\n\t\t\t\treturn accumulator;\n\t\t\t},\n\t\t\t{}\n\t\t)\n);\nconst isObject = ( obj: any ): obj is Record< string, any > =>\n\tobj !== null && typeof obj === 'object';\n\n/**\n * Get the translation for a given global styles key.\n * @param key A key representing a path to a global style property or setting.\n * @return A translated key or undefined if no translation exists.\n */\nfunction getTranslation( key: string ): string | undefined {\n\tif ( translationMap[ key ] ) {\n\t\treturn translationMap[ key ];\n\t}\n\n\tconst keyArray = key.split( '.' );\n\n\tif ( keyArray?.[ 0 ] === 'blocks' ) {\n\t\tconst blockName = getBlockNames()?.[ keyArray[ 1 ] ];\n\t\treturn blockName || keyArray[ 1 ];\n\t}\n\n\tif ( keyArray?.[ 0 ] === 'elements' ) {\n\t\treturn translationMap[ keyArray[ 1 ] ] || keyArray[ 1 ];\n\t}\n\n\treturn undefined;\n}\n\n/**\n * A deep comparison of two objects, optimized for comparing global styles.\n * @param changedObject The changed object to compare.\n * @param originalObject The original object to compare against.\n * @param parentPath A key/value pair object of block names and their rendered titles.\n * @return An array of paths whose values have changed.\n */\nfunction deepCompare(\n\tchangedObject: any,\n\toriginalObject: any,\n\tparentPath: string = ''\n): string | string[] | undefined {\n\t// We have two non-object values to compare.\n\tif ( ! isObject( changedObject ) && ! isObject( originalObject ) ) {\n\t\t/*\n\t\t * Only return a path if the value has changed.\n\t\t * And then only the path name up to 2 levels deep.\n\t\t */\n\t\treturn changedObject !== originalObject\n\t\t\t? parentPath.split( '.' ).slice( 0, 2 ).join( '.' )\n\t\t\t: undefined;\n\t}\n\n\t// Enable comparison when an object doesn't have a corresponding property to compare.\n\tchangedObject = isObject( changedObject ) ? changedObject : {};\n\toriginalObject = isObject( originalObject ) ? originalObject : {};\n\n\tconst allKeys = new Set( [\n\t\t...Object.keys( changedObject ),\n\t\t...Object.keys( originalObject ),\n\t] );\n\n\tlet diffs: string[] = [];\n\tfor ( const key of allKeys ) {\n\t\tconst path = parentPath ? parentPath + '.' + key : key;\n\t\tconst changedPath = deepCompare(\n\t\t\tchangedObject[ key ],\n\t\t\toriginalObject[ key ],\n\t\t\tpath\n\t\t);\n\t\tif ( changedPath ) {\n\t\t\tdiffs = diffs.concat( changedPath );\n\t\t}\n\t}\n\treturn diffs;\n}\n\n/**\n * Returns an array of translated summarized global styles changes.\n * Results are cached using a Map() key of `JSON.stringify( { next, previous } )`.\n *\n * @param next The changed object to compare.\n * @param previous The original object to compare against.\n * @return A 2-dimensional array of tuples: [ \"group\", \"translated change\" ].\n */\nexport function getGlobalStylesChangelist(\n\tnext: any,\n\tprevious: any\n): ChangeEntry[] {\n\tconst cacheKey = JSON.stringify( { next, previous } );\n\n\tif ( globalStylesChangesCache.has( cacheKey ) ) {\n\t\treturn globalStylesChangesCache.get( cacheKey )!;\n\t}\n\n\t/*\n\t * Compare the two changesets with normalized keys.\n\t * The order of these keys determines the order in which\n\t * they'll appear in the results.\n\t */\n\tconst changedValueTree = deepCompare(\n\t\t{\n\t\t\tstyles: {\n\t\t\t\tbackground: next?.styles?.background,\n\t\t\t\tcolor: next?.styles?.color,\n\t\t\t\ttypography: next?.styles?.typography,\n\t\t\t\tspacing: next?.styles?.spacing,\n\t\t\t},\n\t\t\tblocks: next?.styles?.blocks,\n\t\t\telements: next?.styles?.elements,\n\t\t\tsettings: next?.settings,\n\t\t},\n\t\t{\n\t\t\tstyles: {\n\t\t\t\tbackground: previous?.styles?.background,\n\t\t\t\tcolor: previous?.styles?.color,\n\t\t\t\ttypography: previous?.styles?.typography,\n\t\t\t\tspacing: previous?.styles?.spacing,\n\t\t\t},\n\t\t\tblocks: previous?.styles?.blocks,\n\t\t\telements: previous?.styles?.elements,\n\t\t\tsettings: previous?.settings,\n\t\t}\n\t);\n\n\tif (\n\t\t! changedValueTree ||\n\t\t( Array.isArray( changedValueTree ) && ! changedValueTree.length )\n\t) {\n\t\tglobalStylesChangesCache.set( cacheKey, [] );\n\t\treturn [];\n\t}\n\n\tconst changedValueArray = Array.isArray( changedValueTree )\n\t\t? changedValueTree\n\t\t: [ changedValueTree ];\n\n\t// Remove duplicate results.\n\tconst result = [ ...new Set( changedValueArray ) ]\n\t\t/*\n\t\t * Translate the keys.\n\t\t * Remove empty translations.\n\t\t */\n\t\t.reduce< ChangeEntry[] >( ( acc, curr ) => {\n\t\t\tconst translation = getTranslation( curr );\n\t\t\tif ( translation ) {\n\t\t\t\tacc.push( [ curr.split( '.' )[ 0 ], translation ] );\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, [] );\n\n\tglobalStylesChangesCache.set( cacheKey, result );\n\n\treturn result;\n}\n\n/**\n * From a getGlobalStylesChangelist() result, returns an array of translated global styles changes, grouped by type.\n * The types are 'blocks', 'elements', 'settings', and 'styles'.\n *\n * @param next The changed object to compare.\n * @param previous The original object to compare against.\n * @param options Options. maxResults: results to return before truncating.\n * @return An array of translated changes.\n */\nexport default function getGlobalStylesChanges(\n\tnext: any,\n\tprevious: any,\n\toptions: GetGlobalStylesChangesOptions = {}\n): string[] {\n\tlet changeList = getGlobalStylesChangelist( next, previous );\n\tconst changesLength = changeList.length;\n\tconst { maxResults } = options;\n\n\tif ( changesLength ) {\n\t\t// Truncate to `n` results if necessary.\n\t\tif ( !! maxResults && changesLength > maxResults ) {\n\t\t\tchangeList = changeList.slice( 0, maxResults );\n\t\t}\n\t\treturn Object.entries(\n\t\t\tchangeList.reduce< Record< string, string[] > >( ( acc, curr ) => {\n\t\t\t\tconst group = acc[ curr[ 0 ] ] || [];\n\t\t\t\tif ( ! group.includes( curr[ 1 ] ) ) {\n\t\t\t\t\tacc[ curr[ 0 ] ] = [ ...group, curr[ 1 ] ];\n\t\t\t\t}\n\t\t\t\treturn acc;\n\t\t\t}, {} )\n\t\t).map( ( [ key, changeValues ] ) => {\n\t\t\tconst changeValuesLength = changeValues.length;\n\t\t\tconst joinedChangesValue = changeValues.join(\n\t\t\t\t/* translators: Used between list items, there is a space after the comma. */\n\t\t\t\t__( ', ' ) // eslint-disable-line @wordpress/i18n-no-flanking-whitespace\n\t\t\t);\n\t\t\tswitch ( key ) {\n\t\t\t\tcase 'blocks': {\n\t\t\t\t\treturn sprintf(\n\t\t\t\t\t\t// translators: %s: a list of block names separated by a comma.\n\t\t\t\t\t\t_n( '%s block.', '%s blocks.', changeValuesLength ),\n\t\t\t\t\t\tjoinedChangesValue\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tcase 'elements': {\n\t\t\t\t\treturn sprintf(\n\t\t\t\t\t\t// translators: %s: a list of element names separated by a comma.\n\t\t\t\t\t\t_n( '%s element.', '%s elements.', changeValuesLength ),\n\t\t\t\t\t\tjoinedChangesValue\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tcase 'settings': {\n\t\t\t\t\treturn sprintf(\n\t\t\t\t\t\t// translators: %s: a list of theme.json setting labels separated by a comma.\n\t\t\t\t\t\t__( '%s settings.' ),\n\t\t\t\t\t\tjoinedChangesValue\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tcase 'styles': {\n\t\t\t\t\treturn sprintf(\n\t\t\t\t\t\t// translators: %s: a list of theme.json top-level styles labels separated by a comma.\n\t\t\t\t\t\t__( '%s styles.' ),\n\t\t\t\t\t\tjoinedChangesValue\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\treturn sprintf(\n\t\t\t\t\t\t// translators: %s: a list of global styles changes separated by a comma.\n\t\t\t\t\t\t__( '%s.' ),\n\t\t\t\t\t\tjoinedChangesValue\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\treturn EMPTY_ARRAY;\n}\n", "/**\n * WordPress dependencies\n */\nimport {\n\t__EXPERIMENTAL_STYLE_PROPERTY as STYLE_PROPERTY,\n\t__EXPERIMENTAL_ELEMENTS as ELEMENTS,\n\tgetBlockSupport,\n\tgetBlockTypes,\n\tstore as blocksStore,\n\t// @ts-expect-error - @wordpress/blocks module doesn't have TypeScript declarations\n} from '@wordpress/blocks';\nimport { getCSSRules, getCSSValueFromRawStyle } from '@wordpress/style-engine';\nimport { select } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tPRESET_METADATA,\n\tROOT_BLOCK_SELECTOR,\n\tROOT_CSS_PROPERTIES_SELECTOR,\n\tscopeSelector,\n\tscopeFeatureSelectors,\n\tappendToSelector,\n\tgetBlockStyleVariationSelector,\n\tgetResolvedValue,\n} from '../utils/common';\nimport { getBlockSelector } from './selectors';\nimport { getTypographyFontSizeValue } from '../utils/typography';\nimport { getDuotoneFilter } from '../utils/duotone';\nimport { kebabCase } from '../utils/string';\nimport { getGapCSSValue } from '../utils/gap';\nimport { setBackgroundStyleDefaults } from '../utils/background';\nimport { LAYOUT_DEFINITIONS } from '../utils/layout';\nimport { getValueFromObjectPath, setImmutably } from '../utils/object';\nimport { getSetting } from '../settings/get-setting';\nimport type {\n\tBlockStyleVariation,\n\tBlockType,\n\tGlobalStylesConfig,\n\tGlobalStylesSettings,\n\tGlobalStylesStyles,\n} from '../types';\n\n// =============================================================================\n// LOCAL TYPE DEFINITIONS\n// =============================================================================\n\n/**\n * Preset metadata for CSS variable generation\n */\ninterface PresetMetadata {\n\tpath: string[];\n\tvalueKey?: string;\n\tvalueFunc?: ( preset: any, settings: any ) => string | number | null;\n\tcssVarInfix: string;\n\tclasses?: Array< {\n\t\tclassSuffix: string;\n\t\tpropertyName: string;\n\t} >;\n}\n\n/**\n * Preset collection by origin\n */\ninterface PresetsByOrigin {\n\t[ origin: string ]: any[];\n}\n\n/**\n * CSS class configuration\n */\ninterface CSSClassConfig {\n\tclassSuffix: string;\n\tpropertyName: string;\n}\n\n/**\n * Style property configuration from WordPress\n */\ninterface StylePropertyConfig {\n\tvalue: string[];\n\tproperties?: Record< string, string >;\n\tuseEngine?: boolean;\n\trootOnly?: boolean;\n}\n\n/**\n * Layout definition structure\n */\ninterface LayoutDefinition {\n\tclassName: string;\n\tname: string;\n\tdisplayMode?: string;\n\tspacingStyles?: Array< {\n\t\tselector?: string;\n\t\trules?: Record< string, any >;\n\t} >;\n\tbaseStyles?: Array< {\n\t\tselector?: string;\n\t\trules?: Record< string, any >;\n\t} >;\n}\n\n/**\n * CSS rule from style engine\n */\ninterface CSSRule {\n\tkey: string;\n\tvalue: any;\n}\n\n/**\n * Block variation in theme.json (different from BlockStyleVariation)\n */\ninterface BlockVariation {\n\tcss?: string;\n\telements?: Record< string, any >;\n\tblocks?: Record< string, any >;\n\t[ key: string ]: any; // For additional style properties\n}\n\n/**\n * Block node in theme.json\n */\ninterface BlockNode {\n\tvariations?: Record< string, BlockVariation >;\n\telements?: Record< string, any >;\n\t[ key: string ]: any; // For additional style properties\n}\n\nexport type BlockSelectors = Record<\n\tstring,\n\t{\n\t\tduotoneSelector?: string;\n\t\tselector: string;\n\t\tfallbackGapValue?: string;\n\t\thasLayoutSupport?: boolean;\n\t\tfeatureSelectors?:\n\t\t\t| string\n\t\t\t| Record< string, string | Record< string, string > >;\n\t\tname?: string;\n\t\tstyleVariationSelectors?: Record< string, string >;\n\t}\n>;\n\n// Elements that rely on class names in their selectors.\nconst ELEMENT_CLASS_NAMES = {\n\tbutton: 'wp-element-button',\n\tcaption: 'wp-element-caption',\n};\n\n// List of block support features that can have their related styles\n// generated under their own feature level selector rather than the block's.\nconst BLOCK_SUPPORT_FEATURE_LEVEL_SELECTORS = {\n\t__experimentalBorder: 'border',\n\tcolor: 'color',\n\tdimensions: 'dimensions',\n\tspacing: 'spacing',\n\ttypography: 'typography',\n};\n\n/**\n * Transform given preset tree into a set of style declarations.\n *\n * @param blockPresets Block presets object\n * @param mergedSettings Merged theme.json settings\n * @return An array of style declarations\n */\nfunction getPresetsDeclarations(\n\tblockPresets: Record< string, any > = {},\n\tmergedSettings: GlobalStylesSettings\n): string[] {\n\treturn PRESET_METADATA.reduce(\n\t\t(\n\t\t\tdeclarations: string[],\n\t\t\t{ path, valueKey, valueFunc, cssVarInfix }: PresetMetadata\n\t\t) => {\n\t\t\tconst presetByOrigin = getValueFromObjectPath(\n\t\t\t\tblockPresets,\n\t\t\t\tpath,\n\t\t\t\t[]\n\t\t\t) as PresetsByOrigin;\n\t\t\t[ 'default', 'theme', 'custom' ].forEach( ( origin ) => {\n\t\t\t\tif ( presetByOrigin[ origin ] ) {\n\t\t\t\t\tpresetByOrigin[ origin ].forEach( ( value: any ) => {\n\t\t\t\t\t\tif ( valueKey && ! valueFunc ) {\n\t\t\t\t\t\t\tdeclarations.push(\n\t\t\t\t\t\t\t\t`--wp--preset--${ cssVarInfix }--${ kebabCase(\n\t\t\t\t\t\t\t\t\tvalue.slug\n\t\t\t\t\t\t\t\t) }: ${ value[ valueKey ] }`\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\tvalueFunc &&\n\t\t\t\t\t\t\ttypeof valueFunc === 'function'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tdeclarations.push(\n\t\t\t\t\t\t\t\t`--wp--preset--${ cssVarInfix }--${ kebabCase(\n\t\t\t\t\t\t\t\t\tvalue.slug\n\t\t\t\t\t\t\t\t) }: ${ valueFunc( value, mergedSettings ) }`\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\treturn declarations;\n\t\t},\n\t\t[] as string[]\n\t);\n}\n\n/**\n * Transform given preset tree into a set of preset class declarations.\n *\n * @param blockSelector Block selector string\n * @param blockPresets Block presets object\n * @return CSS declarations for the preset classes\n */\nfunction getPresetsClasses(\n\tblockSelector: string = '*',\n\tblockPresets: Record< string, any > = {}\n): string {\n\treturn PRESET_METADATA.reduce(\n\t\t(\n\t\t\tdeclarations: string,\n\t\t\t{ path, cssVarInfix, classes }: PresetMetadata\n\t\t) => {\n\t\t\tif ( ! classes ) {\n\t\t\t\treturn declarations;\n\t\t\t}\n\n\t\t\tconst presetByOrigin = getValueFromObjectPath(\n\t\t\t\tblockPresets,\n\t\t\t\tpath,\n\t\t\t\t[]\n\t\t\t) as PresetsByOrigin;\n\t\t\t[ 'default', 'theme', 'custom' ].forEach( ( origin ) => {\n\t\t\t\tif ( presetByOrigin[ origin ] ) {\n\t\t\t\t\tpresetByOrigin[ origin ].forEach(\n\t\t\t\t\t\t( { slug }: { slug: string } ) => {\n\t\t\t\t\t\t\tclasses!.forEach(\n\t\t\t\t\t\t\t\t( {\n\t\t\t\t\t\t\t\t\tclassSuffix,\n\t\t\t\t\t\t\t\t\tpropertyName,\n\t\t\t\t\t\t\t\t}: CSSClassConfig ) => {\n\t\t\t\t\t\t\t\t\tconst classSelectorToUse = `.has-${ kebabCase(\n\t\t\t\t\t\t\t\t\t\tslug\n\t\t\t\t\t\t\t\t\t) }-${ classSuffix }`;\n\t\t\t\t\t\t\t\t\tconst selectorToUse = blockSelector\n\t\t\t\t\t\t\t\t\t\t.split( ',' ) // Selector can be \"h1, h2, h3\"\n\t\t\t\t\t\t\t\t\t\t.map(\n\t\t\t\t\t\t\t\t\t\t\t( selector ) =>\n\t\t\t\t\t\t\t\t\t\t\t\t`${ selector }${ classSelectorToUse }`\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t.join( ',' );\n\t\t\t\t\t\t\t\t\tconst value = `var(--wp--preset--${ cssVarInfix }--${ kebabCase(\n\t\t\t\t\t\t\t\t\t\tslug\n\t\t\t\t\t\t\t\t\t) })`;\n\t\t\t\t\t\t\t\t\tdeclarations += `${ selectorToUse }{${ propertyName }: ${ value } !important;}`;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn declarations;\n\t\t},\n\t\t''\n\t);\n}\n\nfunction getPresetsSvgFilters(\n\tblockPresets: Record< string, any > = {}\n): string[] {\n\treturn PRESET_METADATA.filter(\n\t\t// Duotone are the only type of filters for now.\n\t\t( metadata: PresetMetadata ) => metadata.path.at( -1 ) === 'duotone'\n\t).flatMap( ( metadata: PresetMetadata ) => {\n\t\tconst presetByOrigin = getValueFromObjectPath(\n\t\t\tblockPresets,\n\t\t\tmetadata.path,\n\t\t\t{}\n\t\t) as PresetsByOrigin;\n\t\treturn [ 'default', 'theme' ]\n\t\t\t.filter( ( origin ) => presetByOrigin[ origin ] )\n\t\t\t.flatMap( ( origin ) =>\n\t\t\t\tpresetByOrigin[ origin ].map( ( preset: any ) =>\n\t\t\t\t\tgetDuotoneFilter(\n\t\t\t\t\t\t`wp-duotone-${ preset.slug }`,\n\t\t\t\t\t\tpreset.colors\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t\t.join( '' );\n\t} );\n}\n\nfunction flattenTree(\n\tinput: any = {},\n\tprefix: string,\n\ttoken: string\n): string[] {\n\tlet result: string[] = [];\n\tObject.keys( input ).forEach( ( key ) => {\n\t\tconst newKey = prefix + kebabCase( key.replace( '/', '-' ) );\n\t\tconst newLeaf = input[ key ];\n\n\t\tif ( newLeaf instanceof Object ) {\n\t\t\tconst newPrefix = newKey + token;\n\t\t\tresult = [ ...result, ...flattenTree( newLeaf, newPrefix, token ) ];\n\t\t} else {\n\t\t\tresult.push( `${ newKey }: ${ newLeaf }` );\n\t\t}\n\t} );\n\treturn result;\n}\n\n/**\n * Gets variation selector string from feature selector.\n *\n * @param featureSelector The feature selector\n * @param styleVariationSelector The style variation selector\n * @return Combined selector string\n */\nfunction concatFeatureVariationSelectorString(\n\tfeatureSelector: string,\n\tstyleVariationSelector: string\n): string {\n\tconst featureSelectors = featureSelector.split( ',' );\n\tconst combinedSelectors: string[] = [];\n\tfeatureSelectors.forEach( ( selector ) => {\n\t\tcombinedSelectors.push(\n\t\t\t`${ styleVariationSelector.trim() }${ selector.trim() }`\n\t\t);\n\t} );\n\treturn combinedSelectors.join( ', ' );\n}\n\n/**\n * Generate style declarations for a block's custom feature and subfeature\n * selectors.\n *\n * NOTE: The passed `styles` object will be mutated by this function.\n *\n * @param selectors Custom selectors object for a block\n * @param styles A block's styles object\n * @return Style declarations\n */\nconst getFeatureDeclarations = (\n\tselectors: Record< string, any >,\n\tstyles: Record< string, any >\n): Record< string, string[] > => {\n\tconst declarations: Record< string, string[] > = {};\n\n\tObject.entries( selectors ).forEach( ( [ feature, selector ] ) => {\n\t\t// We're only processing features/subfeatures that have styles.\n\t\tif ( feature === 'root' || ! styles?.[ feature ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst isShorthand = typeof selector === 'string';\n\n\t\t// If we have a selector object instead of shorthand process it.\n\t\tif (\n\t\t\t! isShorthand &&\n\t\t\ttypeof selector === 'object' &&\n\t\t\tselector !== null\n\t\t) {\n\t\t\tObject.entries( selector as Record< string, string > ).forEach(\n\t\t\t\t( [ subfeature, subfeatureSelector ] ) => {\n\t\t\t\t\t// Don't process root feature selector yet or any\n\t\t\t\t\t// subfeature that doesn't have a style.\n\t\t\t\t\tif (\n\t\t\t\t\t\tsubfeature === 'root' ||\n\t\t\t\t\t\t! styles?.[ feature ][ subfeature ]\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Create a temporary styles object and build\n\t\t\t\t\t// declarations for subfeature.\n\t\t\t\t\tconst subfeatureStyles = {\n\t\t\t\t\t\t[ feature ]: {\n\t\t\t\t\t\t\t[ subfeature ]: styles[ feature ][ subfeature ],\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t\tconst newDeclarations =\n\t\t\t\t\t\tgetStylesDeclarations( subfeatureStyles );\n\n\t\t\t\t\t// Merge new declarations in with any others that\n\t\t\t\t\t// share the same selector.\n\t\t\t\t\tdeclarations[ subfeatureSelector ] = [\n\t\t\t\t\t\t...( declarations[ subfeatureSelector ] || [] ),\n\t\t\t\t\t\t...newDeclarations,\n\t\t\t\t\t];\n\n\t\t\t\t\t// Remove the subfeature's style now it will be\n\t\t\t\t\t// included under its own selector not the block's.\n\t\t\t\t\tdelete styles[ feature ][ subfeature ];\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\t// Now subfeatures have been processed and removed, we can\n\t\t// process root, or shorthand, feature selectors.\n\t\tif (\n\t\t\tisShorthand ||\n\t\t\t( typeof selector === 'object' &&\n\t\t\t\tselector !== null &&\n\t\t\t\t'root' in selector )\n\t\t) {\n\t\t\tconst featureSelector = isShorthand\n\t\t\t\t? ( selector as string )\n\t\t\t\t: ( selector as any ).root;\n\n\t\t\t// Create temporary style object and build declarations for feature.\n\t\t\tconst featureStyles = { [ feature ]: styles[ feature ] };\n\t\t\tconst newDeclarations = getStylesDeclarations( featureStyles );\n\n\t\t\t// Merge new declarations with any others that share the selector.\n\t\t\tdeclarations[ featureSelector ] = [\n\t\t\t\t...( declarations[ featureSelector ] || [] ),\n\t\t\t\t...newDeclarations,\n\t\t\t];\n\n\t\t\t// Remove the feature from the block's styles now as it will be\n\t\t\t// included under its own selector not the block's.\n\t\t\tdelete styles[ feature ];\n\t\t}\n\t} );\n\n\treturn declarations;\n};\n\n/**\n * Transform given style tree into a set of style declarations.\n *\n * @param blockStyles Block styles\n * @param selector The selector these declarations should attach to\n * @param useRootPaddingAlign Whether to use CSS custom properties in root selector\n * @param tree A theme.json tree containing layout definitions\n * @param disableRootPadding Whether to force disable the root padding styles\n * @return An array of style declarations\n */\nexport function getStylesDeclarations(\n\tblockStyles: any = {},\n\tselector: string = '',\n\tuseRootPaddingAlign?: boolean,\n\ttree: any = {},\n\tdisableRootPadding: boolean = false\n): string[] {\n\tconst isRoot = ROOT_BLOCK_SELECTOR === selector;\n\tconst output = Object.entries(\n\t\tSTYLE_PROPERTY as Record< string, StylePropertyConfig >\n\t).reduce(\n\t\t(\n\t\t\tdeclarations: string[],\n\t\t\t[ key, { value, properties, useEngine, rootOnly } ]: [\n\t\t\t\tstring,\n\t\t\t\tStylePropertyConfig,\n\t\t\t]\n\t\t) => {\n\t\t\tif ( rootOnly && ! isRoot ) {\n\t\t\t\treturn declarations;\n\t\t\t}\n\t\t\tconst pathToValue = value;\n\t\t\tif ( pathToValue[ 0 ] === 'elements' || useEngine ) {\n\t\t\t\treturn declarations;\n\t\t\t}\n\n\t\t\tconst styleValue = getValueFromObjectPath(\n\t\t\t\tblockStyles,\n\t\t\t\tpathToValue\n\t\t\t);\n\n\t\t\t// Root-level padding styles don't currently support strings with CSS shorthand values.\n\t\t\t// This may change: https://github.com/WordPress/gutenberg/issues/40132.\n\t\t\tif (\n\t\t\t\tkey === '--wp--style--root--padding' &&\n\t\t\t\t( typeof styleValue === 'string' || ! useRootPaddingAlign )\n\t\t\t) {\n\t\t\t\treturn declarations;\n\t\t\t}\n\n\t\t\tif ( properties && typeof styleValue !== 'string' ) {\n\t\t\t\tObject.entries( properties ).forEach( ( entry ) => {\n\t\t\t\t\tconst [ name, prop ] = entry;\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t! getValueFromObjectPath( styleValue, [ prop ], false )\n\t\t\t\t\t) {\n\t\t\t\t\t\t// Do not create a declaration\n\t\t\t\t\t\t// for sub-properties that don't have any value.\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst cssProperty = name.startsWith( '--' )\n\t\t\t\t\t\t? name\n\t\t\t\t\t\t: kebabCase( name );\n\t\t\t\t\tdeclarations.push(\n\t\t\t\t\t\t`${ cssProperty }: ${ getCSSValueFromRawStyle(\n\t\t\t\t\t\t\tgetValueFromObjectPath( styleValue, [ prop ] )\n\t\t\t\t\t\t) }`\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t\t} else if (\n\t\t\t\tgetValueFromObjectPath( blockStyles, pathToValue, false )\n\t\t\t) {\n\t\t\t\tconst cssProperty = key.startsWith( '--' )\n\t\t\t\t\t? key\n\t\t\t\t\t: kebabCase( key );\n\t\t\t\tdeclarations.push(\n\t\t\t\t\t`${ cssProperty }: ${ getCSSValueFromRawStyle(\n\t\t\t\t\t\tgetValueFromObjectPath( blockStyles, pathToValue )\n\t\t\t\t\t) }`\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn declarations;\n\t\t},\n\t\t[] as string[]\n\t);\n\n\t/*\n\t * Preprocess background image values.\n\t *\n\t * Note: As we absorb more and more styles into the engine, we could simplify this function.\n\t * A refactor is for the style engine to handle ref resolution (and possibly defaults)\n\t * via a public util used internally and externally. Theme.json tree and defaults could be passed\n\t * as options.\n\t */\n\tif ( !! blockStyles.background ) {\n\t\t/*\n\t\t * Resolve dynamic values before they are compiled by the style engine,\n\t\t * which doesn't (yet) resolve dynamic values.\n\t\t */\n\t\tif ( blockStyles.background?.backgroundImage ) {\n\t\t\tblockStyles.background.backgroundImage = getResolvedValue(\n\t\t\t\tblockStyles.background.backgroundImage,\n\t\t\t\ttree\n\t\t\t);\n\t\t}\n\n\t\t/*\n\t\t * Set default values for block background styles.\n\t\t * Top-level styles are an exception as they are applied to the body.\n\t\t */\n\t\tif ( ! isRoot && !! blockStyles.background?.backgroundImage?.id ) {\n\t\t\tblockStyles = {\n\t\t\t\t...blockStyles,\n\t\t\t\tbackground: {\n\t\t\t\t\t...blockStyles.background,\n\t\t\t\t\t...setBackgroundStyleDefaults( blockStyles.background ),\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t}\n\n\tconst extraRules = getCSSRules( blockStyles );\n\textraRules.forEach( ( rule: CSSRule ) => {\n\t\t// Don't output padding properties if padding variables are set or if we're not editing a full template.\n\t\tif (\n\t\t\tisRoot &&\n\t\t\t( useRootPaddingAlign || disableRootPadding ) &&\n\t\t\trule.key.startsWith( 'padding' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst cssProperty = rule.key.startsWith( '--' )\n\t\t\t? rule.key\n\t\t\t: kebabCase( rule.key );\n\n\t\tlet ruleValue = getResolvedValue( rule.value, tree );\n\n\t\t// Calculate fluid typography rules where available.\n\t\tif ( cssProperty === 'font-size' ) {\n\t\t\t/*\n\t\t\t * getTypographyFontSizeValue() will check\n\t\t\t * if fluid typography has been activated and also\n\t\t\t * whether the incoming value can be converted to a fluid value.\n\t\t\t * Values that already have a \"clamp()\" function will not pass the test,\n\t\t\t * and therefore the original $value will be returned.\n\t\t\t */\n\t\t\truleValue = getTypographyFontSizeValue(\n\t\t\t\t{ name: '', slug: '', size: ruleValue as string },\n\t\t\t\ttree?.settings\n\t\t\t);\n\t\t}\n\n\t\t// For aspect ratio to work, other dimensions rules (and Cover block defaults) must be unset.\n\t\t// This ensures that a fixed height does not override the aspect ratio.\n\t\tif ( cssProperty === 'aspect-ratio' ) {\n\t\t\toutput.push( 'min-height: unset' );\n\t\t}\n\n\t\toutput.push( `${ cssProperty }: ${ ruleValue }` );\n\t} );\n\n\treturn output;\n}\n\n/**\n * Get generated CSS for layout styles by looking up layout definitions provided\n * in theme.json, and outputting common layout styles, and specific blockGap values.\n *\n * @param props Layout styles configuration\n * @param props.layoutDefinitions Layout definitions from theme.json\n * @param props.style Style object for the block\n * @param props.selector Selector to apply the styles to\n * @param props.hasBlockGapSupport Whether the block supports block gap styles\n * @param props.hasFallbackGapSupport Whether the block supports fallback gap styles\n * @param props.fallbackGapValue Fallback gap value to use if block gap support is\n *\n * @return Generated CSS rules for the layout styles\n */\nexport function getLayoutStyles( {\n\tlayoutDefinitions = LAYOUT_DEFINITIONS,\n\tstyle,\n\tselector,\n\thasBlockGapSupport,\n\thasFallbackGapSupport,\n\tfallbackGapValue,\n}: {\n\tlayoutDefinitions?: Record< string, LayoutDefinition >;\n\tstyle?: GlobalStylesStyles;\n\tselector?: string;\n\thasBlockGapSupport?: boolean;\n\thasFallbackGapSupport?: boolean;\n\tfallbackGapValue?: string;\n} ): string {\n\tlet ruleset = '';\n\tlet gapValue = hasBlockGapSupport\n\t\t? getGapCSSValue( style?.spacing?.blockGap )\n\t\t: '';\n\n\t// Ensure a fallback gap value for the root layout definitions,\n\t// and use a fallback value if one is provided for the current block.\n\tif ( hasFallbackGapSupport ) {\n\t\tif ( selector === ROOT_BLOCK_SELECTOR ) {\n\t\t\tgapValue = ! gapValue ? '0.5em' : gapValue;\n\t\t} else if ( ! hasBlockGapSupport && fallbackGapValue ) {\n\t\t\tgapValue = fallbackGapValue;\n\t\t}\n\t}\n\n\tif ( gapValue && layoutDefinitions ) {\n\t\tObject.values( layoutDefinitions ).forEach(\n\t\t\t( { className, name, spacingStyles } ) => {\n\t\t\t\t// Allow outputting fallback gap styles for flex layout type when block gap support isn't available.\n\t\t\t\tif (\n\t\t\t\t\t! hasBlockGapSupport &&\n\t\t\t\t\t'flex' !== name &&\n\t\t\t\t\t'grid' !== name\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( spacingStyles?.length ) {\n\t\t\t\t\tspacingStyles.forEach( ( spacingStyle: any ) => {\n\t\t\t\t\t\tconst declarations: string[] = [];\n\n\t\t\t\t\t\tif ( spacingStyle.rules ) {\n\t\t\t\t\t\t\tObject.entries( spacingStyle.rules ).forEach(\n\t\t\t\t\t\t\t\t( [ cssProperty, cssValue ] ) => {\n\t\t\t\t\t\t\t\t\tdeclarations.push(\n\t\t\t\t\t\t\t\t\t\t`${ cssProperty }: ${\n\t\t\t\t\t\t\t\t\t\t\tcssValue ? cssValue : gapValue\n\t\t\t\t\t\t\t\t\t\t}`\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( declarations.length ) {\n\t\t\t\t\t\t\tlet combinedSelector = '';\n\n\t\t\t\t\t\t\tif ( ! hasBlockGapSupport ) {\n\t\t\t\t\t\t\t\t// For fallback gap styles, use lower specificity, to ensure styles do not unintentionally override theme styles.\n\t\t\t\t\t\t\t\tcombinedSelector =\n\t\t\t\t\t\t\t\t\tselector === ROOT_BLOCK_SELECTOR\n\t\t\t\t\t\t\t\t\t\t? `:where(.${ className }${\n\t\t\t\t\t\t\t\t\t\t\t\tspacingStyle?.selector || ''\n\t\t\t\t\t\t\t\t\t\t })`\n\t\t\t\t\t\t\t\t\t\t: `:where(${ selector }.${ className }${\n\t\t\t\t\t\t\t\t\t\t\t\tspacingStyle?.selector || ''\n\t\t\t\t\t\t\t\t\t\t })`;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcombinedSelector =\n\t\t\t\t\t\t\t\t\tselector === ROOT_BLOCK_SELECTOR\n\t\t\t\t\t\t\t\t\t\t? `:root :where(.${ className })${\n\t\t\t\t\t\t\t\t\t\t\t\tspacingStyle?.selector || ''\n\t\t\t\t\t\t\t\t\t\t }`\n\t\t\t\t\t\t\t\t\t\t: `:root :where(${ selector }-${ className })${\n\t\t\t\t\t\t\t\t\t\t\t\tspacingStyle?.selector || ''\n\t\t\t\t\t\t\t\t\t\t }`;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\truleset += `${ combinedSelector } { ${ declarations.join(\n\t\t\t\t\t\t\t\t'; '\n\t\t\t\t\t\t\t) }; }`;\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t\t// For backwards compatibility, ensure the legacy block gap CSS variable is still available.\n\t\tif ( selector === ROOT_BLOCK_SELECTOR && hasBlockGapSupport ) {\n\t\t\truleset += `${ ROOT_CSS_PROPERTIES_SELECTOR } { --wp--style--block-gap: ${ gapValue }; }`;\n\t\t}\n\t}\n\n\t// Output base styles\n\tif ( selector === ROOT_BLOCK_SELECTOR && layoutDefinitions ) {\n\t\tconst validDisplayModes = [ 'block', 'flex', 'grid' ];\n\t\tObject.values( layoutDefinitions ).forEach(\n\t\t\t( { className, displayMode, baseStyles }: LayoutDefinition ) => {\n\t\t\t\tif (\n\t\t\t\t\tdisplayMode &&\n\t\t\t\t\tvalidDisplayModes.includes( displayMode )\n\t\t\t\t) {\n\t\t\t\t\truleset += `${ selector } .${ className } { display:${ displayMode }; }`;\n\t\t\t\t}\n\n\t\t\t\tif ( baseStyles?.length ) {\n\t\t\t\t\tbaseStyles.forEach( ( baseStyle: any ) => {\n\t\t\t\t\t\tconst declarations: string[] = [];\n\n\t\t\t\t\t\tif ( baseStyle.rules ) {\n\t\t\t\t\t\t\tObject.entries( baseStyle.rules ).forEach(\n\t\t\t\t\t\t\t\t( [ cssProperty, cssValue ] ) => {\n\t\t\t\t\t\t\t\t\tdeclarations.push(\n\t\t\t\t\t\t\t\t\t\t`${ cssProperty }: ${ cssValue }`\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( declarations.length ) {\n\t\t\t\t\t\t\tconst combinedSelector = `.${ className }${\n\t\t\t\t\t\t\t\tbaseStyle?.selector || ''\n\t\t\t\t\t\t\t}`;\n\t\t\t\t\t\t\truleset += `${ combinedSelector } { ${ declarations.join(\n\t\t\t\t\t\t\t\t'; '\n\t\t\t\t\t\t\t) }; }`;\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n\treturn ruleset;\n}\n\nconst STYLE_KEYS = [\n\t'border',\n\t'color',\n\t'dimensions',\n\t'spacing',\n\t'typography',\n\t'filter',\n\t'outline',\n\t'shadow',\n\t'background',\n];\n\nfunction pickStyleKeys( treeToPickFrom: any ): any {\n\tif ( ! treeToPickFrom ) {\n\t\treturn {};\n\t}\n\tconst entries = Object.entries( treeToPickFrom );\n\tconst pickedEntries = entries.filter( ( [ key ] ) =>\n\t\tSTYLE_KEYS.includes( key )\n\t);\n\t// clone the style objects so that `getFeatureDeclarations` can remove consumed keys from it\n\tconst clonedEntries = pickedEntries.map( ( [ key, style ] ) => [\n\t\tkey,\n\t\tJSON.parse( JSON.stringify( style ) ),\n\t] );\n\treturn Object.fromEntries( clonedEntries );\n}\n\nexport const getNodesWithStyles = (\n\ttree: GlobalStylesConfig,\n\tblockSelectors: string | BlockSelectors\n): any[] => {\n\tconst nodes: {\n\t\tstyles: Partial< Omit< GlobalStylesStyles, 'elements' | 'blocks' > >;\n\t\tselector: string;\n\t\tskipSelectorWrapper?: boolean;\n\t\tduotoneSelector?: string;\n\t\tfeatureSelectors?:\n\t\t\t| string\n\t\t\t| Record< string, string | Record< string, string > >;\n\t\tfallbackGapValue?: string;\n\t\thasLayoutSupport?: boolean;\n\t\tstyleVariationSelectors?: Record< string, string >;\n\t}[] = [];\n\n\tif ( ! tree?.styles ) {\n\t\treturn nodes;\n\t}\n\n\t// Top-level.\n\tconst styles = pickStyleKeys( tree.styles );\n\tif ( styles ) {\n\t\tnodes.push( {\n\t\t\tstyles,\n\t\t\tselector: ROOT_BLOCK_SELECTOR,\n\t\t\t// Root selector (body) styles should not be wrapped in `:root where()` to keep\n\t\t\t// specificity at (0,0,1) and maintain backwards compatibility.\n\t\t\tskipSelectorWrapper: true,\n\t\t} );\n\t}\n\n\tObject.entries( ELEMENTS ).forEach( ( [ name, selector ] ) => {\n\t\tif ( tree.styles?.elements?.[ name ] ) {\n\t\t\tnodes.push( {\n\t\t\t\tstyles: tree.styles?.elements?.[ name ] ?? {},\n\t\t\t\tselector: selector as string,\n\t\t\t\t// Top level elements that don't use a class name should not receive the\n\t\t\t\t// `:root :where()` wrapper to maintain backwards compatibility.\n\t\t\t\tskipSelectorWrapper: ! (\n\t\t\t\t\tELEMENT_CLASS_NAMES as Record< string, string >\n\t\t\t\t )[ name ],\n\t\t\t} );\n\t\t}\n\t} );\n\n\t// Iterate over blocks: they can have styles & elements.\n\tObject.entries( tree.styles?.blocks ?? {} ).forEach(\n\t\t( [ blockName, node ] ) => {\n\t\t\tconst blockStyles = pickStyleKeys( node );\n\t\t\tconst typedNode = node as BlockNode;\n\n\t\t\tif ( typedNode?.variations ) {\n\t\t\t\tconst variations: Record< string, any > = {};\n\t\t\t\tObject.entries( typedNode.variations ).forEach(\n\t\t\t\t\t( [ variationName, variation ] ) => {\n\t\t\t\t\t\tconst typedVariation = variation as BlockVariation;\n\t\t\t\t\t\tvariations[ variationName ] =\n\t\t\t\t\t\t\tpickStyleKeys( typedVariation );\n\t\t\t\t\t\tif ( typedVariation?.css ) {\n\t\t\t\t\t\t\tvariations[ variationName ].css =\n\t\t\t\t\t\t\t\ttypedVariation.css;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst variationSelector =\n\t\t\t\t\t\t\ttypeof blockSelectors !== 'string'\n\t\t\t\t\t\t\t\t? blockSelectors[ blockName ]\n\t\t\t\t\t\t\t\t\t\t?.styleVariationSelectors?.[\n\t\t\t\t\t\t\t\t\t\tvariationName\n\t\t\t\t\t\t\t\t ]\n\t\t\t\t\t\t\t\t: undefined;\n\n\t\t\t\t\t\t// Process the variation's inner element styles.\n\t\t\t\t\t\t// This comes before the inner block styles so the\n\t\t\t\t\t\t// element styles within the block type styles take\n\t\t\t\t\t\t// precedence over these.\n\t\t\t\t\t\tObject.entries(\n\t\t\t\t\t\t\ttypedVariation?.elements ?? {}\n\t\t\t\t\t\t).forEach( ( [ element, elementStyles ] ) => {\n\t\t\t\t\t\t\tif ( elementStyles && ELEMENTS[ element ] ) {\n\t\t\t\t\t\t\t\tnodes.push( {\n\t\t\t\t\t\t\t\t\tstyles: elementStyles,\n\t\t\t\t\t\t\t\t\tselector: scopeSelector(\n\t\t\t\t\t\t\t\t\t\tvariationSelector,\n\t\t\t\t\t\t\t\t\t\tELEMENTS[ element ]\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t// Process the variations inner block type styles.\n\t\t\t\t\t\tObject.entries( typedVariation?.blocks ?? {} ).forEach(\n\t\t\t\t\t\t\t( [\n\t\t\t\t\t\t\t\tvariationBlockName,\n\t\t\t\t\t\t\t\tvariationBlockStyles,\n\t\t\t\t\t\t\t] ) => {\n\t\t\t\t\t\t\t\tconst variationBlockSelector =\n\t\t\t\t\t\t\t\t\ttypeof blockSelectors !== 'string'\n\t\t\t\t\t\t\t\t\t\t? scopeSelector(\n\t\t\t\t\t\t\t\t\t\t\t\tvariationSelector,\n\t\t\t\t\t\t\t\t\t\t\t\tblockSelectors[\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariationBlockName\n\t\t\t\t\t\t\t\t\t\t\t\t]?.selector\n\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\t\tconst variationDuotoneSelector =\n\t\t\t\t\t\t\t\t\ttypeof blockSelectors !== 'string'\n\t\t\t\t\t\t\t\t\t\t? scopeSelector(\n\t\t\t\t\t\t\t\t\t\t\t\tvariationSelector,\n\t\t\t\t\t\t\t\t\t\t\t\tblockSelectors[\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariationBlockName\n\t\t\t\t\t\t\t\t\t\t\t\t]?.duotoneSelector as string\n\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\t\tconst variationFeatureSelectors =\n\t\t\t\t\t\t\t\t\ttypeof blockSelectors !== 'string'\n\t\t\t\t\t\t\t\t\t\t? scopeFeatureSelectors(\n\t\t\t\t\t\t\t\t\t\t\t\tvariationSelector,\n\t\t\t\t\t\t\t\t\t\t\t\tblockSelectors[\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariationBlockName\n\t\t\t\t\t\t\t\t\t\t\t\t]?.featureSelectors ?? {}\n\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t: undefined;\n\n\t\t\t\t\t\t\t\tconst variationBlockStyleNodes =\n\t\t\t\t\t\t\t\t\tpickStyleKeys( variationBlockStyles );\n\n\t\t\t\t\t\t\t\tif ( variationBlockStyles?.css ) {\n\t\t\t\t\t\t\t\t\tvariationBlockStyleNodes.css =\n\t\t\t\t\t\t\t\t\t\tvariationBlockStyles.css;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t! variationBlockSelector ||\n\t\t\t\t\t\t\t\t\ttypeof blockSelectors === 'string'\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tnodes.push( {\n\t\t\t\t\t\t\t\t\tselector: variationBlockSelector,\n\t\t\t\t\t\t\t\t\tduotoneSelector: variationDuotoneSelector,\n\t\t\t\t\t\t\t\t\tfeatureSelectors: variationFeatureSelectors,\n\t\t\t\t\t\t\t\t\tfallbackGapValue:\n\t\t\t\t\t\t\t\t\t\tblockSelectors[ variationBlockName ]\n\t\t\t\t\t\t\t\t\t\t\t?.fallbackGapValue,\n\t\t\t\t\t\t\t\t\thasLayoutSupport:\n\t\t\t\t\t\t\t\t\t\tblockSelectors[ variationBlockName ]\n\t\t\t\t\t\t\t\t\t\t\t?.hasLayoutSupport,\n\t\t\t\t\t\t\t\t\tstyles: variationBlockStyleNodes,\n\t\t\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t\t\t// Process element styles for the inner blocks\n\t\t\t\t\t\t\t\t// of the variation.\n\t\t\t\t\t\t\t\tObject.entries(\n\t\t\t\t\t\t\t\t\tvariationBlockStyles.elements ?? {}\n\t\t\t\t\t\t\t\t).forEach(\n\t\t\t\t\t\t\t\t\t( [\n\t\t\t\t\t\t\t\t\t\tvariationBlockElement,\n\t\t\t\t\t\t\t\t\t\tvariationBlockElementStyles,\n\t\t\t\t\t\t\t\t\t] ) => {\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\tvariationBlockElementStyles &&\n\t\t\t\t\t\t\t\t\t\t\tELEMENTS[ variationBlockElement ]\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\tnodes.push( {\n\t\t\t\t\t\t\t\t\t\t\t\tstyles: variationBlockElementStyles,\n\t\t\t\t\t\t\t\t\t\t\t\tselector: scopeSelector(\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariationBlockSelector,\n\t\t\t\t\t\t\t\t\t\t\t\t\tELEMENTS[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariationBlockElement\n\t\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\tblockStyles.variations = variations;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\ttypeof blockSelectors !== 'string' &&\n\t\t\t\tblockSelectors?.[ blockName ]?.selector\n\t\t\t) {\n\t\t\t\tnodes.push( {\n\t\t\t\t\tduotoneSelector:\n\t\t\t\t\t\tblockSelectors[ blockName ].duotoneSelector,\n\t\t\t\t\tfallbackGapValue:\n\t\t\t\t\t\tblockSelectors[ blockName ].fallbackGapValue,\n\t\t\t\t\thasLayoutSupport:\n\t\t\t\t\t\tblockSelectors[ blockName ].hasLayoutSupport,\n\t\t\t\t\tselector: blockSelectors[ blockName ].selector,\n\t\t\t\t\tstyles: blockStyles,\n\t\t\t\t\tfeatureSelectors:\n\t\t\t\t\t\tblockSelectors[ blockName ].featureSelectors,\n\t\t\t\t\tstyleVariationSelectors:\n\t\t\t\t\t\tblockSelectors[ blockName ].styleVariationSelectors,\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tObject.entries( typedNode?.elements ?? {} ).forEach(\n\t\t\t\t( [ elementName, value ] ) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof blockSelectors !== 'string' &&\n\t\t\t\t\t\tvalue &&\n\t\t\t\t\t\tblockSelectors?.[ blockName ] &&\n\t\t\t\t\t\tELEMENTS[ elementName ]\n\t\t\t\t\t) {\n\t\t\t\t\t\tnodes.push( {\n\t\t\t\t\t\t\tstyles: value,\n\t\t\t\t\t\t\tselector: blockSelectors[ blockName ]?.selector\n\t\t\t\t\t\t\t\t.split( ',' )\n\t\t\t\t\t\t\t\t.map( ( sel: string ) => {\n\t\t\t\t\t\t\t\t\tconst elementSelectors =\n\t\t\t\t\t\t\t\t\t\tELEMENTS[ elementName ].split( ',' );\n\t\t\t\t\t\t\t\t\treturn elementSelectors.map(\n\t\t\t\t\t\t\t\t\t\t( elementSelector: string ) =>\n\t\t\t\t\t\t\t\t\t\t\tsel + ' ' + elementSelector\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t.join( ',' ),\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t);\n\n\treturn nodes;\n};\n\nexport const getNodesWithSettings = (\n\ttree: GlobalStylesConfig,\n\tblockSelectors: string | BlockSelectors\n): any[] => {\n\tconst nodes: {\n\t\tpresets: Record< string, any >;\n\t\tcustom?: Record< string, any >;\n\t\tselector?: string;\n\t\tduotoneSelector?: string;\n\t\tfallbackGapValue?: string;\n\t\thasLayoutSupport?: boolean;\n\t\tfeatureSelectors?: Record< string, string >;\n\t\tstyleVariationSelectors?: Record< string, string >;\n\t}[] = [];\n\n\tif ( ! tree?.settings ) {\n\t\treturn nodes;\n\t}\n\n\tconst pickPresets = ( treeToPickFrom: any ): any => {\n\t\tlet presets = {};\n\t\tPRESET_METADATA.forEach( ( { path } ) => {\n\t\t\tconst value = getValueFromObjectPath( treeToPickFrom, path, false );\n\t\t\tif ( value !== false ) {\n\t\t\t\tpresets = setImmutably( presets, path, value );\n\t\t\t}\n\t\t} );\n\t\treturn presets;\n\t};\n\n\t// Top-level.\n\tconst presets = pickPresets( tree.settings );\n\tconst custom = tree.settings?.custom;\n\tif ( Object.keys( presets ).length > 0 || custom ) {\n\t\tnodes.push( {\n\t\t\tpresets,\n\t\t\tcustom,\n\t\t\tselector: ROOT_CSS_PROPERTIES_SELECTOR,\n\t\t} );\n\t}\n\n\t// Blocks.\n\tObject.entries( tree.settings?.blocks ?? {} ).forEach(\n\t\t( [ blockName, node ] ) => {\n\t\t\tconst blockCustom = node.custom;\n\t\t\tif (\n\t\t\t\ttypeof blockSelectors === 'string' ||\n\t\t\t\t! blockSelectors[ blockName ]\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst blockPresets = pickPresets( node );\n\t\t\tif ( Object.keys( blockPresets ).length > 0 || blockCustom ) {\n\t\t\t\tnodes.push( {\n\t\t\t\t\tpresets: blockPresets,\n\t\t\t\t\tcustom: blockCustom,\n\t\t\t\t\tselector: blockSelectors[ blockName ]?.selector,\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t);\n\n\treturn nodes;\n};\n\nexport const generateCustomProperties = (\n\ttree: GlobalStylesConfig,\n\tblockSelectors: BlockSelectors\n): string => {\n\tconst settings = getNodesWithSettings( tree, blockSelectors );\n\tlet ruleset = '';\n\tsettings.forEach( ( { presets, custom, selector } ) => {\n\t\tconst declarations = tree?.settings\n\t\t\t? getPresetsDeclarations( presets, tree?.settings )\n\t\t\t: [];\n\t\tconst customProps = flattenTree( custom, '--wp--custom--', '--' );\n\t\tif ( customProps.length > 0 ) {\n\t\t\tdeclarations.push( ...customProps );\n\t\t}\n\n\t\tif ( declarations.length > 0 ) {\n\t\t\truleset += `${ selector }{${ declarations.join( ';' ) };}`;\n\t\t}\n\t} );\n\n\treturn ruleset;\n};\n\nexport const transformToStyles = (\n\ttree: GlobalStylesConfig,\n\tblockSelectors: string | BlockSelectors,\n\thasBlockGapSupport?: boolean,\n\thasFallbackGapSupport?: boolean,\n\tdisableLayoutStyles: boolean = false,\n\tdisableRootPadding: boolean = false,\n\tstyleOptions: Record< string, boolean > = {}\n): string => {\n\t// These allow opting out of certain sets of styles.\n\tconst options = {\n\t\tblockGap: true,\n\t\tblockStyles: true,\n\t\tlayoutStyles: true,\n\t\tmarginReset: true,\n\t\tpresets: true,\n\t\trootPadding: true,\n\t\tvariationStyles: false,\n\t\t...styleOptions,\n\t};\n\tconst nodesWithStyles = getNodesWithStyles( tree, blockSelectors );\n\tconst nodesWithSettings = getNodesWithSettings( tree, blockSelectors );\n\tconst useRootPaddingAlign = tree?.settings?.useRootPaddingAwareAlignments;\n\tconst { contentSize, wideSize } = tree?.settings?.layout || {};\n\tconst hasBodyStyles =\n\t\toptions.marginReset || options.rootPadding || options.layoutStyles;\n\n\tlet ruleset = '';\n\n\tif ( options.presets && ( contentSize || wideSize ) ) {\n\t\truleset += `${ ROOT_CSS_PROPERTIES_SELECTOR } {`;\n\t\truleset = contentSize\n\t\t\t? ruleset + ` --wp--style--global--content-size: ${ contentSize };`\n\t\t\t: ruleset;\n\t\truleset = wideSize\n\t\t\t? ruleset + ` --wp--style--global--wide-size: ${ wideSize };`\n\t\t\t: ruleset;\n\t\truleset += '}';\n\t}\n\n\tif ( hasBodyStyles ) {\n\t\t/*\n\t\t * Reset default browser margin on the body element.\n\t\t * This is set on the body selector **before** generating the ruleset\n\t\t * from the `theme.json`. This is to ensure that if the `theme.json` declares\n\t\t * `margin` in its `spacing` declaration for the `body` element then these\n\t\t * user-generated values take precedence in the CSS cascade.\n\t\t * @link https://github.com/WordPress/gutenberg/issues/36147.\n\t\t */\n\t\truleset += ':where(body) {margin: 0;';\n\n\t\t// Root padding styles should be output for full templates, patterns and template parts.\n\t\tif ( options.rootPadding && useRootPaddingAlign ) {\n\t\t\t/*\n\t\t\t * These rules reproduce the ones from https://github.com/WordPress/gutenberg/blob/79103f124925d1f457f627e154f52a56228ed5ad/lib/class-wp-theme-json-gutenberg.php#L2508\n\t\t\t * almost exactly, but for the selectors that target block wrappers in the front end. This code only runs in the editor, so it doesn't need those selectors.\n\t\t\t */\n\t\t\truleset += `padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }\n\t\t\t\t.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t\t.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }\n\t\t\t\t.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }\n\t\t\t\t.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;\n\t\t\t\t`;\n\t\t}\n\n\t\truleset += '}';\n\t}\n\n\tif ( options.blockStyles ) {\n\t\tnodesWithStyles.forEach(\n\t\t\t( {\n\t\t\t\tselector,\n\t\t\t\tduotoneSelector,\n\t\t\t\tstyles,\n\t\t\t\tfallbackGapValue,\n\t\t\t\thasLayoutSupport,\n\t\t\t\tfeatureSelectors,\n\t\t\t\tstyleVariationSelectors,\n\t\t\t\tskipSelectorWrapper,\n\t\t\t} ) => {\n\t\t\t\t// Process styles for block support features with custom feature level\n\t\t\t\t// CSS selectors set.\n\t\t\t\tif ( featureSelectors ) {\n\t\t\t\t\tconst featureDeclarations = getFeatureDeclarations(\n\t\t\t\t\t\tfeatureSelectors,\n\t\t\t\t\t\tstyles\n\t\t\t\t\t);\n\n\t\t\t\t\tObject.entries( featureDeclarations ).forEach(\n\t\t\t\t\t\t( [ cssSelector, declarations ] ) => {\n\t\t\t\t\t\t\tif ( declarations.length ) {\n\t\t\t\t\t\t\t\tconst rules = declarations.join( ';' );\n\t\t\t\t\t\t\t\truleset += `:root :where(${ cssSelector }){${ rules };}`;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Process duotone styles.\n\t\t\t\tif ( duotoneSelector ) {\n\t\t\t\t\tconst duotoneStyles: any = {};\n\t\t\t\t\tif ( styles?.filter ) {\n\t\t\t\t\t\tduotoneStyles.filter = styles.filter;\n\t\t\t\t\t\tdelete styles.filter;\n\t\t\t\t\t}\n\t\t\t\t\tconst duotoneDeclarations =\n\t\t\t\t\t\tgetStylesDeclarations( duotoneStyles );\n\t\t\t\t\tif ( duotoneDeclarations.length ) {\n\t\t\t\t\t\truleset += `${ duotoneSelector }{${ duotoneDeclarations.join(\n\t\t\t\t\t\t\t';'\n\t\t\t\t\t\t) };}`;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Process blockGap and layout styles.\n\t\t\t\tif (\n\t\t\t\t\t! disableLayoutStyles &&\n\t\t\t\t\t( ROOT_BLOCK_SELECTOR === selector || hasLayoutSupport )\n\t\t\t\t) {\n\t\t\t\t\truleset += getLayoutStyles( {\n\t\t\t\t\t\tstyle: styles,\n\t\t\t\t\t\tselector,\n\t\t\t\t\t\thasBlockGapSupport,\n\t\t\t\t\t\thasFallbackGapSupport,\n\t\t\t\t\t\tfallbackGapValue,\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\t// Process the remaining block styles (they use either normal block class or __experimentalSelector).\n\t\t\t\tconst styleDeclarations = getStylesDeclarations(\n\t\t\t\t\tstyles,\n\t\t\t\t\tselector,\n\t\t\t\t\tuseRootPaddingAlign,\n\t\t\t\t\ttree,\n\t\t\t\t\tdisableRootPadding\n\t\t\t\t);\n\t\t\t\tif ( styleDeclarations?.length ) {\n\t\t\t\t\tconst generalSelector = skipSelectorWrapper\n\t\t\t\t\t\t? selector\n\t\t\t\t\t\t: `:root :where(${ selector })`;\n\t\t\t\t\truleset += `${ generalSelector }{${ styleDeclarations.join(\n\t\t\t\t\t\t';'\n\t\t\t\t\t) };}`;\n\t\t\t\t}\n\t\t\t\tif ( styles?.css ) {\n\t\t\t\t\truleset += processCSSNesting(\n\t\t\t\t\t\tstyles.css,\n\t\t\t\t\t\t`:root :where(${ selector })`\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif ( options.variationStyles && styleVariationSelectors ) {\n\t\t\t\t\tObject.entries( styleVariationSelectors ).forEach(\n\t\t\t\t\t\t( [ styleVariationName, styleVariationSelector ] ) => {\n\t\t\t\t\t\t\tconst styleVariations =\n\t\t\t\t\t\t\t\tstyles?.variations?.[ styleVariationName ];\n\t\t\t\t\t\t\tif ( styleVariations ) {\n\t\t\t\t\t\t\t\t// If the block uses any custom selectors for block support, add those first.\n\t\t\t\t\t\t\t\tif ( featureSelectors ) {\n\t\t\t\t\t\t\t\t\tconst featureDeclarations =\n\t\t\t\t\t\t\t\t\t\tgetFeatureDeclarations(\n\t\t\t\t\t\t\t\t\t\t\tfeatureSelectors,\n\t\t\t\t\t\t\t\t\t\t\tstyleVariations\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\tObject.entries(\n\t\t\t\t\t\t\t\t\t\tfeatureDeclarations\n\t\t\t\t\t\t\t\t\t).forEach(\n\t\t\t\t\t\t\t\t\t\t( [ baseSelector, declarations ]: [\n\t\t\t\t\t\t\t\t\t\t\tstring,\n\t\t\t\t\t\t\t\t\t\t\tstring[],\n\t\t\t\t\t\t\t\t\t\t] ) => {\n\t\t\t\t\t\t\t\t\t\t\tif ( declarations.length ) {\n\t\t\t\t\t\t\t\t\t\t\t\tconst cssSelector =\n\t\t\t\t\t\t\t\t\t\t\t\t\tconcatFeatureVariationSelectorString(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbaseSelector,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstyleVariationSelector as string\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\tconst rules =\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeclarations.join( ';' );\n\t\t\t\t\t\t\t\t\t\t\t\truleset += `:root :where(${ cssSelector }){${ rules };}`;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Otherwise add regular selectors.\n\t\t\t\t\t\t\t\tconst styleVariationDeclarations =\n\t\t\t\t\t\t\t\t\tgetStylesDeclarations(\n\t\t\t\t\t\t\t\t\t\tstyleVariations,\n\t\t\t\t\t\t\t\t\t\tstyleVariationSelector as string,\n\t\t\t\t\t\t\t\t\t\tuseRootPaddingAlign,\n\t\t\t\t\t\t\t\t\t\ttree\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tif ( styleVariationDeclarations.length ) {\n\t\t\t\t\t\t\t\t\truleset += `:root :where(${ styleVariationSelector }){${ styleVariationDeclarations.join(\n\t\t\t\t\t\t\t\t\t\t';'\n\t\t\t\t\t\t\t\t\t) };}`;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( styleVariations?.css ) {\n\t\t\t\t\t\t\t\t\truleset += processCSSNesting(\n\t\t\t\t\t\t\t\t\t\tstyleVariations.css,\n\t\t\t\t\t\t\t\t\t\t`:root :where(${ styleVariationSelector })`\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Check for pseudo selector in `styles` and handle separately.\n\t\t\t\tconst pseudoSelectorStyles = Object.entries( styles ).filter(\n\t\t\t\t\t( [ key ] ) => key.startsWith( ':' )\n\t\t\t\t);\n\n\t\t\t\tif ( pseudoSelectorStyles?.length ) {\n\t\t\t\t\tpseudoSelectorStyles.forEach(\n\t\t\t\t\t\t( [ pseudoKey, pseudoStyle ] ) => {\n\t\t\t\t\t\t\tconst pseudoDeclarations =\n\t\t\t\t\t\t\t\tgetStylesDeclarations( pseudoStyle );\n\n\t\t\t\t\t\t\tif ( ! pseudoDeclarations?.length ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// `selector` may be provided in a form\n\t\t\t\t\t\t\t// where block level selectors have sub element\n\t\t\t\t\t\t\t// selectors appended to them as a comma separated\n\t\t\t\t\t\t\t// string.\n\t\t\t\t\t\t\t// e.g. `h1 a,h2 a,h3 a,h4 a,h5 a,h6 a`;\n\t\t\t\t\t\t\t// Split and append pseudo selector to create\n\t\t\t\t\t\t\t// the proper rules to target the elements.\n\t\t\t\t\t\t\tconst _selector = selector\n\t\t\t\t\t\t\t\t.split( ',' )\n\t\t\t\t\t\t\t\t.map( ( sel: string ) => sel + pseudoKey )\n\t\t\t\t\t\t\t\t.join( ',' );\n\n\t\t\t\t\t\t\t// As pseudo classes such as :hover, :focus etc. have class-level\n\t\t\t\t\t\t\t// specificity, they must use the `:root :where()` wrapper. This.\n\t\t\t\t\t\t\t// caps the specificity at `0-1-0` to allow proper nesting of variations\n\t\t\t\t\t\t\t// and block type element styles.\n\t\t\t\t\t\t\tconst pseudoRule = `:root :where(${ _selector }){${ pseudoDeclarations.join(\n\t\t\t\t\t\t\t\t';'\n\t\t\t\t\t\t\t) };}`;\n\n\t\t\t\t\t\t\truleset += pseudoRule;\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n\tif ( options.layoutStyles ) {\n\t\t/* Add alignment / layout styles */\n\t\truleset =\n\t\t\truleset +\n\t\t\t'.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }';\n\t\truleset =\n\t\t\truleset +\n\t\t\t'.wp-site-blocks > .alignright { float: right; margin-left: 2em; }';\n\t\truleset =\n\t\t\truleset +\n\t\t\t'.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }';\n\t}\n\n\tif ( options.blockGap && hasBlockGapSupport ) {\n\t\t// Use fallback of `0.5em` just in case, however if there is blockGap support, there should nearly always be a real value.\n\t\tconst gapValue =\n\t\t\tgetGapCSSValue( tree?.styles?.spacing?.blockGap ) || '0.5em';\n\t\truleset =\n\t\t\truleset +\n\t\t\t`:root :where(.wp-site-blocks) > * { margin-block-start: ${ gapValue }; margin-block-end: 0; }`;\n\t\truleset =\n\t\t\truleset +\n\t\t\t':root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }';\n\t\truleset =\n\t\t\truleset +\n\t\t\t':root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }';\n\t}\n\n\tif ( options.presets ) {\n\t\tnodesWithSettings.forEach( ( { selector, presets } ) => {\n\t\t\tif (\n\t\t\t\tROOT_BLOCK_SELECTOR === selector ||\n\t\t\t\tROOT_CSS_PROPERTIES_SELECTOR === selector\n\t\t\t) {\n\t\t\t\t// Do not add extra specificity for top-level classes.\n\t\t\t\tselector = '';\n\t\t\t}\n\n\t\t\tconst classes = getPresetsClasses( selector, presets );\n\t\t\tif ( classes.length > 0 ) {\n\t\t\t\truleset += classes;\n\t\t\t}\n\t\t} );\n\t}\n\n\treturn ruleset;\n};\n\nexport function generateSvgFilters(\n\ttree: GlobalStylesConfig,\n\tblockSelectors: BlockSelectors\n): string[] {\n\tconst nodesWithSettings = getNodesWithSettings( tree, blockSelectors );\n\treturn nodesWithSettings.flatMap( ( { presets } ) => {\n\t\treturn getPresetsSvgFilters( presets );\n\t} );\n}\n\nconst getSelectorsConfig = ( blockType: BlockType, rootSelector: string ) => {\n\tif (\n\t\tblockType?.selectors &&\n\t\tObject.keys( blockType.selectors ).length > 0\n\t) {\n\t\treturn blockType.selectors;\n\t}\n\n\tconst config: Record< string, string > = {\n\t\troot: rootSelector,\n\t};\n\tObject.entries( BLOCK_SUPPORT_FEATURE_LEVEL_SELECTORS ).forEach(\n\t\t( [ featureKey, featureName ] ) => {\n\t\t\tconst featureSelector = getBlockSelector( blockType, featureKey );\n\n\t\t\tif ( featureSelector ) {\n\t\t\t\tconfig[ featureName ] = featureSelector;\n\t\t\t}\n\t\t}\n\t);\n\n\treturn config;\n};\n\nexport const getBlockSelectors = (\n\tblockTypes: BlockType[],\n\tvariationInstanceId?: string\n) => {\n\tconst { getBlockStyles } = select( blocksStore );\n\tconst result: BlockSelectors = {};\n\tblockTypes.forEach( ( blockType ) => {\n\t\tconst name = blockType.name;\n\t\tconst selector = getBlockSelector( blockType );\n\n\t\tif ( ! selector ) {\n\t\t\treturn; // Skip blocks without valid selectors\n\t\t}\n\t\tlet duotoneSelector = getBlockSelector( blockType, 'filter.duotone' );\n\t\t// Keep backwards compatibility for support.color.__experimentalDuotone.\n\t\tif ( ! duotoneSelector ) {\n\t\t\tconst rootSelector = getBlockSelector( blockType );\n\t\t\tconst duotoneSupport = getBlockSupport(\n\t\t\t\tblockType,\n\t\t\t\t'color.__experimentalDuotone',\n\t\t\t\tfalse\n\t\t\t);\n\t\t\tduotoneSelector =\n\t\t\t\tduotoneSupport &&\n\t\t\t\trootSelector &&\n\t\t\t\tscopeSelector( rootSelector, duotoneSupport );\n\t\t}\n\n\t\tconst hasLayoutSupport =\n\t\t\t!! blockType?.supports?.layout ||\n\t\t\t!! blockType?.supports?.__experimentalLayout;\n\t\tconst fallbackGapValue =\n\t\t\t// @ts-expect-error\n\t\t\tblockType?.supports?.spacing?.blockGap?.__experimentalDefault;\n\n\t\tconst blockStyleVariations = getBlockStyles( name );\n\t\tconst styleVariationSelectors: Record< string, string > = {};\n\t\tblockStyleVariations?.forEach( ( variation: BlockStyleVariation ) => {\n\t\t\tconst variationSuffix = variationInstanceId\n\t\t\t\t? `-${ variationInstanceId }`\n\t\t\t\t: '';\n\t\t\tconst variationName = `${ variation.name }${ variationSuffix }`;\n\t\t\tconst styleVariationSelector = getBlockStyleVariationSelector(\n\t\t\t\tvariationName,\n\t\t\t\tselector\n\t\t\t);\n\n\t\t\tstyleVariationSelectors[ variationName ] = styleVariationSelector;\n\t\t} );\n\n\t\t// For each block support feature add any custom selectors.\n\t\tconst featureSelectors = getSelectorsConfig( blockType, selector );\n\n\t\tresult[ name ] = {\n\t\t\tduotoneSelector: duotoneSelector ?? undefined,\n\t\t\tfallbackGapValue,\n\t\t\tfeatureSelectors: Object.keys( featureSelectors ).length\n\t\t\t\t? featureSelectors\n\t\t\t\t: undefined,\n\t\t\thasLayoutSupport,\n\t\t\tname,\n\t\t\tselector,\n\t\t\tstyleVariationSelectors: blockStyleVariations?.length\n\t\t\t\t? styleVariationSelectors\n\t\t\t\t: undefined,\n\t\t};\n\t} );\n\n\treturn result;\n};\n\n/**\n * If there is a separator block whose color is defined in theme.json via background,\n * update the separator color to the same value by using border color.\n *\n * @param config Theme.json configuration file object\n * @return Theme.json configuration file object updated\n */\nfunction updateConfigWithSeparator(\n\tconfig: GlobalStylesConfig\n): GlobalStylesConfig {\n\tconst blocks = config.styles?.blocks;\n\tconst separatorBlock = blocks?.[ 'core/separator' ];\n\tconst needsSeparatorStyleUpdate =\n\t\tseparatorBlock &&\n\t\tseparatorBlock.color?.background &&\n\t\t! separatorBlock.color?.text &&\n\t\t! separatorBlock.border?.color;\n\tif ( needsSeparatorStyleUpdate ) {\n\t\treturn {\n\t\t\t...config,\n\t\t\tstyles: {\n\t\t\t\t...config.styles,\n\t\t\t\tblocks: {\n\t\t\t\t\t...blocks,\n\t\t\t\t\t'core/separator': {\n\t\t\t\t\t\t...separatorBlock,\n\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\t...separatorBlock.color,\n\t\t\t\t\t\t\ttext: separatorBlock.color?.background,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}\n\treturn config;\n}\n\nexport function processCSSNesting( css: string, blockSelector: string ) {\n\tlet processedCSS = '';\n\n\tif ( ! css || css.trim() === '' ) {\n\t\treturn processedCSS;\n\t}\n\n\t// Split CSS nested rules.\n\tconst parts = css.split( '&' );\n\tparts.forEach( ( part: string ) => {\n\t\tif ( ! part || part.trim() === '' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst isRootCss = ! part.includes( '{' );\n\t\tif ( isRootCss ) {\n\t\t\t// If the part doesn't contain braces, it applies to the root level.\n\t\t\tprocessedCSS += `:root :where(${ blockSelector }){${ part.trim() }}`;\n\t\t} else {\n\t\t\t// If the part contains braces, it's a nested CSS rule.\n\t\t\tconst splitPart = part.replace( '}', '' ).split( '{' );\n\t\t\tif ( splitPart.length !== 2 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst [ nestedSelector, cssValue ] = splitPart;\n\n\t\t\t// Handle pseudo elements such as ::before, ::after, etc. Regex will also\n\t\t\t// capture any leading combinator such as >, +, or ~, as well as spaces.\n\t\t\t// This allows pseudo elements as descendants e.g. `.parent ::before`.\n\t\t\tconst matches = nestedSelector.match( /([>+~\\s]*::[a-zA-Z-]+)/ );\n\t\t\tconst pseudoPart = matches ? matches[ 1 ] : '';\n\t\t\tconst withoutPseudoElement = matches\n\t\t\t\t? nestedSelector.replace( pseudoPart, '' ).trim()\n\t\t\t\t: nestedSelector.trim();\n\n\t\t\tlet combinedSelector;\n\t\t\tif ( withoutPseudoElement === '' ) {\n\t\t\t\t// Only contained a pseudo element to use the block selector to form\n\t\t\t\t// the final `:root :where()` selector.\n\t\t\t\tcombinedSelector = blockSelector;\n\t\t\t} else {\n\t\t\t\t// If the nested selector is a descendant of the block scope it with the\n\t\t\t\t// block selector. Otherwise append it to the block selector.\n\t\t\t\tcombinedSelector = nestedSelector.startsWith( ' ' )\n\t\t\t\t\t? scopeSelector( blockSelector, withoutPseudoElement )\n\t\t\t\t\t: appendToSelector( blockSelector, withoutPseudoElement );\n\t\t\t}\n\n\t\t\t// Build final rule, re-adding any pseudo element outside the `:where()`\n\t\t\t// to maintain valid CSS selector.\n\t\t\tprocessedCSS += `:root :where(${ combinedSelector })${ pseudoPart }{${ cssValue.trim() }}`;\n\t\t}\n\t} );\n\treturn processedCSS;\n}\n\nexport interface GlobalStylesRenderOptions {\n\thasBlockGapSupport?: boolean;\n\thasFallbackGapSupport?: boolean;\n\tdisableLayoutStyles?: boolean;\n\tdisableRootPadding?: boolean;\n\tgetBlockStyles?: ( blockName: string ) => any[];\n\tstyleOptions?: Record< string, boolean >;\n}\n\n/**\n * Returns the global styles output based on the current state of global styles config loaded in the editor context.\n *\n * @param config Global styles configuration\n * @param blockTypes Array of block types from WordPress blocks store\n * @param options Options for rendering global styles\n * @return Array of stylesheets and settings\n */\nexport function generateGlobalStyles(\n\tconfig: GlobalStylesConfig | undefined = {},\n\tblockTypes: any[] = [],\n\toptions: GlobalStylesRenderOptions = {}\n): [ any[], any ] {\n\tconst {\n\t\thasBlockGapSupport: hasBlockGapSupportOption,\n\t\thasFallbackGapSupport: hasFallbackGapSupportOption,\n\t\tdisableLayoutStyles = false,\n\t\tdisableRootPadding = false,\n\t\tstyleOptions = {},\n\t} = options;\n\n\t// Use provided block types or fall back to getBlockTypes()\n\tconst blocks = blockTypes.length > 0 ? blockTypes : getBlockTypes();\n\n\tconst blockGap = getSetting( config, 'spacing.blockGap' );\n\tconst hasBlockGapSupport = hasBlockGapSupportOption ?? blockGap !== null;\n\tconst hasFallbackGapSupport =\n\t\thasFallbackGapSupportOption ?? ! hasBlockGapSupport;\n\n\tif ( ! config?.styles || ! config?.settings ) {\n\t\treturn [ [], {} ];\n\t}\n\tconst updatedConfig = updateConfigWithSeparator( config );\n\tconst blockSelectors = getBlockSelectors( blocks );\n\tconst customProperties = generateCustomProperties(\n\t\tupdatedConfig,\n\t\tblockSelectors\n\t);\n\tconst globalStyles = transformToStyles(\n\t\tupdatedConfig,\n\t\tblockSelectors,\n\t\thasBlockGapSupport,\n\t\thasFallbackGapSupport,\n\t\tdisableLayoutStyles,\n\t\tdisableRootPadding,\n\t\tstyleOptions\n\t);\n\tconst svgs = generateSvgFilters( updatedConfig, blockSelectors );\n\tconst styles = [\n\t\t{\n\t\t\tcss: customProperties,\n\t\t\tisGlobalStyles: true,\n\t\t},\n\t\t{\n\t\t\tcss: globalStyles,\n\t\t\tisGlobalStyles: true,\n\t\t},\n\t\t// Load custom CSS in own stylesheet so that any invalid CSS entered in the input won't break all the global styles in the editor.\n\t\t{\n\t\t\tcss: updatedConfig?.styles?.css ?? '',\n\t\t\tisGlobalStyles: true,\n\t\t},\n\t\t{\n\t\t\tassets: svgs,\n\t\t\t__unstableType: 'svg',\n\t\t\tisGlobalStyles: true,\n\t\t},\n\t];\n\n\t// Loop through the blocks to check if there are custom CSS values.\n\t// If there are, get the block selector and push the selector together with\n\t// the CSS value to the 'stylesheets' array.\n\tblocks.forEach( ( blockType: BlockType ) => {\n\t\tconst blockStyles = updatedConfig?.styles?.blocks?.[ blockType.name ];\n\t\tif ( blockStyles?.css ) {\n\t\t\tconst selector = blockSelectors[ blockType.name ].selector;\n\t\t\tstyles.push( {\n\t\t\t\tcss: processCSSNesting( blockStyles.css, selector ),\n\t\t\t\tisGlobalStyles: true,\n\t\t\t} );\n\t\t}\n\t} );\n\n\treturn [ styles, updatedConfig.settings ];\n}\n", "/**\n * Internal dependencies\n */\nimport type { BlockType } from '../types';\nimport { scopeSelector } from '../utils/common';\nimport { getValueFromObjectPath } from '../utils/object';\n\n/**\n * Determine the CSS selector for the block type and target provided, returning\n * it if available.\n *\n * @param blockType The block's type.\n * @param target The desired selector's target e.g. `root`, delimited string, or array path.\n * @param options Options object.\n * @param options.fallback Whether or not to fallback to broader selector.\n *\n * @return The CSS selector or `null` if no selector available.\n */\nexport function getBlockSelector(\n\tblockType: BlockType,\n\ttarget: string = 'root',\n\toptions: { fallback?: boolean } = {}\n): string | null {\n\tif ( ! target ) {\n\t\treturn null;\n\t}\n\n\tconst { fallback = false } = options;\n\tconst { name, selectors, supports } = blockType;\n\n\tconst hasSelectors = selectors && Object.keys( selectors ).length > 0;\n\tconst path = Array.isArray( target ) ? target.join( '.' ) : target;\n\n\t// Root selector.\n\n\t// Calculated before returning as it can be used as a fallback for feature\n\t// selectors later on.\n\tlet rootSelector: string | null = null;\n\n\tif ( hasSelectors && selectors.root ) {\n\t\t// Use the selectors API if available.\n\t\trootSelector = selectors?.root as string;\n\t} else if ( supports?.__experimentalSelector ) {\n\t\t// Use the old experimental selector supports property if set.\n\t\trootSelector = supports.__experimentalSelector;\n\t} else {\n\t\t// If no root selector found, generate default block class selector.\n\t\trootSelector =\n\t\t\t'.wp-block-' + name.replace( 'core/', '' ).replace( '/', '-' );\n\t}\n\n\t// Return selector if it's the root target we are looking for.\n\tif ( path === 'root' ) {\n\t\treturn rootSelector;\n\t}\n\n\t// If target is not `root` or `duotone` we have a feature or subfeature\n\t// as the target. If the target is a string convert to an array.\n\tconst pathArray = Array.isArray( target ) ? target : target.split( '.' );\n\n\t// Feature selectors ( may fallback to root selector );\n\tif ( pathArray.length === 1 ) {\n\t\tconst fallbackSelector = fallback ? rootSelector : null;\n\n\t\t// Prefer the selectors API if available.\n\t\tif ( hasSelectors ) {\n\t\t\t// Get selector from either `feature.root` or shorthand path.\n\t\t\tconst featureSelector =\n\t\t\t\t( getValueFromObjectPath(\n\t\t\t\t\tselectors,\n\t\t\t\t\t`${ path }.root`,\n\t\t\t\t\tnull\n\t\t\t\t) as string ) ||\n\t\t\t\t( getValueFromObjectPath( selectors, path, null ) as string );\n\n\t\t\t// Return feature selector if found or any available fallback.\n\t\t\treturn featureSelector || fallbackSelector;\n\t\t}\n\n\t\t// Try getting old experimental supports selector value.\n\t\tconst featureSelector = supports\n\t\t\t? ( getValueFromObjectPath(\n\t\t\t\t\tsupports,\n\t\t\t\t\t`${ path }.__experimentalSelector`,\n\t\t\t\t\tnull\n\t\t\t ) as string | undefined )\n\t\t\t: undefined;\n\n\t\t// If nothing to work with, provide fallback selector if available.\n\t\tif ( ! featureSelector ) {\n\t\t\treturn fallbackSelector;\n\t\t}\n\n\t\t// Scope the feature selector by the block's root selector.\n\t\treturn scopeSelector( rootSelector, featureSelector );\n\t}\n\n\t// Subfeature selector.\n\t// This may fallback either to parent feature or root selector.\n\tlet subfeatureSelector;\n\n\t// Use selectors API if available.\n\tif ( hasSelectors ) {\n\t\tsubfeatureSelector = getValueFromObjectPath( selectors, path, null );\n\t}\n\n\t// Only return if we have a subfeature selector.\n\tif ( subfeatureSelector ) {\n\t\treturn subfeatureSelector as string;\n\t}\n\n\t// To this point we don't have a subfeature selector. If a fallback has been\n\t// requested, remove subfeature from target path and return results of a\n\t// call for the parent feature's selector.\n\tif ( fallback ) {\n\t\treturn getBlockSelector( blockType, pathArray[ 0 ], options );\n\t}\n\n\t// We tried.\n\treturn null;\n}\n", "var r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return\"string\"==typeof r?r.length>0:\"number\"==typeof r},n=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*r)/n+0},e=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),r>n?n:r>t?r:t},u=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},a=function(r){return{r:e(r.r,0,255),g:e(r.g,0,255),b:e(r.b,0,255),a:e(r.a)}},o=function(r){return{r:n(r.r),g:n(r.g),b:n(r.b),a:n(r.a,3)}},i=/^#([0-9a-f]{3,8})$/i,s=function(r){var t=r.toString(16);return t.length<2?\"0\"+t:t},h=function(r){var t=r.r,n=r.g,e=r.b,u=r.a,a=Math.max(t,n,e),o=a-Math.min(t,n,e),i=o?a===t?(n-e)/o:a===n?2+(e-t)/o:4+(t-n)/o:0;return{h:60*(i<0?i+6:i),s:a?o/a*100:0,v:a/255*100,a:u}},b=function(r){var t=r.h,n=r.s,e=r.v,u=r.a;t=t/360*6,n/=100,e/=100;var a=Math.floor(t),o=e*(1-n),i=e*(1-(t-a)*n),s=e*(1-(1-t+a)*n),h=a%6;return{r:255*[e,i,o,o,s,e][h],g:255*[s,e,e,i,o,o][h],b:255*[o,o,s,e,e,i][h],a:u}},g=function(r){return{h:u(r.h),s:e(r.s,0,100),l:e(r.l,0,100),a:e(r.a)}},d=function(r){return{h:n(r.h),s:n(r.s),l:n(r.l),a:n(r.a,3)}},f=function(r){return b((n=(t=r).s,{h:t.h,s:(n*=((e=t.l)<50?e:100-e)/100)>0?2*n/(e+n)*100:0,v:e+n,a:t.a}));var t,n,e},c=function(r){return{h:(t=h(r)).h,s:(u=(200-(n=t.s))*(e=t.v)/100)>0&&u<200?n*e/100/(u<=100?u:200-u)*100:0,l:u/2,a:t.a};var t,n,e,u},l=/^hsla?\\(\\s*([+-]?\\d*\\.?\\d+)(deg|rad|grad|turn)?\\s*,\\s*([+-]?\\d*\\.?\\d+)%\\s*,\\s*([+-]?\\d*\\.?\\d+)%\\s*(?:,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,p=/^hsla?\\(\\s*([+-]?\\d*\\.?\\d+)(deg|rad|grad|turn)?\\s+([+-]?\\d*\\.?\\d+)%\\s+([+-]?\\d*\\.?\\d+)%\\s*(?:\\/\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,v=/^rgba?\\(\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*(?:,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,m=/^rgba?\\(\\s*([+-]?\\d*\\.?\\d+)(%)?\\s+([+-]?\\d*\\.?\\d+)(%)?\\s+([+-]?\\d*\\.?\\d+)(%)?\\s*(?:\\/\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,y={string:[[function(r){var t=i.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:4===r.length?n(parseInt(r[3]+r[3],16)/255,2):1}:6===r.length||8===r.length?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:8===r.length?n(parseInt(r.substr(6,2),16)/255,2):1}:null:null},\"hex\"],[function(r){var t=v.exec(r)||m.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:a({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},\"rgb\"],[function(t){var n=l.exec(t)||p.exec(t);if(!n)return null;var e,u,a=g({h:(e=n[1],u=n[2],void 0===u&&(u=\"deg\"),Number(e)*(r[u]||1)),s:Number(n[3]),l:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)});return f(a)},\"hsl\"]],object:[[function(r){var n=r.r,e=r.g,u=r.b,o=r.a,i=void 0===o?1:o;return t(n)&&t(e)&&t(u)?a({r:Number(n),g:Number(e),b:Number(u),a:Number(i)}):null},\"rgb\"],[function(r){var n=r.h,e=r.s,u=r.l,a=r.a,o=void 0===a?1:a;if(!t(n)||!t(e)||!t(u))return null;var i=g({h:Number(n),s:Number(e),l:Number(u),a:Number(o)});return f(i)},\"hsl\"],[function(r){var n=r.h,a=r.s,o=r.v,i=r.a,s=void 0===i?1:i;if(!t(n)||!t(a)||!t(o))return null;var h=function(r){return{h:u(r.h),s:e(r.s,0,100),v:e(r.v,0,100),a:e(r.a)}}({h:Number(n),s:Number(a),v:Number(o),a:Number(s)});return b(h)},\"hsv\"]]},N=function(r,t){for(var n=0;n<t.length;n++){var e=t[n][0](r);if(e)return[e,t[n][1]]}return[null,void 0]},x=function(r){return\"string\"==typeof r?N(r.trim(),y.string):\"object\"==typeof r&&null!==r?N(r,y.object):[null,void 0]},I=function(r){return x(r)[1]},M=function(r,t){var n=c(r);return{h:n.h,s:e(n.s+100*t,0,100),l:n.l,a:n.a}},H=function(r){return(299*r.r+587*r.g+114*r.b)/1e3/255},$=function(r,t){var n=c(r);return{h:n.h,s:n.s,l:e(n.l+100*t,0,100),a:n.a}},j=function(){function r(r){this.parsed=x(r)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return r.prototype.isValid=function(){return null!==this.parsed},r.prototype.brightness=function(){return n(H(this.rgba),2)},r.prototype.isDark=function(){return H(this.rgba)<.5},r.prototype.isLight=function(){return H(this.rgba)>=.5},r.prototype.toHex=function(){return r=o(this.rgba),t=r.r,e=r.g,u=r.b,i=(a=r.a)<1?s(n(255*a)):\"\",\"#\"+s(t)+s(e)+s(u)+i;var r,t,e,u,a,i},r.prototype.toRgb=function(){return o(this.rgba)},r.prototype.toRgbString=function(){return r=o(this.rgba),t=r.r,n=r.g,e=r.b,(u=r.a)<1?\"rgba(\"+t+\", \"+n+\", \"+e+\", \"+u+\")\":\"rgb(\"+t+\", \"+n+\", \"+e+\")\";var r,t,n,e,u},r.prototype.toHsl=function(){return d(c(this.rgba))},r.prototype.toHslString=function(){return r=d(c(this.rgba)),t=r.h,n=r.s,e=r.l,(u=r.a)<1?\"hsla(\"+t+\", \"+n+\"%, \"+e+\"%, \"+u+\")\":\"hsl(\"+t+\", \"+n+\"%, \"+e+\"%)\";var r,t,n,e,u},r.prototype.toHsv=function(){return r=h(this.rgba),{h:n(r.h),s:n(r.s),v:n(r.v),a:n(r.a,3)};var r},r.prototype.invert=function(){return w({r:255-(r=this.rgba).r,g:255-r.g,b:255-r.b,a:r.a});var r},r.prototype.saturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,r))},r.prototype.desaturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,-r))},r.prototype.grayscale=function(){return w(M(this.rgba,-1))},r.prototype.lighten=function(r){return void 0===r&&(r=.1),w($(this.rgba,r))},r.prototype.darken=function(r){return void 0===r&&(r=.1),w($(this.rgba,-r))},r.prototype.rotate=function(r){return void 0===r&&(r=15),this.hue(this.hue()+r)},r.prototype.alpha=function(r){return\"number\"==typeof r?w({r:(t=this.rgba).r,g:t.g,b:t.b,a:r}):n(this.rgba.a,3);var t},r.prototype.hue=function(r){var t=c(this.rgba);return\"number\"==typeof r?w({h:r,s:t.s,l:t.l,a:t.a}):n(t.h)},r.prototype.isEqual=function(r){return this.toHex()===w(r).toHex()},r}(),w=function(r){return r instanceof j?r:new j(r)},S=[],k=function(r){r.forEach(function(r){S.indexOf(r)<0&&(r(j,y),S.push(r))})},E=function(){return new j({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})};export{j as Colord,w as colord,k as extend,I as getFormat,E as random};\n", "/**\n * External dependencies\n */\nimport { colord } from 'colord';\n\n/**\n * Convert a list of colors to an object of R, G, and B values.\n *\n * @param colors Array of RBG color strings.\n *\n * @return R, G, and B values.\n */\nexport function getValuesFromColors( colors: string[] = [] ) {\n\tconst values: { r: number[]; g: number[]; b: number[]; a: number[] } = {\n\t\tr: [],\n\t\tg: [],\n\t\tb: [],\n\t\ta: [],\n\t};\n\n\tcolors.forEach( ( color ) => {\n\t\tconst rgbColor = colord( color ).toRgb();\n\t\tvalues.r.push( rgbColor.r / 255 );\n\t\tvalues.g.push( rgbColor.g / 255 );\n\t\tvalues.b.push( rgbColor.b / 255 );\n\t\tvalues.a.push( rgbColor.a );\n\t} );\n\n\treturn values;\n}\n\n/**\n * Stylesheet for disabling a global styles duotone filter.\n *\n * @param selector Selector to disable the filter for.\n *\n * @return Filter none style.\n */\nexport function getDuotoneUnsetStylesheet( selector: string ) {\n\treturn `${ selector }{filter:none}`;\n}\n\n/**\n * SVG and stylesheet needed for rendering the duotone filter.\n *\n * @param {string} selector Selector to apply the filter to.\n * @param {string} id Unique id for this duotone filter.\n *\n * @return {string} Duotone filter style.\n */\nexport function getDuotoneStylesheet( selector: string, id: string ) {\n\treturn `${ selector }{filter:url(#${ id })}`;\n}\n\n/**\n * The SVG part of the duotone filter.\n *\n * @param id Unique id for this duotone filter.\n * @param colors Color strings from dark to light.\n *\n * @return Duotone SVG.\n */\nexport function getDuotoneFilter( id: string, colors: string[] ) {\n\tconst values = getValuesFromColors( colors );\n\treturn `\n<svg\n\txmlns:xlink=\"http://www.w3.org/1999/xlink\"\n\tviewBox=\"0 0 0 0\"\n\twidth=\"0\"\n\theight=\"0\"\n\tfocusable=\"false\"\n\trole=\"none\"\n\taria-hidden=\"true\"\n\tstyle=\"visibility: hidden; position: absolute; left: -9999px; overflow: hidden;\"\n>\n\t<defs>\n\t\t<filter id=\"${ id }\">\n\t\t\t<!--\n\t\t\t\tUse sRGB instead of linearRGB so transparency looks correct.\n\t\t\t\tUse perceptual brightness to convert to grayscale.\n\t\t\t-->\n\t\t\t<feColorMatrix color-interpolation-filters=\"sRGB\" type=\"matrix\" values=\" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 \"></feColorMatrix>\n\t\t\t<!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. -->\n\t\t\t<feComponentTransfer color-interpolation-filters=\"sRGB\">\n\t\t\t\t<feFuncR type=\"table\" tableValues=\"${ values.r.join( ' ' ) }\"></feFuncR>\n\t\t\t\t<feFuncG type=\"table\" tableValues=\"${ values.g.join( ' ' ) }\"></feFuncG>\n\t\t\t\t<feFuncB type=\"table\" tableValues=\"${ values.b.join( ' ' ) }\"></feFuncB>\n\t\t\t\t<feFuncA type=\"table\" tableValues=\"${ values.a.join( ' ' ) }\"></feFuncA>\n\t\t\t</feComponentTransfer>\n\t\t\t<!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. -->\n\t\t\t<feComposite in2=\"SourceGraphic\" operator=\"in\"></feComposite>\n\t\t</filter>\n\t</defs>\n</svg>`;\n}\n", "/**\n * Converts a string to kebab-case.\n * Matches WordPress kebabCase behavior.\n *\n * @param str The string to convert\n * @return The kebab-cased string\n */\nexport function kebabCase( str: string ): string {\n\treturn str\n\t\t.replace( /([a-z])([A-Z])/g, '$1-$2' ) // camelCase to kebab-case\n\t\t.replace( /([0-9])([a-zA-Z])/g, '$1-$2' ) // number followed by letter\n\t\t.replace( /([a-zA-Z])([0-9])/g, '$1-$2' ) // letter followed by number\n\t\t.replace( /[\\s_]+/g, '-' ) // spaces and underscores to hyphens\n\t\t.toLowerCase();\n}\n", "export function getSpacingPresetCssVar( value?: string ) {\n\tif ( ! value ) {\n\t\treturn;\n\t}\n\n\tconst slug = value.match( /var:preset\\|spacing\\|(.+)/ );\n\n\tif ( ! slug ) {\n\t\treturn value;\n\t}\n\n\treturn `var(--wp--preset--spacing--${ slug[ 1 ] })`;\n}\n", "/**\n * Internal dependencies\n */\nimport { getSpacingPresetCssVar } from './spacing';\n\n/**\n * Returns a BoxControl object value from a given blockGap style value.\n * The string check is for backwards compatibility before Gutenberg supported\n * split gap values (row and column) and the value was a string n + unit.\n *\n * @param blockGapValue A block gap string or axial object value, e.g., '10px' or { top: '10px', left: '10px'}.\n * @return A value to pass to the BoxControl component.\n */\nexport function getGapBoxControlValueFromStyle(\n\tblockGapValue?: string | { top: string; left: string }\n) {\n\tif ( ! blockGapValue ) {\n\t\treturn null;\n\t}\n\n\tconst isValueString = typeof blockGapValue === 'string';\n\treturn {\n\t\ttop: isValueString ? blockGapValue : blockGapValue?.top,\n\t\tleft: isValueString ? blockGapValue : blockGapValue?.left,\n\t};\n}\n\n/**\n * Returns a CSS value for the `gap` property from a given blockGap style.\n *\n * @param blockGapValue A block gap string or axial object value, e.g., '10px' or { top: '10px', left: '10px'}.\n * @param defaultValue A default gap value.\n * @return The concatenated gap value (row and column).\n */\nexport function getGapCSSValue(\n\tblockGapValue?:\n\t\t| string\n\t\t| {\n\t\t\t\ttop: string;\n\t\t\t\tleft: string;\n\t\t },\n\tdefaultValue: string = '0'\n) {\n\tconst blockGapBoxControlValue =\n\t\tgetGapBoxControlValueFromStyle( blockGapValue );\n\tif ( ! blockGapBoxControlValue ) {\n\t\treturn null;\n\t}\n\n\tconst row =\n\t\tgetSpacingPresetCssVar( blockGapBoxControlValue?.top ) || defaultValue;\n\tconst column =\n\t\tgetSpacingPresetCssVar( blockGapBoxControlValue?.left ) || defaultValue;\n\n\treturn row === column ? row : `${ row } ${ column }`;\n}\n", "/**\n * Internal dependencies\n */\nimport type { BackgroundStyle } from '../types';\n\nexport const BACKGROUND_BLOCK_DEFAULT_VALUES = {\n\tbackgroundSize: 'cover',\n\tbackgroundPosition: '50% 50%', // used only when backgroundSize is 'contain'.\n};\n\nexport function setBackgroundStyleDefaults( backgroundStyle: BackgroundStyle ) {\n\tif (\n\t\t! backgroundStyle ||\n\t\t// @ts-expect-error\n\t\t! backgroundStyle?.backgroundImage?.url\n\t) {\n\t\treturn;\n\t}\n\n\tlet backgroundStylesWithDefaults;\n\n\t// Set block background defaults.\n\tif ( ! backgroundStyle?.backgroundSize ) {\n\t\tbackgroundStylesWithDefaults = {\n\t\t\tbackgroundSize: BACKGROUND_BLOCK_DEFAULT_VALUES.backgroundSize,\n\t\t};\n\t}\n\n\tif (\n\t\t'contain' === backgroundStyle?.backgroundSize &&\n\t\t! backgroundStyle?.backgroundPosition\n\t) {\n\t\tbackgroundStylesWithDefaults = {\n\t\t\tbackgroundPosition:\n\t\t\t\tBACKGROUND_BLOCK_DEFAULT_VALUES.backgroundPosition,\n\t\t};\n\t}\n\treturn backgroundStylesWithDefaults;\n}\n", "// Layout definitions keyed by layout type.\n// Provides a common definition of slugs, classnames, base styles, and spacing styles for each layout type.\n// If making changes or additions to layout definitions, be sure to update the corresponding PHP definitions in\n// `block-supports/layout.php` so that the server-side and client-side definitions match.\nexport const LAYOUT_DEFINITIONS = {\n\tdefault: {\n\t\tname: 'default',\n\t\tslug: 'flow',\n\t\tclassName: 'is-layout-flow',\n\t\tbaseStyles: [\n\t\t\t{\n\t\t\t\tselector: ' > .alignleft',\n\t\t\t\trules: {\n\t\t\t\t\tfloat: 'left',\n\t\t\t\t\t'margin-inline-start': '0',\n\t\t\t\t\t'margin-inline-end': '2em',\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tselector: ' > .alignright',\n\t\t\t\trules: {\n\t\t\t\t\tfloat: 'right',\n\t\t\t\t\t'margin-inline-start': '2em',\n\t\t\t\t\t'margin-inline-end': '0',\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tselector: ' > .aligncenter',\n\t\t\t\trules: {\n\t\t\t\t\t'margin-left': 'auto !important',\n\t\t\t\t\t'margin-right': 'auto !important',\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t\tspacingStyles: [\n\t\t\t{\n\t\t\t\tselector: ' > :first-child',\n\t\t\t\trules: {\n\t\t\t\t\t'margin-block-start': '0',\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tselector: ' > :last-child',\n\t\t\t\trules: {\n\t\t\t\t\t'margin-block-end': '0',\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tselector: ' > *',\n\t\t\t\trules: {\n\t\t\t\t\t'margin-block-start': null,\n\t\t\t\t\t'margin-block-end': '0',\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\tconstrained: {\n\t\tname: 'constrained',\n\t\tslug: 'constrained',\n\t\tclassName: 'is-layout-constrained',\n\t\tbaseStyles: [\n\t\t\t{\n\t\t\t\tselector: ' > .alignleft',\n\t\t\t\trules: {\n\t\t\t\t\tfloat: 'left',\n\t\t\t\t\t'margin-inline-start': '0',\n\t\t\t\t\t'margin-inline-end': '2em',\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tselector: ' > .alignright',\n\t\t\t\trules: {\n\t\t\t\t\tfloat: 'right',\n\t\t\t\t\t'margin-inline-start': '2em',\n\t\t\t\t\t'margin-inline-end': '0',\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tselector: ' > .aligncenter',\n\t\t\t\trules: {\n\t\t\t\t\t'margin-left': 'auto !important',\n\t\t\t\t\t'margin-right': 'auto !important',\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tselector:\n\t\t\t\t\t' > :where(:not(.alignleft):not(.alignright):not(.alignfull))',\n\t\t\t\trules: {\n\t\t\t\t\t'max-width': 'var(--wp--style--global--content-size)',\n\t\t\t\t\t'margin-left': 'auto !important',\n\t\t\t\t\t'margin-right': 'auto !important',\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tselector: ' > .alignwide',\n\t\t\t\trules: {\n\t\t\t\t\t'max-width': 'var(--wp--style--global--wide-size)',\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t\tspacingStyles: [\n\t\t\t{\n\t\t\t\tselector: ' > :first-child',\n\t\t\t\trules: {\n\t\t\t\t\t'margin-block-start': '0',\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tselector: ' > :last-child',\n\t\t\t\trules: {\n\t\t\t\t\t'margin-block-end': '0',\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tselector: ' > *',\n\t\t\t\trules: {\n\t\t\t\t\t'margin-block-start': null,\n\t\t\t\t\t'margin-block-end': '0',\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\tflex: {\n\t\tname: 'flex',\n\t\tslug: 'flex',\n\t\tclassName: 'is-layout-flex',\n\t\tdisplayMode: 'flex',\n\t\tbaseStyles: [\n\t\t\t{\n\t\t\t\tselector: '',\n\t\t\t\trules: {\n\t\t\t\t\t'flex-wrap': 'wrap',\n\t\t\t\t\t'align-items': 'center',\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tselector: ' > :is(*, div)', // :is(*, div) instead of just * increases the specificity by 001.\n\t\t\t\trules: {\n\t\t\t\t\tmargin: '0',\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t\tspacingStyles: [\n\t\t\t{\n\t\t\t\tselector: '',\n\t\t\t\trules: {\n\t\t\t\t\tgap: null,\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\tgrid: {\n\t\tname: 'grid',\n\t\tslug: 'grid',\n\t\tclassName: 'is-layout-grid',\n\t\tdisplayMode: 'grid',\n\t\tbaseStyles: [\n\t\t\t{\n\t\t\t\tselector: ' > :is(*, div)', // :is(*, div) instead of just * increases the specificity by 001.\n\t\t\t\trules: {\n\t\t\t\t\tmargin: '0',\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t\tspacingStyles: [\n\t\t\t{\n\t\t\t\tselector: '',\n\t\t\t\trules: {\n\t\t\t\t\tgap: null,\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n};\n", "/**\n * WordPress dependencies\n */\nimport { useSelect, useRegistry } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport usePostContentBlocks from './use-post-content-blocks';\n\n/**\n * Component that when rendered, makes it so that the site editor allows only\n * page content to be edited.\n */\nexport default function DisableNonPageContentBlocks() {\n\tconst contentOnlyIds = usePostContentBlocks();\n\tconst { templateParts } = useSelect( ( select ) => {\n\t\tconst { getBlocksByName } = select( blockEditorStore );\n\t\treturn {\n\t\t\ttemplateParts: getBlocksByName( 'core/template-part' ),\n\t\t};\n\t}, [] );\n\tconst disabledIds = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockOrder } = select( blockEditorStore );\n\t\t\treturn templateParts.flatMap( ( clientId ) =>\n\t\t\t\tgetBlockOrder( clientId )\n\t\t\t);\n\t\t},\n\t\t[ templateParts ]\n\t);\n\n\tconst registry = useRegistry();\n\n\t// The code here is split into multiple `useEffects` calls.\n\t// This is done to avoid setting/unsetting block editing modes multiple times unnecessarily.\n\t//\n\t// For example, the block editing mode of the root block (clientId: '') only\n\t// needs to be set once, not when `contentOnlyIds` or `disabledIds` change.\n\t//\n\t// It's also unlikely that these different types of blocks are being inserted\n\t// or removed at the same time, so using different effects reflects that.\n\tuseEffect( () => {\n\t\tconst { setBlockEditingMode, unsetBlockEditingMode } =\n\t\t\tregistry.dispatch( blockEditorStore );\n\n\t\tsetBlockEditingMode( '', 'disabled' );\n\n\t\treturn () => {\n\t\t\tunsetBlockEditingMode( '' );\n\t\t};\n\t}, [ registry ] );\n\n\tuseEffect( () => {\n\t\tconst { setBlockEditingMode, unsetBlockEditingMode } =\n\t\t\tregistry.dispatch( blockEditorStore );\n\n\t\tregistry.batch( () => {\n\t\t\tfor ( const clientId of contentOnlyIds ) {\n\t\t\t\tsetBlockEditingMode( clientId, 'contentOnly' );\n\t\t\t}\n\t\t} );\n\n\t\treturn () => {\n\t\t\tregistry.batch( () => {\n\t\t\t\tfor ( const clientId of contentOnlyIds ) {\n\t\t\t\t\tunsetBlockEditingMode( clientId );\n\t\t\t\t}\n\t\t\t} );\n\t\t};\n\t}, [ contentOnlyIds, registry ] );\n\n\tuseEffect( () => {\n\t\tconst { setBlockEditingMode, unsetBlockEditingMode } =\n\t\t\tregistry.dispatch( blockEditorStore );\n\n\t\tregistry.batch( () => {\n\t\t\tfor ( const clientId of templateParts ) {\n\t\t\t\tsetBlockEditingMode( clientId, 'contentOnly' );\n\t\t\t}\n\t\t} );\n\n\t\treturn () => {\n\t\t\tregistry.batch( () => {\n\t\t\t\tfor ( const clientId of templateParts ) {\n\t\t\t\t\tunsetBlockEditingMode( clientId );\n\t\t\t\t}\n\t\t\t} );\n\t\t};\n\t}, [ templateParts, registry ] );\n\n\tuseEffect( () => {\n\t\tconst { setBlockEditingMode, unsetBlockEditingMode } =\n\t\t\tregistry.dispatch( blockEditorStore );\n\n\t\tregistry.batch( () => {\n\t\t\tfor ( const clientId of disabledIds ) {\n\t\t\t\tsetBlockEditingMode( clientId, 'disabled' );\n\t\t\t}\n\t\t} );\n\n\t\treturn () => {\n\t\t\tregistry.batch( () => {\n\t\t\t\tfor ( const clientId of disabledIds ) {\n\t\t\t\t\tunsetBlockEditingMode( clientId );\n\t\t\t\t}\n\t\t\t} );\n\t\t};\n\t}, [ disabledIds, registry ] );\n\n\treturn null;\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { applyFilters } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst POST_CONTENT_BLOCK_TYPES = [\n\t'core/post-title',\n\t'core/post-featured-image',\n\t'core/post-content',\n];\n\nexport default function usePostContentBlocks() {\n\tconst contentOnlyBlockTypes = useMemo(\n\t\t() => [\n\t\t\t...applyFilters(\n\t\t\t\t'editor.postContentBlockTypes',\n\t\t\t\tPOST_CONTENT_BLOCK_TYPES\n\t\t\t),\n\t\t],\n\t\t[]\n\t);\n\n\t// Note that there are two separate subscriptions because the result for each\n\t// returns a new array.\n\tconst contentOnlyIds = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getPostBlocksByName } = unlock( select( editorStore ) );\n\t\t\treturn getPostBlocksByName( contentOnlyBlockTypes );\n\t\t},\n\t\t[ contentOnlyBlockTypes ]\n\t);\n\n\treturn contentOnlyIds;\n}\n", "/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * For the Navigation block editor, we need to force the block editor to contentOnly for that block.\n *\n * Set block editing mode to contentOnly when entering Navigation focus mode.\n * this ensures that non-content controls on the block will be hidden and thus\n * the user can focus on editing the Navigation Menu content only.\n */\n\nexport default function NavigationBlockEditingMode() {\n\t// In the navigation block editor,\n\t// the navigation block is the only root block.\n\tconst blockClientId = useSelect(\n\t\t( select ) => select( blockEditorStore ).getBlockOrder()?.[ 0 ],\n\t\t[]\n\t);\n\tconst { setBlockEditingMode, unsetBlockEditingMode } =\n\t\tuseDispatch( blockEditorStore );\n\n\tuseEffect( () => {\n\t\tif ( ! blockClientId ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetBlockEditingMode( blockClientId, 'contentOnly' );\n\n\t\treturn () => {\n\t\t\tunsetBlockEditingMode( blockClientId );\n\t\t};\n\t}, [ blockClientId, unsetBlockEditingMode, setBlockEditingMode ] );\n}\n", "/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { addFilter, removeFilter } from '@wordpress/hooks';\n\n// These post types are \"structural\" block lists.\n// We should be allowed to use\n// the post content and template parts blocks within them.\nconst POST_TYPES_ALLOWING_POST_CONTENT_TEMPLATE_PART = [\n\t'wp_block',\n\t'wp_template',\n\t'wp_template_part',\n];\n\n/**\n * In some specific contexts,\n * the template part and post content blocks need to be hidden.\n *\n * @param {string} postType Post Type\n * @param {string} mode Rendering mode\n */\nexport function useHideBlocksFromInserter( postType, mode ) {\n\tuseEffect( () => {\n\t\t/*\n\t\t * Prevent adding template part in the editor.\n\t\t */\n\t\taddFilter(\n\t\t\t'blockEditor.__unstableCanInsertBlockType',\n\t\t\t'removeTemplatePartsFromInserter',\n\t\t\t( canInsert, blockType ) => {\n\t\t\t\tif (\n\t\t\t\t\t! POST_TYPES_ALLOWING_POST_CONTENT_TEMPLATE_PART.includes(\n\t\t\t\t\t\tpostType\n\t\t\t\t\t) &&\n\t\t\t\t\tblockType.name === 'core/template-part' &&\n\t\t\t\t\tmode === 'post-only'\n\t\t\t\t) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn canInsert;\n\t\t\t}\n\t\t);\n\n\t\t/*\n\t\t * Prevent adding post content block (except in query block) in the editor.\n\t\t */\n\t\taddFilter(\n\t\t\t'blockEditor.__unstableCanInsertBlockType',\n\t\t\t'removePostContentFromInserter',\n\t\t\t(\n\t\t\t\tcanInsert,\n\t\t\t\tblockType,\n\t\t\t\trootClientId,\n\t\t\t\t{ getBlockParentsByBlockName }\n\t\t\t) => {\n\t\t\t\tif (\n\t\t\t\t\t! POST_TYPES_ALLOWING_POST_CONTENT_TEMPLATE_PART.includes(\n\t\t\t\t\t\tpostType\n\t\t\t\t\t) &&\n\t\t\t\t\tblockType.name === 'core/post-content'\n\t\t\t\t) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tgetBlockParentsByBlockName( rootClientId, 'core/query' )\n\t\t\t\t\t\t\t.length > 0\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn canInsert;\n\t\t\t}\n\t\t);\n\n\t\treturn () => {\n\t\t\tremoveFilter(\n\t\t\t\t'blockEditor.__unstableCanInsertBlockType',\n\t\t\t\t'removeTemplatePartsFromInserter'\n\t\t\t);\n\t\t\tremoveFilter(\n\t\t\t\t'blockEditor.__unstableCanInsertBlockType',\n\t\t\t\t'removePostContentFromInserter'\n\t\t\t);\n\t\t};\n\t}, [ postType, mode ] );\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, isRTL, sprintf } from '@wordpress/i18n';\nimport {\n\tblockDefault,\n\tcode,\n\tdrawerLeft,\n\tdrawerRight,\n\tpencil,\n\tformatListBullets,\n\tlistView,\n\texternal,\n\tkeyboard,\n\tsymbol,\n\tpage,\n\tlayout,\n\trotateRight,\n\trotateLeft,\n} from '@wordpress/icons';\nimport { useCommandLoader } from '@wordpress/commands';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore, useEntityRecord } from '@wordpress/core-data';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\nimport {\n\tPATTERN_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tTEMPLATE_POST_TYPE,\n} from '../../store/constants';\nimport { modalName as patternRenameModalName } from '../pattern-rename-modal';\nimport { modalName as patternDuplicateModalName } from '../pattern-duplicate-modal';\nimport isTemplateRevertable from '../../store/utils/is-template-revertable';\n\nconst getEditorCommandLoader = () =>\n\tfunction useEditorCommandLoader() {\n\t\tconst {\n\t\t\teditorMode,\n\t\t\tisListViewOpen,\n\t\t\tshowBlockBreadcrumbs,\n\t\t\tisDistractionFree,\n\t\t\tisFocusMode,\n\t\t\tisPreviewMode,\n\t\t\tisViewable,\n\t\t\tisCodeEditingEnabled,\n\t\t\tisRichEditingEnabled,\n\t\t\tisPublishSidebarEnabled,\n\t\t} = useSelect( ( select ) => {\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\tconst { isListViewOpened, getCurrentPostType, getEditorSettings } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst { getSettings } = select( blockEditorStore );\n\t\t\tconst { getPostType } = select( coreStore );\n\n\t\t\treturn {\n\t\t\t\teditorMode: get( 'core', 'editorMode' ) ?? 'visual',\n\t\t\t\tisListViewOpen: isListViewOpened(),\n\t\t\t\tshowBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\n\t\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\t\tisFocusMode: get( 'core', 'focusMode' ),\n\t\t\t\tisPreviewMode: getSettings().isPreviewMode,\n\t\t\t\tisViewable:\n\t\t\t\t\tgetPostType( getCurrentPostType() )?.viewable ?? false,\n\t\t\t\tisCodeEditingEnabled: getEditorSettings().codeEditingEnabled,\n\t\t\t\tisRichEditingEnabled: getEditorSettings().richEditingEnabled,\n\t\t\t\tisPublishSidebarEnabled:\n\t\t\t\t\tselect( editorStore ).isPublishSidebarEnabled(),\n\t\t\t};\n\t\t}, [] );\n\t\tconst { getActiveComplementaryArea } = useSelect( interfaceStore );\n\t\tconst { toggle } = useDispatch( preferencesStore );\n\t\tconst { createInfoNotice } = useDispatch( noticesStore );\n\t\tconst {\n\t\t\t__unstableSaveForPreview,\n\t\t\tsetIsListViewOpened,\n\t\t\tswitchEditorMode,\n\t\t\ttoggleDistractionFree,\n\t\t\ttoggleSpotlightMode,\n\t\t\ttoggleTopToolbar,\n\t\t} = useDispatch( editorStore );\n\t\tconst { openModal, enableComplementaryArea, disableComplementaryArea } =\n\t\t\tuseDispatch( interfaceStore );\n\t\tconst { getCurrentPostId } = useSelect( editorStore );\n\t\tconst allowSwitchEditorMode =\n\t\t\tisCodeEditingEnabled && isRichEditingEnabled;\n\n\t\tif ( isPreviewMode ) {\n\t\t\treturn { commands: [], isLoading: false };\n\t\t}\n\n\t\tconst commands = [];\n\n\t\tcommands.push( {\n\t\t\tname: 'core/open-shortcut-help',\n\t\t\tlabel: __( 'Keyboard shortcuts' ),\n\t\t\ticon: keyboard,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tclose();\n\t\t\t\topenModal( 'editor/keyboard-shortcut-help' );\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-distraction-free',\n\t\t\tlabel: isDistractionFree\n\t\t\t\t? __( 'Exit Distraction free' )\n\t\t\t\t: __( 'Enter Distraction free' ),\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\ttoggleDistractionFree();\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/open-preferences',\n\t\t\tlabel: __( 'Editor preferences' ),\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tclose();\n\t\t\t\topenModal( 'editor/preferences' );\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-spotlight-mode',\n\t\t\tlabel: isFocusMode\n\t\t\t\t? __( 'Exit Spotlight mode' )\n\t\t\t\t: __( 'Enter Spotlight mode' ),\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\ttoggleSpotlightMode();\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-list-view',\n\t\t\tlabel: isListViewOpen\n\t\t\t\t? __( 'Close List View' )\n\t\t\t\t: __( 'Open List View' ),\n\t\t\ticon: listView,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tsetIsListViewOpened( ! isListViewOpen );\n\t\t\t\tclose();\n\t\t\t\tcreateInfoNotice(\n\t\t\t\t\tisListViewOpen\n\t\t\t\t\t\t? __( 'List View off.' )\n\t\t\t\t\t\t: __( 'List View on.' ),\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'core/editor/toggle-list-view/notice',\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-top-toolbar',\n\t\t\tlabel: __( 'Top toolbar' ),\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\ttoggleTopToolbar();\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\n\t\tif ( allowSwitchEditorMode ) {\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/toggle-code-editor',\n\t\t\t\tlabel:\n\t\t\t\t\teditorMode === 'visual'\n\t\t\t\t\t\t? __( 'Open code editor' )\n\t\t\t\t\t\t: __( 'Exit code editor' ),\n\t\t\t\ticon: code,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tswitchEditorMode(\n\t\t\t\t\t\teditorMode === 'visual' ? 'text' : 'visual'\n\t\t\t\t\t);\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-breadcrumbs',\n\t\t\tlabel: showBlockBreadcrumbs\n\t\t\t\t? __( 'Hide block breadcrumbs' )\n\t\t\t\t: __( 'Show block breadcrumbs' ),\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\ttoggle( 'core', 'showBlockBreadcrumbs' );\n\t\t\t\tclose();\n\t\t\t\tcreateInfoNotice(\n\t\t\t\t\tshowBlockBreadcrumbs\n\t\t\t\t\t\t? __( 'Breadcrumbs hidden.' )\n\t\t\t\t\t\t: __( 'Breadcrumbs visible.' ),\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'core/editor/toggle-breadcrumbs/notice',\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/open-settings-sidebar',\n\t\t\tlabel: __( 'Show or hide the Settings panel' ),\n\t\t\ticon: isRTL() ? drawerLeft : drawerRight,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tconst activeSidebar = getActiveComplementaryArea( 'core' );\n\t\t\t\tclose();\n\t\t\t\tif ( activeSidebar === 'edit-post/document' ) {\n\t\t\t\t\tdisableComplementaryArea( 'core' );\n\t\t\t\t} else {\n\t\t\t\t\tenableComplementaryArea( 'core', 'edit-post/document' );\n\t\t\t\t}\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/open-block-inspector',\n\t\t\tlabel: __( 'Show or hide the Block settings panel' ),\n\t\t\ticon: blockDefault,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tconst activeSidebar = getActiveComplementaryArea( 'core' );\n\t\t\t\tclose();\n\t\t\t\tif ( activeSidebar === 'edit-post/block' ) {\n\t\t\t\t\tdisableComplementaryArea( 'core' );\n\t\t\t\t} else {\n\t\t\t\t\tenableComplementaryArea( 'core', 'edit-post/block' );\n\t\t\t\t}\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-publish-sidebar',\n\t\t\tlabel: isPublishSidebarEnabled\n\t\t\t\t? __( 'Disable pre-publish checks' )\n\t\t\t\t: __( 'Enable pre-publish checks' ),\n\t\t\ticon: formatListBullets,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tclose();\n\t\t\t\ttoggle( 'core', 'isPublishSidebarEnabled' );\n\t\t\t\tcreateInfoNotice(\n\t\t\t\t\tisPublishSidebarEnabled\n\t\t\t\t\t\t? __( 'Pre-publish checks disabled.' )\n\t\t\t\t\t\t: __( 'Pre-publish checks enabled.' ),\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'core/editor/publish-sidebar/notice',\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\t\t} );\n\n\t\tif ( isViewable ) {\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/preview-link',\n\t\t\t\tlabel: __( 'Preview in a new tab' ),\n\t\t\t\ticon: external,\n\t\t\t\tcallback: async ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tconst postId = getCurrentPostId();\n\t\t\t\t\tconst link = await __unstableSaveForPreview();\n\t\t\t\t\twindow.open( link, `wp-preview-${ postId }` );\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\treturn {\n\t\t\tcommands,\n\t\t\tisLoading: false,\n\t\t};\n\t};\n\nconst getEditedEntityContextualCommands = () =>\n\tfunction useEditedEntityContextualCommands() {\n\t\tconst { postType } = useSelect( ( select ) => {\n\t\t\tconst { getCurrentPostType } = select( editorStore );\n\t\t\treturn {\n\t\t\t\tpostType: getCurrentPostType(),\n\t\t\t};\n\t\t}, [] );\n\t\tconst { openModal } = useDispatch( interfaceStore );\n\t\tconst commands = [];\n\n\t\tif ( postType === PATTERN_POST_TYPE ) {\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/rename-pattern',\n\t\t\t\tlabel: __( 'Rename pattern' ),\n\t\t\t\ticon: pencil,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\topenModal( patternRenameModalName );\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t} );\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/duplicate-pattern',\n\t\t\t\tlabel: __( 'Duplicate pattern' ),\n\t\t\t\ticon: symbol,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\topenModal( patternDuplicateModalName );\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\treturn { isLoading: false, commands };\n\t};\n\nconst getPageContentFocusCommands = () =>\n\tfunction usePageContentFocusCommands() {\n\t\tconst {\n\t\t\tonNavigateToEntityRecord,\n\t\t\tgoBack,\n\t\t\ttemplateId,\n\t\t\tisPreviewMode,\n\t\t\tcanEditTemplate,\n\t\t} = useSelect( ( select ) => {\n\t\t\tconst {\n\t\t\t\tgetRenderingMode,\n\t\t\t\tgetEditorSettings: _getEditorSettings,\n\t\t\t\tgetCurrentTemplateId,\n\t\t\t} = unlock( select( editorStore ) );\n\t\t\tconst editorSettings = _getEditorSettings();\n\t\t\tconst _templateId = getCurrentTemplateId();\n\t\t\treturn {\n\t\t\t\tisTemplateHidden: getRenderingMode() === 'post-only',\n\t\t\t\tonNavigateToEntityRecord:\n\t\t\t\t\teditorSettings.onNavigateToEntityRecord,\n\t\t\t\tgetEditorSettings: _getEditorSettings,\n\t\t\t\tgoBack: editorSettings.onNavigateToPreviousEntityRecord,\n\t\t\t\ttemplateId: _templateId,\n\t\t\t\tisPreviewMode: editorSettings.isPreviewMode,\n\t\t\t\tcanEditTemplate:\n\t\t\t\t\t!! _templateId &&\n\t\t\t\t\tselect( coreStore ).canUser( 'update', {\n\t\t\t\t\t\tkind: 'postType',\n\t\t\t\t\t\tname: 'wp_template',\n\t\t\t\t\t\tid: _templateId,\n\t\t\t\t\t} ),\n\t\t\t};\n\t\t}, [] );\n\t\tconst { editedRecord: template, hasResolved } = useEntityRecord(\n\t\t\t'postType',\n\t\t\t'wp_template',\n\t\t\ttemplateId\n\t\t);\n\n\t\tif ( isPreviewMode ) {\n\t\t\treturn { isLoading: false, commands: [] };\n\t\t}\n\n\t\tconst commands = [];\n\n\t\tif ( templateId && hasResolved && canEditTemplate ) {\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/switch-to-template-focus',\n\t\t\t\tlabel: sprintf(\n\t\t\t\t\t/* translators: %s: template title */\n\t\t\t\t\t__( 'Edit template: %s' ),\n\t\t\t\t\tdecodeEntities( template.title )\n\t\t\t\t),\n\t\t\t\ticon: layout,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tonNavigateToEntityRecord( {\n\t\t\t\t\t\tpostId: templateId,\n\t\t\t\t\t\tpostType: 'wp_template',\n\t\t\t\t\t} );\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\tif ( !! goBack ) {\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/switch-to-previous-entity',\n\t\t\t\tlabel: __( 'Go back' ),\n\t\t\t\ticon: page,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tgoBack();\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\treturn { isLoading: false, commands };\n\t};\n\nconst getManipulateDocumentCommands = () =>\n\tfunction useManipulateDocumentCommands() {\n\t\tconst { postType, postId } = useSelect( ( select ) => {\n\t\t\tconst { getCurrentPostId, getCurrentPostType } =\n\t\t\t\tselect( editorStore );\n\t\t\treturn {\n\t\t\t\tpostType: getCurrentPostType(),\n\t\t\t\tpostId: getCurrentPostId(),\n\t\t\t};\n\t\t}, [] );\n\t\tconst { editedRecord: template, hasResolved } = useEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t\t// eslint-disable-next-line @wordpress/no-unused-vars-before-return\n\t\tconst { revertTemplate } = unlock( useDispatch( editorStore ) );\n\n\t\tif (\n\t\t\t! hasResolved ||\n\t\t\t! [ TEMPLATE_PART_POST_TYPE, TEMPLATE_POST_TYPE ].includes(\n\t\t\t\tpostType\n\t\t\t)\n\t\t) {\n\t\t\treturn { isLoading: true, commands: [] };\n\t\t}\n\n\t\tconst commands = [];\n\n\t\tif ( isTemplateRevertable( template ) ) {\n\t\t\tconst label =\n\t\t\t\ttemplate.type === TEMPLATE_POST_TYPE\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t/* translators: %s: template title */\n\t\t\t\t\t\t\t__( 'Reset template: %s' ),\n\t\t\t\t\t\t\tdecodeEntities( template.title )\n\t\t\t\t\t )\n\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t/* translators: %s: template part title */\n\t\t\t\t\t\t\t__( 'Reset template part: %s' ),\n\t\t\t\t\t\t\tdecodeEntities( template.title )\n\t\t\t\t\t );\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/reset-template',\n\t\t\t\tlabel,\n\t\t\t\ticon: isRTL() ? rotateRight : rotateLeft,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\trevertTemplate( template );\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\treturn {\n\t\t\tisLoading: ! hasResolved,\n\t\t\tcommands,\n\t\t};\n\t};\n\nexport default function useCommands() {\n\tuseCommandLoader( {\n\t\tname: 'core/editor/edit-ui',\n\t\thook: getEditorCommandLoader(),\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/editor/contextual-commands',\n\t\thook: getEditedEntityContextualCommands(),\n\t\tcontext: 'entity-edit',\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/editor/page-content-focus',\n\t\thook: getPageContentFocusCommands(),\n\t\tcontext: 'entity-edit',\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/manipulate-document',\n\t\thook: getManipulateDocumentCommands(),\n\t} );\n}\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tPanel,\n\tSlot,\n\tFill,\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { check, starEmpty, starFilled } from '@wordpress/icons';\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport { store as viewportStore } from '@wordpress/viewport';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tuseReducedMotion,\n\tuseViewportMatch,\n\tusePrevious,\n} from '@wordpress/compose';\nimport { usePluginContext } from '@wordpress/plugins';\n\n/**\n * Internal dependencies\n */\nimport ComplementaryAreaHeader from '../complementary-area-header';\nimport ComplementaryAreaMoreMenuItem from '../complementary-area-more-menu-item';\nimport ComplementaryAreaToggle from '../complementary-area-toggle';\nimport PinnedItems from '../pinned-items';\nimport { store as interfaceStore } from '../../store';\n\nconst ANIMATION_DURATION = 0.3;\n\nfunction ComplementaryAreaSlot( { scope, ...props } ) {\n\treturn <Slot name={ `ComplementaryArea/${ scope }` } { ...props } />;\n}\n\nconst SIDEBAR_WIDTH = 280;\nconst variants = {\n\topen: { width: SIDEBAR_WIDTH },\n\tclosed: { width: 0 },\n\tmobileOpen: { width: '100vw' },\n};\n\nfunction ComplementaryAreaFill( {\n\tactiveArea,\n\tisActive,\n\tscope,\n\tchildren,\n\tclassName,\n\tid,\n} ) {\n\tconst disableMotion = useReducedMotion();\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\t// This is used to delay the exit animation to the next tick.\n\t// The reason this is done is to allow us to apply the right transition properties\n\t// When we switch from an open sidebar to another open sidebar.\n\t// we don't want to animate in this case.\n\tconst previousActiveArea = usePrevious( activeArea );\n\tconst previousIsActive = usePrevious( isActive );\n\tconst [ , setState ] = useState( {} );\n\tuseEffect( () => {\n\t\tsetState( {} );\n\t}, [ isActive ] );\n\tconst transition = {\n\t\ttype: 'tween',\n\t\tduration:\n\t\t\tdisableMotion ||\n\t\t\tisMobileViewport ||\n\t\t\t( !! previousActiveArea &&\n\t\t\t\t!! activeArea &&\n\t\t\t\tactiveArea !== previousActiveArea )\n\t\t\t\t? 0\n\t\t\t\t: ANIMATION_DURATION,\n\t\tease: [ 0.6, 0, 0.4, 1 ],\n\t};\n\n\treturn (\n\t\t<Fill name={ `ComplementaryArea/${ scope }` }>\n\t\t\t<AnimatePresence initial={ false }>\n\t\t\t\t{ ( previousIsActive || isActive ) && (\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tvariants={ variants }\n\t\t\t\t\t\tinitial=\"closed\"\n\t\t\t\t\t\tanimate={ isMobileViewport ? 'mobileOpen' : 'open' }\n\t\t\t\t\t\texit=\"closed\"\n\t\t\t\t\t\ttransition={ transition }\n\t\t\t\t\t\tclassName=\"interface-complementary-area__fill\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tid={ id }\n\t\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\twidth: isMobileViewport\n\t\t\t\t\t\t\t\t\t? '100vw'\n\t\t\t\t\t\t\t\t\t: SIDEBAR_WIDTH,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</motion.div>\n\t\t\t\t) }\n\t\t\t</AnimatePresence>\n\t\t</Fill>\n\t);\n}\n\nfunction useAdjustComplementaryListener(\n\tscope,\n\tidentifier,\n\tactiveArea,\n\tisActive,\n\tisSmall\n) {\n\tconst previousIsSmallRef = useRef( false );\n\tconst shouldOpenWhenNotSmallRef = useRef( false );\n\tconst { enableComplementaryArea, disableComplementaryArea } =\n\t\tuseDispatch( interfaceStore );\n\tuseEffect( () => {\n\t\t// If the complementary area is active and the editor is switching from\n\t\t// a big to a small window size.\n\t\tif ( isActive && isSmall && ! previousIsSmallRef.current ) {\n\t\t\tdisableComplementaryArea( scope );\n\t\t\t// Flag the complementary area to be reopened when the window size\n\t\t\t// goes from small to big.\n\t\t\tshouldOpenWhenNotSmallRef.current = true;\n\t\t} else if (\n\t\t\t// If there is a flag indicating the complementary area should be\n\t\t\t// enabled when we go from small to big window size and we are going\n\t\t\t// from a small to big window size.\n\t\t\tshouldOpenWhenNotSmallRef.current &&\n\t\t\t! isSmall &&\n\t\t\tpreviousIsSmallRef.current\n\t\t) {\n\t\t\t// Remove the flag indicating the complementary area should be\n\t\t\t// enabled.\n\t\t\tshouldOpenWhenNotSmallRef.current = false;\n\t\t\tenableComplementaryArea( scope, identifier );\n\t\t} else if (\n\t\t\t// If the flag is indicating the current complementary should be\n\t\t\t// reopened but another complementary area becomes active, remove\n\t\t\t// the flag.\n\t\t\tshouldOpenWhenNotSmallRef.current &&\n\t\t\tactiveArea &&\n\t\t\tactiveArea !== identifier\n\t\t) {\n\t\t\tshouldOpenWhenNotSmallRef.current = false;\n\t\t}\n\t\tif ( isSmall !== previousIsSmallRef.current ) {\n\t\t\tpreviousIsSmallRef.current = isSmall;\n\t\t}\n\t}, [\n\t\tisActive,\n\t\tisSmall,\n\t\tscope,\n\t\tidentifier,\n\t\tactiveArea,\n\t\tdisableComplementaryArea,\n\t\tenableComplementaryArea,\n\t] );\n}\n\nfunction ComplementaryArea( {\n\tchildren,\n\tclassName,\n\tcloseLabel = __( 'Close plugin' ),\n\tidentifier: identifierProp,\n\theader,\n\theaderClassName,\n\ticon: iconProp,\n\tisPinnable = true,\n\tpanelClassName,\n\tscope,\n\tname,\n\ttitle,\n\ttoggleShortcut,\n\tisActiveByDefault,\n} ) {\n\tconst context = usePluginContext();\n\tconst icon = iconProp || context.icon;\n\tconst identifier = identifierProp || `${ context.name }/${ name }`;\n\n\t// This state is used to delay the rendering of the Fill\n\t// until the initial effect runs.\n\t// This prevents the animation from running on mount if\n\t// the complementary area is active by default.\n\tconst [ isReady, setIsReady ] = useState( false );\n\tconst {\n\t\tisLoading,\n\t\tisActive,\n\t\tisPinned,\n\t\tactiveArea,\n\t\tisSmall,\n\t\tisLarge,\n\t\tshowIconLabels,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetActiveComplementaryArea,\n\t\t\t\tisComplementaryAreaLoading,\n\t\t\t\tisItemPinned,\n\t\t\t} = select( interfaceStore );\n\t\t\tconst { get } = select( preferencesStore );\n\n\t\t\tconst _activeArea = getActiveComplementaryArea( scope );\n\n\t\t\treturn {\n\t\t\t\tisLoading: isComplementaryAreaLoading( scope ),\n\t\t\t\tisActive: _activeArea === identifier,\n\t\t\t\tisPinned: isItemPinned( scope, identifier ),\n\t\t\t\tactiveArea: _activeArea,\n\t\t\t\tisSmall: select( viewportStore ).isViewportMatch( '< medium' ),\n\t\t\t\tisLarge: select( viewportStore ).isViewportMatch( 'large' ),\n\t\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\t};\n\t\t},\n\t\t[ identifier, scope ]\n\t);\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\n\tuseAdjustComplementaryListener(\n\t\tscope,\n\t\tidentifier,\n\t\tactiveArea,\n\t\tisActive,\n\t\tisSmall\n\t);\n\tconst {\n\t\tenableComplementaryArea,\n\t\tdisableComplementaryArea,\n\t\tpinItem,\n\t\tunpinItem,\n\t} = useDispatch( interfaceStore );\n\n\tuseEffect( () => {\n\t\t// Set initial visibility: For large screens, enable if it's active by\n\t\t// default. For small screens, always initially disable.\n\t\tif ( isActiveByDefault && activeArea === undefined && ! isSmall ) {\n\t\t\tenableComplementaryArea( scope, identifier );\n\t\t} else if ( activeArea === undefined && isSmall ) {\n\t\t\tdisableComplementaryArea( scope, identifier );\n\t\t}\n\t\tsetIsReady( true );\n\t}, [\n\t\tactiveArea,\n\t\tisActiveByDefault,\n\t\tscope,\n\t\tidentifier,\n\t\tisSmall,\n\t\tenableComplementaryArea,\n\t\tdisableComplementaryArea,\n\t] );\n\n\tif ( ! isReady ) {\n\t\treturn;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ isPinnable && (\n\t\t\t\t<PinnedItems scope={ scope }>\n\t\t\t\t\t{ isPinned && (\n\t\t\t\t\t\t<ComplementaryAreaToggle\n\t\t\t\t\t\t\tscope={ scope }\n\t\t\t\t\t\t\tidentifier={ identifier }\n\t\t\t\t\t\t\tisPressed={\n\t\t\t\t\t\t\t\tisActive && ( ! showIconLabels || isLarge )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-expanded={ isActive }\n\t\t\t\t\t\t\taria-disabled={ isLoading }\n\t\t\t\t\t\t\tlabel={ title }\n\t\t\t\t\t\t\ticon={ showIconLabels ? check : icon }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\tshortcut={ toggleShortcut }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</PinnedItems>\n\t\t\t) }\n\t\t\t{ name && isPinnable && (\n\t\t\t\t<ComplementaryAreaMoreMenuItem\n\t\t\t\t\ttarget={ name }\n\t\t\t\t\tscope={ scope }\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\tidentifier={ identifier }\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</ComplementaryAreaMoreMenuItem>\n\t\t\t) }\n\t\t\t<ComplementaryAreaFill\n\t\t\t\tactiveArea={ activeArea }\n\t\t\t\tisActive={ isActive }\n\t\t\t\tclassName={ clsx( 'interface-complementary-area', className ) }\n\t\t\t\tscope={ scope }\n\t\t\t\tid={ identifier.replace( '/', ':' ) }\n\t\t\t>\n\t\t\t\t<ComplementaryAreaHeader\n\t\t\t\t\tclassName={ headerClassName }\n\t\t\t\t\tcloseLabel={ closeLabel }\n\t\t\t\t\tonClose={ () => disableComplementaryArea( scope ) }\n\t\t\t\t\ttoggleButtonProps={ {\n\t\t\t\t\t\tlabel: closeLabel,\n\t\t\t\t\t\tsize: 'compact',\n\t\t\t\t\t\tshortcut: toggleShortcut,\n\t\t\t\t\t\tscope,\n\t\t\t\t\t\tidentifier,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ header || (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h2 className=\"interface-complementary-area-header__title\">\n\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t{ isPinnable && ! isMobileViewport && (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tclassName=\"interface-complementary-area__pin-unpin-item\"\n\t\t\t\t\t\t\t\t\ticon={ isPinned ? starFilled : starEmpty }\n\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\tisPinned\n\t\t\t\t\t\t\t\t\t\t\t? __( 'Unpin from toolbar' )\n\t\t\t\t\t\t\t\t\t\t\t: __( 'Pin to toolbar' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t( isPinned ? unpinItem : pinItem )(\n\t\t\t\t\t\t\t\t\t\t\tscope,\n\t\t\t\t\t\t\t\t\t\t\tidentifier\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tisPressed={ isPinned }\n\t\t\t\t\t\t\t\t\taria-expanded={ isPinned }\n\t\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</ComplementaryAreaHeader>\n\t\t\t\t<Panel className={ panelClassName }>{ children }</Panel>\n\t\t\t</ComplementaryAreaFill>\n\t\t</>\n\t);\n}\n\nComplementaryArea.Slot = ComplementaryAreaSlot;\n\nexport default ComplementaryArea;\n", "/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { usePluginContext } from '@wordpress/plugins';\n\n/**\n * Internal dependencies\n */\nimport { store as interfaceStore } from '../../store';\n\n/**\n * Whether the role supports checked state.\n *\n * @see https://www.w3.org/TR/wai-aria-1.1/#aria-checked\n * @param {import('react').AriaRole} role Role.\n * @return {boolean} Whether the role supports checked state.\n */\nfunction roleSupportsCheckedState( role ) {\n\treturn [\n\t\t'checkbox',\n\t\t'option',\n\t\t'radio',\n\t\t'switch',\n\t\t'menuitemcheckbox',\n\t\t'menuitemradio',\n\t\t'treeitem',\n\t].includes( role );\n}\n\nexport default function ComplementaryAreaToggle( {\n\tas = Button,\n\tscope,\n\tidentifier: identifierProp,\n\ticon: iconProp,\n\tselectedIcon,\n\tname,\n\tshortcut,\n\t...props\n} ) {\n\tconst ComponentToUse = as;\n\tconst context = usePluginContext();\n\tconst icon = iconProp || context.icon;\n\tconst identifier = identifierProp || `${ context.name }/${ name }`;\n\tconst isSelected = useSelect(\n\t\t( select ) =>\n\t\t\tselect( interfaceStore ).getActiveComplementaryArea( scope ) ===\n\t\t\tidentifier,\n\t\t[ identifier, scope ]\n\t);\n\n\tconst { enableComplementaryArea, disableComplementaryArea } =\n\t\tuseDispatch( interfaceStore );\n\n\treturn (\n\t\t<ComponentToUse\n\t\t\ticon={ selectedIcon && isSelected ? selectedIcon : icon }\n\t\t\taria-controls={ identifier.replace( '/', ':' ) }\n\t\t\t// Make sure aria-checked matches spec https://www.w3.org/TR/wai-aria-1.1/#aria-checked\n\t\t\taria-checked={\n\t\t\t\troleSupportsCheckedState( props.role ) ? isSelected : undefined\n\t\t\t}\n\t\t\tonClick={ () => {\n\t\t\t\tif ( isSelected ) {\n\t\t\t\t\tdisableComplementaryArea( scope );\n\t\t\t\t} else {\n\t\t\t\t\tenableComplementaryArea( scope, identifier );\n\t\t\t\t}\n\t\t\t} }\n\t\t\tshortcut={ shortcut }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport * as actions from './actions';\nimport * as selectors from './selectors';\nimport reducer from './reducer';\nimport { STORE_NAME } from './constants';\n\n/**\n * Store definition for the interface namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n *\n * @type {Object}\n */\nexport const store = createReduxStore( STORE_NAME, {\n\treducer,\n\tactions,\n\tselectors,\n} );\nregister( store );\n", "/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport {\n\tnormalizeComplementaryAreaScope,\n\tnormalizeComplementaryAreaName,\n} from './deprecated';\n\n/**\n * Set a default complementary area.\n *\n * @param {string} scope Complementary area scope.\n * @param {string} area Area identifier.\n *\n * @return {Object} Action object.\n */\nexport const setDefaultComplementaryArea = ( scope, area ) => {\n\tscope = normalizeComplementaryAreaScope( scope );\n\tarea = normalizeComplementaryAreaName( scope, area );\n\treturn {\n\t\ttype: 'SET_DEFAULT_COMPLEMENTARY_AREA',\n\t\tscope,\n\t\tarea,\n\t};\n};\n\n/**\n * Enable the complementary area.\n *\n * @param {string} scope Complementary area scope.\n * @param {string} area Area identifier.\n */\nexport const enableComplementaryArea =\n\t( scope, area ) =>\n\t( { registry, dispatch } ) => {\n\t\t// Return early if there's no area.\n\t\tif ( ! area ) {\n\t\t\treturn;\n\t\t}\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\tarea = normalizeComplementaryAreaName( scope, area );\n\n\t\tconst isComplementaryAreaVisible = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( scope, 'isComplementaryAreaVisible' );\n\n\t\tif ( ! isComplementaryAreaVisible ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set( scope, 'isComplementaryAreaVisible', true );\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'ENABLE_COMPLEMENTARY_AREA',\n\t\t\tscope,\n\t\t\tarea,\n\t\t} );\n\t};\n\n/**\n * Disable the complementary area.\n *\n * @param {string} scope Complementary area scope.\n */\nexport const disableComplementaryArea =\n\t( scope ) =>\n\t( { registry } ) => {\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\tconst isComplementaryAreaVisible = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( scope, 'isComplementaryAreaVisible' );\n\n\t\tif ( isComplementaryAreaVisible ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set( scope, 'isComplementaryAreaVisible', false );\n\t\t}\n\t};\n\n/**\n * Pins an item.\n *\n * @param {string} scope Item scope.\n * @param {string} item Item identifier.\n *\n * @return {Object} Action object.\n */\nexport const pinItem =\n\t( scope, item ) =>\n\t( { registry } ) => {\n\t\t// Return early if there's no item.\n\t\tif ( ! item ) {\n\t\t\treturn;\n\t\t}\n\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\titem = normalizeComplementaryAreaName( scope, item );\n\t\tconst pinnedItems = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( scope, 'pinnedItems' );\n\n\t\t// The item is already pinned, there's nothing to do.\n\t\tif ( pinnedItems?.[ item ] === true ) {\n\t\t\treturn;\n\t\t}\n\n\t\tregistry.dispatch( preferencesStore ).set( scope, 'pinnedItems', {\n\t\t\t...pinnedItems,\n\t\t\t[ item ]: true,\n\t\t} );\n\t};\n\n/**\n * Unpins an item.\n *\n * @param {string} scope Item scope.\n * @param {string} item Item identifier.\n */\nexport const unpinItem =\n\t( scope, item ) =>\n\t( { registry } ) => {\n\t\t// Return early if there's no item.\n\t\tif ( ! item ) {\n\t\t\treturn;\n\t\t}\n\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\titem = normalizeComplementaryAreaName( scope, item );\n\t\tconst pinnedItems = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( scope, 'pinnedItems' );\n\n\t\tregistry.dispatch( preferencesStore ).set( scope, 'pinnedItems', {\n\t\t\t...pinnedItems,\n\t\t\t[ item ]: false,\n\t\t} );\n\t};\n\n/**\n * Returns an action object used in signalling that a feature should be toggled.\n *\n * @param {string} scope The feature scope (e.g. core/edit-post).\n * @param {string} featureName The feature name.\n */\nexport function toggleFeature( scope, featureName ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated( `dispatch( 'core/interface' ).toggleFeature`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `dispatch( 'core/preferences' ).toggle`,\n\t\t} );\n\n\t\tregistry.dispatch( preferencesStore ).toggle( scope, featureName );\n\t};\n}\n\n/**\n * Returns an action object used in signalling that a feature should be set to\n * a true or false value\n *\n * @param {string} scope The feature scope (e.g. core/edit-post).\n * @param {string} featureName The feature name.\n * @param {boolean} value The value to set.\n *\n * @return {Object} Action object.\n */\nexport function setFeatureValue( scope, featureName, value ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated( `dispatch( 'core/interface' ).setFeatureValue`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `dispatch( 'core/preferences' ).set`,\n\t\t} );\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( scope, featureName, !! value );\n\t};\n}\n\n/**\n * Returns an action object used in signalling that defaults should be set for features.\n *\n * @param {string} scope The feature scope (e.g. core/edit-post).\n * @param {Object<string, boolean>} defaults A key/value map of feature names to values.\n *\n * @return {Object} Action object.\n */\nexport function setFeatureDefaults( scope, defaults ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated( `dispatch( 'core/interface' ).setFeatureDefaults`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `dispatch( 'core/preferences' ).setDefaults`,\n\t\t} );\n\n\t\tregistry.dispatch( preferencesStore ).setDefaults( scope, defaults );\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user opened a modal.\n *\n * @param {string} name A string that uniquely identifies the modal.\n *\n * @return {Object} Action object.\n */\nexport function openModal( name ) {\n\treturn {\n\t\ttype: 'OPEN_MODAL',\n\t\tname,\n\t};\n}\n\n/**\n * Returns an action object signalling that the user closed a modal.\n *\n * @return {Object} Action object.\n */\nexport function closeModal() {\n\treturn {\n\t\ttype: 'CLOSE_MODAL',\n\t};\n}\n", "/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\n\nexport function normalizeComplementaryAreaScope( scope ) {\n\tif ( [ 'core/edit-post', 'core/edit-site' ].includes( scope ) ) {\n\t\tdeprecated( `${ scope } interface scope`, {\n\t\t\talternative: 'core interface scope',\n\t\t\thint: 'core/edit-post and core/edit-site are merging.',\n\t\t\tversion: '6.6',\n\t\t} );\n\t\treturn 'core';\n\t}\n\n\treturn scope;\n}\n\nexport function normalizeComplementaryAreaName( scope, name ) {\n\tif ( scope === 'core' && name === 'edit-site/template' ) {\n\t\tdeprecated( `edit-site/template sidebar`, {\n\t\t\talternative: 'edit-post/document',\n\t\t\tversion: '6.6',\n\t\t} );\n\t\treturn 'edit-post/document';\n\t}\n\n\tif ( scope === 'core' && name === 'edit-site/block-inspector' ) {\n\t\tdeprecated( `edit-site/block-inspector sidebar`, {\n\t\t\talternative: 'edit-post/block',\n\t\t\tversion: '6.6',\n\t\t} );\n\t\treturn 'edit-post/block';\n\t}\n\n\treturn name;\n}\n", "/**\n * WordPress dependencies\n */\nimport { createRegistrySelector } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport {\n\tnormalizeComplementaryAreaScope,\n\tnormalizeComplementaryAreaName,\n} from './deprecated';\n\n/**\n * Returns the complementary area that is active in a given scope.\n *\n * @param {Object} state Global application state.\n * @param {string} scope Item scope.\n *\n * @return {string | null | undefined} The complementary area that is active in the given scope.\n */\nexport const getActiveComplementaryArea = createRegistrySelector(\n\t( select ) => ( state, scope ) => {\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\tconst isComplementaryAreaVisible = select( preferencesStore ).get(\n\t\t\tscope,\n\t\t\t'isComplementaryAreaVisible'\n\t\t);\n\n\t\t// Return `undefined` to indicate that the user has never toggled\n\t\t// visibility, this is the vanilla default. Other code relies on this\n\t\t// nuance in the return value.\n\t\tif ( isComplementaryAreaVisible === undefined ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Return `null` to indicate the user hid the complementary area.\n\t\tif ( isComplementaryAreaVisible === false ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn state?.complementaryAreas?.[ scope ];\n\t}\n);\n\nexport const isComplementaryAreaLoading = createRegistrySelector(\n\t( select ) => ( state, scope ) => {\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\tconst isVisible = select( preferencesStore ).get(\n\t\t\tscope,\n\t\t\t'isComplementaryAreaVisible'\n\t\t);\n\t\tconst identifier = state?.complementaryAreas?.[ scope ];\n\n\t\treturn isVisible && identifier === undefined;\n\t}\n);\n\n/**\n * Returns a boolean indicating if an item is pinned or not.\n *\n * @param {Object} state Global application state.\n * @param {string} scope Scope.\n * @param {string} item Item to check.\n *\n * @return {boolean} True if the item is pinned and false otherwise.\n */\nexport const isItemPinned = createRegistrySelector(\n\t( select ) => ( state, scope, item ) => {\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\titem = normalizeComplementaryAreaName( scope, item );\n\t\tconst pinnedItems = select( preferencesStore ).get(\n\t\t\tscope,\n\t\t\t'pinnedItems'\n\t\t);\n\t\treturn pinnedItems?.[ item ] ?? true;\n\t}\n);\n\n/**\n * Returns a boolean indicating whether a feature is active for a particular\n * scope.\n *\n * @param {Object} state The store state.\n * @param {string} scope The scope of the feature (e.g. core/edit-post).\n * @param {string} featureName The name of the feature.\n *\n * @return {boolean} Is the feature enabled?\n */\nexport const isFeatureActive = createRegistrySelector(\n\t( select ) => ( state, scope, featureName ) => {\n\t\tdeprecated(\n\t\t\t`select( 'core/interface' ).isFeatureActive( scope, featureName )`,\n\t\t\t{\n\t\t\t\tsince: '6.0',\n\t\t\t\talternative: `select( 'core/preferences' ).get( scope, featureName )`,\n\t\t\t}\n\t\t);\n\n\t\treturn !! select( preferencesStore ).get( scope, featureName );\n\t}\n);\n\n/**\n * Returns true if a modal is active, or false otherwise.\n *\n * @param {Object} state Global application state.\n * @param {string} modalName A string that uniquely identifies the modal.\n *\n * @return {boolean} Whether the modal is active.\n */\nexport function isModalActive( state, modalName ) {\n\treturn state.activeModal === modalName;\n}\n", "/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\nexport function complementaryAreas( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_DEFAULT_COMPLEMENTARY_AREA': {\n\t\t\tconst { scope, area } = action;\n\n\t\t\t// If there's already an area, don't overwrite it.\n\t\t\tif ( state[ scope ] ) {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ scope ]: area,\n\t\t\t};\n\t\t}\n\t\tcase 'ENABLE_COMPLEMENTARY_AREA': {\n\t\t\tconst { scope, area } = action;\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ scope ]: area,\n\t\t\t};\n\t\t}\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer for storing the name of the open modal, or null if no modal is open.\n *\n * @param {Object} state Previous state.\n * @param {Object} action Action object containing the `name` of the modal\n *\n * @return {Object} Updated state\n */\nexport function activeModal( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'OPEN_MODAL':\n\t\t\treturn action.name;\n\t\tcase 'CLOSE_MODAL':\n\t\t\treturn null;\n\t}\n\n\treturn state;\n}\n\nexport default combineReducers( {\n\tcomplementaryAreas,\n\tactiveModal,\n} );\n", "/**\n * The identifier for the data store.\n *\n * @type {string}\n */\nexport const STORE_NAME = 'core/interface';\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport ComplementaryAreaToggle from '../complementary-area-toggle';\n\nconst ComplementaryAreaHeader = ( {\n\tchildren,\n\tclassName,\n\ttoggleButtonProps,\n} ) => {\n\tconst toggleButton = (\n\t\t<ComplementaryAreaToggle icon={ closeSmall } { ...toggleButtonProps } />\n\t);\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx(\n\t\t\t\t'components-panel__header',\n\t\t\t\t'interface-complementary-area-header',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\ttabIndex={ -1 }\n\t\t>\n\t\t\t{ children }\n\t\t\t{ toggleButton }\n\t\t</div>\n\t);\n};\n\nexport default ComplementaryAreaHeader;\n", "/**\n * WordPress dependencies\n */\nimport { check } from '@wordpress/icons';\nimport { MenuItem } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ComplementaryAreaToggle from '../complementary-area-toggle';\nimport ActionItem from '../action-item';\n\nconst PluginsMenuItem = ( {\n\t// Menu item is marked with unstable prop for backward compatibility.\n\t// They are removed so they don't leak to DOM elements.\n\t// @see https://github.com/WordPress/gutenberg/issues/14457\n\t__unstableExplicitMenuItem,\n\t__unstableTarget,\n\t...restProps\n} ) => <MenuItem { ...restProps } />;\n\nexport default function ComplementaryAreaMoreMenuItem( {\n\tscope,\n\ttarget,\n\t__unstableExplicitMenuItem,\n\t...props\n} ) {\n\treturn (\n\t\t<ComplementaryAreaToggle\n\t\t\tas={ ( toggleProps ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<ActionItem\n\t\t\t\t\t\t__unstableExplicitMenuItem={\n\t\t\t\t\t\t\t__unstableExplicitMenuItem\n\t\t\t\t\t\t}\n\t\t\t\t\t\t__unstableTarget={ `${ scope }/${ target }` }\n\t\t\t\t\t\tas={ PluginsMenuItem }\n\t\t\t\t\t\tname={ `${ scope }/plugin-more-menu` }\n\t\t\t\t\t\t{ ...toggleProps }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} }\n\t\t\trole=\"menuitemcheckbox\"\n\t\t\tselectedIcon={ check }\n\t\t\tname={ target }\n\t\t\tscope={ scope }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { MenuGroup, Button, Slot, Fill } from '@wordpress/components';\nimport { Children } from '@wordpress/element';\n\nconst noop = () => {};\n\nfunction ActionItemSlot( {\n\tname,\n\tas: Component = MenuGroup,\n\tfillProps = {},\n\tbubblesVirtually,\n\t...props\n} ) {\n\treturn (\n\t\t<Slot\n\t\t\tname={ name }\n\t\t\tbubblesVirtually={ bubblesVirtually }\n\t\t\tfillProps={ fillProps }\n\t\t>\n\t\t\t{ ( fills ) => {\n\t\t\t\tif ( ! Children.toArray( fills ).length ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Special handling exists for backward compatibility.\n\t\t\t\t// It ensures that menu items created by plugin authors aren't\n\t\t\t\t// duplicated with automatically injected menu items coming\n\t\t\t\t// from pinnable plugin sidebars.\n\t\t\t\t// @see https://github.com/WordPress/gutenberg/issues/14457\n\t\t\t\tconst initializedByPlugins = [];\n\t\t\t\tChildren.forEach(\n\t\t\t\t\tfills,\n\t\t\t\t\t( {\n\t\t\t\t\t\tprops: { __unstableExplicitMenuItem, __unstableTarget },\n\t\t\t\t\t} ) => {\n\t\t\t\t\t\tif ( __unstableTarget && __unstableExplicitMenuItem ) {\n\t\t\t\t\t\t\tinitializedByPlugins.push( __unstableTarget );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\tconst children = Children.map( fills, ( child ) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\t! child.props.__unstableExplicitMenuItem &&\n\t\t\t\t\t\tinitializedByPlugins.includes(\n\t\t\t\t\t\t\tchild.props.__unstableTarget\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\treturn child;\n\t\t\t\t} );\n\n\t\t\t\treturn <Component { ...props }>{ children }</Component>;\n\t\t\t} }\n\t\t</Slot>\n\t);\n}\n\nfunction ActionItem( { name, as: Component = Button, onClick, ...props } ) {\n\treturn (\n\t\t<Fill name={ name }>\n\t\t\t{ ( { onClick: fpOnClick } ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<Component\n\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\tonClick || fpOnClick\n\t\t\t\t\t\t\t\t? ( ...args ) => {\n\t\t\t\t\t\t\t\t\t\t( onClick || noop )( ...args );\n\t\t\t\t\t\t\t\t\t\t( fpOnClick || noop )( ...args );\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} }\n\t\t</Fill>\n\t);\n}\n\nActionItem.Slot = ActionItemSlot;\n\nexport default ActionItem;\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Slot, Fill } from '@wordpress/components';\n\nfunction PinnedItems( { scope, ...props } ) {\n\treturn <Fill name={ `PinnedItems/${ scope }` } { ...props } />;\n}\n\nfunction PinnedItemsSlot( { scope, className, ...props } ) {\n\treturn (\n\t\t<Slot name={ `PinnedItems/${ scope }` } { ...props }>\n\t\t\t{ ( fills ) =>\n\t\t\t\tfills?.length > 0 && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t\t'interface-pinned-items'\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ fills }\n\t\t\t\t\t</div>\n\t\t\t\t)\n\t\t\t}\n\t\t</Slot>\n\t);\n}\n\nPinnedItems.Slot = PinnedItemsSlot;\n\nexport default PinnedItems;\n", "/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\n\nconst FullscreenMode = ( { isActive } ) => {\n\tuseEffect( () => {\n\t\tlet isSticky = false;\n\t\t// `is-fullscreen-mode` is set in PHP as a body class by Gutenberg, and this causes\n\t\t// `sticky-menu` to be applied by WordPress and prevents the admin menu being scrolled\n\t\t// even if `is-fullscreen-mode` is then removed. Let's remove `sticky-menu` here as\n\t\t// a consequence of the FullscreenMode setup.\n\t\tif ( document.body.classList.contains( 'sticky-menu' ) ) {\n\t\t\tisSticky = true;\n\t\t\tdocument.body.classList.remove( 'sticky-menu' );\n\t\t}\n\n\t\treturn () => {\n\t\t\tif ( isSticky ) {\n\t\t\t\tdocument.body.classList.add( 'sticky-menu' );\n\t\t\t}\n\t\t};\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tif ( isActive ) {\n\t\t\tdocument.body.classList.add( 'is-fullscreen-mode' );\n\t\t} else {\n\t\t\tdocument.body.classList.remove( 'is-fullscreen-mode' );\n\t\t}\n\n\t\treturn () => {\n\t\t\tif ( isActive ) {\n\t\t\t\tdocument.body.classList.remove( 'is-fullscreen-mode' );\n\t\t\t}\n\t\t};\n\t}, [ isActive ] );\n\n\treturn null;\n};\nexport default FullscreenMode;\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Type definitions\n */\ntype NavigableRegionProps = {\n\tchildren: React.ReactNode;\n\tclassName?: string;\n\tariaLabel: string;\n\tas?: React.ElementType;\n\t[ key: string ]: any;\n};\n\n// This is a copy of the private `NavigableRegion` component from the '@wordpress/editor' private APIs.\nconst NavigableRegion = forwardRef< HTMLElement, NavigableRegionProps >(\n\t( { children, className, ariaLabel, as: Tag = 'div', ...props }, ref ) => {\n\t\treturn (\n\t\t\t<Tag\n\t\t\t\tref={ ref }\n\t\t\t\tclassName={ clsx( 'admin-ui-navigable-region', className ) }\n\t\t\t\taria-label={ ariaLabel }\n\t\t\t\trole=\"region\"\n\t\t\t\ttabIndex=\"-1\"\n\t\t\t\t{ ...props }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</Tag>\n\t\t);\n\t}\n);\n\nNavigableRegion.displayName = 'NavigableRegion';\n\nexport default NavigableRegion;\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { NavigableRegion } from '@wordpress/admin-ui';\nimport { forwardRef, useEffect } from '@wordpress/element';\nimport {\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tuseReducedMotion,\n\tuseViewportMatch,\n\tuseResizeObserver,\n} from '@wordpress/compose';\n\nconst ANIMATION_DURATION = 0.25;\nconst commonTransition = {\n\ttype: 'tween',\n\tduration: ANIMATION_DURATION,\n\tease: [ 0.6, 0, 0.4, 1 ],\n};\n\nfunction useHTMLClass( className ) {\n\tuseEffect( () => {\n\t\tconst element =\n\t\t\tdocument && document.querySelector( `html:not(.${ className })` );\n\t\tif ( ! element ) {\n\t\t\treturn;\n\t\t}\n\t\telement.classList.toggle( className );\n\t\treturn () => {\n\t\t\telement.classList.toggle( className );\n\t\t};\n\t}, [ className ] );\n}\n\nconst headerVariants = {\n\thidden: { opacity: 1, marginTop: -60 },\n\tvisible: { opacity: 1, marginTop: 0 },\n\tdistractionFreeHover: {\n\t\topacity: 1,\n\t\tmarginTop: 0,\n\t\ttransition: {\n\t\t\t...commonTransition,\n\t\t\tdelay: 0.2,\n\t\t\tdelayChildren: 0.2,\n\t\t},\n\t},\n\tdistractionFreeHidden: {\n\t\topacity: 0,\n\t\tmarginTop: -60,\n\t},\n\tdistractionFreeDisabled: {\n\t\topacity: 0,\n\t\tmarginTop: 0,\n\t\ttransition: {\n\t\t\t...commonTransition,\n\t\t\tdelay: 0.8,\n\t\t\tdelayChildren: 0.8,\n\t\t},\n\t},\n};\n\nfunction InterfaceSkeleton(\n\t{\n\t\tisDistractionFree,\n\t\tfooter,\n\t\theader,\n\t\teditorNotices,\n\t\tsidebar,\n\t\tsecondarySidebar,\n\t\tcontent,\n\t\tactions,\n\t\tlabels,\n\t\tclassName,\n\t},\n\tref\n) {\n\tconst [ secondarySidebarResizeListener, secondarySidebarSize ] =\n\t\tuseResizeObserver();\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst disableMotion = useReducedMotion();\n\tconst defaultTransition = {\n\t\ttype: 'tween',\n\t\tduration: disableMotion ? 0 : ANIMATION_DURATION,\n\t\tease: [ 0.6, 0, 0.4, 1 ],\n\t};\n\tuseHTMLClass( 'interface-interface-skeleton__html-container' );\n\n\tconst defaultLabels = {\n\t\t/* translators: accessibility text for the top bar landmark region. */\n\t\theader: _x( 'Header', 'header landmark area' ),\n\t\t/* translators: accessibility text for the content landmark region. */\n\t\tbody: __( 'Content' ),\n\t\t/* translators: accessibility text for the secondary sidebar landmark region. */\n\t\tsecondarySidebar: __( 'Block Library' ),\n\t\t/* translators: accessibility text for the settings landmark region. */\n\t\tsidebar: _x( 'Settings', 'settings landmark area' ),\n\t\t/* translators: accessibility text for the publish landmark region. */\n\t\tactions: __( 'Publish' ),\n\t\t/* translators: accessibility text for the footer landmark region. */\n\t\tfooter: __( 'Footer' ),\n\t};\n\n\tconst mergedLabels = { ...defaultLabels, ...labels };\n\n\treturn (\n\t\t<div\n\t\t\tref={ ref }\n\t\t\tclassName={ clsx(\n\t\t\t\tclassName,\n\t\t\t\t'interface-interface-skeleton',\n\t\t\t\t!! footer && 'has-footer'\n\t\t\t) }\n\t\t>\n\t\t\t<div className=\"interface-interface-skeleton__editor\">\n\t\t\t\t<AnimatePresence initial={ false }>\n\t\t\t\t\t{ !! header && (\n\t\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\t\tas={ motion.div }\n\t\t\t\t\t\t\tclassName=\"interface-interface-skeleton__header\"\n\t\t\t\t\t\t\taria-label={ mergedLabels.header }\n\t\t\t\t\t\t\tinitial={\n\t\t\t\t\t\t\t\tisDistractionFree && ! isMobileViewport\n\t\t\t\t\t\t\t\t\t? 'distractionFreeHidden'\n\t\t\t\t\t\t\t\t\t: 'hidden'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\twhileHover={\n\t\t\t\t\t\t\t\tisDistractionFree && ! isMobileViewport\n\t\t\t\t\t\t\t\t\t? 'distractionFreeHover'\n\t\t\t\t\t\t\t\t\t: 'visible'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tanimate={\n\t\t\t\t\t\t\t\tisDistractionFree && ! isMobileViewport\n\t\t\t\t\t\t\t\t\t? 'distractionFreeDisabled'\n\t\t\t\t\t\t\t\t\t: 'visible'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\texit={\n\t\t\t\t\t\t\t\tisDistractionFree && ! isMobileViewport\n\t\t\t\t\t\t\t\t\t? 'distractionFreeHidden'\n\t\t\t\t\t\t\t\t\t: 'hidden'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvariants={ headerVariants }\n\t\t\t\t\t\t\ttransition={ defaultTransition }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ header }\n\t\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t) }\n\t\t\t\t</AnimatePresence>\n\t\t\t\t{ isDistractionFree && (\n\t\t\t\t\t<div className=\"interface-interface-skeleton__header\">\n\t\t\t\t\t\t{ editorNotices }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t\t<div className=\"interface-interface-skeleton__body\">\n\t\t\t\t\t<AnimatePresence initial={ false }>\n\t\t\t\t\t\t{ !! secondarySidebar && (\n\t\t\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\t\t\tclassName=\"interface-interface-skeleton__secondary-sidebar\"\n\t\t\t\t\t\t\t\tariaLabel={ mergedLabels.secondarySidebar }\n\t\t\t\t\t\t\t\tas={ motion.div }\n\t\t\t\t\t\t\t\tinitial=\"closed\"\n\t\t\t\t\t\t\t\tanimate=\"open\"\n\t\t\t\t\t\t\t\texit=\"closed\"\n\t\t\t\t\t\t\t\tvariants={ {\n\t\t\t\t\t\t\t\t\topen: { width: secondarySidebarSize.width },\n\t\t\t\t\t\t\t\t\tclosed: { width: 0 },\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\ttransition={ defaultTransition }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t\t\twidth: isMobileViewport\n\t\t\t\t\t\t\t\t\t\t\t? '100vw'\n\t\t\t\t\t\t\t\t\t\t\t: 'fit-content',\n\t\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tvariants={ {\n\t\t\t\t\t\t\t\t\t\topen: { x: 0 },\n\t\t\t\t\t\t\t\t\t\tclosed: { x: '-100%' },\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\ttransition={ defaultTransition }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ secondarySidebarResizeListener }\n\t\t\t\t\t\t\t\t\t{ secondarySidebar }\n\t\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</AnimatePresence>\n\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\tclassName=\"interface-interface-skeleton__content\"\n\t\t\t\t\t\tariaLabel={ mergedLabels.body }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ content }\n\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t{ !! sidebar && (\n\t\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\t\tclassName=\"interface-interface-skeleton__sidebar\"\n\t\t\t\t\t\t\tariaLabel={ mergedLabels.sidebar }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ sidebar }\n\t\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t) }\n\t\t\t\t\t{ !! actions && (\n\t\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\t\tclassName=\"interface-interface-skeleton__actions\"\n\t\t\t\t\t\t\tariaLabel={ mergedLabels.actions }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ actions }\n\t\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{ !! footer && (\n\t\t\t\t<NavigableRegion\n\t\t\t\t\tclassName=\"interface-interface-skeleton__footer\"\n\t\t\t\t\tariaLabel={ mergedLabels.footer }\n\t\t\t\t>\n\t\t\t\t\t{ footer }\n\t\t\t\t</NavigableRegion>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport default forwardRef( InterfaceSkeleton );\n", "/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\nimport { PATTERN_POST_TYPE } from '../../store/constants';\n\nconst { RenamePatternModal } = unlock( patternsPrivateApis );\nexport const modalName = 'editor/pattern-rename';\n\nexport default function PatternRenameModal() {\n\tconst isActive = useSelect( ( select ) =>\n\t\tselect( interfaceStore ).isModalActive( modalName )\n\t);\n\n\tconst { record, postType } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! isActive ) {\n\t\t\t\treturn {};\n\t\t\t}\n\n\t\t\tconst { getCurrentPostType, getCurrentPostId } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst { getEditedEntityRecord } = select( coreStore );\n\t\t\tconst _postType = getCurrentPostType();\n\t\t\treturn {\n\t\t\t\trecord: getEditedEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\t_postType,\n\t\t\t\t\tgetCurrentPostId()\n\t\t\t\t),\n\t\t\t\tpostType: _postType,\n\t\t\t};\n\t\t},\n\t\t[ isActive ]\n\t);\n\n\tconst { closeModal } = useDispatch( interfaceStore );\n\n\tif ( ! isActive || postType !== PATTERN_POST_TYPE ) {\n\t\treturn null;\n\t}\n\n\treturn <RenamePatternModal onClose={ closeModal } pattern={ record } />;\n}\n", "/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\nimport { PATTERN_POST_TYPE } from '../../store/constants';\n\nconst { DuplicatePatternModal } = unlock( patternsPrivateApis );\nexport const modalName = 'editor/pattern-duplicate';\n\nexport default function PatternDuplicateModal() {\n\tconst isActive = useSelect( ( select ) =>\n\t\tselect( interfaceStore ).isModalActive( modalName )\n\t);\n\n\tconst { record, postType } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! isActive ) {\n\t\t\t\treturn {};\n\t\t\t}\n\n\t\t\tconst { getCurrentPostType, getCurrentPostId } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst { getEditedEntityRecord } = select( coreStore );\n\t\t\tconst _postType = getCurrentPostType();\n\t\t\treturn {\n\t\t\t\trecord: getEditedEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\t_postType,\n\t\t\t\t\tgetCurrentPostId()\n\t\t\t\t),\n\t\t\t\tpostType: _postType,\n\t\t\t};\n\t\t},\n\t\t[ isActive ]\n\t);\n\tconst { closeModal } = useDispatch( interfaceStore );\n\n\tif ( ! isActive || postType !== PATTERN_POST_TYPE ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<DuplicatePatternModal\n\t\t\tonClose={ closeModal }\n\t\t\tonSuccess={ () => closeModal() }\n\t\t\tpattern={ record }\n\t\t/>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\n\nimport { _n } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst { BlockRemovalWarningModal } = unlock( blockEditorPrivateApis );\n\n// Prevent accidental removal of certain blocks, asking the user for confirmation first.\nconst TEMPLATE_BLOCKS = [\n\t'core/post-content',\n\t'core/post-template',\n\t'core/query',\n];\nconst BLOCK_REMOVAL_RULES = [\n\t{\n\t\t// Template blocks.\n\t\t// The warning is only shown when a user manipulates templates or template parts.\n\t\tpostTypes: [ 'wp_template', 'wp_template_part' ],\n\t\tcallback( removedBlocks ) {\n\t\t\tconst removedTemplateBlocks = removedBlocks.filter( ( { name } ) =>\n\t\t\t\tTEMPLATE_BLOCKS.includes( name )\n\t\t\t);\n\t\t\tif ( removedTemplateBlocks.length ) {\n\t\t\t\treturn _n(\n\t\t\t\t\t'Deleting this block will stop your post or page content from displaying on this template. It is not recommended.',\n\t\t\t\t\t'Some of the deleted blocks will stop your post or page content from displaying on this template. It is not recommended.',\n\t\t\t\t\tremovedBlocks.length\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t},\n\t{\n\t\t// Pattern overrides.\n\t\t// The warning is only shown when the user edits a pattern.\n\t\tpostTypes: [ 'wp_block' ],\n\t\tcallback( removedBlocks ) {\n\t\t\tconst removedBlocksWithOverrides = removedBlocks.filter(\n\t\t\t\t( { attributes } ) =>\n\t\t\t\t\tattributes?.metadata?.bindings &&\n\t\t\t\t\tObject.values( attributes.metadata.bindings ).some(\n\t\t\t\t\t\t( binding ) =>\n\t\t\t\t\t\t\tbinding.source === 'core/pattern-overrides'\n\t\t\t\t\t)\n\t\t\t);\n\t\t\tif ( removedBlocksWithOverrides.length ) {\n\t\t\t\treturn _n(\n\t\t\t\t\t'The deleted block allows instance overrides. Removing it may result in content not displaying where this pattern is used. Are you sure you want to proceed?',\n\t\t\t\t\t'Some of the deleted blocks allow instance overrides. Removing them may result in content not displaying where this pattern is used. Are you sure you want to proceed?',\n\t\t\t\t\tremovedBlocks.length\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t},\n];\n\nexport default function BlockRemovalWarnings() {\n\tconst currentPostType = useSelect(\n\t\t( select ) => select( editorStore ).getCurrentPostType(),\n\t\t[]\n\t);\n\n\tconst removalRulesForPostType = useMemo(\n\t\t() =>\n\t\t\tBLOCK_REMOVAL_RULES.filter( ( rule ) =>\n\t\t\t\trule.postTypes.includes( currentPostType )\n\t\t\t),\n\t\t[ currentPostType ]\n\t);\n\n\t// `BlockRemovalWarnings` is rendered in the editor provider, a shared component\n\t// across react native and web. However, `BlockRemovalWarningModal` is web only.\n\t// Check it exists before trying to render it.\n\tif ( ! BlockRemovalWarningModal ) {\n\t\treturn null;\n\t}\n\n\tif ( ! removalRulesForPostType ) {\n\t\treturn null;\n\t}\n\n\treturn <BlockRemovalWarningModal rules={ removalRulesForPostType } />;\n}\n", "/**\n * WordPress dependencies\n */\nimport { Flex, FlexItem, Modal, CheckboxControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useMemo, useEffect } from '@wordpress/element';\nimport {\n\tstore as blockEditorStore,\n\t__experimentalBlockPatternsList as BlockPatternsList,\n} from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __unstableSerializeAndClean } from '@wordpress/blocks';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n} from '../../store/constants';\nimport { store as editorStore } from '../../store';\n\nexport function useStartPatterns() {\n\t// A pattern is a start pattern if it includes 'core/post-content' in its blockTypes,\n\t// and it has no postTypes declared and the current post type is page or if\n\t// the current post type is part of the postTypes declared.\n\tconst { blockPatternsWithPostContentBlockType, postType } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getPatternsByBlockTypes, getBlocksByName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst { getCurrentPostType, getRenderingMode } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst rootClientId =\n\t\t\t\tgetRenderingMode() === 'post-only'\n\t\t\t\t\t? ''\n\t\t\t\t\t: getBlocksByName( 'core/post-content' )?.[ 0 ];\n\t\t\treturn {\n\t\t\t\tblockPatternsWithPostContentBlockType: getPatternsByBlockTypes(\n\t\t\t\t\t'core/post-content',\n\t\t\t\t\trootClientId\n\t\t\t\t),\n\t\t\t\tpostType: getCurrentPostType(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\treturn useMemo( () => {\n\t\tif ( ! blockPatternsWithPostContentBlockType?.length ) {\n\t\t\treturn [];\n\t\t}\n\n\t\t/*\n\t\t * Filter patterns without postTypes declared if the current postType is page\n\t\t * or patterns that declare the current postType in its post type array.\n\t\t */\n\t\treturn blockPatternsWithPostContentBlockType.filter( ( pattern ) => {\n\t\t\treturn (\n\t\t\t\t( postType === 'page' && ! pattern.postTypes ) ||\n\t\t\t\t( Array.isArray( pattern.postTypes ) &&\n\t\t\t\t\tpattern.postTypes.includes( postType ) )\n\t\t\t);\n\t\t} );\n\t}, [ postType, blockPatternsWithPostContentBlockType ] );\n}\n\nfunction PatternSelection( { blockPatterns, onChoosePattern } ) {\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst { postType, postId } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostType, getCurrentPostId } = select( editorStore );\n\n\t\treturn {\n\t\t\tpostType: getCurrentPostType(),\n\t\t\tpostId: getCurrentPostId(),\n\t\t};\n\t}, [] );\n\treturn (\n\t\t<BlockPatternsList\n\t\t\tblockPatterns={ blockPatterns }\n\t\t\tonClickPattern={ ( _pattern, blocks ) => {\n\t\t\t\teditEntityRecord( 'postType', postType, postId, {\n\t\t\t\t\tblocks,\n\t\t\t\t\tcontent: ( { blocks: blocksForSerialization = [] } ) =>\n\t\t\t\t\t\t__unstableSerializeAndClean( blocksForSerialization ),\n\t\t\t\t} );\n\t\t\t\tonChoosePattern();\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction StartPageOptionsModal( { onClose } ) {\n\tconst [ showStartPatterns, setShowStartPatterns ] = useState( true );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\tconst startPatterns = useStartPatterns();\n\tconst hasStartPattern = startPatterns.length > 0;\n\n\tif ( ! hasStartPattern ) {\n\t\treturn null;\n\t}\n\n\tfunction handleClose() {\n\t\tonClose();\n\t\tsetPreference( 'core', 'enableChoosePatternModal', showStartPatterns );\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"editor-start-page-options__modal\"\n\t\t\ttitle={ __( 'Choose a pattern' ) }\n\t\t\tisFullScreen\n\t\t\tonRequestClose={ handleClose }\n\t\t>\n\t\t\t<div className=\"editor-start-page-options__modal-content\">\n\t\t\t\t<PatternSelection\n\t\t\t\t\tblockPatterns={ startPatterns }\n\t\t\t\t\tonChoosePattern={ handleClose }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<Flex\n\t\t\t\tclassName=\"editor-start-page-options__modal__actions\"\n\t\t\t\tjustify=\"flex-start\"\n\t\t\t\texpanded={ false }\n\t\t\t>\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\tchecked={ showStartPatterns }\n\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t'Always show starter patterns for new pages'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tonChange={ ( newValue ) => {\n\t\t\t\t\t\t\tsetShowStartPatterns( newValue );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</FlexItem>\n\t\t\t</Flex>\n\t\t</Modal>\n\t);\n}\n\nexport default function StartPageOptions() {\n\tconst [ isOpen, setIsOpen ] = useState( false );\n\tconst { isEditedPostDirty, isEditedPostEmpty } = useSelect( editorStore );\n\tconst { isModalActive } = useSelect( interfaceStore );\n\tconst { enabled, postId } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostId, getCurrentPostType } = select( editorStore );\n\t\tconst choosePatternModalEnabled = select( preferencesStore ).get(\n\t\t\t'core',\n\t\t\t'enableChoosePatternModal'\n\t\t);\n\t\tconst currentPostType = getCurrentPostType();\n\t\treturn {\n\t\t\tpostId: getCurrentPostId(),\n\t\t\tenabled:\n\t\t\t\tchoosePatternModalEnabled &&\n\t\t\t\tTEMPLATE_POST_TYPE !== currentPostType &&\n\t\t\t\tTEMPLATE_PART_POST_TYPE !== currentPostType,\n\t\t};\n\t}, [] );\n\n\t// Note: The `postId` ensures the effect re-runs when pages are switched without remounting the component.\n\t// Examples: changing pages in the List View, creating a new page via Command Palette.\n\tuseEffect( () => {\n\t\tconst isFreshPage = ! isEditedPostDirty() && isEditedPostEmpty();\n\t\t// Prevents immediately opening when features is enabled via preferences modal.\n\t\tconst isPreferencesModalActive = isModalActive( 'editor/preferences' );\n\t\tif ( ! enabled || ! isFreshPage || isPreferencesModalActive ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Open the modal after the initial render for a new page.\n\t\tsetIsOpen( true );\n\t}, [\n\t\tenabled,\n\t\tpostId,\n\t\tisEditedPostDirty,\n\t\tisEditedPostEmpty,\n\t\tisModalActive,\n\t] );\n\n\tif ( ! isOpen ) {\n\t\treturn null;\n\t}\n\n\treturn <StartPageOptionsModal onClose={ () => setIsOpen( false ) } />;\n}\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { textFormattingShortcuts } from './config';\nimport Shortcut from './shortcut';\nimport DynamicShortcut from './dynamic-shortcut';\n\nconst KEYBOARD_SHORTCUT_HELP_MODAL_NAME = 'editor/keyboard-shortcut-help';\n\nconst ShortcutList = ( { shortcuts } ) => (\n\t/*\n\t * Disable reason: The `list` ARIA role is redundant but\n\t * Safari+VoiceOver won't announce the list otherwise.\n\t */\n\t/* eslint-disable jsx-a11y/no-redundant-roles */\n\t<ul\n\t\tclassName=\"editor-keyboard-shortcut-help-modal__shortcut-list\"\n\t\trole=\"list\"\n\t>\n\t\t{ shortcuts.map( ( shortcut, index ) => (\n\t\t\t<li\n\t\t\t\tclassName=\"editor-keyboard-shortcut-help-modal__shortcut\"\n\t\t\t\tkey={ index }\n\t\t\t>\n\t\t\t\t{ typeof shortcut === 'string' ? (\n\t\t\t\t\t<DynamicShortcut name={ shortcut } />\n\t\t\t\t) : (\n\t\t\t\t\t<Shortcut { ...shortcut } />\n\t\t\t\t) }\n\t\t\t</li>\n\t\t) ) }\n\t</ul>\n\t/* eslint-enable jsx-a11y/no-redundant-roles */\n);\n\nconst ShortcutSection = ( { title, shortcuts, className } ) => (\n\t<section\n\t\tclassName={ clsx(\n\t\t\t'editor-keyboard-shortcut-help-modal__section',\n\t\t\tclassName\n\t\t) }\n\t>\n\t\t{ !! title && (\n\t\t\t<h2 className=\"editor-keyboard-shortcut-help-modal__section-title\">\n\t\t\t\t{ title }\n\t\t\t</h2>\n\t\t) }\n\t\t<ShortcutList shortcuts={ shortcuts } />\n\t</section>\n);\n\nconst ShortcutCategorySection = ( {\n\ttitle,\n\tcategoryName,\n\tadditionalShortcuts = [],\n} ) => {\n\tconst categoryShortcuts = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( keyboardShortcutsStore ).getCategoryShortcuts(\n\t\t\t\tcategoryName\n\t\t\t);\n\t\t},\n\t\t[ categoryName ]\n\t);\n\n\treturn (\n\t\t<ShortcutSection\n\t\t\ttitle={ title }\n\t\t\tshortcuts={ categoryShortcuts.concat( additionalShortcuts ) }\n\t\t/>\n\t);\n};\n\nfunction KeyboardShortcutHelpModal() {\n\tconst isModalActive = useSelect(\n\t\t( select ) =>\n\t\t\tselect( interfaceStore ).isModalActive(\n\t\t\t\tKEYBOARD_SHORTCUT_HELP_MODAL_NAME\n\t\t\t),\n\t\t[]\n\t);\n\tconst { openModal, closeModal } = useDispatch( interfaceStore );\n\tconst toggleModal = () => {\n\t\tif ( isModalActive ) {\n\t\t\tcloseModal();\n\t\t} else {\n\t\t\topenModal( KEYBOARD_SHORTCUT_HELP_MODAL_NAME );\n\t\t}\n\t};\n\tuseShortcut( 'core/editor/keyboard-shortcuts', toggleModal );\n\n\tif ( ! isModalActive ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"editor-keyboard-shortcut-help-modal\"\n\t\t\ttitle={ __( 'Keyboard shortcuts' ) }\n\t\t\tcloseButtonLabel={ __( 'Close' ) }\n\t\t\tonRequestClose={ toggleModal }\n\t\t>\n\t\t\t<ShortcutSection\n\t\t\t\tclassName=\"editor-keyboard-shortcut-help-modal__main-shortcuts\"\n\t\t\t\tshortcuts={ [ 'core/editor/keyboard-shortcuts' ] }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Global shortcuts' ) }\n\t\t\t\tcategoryName=\"global\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Selection shortcuts' ) }\n\t\t\t\tcategoryName=\"selection\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Block shortcuts' ) }\n\t\t\t\tcategoryName=\"block\"\n\t\t\t\tadditionalShortcuts={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tkeyCombination: { character: '/' },\n\t\t\t\t\t\tdescription: __(\n\t\t\t\t\t\t\t'Change the block type after adding a new paragraph.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t/* translators: The forward-slash character. e.g. '/'. */\n\t\t\t\t\t\tariaLabel: __( 'Forward-slash' ),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t/>\n\t\t\t<ShortcutSection\n\t\t\t\ttitle={ __( 'Text formatting' ) }\n\t\t\t\tshortcuts={ textFormattingShortcuts }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'List View shortcuts' ) }\n\t\t\t\tcategoryName=\"list-view\"\n\t\t\t/>\n\t\t</Modal>\n\t);\n}\n\nexport default KeyboardShortcutHelpModal;\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nexport const textFormattingShortcuts = [\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'b' },\n\t\tdescription: __( 'Make the selected text bold.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'i' },\n\t\tdescription: __( 'Make the selected text italic.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'k' },\n\t\tdescription: __( 'Convert the selected text into a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'k' },\n\t\tdescription: __( 'Remove a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { character: '[[' },\n\t\tdescription: __( 'Insert a link to a post or page.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'u' },\n\t\tdescription: __( 'Underline the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'd' },\n\t\tdescription: __( 'Strikethrough the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'x' },\n\t\tdescription: __( 'Make the selected text inline code.' ),\n\t},\n\t{\n\t\tkeyCombination: {\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: '0',\n\t\t},\n\t\taliases: [\n\t\t\t{\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: '7',\n\t\t\t},\n\t\t],\n\t\tdescription: __( 'Convert the current heading to a paragraph.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: '1-6' },\n\t\tdescription: __(\n\t\t\t'Convert the current paragraph or heading to a heading of level 1 to 6.'\n\t\t),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'SPACE' },\n\t\tdescription: __( 'Add non breaking space.' ),\n\t},\n];\n", "/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';\n\nfunction KeyCombination( { keyCombination, forceAriaLabel } ) {\n\tconst shortcut = keyCombination.modifier\n\t\t? displayShortcutList[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst ariaLabel = keyCombination.modifier\n\t\t? shortcutAriaLabel[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\n\treturn (\n\t\t<kbd\n\t\t\tclassName=\"editor-keyboard-shortcut-help-modal__shortcut-key-combination\"\n\t\t\taria-label={ forceAriaLabel || ariaLabel }\n\t\t>\n\t\t\t{ ( Array.isArray( shortcut ) ? shortcut : [ shortcut ] ).map(\n\t\t\t\t( character, index ) => {\n\t\t\t\t\tif ( character === '+' ) {\n\t\t\t\t\t\treturn <Fragment key={ index }>{ character }</Fragment>;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<kbd\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tclassName=\"editor-keyboard-shortcut-help-modal__shortcut-key\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ character }\n\t\t\t\t\t\t</kbd>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t) }\n\t\t</kbd>\n\t);\n}\n\nfunction Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"editor-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"editor-keyboard-shortcut-help-modal__shortcut-term\">\n\t\t\t\t<KeyCombination\n\t\t\t\t\tkeyCombination={ keyCombination }\n\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t/>\n\t\t\t\t{ aliases.map( ( alias, index ) => (\n\t\t\t\t\t<KeyCombination\n\t\t\t\t\t\tkeyCombination={ alias }\n\t\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Shortcut;\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from './shortcut';\n\nfunction DynamicShortcut( { name } ) {\n\tconst { keyCombination, description, aliases } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetShortcutKeyCombination,\n\t\t\t\tgetShortcutDescription,\n\t\t\t\tgetShortcutAliases,\n\t\t\t} = select( keyboardShortcutsStore );\n\n\t\t\treturn {\n\t\t\t\tkeyCombination: getShortcutKeyCombination( name ),\n\t\t\t\taliases: getShortcutAliases( name ),\n\t\t\t\tdescription: getShortcutDescription( name ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! keyCombination ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Shortcut\n\t\t\tkeyCombination={ keyCombination }\n\t\t\tdescription={ description }\n\t\t\taliases={ aliases }\n\t\t/>\n\t);\n}\n\nexport default DynamicShortcut;\n", "/**\n * WordPress dependencies\n */\nimport { Modal, Flex, FlexItem, Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useMemo, useEffect } from '@wordpress/element';\nimport { __experimentalBlockPatternsList as BlockPatternsList } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { parse } from '@wordpress/blocks';\nimport { store as coreStore, useEntityBlockEditor } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\n\nfunction useFallbackTemplateContent( slug, isCustom = false ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord, getDefaultTemplateId } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst templateId = getDefaultTemplateId( {\n\t\t\t\tslug,\n\t\t\t\tis_custom: isCustom,\n\t\t\t\tignore_empty: true,\n\t\t\t} );\n\t\t\treturn templateId\n\t\t\t\t? getEntityRecord( 'postType', TEMPLATE_POST_TYPE, templateId )\n\t\t\t\t\t\t?.content?.raw\n\t\t\t\t: undefined;\n\t\t},\n\t\t[ slug, isCustom ]\n\t);\n}\n\nfunction useStartPatterns( fallbackContent ) {\n\tconst { slug, patterns } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostType, getCurrentPostId } = select( editorStore );\n\t\tconst { getEntityRecord, getBlockPatterns } = select( coreStore );\n\t\tconst postId = getCurrentPostId();\n\t\tconst postType = getCurrentPostType();\n\t\tconst record = getEntityRecord( 'postType', postType, postId );\n\t\treturn {\n\t\t\tslug: record.slug,\n\t\t\tpatterns: getBlockPatterns(),\n\t\t};\n\t}, [] );\n\n\tconst currentThemeStylesheet = useSelect(\n\t\t( select ) => select( coreStore ).getCurrentTheme().stylesheet\n\t);\n\n\t// Duplicated from packages/block-library/src/pattern/edit.js.\n\tfunction injectThemeAttributeInBlockTemplateContent( block ) {\n\t\tif (\n\t\t\tblock.innerBlocks.find(\n\t\t\t\t( innerBlock ) => innerBlock.name === 'core/template-part'\n\t\t\t)\n\t\t) {\n\t\t\tblock.innerBlocks = block.innerBlocks.map( ( innerBlock ) => {\n\t\t\t\tif (\n\t\t\t\t\tinnerBlock.name === 'core/template-part' &&\n\t\t\t\t\tinnerBlock.attributes.theme === undefined\n\t\t\t\t) {\n\t\t\t\t\tinnerBlock.attributes.theme = currentThemeStylesheet;\n\t\t\t\t}\n\t\t\t\treturn innerBlock;\n\t\t\t} );\n\t\t}\n\n\t\tif (\n\t\t\tblock.name === 'core/template-part' &&\n\t\t\tblock.attributes.theme === undefined\n\t\t) {\n\t\t\tblock.attributes.theme = currentThemeStylesheet;\n\t\t}\n\t\treturn block;\n\t}\n\n\treturn useMemo( () => {\n\t\t// filter patterns that are supposed to be used in the current template being edited.\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'fallback',\n\t\t\t\tblocks: parse( fallbackContent ),\n\t\t\t\ttitle: __( 'Fallback content' ),\n\t\t\t},\n\t\t\t...patterns\n\t\t\t\t.filter( ( pattern ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tArray.isArray( pattern.templateTypes ) &&\n\t\t\t\t\t\tpattern.templateTypes.some( ( templateType ) =>\n\t\t\t\t\t\t\tslug.startsWith( templateType )\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t} )\n\t\t\t\t.map( ( pattern ) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...pattern,\n\t\t\t\t\t\tblocks: parse( pattern.content ).map( ( block ) =>\n\t\t\t\t\t\t\tinjectThemeAttributeInBlockTemplateContent( block )\n\t\t\t\t\t\t),\n\t\t\t\t\t};\n\t\t\t\t} ),\n\t\t];\n\t}, [ fallbackContent, slug, patterns ] );\n}\n\nfunction PatternSelection( { fallbackContent, onChoosePattern, postType } ) {\n\tconst [ , , onChange ] = useEntityBlockEditor( 'postType', postType );\n\tconst blockPatterns = useStartPatterns( fallbackContent );\n\treturn (\n\t\t<BlockPatternsList\n\t\t\tblockPatterns={ blockPatterns }\n\t\t\tonClickPattern={ ( pattern, blocks ) => {\n\t\t\t\tonChange( blocks, { selection: undefined } );\n\t\t\t\tonChoosePattern();\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction StartModal( { slug, isCustom, onClose, postType } ) {\n\tconst fallbackContent = useFallbackTemplateContent( slug, isCustom );\n\tif ( ! fallbackContent ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"editor-start-template-options__modal\"\n\t\t\ttitle={ __( 'Choose a pattern' ) }\n\t\t\tcloseLabel={ __( 'Cancel' ) }\n\t\t\tfocusOnMount=\"firstElement\"\n\t\t\tonRequestClose={ onClose }\n\t\t\tisFullScreen\n\t\t>\n\t\t\t<div className=\"editor-start-template-options__modal-content\">\n\t\t\t\t<PatternSelection\n\t\t\t\t\tfallbackContent={ fallbackContent }\n\t\t\t\t\tslug={ slug }\n\t\t\t\t\tisCustom={ isCustom }\n\t\t\t\t\tpostType={ postType }\n\t\t\t\t\tonChoosePattern={ () => {\n\t\t\t\t\t\tonClose();\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<Flex\n\t\t\t\tclassName=\"editor-start-template-options__modal__actions\"\n\t\t\t\tjustify=\"flex-end\"\n\t\t\t\texpanded={ false }\n\t\t\t>\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Skip' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</FlexItem>\n\t\t\t</Flex>\n\t\t</Modal>\n\t);\n}\n\nexport default function StartTemplateOptions() {\n\tconst [ isClosed, setIsClosed ] = useState( false );\n\tconst { shouldOpenModal, slug, isCustom, postType, postId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCurrentPostType, getCurrentPostId } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst _postType = getCurrentPostType();\n\t\t\tconst _postId = getCurrentPostId();\n\t\t\tconst { getEditedEntityRecord, hasEditsForEntityRecord } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst templateRecord = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t_postType,\n\t\t\t\t_postId\n\t\t\t);\n\t\t\tconst hasEdits = hasEditsForEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t_postType,\n\t\t\t\t_postId\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tshouldOpenModal:\n\t\t\t\t\t! hasEdits &&\n\t\t\t\t\t'' === templateRecord.content &&\n\t\t\t\t\tTEMPLATE_POST_TYPE === _postType,\n\t\t\t\tslug: templateRecord.slug,\n\t\t\t\tisCustom: templateRecord.is_custom,\n\t\t\t\tpostType: _postType,\n\t\t\t\tpostId: _postId,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tuseEffect( () => {\n\t\t// Should reset the modal state when navigating to a new page/post.\n\t\tsetIsClosed( false );\n\t}, [ postType, postId ] );\n\n\tif ( ! shouldOpenModal || isClosed ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<StartModal\n\t\t\tslug={ slug }\n\t\t\tisCustom={ isCustom }\n\t\t\tpostType={ postType }\n\t\t\tonClose={ () => setIsClosed( true ) }\n\t\t/>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Handles the keyboard shortcuts for the editor.\n *\n * It provides functionality for various keyboard shortcuts such as toggling editor mode,\n * toggling distraction-free mode, undo/redo, saving the post, toggling list view,\n * and toggling the sidebar.\n */\nexport default function EditorKeyboardShortcuts() {\n\tconst isModeToggleDisabled = useSelect( ( select ) => {\n\t\tconst { richEditingEnabled, codeEditingEnabled } =\n\t\t\tselect( editorStore ).getEditorSettings();\n\t\treturn ! richEditingEnabled || ! codeEditingEnabled;\n\t}, [] );\n\tconst { getBlockSelectionStart } = useSelect( blockEditorStore );\n\tconst { getActiveComplementaryArea } = useSelect( interfaceStore );\n\tconst { enableComplementaryArea, disableComplementaryArea } =\n\t\tuseDispatch( interfaceStore );\n\tconst {\n\t\tredo,\n\t\tundo,\n\t\tsavePost,\n\t\tsetIsListViewOpened,\n\t\tswitchEditorMode,\n\t\ttoggleDistractionFree,\n\t} = useDispatch( editorStore );\n\tconst {\n\t\tisEditedPostDirty,\n\t\tisPostSavingLocked,\n\t\tisListViewOpened,\n\t\tgetEditorMode,\n\t} = useSelect( editorStore );\n\n\tuseShortcut(\n\t\t'core/editor/toggle-mode',\n\t\t() => {\n\t\t\tswitchEditorMode(\n\t\t\t\tgetEditorMode() === 'visual' ? 'text' : 'visual'\n\t\t\t);\n\t\t},\n\t\t{\n\t\t\tisDisabled: isModeToggleDisabled,\n\t\t}\n\t);\n\n\tuseShortcut( 'core/editor/toggle-distraction-free', () => {\n\t\ttoggleDistractionFree();\n\t} );\n\n\tuseShortcut( 'core/editor/undo', ( event ) => {\n\t\tundo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/editor/redo', ( event ) => {\n\t\tredo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/editor/save', ( event ) => {\n\t\tevent.preventDefault();\n\n\t\t/**\n\t\t * Do not save the post if post saving is locked.\n\t\t */\n\t\tif ( isPostSavingLocked() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// TODO: This should be handled in the `savePost` effect in\n\t\t// considering `isSaveable`. See note on `isEditedPostSaveable`\n\t\t// selector about dirtiness and meta-boxes.\n\t\t//\n\t\t// See: `isEditedPostSaveable`\n\t\tif ( ! isEditedPostDirty() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsavePost();\n\t} );\n\n\t// Only opens the list view. Other functionality for this shortcut happens in the rendered sidebar.\n\tuseShortcut( 'core/editor/toggle-list-view', ( event ) => {\n\t\tif ( ! isListViewOpened() ) {\n\t\t\tevent.preventDefault();\n\t\t\tsetIsListViewOpened( true );\n\t\t}\n\t} );\n\n\tuseShortcut( 'core/editor/toggle-sidebar', ( event ) => {\n\t\t// This shortcut has no known clashes, but use preventDefault to prevent any\n\t\t// obscure shortcuts from triggering.\n\t\tevent.preventDefault();\n\t\tconst isEditorSidebarOpened = [\n\t\t\t'edit-post/document',\n\t\t\t'edit-post/block',\n\t\t].includes( getActiveComplementaryArea( 'core' ) );\n\n\t\tif ( isEditorSidebarOpened ) {\n\t\t\tdisableComplementaryArea( 'core' );\n\t\t} else {\n\t\t\tconst sidebarToOpen = getBlockSelectionStart()\n\t\t\t\t? 'edit-post/block'\n\t\t\t\t: 'edit-post/document';\n\t\t\tenableComplementaryArea( 'core', sidebarToOpen );\n\t\t}\n\t} );\n\n\treturn null;\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\tBlockSettingsMenuControls,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ConvertToRegularBlocks from './convert-to-regular';\nimport ConvertToTemplatePart from './convert-to-template-part';\n\nexport default function TemplatePartMenuItems() {\n\treturn (\n\t\t<BlockSettingsMenuControls>\n\t\t\t{ ( { selectedClientIds, onClose } ) => (\n\t\t\t\t<TemplatePartConverterMenuItem\n\t\t\t\t\tclientIds={ selectedClientIds }\n\t\t\t\t\tonClose={ onClose }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</BlockSettingsMenuControls>\n\t);\n}\n\nfunction TemplatePartConverterMenuItem( { clientIds, onClose } ) {\n\tconst { blocks } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlocksByClientId } = select( blockEditorStore );\n\t\t\treturn {\n\t\t\t\tblocks: getBlocksByClientId( clientIds ),\n\t\t\t};\n\t\t},\n\t\t[ clientIds ]\n\t);\n\n\t// Allow converting a single template part to standard blocks.\n\tif ( blocks.length === 1 && blocks[ 0 ]?.name === 'core/template-part' ) {\n\t\treturn (\n\t\t\t<ConvertToRegularBlocks\n\t\t\t\tclientId={ clientIds[ 0 ] }\n\t\t\t\tonClose={ onClose }\n\t\t\t/>\n\t\t);\n\t}\n\treturn <ConvertToTemplatePart clientIds={ clientIds } blocks={ blocks } />;\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { MenuItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nexport default function ConvertToRegularBlocks( { clientId, onClose } ) {\n\tconst { getBlocks } = useSelect( blockEditorStore );\n\tconst { replaceBlocks } = useDispatch( blockEditorStore );\n\n\tconst canRemove = useSelect(\n\t\t( select ) => select( blockEditorStore ).canRemoveBlock( clientId ),\n\t\t[ clientId ]\n\t);\n\n\tif ( ! canRemove ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<MenuItem\n\t\t\tonClick={ () => {\n\t\t\t\treplaceBlocks( clientId, getBlocks( clientId ) );\n\t\t\t\tonClose();\n\t\t\t} }\n\t\t>\n\t\t\t{ __( 'Detach' ) }\n\t\t</MenuItem>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { MenuItem } from '@wordpress/components';\nimport { createBlock } from '@wordpress/blocks';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { symbolFilled } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { CreateTemplatePartModal } from '@wordpress/fields';\n\nexport default function ConvertToTemplatePart( { clientIds, blocks } ) {\n\tconst [ isModalOpen, setIsModalOpen ] = useState( false );\n\tconst { replaceBlocks } = useDispatch( blockEditorStore );\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\n\tconst { isBlockBasedTheme, canCreate } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tisBlockBasedTheme:\n\t\t\t\tselect( coreStore ).getCurrentTheme()?.is_block_theme,\n\t\t\tcanCreate:\n\t\t\t\tselect( blockEditorStore ).canInsertBlockType(\n\t\t\t\t\t'core/template-part'\n\t\t\t\t),\n\t\t};\n\t}, [] );\n\n\tif ( ! isBlockBasedTheme || ! canCreate ) {\n\t\treturn null;\n\t}\n\n\tconst onConvert = async ( templatePart ) => {\n\t\treplaceBlocks(\n\t\t\tclientIds,\n\t\t\tcreateBlock( 'core/template-part', {\n\t\t\t\tslug: templatePart.slug,\n\t\t\t\ttheme: templatePart.theme,\n\t\t\t} )\n\t\t);\n\t\tcreateSuccessNotice( __( 'Template part created.' ), {\n\t\t\ttype: 'snackbar',\n\t\t} );\n\n\t\t// The modal and this component will be unmounted because of `replaceBlocks` above,\n\t\t// so no need to call `closeModal` or `onClose`.\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem\n\t\t\t\ticon={ symbolFilled }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetIsModalOpen( true );\n\t\t\t\t} }\n\t\t\t\taria-expanded={ isModalOpen }\n\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t>\n\t\t\t\t{ __( 'Create template part' ) }\n\t\t\t</MenuItem>\n\t\t\t{ isModalOpen && (\n\t\t\t\t<CreateTemplatePartModal\n\t\t\t\t\tcloseModal={ () => {\n\t\t\t\t\t\tsetIsModalOpen( false );\n\t\t\t\t\t} }\n\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\tonCreate={ onConvert }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { GlobalStylesUI } from '@wordpress/global-styles-ui';\nimport { uploadMedia } from '@wordpress/media-utils';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { GlobalStylesBlockLink } from './block-link';\nimport { useGlobalStyles } from './hooks';\n\n/**\n * Hook to fetch server CSS and settings for BlockEditorProvider that are not Global Styles.\n */\nfunction useServerData() {\n\tconst {\n\t\tstyles,\n\t\t__unstableResolvedAssets,\n\t\tcolors,\n\t\tgradients,\n\t\t__experimentalDiscussionSettings,\n\t\tmediaUploadHandler,\n\t\tfontLibraryEnabled,\n\t} = useSelect( ( select ) => {\n\t\tconst { getEditorSettings } = select( editorStore );\n\t\tconst { canUser } = select( coreStore );\n\t\tconst editorSettings = getEditorSettings();\n\n\t\tconst canUserUploadMedia = canUser( 'create', {\n\t\t\tkind: 'postType',\n\t\t\tname: 'attachment',\n\t\t} );\n\n\t\treturn {\n\t\t\tstyles: editorSettings?.styles,\n\t\t\t__unstableResolvedAssets: editorSettings?.__unstableResolvedAssets,\n\t\t\tcolors: editorSettings?.colors,\n\t\t\tgradients: editorSettings?.gradients,\n\t\t\t__experimentalDiscussionSettings:\n\t\t\t\teditorSettings?.__experimentalDiscussionSettings,\n\t\t\tmediaUploadHandler: canUserUploadMedia ? uploadMedia : undefined,\n\t\t\tfontLibraryEnabled: editorSettings?.fontLibraryEnabled ?? true,\n\t\t};\n\t}, [] );\n\n\t// Filter out global styles to get only server-provided styles\n\tconst serverCSS = useMemo( () => {\n\t\tif ( ! styles ) {\n\t\t\treturn [];\n\t\t}\n\t\treturn styles.filter( ( style ) => ! style.isGlobalStyles );\n\t}, [ styles ] );\n\n\t// Create server settings object\n\tconst serverSettings = useMemo( () => {\n\t\treturn {\n\t\t\t__unstableResolvedAssets,\n\t\t\tsettings: {\n\t\t\t\tcolor: {\n\t\t\t\t\tpalette: {\n\t\t\t\t\t\ttheme: colors ?? [],\n\t\t\t\t\t},\n\t\t\t\t\tgradients: {\n\t\t\t\t\t\ttheme: gradients ?? [],\n\t\t\t\t\t},\n\t\t\t\t\tduotone: {\n\t\t\t\t\t\ttheme: [],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t__experimentalDiscussionSettings,\n\t\t\tmediaUpload: mediaUploadHandler,\n\t\t};\n\t}, [\n\t\t__unstableResolvedAssets,\n\t\tcolors,\n\t\tgradients,\n\t\t__experimentalDiscussionSettings,\n\t\tmediaUploadHandler,\n\t] );\n\n\treturn { serverCSS, serverSettings, fontLibraryEnabled };\n}\n\nexport default function GlobalStylesUIWrapper( { path, onPathChange } ) {\n\tconst {\n\t\tuser: userConfig,\n\t\tbase: baseConfig,\n\t\tsetUser: setUserConfig,\n\t\tisReady,\n\t} = useGlobalStyles();\n\tconst { serverCSS, serverSettings, fontLibraryEnabled } = useServerData();\n\n\t// Show loading state while data is being fetched\n\tif ( ! isReady ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<GlobalStylesUI\n\t\t\t\tvalue={ userConfig }\n\t\t\t\tbaseValue={ baseConfig || {} }\n\t\t\t\tonChange={ setUserConfig }\n\t\t\t\tpath={ path }\n\t\t\t\tonPathChange={ onPathChange }\n\t\t\t\tfontLibraryEnabled={ fontLibraryEnabled }\n\t\t\t\tserverCSS={ serverCSS }\n\t\t\t\tserverSettings={ serverSettings }\n\t\t\t/>\n\t\t\t<GlobalStylesBlockLink\n\t\t\t\tpath={ path }\n\t\t\t\tonPathChange={ onPathChange }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport { useGlobalStyles, useStyle, useSetting } from './hooks';\n", "/**\n * WordPress dependencies\n */\nimport { Navigator, useNavigator } from '@wordpress/components';\n// @ts-expect-error: Not typed yet.\nimport { getBlockTypes, store as blocksStore } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\n// @ts-expect-error: Not typed yet.\nimport { BlockEditorProvider } from '@wordpress/block-editor';\nimport { useMemo, useEffect, Fragment } from '@wordpress/element';\nimport { usePrevious } from '@wordpress/compose';\nimport {\n\tgenerateGlobalStyles,\n\tmergeGlobalStyles,\n} from '@wordpress/global-styles-engine';\nimport type {\n\tGlobalStylesConfig,\n\tBlockType,\n} from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport { GlobalStylesProvider } from './provider';\nimport ScreenRoot from './screen-root';\nimport ScreenBlockList from './screen-block-list';\nimport ScreenBlock from './screen-block';\nimport ScreenTypography from './screen-typography';\nimport ScreenTypographyElement from './screen-typography-element';\nimport ScreenColors from './screen-colors';\nimport ScreenColorPalette from './screen-color-palette';\nimport ScreenBackground from './screen-background';\nimport { ScreenShadows, ScreenShadowsEdit } from './screen-shadows';\nimport ScreenLayout from './screen-layout';\nimport ScreenStyleVariations from './screen-style-variations';\nimport ScreenCSS from './screen-css';\nimport ScreenRevisions from './screen-revisions';\nimport FontSizes from './font-sizes/font-sizes';\nimport FontSize from './font-sizes/font-size';\ninterface BlockStylesNavigationScreensProps {\n\tparentMenu: string;\n\tblockStyles: any[];\n\tblockName: string;\n}\n\nfunction BlockStylesNavigationScreens( {\n\tparentMenu,\n\tblockStyles,\n\tblockName,\n}: BlockStylesNavigationScreensProps ) {\n\treturn (\n\t\t<>\n\t\t\t{ blockStyles.map( ( style, index ) => (\n\t\t\t\t<Navigator.Screen\n\t\t\t\t\tkey={ index }\n\t\t\t\t\tpath={ parentMenu + '/variations/' + style.name }\n\t\t\t\t>\n\t\t\t\t\t<ScreenBlock name={ blockName } variation={ style.name } />\n\t\t\t\t</Navigator.Screen>\n\t\t\t) ) }\n\t\t</>\n\t);\n}\n\ninterface ContextScreensProps {\n\tname?: string;\n\tparentMenu?: string;\n}\n\ninterface GlobalStylesNavigationScreenProps {\n\tpath: string;\n\tchildren: React.ReactNode;\n}\n\nfunction ContextScreens( { name, parentMenu = '' }: ContextScreensProps ) {\n\tconst blockStyleVariations = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! name ) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! blockStyleVariations?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockStylesNavigationScreens\n\t\t\tparentMenu={ parentMenu }\n\t\t\tblockStyles={ blockStyleVariations }\n\t\t\tblockName={ name || '' }\n\t\t/>\n\t);\n}\n\ninterface GlobalStylesUIProps {\n\t/** User global styles object (what gets edited) */\n\tvalue: GlobalStylesConfig;\n\t/** Base global styles object (theme default) */\n\tbaseValue: GlobalStylesConfig;\n\t/** Callback when global styles change */\n\tonChange: ( newValue: GlobalStylesConfig ) => void;\n\t/** Current navigation path (optional) */\n\tpath?: string;\n\t/** Callback when navigation path changes (optional) */\n\tonPathChange?: ( path: string ) => void;\n\t/** Whether font library is enabled (optional) */\n\tfontLibraryEnabled?: boolean;\n\t/** Server CSS styles for BlockEditorProvider (optional) */\n\tserverCSS?: { isGlobalStyles?: boolean }[];\n\t/** Server settings for BlockEditorProvider (optional) */\n\tserverSettings?: { __unstableResolvedAssets: Record< string, unknown > };\n}\n\nexport function GlobalStylesUI( {\n\tvalue,\n\tbaseValue,\n\tonChange,\n\tpath,\n\tonPathChange,\n\tfontLibraryEnabled = false,\n\tserverCSS,\n\tserverSettings,\n}: GlobalStylesUIProps ) {\n\tconst blocks = getBlockTypes();\n\n\t// Compute merged value for CSS generation\n\tconst mergedValue = useMemo( () => {\n\t\treturn mergeGlobalStyles( baseValue, value );\n\t}, [ baseValue, value ] );\n\n\tconst [ globalStylesCSS, globalSettings ] = generateGlobalStyles(\n\t\tmergedValue,\n\t\t[],\n\t\t{\n\t\t\tstyleOptions: { variationStyles: true },\n\t\t}\n\t);\n\tconst styles = useMemo(\n\t\t() => [ ...( serverCSS ?? [] ), ...( globalStylesCSS ?? [] ) ],\n\t\t[ serverCSS, globalStylesCSS ]\n\t);\n\n\tconst settings = useMemo( () => {\n\t\treturn {\n\t\t\t...serverSettings,\n\t\t\t__experimentalFeatures: globalSettings,\n\t\t\tstyles,\n\t\t};\n\t}, [ globalSettings, serverSettings, styles ] );\n\n\treturn (\n\t\t<GlobalStylesProvider\n\t\t\tvalue={ value }\n\t\t\tbaseValue={ baseValue }\n\t\t\tonChange={ onChange }\n\t\t\tfontLibraryEnabled={ fontLibraryEnabled }\n\t\t>\n\t\t\t<BlockEditorProvider settings={ settings }>\n\t\t\t\t<Navigator\n\t\t\t\t\tclassName=\"global-styles-ui-sidebar__navigator-provider\"\n\t\t\t\t\tinitialPath={ path || '/' }\n\t\t\t\t>\n\t\t\t\t\t{ ( path || onPathChange ) && (\n\t\t\t\t\t\t<PathSynchronizer\n\t\t\t\t\t\t\tpath={ path }\n\t\t\t\t\t\t\tonPathChange={ onPathChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t<GlobalStylesNavigationScreen path=\"/\">\n\t\t\t\t\t\t<ScreenRoot />\n\t\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t\t\t<GlobalStylesNavigationScreen path=\"/colors\">\n\t\t\t\t\t\t<ScreenColors />\n\t\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t\t\t<GlobalStylesNavigationScreen path=\"/typography\">\n\t\t\t\t\t\t<ScreenTypography />\n\t\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t\t\t<GlobalStylesNavigationScreen path=\"/typography/font-sizes\">\n\t\t\t\t\t\t<FontSizes />\n\t\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t\t\t<GlobalStylesNavigationScreen path=\"/typography/font-sizes/:origin/:slug\">\n\t\t\t\t\t\t<FontSize />\n\t\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t\t\t<GlobalStylesNavigationScreen path=\"/layout\">\n\t\t\t\t\t\t<ScreenLayout />\n\t\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t\t\t<GlobalStylesNavigationScreen path=\"/colors/palette\">\n\t\t\t\t\t\t<ScreenColorPalette />\n\t\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t\t\t<GlobalStylesNavigationScreen path=\"/variations\">\n\t\t\t\t\t\t<ScreenStyleVariations />\n\t\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t\t\t<GlobalStylesNavigationScreen path=\"/css\">\n\t\t\t\t\t\t<ScreenCSS />\n\t\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t\t\t<GlobalStylesNavigationScreen path=\"/revisions/:revisionId?\">\n\t\t\t\t\t\t<ScreenRevisions />\n\t\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t\t\t<GlobalStylesNavigationScreen path=\"/shadows\">\n\t\t\t\t\t\t<ScreenShadows />\n\t\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t\t\t<GlobalStylesNavigationScreen path=\"/shadows/edit/:category/:slug\">\n\t\t\t\t\t\t<ScreenShadowsEdit />\n\t\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t\t\t<GlobalStylesNavigationScreen path=\"/background\">\n\t\t\t\t\t\t<ScreenBackground />\n\t\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t\t\t<GlobalStylesNavigationScreen path=\"/typography/text\">\n\t\t\t\t\t\t<ScreenTypographyElement element=\"text\" />\n\t\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t\t\t<GlobalStylesNavigationScreen path=\"/typography/link\">\n\t\t\t\t\t\t<ScreenTypographyElement element=\"link\" />\n\t\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t\t\t<GlobalStylesNavigationScreen path=\"/typography/heading\">\n\t\t\t\t\t\t<ScreenTypographyElement element=\"heading\" />\n\t\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t\t\t<GlobalStylesNavigationScreen path=\"/typography/caption\">\n\t\t\t\t\t\t<ScreenTypographyElement element=\"caption\" />\n\t\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t\t\t<GlobalStylesNavigationScreen path=\"/typography/button\">\n\t\t\t\t\t\t<ScreenTypographyElement element=\"button\" />\n\t\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t\t\t<GlobalStylesNavigationScreen path=\"/blocks\">\n\t\t\t\t\t\t<ScreenBlockList />\n\t\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t\t\t{ blocks.map( ( block: BlockType ) => (\n\t\t\t\t\t\t<Fragment key={ block.name }>\n\t\t\t\t\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\t\t\t\t\tpath={\n\t\t\t\t\t\t\t\t\t'/blocks/' +\n\t\t\t\t\t\t\t\t\tencodeURIComponent( block.name )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<ScreenBlock name={ block.name } />\n\t\t\t\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t\t\t\t\t<ContextScreens\n\t\t\t\t\t\t\t\tname={ block.name }\n\t\t\t\t\t\t\t\tparentMenu={\n\t\t\t\t\t\t\t\t\t'/blocks/' +\n\t\t\t\t\t\t\t\t\tencodeURIComponent( block.name )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t) ) }\n\t\t\t\t</Navigator>\n\t\t\t</BlockEditorProvider>\n\t\t</GlobalStylesProvider>\n\t);\n}\n\nfunction GlobalStylesNavigationScreen( {\n\tpath,\n\tchildren,\n}: GlobalStylesNavigationScreenProps ) {\n\treturn (\n\t\t<Navigator.Screen\n\t\t\tclassName=\"global-styles-ui-sidebar__navigator-screen\"\n\t\t\tpath={ path }\n\t\t>\n\t\t\t{ children }\n\t\t</Navigator.Screen>\n\t);\n}\n\n/*\n * Component that handles path synchronization between external path prop and Navigator's internal path.\n */\nfunction PathSynchronizer( {\n\tpath,\n\tonPathChange,\n}: {\n\tpath?: string;\n\tonPathChange?: ( path: string ) => void;\n} ) {\n\tconst navigator = useNavigator();\n\tconst { path: childPath } = navigator.location;\n\tconst previousParentPath = usePrevious( path );\n\tconst previousChildPath = usePrevious( childPath );\n\n\tuseEffect( () => {\n\t\t// Only sync when parent and child paths are out of sync\n\t\tif ( path && path !== childPath ) {\n\t\t\t// If parent path changed, update the Navigator\n\t\t\tif ( path !== previousParentPath ) {\n\t\t\t\tnavigator.goTo( path );\n\t\t\t}\n\t\t\t// If child path changed, notify parent via onPathChange\n\t\t\telse if ( childPath !== previousChildPath && onPathChange ) {\n\t\t\t\tonPathChange( childPath ?? '/' );\n\t\t\t}\n\t\t}\n\t}, [\n\t\tonPathChange,\n\t\tpath,\n\t\tpreviousChildPath,\n\t\tpreviousParentPath,\n\t\tchildPath,\n\t\tnavigator,\n\t] );\n\n\t// This component only handles synchronization logic. It doesn't render anything.\n\t// We use it to run the effect inside the Navigator context.\n\treturn null;\n}\n", "/**\n * External dependencies\n */\nimport type { ReactNode } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport type { GlobalStylesConfig } from '@wordpress/global-styles-engine';\nimport { mergeGlobalStyles } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport { GlobalStylesContext } from './context';\n\ninterface GlobalStylesProviderProps {\n\tchildren: ReactNode;\n\tvalue: GlobalStylesConfig;\n\tbaseValue: GlobalStylesConfig;\n\tonChange: ( newValue: GlobalStylesConfig ) => void;\n\tfontLibraryEnabled?: boolean;\n}\n\nexport function GlobalStylesProvider( {\n\tchildren,\n\tvalue,\n\tbaseValue,\n\tonChange,\n\tfontLibraryEnabled,\n}: GlobalStylesProviderProps ) {\n\t// Compute merged with memoization since merging can be expensive\n\tconst merged = useMemo( () => {\n\t\treturn mergeGlobalStyles( baseValue, value );\n\t}, [ baseValue, value ] );\n\n\tconst contextValue = useMemo(\n\t\t() => ( {\n\t\t\tuser: value,\n\t\t\tbase: baseValue,\n\t\t\tmerged,\n\t\t\tonChange,\n\t\t\tfontLibraryEnabled,\n\t\t} ),\n\t\t[ value, baseValue, merged, onChange, fontLibraryEnabled ]\n\t);\n\n\treturn (\n\t\t<GlobalStylesContext.Provider value={ contextValue }>\n\t\t\t{ children }\n\t\t</GlobalStylesContext.Provider>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\nimport type { GlobalStylesConfig } from '@wordpress/global-styles-engine';\n\nexport interface GlobalStylesContextType {\n\tuser: GlobalStylesConfig;\n\tbase: GlobalStylesConfig;\n\tmerged: GlobalStylesConfig;\n\tonChange: ( newValue: GlobalStylesConfig ) => void;\n\tfontLibraryEnabled?: boolean;\n}\n\nexport const GlobalStylesContext = createContext< GlobalStylesContextType >( {\n\tuser: { styles: {}, settings: {} },\n\tbase: { styles: {}, settings: {} },\n\tmerged: { styles: {}, settings: {} },\n\tonChange: () => {},\n\tfontLibraryEnabled: false,\n} );\n", "/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalHStack as HStack,\n\t__experimentalSpacer as Spacer,\n\t__experimentalVStack as VStack,\n\tFlexItem,\n\tCardBody,\n\tCard,\n\tCardDivider,\n\tCardMedia,\n} from '@wordpress/components';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { chevronLeft, chevronRight } from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { IconWithCurrentColor } from './icon-with-current-color';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport RootMenu from './root-menu';\nimport PreviewStyles from './preview-styles';\n\nfunction ScreenRoot() {\n\tconst hasVariations = useSelect( ( select ) => {\n\t\tconst { __experimentalGetCurrentThemeGlobalStylesVariations } =\n\t\t\tselect( coreStore );\n\t\treturn !! __experimentalGetCurrentThemeGlobalStylesVariations()?.length;\n\t}, [] );\n\n\treturn (\n\t\t<Card\n\t\t\tsize=\"small\"\n\t\t\tisBorderless\n\t\t\tclassName=\"global-styles-ui-screen-root\"\n\t\t\tisRounded={ false }\n\t\t>\n\t\t\t<CardBody>\n\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t<Card className=\"global-styles-ui-screen-root__active-style-tile\">\n\t\t\t\t\t\t<CardMedia className=\"global-styles-ui-screen-root__active-style-tile-preview\">\n\t\t\t\t\t\t\t<PreviewStyles />\n\t\t\t\t\t\t</CardMedia>\n\t\t\t\t\t</Card>\n\t\t\t\t\t{ hasVariations && (\n\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t<NavigationButtonAsItem path=\"/variations\">\n\t\t\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Browse styles' ) }\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tisRTL() ? chevronLeft : chevronRight\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t) }\n\t\t\t\t\t<RootMenu />\n\t\t\t\t</VStack>\n\t\t\t</CardBody>\n\n\t\t\t<CardDivider />\n\n\t\t\t<CardBody>\n\t\t\t\t<Spacer\n\t\t\t\t\tas=\"p\"\n\t\t\t\t\tpaddingTop={ 2 }\n\t\t\t\t\tpaddingX=\"13px\"\n\t\t\t\t\tmarginBottom={ 4 }\n\t\t\t\t>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Customize the appearance of specific blocks for the whole site.'\n\t\t\t\t\t) }\n\t\t\t\t</Spacer>\n\t\t\t\t<ItemGroup>\n\t\t\t\t\t<NavigationButtonAsItem path=\"/blocks\">\n\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t<FlexItem>{ __( 'Blocks' ) }</FlexItem>\n\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\ticon={ isRTL() ? chevronLeft : chevronRight }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t</ItemGroup>\n\t\t\t</CardBody>\n\t\t</Card>\n\t);\n}\n\nexport default ScreenRoot;\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Icon } from '@wordpress/icons';\n\ninterface IconWithCurrentColorProps {\n\ticon: any;\n\tclassName?: string;\n\tsize?: number;\n\t[ key: string ]: any;\n}\n\nexport function IconWithCurrentColor( {\n\tclassName,\n\t...props\n}: IconWithCurrentColorProps ) {\n\treturn (\n\t\t<Icon\n\t\t\tclassName={ clsx(\n\t\t\t\tclassName,\n\t\t\t\t'global-styles-ui-icon-with-current-color'\n\t\t\t) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport {\n\tNavigator,\n\t__experimentalItem as Item,\n\tFlexItem,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { IconWithCurrentColor } from './icon-with-current-color';\n\ninterface GenericNavigationButtonProps {\n\ticon?: any;\n\tchildren: React.ReactNode;\n\t[ key: string ]: any;\n}\n\nfunction GenericNavigationButton( {\n\ticon,\n\tchildren,\n\t...props\n}: GenericNavigationButtonProps ) {\n\treturn (\n\t\t<Item { ...props }>\n\t\t\t{ icon && (\n\t\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t\t<IconWithCurrentColor icon={ icon } size={ 24 } />\n\t\t\t\t\t<FlexItem>{ children }</FlexItem>\n\t\t\t\t</HStack>\n\t\t\t) }\n\t\t\t{ ! icon && children }\n\t\t</Item>\n\t);\n}\n\ninterface NavigationButtonProps {\n\tpath: string;\n\ticon?: any;\n\tchildren: React.ReactNode;\n\t[ key: string ]: any;\n}\n\nexport function NavigationButtonAsItem( props: NavigationButtonProps ) {\n\treturn <Navigator.Button as={ GenericNavigationButton } { ...props } />;\n}\n\nexport function NavigationBackButtonAsItem( props: NavigationButtonProps ) {\n\treturn <Navigator.BackButton as={ GenericNavigationButton } { ...props } />;\n}\n", "/**\n * WordPress dependencies\n */\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\nimport {\n\tbackground,\n\ttypography,\n\tcolor,\n\tlayout,\n\tshadow as shadowIcon,\n} from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n// @ts-expect-error: Not typed yet.\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport type { GlobalStylesSettings } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport { NavigationButtonAsItem } from './navigation-button';\nimport { useSetting } from './hooks';\nimport { unlock } from './lock-unlock';\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasColorPanel,\n\tuseSettingsForBlockElement,\n\tuseHasBackgroundPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction RootMenu() {\n\t// Get the raw settings from our custom hook\n\tconst [ rawSettings ] = useSetting< GlobalStylesSettings >( '' );\n\n\t// Process settings the same way as Gutenberg\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\n\t// Use the same panel detection logic as Gutenberg\n\tconst hasBackgroundPanel = useHasBackgroundPanel( rawSettings );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasShadowPanel = true; // Same as Gutenberg\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasLayoutPanel = hasDimensionsPanel;\n\n\treturn (\n\t\t<>\n\t\t\t<ItemGroup>\n\t\t\t\t{ hasTypographyPanel && (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\ticon={ typography }\n\t\t\t\t\t\tpath=\"/typography\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Typography' ) }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t) }\n\t\t\t\t{ hasColorPanel && (\n\t\t\t\t\t<NavigationButtonAsItem icon={ color } path=\"/colors\">\n\t\t\t\t\t\t{ __( 'Colors' ) }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t) }\n\t\t\t\t{ hasBackgroundPanel && (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\ticon={ background }\n\t\t\t\t\t\tpath=\"/background\"\n\t\t\t\t\t\taria-label={ __( 'Background styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Background' ) }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t) }\n\t\t\t\t{ hasShadowPanel && (\n\t\t\t\t\t<NavigationButtonAsItem icon={ shadowIcon } path=\"/shadows\">\n\t\t\t\t\t\t{ __( 'Shadows' ) }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t) }\n\t\t\t\t{ hasLayoutPanel && (\n\t\t\t\t\t<NavigationButtonAsItem icon={ layout } path=\"/layout\">\n\t\t\t\t\t\t{ __( 'Layout' ) }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t) }\n\t\t\t</ItemGroup>\n\t\t</>\n\t);\n}\n\nexport default RootMenu;\n", "var o=function(o){var t=o/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},t=function(t){return.2126*o(t.r)+.7152*o(t.g)+.0722*o(t.b)};export default function(o){o.prototype.luminance=function(){return o=t(this.rgba),void 0===(r=2)&&(r=0),void 0===n&&(n=Math.pow(10,r)),Math.round(n*o)/n+0;var o,r,n},o.prototype.contrast=function(r){void 0===r&&(r=\"#FFF\");var n,a,i,e,v,u,d,c=r instanceof o?r:new o(r);return e=this.rgba,v=c.toRgb(),u=t(e),d=t(v),n=u>d?(u+.05)/(d+.05):(d+.05)/(u+.05),void 0===(a=2)&&(a=0),void 0===i&&(i=Math.pow(10,a)),Math.floor(i*n)/i+0},o.prototype.isReadable=function(o,t){return void 0===o&&(o=\"#FFF\"),void 0===t&&(t={}),this.contrast(o)>=(e=void 0===(i=(r=t).size)?\"normal\":i,\"AAA\"===(a=void 0===(n=r.level)?\"AA\":n)&&\"normal\"===e?7:\"AA\"===a&&\"large\"===e?3:4.5);var r,n,a,i,e}}\n", "/**\n * External dependencies\n */\nimport { colord, extend } from 'colord';\nimport a11yPlugin from 'colord/plugins/a11y';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useContext, useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tgetStyle,\n\tsetStyle,\n\tgetSetting,\n\tsetSetting,\n\tmergeGlobalStyles,\n} from '@wordpress/global-styles-engine';\nimport type { StyleVariation, Color } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport { GlobalStylesContext } from './context';\nimport { removePropertiesFromObject, isVariationWithProperties } from './utils';\n\n// Enable colord's a11y plugin.\nextend( [ a11yPlugin ] );\n\n/**\n * Hook to get and set style values with memoization.\n *\n * @param path The path to the style value.\n * @param blockName The name of the block, if applicable.\n * @param readFrom Which source to read from: \"base\" (theme), \"user\" (customizations), or \"merged\" (final result).\n * @param shouldDecodeEncode Whether to decode and encode the style value.\n * @return An array containing the style value and a function to set the style\n * value.\n *\n * @example\n * const [ color, setColor ] = useStyle<string>( 'color.text', 'core/button', 'merged' );\n */\nexport function useStyle< T = any >(\n\tpath: string,\n\tblockName?: string,\n\treadFrom: 'base' | 'user' | 'merged' = 'merged',\n\tshouldDecodeEncode: boolean = true\n) {\n\tconst { user, base, merged, onChange } = useContext( GlobalStylesContext );\n\n\tlet sourceValue = merged;\n\tif ( readFrom === 'base' ) {\n\t\tsourceValue = base;\n\t} else if ( readFrom === 'user' ) {\n\t\tsourceValue = user;\n\t}\n\n\tconst styleValue = useMemo(\n\t\t() => getStyle< T >( sourceValue, path, blockName, shouldDecodeEncode ),\n\t\t[ sourceValue, path, blockName, shouldDecodeEncode ]\n\t);\n\n\tconst setStyleValue = useCallback(\n\t\t( newValue: T | undefined ) => {\n\t\t\tconst newGlobalStyles = setStyle< T >(\n\t\t\t\tuser,\n\t\t\t\tpath,\n\t\t\t\tnewValue,\n\t\t\t\tblockName\n\t\t\t);\n\t\t\tonChange( newGlobalStyles );\n\t\t},\n\t\t[ user, onChange, path, blockName ]\n\t);\n\n\treturn [ styleValue, setStyleValue ] as const;\n}\n\n/**\n * Hook to get and set setting values with memoization.\n *\n * @param path The path to the setting value.\n * @param blockName The name of the block, if applicable.\n * @param readFrom Which source to read from: \"base\" (theme), \"user\" (customizations), or \"merged\" (final result).\n * @return An array containing the setting value and a function to set the\n * setting value.\n *\n * @example\n * const [ fontSize, setFontSize ] = useSetting<string>( 'fontSize', 'core/button', 'merged' );\n */\nexport function useSetting< T = any >(\n\tpath: string,\n\tblockName?: string,\n\treadFrom: 'base' | 'user' | 'merged' = 'merged'\n) {\n\tconst { user, base, merged, onChange } = useContext( GlobalStylesContext );\n\n\tlet sourceValue = merged;\n\tif ( readFrom === 'base' ) {\n\t\tsourceValue = base;\n\t} else if ( readFrom === 'user' ) {\n\t\tsourceValue = user;\n\t}\n\tconst settingValue = useMemo(\n\t\t() => getSetting< T >( sourceValue, path, blockName ),\n\t\t[ sourceValue, path, blockName ]\n\t);\n\n\tconst setSettingValue = useCallback(\n\t\t( newValue: T | undefined ) => {\n\t\t\tconst newGlobalStyles = setSetting< T >(\n\t\t\t\tuser,\n\t\t\t\tpath,\n\t\t\t\tnewValue,\n\t\t\t\tblockName\n\t\t\t);\n\t\t\tonChange( newGlobalStyles );\n\t\t},\n\t\t[ user, onChange, path, blockName ]\n\t);\n\n\treturn [ settingValue, setSettingValue ] as const;\n}\n\nconst EMPTY_ARRAY: StyleVariation[] = [];\n\n/**\n * Checks whether a style variation is empty.\n * @param root0\n * @param root0.title\n * @param root0.settings\n * @param root0.styles\n */\nfunction hasThemeVariation( {\n\ttitle,\n\tsettings,\n\tstyles,\n}: StyleVariation ): boolean {\n\treturn (\n\t\ttitle === __( 'Default' ) ||\n\t\tObject.keys( settings || {} ).length > 0 ||\n\t\tObject.keys( styles || {} ).length > 0\n\t);\n}\n\n/**\n * Fetches the current theme style variations that contain only the specified properties\n * and merges them with the user config.\n * @param properties\n */\nexport function useCurrentMergeThemeStyleVariationsWithUserConfig(\n\tproperties: string[] = []\n): StyleVariation[] {\n\tconst { variationsFromTheme } = useSelect( ( select ) => {\n\t\tconst _variationsFromTheme =\n\t\t\tselect(\n\t\t\t\tcoreStore\n\t\t\t).__experimentalGetCurrentThemeGlobalStylesVariations?.();\n\n\t\treturn {\n\t\t\tvariationsFromTheme: _variationsFromTheme || EMPTY_ARRAY,\n\t\t};\n\t}, [] );\n\n\tconst { user: userVariation } = useContext( GlobalStylesContext );\n\n\treturn useMemo( () => {\n\t\t// Create default variation from base, not user - this fixes the \"Default adapts\" issue\n\t\tconst clonedUserVariation = structuredClone( userVariation );\n\t\t// Get user variation and remove the settings for the given property.\n\t\tconst userVariationWithoutProperties = removePropertiesFromObject(\n\t\t\tclonedUserVariation,\n\t\t\tproperties\n\t\t);\n\t\tuserVariationWithoutProperties.title = __( 'Default' );\n\n\t\tconst variationsWithPropertiesAndBase = (\n\t\t\tvariationsFromTheme as StyleVariation[]\n\t\t )\n\t\t\t.filter( ( variation: StyleVariation ) => {\n\t\t\t\treturn isVariationWithProperties( variation, properties );\n\t\t\t} )\n\t\t\t.map( ( variation: StyleVariation ) => {\n\t\t\t\treturn mergeGlobalStyles(\n\t\t\t\t\tuserVariationWithoutProperties,\n\t\t\t\t\tvariation\n\t\t\t\t);\n\t\t\t} );\n\n\t\tconst variationsByProperties = [\n\t\t\tuserVariationWithoutProperties,\n\t\t\t...variationsWithPropertiesAndBase,\n\t\t];\n\n\t\treturn variationsByProperties?.length\n\t\t\t? variationsByProperties.filter( hasThemeVariation )\n\t\t\t: [];\n\t}, [ properties, userVariation, variationsFromTheme ] );\n}\n\nconst propertiesToFilter = [ 'color' ];\n\n/**\n * Hook to get color variations using the full Gutenberg implementation.\n */\nexport function useColorVariations(): StyleVariation[] {\n\treturn useCurrentMergeThemeStyleVariationsWithUserConfig(\n\t\tpropertiesToFilter\n\t);\n}\n\n/**\n * Hook to randomize theme colors using color rotation.\n *\n * @param blockName The name of the block, if applicable.\n * @return Array containing the randomize function if feature is enabled, empty array otherwise.\n */\nexport function useColorRandomizer( blockName?: string ): [ () => void ] | [] {\n\tconst [ themeColors, setThemeColors ] = useSetting< Color[] >(\n\t\t'color.palette.theme',\n\t\tblockName\n\t);\n\n\tconst randomizeColors = useCallback( () => {\n\t\tif ( ! themeColors || ! themeColors.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst randomRotationValue = Math.floor( Math.random() * 225 );\n\n\t\tconst newColors = themeColors.map( ( colorObject ) => {\n\t\t\tconst { color } = colorObject;\n\t\t\tconst newColor = colord( color )\n\t\t\t\t.rotate( randomRotationValue )\n\t\t\t\t.toHex();\n\n\t\t\treturn {\n\t\t\t\t...colorObject,\n\t\t\t\tcolor: newColor,\n\t\t\t};\n\t\t} );\n\n\t\tsetThemeColors( newColors );\n\t}, [ themeColors, setThemeColors ] );\n\n\treturn ( window as any ).__experimentalEnableColorRandomizer\n\t\t? [ randomizeColors ]\n\t\t: [];\n}\n", "/**\n * WordPress dependencies\n */\nimport { areGlobalStylesEqual } from '@wordpress/global-styles-engine';\nimport type { GlobalStylesConfig } from '@wordpress/global-styles-engine';\n\n/**\n * Removes all instances of properties from an object.\n *\n * @param object The object to remove the properties from.\n * @param properties The properties to remove.\n * @return The modified object.\n */\nexport function removePropertiesFromObject(\n\tobject: any,\n\tproperties: string[]\n): any {\n\tif ( ! properties?.length ) {\n\t\treturn object;\n\t}\n\n\tif (\n\t\ttypeof object !== 'object' ||\n\t\t! object ||\n\t\t! Object.keys( object ).length\n\t) {\n\t\treturn object;\n\t}\n\n\tfor ( const key in object ) {\n\t\tif ( properties.includes( key ) ) {\n\t\t\tdelete object[ key ];\n\t\t} else if ( typeof object[ key ] === 'object' ) {\n\t\t\tremovePropertiesFromObject( object[ key ], properties );\n\t\t}\n\t}\n\treturn object;\n}\n\n/**\n * Returns a new object, with properties specified in `properties` array.,\n * maintain the original object tree structure.\n * The function is recursive, so it will perform a deep search for the given properties.\n * E.g., the function will return `{ a: { b: { c: { test: 1 } } } }` if the properties are `[ 'test' ]`.\n *\n * @param object The object to filter\n * @param properties The properties to filter by\n * @return The merged object.\n */\nexport const filterObjectByProperties = (\n\tobject: any,\n\tproperties: string[]\n): any => {\n\tif ( ! object || ! properties?.length ) {\n\t\treturn {};\n\t}\n\n\tconst newObject: any = {};\n\tObject.keys( object ).forEach( ( key ) => {\n\t\tif ( properties.includes( key ) ) {\n\t\t\tnewObject[ key ] = object[ key ];\n\t\t} else if ( typeof object[ key ] === 'object' ) {\n\t\t\tconst newFilter = filterObjectByProperties(\n\t\t\t\tobject[ key ],\n\t\t\t\tproperties\n\t\t\t);\n\t\t\tif ( Object.keys( newFilter ).length ) {\n\t\t\t\tnewObject[ key ] = newFilter;\n\t\t\t}\n\t\t}\n\t} );\n\treturn newObject;\n};\n\n/**\n * Compares a style variation to the same variation filtered by the specified properties.\n * Returns true if the variation contains only the properties specified.\n *\n * @param variation The variation to compare.\n * @param properties The properties to compare.\n * @return Whether the variation contains only the specified properties.\n */\nexport function isVariationWithProperties(\n\tvariation: GlobalStylesConfig,\n\tproperties: string[]\n): boolean {\n\tconst variationWithProperties = filterObjectByProperties(\n\t\tstructuredClone( variation ),\n\t\tproperties\n\t);\n\n\treturn areGlobalStylesEqual( variationWithProperties, variation );\n}\n\nfunction getFontFamilyFromSetting( fontFamilies: any[], setting: string ): any {\n\tif ( ! Array.isArray( fontFamilies ) || ! setting ) {\n\t\treturn null;\n\t}\n\n\tconst fontFamilyVariable = setting.replace( 'var(', '' ).replace( ')', '' );\n\tconst fontFamilySlug = fontFamilyVariable?.split( '--' ).slice( -1 )[ 0 ];\n\n\treturn fontFamilies.find(\n\t\t( fontFamily ) => fontFamily.slug === fontFamilySlug\n\t);\n}\n\n/**\n * Extracts font families from a theme JSON configuration.\n *\n * @param themeJson The theme JSON configuration\n * @return Array containing [bodyFontFamily, headingFontFamily]\n */\nexport function getFontFamilies( themeJson: any ): [ any, any ] {\n\tconst themeFontFamilies =\n\t\tthemeJson?.settings?.typography?.fontFamilies?.theme;\n\tconst customFontFamilies =\n\t\tthemeJson?.settings?.typography?.fontFamilies?.custom;\n\n\tlet fontFamilies: any[] = [];\n\tif ( themeFontFamilies && customFontFamilies ) {\n\t\tfontFamilies = [ ...themeFontFamilies, ...customFontFamilies ];\n\t} else if ( themeFontFamilies ) {\n\t\tfontFamilies = themeFontFamilies;\n\t} else if ( customFontFamilies ) {\n\t\tfontFamilies = customFontFamilies;\n\t}\n\tconst bodyFontFamilySetting = themeJson?.styles?.typography?.fontFamily;\n\tconst bodyFontFamily = getFontFamilyFromSetting(\n\t\tfontFamilies,\n\t\tbodyFontFamilySetting\n\t);\n\n\tconst headingFontFamilySetting =\n\t\tthemeJson?.styles?.elements?.heading?.typography?.fontFamily;\n\n\tlet headingFontFamily;\n\tif ( ! headingFontFamilySetting ) {\n\t\theadingFontFamily = bodyFontFamily;\n\t} else {\n\t\theadingFontFamily = getFontFamilyFromSetting(\n\t\t\tfontFamilies,\n\t\t\tthemeJson?.styles?.elements?.heading?.typography?.fontFamily\n\t\t);\n\t}\n\n\treturn [ bodyFontFamily, headingFontFamily ];\n}\n\nfunction findNearest( input: number, numbers: number[] ): number | null {\n\t// If the numbers array is empty, return null\n\tif ( numbers.length === 0 ) {\n\t\treturn null;\n\t}\n\t// Sort the array based on the absolute difference with the input\n\tnumbers.sort( ( a, b ) => Math.abs( input - a ) - Math.abs( input - b ) );\n\t// Return the first element (which will be the nearest) from the sorted array\n\treturn numbers[ 0 ];\n}\n\nfunction extractFontWeights( fontFaces: any[] ): number[] {\n\tconst result: number[] = [];\n\n\tfontFaces.forEach( ( face ) => {\n\t\tconst weights = String( face.fontWeight ).split( ' ' );\n\n\t\tif ( weights.length === 2 ) {\n\t\t\tconst start = parseInt( weights[ 0 ] );\n\t\t\tconst end = parseInt( weights[ 1 ] );\n\n\t\t\tfor ( let i = start; i <= end; i += 100 ) {\n\t\t\t\tresult.push( i );\n\t\t\t}\n\t\t} else if ( weights.length === 1 ) {\n\t\t\tresult.push( parseInt( weights[ 0 ] ) );\n\t\t}\n\t} );\n\n\treturn result;\n}\n\n/*\n * Format the font family to use in the CSS font-family property of a CSS rule.\n *\n * The input can be a string with the font family name or a string with multiple font family names separated by commas.\n * It follows the recommendations from the CSS Fonts Module Level 4.\n * https://www.w3.org/TR/css-fonts-4/#font-family-prop\n *\n * @param input - The font family.\n * @return The formatted font family.\n */\nexport function formatFontFamily( input: string ): string {\n\t// Matches strings that are not exclusively alphabetic characters or hyphens, and do not exactly follow the pattern generic(alphabetic characters or hyphens).\n\tconst regex = /^(?!generic\\([ a-zA-Z\\-]+\\)$)(?!^[a-zA-Z\\-]+$).+/;\n\tconst output = input.trim();\n\n\tconst formatItem = ( item: string ) => {\n\t\titem = item.trim();\n\t\tif ( item.match( regex ) ) {\n\t\t\t// removes leading and trailing quotes.\n\t\t\titem = item.replace( /^[\"']|[\"']$/g, '' );\n\t\t\treturn `\"${ item }\"`;\n\t\t}\n\t\treturn item;\n\t};\n\n\tif ( output.includes( ',' ) ) {\n\t\treturn output\n\t\t\t.split( ',' )\n\t\t\t.map( formatItem )\n\t\t\t.filter( ( item ) => item !== '' )\n\t\t\t.join( ', ' );\n\t}\n\n\treturn formatItem( output );\n}\n\n/**\n * Gets the preview style for a font family.\n *\n * @param family The font family object\n * @return CSS style object for the font family\n */\nexport function getFamilyPreviewStyle( family: any ): React.CSSProperties {\n\tconst style: React.CSSProperties = {\n\t\tfontFamily: formatFontFamily( family.fontFamily ),\n\t};\n\n\tif ( ! Array.isArray( family.fontFace ) ) {\n\t\tstyle.fontWeight = '400';\n\t\tstyle.fontStyle = 'normal';\n\t\treturn style;\n\t}\n\n\tif ( family.fontFace ) {\n\t\t//get all the font faces with normal style\n\t\tconst normalFaces = family.fontFace.filter(\n\t\t\t( face: any ) =>\n\t\t\t\tface?.fontStyle && face.fontStyle.toLowerCase() === 'normal'\n\t\t);\n\t\tif ( normalFaces.length > 0 ) {\n\t\t\tstyle.fontStyle = 'normal';\n\t\t\tconst normalWeights = extractFontWeights( normalFaces );\n\t\t\tconst nearestWeight = findNearest( 400, normalWeights );\n\t\t\tstyle.fontWeight = String( nearestWeight ) || '400';\n\t\t} else {\n\t\t\tstyle.fontStyle =\n\t\t\t\t( family.fontFace.length && family.fontFace[ 0 ].fontStyle ) ||\n\t\t\t\t'normal';\n\t\t\tstyle.fontWeight =\n\t\t\t\t( family.fontFace.length &&\n\t\t\t\t\tString( family.fontFace[ 0 ].fontWeight ) ) ||\n\t\t\t\t'400';\n\t\t}\n\t}\n\n\treturn style;\n}\n\n/**\n * Iterates through the presets array and searches for slugs that start with the specified\n * slugPrefix followed by a numerical suffix. It identifies the highest numerical suffix found\n * and returns one greater than the highest found suffix, ensuring that the new index is unique.\n *\n * @param presets The array of preset objects, each potentially containing a slug property.\n * @param slugPrefix The prefix to look for in the preset slugs.\n *\n * @return The next available index for a preset with the specified slug prefix, or 1 if no matching slugs are found.\n */\n/**\n * Gets the variation class name for a block style variation.\n *\n * @param variation The variation name.\n * @return The variation class name.\n */\nexport function getVariationClassName( variation: string ): string {\n\tif ( ! variation ) {\n\t\treturn '';\n\t}\n\treturn `is-style-${ variation }`;\n}\n\nexport function getNewIndexFromPresets(\n\tpresets: any[],\n\tslugPrefix: string\n): number {\n\tconst nameRegex = new RegExp( `^${ slugPrefix }([\\\\d]+)$` );\n\tconst highestPresetValue = presets.reduce( ( currentHighest, preset ) => {\n\t\tif ( typeof preset?.slug === 'string' ) {\n\t\t\tconst matches = preset?.slug.match( nameRegex );\n\t\t\tif ( matches ) {\n\t\t\t\tconst id = parseInt( matches[ 1 ], 10 );\n\t\t\t\tif ( id > currentHighest ) {\n\t\t\t\t\treturn id;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn currentHighest;\n\t}, 0 );\n\treturn highestPresetValue + 1;\n}\n", "/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',\n\t\t'@wordpress/global-styles-ui'\n\t);\n", "/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { useStyle } from './hooks';\nimport { useStylesPreviewColors } from './preview-hooks';\nimport TypographyExample from './typography-example';\nimport HighlightedColors from './highlighted-colors';\nimport PreviewWrapper from './preview-wrapper';\n\nconst firstFrameVariants = {\n\tstart: {\n\t\tscale: 1,\n\t\topacity: 1,\n\t},\n\thover: {\n\t\tscale: 0,\n\t\topacity: 0,\n\t},\n};\n\nconst midFrameVariants = {\n\thover: {\n\t\topacity: 1,\n\t},\n\tstart: {\n\t\topacity: 0.5,\n\t},\n};\n\nconst secondFrameVariants = {\n\thover: {\n\t\tscale: 1,\n\t\topacity: 1,\n\t},\n\tstart: {\n\t\tscale: 0,\n\t\topacity: 0,\n\t},\n};\n\ninterface PreviewStylesProps {\n\tlabel?: string;\n\tisFocused?: boolean;\n\twithHoverView?: boolean;\n\tvariation?: any;\n}\n\nfunction PreviewStyles( {\n\tlabel,\n\tisFocused,\n\twithHoverView,\n\tvariation,\n}: PreviewStylesProps ) {\n\tconst [ fontWeight ] = useStyle< string >( 'typography.fontWeight' );\n\tconst [ fontFamily = 'serif' ] = useStyle< string >(\n\t\t'typography.fontFamily'\n\t);\n\tconst [ headingFontFamily = fontFamily ] = useStyle< string >(\n\t\t'elements.h1.typography.fontFamily'\n\t);\n\tconst [ headingFontWeight = fontWeight ] = useStyle< string >(\n\t\t'elements.h1.typography.fontWeight'\n\t);\n\tconst [ textColor = 'black' ] = useStyle< string >( 'color.text' );\n\tconst [ headingColor = textColor ] = useStyle< string >(\n\t\t'elements.h1.color.text'\n\t);\n\n\tconst { paletteColors } = useStylesPreviewColors();\n\n\treturn (\n\t\t<PreviewWrapper\n\t\t\tlabel={ label }\n\t\t\tisFocused={ isFocused }\n\t\t\twithHoverView={ withHoverView }\n\t\t>\n\t\t\t{ ( { ratio, key } ) => (\n\t\t\t\t<motion.div\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tvariants={ firstFrameVariants }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\tspacing={ 10 * ratio }\n\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<TypographyExample\n\t\t\t\t\t\t\tfontSize={ 65 * ratio }\n\t\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<VStack spacing={ 4 * ratio }>\n\t\t\t\t\t\t\t<HighlightedColors\n\t\t\t\t\t\t\t\tnormalizedColorSwatchSize={ 32 }\n\t\t\t\t\t\t\t\tratio={ ratio }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t</HStack>\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t\t{ ( { key } ) => (\n\t\t\t\t<motion.div\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tvariants={ withHoverView ? midFrameVariants : undefined }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\tfilter: 'blur(60px)',\n\t\t\t\t\t\topacity: 0.1,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ paletteColors\n\t\t\t\t\t\t\t.slice( 0, 4 )\n\t\t\t\t\t\t\t.map( ( { color }, index ) => (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\t\tbackground: color,\n\t\t\t\t\t\t\t\t\t\tflexGrow: 1,\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t</HStack>\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t\t{ ( { ratio, key } ) => (\n\t\t\t\t<motion.div\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tvariants={ secondFrameVariants }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<VStack\n\t\t\t\t\t\tspacing={ 3 * ratio }\n\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\tpadding: 10 * ratio,\n\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ label && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\tfontSize: 40 * ratio,\n\t\t\t\t\t\t\t\t\tfontFamily: headingFontFamily,\n\t\t\t\t\t\t\t\t\tcolor: headingColor,\n\t\t\t\t\t\t\t\t\tfontWeight: headingFontWeight,\n\t\t\t\t\t\t\t\t\tlineHeight: '1em',\n\t\t\t\t\t\t\t\t\ttextAlign: 'center',\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</VStack>\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t</PreviewWrapper>\n\t);\n}\n\nexport default PreviewStyles;\n", "/**\n * WordPress dependencies\n */\nimport type { Color } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport { useSetting, useStyle } from './hooks';\n\nexport function useStylesPreviewColors(): {\n\tpaletteColors: Color[];\n\thighlightedColors: Color[];\n} {\n\tconst [ textColor = 'black' ] = useStyle< string >( 'color.text' );\n\tconst [ backgroundColor = 'white' ] =\n\t\tuseStyle< string >( 'color.background' );\n\tconst [ headingColor = textColor ] = useStyle< string >(\n\t\t'elements.h1.color.text'\n\t);\n\tconst [ linkColor = headingColor ] = useStyle< string >(\n\t\t'elements.link.color.text'\n\t);\n\tconst [ buttonBackgroundColor = linkColor ] = useStyle< string >(\n\t\t'elements.button.color.background'\n\t);\n\n\tconst [ coreColors ] = useSetting< Color[] >( 'color.palette.core' ) || [];\n\tconst [ themeColors ] =\n\t\tuseSetting< Color[] >( 'color.palette.theme' ) || [];\n\tconst [ customColors ] =\n\t\tuseSetting< Color[] >( 'color.palette.custom' ) || [];\n\n\tconst paletteColors: Color[] = ( themeColors ?? [] )\n\t\t.concat( customColors ?? [] )\n\t\t.concat( coreColors ?? [] );\n\n\tconst textColorObject = paletteColors.filter(\n\t\t( { color } ) => color === textColor\n\t);\n\tconst buttonBackgroundColorObject = paletteColors.filter(\n\t\t( { color } ) => color === buttonBackgroundColor\n\t);\n\n\tconst highlightedColors = textColorObject\n\t\t.concat( buttonBackgroundColorObject )\n\t\t.concat( paletteColors )\n\t\t.filter(\n\t\t\t// we exclude these background color because it is already visible in the preview.\n\t\t\t( { color } ) => color !== backgroundColor\n\t\t)\n\t\t.slice( 0, 2 );\n\n\treturn {\n\t\tpaletteColors,\n\t\thighlightedColors,\n\t};\n}\n", "/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport { __unstableMotion as motion } from '@wordpress/components';\nimport { _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { GlobalStylesContext } from './context';\nimport { getFamilyPreviewStyle } from './font-library/utils/preview-styles';\nimport { getFontFamilies } from './utils';\nimport { useStyle } from './hooks';\n\ninterface TypographyExampleProps {\n\tfontSize?: number;\n\tvariation?: any;\n}\n\nexport default function PreviewTypography( {\n\tfontSize,\n\tvariation,\n}: TypographyExampleProps ) {\n\tconst { base } = useContext( GlobalStylesContext );\n\tlet config = base;\n\tif ( variation ) {\n\t\tconfig = { ...base, ...variation };\n\t}\n\n\tconst [ textColor ] = useStyle( 'color.text' );\n\n\tconst [ bodyFontFamilies, headingFontFamilies ] = getFontFamilies( config );\n\tconst bodyPreviewStyle: React.CSSProperties = bodyFontFamilies\n\t\t? getFamilyPreviewStyle( bodyFontFamilies )\n\t\t: {};\n\tconst headingPreviewStyle: React.CSSProperties = headingFontFamilies\n\t\t? getFamilyPreviewStyle( headingFontFamilies )\n\t\t: {};\n\n\tif ( textColor ) {\n\t\tbodyPreviewStyle.color = textColor;\n\t\theadingPreviewStyle.color = textColor;\n\t}\n\n\tif ( fontSize ) {\n\t\tbodyPreviewStyle.fontSize = fontSize;\n\t\theadingPreviewStyle.fontSize = fontSize;\n\t}\n\n\treturn (\n\t\t<motion.div\n\t\t\tanimate={ {\n\t\t\t\tscale: 1,\n\t\t\t\topacity: 1,\n\t\t\t} }\n\t\t\tinitial={ {\n\t\t\t\tscale: 0.1,\n\t\t\t\topacity: 0,\n\t\t\t} }\n\t\t\ttransition={ {\n\t\t\t\tdelay: 0.3,\n\t\t\t\ttype: 'tween',\n\t\t\t} }\n\t\t\tstyle={ {\n\t\t\t\ttextAlign: 'center',\n\t\t\t\tlineHeight: 1,\n\t\t\t} }\n\t\t>\n\t\t\t<span style={ headingPreviewStyle }>\n\t\t\t\t{ _x( 'A', 'Uppercase letter A' ) }\n\t\t\t</span>\n\t\t\t<span style={ bodyPreviewStyle }>\n\t\t\t\t{ _x( 'a', 'Lowercase letter A' ) }\n\t\t\t</span>\n\t\t</motion.div>\n\t);\n}\n", "/**\n * External dependencies\n */\nimport type { CSSProperties } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport type { FontFace, FontFamily } from '@wordpress/core-data';\n\nfunction findNearest( input: number, numbers: number[] ) {\n\t// If the numbers array is empty, return null\n\tif ( numbers.length === 0 ) {\n\t\treturn null;\n\t}\n\t// Sort the array based on the absolute difference with the input\n\tnumbers.sort( ( a, b ) => Math.abs( input - a ) - Math.abs( input - b ) );\n\t// Return the first element (which will be the nearest) from the sorted array\n\treturn numbers[ 0 ];\n}\n\nfunction extractFontWeights( fontFaces: FontFace[] ): number[] {\n\tconst result: number[] = [];\n\n\tfontFaces.forEach( ( face ) => {\n\t\tconst weights = String( face.fontWeight ).split( ' ' );\n\n\t\tif ( weights.length === 2 ) {\n\t\t\tconst start = parseInt( weights[ 0 ] );\n\t\t\tconst end = parseInt( weights[ 1 ] );\n\n\t\t\tfor ( let i = start; i <= end; i += 100 ) {\n\t\t\t\tresult.push( i );\n\t\t\t}\n\t\t} else if ( weights.length === 1 ) {\n\t\t\tresult.push( parseInt( weights[ 0 ] ) );\n\t\t}\n\t} );\n\n\treturn result;\n}\n\n/*\n * Format the font family to use in the CSS font-family property of a CSS rule.\n *\n * The input can be a string with the font family name or a string with multiple font family names separated by commas.\n * It follows the recommendations from the CSS Fonts Module Level 4.\n * https://www.w3.org/TR/css-fonts-4/#font-family-prop\n *\n * @param {string} input - The font family.\n * @return {string} The formatted font family.\n *\n * Example:\n * formatFontFamily( \"Open Sans, Font+Name, sans-serif\" ) => '\"Open Sans\", \"Font+Name\", sans-serif'\n * formatFontFamily( \"'Open Sans', generic(kai), sans-serif\" ) => '\"Open Sans\", sans-serif'\n * formatFontFamily( \"DotGothic16, Slabo 27px, serif\" ) => '\"DotGothic16\",\"Slabo 27px\",serif'\n * formatFontFamily( \"Mine's, Moe's Typography\" ) => `\"mine's\",\"Moe's Typography\"`\n */\nexport function formatFontFamily( input: string ) {\n\t// Matches strings that are not exclusively alphabetic characters or hyphens, and do not exactly follow the pattern generic(alphabetic characters or hyphens).\n\tconst regex = /^(?!generic\\([ a-zA-Z\\-]+\\)$)(?!^[a-zA-Z\\-]+$).+/;\n\tconst output = input.trim();\n\n\tconst formatItem = ( item: string ) => {\n\t\titem = item.trim();\n\t\tif ( item.match( regex ) ) {\n\t\t\t// removes leading and trailing quotes.\n\t\t\titem = item.replace( /^[\"']|[\"']$/g, '' );\n\t\t\treturn `\"${ item }\"`;\n\t\t}\n\t\treturn item;\n\t};\n\n\tif ( output.includes( ',' ) ) {\n\t\treturn output\n\t\t\t.split( ',' )\n\t\t\t.map( formatItem )\n\t\t\t.filter( ( item ) => item !== '' )\n\t\t\t.join( ', ' );\n\t}\n\n\treturn formatItem( output );\n}\n\n/*\n * Format the font face name to use in the font-family property of a font face.\n *\n * The input can be a string with the font face name or a string with multiple font face names separated by commas.\n * It removes the leading and trailing quotes from the font face name.\n *\n * @param {string} input - The font face name.\n * @return {string} The formatted font face name.\n *\n * Example:\n * formatFontFaceName(\"Open Sans\") => \"Open Sans\"\n * formatFontFaceName(\"'Open Sans', sans-serif\") => \"Open Sans\"\n * formatFontFaceName(\", 'Open Sans', 'Helvetica Neue', sans-serif\") => \"Open Sans\"\n */\nexport function formatFontFaceName( input: string ) {\n\tif ( ! input ) {\n\t\treturn '';\n\t}\n\n\tlet output = input.trim();\n\tif ( output.includes( ',' ) ) {\n\t\toutput = (\n\t\t\toutput\n\t\t\t\t.split( ',' )\n\t\t\t\t// finds the first item that is not an empty string.\n\t\t\t\t.find( ( item ) => item.trim() !== '' ) ?? ''\n\t\t).trim();\n\t}\n\t// removes leading and trailing quotes.\n\toutput = output.replace( /^[\"']|[\"']$/g, '' );\n\n\t// Firefox needs the font name to be wrapped in double quotes meanwhile other browsers don't.\n\tif ( window.navigator.userAgent.toLowerCase().includes( 'firefox' ) ) {\n\t\toutput = `\"${ output }\"`;\n\t}\n\treturn output;\n}\n\nexport function getFamilyPreviewStyle(\n\tfamily: FontFamily | FontFace\n): CSSProperties {\n\tconst style: CSSProperties = {\n\t\tfontFamily: formatFontFamily( family.fontFamily ),\n\t};\n\n\tif ( ! ( 'fontFace' in family ) || ! Array.isArray( family.fontFace ) ) {\n\t\tstyle.fontWeight = '400';\n\t\tstyle.fontStyle = 'normal';\n\t\treturn style;\n\t}\n\n\tif ( family.fontFace ) {\n\t\t//get all the font faces with normal style\n\t\tconst normalFaces = family.fontFace.filter(\n\t\t\t( face ) =>\n\t\t\t\tface?.fontStyle && face.fontStyle.toLowerCase() === 'normal'\n\t\t);\n\t\tif ( normalFaces.length > 0 ) {\n\t\t\tstyle.fontStyle = 'normal';\n\t\t\tconst normalWeights = extractFontWeights( normalFaces );\n\t\t\tconst nearestWeight = findNearest( 400, normalWeights );\n\t\t\tstyle.fontWeight = String( nearestWeight ) || '400';\n\t\t} else {\n\t\t\tstyle.fontStyle =\n\t\t\t\t( family.fontFace.length && family.fontFace[ 0 ].fontStyle ) ||\n\t\t\t\t'normal';\n\t\t\tstyle.fontWeight =\n\t\t\t\t( family.fontFace.length &&\n\t\t\t\t\tString( family.fontFace[ 0 ].fontWeight ) ) ||\n\t\t\t\t'400';\n\t\t}\n\t}\n\n\treturn style;\n}\n\nexport function getFacePreviewStyle( face: FontFace ): CSSProperties {\n\treturn {\n\t\tfontFamily: formatFontFamily( face.fontFamily ),\n\t\tfontStyle: face.fontStyle || 'normal',\n\t\tfontWeight: face.fontWeight || '400',\n\t};\n}\n", "/**\n * WordPress dependencies\n */\nimport { __unstableMotion as motion } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { useStylesPreviewColors } from './preview-hooks';\n\ninterface HighlightedColorsProps {\n\tnormalizedColorSwatchSize: number;\n\tratio: number;\n}\n\nexport default function HighlightedColors( {\n\tnormalizedColorSwatchSize,\n\tratio,\n}: HighlightedColorsProps ) {\n\tconst { highlightedColors } = useStylesPreviewColors();\n\tconst scaledSwatchSize = normalizedColorSwatchSize * ratio;\n\treturn highlightedColors.map( ( { slug, color }, index ) => (\n\t\t<motion.div\n\t\t\tkey={ `${ slug }-${ index }` }\n\t\t\tstyle={ {\n\t\t\t\theight: scaledSwatchSize,\n\t\t\t\twidth: scaledSwatchSize,\n\t\t\t\tbackground: color,\n\t\t\t\tborderRadius: scaledSwatchSize / 2,\n\t\t\t} }\n\t\t\tanimate={ {\n\t\t\t\tscale: 1,\n\t\t\t\topacity: 1,\n\t\t\t} }\n\t\t\tinitial={ {\n\t\t\t\tscale: 0.1,\n\t\t\t\topacity: 0,\n\t\t\t} }\n\t\t\ttransition={ {\n\t\t\t\tdelay: index === 1 ? 0.2 : 0.1,\n\t\t\t} }\n\t\t/>\n\t) );\n}\n", "/**\n * WordPress dependencies\n */\nimport { __unstableMotion as motion } from '@wordpress/components';\nimport {\n\tuseThrottle,\n\tuseReducedMotion,\n\tuseResizeObserver,\n} from '@wordpress/compose';\nimport { useLayoutEffect, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useStyle } from './hooks';\n\nconst normalizedWidth = 248;\nconst normalizedHeight = 152;\n\n// Throttle options for useThrottle. Must be defined outside of the component,\n// so that the object reference is the same on each render.\nconst THROTTLE_OPTIONS = {\n\tleading: true,\n\ttrailing: true,\n};\n\ninterface PreviewWrapperProps {\n\tchildren:\n\t\t| ( ( args: { ratio: number; key: number } ) => React.ReactNode )\n\t\t| ( ( args: { ratio: number; key: number } ) => React.ReactNode )[];\n\tlabel?: string;\n\tisFocused?: boolean;\n\twithHoverView?: boolean;\n}\n\nfunction PreviewWrapper( {\n\tchildren,\n\tlabel,\n\tisFocused,\n\twithHoverView,\n}: PreviewWrapperProps ) {\n\tconst [ backgroundColor = 'white' ] =\n\t\tuseStyle< string >( 'color.background' );\n\tconst [ gradientValue ] = useStyle< string >( 'color.gradient' );\n\tconst disableMotion = useReducedMotion();\n\tconst [ isHovered, setIsHovered ] = useState( false );\n\tconst [ containerResizeListener, { width } ] = useResizeObserver();\n\tconst [ throttledWidth, setThrottledWidthState ] = useState( width );\n\tconst [ ratioState, setRatioState ] = useState< number | undefined >();\n\n\tconst setThrottledWidth = useThrottle(\n\t\tsetThrottledWidthState,\n\t\t250,\n\t\tTHROTTLE_OPTIONS\n\t);\n\n\t// Must use useLayoutEffect to avoid a flash of the container at the wrong\n\t// size before the width is set.\n\tuseLayoutEffect( () => {\n\t\tif ( width ) {\n\t\t\tsetThrottledWidth( width );\n\t\t}\n\t}, [ width, setThrottledWidth ] );\n\n\t// Must use useLayoutEffect to avoid a flash of the container at the wrong\n\t// size before the width is set.\n\tuseLayoutEffect( () => {\n\t\tconst newRatio = throttledWidth ? throttledWidth / normalizedWidth : 1;\n\t\tconst ratioDiff = newRatio - ( ratioState || 0 );\n\n\t\t// Only update the ratio state if the difference is big enough\n\t\t// or if the ratio state is not yet set. This is to avoid an\n\t\t// endless loop of updates at particular viewport heights when the\n\t\t// presence of a scrollbar causes the width to change slightly.\n\t\tconst isRatioDiffBigEnough = Math.abs( ratioDiff ) > 0.1;\n\n\t\tif ( isRatioDiffBigEnough || ! ratioState ) {\n\t\t\tsetRatioState( newRatio );\n\t\t}\n\t}, [ throttledWidth, ratioState ] );\n\n\t// Set a fallbackRatio to use before the throttled ratio has been set.\n\tconst fallbackRatio = width ? width / normalizedWidth : 1;\n\t/*\n\t * Use the throttled ratio if it has been calculated, otherwise\n\t * use the fallback ratio. The throttled ratio is used to avoid\n\t * an endless loop of updates at particular viewport heights.\n\t * See: https://github.com/WordPress/gutenberg/issues/55112\n\t */\n\tconst ratio = ratioState ? ratioState : fallbackRatio;\n\n\tconst isReady = !! width;\n\n\treturn (\n\t\t<>\n\t\t\t<div style={ { position: 'relative' } }>\n\t\t\t\t{ containerResizeListener }\n\t\t\t</div>\n\t\t\t{ isReady && (\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"global-styles-ui-preview__wrapper\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: normalizedHeight * ratio,\n\t\t\t\t\t} }\n\t\t\t\t\tonMouseEnter={ () => setIsHovered( true ) }\n\t\t\t\t\tonMouseLeave={ () => setIsHovered( false ) }\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t>\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: normalizedHeight * ratio,\n\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\tbackground: gradientValue ?? backgroundColor,\n\t\t\t\t\t\t\tcursor: withHoverView ? 'pointer' : undefined,\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tinitial=\"start\"\n\t\t\t\t\t\tanimate={\n\t\t\t\t\t\t\t( isHovered || isFocused ) &&\n\t\t\t\t\t\t\t! disableMotion &&\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t\t? 'hover'\n\t\t\t\t\t\t\t\t: 'start'\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{ []\n\t\t\t\t\t\t\t.concat( children as any ) // This makes sure children is always an array.\n\t\t\t\t\t\t\t.map( ( child: any, key: number ) =>\n\t\t\t\t\t\t\t\tchild( { ratio, key } )\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t</motion.div>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default PreviewWrapper;\n", "/**\n * WordPress dependencies\n */\n// @ts-expect-error: Not typed yet.\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport {\n\tFlexItem,\n\tSearchControl,\n\t__experimentalHStack as HStack,\n\t__experimentalText as Text,\n} from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tuseState,\n\tuseEffect,\n\tuseRef,\n\tuseDeferredValue,\n\tmemo,\n} from '@wordpress/element';\nimport {\n\tBlockIcon,\n\tprivateApis as blockEditorPrivateApis,\n\t// @ts-expect-error: Not typed yet.\n} from '@wordpress/block-editor';\nimport { useDebounce } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport { useBlockVariations } from './variations/variations-panel';\nimport { ScreenHeader } from './screen-header';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport { useSetting } from './hooks';\nimport { unlock } from './lock-unlock';\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasBorderPanel,\n\tuseSettingsForBlockElement,\n\tuseHasColorPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction useSortedBlockTypes() {\n\tconst blockItems = useSelect(\n\t\t( select ) => select( blocksStore ).getBlockTypes(),\n\t\t[]\n\t);\n\t// Ensure core blocks are prioritized in the returned results,\n\t// because third party blocks can be registered earlier than\n\t// the core blocks (usually by using the `init` action),\n\t// thus affecting the display order.\n\t// We don't sort reusable blocks as they are handled differently.\n\tconst groupByType = ( blocks: any, block: any ) => {\n\t\tconst { core, noncore } = blocks;\n\t\tconst type = block.name.startsWith( 'core/' ) ? core : noncore;\n\t\ttype.push( block );\n\t\treturn blocks;\n\t};\n\tconst { core: coreItems, noncore: nonCoreItems } = blockItems.reduce(\n\t\tgroupByType,\n\t\t{ core: [], noncore: [] }\n\t);\n\treturn [ ...coreItems, ...nonCoreItems ];\n}\n\nexport function useBlockHasGlobalStyles( blockName: string ) {\n\tconst [ rawSettings ] = useSetting( '', blockName );\n\tconst settings = useSettingsForBlockElement( rawSettings, blockName );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasBorderPanel = useHasBorderPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasLayoutPanel = hasBorderPanel || hasDimensionsPanel;\n\tconst hasVariationsPanel = !! useBlockVariations( blockName )?.length;\n\tconst hasGlobalStyles =\n\t\thasTypographyPanel ||\n\t\thasColorPanel ||\n\t\thasLayoutPanel ||\n\t\thasVariationsPanel;\n\treturn hasGlobalStyles;\n}\n\ninterface BlockMenuItemProps {\n\tblock: any;\n}\n\nfunction BlockMenuItem( { block }: BlockMenuItemProps ) {\n\tconst hasBlockMenuItem = useBlockHasGlobalStyles( block.name );\n\tif ( ! hasBlockMenuItem ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<BlockIcon icon={ block.icon } />\n\t\t\t\t<FlexItem>{ block.title }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButtonAsItem>\n\t);\n}\n\ninterface BlockListProps {\n\tfilterValue: string;\n}\n\nfunction BlockList( { filterValue }: BlockListProps ) {\n\tconst sortedBlockTypes = useSortedBlockTypes();\n\tconst debouncedSpeak = useDebounce( speak, 500 );\n\tconst { isMatchingSearchTerm } = useSelect( blocksStore );\n\n\tconst filteredBlockTypes = ! filterValue\n\t\t? sortedBlockTypes\n\t\t: sortedBlockTypes.filter( ( blockType ) =>\n\t\t\t\tisMatchingSearchTerm( blockType, filterValue )\n\t\t );\n\n\tconst blockTypesListRef = useRef< HTMLDivElement >( null );\n\n\t// Announce search results on change\n\tuseEffect( () => {\n\t\tif ( ! filterValue ) {\n\t\t\treturn;\n\t\t}\n\t\t// We extract the results from the wrapper div's `ref` because\n\t\t// filtered items can contain items that will eventually not\n\t\t// render and there is no reliable way to detect when a child\n\t\t// will return `null`.\n\t\t// TODO: We should find a better way of handling this as it's\n\t\t// fragile and depends on the number of rendered elements of `BlockMenuItem`,\n\t\t// which is now one.\n\t\t// @see https://github.com/WordPress/gutenberg/pull/39117#discussion_r816022116\n\t\tconst count = blockTypesListRef.current?.childElementCount || 0;\n\t\tconst resultsFoundMessage = sprintf(\n\t\t\t/* translators: %d: number of results. */\n\t\t\t_n( '%d result found.', '%d results found.', count ),\n\t\t\tcount\n\t\t);\n\t\tdebouncedSpeak( resultsFoundMessage, 'polite' );\n\t}, [ filterValue, debouncedSpeak ] );\n\n\treturn (\n\t\t<div\n\t\t\tref={ blockTypesListRef }\n\t\t\tclassName=\"global-styles-ui-block-types-item-list\"\n\t\t\t// By default, BlockMenuItem has a role=listitem so this div must have a list role.\n\t\t\trole=\"list\"\n\t\t>\n\t\t\t{ filteredBlockTypes.length === 0 ? (\n\t\t\t\t<Text align=\"center\" as=\"p\">\n\t\t\t\t\t{ __( 'No blocks found.' ) }\n\t\t\t\t</Text>\n\t\t\t) : (\n\t\t\t\tfilteredBlockTypes.map( ( block ) => (\n\t\t\t\t\t<BlockMenuItem\n\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\tkey={ 'menu-itemblock-' + block.name }\n\t\t\t\t\t/>\n\t\t\t\t) )\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nconst MemoizedBlockList = memo( BlockList );\n\nfunction ScreenBlockList() {\n\tconst [ filterValue, setFilterValue ] = useState( '' );\n\tconst deferredFilterValue = useDeferredValue( filterValue );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Blocks' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Customize the appearance of specific blocks and for the whole site.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<SearchControl\n\t\t\t\tclassName=\"global-styles-ui-block-types-search\"\n\t\t\t\tonChange={ setFilterValue }\n\t\t\t\tvalue={ filterValue }\n\t\t\t\tlabel={ __( 'Search' ) }\n\t\t\t\tplaceholder={ __( 'Search' ) }\n\t\t\t/>\n\t\t\t<MemoizedBlockList filterValue={ deferredFilterValue } />\n\t\t</>\n\t);\n}\n\nexport default ScreenBlockList;\n", "/**\n * WordPress dependencies\n */\n// @ts-expect-error: Not typed yet.\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { NavigationButtonAsItem } from '../navigation-button';\nimport { useStyle } from '../hooks';\n\ninterface BlockStyle {\n\tname: string;\n\tlabel: string;\n\tsource?: string;\n\tisDefault?: boolean;\n}\n\ninterface VariationsPanelProps {\n\tname: string;\n}\n\n// Only core block styles (source === block) or block styles with a matching\n// theme.json style variation will be configurable via Global Styles.\nfunction getFilteredBlockStyles(\n\tblockStyles: BlockStyle[],\n\tvariations: string[]\n): BlockStyle[] {\n\treturn (\n\t\tblockStyles?.filter(\n\t\t\t( style ) =>\n\t\t\t\tstyle.source === 'block' || variations.includes( style.name )\n\t\t) || []\n\t);\n}\n\nexport function useBlockVariations( name: string ): BlockStyle[] {\n\tconst blockStyles = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\tconst [ variations ] = useStyle( 'variations', name );\n\tconst variationNames = Object.keys( variations ?? {} );\n\n\treturn getFilteredBlockStyles( blockStyles, variationNames );\n}\n\nexport function VariationsPanel( { name }: VariationsPanelProps ) {\n\tconst coreBlockStyles = useBlockVariations( name );\n\n\treturn (\n\t\t<ItemGroup isBordered isSeparated>\n\t\t\t{ coreBlockStyles.map( ( style, index ) => {\n\t\t\t\tif ( style?.isDefault ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tpath={\n\t\t\t\t\t\t\t'/blocks/' +\n\t\t\t\t\t\t\tencodeURIComponent( name ) +\n\t\t\t\t\t\t\t'/variations/' +\n\t\t\t\t\t\t\tencodeURIComponent( style.name )\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{ style.label }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ItemGroup>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalSpacer as Spacer,\n\t__experimentalHeading as Heading,\n\t__experimentalView as View,\n\t__experimentalText as Text,\n\tNavigator,\n} from '@wordpress/components';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { chevronRight, chevronLeft } from '@wordpress/icons';\n\ninterface ScreenHeaderProps {\n\ttitle: string;\n\tdescription?: string | React.ReactElement;\n\tonBack?: () => void;\n}\n\nexport function ScreenHeader( {\n\ttitle,\n\tdescription,\n\tonBack,\n}: ScreenHeaderProps ) {\n\treturn (\n\t\t<VStack spacing={ 0 }>\n\t\t\t<View>\n\t\t\t\t<Spacer marginBottom={ 0 } paddingX={ 4 } paddingY={ 3 }>\n\t\t\t\t\t<VStack spacing={ 2 }>\n\t\t\t\t\t\t<HStack spacing={ 2 }>\n\t\t\t\t\t\t\t<Navigator.BackButton\n\t\t\t\t\t\t\t\ticon={ isRTL() ? chevronRight : chevronLeft }\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Back' ) }\n\t\t\t\t\t\t\t\tonClick={ onBack }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Spacer>\n\t\t\t\t\t\t\t\t<Heading\n\t\t\t\t\t\t\t\t\tclassName=\"global-styles-ui-header\"\n\t\t\t\t\t\t\t\t\tlevel={ 2 }\n\t\t\t\t\t\t\t\t\tsize={ 13 }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t{ description && (\n\t\t\t\t\t\t\t<Text className=\"global-styles-ui-header__description\">\n\t\t\t\t\t\t\t\t{ description }\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</VStack>\n\t\t\t\t</Spacer>\n\t\t\t</View>\n\t\t</VStack>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\n// @ts-expect-error: Not typed yet.\nimport { getBlockType } from '@wordpress/blocks';\n// @ts-expect-error: Not typed yet.\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tPanelBody,\n\t__experimentalVStack as VStack,\n\t__experimentalHasSplitBorders as hasSplitBorders,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport type { GlobalStylesConfig } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport { ScreenHeader } from './screen-header';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { Subtitle } from './subtitle';\nimport {\n\tuseBlockVariations,\n\tVariationsPanel,\n} from './variations/variations-panel';\nimport { useStyle, useSetting } from './hooks';\nimport { unlock } from './lock-unlock';\n\n// Initial control values.\nconst BACKGROUND_BLOCK_DEFAULT_VALUES = {\n\tbackgroundSize: 'cover',\n\tbackgroundPosition: '50% 50%', // used only when backgroundSize is 'contain'.\n};\n\nfunction applyFallbackStyle( border: any ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tconst hasColorOrWidth = border.color || border.width;\n\n\tif ( ! border.style && hasColorOrWidth ) {\n\t\treturn { ...border, style: 'solid' };\n\t}\n\n\tif ( border.style && ! hasColorOrWidth ) {\n\t\treturn undefined;\n\t}\n\n\treturn border;\n}\n\nfunction applyAllFallbackStyles( border: any ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tif ( hasSplitBorders( border ) ) {\n\t\treturn {\n\t\t\ttop: applyFallbackStyle( border.top ),\n\t\t\tright: applyFallbackStyle( border.right ),\n\t\t\tbottom: applyFallbackStyle( border.bottom ),\n\t\t\tleft: applyFallbackStyle( border.left ),\n\t\t};\n\t}\n\n\treturn applyFallbackStyle( border );\n}\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasBorderPanel,\n\tuseSettingsForBlockElement,\n\tuseHasColorPanel,\n\tuseHasFiltersPanel,\n\tuseHasImageSettingsPanel,\n\tuseHasBackgroundPanel,\n\tBackgroundPanel: StylesBackgroundPanel,\n\tBorderPanel: StylesBorderPanel,\n\tColorPanel: StylesColorPanel,\n\tTypographyPanel: StylesTypographyPanel,\n\tDimensionsPanel: StylesDimensionsPanel,\n\tFiltersPanel: StylesFiltersPanel,\n\tImageSettingsPanel,\n\tAdvancedPanel: StylesAdvancedPanel,\n} = unlock( blockEditorPrivateApis );\n\ninterface ScreenBlockProps {\n\tname: string;\n\tvariation?: string;\n}\n\nfunction ScreenBlock( { name, variation }: ScreenBlockProps ) {\n\tlet prefixParts: string[] = [];\n\tif ( variation ) {\n\t\tprefixParts = [ 'variations', variation ].concat( prefixParts );\n\t}\n\tconst prefix = prefixParts.join( '.' );\n\n\tconst [ style ] = useStyle( prefix, name, 'user', false );\n\tconst [ inheritedStyle, setStyle ] = useStyle(\n\t\tprefix,\n\t\tname,\n\t\t'merged',\n\t\tfalse\n\t);\n\tconst [ userSettings ] = useSetting( '', name, 'user' );\n\tconst [ rawSettings, setSettings ] = useSetting( '', name );\n\tconst settingsForBlockElement = useSettingsForBlockElement(\n\t\trawSettings,\n\t\tname\n\t);\n\tconst blockType = getBlockType( name );\n\n\t// Only allow `blockGap` support if serialization has not been skipped, to be sure global spacing can be applied.\n\tlet disableBlockGap = false;\n\tif (\n\t\tsettingsForBlockElement?.spacing?.blockGap &&\n\t\tblockType?.supports?.spacing?.blockGap &&\n\t\t( blockType?.supports?.spacing?.__experimentalSkipSerialization ===\n\t\t\ttrue ||\n\t\t\tblockType?.supports?.spacing?.__experimentalSkipSerialization?.some?.(\n\t\t\t\t( spacingType: string ) => spacingType === 'blockGap'\n\t\t\t) )\n\t) {\n\t\tdisableBlockGap = true;\n\t}\n\n\t// Only allow `aspectRatio` support if the block is not the grouping block.\n\t// The grouping block allows the user to use Group, Row and Stack variations,\n\t// and it is highly likely that the user will not want to set an aspect ratio\n\t// for all three at once. Until there is the ability to set a different aspect\n\t// ratio for each variation, we disable the aspect ratio controls for the\n\t// grouping block in global styles.\n\tlet disableAspectRatio = false;\n\tif (\n\t\tsettingsForBlockElement?.dimensions?.aspectRatio &&\n\t\tname === 'core/group'\n\t) {\n\t\tdisableAspectRatio = true;\n\t}\n\n\tconst settings = useMemo( () => {\n\t\tconst updatedSettings = structuredClone( settingsForBlockElement );\n\t\tif ( disableBlockGap ) {\n\t\t\tupdatedSettings.spacing.blockGap = false;\n\t\t}\n\t\tif ( disableAspectRatio ) {\n\t\t\tupdatedSettings.dimensions.aspectRatio = false;\n\t\t}\n\t\treturn updatedSettings;\n\t}, [ settingsForBlockElement, disableBlockGap, disableAspectRatio ] );\n\n\tconst blockVariations = useBlockVariations( name );\n\tconst hasBackgroundPanel = useHasBackgroundPanel( settings );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasBorderPanel = useHasBorderPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasFiltersPanel = useHasFiltersPanel( settings );\n\tconst hasImageSettingsPanel = useHasImageSettingsPanel(\n\t\tname,\n\t\tuserSettings,\n\t\tsettings\n\t);\n\tconst hasVariationsPanel = !! blockVariations?.length && ! variation;\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! ( globalStyles as GlobalStylesConfig )?._links?.[\n\t\t\t\t'wp:action-edit-css'\n\t\t\t],\n\t\t};\n\t}, [] );\n\tconst currentBlockStyle = variation\n\t\t? blockVariations.find( ( s: any ) => s.name === variation )\n\t\t: null;\n\n\t// These intermediary objects are needed because the \"layout\" property is stored\n\t// in settings rather than styles.\n\tconst inheritedStyleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...inheritedStyle,\n\t\t\tlayout: settings.layout,\n\t\t};\n\t}, [ inheritedStyle, settings.layout ] );\n\tconst styleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...style,\n\t\t\tlayout: userSettings.layout,\n\t\t};\n\t}, [ style, userSettings.layout ] );\n\tconst onChangeDimensions = ( newStyle: any ) => {\n\t\tconst updatedStyle = { ...newStyle };\n\t\tdelete updatedStyle.layout;\n\t\tsetStyle( updatedStyle );\n\n\t\tif ( newStyle.layout !== userSettings.layout ) {\n\t\t\tsetSettings( {\n\t\t\t\t...userSettings,\n\t\t\t\tlayout: newStyle.layout,\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeLightbox = ( newSetting: any ) => {\n\t\t// If the newSetting is undefined, this means that the user has deselected\n\t\t// (reset) the lightbox setting.\n\t\tif ( newSetting === undefined ) {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlightbox: undefined,\n\t\t\t} );\n\n\t\t\t// Otherwise, we simply set the lightbox setting to the new value but\n\t\t\t// taking care of not overriding the other lightbox settings.\n\t\t} else {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlightbox: {\n\t\t\t\t\t...rawSettings.lightbox,\n\t\t\t\t\t...newSetting,\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeBorders = ( newStyle: any ) => {\n\t\tif ( ! newStyle?.border ) {\n\t\t\tsetStyle( newStyle );\n\t\t\treturn;\n\t\t}\n\n\t\t// As Global Styles can't conditionally generate styles based on if\n\t\t// other style properties have been set, we need to force split\n\t\t// border definitions for user set global border styles. Border\n\t\t// radius is derived from the same property i.e. `border.radius` if\n\t\t// it is a string that is used. The longhand border radii styles are\n\t\t// only generated if that property is an object.\n\t\t//\n\t\t// For borders (color, style, and width) those are all properties on\n\t\t// the `border` style property. This means if the theme.json defined\n\t\t// split borders and the user condenses them into a flat border or\n\t\t// vice-versa we'd get both sets of styles which would conflict.\n\t\tconst { radius, ...newBorder } = newStyle.border;\n\t\tconst border = applyAllFallbackStyles( newBorder );\n\t\tconst updatedBorder = ! hasSplitBorders( border )\n\t\t\t? {\n\t\t\t\t\ttop: border,\n\t\t\t\t\tright: border,\n\t\t\t\t\tbottom: border,\n\t\t\t\t\tleft: border,\n\t\t\t }\n\t\t\t: {\n\t\t\t\t\tcolor: null,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twidth: null,\n\t\t\t\t\t...border,\n\t\t\t };\n\n\t\tsetStyle( { ...newStyle, border: { ...updatedBorder, radius } } );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={\n\t\t\t\t\tvariation ? currentBlockStyle?.label : blockType?.title\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<BlockPreviewPanel name={ name } variation={ variation } />\n\t\t\t{ hasVariationsPanel && (\n\t\t\t\t<div className=\"global-styles-ui-screen-variations\">\n\t\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t\t<Subtitle>{ __( 'Style Variations' ) }</Subtitle>\n\t\t\t\t\t\t<VariationsPanel name={ name } />\n\t\t\t\t\t</VStack>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ hasColorPanel && (\n\t\t\t\t<StylesColorPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasBackgroundPanel && (\n\t\t\t\t<StylesBackgroundPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tdefaultValues={ BACKGROUND_BLOCK_DEFAULT_VALUES }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasTypographyPanel && (\n\t\t\t\t<StylesTypographyPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasDimensionsPanel && (\n\t\t\t\t<StylesDimensionsPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ onChangeDimensions }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasBorderPanel && (\n\t\t\t\t<StylesBorderPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ onChangeBorders }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasFiltersPanel && (\n\t\t\t\t<StylesFiltersPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasImageSettingsPanel && (\n\t\t\t\t<ImageSettingsPanel\n\t\t\t\t\tonChange={ onChangeLightbox }\n\t\t\t\t\tvalue={ userSettings }\n\t\t\t\t\tinheritedValue={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t{ canEditCSS && (\n\t\t\t\t<PanelBody title={ __( 'Advanced' ) } initialOpen={ false }>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: %s: is the name of a block e.g., 'Image' or 'Table'.\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tblockType?.title\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ScreenBlock;\n", "/**\n * WordPress dependencies\n */\n// @ts-expect-error: Not typed yet.\nimport { BlockPreview } from '@wordpress/block-editor';\n// @ts-expect-error: Not typed yet.\nimport { getBlockType, getBlockFromExample } from '@wordpress/blocks';\nimport { __experimentalSpacer as Spacer } from '@wordpress/components';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getVariationClassName } from './utils';\n\ninterface BlockPreviewPanelProps {\n\tname: string;\n\tvariation?: string;\n}\n\nconst BlockPreviewPanel = ( {\n\tname,\n\tvariation = '',\n}: BlockPreviewPanelProps ) => {\n\tconst blockExample = getBlockType( name )?.example;\n\tconst blocks = useMemo( () => {\n\t\tif ( ! blockExample ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst example = {\n\t\t\t...blockExample,\n\t\t\tattributes: {\n\t\t\t\t...blockExample.attributes,\n\t\t\t\tstyle: undefined,\n\t\t\t\tclassName: variation\n\t\t\t\t\t? getVariationClassName( variation )\n\t\t\t\t\t: blockExample.attributes?.className,\n\t\t\t},\n\t\t};\n\n\t\treturn getBlockFromExample( name, example );\n\t}, [ name, blockExample, variation ] );\n\n\tconst viewportWidth = blockExample?.viewportWidth ?? 500;\n\t// Same as height of InserterPreviewPanel.\n\tconst previewHeight = 144;\n\tconst sidebarWidth = 235;\n\tconst scale = sidebarWidth / viewportWidth;\n\tconst minHeight =\n\t\tscale !== 0 && scale < 1 && previewHeight\n\t\t\t? previewHeight / scale\n\t\t\t: previewHeight;\n\n\tif ( ! blockExample ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Spacer marginX={ 4 } marginBottom={ 4 }>\n\t\t\t<div\n\t\t\t\tclassName=\"global-styles-ui__block-preview-panel\"\n\t\t\t\tstyle={ { maxHeight: previewHeight, boxSizing: 'initial' } }\n\t\t\t>\n\t\t\t\t<BlockPreview\n\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\tviewportWidth={ viewportWidth }\n\t\t\t\t\tminHeight={ previewHeight }\n\t\t\t\t\tadditionalStyles={\n\t\t\t\t\t\t//We want this CSS to be in sync with the one in InserterPreviewPanel.\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcss: `\n\t\t\t\t\t\t\t\tbody{\n\t\t\t\t\t\t\t\t\tpadding: 24px;\n\t\t\t\t\t\t\t\t\tmin-height:${ Math.round( minHeight ) }px;\n\t\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\t\talign-items:center;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.is-root-container { width: 100%; }\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</Spacer>\n\t);\n};\n\nexport default BlockPreviewPanel;\n", "/**\n * WordPress dependencies\n */\nimport { __experimentalHeading as Heading } from '@wordpress/components';\n\ninterface SubtitleProps {\n\tchildren: React.ReactNode;\n\tlevel?: 1 | 2 | 3 | 4 | 5 | 6;\n}\n\nexport function Subtitle( { children, level = 2 }: SubtitleProps ) {\n\treturn (\n\t\t<Heading className=\"global-styles-ui-subtitle\" level={ level }>\n\t\t\t{ children }\n\t\t</Heading>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { ScreenHeader } from './screen-header';\nimport { ScreenBody } from './screen-body';\nimport TypographyElements from './typography-elements';\nimport TypographyVariations from './variations/variations-typography';\nimport FontFamilies from './font-families';\nimport FontSizesCount from './font-sizes/font-sizes-count';\nimport { GlobalStylesContext } from './context';\n\nfunction ScreenTypography() {\n\tconst { fontLibraryEnabled } = useContext( GlobalStylesContext );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Typography' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Available fonts, typographic styles, and the application of those styles.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<ScreenBody>\n\t\t\t\t<VStack spacing={ 7 }>\n\t\t\t\t\t<TypographyVariations title={ __( 'Typesets' ) } />\n\t\t\t\t\t{ fontLibraryEnabled && <FontFamilies /> }\n\t\t\t\t\t<TypographyElements />\n\t\t\t\t\t<FontSizesCount />\n\t\t\t\t</VStack>\n\t\t\t</ScreenBody>\n\t\t</>\n\t);\n}\n\nexport default ScreenTypography;\n", "/**\n * WordPress dependencies\n */\nimport { __experimentalSpacer as Spacer } from '@wordpress/components';\nimport clsx from 'clsx';\n\ninterface ScreenBodyProps {\n\tchildren: React.ReactNode;\n\tclassName?: string;\n}\n\nexport function ScreenBody( { children, className }: ScreenBodyProps ) {\n\treturn (\n\t\t<Spacer\n\t\t\tclassName={ clsx( 'global-styles-ui-screen-body', className ) }\n\t\t\tpadding={ 4 } // 4 units = 16px. Could be made configurable via prop in the future if needed.\n\t\t>\n\t\t\t{ children }\n\t\t</Spacer>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\tFlexItem,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { NavigationButtonAsItem } from './navigation-button';\nimport { Subtitle } from './subtitle';\nimport { useStyle } from './hooks';\n\ninterface ElementItemProps {\n\tparentMenu: string;\n\telement: string;\n\tlabel: string;\n}\n\nfunction ElementItem( { parentMenu, element, label }: ElementItemProps ) {\n\tconst prefix =\n\t\telement === 'text' || ! element ? '' : `elements.${ element }.`;\n\tconst extraStyles =\n\t\telement === 'link'\n\t\t\t? {\n\t\t\t\t\ttextDecoration: 'underline',\n\t\t\t }\n\t\t\t: {};\n\n\tconst [ fontFamily ] = useStyle< string >(\n\t\tprefix + 'typography.fontFamily'\n\t);\n\tconst [ fontStyle ] = useStyle< string >( prefix + 'typography.fontStyle' );\n\tconst [ fontWeight ] = useStyle< string >(\n\t\tprefix + 'typography.fontWeight'\n\t);\n\tconst [ backgroundColor ] = useStyle< string >(\n\t\tprefix + 'color.background'\n\t);\n\tconst [ fallbackBackgroundColor ] =\n\t\tuseStyle< string >( 'color.background' );\n\tconst [ gradientValue ] = useStyle< string >( prefix + 'color.gradient' );\n\tconst [ color ] = useStyle< string >( prefix + 'color.text' );\n\n\treturn (\n\t\t<NavigationButtonAsItem path={ parentMenu + '/typography/' + element }>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<FlexItem\n\t\t\t\t\tclassName=\"global-styles-ui-screen-typography__indicator\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tfontFamily: fontFamily ?? 'serif',\n\t\t\t\t\t\tbackground:\n\t\t\t\t\t\t\tgradientValue ??\n\t\t\t\t\t\t\tbackgroundColor ??\n\t\t\t\t\t\t\tfallbackBackgroundColor,\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\tfontStyle,\n\t\t\t\t\t\tfontWeight,\n\t\t\t\t\t\t...extraStyles,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Aa' ) }\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem>{ label }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButtonAsItem>\n\t);\n}\n\nfunction TypographyElements() {\n\tconst parentMenu = '';\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t<Subtitle level={ 3 }>{ __( 'Elements' ) }</Subtitle>\n\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"text\"\n\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"link\"\n\t\t\t\t\tlabel={ __( 'Links' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"heading\"\n\t\t\t\t\tlabel={ __( 'Headings' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"caption\"\n\t\t\t\t\tlabel={ __( 'Captions' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"button\"\n\t\t\t\t\tlabel={ __( 'Buttons' ) }\n\t\t\t\t/>\n\t\t\t</ItemGroup>\n\t\t</VStack>\n\t);\n}\n\nexport default TypographyElements;\n", "/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalGrid as Grid,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport StylesPreviewTypography from '../preview-typography';\nimport { useCurrentMergeThemeStyleVariationsWithUserConfig } from '../hooks';\nimport { Subtitle } from '../subtitle';\nimport Variation from './variation';\n\ninterface TypographyVariationsProps {\n\ttitle?: string;\n\tgap?: number;\n}\n\nconst propertiesToFilter = [ 'typography' ];\n\nexport default function TypographyVariations( {\n\ttitle,\n\tgap = 2,\n}: TypographyVariationsProps ) {\n\tconst typographyVariations =\n\t\tuseCurrentMergeThemeStyleVariationsWithUserConfig( propertiesToFilter );\n\n\t// Return null if there is only one variation (the default).\n\tif ( typographyVariations?.length <= 1 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t{ title && <Subtitle level={ 3 }>{ title }</Subtitle> }\n\t\t\t<Grid\n\t\t\t\tcolumns={ 3 }\n\t\t\t\tgap={ gap }\n\t\t\t\tclassName=\"global-styles-ui-style-variations-container\"\n\t\t\t>\n\t\t\t\t{ typographyVariations.map(\n\t\t\t\t\t( variation: any, index: number ) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Variation\n\t\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\t\t\tproperties={ propertiesToFilter }\n\t\t\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ () => (\n\t\t\t\t\t\t\t\t\t<StylesPreviewTypography\n\t\t\t\t\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</Variation>\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t</Grid>\n\t\t</VStack>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport TypographyExample from './typography-example';\nimport PreviewWrapper from './preview-wrapper';\n\ninterface StylesPreviewTypographyProps {\n\tvariation: any;\n\tisFocused?: boolean;\n\twithHoverView?: boolean;\n}\n\nconst StylesPreviewTypography = ( {\n\tvariation,\n\tisFocused,\n\twithHoverView,\n}: StylesPreviewTypographyProps ) => {\n\treturn (\n\t\t<PreviewWrapper\n\t\t\tlabel={ variation.title }\n\t\t\tisFocused={ isFocused }\n\t\t\twithHoverView={ withHoverView }\n\t\t>\n\t\t\t{ ( { ratio, key } ) => (\n\t\t\t\t<HStack\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tspacing={ 10 * ratio }\n\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<TypographyExample\n\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\tfontSize={ 85 * ratio }\n\t\t\t\t\t/>\n\t\t\t\t</HStack>\n\t\t\t) }\n\t\t</PreviewWrapper>\n\t);\n};\n\nexport default StylesPreviewTypography;\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Tooltip } from '@wordpress/components';\nimport { useMemo, useContext, useState } from '@wordpress/element';\nimport { ENTER } from '@wordpress/keycodes';\nimport { _x, sprintf } from '@wordpress/i18n';\nimport {\n\tareGlobalStylesEqual,\n\tmergeGlobalStyles,\n} from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport { GlobalStylesContext } from '../context';\nimport { filterObjectByProperties } from '../utils';\n\ninterface VariationProps {\n\tvariation: any;\n\tchildren: ( isFocused: boolean ) => React.ReactNode;\n\tisPill?: boolean;\n\tproperties?: string[];\n\tshowTooltip?: boolean;\n}\n\nexport default function Variation( {\n\tvariation,\n\tchildren,\n\tisPill = false,\n\tproperties,\n\tshowTooltip = false,\n}: VariationProps ) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst {\n\t\tbase,\n\t\tuser,\n\t\tonChange: setUserConfig,\n\t} = useContext( GlobalStylesContext );\n\n\tconst context = useMemo( () => {\n\t\tlet merged = mergeGlobalStyles( base, variation );\n\t\tif ( properties ) {\n\t\t\tmerged = filterObjectByProperties( merged, properties );\n\t\t}\n\t\treturn {\n\t\t\tuser: variation,\n\t\t\tbase,\n\t\t\tmerged,\n\t\t\tonChange: () => {},\n\t\t};\n\t}, [ variation, base, properties ] );\n\n\tconst selectVariation = () => setUserConfig( variation );\n\n\tconst selectOnEnter = ( event: React.KeyboardEvent ) => {\n\t\tif ( event.keyCode === ENTER ) {\n\t\t\tevent.preventDefault();\n\t\t\tselectVariation();\n\t\t}\n\t};\n\n\tconst isActive = useMemo(\n\t\t() => areGlobalStylesEqual( user, variation ),\n\t\t[ user, variation ]\n\t);\n\n\tlet label = variation?.title;\n\tif ( variation?.description ) {\n\t\tlabel = sprintf(\n\t\t\t/* translators: 1: variation title. 2: variation description. */\n\t\t\t_x( '%1$s (%2$s)', 'variation label' ),\n\t\t\tvariation?.title,\n\t\t\tvariation?.description\n\t\t);\n\t}\n\n\tconst content = (\n\t\t<div\n\t\t\tclassName={ clsx( 'global-styles-ui-variations_item', {\n\t\t\t\t'is-active': isActive,\n\t\t\t} ) }\n\t\t\trole=\"button\"\n\t\t\tonClick={ selectVariation }\n\t\t\tonKeyDown={ selectOnEnter }\n\t\t\ttabIndex={ 0 }\n\t\t\taria-label={ label }\n\t\t\taria-current={ isActive }\n\t\t\tonFocus={ () => setIsFocused( true ) }\n\t\t\tonBlur={ () => setIsFocused( false ) }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={ clsx( 'global-styles-ui-variations_item-preview', {\n\t\t\t\t\t'is-pill': isPill,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t{ children( isFocused ) }\n\t\t\t</div>\n\t\t</div>\n\t);\n\n\treturn (\n\t\t<GlobalStylesContext.Provider value={ context }>\n\t\t\t{ showTooltip ? (\n\t\t\t\t<Tooltip text={ variation?.title }>{ content }</Tooltip>\n\t\t\t) : (\n\t\t\t\tcontent\n\t\t\t) }\n\t\t</GlobalStylesContext.Provider>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__experimentalText as Text,\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\tButton,\n} from '@wordpress/components';\nimport { settings } from '@wordpress/icons';\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { Subtitle } from './subtitle';\nimport { useSetting } from './hooks';\nimport FontLibraryProvider, {\n\tFontLibraryContext,\n} from './font-library/context';\nimport FontLibraryModal from './font-library/modal';\nimport FontFamilyItem from './font-family-item';\nimport { setUIValuesNeeded } from './font-library/utils';\n\n/**\n * Maps the fonts with the source, if available.\n *\n * @param {Array} fonts The fonts to map.\n * @param {string} source The source of the fonts.\n * @return {Array} The mapped fonts.\n */\nfunction mapFontsWithSource( fonts: any[], source: string ) {\n\treturn fonts\n\t\t? fonts.map( ( f ) => setUIValuesNeeded( f, { source } ) )\n\t\t: [];\n}\n\nfunction FontFamiliesInner() {\n\tconst { baseCustomFonts, modalTabOpen, setModalTabOpen } =\n\t\tuseContext( FontLibraryContext );\n\tconst [ fontFamilies ] = useSetting( 'typography.fontFamilies' );\n\tconst [ baseFontFamilies ] = useSetting(\n\t\t'typography.fontFamilies',\n\t\tundefined,\n\t\t'base'\n\t);\n\tconst themeFonts = mapFontsWithSource( fontFamilies?.theme, 'theme' );\n\tconst customFonts = mapFontsWithSource( fontFamilies?.custom, 'custom' );\n\tconst activeFonts = [ ...themeFonts, ...customFonts ].sort( ( a, b ) =>\n\t\ta.name.localeCompare( b.name )\n\t);\n\tconst hasFonts = 0 < activeFonts.length;\n\tconst hasInstalledFonts =\n\t\thasFonts ||\n\t\tbaseFontFamilies?.theme?.length > 0 ||\n\t\t( baseCustomFonts?.length ?? 0 ) > 0;\n\n\treturn (\n\t\t<>\n\t\t\t{ !! modalTabOpen && (\n\t\t\t\t<FontLibraryModal\n\t\t\t\t\tonRequestClose={ () => setModalTabOpen?.( '' ) }\n\t\t\t\t\tdefaultTabId={ modalTabOpen }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t<VStack spacing={ 2 }>\n\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t<Subtitle level={ 3 }>{ __( 'Fonts' ) }</Subtitle>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={ () => setModalTabOpen?.( 'installed-fonts' ) }\n\t\t\t\t\t\tlabel={ __( 'Manage fonts' ) }\n\t\t\t\t\t\ticon={ settings }\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t/>\n\t\t\t\t</HStack>\n\t\t\t\t{ activeFonts.length > 0 && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<ItemGroup size=\"large\" isBordered isSeparated>\n\t\t\t\t\t\t\t{ activeFonts.map( ( font ) => (\n\t\t\t\t\t\t\t\t<FontFamilyItem\n\t\t\t\t\t\t\t\t\tkey={ font.slug }\n\t\t\t\t\t\t\t\t\tfont={ font }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t\t{ ! hasFonts && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<Text as=\"p\">\n\t\t\t\t\t\t\t{ hasInstalledFonts\n\t\t\t\t\t\t\t\t? __( 'No fonts activated.' )\n\t\t\t\t\t\t\t\t: __( 'No fonts installed.' ) }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"global-styles-ui-font-families__manage-fonts\"\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tsetModalTabOpen?.(\n\t\t\t\t\t\t\t\t\thasInstalledFonts\n\t\t\t\t\t\t\t\t\t\t? 'installed-fonts'\n\t\t\t\t\t\t\t\t\t\t: 'upload-fonts'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ hasInstalledFonts\n\t\t\t\t\t\t\t\t? __( 'Manage fonts' )\n\t\t\t\t\t\t\t\t: __( 'Add fonts' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</VStack>\n\t\t</>\n\t);\n}\n\nexport default function FontFamilies( { ...props } ) {\n\treturn (\n\t\t<FontLibraryProvider>\n\t\t\t<FontFamiliesInner { ...props } />\n\t\t</FontLibraryProvider>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { createContext, useState, useEffect } from '@wordpress/element';\nimport {\n\tuseSelect,\n\tuseDispatch,\n\tresolveSelect,\n\tuseRegistry,\n} from '@wordpress/data';\nimport {\n\tuseEntityRecord,\n\tuseEntityRecords,\n\tstore as coreStore,\n} from '@wordpress/core-data';\nimport { __ } from '@wordpress/i18n';\nimport type {\n\tFontFamilyPreset,\n\tGlobalStylesConfig,\n} from '@wordpress/global-styles-engine';\nimport type {\n\tCollectionFontFace,\n\tCollectionFontFamily,\n\tFontFace,\n\tFontFamily,\n\tWpFontFamily,\n} from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { fetchInstallFontFamily } from './api';\nimport {\n\tsetUIValuesNeeded,\n\tmergeFontFamilies,\n\tloadFontFaceInBrowser,\n\tunloadFontFaceInBrowser,\n\tgetDisplaySrcFromFontFace,\n\tmakeFontFacesFormData,\n\tmakeFontFamilyFormData,\n\tbatchInstallFontFaces,\n\tcheckFontFaceInstalled,\n} from './utils';\nimport { setImmutably } from './utils/set-immutably';\nimport { toggleFont } from './utils/toggleFont';\nimport type { FontFamilyToUpload, FontLibraryState } from './types';\nimport { useSetting } from '../hooks';\n\nexport const FontLibraryContext = createContext< FontLibraryState >(\n\t{} as FontLibraryState\n);\nFontLibraryContext.displayName = 'FontLibraryContext';\n\nfunction FontLibraryProvider( { children }: { children: React.ReactNode } ) {\n\tconst registry = useRegistry();\n\tconst { saveEntityRecord, deleteEntityRecord } = useDispatch( coreStore );\n\tconst { globalStylesId } = useSelect( ( select ) => {\n\t\tconst { __experimentalGetCurrentGlobalStylesId } = select( coreStore );\n\t\treturn { globalStylesId: __experimentalGetCurrentGlobalStylesId() };\n\t}, [] );\n\n\tconst globalStyles = useEntityRecord< GlobalStylesConfig >(\n\t\t'root',\n\t\t'globalStyles',\n\t\tglobalStylesId\n\t);\n\n\tconst [ isInstalling, setIsInstalling ] = useState( false );\n\n\tconst { records: libraryPosts = [], isResolving: isResolvingLibrary } =\n\t\tuseEntityRecords< CollectionFontFamily >(\n\t\t\t'postType',\n\t\t\t'wp_font_family',\n\t\t\t{\n\t\t\t\t_embed: true,\n\t\t\t}\n\t\t);\n\n\tconst libraryFonts: FontFamilyPreset[] =\n\t\t( libraryPosts || [] ).map( ( fontFamilyPost ) => {\n\t\t\treturn {\n\t\t\t\tid: fontFamilyPost.id,\n\t\t\t\t...( fontFamilyPost.font_family_settings || {} ),\n\t\t\t\tfontFace:\n\t\t\t\t\tfontFamilyPost?._embedded?.font_faces?.map(\n\t\t\t\t\t\t( face ) => face.font_face_settings\n\t\t\t\t\t) || [],\n\t\t\t};\n\t\t} ) || [];\n\n\t// Global Styles (settings) font families\n\tconst [ fontFamilies, setFontFamilies ] = useSetting<\n\t\tRecord< string, FontFamilyPreset[] > | undefined\n\t>( 'typography.fontFamilies' );\n\n\t/*\n\t * Save the font families to the database.\n\n\t * This function is called when the user activates or deactivates a font family.\n\t * It only updates the global styles post content in the database for new font families.\n\t * This avoids saving other styles/settings changed by the user using other parts of the editor.\n\t *\n\t * It uses the font families from the param to avoid using the font families from an outdated state.\n\t *\n\t * @param {Array} fonts - The font families that will be saved to the database.\n\t */\n\tconst saveFontFamilies = async (\n\t\tfonts:\n\t\t\t| FontFamilyPreset[]\n\t\t\t| Record< string, FontFamilyPreset[] >\n\t\t\t| undefined\n\t) => {\n\t\tif ( ! globalStyles.record ) {\n\t\t\treturn;\n\t\t}\n\t\t// Gets the global styles database post content.\n\t\tconst updatedGlobalStyles = globalStyles.record;\n\n\t\t// Updates the database version of global styles with the edited font families in the client.\n\t\tconst finalGlobalStyles = setImmutably(\n\t\t\tupdatedGlobalStyles ?? {},\n\t\t\t[ 'settings', 'typography', 'fontFamilies' ],\n\t\t\tfonts\n\t\t);\n\n\t\t// Saves a new version of the global styles in the database.\n\t\tawait saveEntityRecord( 'root', 'globalStyles', finalGlobalStyles );\n\t};\n\n\t// Library Fonts\n\tconst [ modalTabOpen, setModalTabOpen ] = useState( '' );\n\tconst [ libraryFontSelected, setLibraryFontSelected ] = useState<\n\t\tFontFamily | undefined\n\t>( undefined );\n\n\t// Themes Fonts are the fonts defined in the global styles (database persisted theme.json data).\n\tconst themeFonts = fontFamilies?.theme\n\t\t? fontFamilies.theme\n\t\t\t\t.map( ( f ) => setUIValuesNeeded( f, { source: 'theme' } ) )\n\t\t\t\t.sort( ( a, b ) => a.name.localeCompare( b.name ) )\n\t\t: [];\n\n\tconst customFonts = fontFamilies?.custom\n\t\t? fontFamilies.custom\n\t\t\t\t.map( ( f ) => setUIValuesNeeded( f, { source: 'custom' } ) )\n\t\t\t\t.sort( ( a, b ) => a.name.localeCompare( b.name ) )\n\t\t: [];\n\n\tconst baseCustomFonts = libraryFonts\n\t\t? libraryFonts\n\t\t\t\t.map( ( f ) => setUIValuesNeeded( f, { source: 'custom' } ) )\n\t\t\t\t.sort( ( a, b ) => a.name.localeCompare( b.name ) )\n\t\t: [];\n\n\tuseEffect( () => {\n\t\tif ( ! modalTabOpen ) {\n\t\t\tsetLibraryFontSelected( undefined );\n\t\t}\n\t}, [ modalTabOpen ] );\n\n\tconst handleSetLibraryFontSelected = ( font?: FontFamily ) => {\n\t\t// If font is null, reset the selected font\n\t\tif ( ! font ) {\n\t\t\tsetLibraryFontSelected( undefined );\n\t\t\treturn;\n\t\t}\n\n\t\tconst fonts = font.source === 'theme' ? themeFonts : baseCustomFonts;\n\n\t\t// Tries to find the font in the installed fonts\n\t\tconst fontSelected = fonts.find( ( f ) => f.slug === font.slug );\n\t\t// If the font is not found (it is only defined in custom styles), use the font from custom styles\n\t\tsetLibraryFontSelected( {\n\t\t\t...( fontSelected || font ),\n\t\t\tsource: font.source,\n\t\t} );\n\t};\n\n\t// Demo\n\tconst [ loadedFontUrls ] = useState( new Set() );\n\n\tconst getAvailableFontsOutline = (\n\t\tavailableFontFamilies: FontFamily[]\n\t) => {\n\t\tconst outline: Record< string, string[] > =\n\t\t\tavailableFontFamilies.reduce(\n\t\t\t\t( acc: Record< string, string[] >, font ) => {\n\t\t\t\t\tconst availableFontFaces =\n\t\t\t\t\t\tfont?.fontFace && font.fontFace?.length > 0\n\t\t\t\t\t\t\t? font?.fontFace.map(\n\t\t\t\t\t\t\t\t\t( face ) =>\n\t\t\t\t\t\t\t\t\t\t`${ face.fontStyle ?? '' }${\n\t\t\t\t\t\t\t\t\t\t\tface.fontWeight ?? ''\n\t\t\t\t\t\t\t\t\t\t}`\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: [ 'normal400' ]; // If the font doesn't have fontFace, we assume it is a system font and we add the defaults: normal 400\n\n\t\t\t\t\tacc[ font.slug ] = availableFontFaces;\n\t\t\t\t\treturn acc;\n\t\t\t\t},\n\t\t\t\t{}\n\t\t\t);\n\t\treturn outline;\n\t};\n\n\tconst getActivatedFontsOutline = ( source?: string ) => {\n\t\tswitch ( source ) {\n\t\t\tcase 'theme':\n\t\t\t\treturn getAvailableFontsOutline( themeFonts );\n\t\t\tcase 'custom':\n\t\t\tdefault:\n\t\t\t\treturn getAvailableFontsOutline( customFonts );\n\t\t}\n\t};\n\n\tconst isFontActivated = (\n\t\tslug: string,\n\t\tstyle?: string,\n\t\tweight?: string | number,\n\t\tsource?: string\n\t) => {\n\t\tif ( ! style && ! weight ) {\n\t\t\treturn !! getActivatedFontsOutline( source )[ slug ];\n\t\t}\n\t\treturn !! getActivatedFontsOutline( source )[ slug ]?.includes(\n\t\t\t( style ?? '' ) + ( weight ?? '' )\n\t\t);\n\t};\n\n\tconst getFontFacesActivated = ( slug: string, source?: string ) => {\n\t\treturn getActivatedFontsOutline( source )[ slug ] || [];\n\t};\n\n\tasync function installFonts( fontFamiliesToInstall: FontFamilyToUpload[] ) {\n\t\tsetIsInstalling( true );\n\t\ttry {\n\t\t\tconst fontFamiliesToActivate = [];\n\t\t\tlet installationErrors: Array< {\n\t\t\t\tmessage: string;\n\t\t\t} > = [];\n\n\t\t\tfor ( const fontFamilyToInstall of fontFamiliesToInstall ) {\n\t\t\t\tlet isANewFontFamily = false;\n\n\t\t\t\t// Get the font family if it already exists.\n\t\t\t\tconst fontFamilyRecords = await resolveSelect(\n\t\t\t\t\tcoreStore\n\t\t\t\t).getEntityRecords< WpFontFamily >(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_font_family',\n\t\t\t\t\t{\n\t\t\t\t\t\tslug: fontFamilyToInstall.slug,\n\t\t\t\t\t\tper_page: 1,\n\t\t\t\t\t\t_embed: true,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\tconst fontFamilyPost =\n\t\t\t\t\tfontFamilyRecords && fontFamilyRecords.length > 0\n\t\t\t\t\t\t? fontFamilyRecords[ 0 ]\n\t\t\t\t\t\t: null;\n\n\t\t\t\tlet installedFontFamily = fontFamilyPost\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tid: fontFamilyPost.id,\n\t\t\t\t\t\t\t...fontFamilyPost.font_family_settings,\n\t\t\t\t\t\t\tfontFace:\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\tfontFamilyPost?._embedded?.font_faces ?? []\n\t\t\t\t\t\t\t\t).map(\n\t\t\t\t\t\t\t\t\t( face: CollectionFontFace ) =>\n\t\t\t\t\t\t\t\t\t\tface.font_face_settings\n\t\t\t\t\t\t\t\t) || [],\n\t\t\t\t\t }\n\t\t\t\t\t: null;\n\n\t\t\t\t// Otherwise create it.\n\t\t\t\tif ( ! installedFontFamily ) {\n\t\t\t\t\tisANewFontFamily = true;\n\t\t\t\t\t// Prepare font family form data to install.\n\t\t\t\t\tinstalledFontFamily = await fetchInstallFontFamily(\n\t\t\t\t\t\tmakeFontFamilyFormData( fontFamilyToInstall ),\n\t\t\t\t\t\tregistry\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Collect font faces that have already been installed (to be activated later)\n\t\t\t\tconst alreadyInstalledFontFaces =\n\t\t\t\t\tinstalledFontFamily.fontFace && fontFamilyToInstall.fontFace\n\t\t\t\t\t\t? installedFontFamily.fontFace.filter(\n\t\t\t\t\t\t\t\t( fontFaceToInstall: FontFace ) =>\n\t\t\t\t\t\t\t\t\tfontFaceToInstall &&\n\t\t\t\t\t\t\t\t\tfontFamilyToInstall.fontFace &&\n\t\t\t\t\t\t\t\t\tcheckFontFaceInstalled(\n\t\t\t\t\t\t\t\t\t\tfontFaceToInstall,\n\t\t\t\t\t\t\t\t\t\tfontFamilyToInstall.fontFace\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: [];\n\n\t\t\t\t// Filter out Font Faces that have already been installed (so that they are not re-installed)\n\t\t\t\tif (\n\t\t\t\t\tinstalledFontFamily.fontFace &&\n\t\t\t\t\tfontFamilyToInstall.fontFace\n\t\t\t\t) {\n\t\t\t\t\tfontFamilyToInstall.fontFace =\n\t\t\t\t\t\tfontFamilyToInstall.fontFace.filter(\n\t\t\t\t\t\t\t( fontFaceToInstall ) =>\n\t\t\t\t\t\t\t\t! checkFontFaceInstalled(\n\t\t\t\t\t\t\t\t\tfontFaceToInstall,\n\t\t\t\t\t\t\t\t\tinstalledFontFamily.fontFace\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Install the fonts (upload the font files to the server and create the post in the database).\n\t\t\t\tlet successfullyInstalledFontFaces: FontFace[] = [];\n\t\t\t\tlet unsuccessfullyInstalledFontFaces: {\n\t\t\t\t\tmessage: string;\n\t\t\t\t}[] = [];\n\t\t\t\tif ( fontFamilyToInstall?.fontFace?.length ?? 0 > 0 ) {\n\t\t\t\t\tconst response = await batchInstallFontFaces(\n\t\t\t\t\t\t// @ts-expect-error - Type mismatch: WpFontFamily.id can be number | string, but batchInstallFontFaces expects only string.\n\t\t\t\t\t\tinstalledFontFamily.id,\n\t\t\t\t\t\tmakeFontFacesFormData(\n\t\t\t\t\t\t\tfontFamilyToInstall as FontFamily\n\t\t\t\t\t\t),\n\t\t\t\t\t\tregistry\n\t\t\t\t\t);\n\t\t\t\t\tsuccessfullyInstalledFontFaces = response?.successes;\n\t\t\t\t\tunsuccessfullyInstalledFontFaces = response?.errors;\n\t\t\t\t}\n\n\t\t\t\t// Use the successfully installed font faces\n\t\t\t\t// As well as any font faces that were already installed (those will be activated)\n\t\t\t\tif (\n\t\t\t\t\tsuccessfullyInstalledFontFaces?.length > 0 ||\n\t\t\t\t\talreadyInstalledFontFaces?.length > 0\n\t\t\t\t) {\n\t\t\t\t\t// Use font data from REST API not from client to ensure\n\t\t\t\t\t// correct font information is used.\n\t\t\t\t\tinstalledFontFamily.fontFace = [\n\t\t\t\t\t\t...successfullyInstalledFontFaces,\n\t\t\t\t\t];\n\n\t\t\t\t\tfontFamiliesToActivate.push( installedFontFamily );\n\t\t\t\t}\n\n\t\t\t\t// If it's a system font but was installed successfully, activate it.\n\t\t\t\tif (\n\t\t\t\t\tinstalledFontFamily &&\n\t\t\t\t\t! fontFamilyToInstall?.fontFace?.length\n\t\t\t\t) {\n\t\t\t\t\tfontFamiliesToActivate.push( installedFontFamily );\n\t\t\t\t}\n\n\t\t\t\t// If the font family is new and is not a system font, delete it to avoid having font families without font faces.\n\t\t\t\tif (\n\t\t\t\t\tisANewFontFamily &&\n\t\t\t\t\t( fontFamilyToInstall?.fontFace?.length ?? 0 ) > 0 &&\n\t\t\t\t\tsuccessfullyInstalledFontFaces?.length === 0\n\t\t\t\t) {\n\t\t\t\t\tawait deleteEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t'wp_font_family',\n\t\t\t\t\t\tinstalledFontFamily.id,\n\t\t\t\t\t\t{ force: true }\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tinstallationErrors = installationErrors.concat(\n\t\t\t\t\tunsuccessfullyInstalledFontFaces\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst installationErrorMessages: string[] =\n\t\t\t\tinstallationErrors.reduce(\n\t\t\t\t\t( unique: string[], item ) =>\n\t\t\t\t\t\tunique.includes( item.message )\n\t\t\t\t\t\t\t? unique\n\t\t\t\t\t\t\t: [ ...unique, item.message ],\n\t\t\t\t\t[]\n\t\t\t\t);\n\n\t\t\tif ( fontFamiliesToActivate.length > 0 ) {\n\t\t\t\t// Activate the font family (add the font family to the global styles).\n\t\t\t\tconst activeFonts = activateCustomFontFamilies(\n\t\t\t\t\t// @ts-expect-error - Type mismatch: items may have id as number | string, but FontFamily.id should be string | undefined.\n\t\t\t\t\tfontFamiliesToActivate\n\t\t\t\t);\n\t\t\t\t// Save the global styles to the database.\n\t\t\t\tawait saveFontFamilies( activeFonts );\n\t\t\t}\n\n\t\t\tif ( installationErrorMessages.length > 0 ) {\n\t\t\t\tconst installError: Error & {\n\t\t\t\t\tinstallationErrors?: string[];\n\t\t\t\t} = new Error( __( 'There was an error installing fonts.' ) );\n\n\t\t\t\tinstallError.installationErrors = installationErrorMessages;\n\n\t\t\t\tthrow installError;\n\t\t\t}\n\t\t} finally {\n\t\t\tsetIsInstalling( false );\n\t\t}\n\t}\n\n\tasync function uninstallFontFamily( fontFamilyToUninstall: FontFamily ) {\n\t\tif ( ! fontFamilyToUninstall?.id ) {\n\t\t\tthrow new Error( __( 'Font family to uninstall is not defined.' ) );\n\t\t}\n\t\ttry {\n\t\t\t// Uninstall the font family.\n\t\t\t// (Removes the font files from the server and the posts from the database).\n\t\t\tawait deleteEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'wp_font_family',\n\t\t\t\tfontFamilyToUninstall.id,\n\t\t\t\t{ force: true }\n\t\t\t);\n\n\t\t\t// Deactivate the font family (remove from global styles).\n\t\t\tconst activeFonts = deactivateFontFamily( fontFamilyToUninstall );\n\t\t\t// Save the global styles to the database.\n\t\t\tawait saveFontFamilies( activeFonts );\n\t\t\treturn { deleted: true };\n\t\t} catch ( error ) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.error(\n\t\t\t\t`There was an error uninstalling the font family:`,\n\t\t\t\terror\n\t\t\t);\n\t\t\tthrow error;\n\t\t}\n\t}\n\n\tconst deactivateFontFamily = ( font: FontFamily ) => {\n\t\t// If the user doesn't have custom fonts defined, include as custom fonts all the theme fonts\n\t\t// We want to save as active all the theme fonts at the beginning\n\t\tconst initialCustomFonts = fontFamilies?.[ font.source ?? '' ] ?? [];\n\t\tconst newCustomFonts = initialCustomFonts.filter(\n\t\t\t( f ) => f.slug !== font.slug\n\t\t);\n\t\tconst activeFonts = {\n\t\t\t...fontFamilies,\n\t\t\t[ font.source ?? '' ]: newCustomFonts,\n\t\t};\n\t\tsetFontFamilies( activeFonts );\n\n\t\tif ( font.fontFace ) {\n\t\t\tfont.fontFace.forEach( ( face ) => {\n\t\t\t\tunloadFontFaceInBrowser( face, 'all' );\n\t\t\t} );\n\t\t}\n\t\treturn activeFonts;\n\t};\n\n\tconst activateCustomFontFamilies = ( fontsToAdd: FontFamily[] ) => {\n\t\tconst fontsToActivate = cleanFontsForSave( fontsToAdd );\n\n\t\tconst activeFonts = {\n\t\t\t...fontFamilies,\n\t\t\t// Merge the existing custom fonts with the new fonts.\n\t\t\tcustom: mergeFontFamilies( fontFamilies?.custom, fontsToActivate ),\n\t\t};\n\n\t\t// Activate the fonts by set the new custom fonts array.\n\t\tsetFontFamilies( activeFonts );\n\n\t\tloadFontsInBrowser( fontsToActivate );\n\n\t\treturn activeFonts;\n\t};\n\n\t// Removes the id from the families and faces to avoid saving that to global styles post content.\n\tconst cleanFontsForSave = ( fonts: FontFamily[] ) => {\n\t\treturn fonts.map( ( { id: _familyDbId, fontFace, ...font } ) => ( {\n\t\t\t...font,\n\t\t\t...( fontFace && fontFace.length > 0\n\t\t\t\t? {\n\t\t\t\t\t\tfontFace: fontFace.map(\n\t\t\t\t\t\t\t( { id: _faceDbId, ...face } ) => face\n\t\t\t\t\t\t),\n\t\t\t\t }\n\t\t\t\t: {} ),\n\t\t} ) );\n\t};\n\n\tconst loadFontsInBrowser = ( fonts: FontFamily[] ) => {\n\t\t// Add custom fonts to the browser.\n\t\tfonts.forEach( ( font ) => {\n\t\t\tif ( font.fontFace ) {\n\t\t\t\tfont.fontFace.forEach( ( face ) => {\n\t\t\t\t\tconst displaySrc = getDisplaySrcFromFontFace(\n\t\t\t\t\t\tface?.src ?? ''\n\t\t\t\t\t);\n\t\t\t\t\tif ( displaySrc ) {\n\t\t\t\t\t\t// Load font faces just in the iframe because they already are in the document.\n\t\t\t\t\t\tloadFontFaceInBrowser( face, displaySrc, 'all' );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t};\n\n\tconst toggleActivateFont = ( font: FontFamily, face?: FontFace ) => {\n\t\t// If the user doesn't have custom fonts defined, include as custom fonts all the theme fonts\n\t\t// We want to save as active all the theme fonts at the beginning\n\t\tconst initialFonts = fontFamilies?.[ font.source ?? '' ] ?? [];\n\t\t// Toggles the received font family or font face\n\t\tconst newFonts = toggleFont( font, face, initialFonts );\n\t\t// Updates the font families activated in global settings:\n\t\tsetFontFamilies( {\n\t\t\t...fontFamilies,\n\t\t\t[ font.source ?? '' ]: newFonts,\n\t\t} );\n\n\t\tconst isFaceActivated = isFontActivated(\n\t\t\tfont.slug,\n\t\t\tface?.fontStyle ?? '',\n\t\t\tface?.fontWeight ?? '',\n\t\t\tfont.source ?? 'custom'\n\t\t);\n\n\t\tif ( face && isFaceActivated ) {\n\t\t\tunloadFontFaceInBrowser( face, 'all' );\n\t\t} else {\n\t\t\tconst displaySrc = getDisplaySrcFromFontFace( face?.src ?? '' );\n\t\t\t// If the font doesn't have a src, don't load it.\n\t\t\tif ( face && displaySrc ) {\n\t\t\t\tloadFontFaceInBrowser( face, displaySrc, 'all' );\n\t\t\t}\n\t\t}\n\t};\n\n\tconst loadFontFaceAsset = async ( fontFace: FontFace ) => {\n\t\t// If the font doesn't have a src, don't load it.\n\t\tif ( ! fontFace.src ) {\n\t\t\treturn;\n\t\t}\n\t\t// Get the src of the font.\n\t\tconst src = getDisplaySrcFromFontFace( fontFace.src );\n\t\t// If the font is already loaded, don't load it again.\n\t\tif ( ! src || loadedFontUrls.has( src ) ) {\n\t\t\treturn;\n\t\t}\n\t\t// Load the font in the browser.\n\t\tloadFontFaceInBrowser( fontFace, src, 'document' );\n\t\t// Add the font to the loaded fonts list.\n\t\tloadedFontUrls.add( src );\n\t};\n\n\treturn (\n\t\t<FontLibraryContext.Provider\n\t\t\tvalue={ {\n\t\t\t\tlibraryFontSelected,\n\t\t\t\thandleSetLibraryFontSelected,\n\t\t\t\tfontFamilies: fontFamilies ?? {},\n\t\t\t\tbaseCustomFonts,\n\t\t\t\tisFontActivated,\n\t\t\t\tgetFontFacesActivated,\n\t\t\t\tloadFontFaceAsset,\n\t\t\t\tinstallFonts,\n\t\t\t\tuninstallFontFamily,\n\t\t\t\ttoggleActivateFont,\n\t\t\t\tgetAvailableFontsOutline,\n\t\t\t\tmodalTabOpen,\n\t\t\t\tsetModalTabOpen,\n\t\t\t\tsaveFontFamilies,\n\t\t\t\tisResolvingLibrary,\n\t\t\t\tisInstalling,\n\t\t\t} }\n\t\t>\n\t\t\t{ children }\n\t\t</FontLibraryContext.Provider>\n\t);\n}\n\nexport default FontLibraryProvider;\n", "/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport type {\n\tCollectionFontFace,\n\tCollectionFontFamily,\n\tFontFace,\n} from '@wordpress/core-data';\nimport type { DataRegistry } from '@wordpress/data';\n\nconst FONT_FAMILIES_URL = '/wp/v2/font-families';\n\n/**\n * Invalidates the cache for font family queries.\n * This should be called after installing fonts\n * to ensure the UI reflects the latest state.\n *\n * @param registry The data registry to use for dispatching actions.\n */\nfunction invalidateFontFamilyCache( registry: DataRegistry ) {\n\tconst { receiveEntityRecords } = registry.dispatch( coreDataStore );\n\n\t// Invalidate all font family queries\n\t// Ideally there should be a dedicated action to do this\n\t// \"invalide all cacches for this entity type\"\n\treceiveEntityRecords(\n\t\t'postType',\n\t\t'wp_font_family',\n\t\t[],\n\t\tundefined,\n\t\ttrue // invalidateCache\n\t);\n}\n\nexport async function fetchInstallFontFamily(\n\tdata: FormData,\n\tregistry: DataRegistry\n) {\n\tconst config = {\n\t\tpath: FONT_FAMILIES_URL,\n\t\tmethod: 'POST',\n\t\tbody: data,\n\t};\n\tconst response: CollectionFontFamily = await apiFetch( config );\n\tinvalidateFontFamilyCache( registry );\n\n\treturn {\n\t\tid: response.id as string,\n\t\t...response.font_family_settings,\n\t\tfontFace: [],\n\t};\n}\n\nexport async function fetchInstallFontFace(\n\tfontFamilyId: string,\n\tdata: FormData,\n\tregistry: DataRegistry\n): Promise< FontFace > {\n\tconst config = {\n\t\tpath: `${ FONT_FAMILIES_URL }/${ fontFamilyId }/font-faces`,\n\t\tmethod: 'POST',\n\t\tbody: data,\n\t};\n\tconst response = ( await apiFetch( config ) ) as CollectionFontFace;\n\tinvalidateFontFamilyCache( registry );\n\treturn {\n\t\tid: response.id,\n\t\t...response.font_face_settings,\n\t};\n}\n", "/**\n * WordPress dependencies\n */\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport type { FontFamily, FontFace } from '@wordpress/core-data';\nimport type { DataRegistry } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { FONT_WEIGHTS, FONT_STYLES } from './constants';\nimport { fetchInstallFontFace } from '../api';\nimport { formatFontFaceName } from './preview-styles';\nimport type { FontFamilyToUpload, FontUploadResult } from '../types';\nimport { unlock } from '../../lock-unlock';\n\n/**\n * Browser dependencies\n */\nconst { File } = window;\nconst { kebabCase } = unlock( componentsPrivateApis );\n\nexport function setUIValuesNeeded(\n\tfont: FontFamily,\n\textraValues: Partial< FontFamily > = {}\n): FontFamily {\n\tif ( ! font.name && ( font.fontFamily || font.slug ) ) {\n\t\tfont.name = font.fontFamily || font.slug;\n\t}\n\treturn {\n\t\t...font,\n\t\t...extraValues,\n\t};\n}\n\nexport function isUrlEncoded( url: string ): boolean {\n\tif ( typeof url !== 'string' ) {\n\t\treturn false;\n\t}\n\treturn url !== decodeURIComponent( url );\n}\n\nexport function getFontFaceVariantName( face: FontFace ): string {\n\tconst weightName = FONT_WEIGHTS[ face.fontWeight ?? '' ] || face.fontWeight;\n\tconst styleName =\n\t\tface.fontStyle === 'normal'\n\t\t\t? ''\n\t\t\t: FONT_STYLES[ face.fontStyle ?? '' ] || face.fontStyle;\n\treturn `${ weightName } ${ styleName }`;\n}\n\nexport function mergeFontFaces(\n\texisting: FontFace[] = [],\n\tincoming: FontFace[] = []\n): FontFace[] {\n\tconst map = new Map();\n\tfor ( const face of existing ) {\n\t\tmap.set( `${ face.fontWeight }${ face.fontStyle }`, face );\n\t}\n\tfor ( const face of incoming ) {\n\t\t// This will overwrite if the src already exists, keeping it unique.\n\t\tmap.set( `${ face.fontWeight }${ face.fontStyle }`, face );\n\t}\n\treturn Array.from( map.values() );\n}\n\nexport function mergeFontFamilies(\n\texisting: FontFamily[] = [],\n\tincoming: FontFamily[] = []\n): FontFamily[] {\n\tconst map = new Map();\n\t// Add the existing array to the map.\n\tfor ( const font of existing ) {\n\t\tmap.set( font.slug, { ...font } );\n\t}\n\t// Add the incoming array to the map, overwriting existing values excepting fontFace that need to be merged.\n\tfor ( const font of incoming ) {\n\t\tif ( map.has( font.slug ) ) {\n\t\t\tconst { fontFace: incomingFontFaces, ...restIncoming } = font;\n\t\t\tconst existingFont = map.get( font.slug );\n\t\t\t// Merge the fontFaces existing with the incoming fontFaces.\n\t\t\tconst mergedFontFaces = mergeFontFaces(\n\t\t\t\texistingFont.fontFace,\n\t\t\t\tincomingFontFaces\n\t\t\t);\n\t\t\t// Except for the fontFace key all the other keys are overwritten with the incoming values.\n\t\t\tmap.set( font.slug, {\n\t\t\t\t...restIncoming,\n\t\t\t\tfontFace: mergedFontFaces,\n\t\t\t} );\n\t\t} else {\n\t\t\tmap.set( font.slug, { ...font } );\n\t\t}\n\t}\n\treturn Array.from( map.values() );\n}\n\n/*\n * Loads the font face from a URL and adds it to the browser.\n * It also adds it to the iframe document.\n */\nexport async function loadFontFaceInBrowser(\n\tfontFace: FontFace,\n\tsource: string | File,\n\taddTo: 'all' | 'document' | 'iframe' = 'all'\n): Promise< void > {\n\tlet dataSource;\n\n\tif ( typeof source === 'string' ) {\n\t\tdataSource = `url(${ source })`;\n\t} else if ( source instanceof File ) {\n\t\tdataSource = await source.arrayBuffer();\n\t} else {\n\t\treturn;\n\t}\n\n\tconst newFont = new window.FontFace(\n\t\tformatFontFaceName( fontFace.fontFamily ),\n\t\tdataSource,\n\t\t{\n\t\t\tstyle: fontFace.fontStyle,\n\t\t\tweight: String( fontFace.fontWeight ),\n\t\t}\n\t);\n\n\tconst loadedFace = await newFont.load();\n\n\tif ( addTo === 'document' || addTo === 'all' ) {\n\t\tdocument.fonts.add( loadedFace );\n\t}\n\n\tif ( addTo === 'iframe' || addTo === 'all' ) {\n\t\tconst iframe = document.querySelector(\n\t\t\t'iframe[name=\"editor-canvas\"]'\n\t\t) as HTMLIFrameElement;\n\t\tif ( iframe?.contentDocument ) {\n\t\t\tiframe.contentDocument.fonts.add( loadedFace );\n\t\t}\n\t}\n}\n\n/*\n * Unloads the font face and remove it from the browser.\n * It also removes it from the iframe document.\n *\n * Note that Font faces that were added to the set using the CSS @font-face rule\n * remain connected to the corresponding CSS, and cannot be deleted.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/delete.\n */\nexport function unloadFontFaceInBrowser(\n\tfontFace: FontFace,\n\tremoveFrom: 'all' | 'document' | 'iframe' = 'all'\n): void {\n\tconst unloadFontFace = ( fonts: FontFaceSet ) => {\n\t\tfonts.forEach( ( f ) => {\n\t\t\tif (\n\t\t\t\tf.family === formatFontFaceName( fontFace?.fontFamily ) &&\n\t\t\t\tf.weight === fontFace?.fontWeight &&\n\t\t\t\tf.style === fontFace?.fontStyle\n\t\t\t) {\n\t\t\t\tfonts.delete( f );\n\t\t\t}\n\t\t} );\n\t};\n\n\tif ( removeFrom === 'document' || removeFrom === 'all' ) {\n\t\tunloadFontFace( document.fonts );\n\t}\n\n\tif ( removeFrom === 'iframe' || removeFrom === 'all' ) {\n\t\tconst iframe = document.querySelector(\n\t\t\t'iframe[name=\"editor-canvas\"]'\n\t\t) as HTMLIFrameElement;\n\t\tif ( iframe?.contentDocument ) {\n\t\t\tunloadFontFace( iframe.contentDocument.fonts );\n\t\t}\n\t}\n}\n\n/**\n * Retrieves the display source from a font face src.\n *\n * @param {string|string[]} input - The font face src.\n * @return {string|undefined} The display source or undefined if the input is invalid.\n */\nexport function getDisplaySrcFromFontFace(\n\tinput: string | string[]\n): string | undefined {\n\tif ( ! input ) {\n\t\treturn;\n\t}\n\n\tlet src;\n\tif ( Array.isArray( input ) ) {\n\t\tsrc = input[ 0 ];\n\t} else {\n\t\tsrc = input;\n\t}\n\t// It's expected theme fonts will already be loaded in the browser.\n\tif ( src.startsWith( 'file:.' ) ) {\n\t\treturn;\n\t}\n\tif ( ! isUrlEncoded( src ) ) {\n\t\tsrc = encodeURI( src );\n\t}\n\treturn src;\n}\n\nexport function makeFontFamilyFormData( fontFamily: FontFamily ): FormData {\n\tconst formData = new FormData();\n\n\tconst { fontFace, category, ...familyWithValidParameters } = fontFamily;\n\tconst fontFamilySettings = {\n\t\t...familyWithValidParameters,\n\t\tslug: kebabCase( fontFamily.slug ),\n\t};\n\n\tformData.append(\n\t\t'font_family_settings',\n\t\tJSON.stringify( fontFamilySettings )\n\t);\n\treturn formData;\n}\n\nexport function makeFontFacesFormData( font: FontFamilyToUpload ): FormData[] {\n\tconst fontFacesFormData = ( font?.fontFace ?? [] ).map(\n\t\t( item, faceIndex ) => {\n\t\t\tconst face = { ...item };\n\t\t\tconst formData = new FormData();\n\t\t\tif ( face.file ) {\n\t\t\t\t// Normalize to an array, since face.file may be a single file or an array of files.\n\t\t\t\tconst files = Array.isArray( face.file )\n\t\t\t\t\t? face.file\n\t\t\t\t\t: [ face.file ];\n\t\t\t\tconst src: string[] = [];\n\n\t\t\t\tfiles.forEach( ( file, key ) => {\n\t\t\t\t\t// Slugified file name because the it might contain spaces or characters treated differently on the server.\n\t\t\t\t\tconst fileId = `file-${ faceIndex }-${ key }`;\n\t\t\t\t\t// Add the files to the formData\n\t\t\t\t\tformData.append( fileId, file, file.name );\n\t\t\t\t\tsrc.push( fileId );\n\t\t\t\t} );\n\n\t\t\t\tface.src = src.length === 1 ? src[ 0 ] : src;\n\t\t\t\tdelete face.file;\n\n\t\t\t\tformData.append( 'font_face_settings', JSON.stringify( face ) );\n\t\t\t} else {\n\t\t\t\tformData.append( 'font_face_settings', JSON.stringify( face ) );\n\t\t\t}\n\t\t\treturn formData;\n\t\t}\n\t);\n\n\treturn fontFacesFormData;\n}\n\nexport async function batchInstallFontFaces(\n\tfontFamilyId: string,\n\tfontFacesData: FormData[],\n\tregistry: DataRegistry\n): Promise< FontUploadResult > {\n\tconst responses: {\n\t\tstatus: 'fulfilled' | 'rejected';\n\t\tvalue?: FontFace;\n\t\treason?: Error;\n\t}[] = [];\n\n\t/*\n\t * Uses the same response format as Promise.allSettled, but executes requests in sequence to work\n\t * around a race condition that can cause an error when the fonts directory doesn't exist yet.\n\t */\n\tfor ( const faceData of fontFacesData ) {\n\t\ttry {\n\t\t\tconst response = await fetchInstallFontFace(\n\t\t\t\tfontFamilyId,\n\t\t\t\tfaceData,\n\t\t\t\tregistry\n\t\t\t);\n\t\t\tresponses.push( { status: 'fulfilled', value: response } );\n\t\t} catch ( error ) {\n\t\t\tresponses.push( { status: 'rejected', reason: error as Error } );\n\t\t}\n\t}\n\n\tconst results: {\n\t\tsuccesses: FontFace[];\n\t\terrors: Array< {\n\t\t\tdata: FormData;\n\t\t\tmessage: string;\n\t\t} >;\n\t} = {\n\t\terrors: [],\n\t\tsuccesses: [],\n\t};\n\n\tresponses.forEach( ( result, index ) => {\n\t\tif ( result.status === 'fulfilled' && result.value ) {\n\t\t\tconst response = result.value;\n\t\t\tresults.successes.push( response );\n\t\t} else if ( result.reason ) {\n\t\t\t// Handle network errors or other fetch-related errors\n\t\t\tresults.errors.push( {\n\t\t\t\tdata: fontFacesData[ index ],\n\t\t\t\tmessage: result.reason.message,\n\t\t\t} );\n\t\t}\n\t} );\n\n\treturn results;\n}\n\n/*\n * Downloads a font face asset from a URL to the client and returns a File object.\n */\nexport async function downloadFontFaceAssets(\n\tsrc: string | string[]\n): Promise< File | File[] > {\n\t// Normalize to an array, since `src` could be a string or array.\n\tsrc = Array.isArray( src ) ? src : [ src ];\n\n\tconst files = await Promise.all(\n\t\tsrc.map( async ( url ) => {\n\t\t\treturn fetch( new Request( url ) )\n\t\t\t\t.then( ( response ) => {\n\t\t\t\t\tif ( ! response.ok ) {\n\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t`Error downloading font face asset from ${ url }. Server responded with status: ${ response.status }`\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\treturn response.blob();\n\t\t\t\t} )\n\t\t\t\t.then( ( blob ) => {\n\t\t\t\t\tconst filename = url.split( '/' ).pop() as string;\n\t\t\t\t\tconst file = new File( [ blob ], filename, {\n\t\t\t\t\t\ttype: blob.type,\n\t\t\t\t\t} );\n\t\t\t\t\treturn file;\n\t\t\t\t} );\n\t\t} )\n\t);\n\n\t// If we only have one file return it (not the array). Otherwise return all of them in the array.\n\treturn files.length === 1 ? files[ 0 ] : files;\n}\n\n/*\n * Determine if a given Font Face is present in a given collection.\n * We determine that a font face has been installed by comparing the fontWeight and fontStyle\n *\n * @param {Object} fontFace The Font Face to seek\n * @param {Array} collection The Collection to seek in\n * @returns True if the font face is found in the collection. Otherwise False.\n */\nexport function checkFontFaceInstalled(\n\tfontFace: FontFace,\n\tcollection: FontFace[]\n): boolean {\n\treturn (\n\t\t-1 !==\n\t\tcollection.findIndex( ( collectionFontFace ) => {\n\t\t\treturn (\n\t\t\t\tcollectionFontFace.fontWeight === fontFace.fontWeight &&\n\t\t\t\tcollectionFontFace.fontStyle === fontFace.fontStyle\n\t\t\t);\n\t\t} )\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { _x } from '@wordpress/i18n';\n\nexport const ALLOWED_FILE_EXTENSIONS = [ 'otf', 'ttf', 'woff', 'woff2' ];\n\nexport const FONT_WEIGHTS: Record< string, string > = {\n\t100: _x( 'Thin', 'font weight' ),\n\t200: _x( 'Extra-light', 'font weight' ),\n\t300: _x( 'Light', 'font weight' ),\n\t400: _x( 'Normal', 'font weight' ),\n\t500: _x( 'Medium', 'font weight' ),\n\t600: _x( 'Semi-bold', 'font weight' ),\n\t700: _x( 'Bold', 'font weight' ),\n\t800: _x( 'Extra-bold', 'font weight' ),\n\t900: _x( 'Black', 'font weight' ),\n};\n\nexport const FONT_STYLES: Record< string, string > = {\n\tnormal: _x( 'Normal', 'font style' ),\n\titalic: _x( 'Italic', 'font style' ),\n};\n", "/**\n * Immutably sets a value inside an object. Like `lodash#set`, but returning a\n * new object. Treats nullish initial values as empty objects. Clones any\n * nested objects. Supports arrays, too.\n * Duplicated from `packages/global-styles-engine/src/utils/object.ts`\n *\n * @param object Object to set a value in.\n * @param path Path in the object to modify.\n * @param value New value to set.\n * @return Cloned object with the new value set.\n */\nexport function setImmutably(\n\tobject: Object,\n\tpath: string | number | ( string | number )[],\n\tvalue: any\n) {\n\t// Normalize path\n\tpath = Array.isArray( path ) ? [ ...path ] : [ path ];\n\n\t// Shallowly clone the base of the object\n\tobject = Array.isArray( object ) ? [ ...object ] : { ...object };\n\n\tconst leaf = path.pop();\n\n\t// Traverse object from root to leaf, shallowly cloning at each level\n\tlet prev = object;\n\tfor ( const key of path ) {\n\t\t// @ts-expect-error\n\t\tconst lvl = prev[ key ];\n\t\t// @ts-expect-error\n\t\tprev = prev[ key ] = Array.isArray( lvl ) ? [ ...lvl ] : { ...lvl };\n\t}\n\t// @ts-expect-error\n\tprev[ leaf ] = value;\n\n\treturn object;\n}\n", "/**\n * Toggles the activation of a given font or font variant within a list of custom fonts.\n *\n * - If only the font is provided (without face), the entire font family's activation is toggled.\n * - If both font and face are provided, the activation of the specific font variant is toggled.\n *\n * @param {Object} font - The font to be toggled.\n * @param {string} font.slug - The unique identifier for the font.\n * @param {Array} [font.fontFace] - The list of font variants (faces) associated with the font.\n *\n * @param {Object} [face] - The specific font variant to be toggled.\n * @param {string} face.fontWeight - The weight of the font variant.\n * @param {string} face.fontStyle - The style of the font variant.\n *\n * @param {Array} initialfonts - The initial list of custom fonts.\n *\n * @return {Array} - The updated list of custom fonts with the font/font variant toggled.\n *\n * @example\n * const customFonts = [\n * { slug: 'roboto', fontFace: [{ fontWeight: '400', fontStyle: 'normal' }] }\n * ];\n *\n * toggleFont({ slug: 'roboto' }, null, customFonts);\n * // This will remove 'roboto' from customFonts\n *\n * toggleFont({ slug: 'roboto' }, { fontWeight: '400', fontStyle: 'normal' }, customFonts);\n * // This will remove the specified face from 'roboto' in customFonts\n *\n * toggleFont({ slug: 'roboto' }, { fontWeight: '500', fontStyle: 'normal' }, customFonts);\n * // This will add the specified face to 'roboto' in customFonts\n */\n/**\n * WordPress dependencies\n */\nimport type { FontFamily, FontFace } from '@wordpress/core-data';\n\nexport function toggleFont(\n\tfont: FontFamily,\n\tface?: FontFace,\n\tinitialfonts: FontFamily[] = []\n): FontFamily[] {\n\t// Helper to check if a font is activated based on its slug\n\tconst isFontActivated = ( f: FontFamily ): boolean => f.slug === font.slug;\n\n\t// Helper to get the activated font from a list of fonts\n\tconst getActivatedFont = ( fonts: FontFamily[] ): FontFamily | undefined =>\n\t\tfonts.find( isFontActivated );\n\n\t// Toggle the activation status of an entire font family\n\tconst toggleEntireFontFamily = (\n\t\tactivatedFont: FontFamily | undefined\n\t): FontFamily[] => {\n\t\tif ( ! activatedFont ) {\n\t\t\t// If the font is not active, activate the entire font family\n\t\t\treturn [ ...initialfonts, font ];\n\t\t}\n\t\t// If the font is already active, deactivate the entire font family\n\t\treturn initialfonts.filter(\n\t\t\t( f: FontFamily ) => ! isFontActivated( f )\n\t\t);\n\t};\n\n\t// Toggle the activation status of a specific font variant\n\tconst toggleFontVariant = (\n\t\tactivatedFont: FontFamily | undefined\n\t): FontFamily[] => {\n\t\tconst isFaceActivated = ( f: FontFace ): boolean =>\n\t\t\tf.fontWeight === face!.fontWeight &&\n\t\t\tf.fontStyle === face!.fontStyle;\n\n\t\tif ( ! activatedFont ) {\n\t\t\t// If the font family is not active, activate the font family with the font variant\n\t\t\treturn [ ...initialfonts, { ...font, fontFace: [ face! ] } ];\n\t\t}\n\n\t\tlet newFontFaces = activatedFont.fontFace || [];\n\n\t\tif ( newFontFaces.find( isFaceActivated ) ) {\n\t\t\t// If the font variant is active, deactivate it\n\t\t\tnewFontFaces = newFontFaces.filter(\n\t\t\t\t( f: FontFace ) => ! isFaceActivated( f )\n\t\t\t);\n\t\t} else {\n\t\t\t// If the font variant is not active, activate it\n\t\t\tnewFontFaces = [ ...newFontFaces, face! ];\n\t\t}\n\n\t\t// If there are no more font faces, deactivate the font family\n\t\tif ( newFontFaces.length === 0 ) {\n\t\t\treturn initialfonts.filter(\n\t\t\t\t( f: FontFamily ) => ! isFontActivated( f )\n\t\t\t);\n\t\t}\n\n\t\t// Return updated fonts list with toggled font variant\n\t\treturn initialfonts.map( ( f: FontFamily ) =>\n\t\t\tisFontActivated( f ) ? { ...f, fontFace: newFontFaces } : f\n\t\t);\n\t};\n\n\tconst activatedFont = getActivatedFont( initialfonts );\n\n\tif ( ! face ) {\n\t\treturn toggleEntireFontFamily( activatedFont );\n\t}\n\n\treturn toggleFontVariant( activatedFont );\n}\n", "/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tModal,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { store as coreStore, useEntityRecords } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport type { FontCollection as FontCollectionType } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport InstalledFonts from './installed-fonts';\nimport FontCollection from './font-collection';\nimport UploadFonts from './upload-fonts';\nimport { unlock } from '../lock-unlock';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nconst DEFAULT_TAB = {\n\tid: 'installed-fonts',\n\ttitle: _x( 'Library', 'Font library' ),\n};\n\nconst UPLOAD_TAB = {\n\tid: 'upload-fonts',\n\ttitle: _x( 'Upload', 'noun' ),\n};\n\nconst tabsFromCollections = ( collections: FontCollectionType[] ) =>\n\tcollections.map( ( { slug, name } ) => ( {\n\t\tid: slug,\n\t\ttitle:\n\t\t\tcollections.length === 1 && slug === 'google-fonts'\n\t\t\t\t? __( 'Install Fonts' )\n\t\t\t\t: name,\n\t} ) );\n\nfunction FontLibraryModal( {\n\tonRequestClose,\n\tdefaultTabId = 'installed-fonts',\n}: {\n\tonRequestClose: () => void;\n\tdefaultTabId?: string;\n} ) {\n\tconst { records: collections = [] } =\n\t\tuseEntityRecords< FontCollectionType >( 'root', 'fontCollection', {\n\t\t\t_fields: 'slug,name,description',\n\t\t} );\n\tconst canUserCreate = useSelect( ( select ) => {\n\t\treturn select( coreStore ).canUser( 'create', {\n\t\t\tkind: 'postType',\n\t\t\tname: 'wp_font_family',\n\t\t} );\n\t}, [] );\n\n\tconst tabs: { id: string; title: string }[] = [ DEFAULT_TAB ];\n\n\tif ( canUserCreate ) {\n\t\ttabs.push( UPLOAD_TAB );\n\t\ttabs.push( ...tabsFromCollections( collections || [] ) );\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ __( 'Fonts' ) }\n\t\t\tonRequestClose={ onRequestClose }\n\t\t\tisFullScreen\n\t\t\tclassName=\"font-library-modal\"\n\t\t>\n\t\t\t<Tabs defaultTabId={ defaultTabId }>\n\t\t\t\t<div className=\"font-library-modal__tablist-container\">\n\t\t\t\t\t<Tabs.TabList>\n\t\t\t\t\t\t{ tabs.map( ( { id, title } ) => (\n\t\t\t\t\t\t\t<Tabs.Tab key={ id } tabId={ id }>\n\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</Tabs.TabList>\n\t\t\t\t</div>\n\t\t\t\t{ tabs.map( ( { id } ) => {\n\t\t\t\t\tlet contents;\n\t\t\t\t\tswitch ( id ) {\n\t\t\t\t\t\tcase 'upload-fonts':\n\t\t\t\t\t\t\tcontents = <UploadFonts />;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'installed-fonts':\n\t\t\t\t\t\t\tcontents = <InstalledFonts />;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tcontents = <FontCollection slug={ id } />;\n\t\t\t\t\t}\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\t\t\tkey={ id }\n\t\t\t\t\t\t\ttabId={ id }\n\t\t\t\t\t\t\tfocusable={ false }\n\t\t\t\t\t\t\tclassName=\"font-library-modal__tab-panel\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ contents }\n\t\t\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</Tabs>\n\t\t</Modal>\n\t);\n}\n\nexport default FontLibraryModal;\n", "/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\t__experimentalConfirmDialog as ConfirmDialog,\n\t__experimentalHStack as HStack,\n\t__experimentalHeading as Heading,\n\tNavigator,\n\tuseNavigator,\n\t__experimentalSpacer as Spacer,\n\t__experimentalText as Text,\n\t__experimentalVStack as VStack,\n\tFlex,\n\tNotice,\n\tProgressBar,\n\tCheckboxControl,\n} from '@wordpress/components';\nimport { useEntityRecord, store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useContext, useEffect, useState } from '@wordpress/element';\nimport { __, _x, sprintf, isRTL } from '@wordpress/i18n';\nimport { chevronLeft, chevronRight } from '@wordpress/icons';\nimport type {\n\tFontFamilyPreset,\n\tGlobalStylesConfig,\n} from '@wordpress/global-styles-engine';\nimport type { FontFamily } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { FontLibraryContext } from './context';\nimport FontCard from './font-card';\nimport LibraryFontVariant from './library-font-variant';\nimport { sortFontFaces } from './utils/sort-font-faces';\nimport {\n\tsetUIValuesNeeded,\n\tloadFontFaceInBrowser,\n\tunloadFontFaceInBrowser,\n\tgetDisplaySrcFromFontFace,\n} from './utils';\nimport { useSetting } from '../hooks';\n\nfunction InstalledFonts() {\n\tconst {\n\t\tbaseCustomFonts,\n\t\tlibraryFontSelected,\n\t\thandleSetLibraryFontSelected,\n\t\tuninstallFontFamily,\n\t\tisResolvingLibrary,\n\t\tisInstalling,\n\t\tsaveFontFamilies,\n\t\tgetFontFacesActivated,\n\t} = useContext( FontLibraryContext );\n\n\tconst [ fontFamilies, setFontFamilies ] = useSetting<\n\t\tRecord< string, FontFamilyPreset[] > | undefined\n\t>( 'typography.fontFamilies' );\n\tconst [ isConfirmDeleteOpen, setIsConfirmDeleteOpen ] =\n\t\tuseState< boolean >( false );\n\tconst [ notice, setNotice ] = useState< {\n\t\ttype: 'success' | 'error' | 'info';\n\t\tmessage: string;\n\t} | null >( null );\n\tconst [ baseFontFamilies ] = useSetting<\n\t\tRecord< string, FontFamilyPreset[] > | undefined\n\t>( 'typography.fontFamilies', undefined, 'base' );\n\tconst globalStylesId = useSelect( ( select ) => {\n\t\tconst { __experimentalGetCurrentGlobalStylesId } = select( coreStore );\n\t\treturn __experimentalGetCurrentGlobalStylesId();\n\t}, [] );\n\tconst globalStyles = useEntityRecord< GlobalStylesConfig >(\n\t\t'root',\n\t\t'globalStyles',\n\t\tglobalStylesId\n\t);\n\tconst fontFamiliesHasChanges =\n\t\t!! globalStyles?.edits?.settings?.typography?.fontFamilies;\n\n\tconst themeFonts = fontFamilies?.theme\n\t\t? fontFamilies.theme\n\t\t\t\t.map( ( f ) => setUIValuesNeeded( f, { source: 'theme' } ) )\n\t\t\t\t.sort( ( a, b ) => a.name.localeCompare( b.name ) )\n\t\t: [];\n\tconst themeFontsSlugs = new Set( themeFonts.map( ( f ) => f.slug ) );\n\tconst baseThemeFonts = baseFontFamilies?.theme\n\t\t? themeFonts.concat(\n\t\t\t\tbaseFontFamilies.theme\n\t\t\t\t\t.filter( ( f ) => ! themeFontsSlugs.has( f.slug ) )\n\t\t\t\t\t.map( ( f ) => setUIValuesNeeded( f, { source: 'theme' } ) )\n\t\t\t\t\t.sort( ( a, b ) => a.name.localeCompare( b.name ) )\n\t\t )\n\t\t: [];\n\n\tconst customFontFamilyId =\n\t\tlibraryFontSelected?.source === 'custom' && libraryFontSelected?.id;\n\n\tconst canUserDelete = useSelect(\n\t\t( select ) => {\n\t\t\tconst { canUser } = select( coreStore );\n\t\t\treturn (\n\t\t\t\tcustomFontFamilyId &&\n\t\t\t\tcanUser( 'delete', {\n\t\t\t\t\tkind: 'postType',\n\t\t\t\t\tname: 'wp_font_family',\n\t\t\t\t\tid: customFontFamilyId,\n\t\t\t\t} )\n\t\t\t);\n\t\t},\n\t\t[ customFontFamilyId ]\n\t);\n\n\tconst shouldDisplayDeleteButton =\n\t\t!! libraryFontSelected &&\n\t\tlibraryFontSelected?.source !== 'theme' &&\n\t\tcanUserDelete;\n\n\tconst handleUninstallClick = () => {\n\t\tsetIsConfirmDeleteOpen( true );\n\t};\n\n\tconst handleUpdate = async () => {\n\t\tsetNotice( null );\n\t\ttry {\n\t\t\tawait saveFontFamilies( fontFamilies );\n\t\t\tsetNotice( {\n\t\t\t\ttype: 'success',\n\t\t\t\tmessage: __( 'Font family updated successfully.' ),\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\tsetNotice( {\n\t\t\t\ttype: 'error',\n\t\t\t\tmessage: sprintf(\n\t\t\t\t\t/* translators: %s: error message */\n\t\t\t\t\t__( 'There was an error updating the font family. %s' ),\n\t\t\t\t\t( error as Error ).message\n\t\t\t\t),\n\t\t\t} );\n\t\t}\n\t};\n\n\tconst getFontFacesToDisplay = ( font: FontFamily ) => {\n\t\tif ( ! font ) {\n\t\t\treturn [];\n\t\t}\n\t\tif ( ! font.fontFace || ! font.fontFace.length ) {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tfontFamily: font.fontFamily,\n\t\t\t\t\tfontStyle: 'normal',\n\t\t\t\t\tfontWeight: '400',\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\t\treturn sortFontFaces( font.fontFace );\n\t};\n\n\tconst getFontCardVariantsText = ( font: FontFamily ) => {\n\t\tconst variantsInstalled =\n\t\t\tfont?.fontFace && ( font?.fontFace?.length ?? 0 ) > 0\n\t\t\t\t? font.fontFace.length\n\t\t\t\t: 1;\n\t\tconst variantsActive = getFontFacesActivated(\n\t\t\tfont.slug,\n\t\t\tfont.source\n\t\t).length;\n\t\treturn sprintf(\n\t\t\t/* translators: 1: Active font variants, 2: Total font variants. */\n\t\t\t__( '%1$d/%2$d variants active' ),\n\t\t\tvariantsActive,\n\t\t\tvariantsInstalled\n\t\t);\n\t};\n\n\tuseEffect( () => {\n\t\thandleSetLibraryFontSelected( libraryFontSelected );\n\t}, [] );\n\n\t// Get activated fonts count.\n\tconst activeFontsCount = libraryFontSelected\n\t\t? getFontFacesActivated(\n\t\t\t\tlibraryFontSelected.slug,\n\t\t\t\tlibraryFontSelected.source\n\t\t ).length\n\t\t: 0;\n\n\tconst selectedFontsCount =\n\t\tlibraryFontSelected?.fontFace?.length ??\n\t\t( libraryFontSelected?.fontFamily ? 1 : 0 );\n\n\t// Check if any fonts are selected.\n\tconst isIndeterminate =\n\t\tactiveFontsCount > 0 && activeFontsCount !== selectedFontsCount;\n\n\t// Check if all fonts are selected.\n\tconst isSelectAllChecked = activeFontsCount === selectedFontsCount;\n\n\t// Toggle select all fonts.\n\tconst toggleSelectAll = () => {\n\t\tif ( ! libraryFontSelected || ! libraryFontSelected?.source ) {\n\t\t\treturn;\n\t\t}\n\t\tconst initialFonts =\n\t\t\tfontFamilies?.[ libraryFontSelected.source ]?.filter(\n\t\t\t\t( f ) => f.slug !== libraryFontSelected.slug\n\t\t\t) ?? [];\n\t\tconst newFonts = isSelectAllChecked\n\t\t\t? initialFonts\n\t\t\t: [ ...initialFonts, libraryFontSelected ];\n\n\t\tsetFontFamilies( {\n\t\t\t...fontFamilies,\n\t\t\t[ libraryFontSelected.source ]: newFonts,\n\t\t} );\n\n\t\tif ( libraryFontSelected.fontFace ) {\n\t\t\tlibraryFontSelected.fontFace.forEach( ( face ) => {\n\t\t\t\tif ( isSelectAllChecked ) {\n\t\t\t\t\tunloadFontFaceInBrowser( face, 'all' );\n\t\t\t\t} else {\n\t\t\t\t\tconst displaySrc = getDisplaySrcFromFontFace(\n\t\t\t\t\t\tface?.src ?? ''\n\t\t\t\t\t);\n\t\t\t\t\tif ( displaySrc ) {\n\t\t\t\t\t\tloadFontFaceInBrowser( face, displaySrc, 'all' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t};\n\n\tconst hasFonts = baseThemeFonts.length > 0 || baseCustomFonts.length > 0;\n\treturn (\n\t\t<div className=\"font-library__tabpanel-layout\">\n\t\t\t{ isResolvingLibrary && (\n\t\t\t\t<div className=\"font-library__loading\">\n\t\t\t\t\t<ProgressBar />\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t{ ! isResolvingLibrary && (\n\t\t\t\t<>\n\t\t\t\t\t<Navigator\n\t\t\t\t\t\tinitialPath={\n\t\t\t\t\t\t\tlibraryFontSelected ? '/fontFamily' : '/'\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Navigator.Screen path=\"/\">\n\t\t\t\t\t\t\t<VStack spacing=\"8\">\n\t\t\t\t\t\t\t\t{ notice && (\n\t\t\t\t\t\t\t\t\t<Notice\n\t\t\t\t\t\t\t\t\t\tstatus={ notice.type }\n\t\t\t\t\t\t\t\t\t\tonRemove={ () => setNotice( null ) }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ notice.message }\n\t\t\t\t\t\t\t\t\t</Notice>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ ! hasFonts && (\n\t\t\t\t\t\t\t\t\t<Text as=\"p\">\n\t\t\t\t\t\t\t\t\t\t{ __( 'No fonts installed.' ) }\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ baseThemeFonts.length > 0 && (\n\t\t\t\t\t\t\t\t\t<VStack>\n\t\t\t\t\t\t\t\t\t\t<h2 className=\"font-library__fonts-title\">\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t/* translators: Heading for a list of fonts provided by the theme. */\n\t\t\t\t\t\t\t\t\t\t\t\t_x( 'Theme', 'font source' )\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t\t\t\t{ /*\n\t\t\t\t\t\t\t\t\t\t * Disable reason: The `list` ARIA role is redundant but\n\t\t\t\t\t\t\t\t\t\t * Safari+VoiceOver won't announce the list otherwise.\n\t\t\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t\t\t/* eslint-disable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t\t\t\t\t\t\t<ul\n\t\t\t\t\t\t\t\t\t\t\trole=\"list\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-library__fonts-list\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ baseThemeFonts.map( ( font ) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={ font.slug }\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-library__fonts-list-item\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FontCard\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont={ font }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnavigatorPath=\"/fontFamily\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariantsText={ getFontCardVariantsText(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetNotice( null );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thandleSetLibraryFontSelected(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t{ /* eslint-enable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ baseCustomFonts.length > 0 && (\n\t\t\t\t\t\t\t\t\t<VStack>\n\t\t\t\t\t\t\t\t\t\t<h2 className=\"font-library__fonts-title\">\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t/* translators: Heading for a list of fonts installed by the user. */\n\t\t\t\t\t\t\t\t\t\t\t\t_x( 'Custom', 'font source' )\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t\t\t\t{ /*\n\t\t\t\t\t\t\t\t\t\t * Disable reason: The `list` ARIA role is redundant but\n\t\t\t\t\t\t\t\t\t\t * Safari+VoiceOver won't announce the list otherwise.\n\t\t\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t\t\t/* eslint-disable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t\t\t\t\t\t\t<ul\n\t\t\t\t\t\t\t\t\t\t\trole=\"list\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-library__fonts-list\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ baseCustomFonts.map( ( font ) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={ font.slug }\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-library__fonts-list-item\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FontCard\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont={ font }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnavigatorPath=\"/fontFamily\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariantsText={ getFontCardVariantsText(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetNotice( null );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thandleSetLibraryFontSelected(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t{ /* eslint-enable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t</Navigator.Screen>\n\n\t\t\t\t\t\t<Navigator.Screen path=\"/fontFamily\">\n\t\t\t\t\t\t\t{ libraryFontSelected && (\n\t\t\t\t\t\t\t\t<ConfirmDeleteDialog\n\t\t\t\t\t\t\t\t\tfont={ libraryFontSelected }\n\t\t\t\t\t\t\t\t\tisOpen={ isConfirmDeleteOpen }\n\t\t\t\t\t\t\t\t\tsetIsOpen={ setIsConfirmDeleteOpen }\n\t\t\t\t\t\t\t\t\tsetNotice={ setNotice }\n\t\t\t\t\t\t\t\t\tuninstallFontFamily={ uninstallFontFamily }\n\t\t\t\t\t\t\t\t\thandleSetLibraryFontSelected={\n\t\t\t\t\t\t\t\t\t\thandleSetLibraryFontSelected\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t\t<Flex justify=\"flex-start\">\n\t\t\t\t\t\t\t\t<Navigator.BackButton\n\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\tisRTL() ? chevronRight : chevronLeft\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\thandleSetLibraryFontSelected(\n\t\t\t\t\t\t\t\t\t\t\tundefined\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\tsetNotice( null );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Back' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Heading\n\t\t\t\t\t\t\t\t\tlevel={ 2 }\n\t\t\t\t\t\t\t\t\tsize={ 13 }\n\t\t\t\t\t\t\t\t\tclassName=\"global-styles-ui-header\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ libraryFontSelected?.name }\n\t\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t\t{ notice && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<Spacer margin={ 1 } />\n\t\t\t\t\t\t\t\t\t<Notice\n\t\t\t\t\t\t\t\t\t\tstatus={ notice.type }\n\t\t\t\t\t\t\t\t\t\tonRemove={ () => setNotice( null ) }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ notice.message }\n\t\t\t\t\t\t\t\t\t</Notice>\n\t\t\t\t\t\t\t\t\t<Spacer margin={ 1 } />\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<Spacer margin={ 4 } />\n\t\t\t\t\t\t\t<Text>\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Choose font variants. Keep in mind that too many variants could make your site slower.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t<Spacer margin={ 4 } />\n\t\t\t\t\t\t\t<VStack spacing={ 0 }>\n\t\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t\tclassName=\"font-library__select-all\"\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Select all' ) }\n\t\t\t\t\t\t\t\t\tchecked={ isSelectAllChecked }\n\t\t\t\t\t\t\t\t\tonChange={ toggleSelectAll }\n\t\t\t\t\t\t\t\t\tindeterminate={ isIndeterminate }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Spacer margin={ 8 } />\n\t\t\t\t\t\t\t\t{ /*\n\t\t\t\t\t\t\t\t * Disable reason: The `list` ARIA role is redundant but\n\t\t\t\t\t\t\t\t * Safari+VoiceOver won't announce the list otherwise.\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t/* eslint-disable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t\t\t\t\t<ul\n\t\t\t\t\t\t\t\t\trole=\"list\"\n\t\t\t\t\t\t\t\t\tclassName=\"font-library__fonts-list\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ libraryFontSelected &&\n\t\t\t\t\t\t\t\t\t\tgetFontFacesToDisplay(\n\t\t\t\t\t\t\t\t\t\t\tlibraryFontSelected\n\t\t\t\t\t\t\t\t\t\t).map( ( face, i ) => (\n\t\t\t\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t\t\t\tkey={ `face${ i }` }\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-library__fonts-list-item\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<LibraryFontVariant\n\t\t\t\t\t\t\t\t\t\t\t\t\tfont={ libraryFontSelected }\n\t\t\t\t\t\t\t\t\t\t\t\t\tface={ face }\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={ `face${ i }` }\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t{ /* eslint-enable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t</Navigator.Screen>\n\t\t\t\t\t</Navigator>\n\n\t\t\t\t\t<HStack justify=\"flex-end\" className=\"font-library__footer\">\n\t\t\t\t\t\t{ isInstalling && <ProgressBar /> }\n\t\t\t\t\t\t{ shouldDisplayDeleteButton && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tisDestructive\n\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\tonClick={ handleUninstallClick }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Delete' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\tonClick={ handleUpdate }\n\t\t\t\t\t\t\tdisabled={ ! fontFamiliesHasChanges }\n\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Update' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nfunction ConfirmDeleteDialog( {\n\tfont,\n\tisOpen,\n\tsetIsOpen,\n\tsetNotice,\n\tuninstallFontFamily,\n\thandleSetLibraryFontSelected,\n}: {\n\tfont: FontFamily;\n\tisOpen: boolean;\n\tsetIsOpen: ( isOpen: boolean ) => void;\n\tsetNotice: (\n\t\tnotice: {\n\t\t\ttype: 'success' | 'error' | 'info';\n\t\t\tmessage: string;\n\t\t} | null\n\t) => void;\n\tuninstallFontFamily: (\n\t\tfontFamily: FontFamily\n\t) => Promise< { deleted: boolean } >;\n\thandleSetLibraryFontSelected: ( font?: FontFamily ) => void;\n} ) {\n\tconst navigator = useNavigator();\n\n\tconst handleConfirmUninstall = async () => {\n\t\tsetNotice( null );\n\t\tsetIsOpen( false );\n\t\ttry {\n\t\t\tawait uninstallFontFamily( font );\n\t\t\tnavigator.goBack();\n\t\t\thandleSetLibraryFontSelected( undefined );\n\t\t\tsetNotice( {\n\t\t\t\ttype: 'success',\n\t\t\t\tmessage: __( 'Font family uninstalled successfully.' ),\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\tsetNotice( {\n\t\t\t\ttype: 'error',\n\t\t\t\tmessage:\n\t\t\t\t\t__( 'There was an error uninstalling the font family.' ) +\n\t\t\t\t\t( error as Error ).message,\n\t\t\t} );\n\t\t}\n\t};\n\n\tconst handleCancelUninstall = () => {\n\t\tsetIsOpen( false );\n\t};\n\n\treturn (\n\t\t<ConfirmDialog\n\t\t\tisOpen={ isOpen }\n\t\t\tcancelButtonText={ __( 'Cancel' ) }\n\t\t\tconfirmButtonText={ __( 'Delete' ) }\n\t\t\tonCancel={ handleCancelUninstall }\n\t\t\tonConfirm={ handleConfirmUninstall }\n\t\t\tsize=\"medium\"\n\t\t>\n\t\t\t{ font &&\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %s: Name of the font. */\n\t\t\t\t\t__(\n\t\t\t\t\t\t'Are you sure you want to delete \"%s\" font and all its variants and assets?'\n\t\t\t\t\t),\n\t\t\t\t\tfont.name\n\t\t\t\t) }\n\t\t</ConfirmDialog>\n\t);\n}\n\nexport default InstalledFonts;\n", "/**\n * WordPress dependencies\n */\nimport { _n, sprintf, isRTL } from '@wordpress/i18n';\nimport {\n\tuseNavigator,\n\t__experimentalText as Text,\n\tButton,\n\tFlex,\n\tFlexItem,\n} from '@wordpress/components';\nimport { Icon, chevronLeft, chevronRight } from '@wordpress/icons';\nimport type { FontFamily } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport FontDemo from './font-demo';\n\nfunction FontCard( {\n\tfont,\n\tonClick,\n\tvariantsText,\n\tnavigatorPath,\n}: {\n\tfont: FontFamily;\n\tonClick: () => void;\n\tvariantsText?: string;\n\tnavigatorPath?: string;\n} ) {\n\tconst variantsCount = font.fontFace?.length || 1;\n\n\tconst style = {\n\t\tcursor: !! onClick ? 'pointer' : 'default',\n\t};\n\n\tconst navigator = useNavigator();\n\n\treturn (\n\t\t<Button\n\t\t\t__next40pxDefaultSize\n\t\t\tonClick={ () => {\n\t\t\t\tonClick();\n\t\t\t\tif ( navigatorPath ) {\n\t\t\t\t\tnavigator.goTo( navigatorPath );\n\t\t\t\t}\n\t\t\t} }\n\t\t\tstyle={ style }\n\t\t\tclassName=\"font-library__font-card\"\n\t\t>\n\t\t\t<Flex justify=\"space-between\" wrap={ false }>\n\t\t\t\t<FontDemo font={ font } />\n\t\t\t\t<Flex justify=\"flex-end\">\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<Text className=\"font-library__font-card__count\">\n\t\t\t\t\t\t\t{ variantsText ||\n\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %d: Number of font variants. */\n\t\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t\t'%d variant',\n\t\t\t\t\t\t\t\t\t\t'%d variants',\n\t\t\t\t\t\t\t\t\t\tvariantsCount\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tvariantsCount\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<Icon icon={ isRTL() ? chevronLeft : chevronRight } />\n\t\t\t\t\t</FlexItem>\n\t\t\t\t</Flex>\n\t\t\t</Flex>\n\t\t</Button>\n\t);\n}\n\nexport default FontCard;\n", "/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\nimport { useContext, useEffect, useState, useRef } from '@wordpress/element';\nimport type { FontFamily, FontFace } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { FontLibraryContext } from './context';\nimport {\n\tgetFacePreviewStyle,\n\tgetFamilyPreviewStyle,\n} from './utils/preview-styles';\nimport type { FontDemoProps } from './types';\n\nfunction getPreviewUrl( fontFace: FontFace ): string | undefined {\n\tif ( fontFace.preview ) {\n\t\treturn fontFace.preview;\n\t}\n\tif ( fontFace.src ) {\n\t\treturn Array.isArray( fontFace.src ) ? fontFace.src[ 0 ] : fontFace.src;\n\t}\n\treturn undefined;\n}\n\nfunction getDisplayFontFace( font: FontFamily | FontFace ): FontFace {\n\t// if this IS a font face return it\n\tif (\n\t\t( 'fontStyle' in font && font.fontStyle ) ||\n\t\t( 'fontWeight' in font && font.fontWeight )\n\t) {\n\t\treturn font;\n\t}\n\t// if this is a font family with a collection of font faces\n\t// return the first one that is normal and 400 OR just the first one\n\tif ( 'fontFace' in font && font.fontFace && font.fontFace.length ) {\n\t\treturn (\n\t\t\tfont.fontFace.find(\n\t\t\t\t( face ) =>\n\t\t\t\t\tface.fontStyle === 'normal' && face.fontWeight === '400'\n\t\t\t) || font.fontFace[ 0 ]\n\t\t);\n\t}\n\t// This must be a font family with no font faces\n\t// return a fake font face\n\treturn {\n\t\tfontStyle: 'normal',\n\t\tfontWeight: '400',\n\t\tfontFamily: font.fontFamily,\n\t};\n}\n\nfunction FontDemo( { font, text }: FontDemoProps ) {\n\tconst ref = useRef< HTMLDivElement >( null );\n\n\tconst fontFace = getDisplayFontFace( font );\n\tconst style = getFamilyPreviewStyle( font );\n\ttext = text || ( 'name' in font ? font.name : '' );\n\tconst customPreviewUrl = font.preview;\n\n\tconst [ isIntersecting, setIsIntersecting ] = useState< boolean >( false );\n\tconst [ isAssetLoaded, setIsAssetLoaded ] = useState< boolean >( false );\n\tconst { loadFontFaceAsset } = useContext( FontLibraryContext );\n\n\tconst previewUrl = customPreviewUrl ?? getPreviewUrl( fontFace );\n\tconst isPreviewImage =\n\t\tpreviewUrl && previewUrl.match( /\\.(png|jpg|jpeg|gif|svg)$/i );\n\n\tconst faceStyles = getFacePreviewStyle( fontFace );\n\tconst textDemoStyle = {\n\t\tfontSize: '18px',\n\t\tlineHeight: 1,\n\t\topacity: isAssetLoaded ? '1' : '0',\n\t\t...style,\n\t\t...faceStyles,\n\t};\n\n\tuseEffect( () => {\n\t\tconst observer = new window.IntersectionObserver( ( [ entry ] ) => {\n\t\t\tsetIsIntersecting( entry.isIntersecting );\n\t\t}, {} );\n\t\tif ( ref.current ) {\n\t\t\tobserver.observe( ref.current );\n\t\t}\n\t\treturn () => observer.disconnect();\n\t}, [ ref ] );\n\n\tuseEffect( () => {\n\t\tconst loadAsset = async () => {\n\t\t\tif ( isIntersecting ) {\n\t\t\t\tif ( ! isPreviewImage && fontFace.src ) {\n\t\t\t\t\tawait loadFontFaceAsset( fontFace );\n\t\t\t\t}\n\t\t\t\tsetIsAssetLoaded( true );\n\t\t\t}\n\t\t};\n\t\tloadAsset();\n\t}, [ fontFace, isIntersecting, loadFontFaceAsset, isPreviewImage ] );\n\n\treturn (\n\t\t<div ref={ ref }>\n\t\t\t{ isPreviewImage ? (\n\t\t\t\t<img\n\t\t\t\t\tsrc={ previewUrl }\n\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\talt={ text }\n\t\t\t\t\tclassName=\"font-library__font-variant_demo-image\"\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<Text\n\t\t\t\t\tstyle={ textDemoStyle }\n\t\t\t\t\tclassName=\"font-library__font-variant_demo-text\"\n\t\t\t\t>\n\t\t\t\t\t{ text }\n\t\t\t\t</Text>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport default FontDemo;\n", "/**\n * WordPress dependencies\n */\nimport { useContext, useId } from '@wordpress/element';\nimport { CheckboxControl, Flex } from '@wordpress/components';\nimport type { FontFace, FontFamily } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { getFontFaceVariantName } from './utils';\nimport { FontLibraryContext } from './context';\nimport FontDemo from './font-demo';\n\nfunction LibraryFontVariant( {\n\tface,\n\tfont,\n}: {\n\tface: FontFace;\n\tfont: FontFamily;\n} ) {\n\tconst { isFontActivated, toggleActivateFont } =\n\t\tuseContext( FontLibraryContext );\n\n\tconst isInstalled =\n\t\t( font?.fontFace?.length ?? 0 ) > 0\n\t\t\t? isFontActivated(\n\t\t\t\t\tfont.slug,\n\t\t\t\t\tface.fontStyle,\n\t\t\t\t\tface.fontWeight,\n\t\t\t\t\tfont.source\n\t\t\t )\n\t\t\t: isFontActivated( font.slug, undefined, undefined, font.source );\n\n\tconst handleToggleActivation = () => {\n\t\tif ( ( font?.fontFace?.length ?? 0 ) > 0 ) {\n\t\t\ttoggleActivateFont( font, face );\n\t\t\treturn;\n\t\t}\n\t\ttoggleActivateFont( font );\n\t};\n\n\tconst displayName = font.name + ' ' + getFontFaceVariantName( face );\n\tconst checkboxId = useId();\n\n\treturn (\n\t\t<div className=\"font-library__font-card\">\n\t\t\t<Flex justify=\"flex-start\" align=\"center\" gap=\"1rem\">\n\t\t\t\t<CheckboxControl\n\t\t\t\t\tchecked={ isInstalled }\n\t\t\t\t\tonChange={ handleToggleActivation }\n\t\t\t\t\tid={ checkboxId }\n\t\t\t\t/>\n\t\t\t\t<label htmlFor={ checkboxId }>\n\t\t\t\t\t<FontDemo\n\t\t\t\t\t\tfont={ face }\n\t\t\t\t\t\ttext={ displayName }\n\t\t\t\t\t\tonClick={ handleToggleActivation }\n\t\t\t\t\t/>\n\t\t\t\t</label>\n\t\t\t</Flex>\n\t\t</div>\n\t);\n}\n\nexport default LibraryFontVariant;\n", "/**\n * WordPress dependencies\n */\nimport type { FontFace } from '@wordpress/core-data';\n\nfunction getNumericFontWeight( value: string ): number {\n\tswitch ( value ) {\n\t\tcase 'normal':\n\t\t\treturn 400;\n\t\tcase 'bold':\n\t\t\treturn 700;\n\t\tcase 'bolder':\n\t\t\treturn 500;\n\t\tcase 'lighter':\n\t\t\treturn 300;\n\t\tdefault:\n\t\t\treturn parseInt( value, 10 );\n\t}\n}\n\nexport function sortFontFaces( faces: FontFace[] ): FontFace[] {\n\treturn faces.sort( ( a, b ) => {\n\t\t// Ensure 'normal' fontStyle is always first\n\t\tif ( a.fontStyle === 'normal' && b.fontStyle !== 'normal' ) {\n\t\t\treturn -1;\n\t\t}\n\t\tif ( b.fontStyle === 'normal' && a.fontStyle !== 'normal' ) {\n\t\t\treturn 1;\n\t\t}\n\n\t\t// If both fontStyles are the same, sort by fontWeight\n\t\tif ( a.fontStyle === b.fontStyle ) {\n\t\t\treturn (\n\t\t\t\tgetNumericFontWeight( a.fontWeight?.toString() ?? 'normal' ) -\n\t\t\t\tgetNumericFontWeight( b.fontWeight?.toString() ?? 'normal' )\n\t\t\t);\n\t\t}\n\n\t\t// Sort other fontStyles alphabetically\n\t\tif ( ! a.fontStyle || ! b.fontStyle ) {\n\t\t\treturn ! a.fontStyle ? 1 : -1;\n\t\t}\n\n\t\treturn a.fontStyle.localeCompare( b.fontStyle );\n\t} );\n}\n", "/**\n * WordPress dependencies\n */\nimport {\n\tuseContext,\n\tuseEffect,\n\tuseState,\n\tuseMemo,\n\tcreateInterpolateElement,\n} from '@wordpress/element';\nimport {\n\t__experimentalSpacer as Spacer,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tNavigator,\n\t__experimentalHeading as Heading,\n\tNotice,\n\tSelectControl,\n\tFlex,\n\tButton,\n\tDropdownMenu,\n\tSearchControl,\n\tProgressBar,\n\tCheckboxControl,\n} from '@wordpress/components';\nimport { debounce } from '@wordpress/compose';\nimport { sprintf, __, _x, isRTL } from '@wordpress/i18n';\nimport {\n\tmoreVertical,\n\tnext,\n\tprevious,\n\tchevronLeft,\n\tchevronRight,\n} from '@wordpress/icons';\nimport { useEntityRecord } from '@wordpress/core-data';\nimport type {\n\tFontCollection as FontCollectionType,\n\tFontFace,\n\tFontFamily,\n\tCollectionFontFamily,\n} from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { FontLibraryContext } from './context';\nimport FontCard from './font-card';\nimport filterFonts from './utils/filter-fonts';\nimport { toggleFont } from './utils/toggleFont';\nimport {\n\tgetFontsOutline,\n\tisFontFontFaceInOutline,\n} from './utils/fonts-outline';\nimport GoogleFontsConfirmDialog from './google-fonts-confirm-dialog';\nimport { downloadFontFaceAssets } from './utils';\nimport { sortFontFaces } from './utils/sort-font-faces';\nimport CollectionFontVariant from './collection-font-variant';\nimport type { FontFamilyToUpload } from './types';\n\nconst DEFAULT_CATEGORY = {\n\tslug: 'all',\n\tname: _x( 'All', 'font categories' ),\n};\n\nconst LOCAL_STORAGE_ITEM = 'wp-font-library-google-fonts-permission';\nconst MIN_WINDOW_HEIGHT = 500;\n\nfunction FontCollection( { slug }: { slug: string } ) {\n\tconst requiresPermission = slug === 'google-fonts';\n\n\tconst getGoogleFontsPermissionFromStorage = () => {\n\t\treturn window.localStorage.getItem( LOCAL_STORAGE_ITEM ) === 'true';\n\t};\n\n\tconst [ selectedFont, setSelectedFont ] = useState< FontFamily | null >(\n\t\tnull\n\t);\n\tconst [ notice, setNotice ] = useState< {\n\t\ttype: 'success' | 'error' | 'info';\n\t\tmessage: string;\n\t} | null >( null );\n\tconst [ fontsToInstall, setFontsToInstall ] = useState< FontFamily[] >(\n\t\t[]\n\t);\n\tconst [ page, setPage ] = useState( 1 );\n\tconst [ filters, setFilters ] = useState< {\n\t\tcategory?: string;\n\t\tsearch?: string;\n\t} >( {} );\n\tconst [ renderConfirmDialog, setRenderConfirmDialog ] = useState(\n\t\trequiresPermission && ! getGoogleFontsPermissionFromStorage()\n\t);\n\tconst { installFonts, isInstalling } = useContext( FontLibraryContext );\n\tconst { record: selectedCollection, isResolving: isLoading } =\n\t\tuseEntityRecord< FontCollectionType >( 'root', 'fontCollection', slug );\n\n\tuseEffect( () => {\n\t\tconst handleStorage = () => {\n\t\t\tsetRenderConfirmDialog(\n\t\t\t\trequiresPermission && ! getGoogleFontsPermissionFromStorage()\n\t\t\t);\n\t\t};\n\t\thandleStorage();\n\t\twindow.addEventListener( 'storage', handleStorage );\n\t\treturn () => window.removeEventListener( 'storage', handleStorage );\n\t}, [ slug, requiresPermission ] );\n\n\tconst revokeAccess = () => {\n\t\twindow.localStorage.setItem( LOCAL_STORAGE_ITEM, 'false' );\n\t\twindow.dispatchEvent( new Event( 'storage' ) );\n\t};\n\n\tuseEffect( () => {\n\t\tsetSelectedFont( null );\n\t}, [ slug ] );\n\n\tuseEffect( () => {\n\t\t// If the selected fonts change, reset the selected fonts to install\n\t\tsetFontsToInstall( [] );\n\t}, [ selectedFont ] );\n\n\tconst collectionFonts = useMemo(\n\t\t() =>\n\t\t\t( selectedCollection?.font_families as\n\t\t\t\t| CollectionFontFamily[]\n\t\t\t\t| undefined ) ?? [],\n\t\t[ selectedCollection ]\n\t);\n\tconst collectionCategories = selectedCollection?.categories ?? [];\n\n\tconst categories = [ DEFAULT_CATEGORY, ...collectionCategories ];\n\n\tconst fonts = useMemo(\n\t\t() => filterFonts( collectionFonts, filters ),\n\t\t[ collectionFonts, filters ]\n\t);\n\n\t// NOTE: The height of the font library modal unavailable to use for rendering font family items is roughly 417px\n\t// The height of each font family item is 61px.\n\tconst windowHeight = Math.max( window.innerHeight, MIN_WINDOW_HEIGHT );\n\tconst pageSize = Math.floor( ( windowHeight - 417 ) / 61 );\n\tconst totalPages = Math.ceil( fonts.length / pageSize );\n\tconst itemsStart = ( page - 1 ) * pageSize;\n\tconst itemsLimit = page * pageSize;\n\tconst items = fonts.slice( itemsStart, itemsLimit );\n\n\tconst handleCategoryFilter = ( category: string ) => {\n\t\tsetFilters( { ...filters, category } );\n\t\tsetPage( 1 );\n\t};\n\n\tconst handleUpdateSearchInput = ( value: string ) => {\n\t\tsetFilters( { ...filters, search: value } );\n\t\tsetPage( 1 );\n\t};\n\n\t// @ts-expect-error\n\tconst debouncedUpdateSearchInput = debounce( handleUpdateSearchInput, 300 );\n\n\tconst handleToggleVariant = ( font: FontFamily, face?: FontFace ) => {\n\t\tconst newFontsToInstall = toggleFont( font, face, fontsToInstall );\n\t\tsetFontsToInstall( newFontsToInstall );\n\t};\n\n\tconst fontToInstallOutline = getFontsOutline( fontsToInstall );\n\n\tconst resetFontsToInstall = () => {\n\t\tsetFontsToInstall( [] );\n\t};\n\n\tconst selectFontCount =\n\t\tfontsToInstall.length > 0\n\t\t\t? fontsToInstall[ 0 ]?.fontFace?.length ?? 0\n\t\t\t: 0;\n\n\t// Check if any fonts are selected.\n\tconst isIndeterminate =\n\t\tselectFontCount > 0 &&\n\t\tselectFontCount !== selectedFont?.fontFace?.length;\n\n\t// Check if all fonts are selected.\n\tconst isSelectAllChecked =\n\t\tselectFontCount === selectedFont?.fontFace?.length;\n\n\t// Toggle select all fonts.\n\tconst toggleSelectAll = () => {\n\t\tconst newFonts: FontFamily[] = [];\n\t\tif ( ! isSelectAllChecked && selectedFont ) {\n\t\t\tnewFonts.push( selectedFont );\n\t\t}\n\n\t\tsetFontsToInstall( newFonts );\n\t};\n\n\tconst handleInstall = async () => {\n\t\tsetNotice( null );\n\n\t\tconst fontFamily: FontFamilyToUpload = fontsToInstall[ 0 ];\n\n\t\ttry {\n\t\t\tif ( fontFamily?.fontFace ) {\n\t\t\t\tawait Promise.all(\n\t\t\t\t\tfontFamily.fontFace.map( async ( fontFace ) => {\n\t\t\t\t\t\tif ( fontFace.src ) {\n\t\t\t\t\t\t\tfontFace.file = await downloadFontFaceAssets(\n\t\t\t\t\t\t\t\tfontFace.src\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t}\n\t\t} catch ( error ) {\n\t\t\t// If any of the fonts fail to download,\n\t\t\t// show an error notice and stop the request from being sent.\n\t\t\tsetNotice( {\n\t\t\t\ttype: 'error',\n\t\t\t\tmessage: __(\n\t\t\t\t\t'Error installing the fonts, could not be downloaded.'\n\t\t\t\t),\n\t\t\t} );\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tawait installFonts( [ fontFamily ] );\n\t\t\tsetNotice( {\n\t\t\t\ttype: 'success',\n\t\t\t\tmessage: __( 'Fonts were installed successfully.' ),\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\tsetNotice( {\n\t\t\t\ttype: 'error',\n\t\t\t\tmessage: ( error as Error ).message,\n\t\t\t} );\n\t\t}\n\t\tresetFontsToInstall();\n\t};\n\n\tconst getSortedFontFaces = ( fontFamily: FontFamily ) => {\n\t\tif ( ! fontFamily ) {\n\t\t\treturn [];\n\t\t}\n\t\tif ( ! fontFamily.fontFace || ! fontFamily.fontFace.length ) {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tfontFamily: fontFamily.fontFamily,\n\t\t\t\t\tfontStyle: 'normal',\n\t\t\t\t\tfontWeight: '400',\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\t\treturn sortFontFaces( fontFamily.fontFace );\n\t};\n\n\tif ( renderConfirmDialog ) {\n\t\treturn <GoogleFontsConfirmDialog />;\n\t}\n\n\tconst ActionsComponent = () => {\n\t\tif ( slug !== 'google-fonts' || renderConfirmDialog || selectedFont ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<DropdownMenu\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tlabel={ __( 'Actions' ) }\n\t\t\t\tpopoverProps={ {\n\t\t\t\t\tposition: 'bottom left',\n\t\t\t\t} }\n\t\t\t\tcontrols={ [\n\t\t\t\t\t{\n\t\t\t\t\t\ttitle: __( 'Revoke access to Google Fonts' ),\n\t\t\t\t\t\tonClick: revokeAccess,\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t/>\n\t\t);\n\t};\n\n\treturn (\n\t\t<div className=\"font-library__tabpanel-layout\">\n\t\t\t{ isLoading && (\n\t\t\t\t<div className=\"font-library__loading\">\n\t\t\t\t\t<ProgressBar />\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t{ ! isLoading && selectedCollection && (\n\t\t\t\t<>\n\t\t\t\t\t<Navigator\n\t\t\t\t\t\tinitialPath=\"/\"\n\t\t\t\t\t\tclassName=\"font-library__tabpanel-layout\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Navigator.Screen path=\"/\">\n\t\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t\t<VStack>\n\t\t\t\t\t\t\t\t\t<Heading level={ 2 } size={ 13 }>\n\t\t\t\t\t\t\t\t\t\t{ selectedCollection.name }\n\t\t\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t\t\t\t<Text>\n\t\t\t\t\t\t\t\t\t\t{ selectedCollection.description }\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t\t<ActionsComponent />\n\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t<Spacer margin={ 4 } />\n\t\t\t\t\t\t\t<HStack spacing={ 4 } justify=\"space-between\">\n\t\t\t\t\t\t\t\t<SearchControl\n\t\t\t\t\t\t\t\t\tvalue={ filters.search }\n\t\t\t\t\t\t\t\t\tplaceholder={ __( 'Font name\u2026' ) }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Search' ) }\n\t\t\t\t\t\t\t\t\tonChange={ debouncedUpdateSearchInput }\n\t\t\t\t\t\t\t\t\thideLabelFromVision={ false }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Category' ) }\n\t\t\t\t\t\t\t\t\tvalue={ filters.category }\n\t\t\t\t\t\t\t\t\tonChange={ handleCategoryFilter }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ categories &&\n\t\t\t\t\t\t\t\t\t\tcategories.map( ( category ) => (\n\t\t\t\t\t\t\t\t\t\t\t<option\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={ category.slug }\n\t\t\t\t\t\t\t\t\t\t\t\tkey={ category.slug }\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{ category.name }\n\t\t\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t\t</SelectControl>\n\t\t\t\t\t\t\t</HStack>\n\n\t\t\t\t\t\t\t<Spacer margin={ 4 } />\n\n\t\t\t\t\t\t\t{ !! selectedCollection?.font_families?.length &&\n\t\t\t\t\t\t\t\t! fonts.length && (\n\t\t\t\t\t\t\t\t\t<Text>\n\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t'No fonts found. Try with a different search term.'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t\t<div className=\"font-library__fonts-grid__main\">\n\t\t\t\t\t\t\t\t{ /*\n\t\t\t\t\t\t\t\t * Disable reason: The `list` ARIA role is redundant but\n\t\t\t\t\t\t\t\t * Safari+VoiceOver won't announce the list otherwise.\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t/* eslint-disable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t\t\t\t\t<ul\n\t\t\t\t\t\t\t\t\trole=\"list\"\n\t\t\t\t\t\t\t\t\tclassName=\"font-library__fonts-list\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ items.map( ( font ) => (\n\t\t\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t\t\tkey={\n\t\t\t\t\t\t\t\t\t\t\t\tfont.font_family_settings.slug\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-library__fonts-list-item\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<FontCard\n\t\t\t\t\t\t\t\t\t\t\t\tfont={\n\t\t\t\t\t\t\t\t\t\t\t\t\tfont.font_family_settings\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tnavigatorPath=\"/fontFamily\"\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetSelectedFont(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont.font_family_settings\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t{ /* eslint-enable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</Navigator.Screen>\n\n\t\t\t\t\t\t<Navigator.Screen path=\"/fontFamily\">\n\t\t\t\t\t\t\t<Flex justify=\"flex-start\">\n\t\t\t\t\t\t\t\t<Navigator.BackButton\n\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\tisRTL() ? chevronRight : chevronLeft\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tsetSelectedFont( null );\n\t\t\t\t\t\t\t\t\t\tsetNotice( null );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Back' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Heading\n\t\t\t\t\t\t\t\t\tlevel={ 2 }\n\t\t\t\t\t\t\t\t\tsize={ 13 }\n\t\t\t\t\t\t\t\t\tclassName=\"global-styles-ui-header\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ selectedFont?.name }\n\t\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t\t{ notice && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<Spacer margin={ 1 } />\n\t\t\t\t\t\t\t\t\t<Notice\n\t\t\t\t\t\t\t\t\t\tstatus={ notice.type }\n\t\t\t\t\t\t\t\t\t\tonRemove={ () => setNotice( null ) }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ notice.message }\n\t\t\t\t\t\t\t\t\t</Notice>\n\t\t\t\t\t\t\t\t\t<Spacer margin={ 1 } />\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<Spacer margin={ 4 } />\n\t\t\t\t\t\t\t<Text>\n\t\t\t\t\t\t\t\t{ __( 'Select font variants to install.' ) }\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t<Spacer margin={ 4 } />\n\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\tclassName=\"font-library__select-all\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Select all' ) }\n\t\t\t\t\t\t\t\tchecked={ isSelectAllChecked }\n\t\t\t\t\t\t\t\tonChange={ toggleSelectAll }\n\t\t\t\t\t\t\t\tindeterminate={ isIndeterminate }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<VStack spacing={ 0 }>\n\t\t\t\t\t\t\t\t{ /*\n\t\t\t\t\t\t\t\t * Disable reason: The `list` ARIA role is redundant but\n\t\t\t\t\t\t\t\t * Safari+VoiceOver won't announce the list otherwise.\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t/* eslint-disable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t\t\t\t\t<ul\n\t\t\t\t\t\t\t\t\trole=\"list\"\n\t\t\t\t\t\t\t\t\tclassName=\"font-library__fonts-list\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ selectedFont &&\n\t\t\t\t\t\t\t\t\t\tgetSortedFontFaces( selectedFont ).map(\n\t\t\t\t\t\t\t\t\t\t\t( face, i ) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={ `face${ i }` }\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-library__fonts-list-item\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<CollectionFontVariant\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont={ selectedFont }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tface={ face }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thandleToggleVariant={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thandleToggleVariant\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tselected={ isFontFontFaceInOutline(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tselectedFont.slug,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tselectedFont.fontFace\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? face\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: null, // If the font has no fontFace, we want to check if the font is in the outline\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfontToInstallOutline\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t{ /* eslint-enable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t<Spacer margin={ 16 } />\n\t\t\t\t\t\t</Navigator.Screen>\n\t\t\t\t\t</Navigator>\n\n\t\t\t\t\t{ selectedFont && (\n\t\t\t\t\t\t<Flex\n\t\t\t\t\t\t\tjustify=\"flex-end\"\n\t\t\t\t\t\t\tclassName=\"font-library__footer\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\tonClick={ handleInstall }\n\t\t\t\t\t\t\t\tisBusy={ isInstalling }\n\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\tfontsToInstall.length === 0 || isInstalling\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Install' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</Flex>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ ! selectedFont && (\n\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\t\tclassName=\"font-library__footer\"\n\t\t\t\t\t\t\tjustify=\"end\"\n\t\t\t\t\t\t\tspacing={ 6 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\t\t\tspacing={ 1 }\n\t\t\t\t\t\t\t\tclassName=\"font-library__page-selection\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t\t// translators: 1: Current page number, 2: Total number of pages.\n\t\t\t\t\t\t\t\t\t\t_x(\n\t\t\t\t\t\t\t\t\t\t\t'<div>Page</div>%1$s<div>of %2$d</div>',\n\t\t\t\t\t\t\t\t\t\t\t'paging'\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t'<CurrentPage />',\n\t\t\t\t\t\t\t\t\t\ttotalPages\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tdiv: <div aria-hidden />,\n\t\t\t\t\t\t\t\t\t\tCurrentPage: (\n\t\t\t\t\t\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\t\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Current page'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={ page.toString() }\n\t\t\t\t\t\t\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t\t\t\t\t\t\t...Array( totalPages ),\n\t\t\t\t\t\t\t\t\t\t\t\t].map( ( e, i ) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ti + 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t).toString(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue: (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ti + 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t).toString(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={ ( newPage ) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetPage(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tparseInt( newPage )\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"minimal\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t<HStack expanded={ false } spacing={ 1 }>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tonClick={ () => setPage( page - 1 ) }\n\t\t\t\t\t\t\t\t\tdisabled={ page === 1 }\n\t\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Previous page' ) }\n\t\t\t\t\t\t\t\t\ticon={ isRTL() ? next : previous }\n\t\t\t\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\t\ttooltipPosition=\"top\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tonClick={ () => setPage( page + 1 ) }\n\t\t\t\t\t\t\t\t\tdisabled={ page === totalPages }\n\t\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Next page' ) }\n\t\t\t\t\t\t\t\t\ticon={ isRTL() ? previous : next }\n\t\t\t\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\t\ttooltipPosition=\"top\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport default FontCollection;\n", "/**\n * WordPress dependencies\n */\nimport type { CollectionFontFamily } from '@wordpress/core-data';\n\n/**\n * Filters a list of fonts based on the specified filters.\n *\n * This function filters a given array of fonts based on the criteria provided in the filters object.\n * It supports filtering by category and a search term. If the category is provided and not equal to 'all',\n * the function filters the fonts array to include only those fonts that belong to the specified category.\n * Additionally, if a search term is provided, it filters the fonts array to include only those fonts\n * whose name includes the search term, case-insensitively.\n *\n * @param fonts Array of font objects in font-collection schema fashion to be filtered. Each font object should have a 'categories' property and a 'font_family_settings' property with a 'name' key.\n * @param filters Object containing the filter criteria. It should have a 'category' key and/or a 'search' key.\n * @param filters.category The category to filter fonts by. If 'all', no category filtering is applied.\n * @param filters.search The search term to filter fonts by. If provided, only fonts whose\n *\n * @return Array of filtered font objects based on the provided criteria.\n */\nexport default function filterFonts(\n\tfonts: CollectionFontFamily[],\n\tfilters: { category?: string; search?: string }\n): CollectionFontFamily[] {\n\tconst { category, search } = filters;\n\tlet filteredFonts = fonts || [];\n\n\tif ( category && category !== 'all' ) {\n\t\tfilteredFonts = filteredFonts.filter(\n\t\t\t( font ) =>\n\t\t\t\tfont.categories && font.categories.indexOf( category ) !== -1\n\t\t);\n\t}\n\n\tif ( search ) {\n\t\tfilteredFonts = filteredFonts.filter(\n\t\t\t( font ) =>\n\t\t\t\tfont.font_family_settings &&\n\t\t\t\tfont.font_family_settings.name\n\t\t\t\t\t.toLowerCase()\n\t\t\t\t\t.includes( search.toLowerCase() )\n\t\t);\n\t}\n\n\treturn filteredFonts;\n}\n", "/**\n * WordPress dependencies\n */\nimport type { FontFace, FontFamily } from '@wordpress/core-data';\n\nexport function getFontsOutline(\n\tfonts: FontFamily[]\n): Record< string, Record< string, boolean > > {\n\treturn fonts.reduce(\n\t\t( acc, font ) => ( {\n\t\t\t...acc,\n\t\t\t[ font.slug ]: ( font?.fontFace || [] ).reduce(\n\t\t\t\t( faces, face ) => ( {\n\t\t\t\t\t...faces,\n\t\t\t\t\t[ `${ face.fontStyle }-${ face.fontWeight }` ]: true,\n\t\t\t\t} ),\n\t\t\t\t{}\n\t\t\t),\n\t\t} ),\n\t\t{}\n\t);\n}\n\nexport function isFontFontFaceInOutline(\n\tslug: string,\n\tface: FontFace | null,\n\toutline: Record< string, Record< string, boolean > >\n): boolean {\n\tif ( ! face ) {\n\t\treturn !! outline[ slug ];\n\t}\n\treturn !! outline[ slug ]?.[ `${ face.fontStyle }-${ face.fontWeight }` ];\n}\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tButton,\n\tCard,\n\tCardBody,\n\t__experimentalHeading as Heading,\n\t__experimentalText as Text,\n\t__experimentalSpacer as Spacer,\n} from '@wordpress/components';\n\nfunction GoogleFontsConfirmDialog(): JSX.Element {\n\tconst handleConfirm = (): void => {\n\t\twindow.localStorage.setItem(\n\t\t\t'wp-font-library-google-fonts-permission',\n\t\t\t'true'\n\t\t);\n\t\twindow.dispatchEvent( new Event( 'storage' ) );\n\t};\n\n\treturn (\n\t\t<div className=\"font-library__google-fonts-confirm\">\n\t\t\t<Card>\n\t\t\t\t<CardBody>\n\t\t\t\t\t<Heading level={ 2 }>\n\t\t\t\t\t\t{ __( 'Connect to Google Fonts' ) }\n\t\t\t\t\t</Heading>\n\t\t\t\t\t<Spacer margin={ 6 } />\n\t\t\t\t\t<Text as=\"p\">\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'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.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Text>\n\t\t\t\t\t<Spacer margin={ 3 } />\n\t\t\t\t\t<Text as=\"p\">\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'You can alternatively upload files directly on the Upload tab.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Text>\n\t\t\t\t\t<Spacer margin={ 6 } />\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ handleConfirm }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Allow access to Google Fonts' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</CardBody>\n\t\t\t</Card>\n\t\t</div>\n\t);\n}\n\nexport default GoogleFontsConfirmDialog;\n", "/**\n * WordPress dependencies\n */\nimport { useId } from '@wordpress/element';\nimport { CheckboxControl, Flex } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { getFontFaceVariantName } from './utils';\nimport FontDemo from './font-demo';\nimport type { CollectionFontVariantProps } from './types';\n\nfunction CollectionFontVariant( {\n\tface,\n\tfont,\n\thandleToggleVariant,\n\tselected,\n}: CollectionFontVariantProps ) {\n\tconst handleToggleActivation = () => {\n\t\tif ( font?.fontFace ) {\n\t\t\thandleToggleVariant( font, face );\n\t\t\treturn;\n\t\t}\n\t\thandleToggleVariant( font );\n\t};\n\n\tconst displayName = font.name + ' ' + getFontFaceVariantName( face );\n\tconst checkboxId = useId();\n\n\treturn (\n\t\t<div className=\"font-library__font-card\">\n\t\t\t<Flex justify=\"flex-start\" align=\"center\" gap=\"1rem\">\n\t\t\t\t<CheckboxControl\n\t\t\t\t\tchecked={ selected }\n\t\t\t\t\tonChange={ handleToggleActivation }\n\t\t\t\t\tid={ checkboxId }\n\t\t\t\t/>\n\t\t\t\t<label htmlFor={ checkboxId }>\n\t\t\t\t\t<FontDemo\n\t\t\t\t\t\tfont={ face }\n\t\t\t\t\t\ttext={ displayName }\n\t\t\t\t\t\tonClick={ handleToggleActivation }\n\t\t\t\t\t/>\n\t\t\t\t</label>\n\t\t\t</Flex>\n\t\t</div>\n\t);\n}\n\nexport default CollectionFontVariant;\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__experimentalText as Text,\n\t__experimentalVStack as VStack,\n\tButton,\n\tDropZone,\n\tNotice,\n\tFormFileUpload,\n\tFlexItem,\n\tProgressBar,\n} from '@wordpress/components';\nimport { useContext, useState } from '@wordpress/element';\nimport type { FontFace } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { ALLOWED_FILE_EXTENSIONS } from './utils/constants';\nimport { FontLibraryContext } from './context';\nimport { Font } from './lib/lib-font.browser';\nimport makeFamiliesFromFaces from './utils/make-families-from-faces';\nimport { loadFontFaceInBrowser } from './utils';\n\nfunction UploadFonts() {\n\tconst { installFonts } = useContext( FontLibraryContext );\n\tconst [ isUploading, setIsUploading ] = useState( false );\n\tconst [ notice, setNotice ] = useState< {\n\t\ttype: 'success' | 'error';\n\t\tmessage: string;\n\t\terrors?: string[];\n\t} | null >( null );\n\n\tconst handleDropZone = ( files: File[] ) => {\n\t\thandleFilesUpload( files );\n\t};\n\tconst onFilesUpload = ( event: React.ChangeEvent< HTMLInputElement > ) => {\n\t\thandleFilesUpload( event.target.files );\n\t};\n\n\t/**\n\t * Filters the selected files to only allow the ones with the allowed extensions\n\t *\n\t * @param {Array} files The files to be filtered\n\t * @return {void}\n\t */\n\tconst handleFilesUpload = async ( files: FileList | File[] | null ) => {\n\t\tif ( ! files ) {\n\t\t\treturn;\n\t\t}\n\t\tsetNotice( null );\n\t\tsetIsUploading( true );\n\t\tconst uniqueFilenames = new Set();\n\t\tconst selectedFiles = [ ...files ];\n\t\tlet hasInvalidFiles = false;\n\n\t\t// Use map to create a promise for each file check, then filter with Promise.all.\n\t\tconst checkFilesPromises = selectedFiles.map( async ( file ) => {\n\t\t\tconst isFont = await isFontFile( file );\n\t\t\tif ( ! isFont ) {\n\t\t\t\thasInvalidFiles = true;\n\t\t\t\treturn null; // Return null for invalid files.\n\t\t\t}\n\t\t\t// Check for duplicates\n\t\t\tif ( uniqueFilenames.has( file.name ) ) {\n\t\t\t\treturn null; // Return null for duplicates.\n\t\t\t}\n\t\t\t// Check if the file extension is allowed.\n\t\t\tconst fileExtension = (\n\t\t\t\t( ( file.name ?? '' ).split( '.' ) ?? [] ).pop() ?? ''\n\t\t\t).toLowerCase();\n\t\t\tif ( ALLOWED_FILE_EXTENSIONS.includes( fileExtension ) ) {\n\t\t\t\tuniqueFilenames.add( file.name );\n\t\t\t\treturn file; // Return the file if it passes all checks.\n\t\t\t}\n\t\t\treturn null; // Return null for disallowed file extensions.\n\t\t} );\n\n\t\t// Filter out the nulls after all promises have resolved.\n\t\tconst allowedFiles: File[] = (\n\t\t\tawait Promise.all( checkFilesPromises )\n\t\t).filter( ( file ) => null !== file );\n\n\t\tif ( allowedFiles.length > 0 ) {\n\t\t\tloadFiles( allowedFiles );\n\t\t} else {\n\t\t\tconst message = hasInvalidFiles\n\t\t\t\t? __( 'Sorry, you are not allowed to upload this file type.' )\n\t\t\t\t: __( 'No fonts found to install.' );\n\n\t\t\tsetNotice( {\n\t\t\t\ttype: 'error',\n\t\t\t\tmessage,\n\t\t\t} );\n\t\t\tsetIsUploading( false );\n\t\t}\n\t};\n\n\t/**\n\t * Loads the selected files and reads the font metadata\n\t *\n\t * @param {Array} files The files to be loaded\n\t * @return {void}\n\t */\n\tconst loadFiles = async ( files: File[] ) => {\n\t\tconst fontFacesLoaded = await Promise.all(\n\t\t\tfiles.map( async ( fontFile: File ) => {\n\t\t\t\tconst fontFaceData = await getFontFaceMetadata( fontFile );\n\t\t\t\tawait loadFontFaceInBrowser(\n\t\t\t\t\tfontFaceData,\n\t\t\t\t\tfontFaceData.file,\n\t\t\t\t\t'all'\n\t\t\t\t);\n\t\t\t\treturn fontFaceData;\n\t\t\t} )\n\t\t);\n\t\thandleInstall( fontFacesLoaded );\n\t};\n\n\t/**\n\t * Checks if a file is a valid Font file.\n\t *\n\t * @param {File} file The file to be checked.\n\t * @return {boolean} Whether the file is a valid font file.\n\t */\n\tasync function isFontFile( file: File ) {\n\t\tconst font = new Font( 'Uploaded Font' );\n\t\ttry {\n\t\t\tconst buffer = await readFileAsArrayBuffer( file );\n\t\t\tawait font.fromDataBuffer( buffer, 'font' );\n\t\t\treturn true;\n\t\t} catch ( error ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t// Create a function to read the file as array buffer\n\tasync function readFileAsArrayBuffer( file: File ) {\n\t\treturn new Promise( ( resolve, reject ) => {\n\t\t\tconst reader = new window.FileReader();\n\t\t\treader.readAsArrayBuffer( file );\n\t\t\treader.onload = () => resolve( reader.result );\n\t\t\treader.onerror = reject;\n\t\t} );\n\t}\n\n\tconst getFontFaceMetadata = async ( fontFile: File ) => {\n\t\tconst buffer = await readFileAsArrayBuffer( fontFile );\n\t\tconst fontObj: Font & {\n\t\t\tonload?: ( val: { detail: { font: any } } ) => void;\n\t\t} = new Font( 'Uploaded Font' );\n\t\tfontObj.fromDataBuffer( buffer, fontFile.name );\n\t\t// Assuming that fromDataBuffer triggers onload event and returning a Promise\n\t\tconst onloadEvent: { detail: { font: any } } = await new Promise(\n\t\t\t( resolve ) => ( fontObj.onload = resolve )\n\t\t);\n\t\tconst font = onloadEvent.detail.font;\n\t\tconst { name } = font.opentype.tables;\n\t\tconst fontName = name.get( 16 ) || name.get( 1 );\n\t\tconst isItalic = name.get( 2 ).toLowerCase().includes( 'italic' );\n\t\tconst fontWeight =\n\t\t\tfont.opentype.tables[ 'OS/2' ].usWeightClass || 'normal';\n\t\tconst isVariable = !! font.opentype.tables.fvar;\n\t\tconst weightAxis =\n\t\t\tisVariable &&\n\t\t\tfont.opentype.tables.fvar.axes.find(\n\t\t\t\t( { tag }: { tag: string } ) => tag === 'wght'\n\t\t\t);\n\t\tconst weightRange = weightAxis\n\t\t\t? `${ weightAxis.minValue } ${ weightAxis.maxValue }`\n\t\t\t: null;\n\t\treturn {\n\t\t\tfile: fontFile,\n\t\t\tfontFamily: fontName,\n\t\t\tfontStyle: isItalic ? 'italic' : 'normal',\n\t\t\tfontWeight: weightRange || fontWeight,\n\t\t};\n\t};\n\n\t/**\n\t * Creates the font family definition and sends it to the server\n\t *\n\t * @param {Array} fontFaces The font faces to be installed\n\t * @return {void}\n\t */\n\tconst handleInstall = async ( fontFaces: FontFace[] ) => {\n\t\tconst fontFamilies = makeFamiliesFromFaces( fontFaces );\n\n\t\ttry {\n\t\t\tawait installFonts( fontFamilies );\n\t\t\tsetNotice( {\n\t\t\t\ttype: 'success',\n\t\t\t\tmessage: __( 'Fonts were installed successfully.' ),\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\tconst typedError = error as Error & {\n\t\t\t\tinstallationErrors?: string[];\n\t\t\t};\n\t\t\tsetNotice( {\n\t\t\t\ttype: 'error',\n\t\t\t\tmessage: typedError.message,\n\t\t\t\terrors: typedError?.installationErrors,\n\t\t\t} );\n\t\t}\n\n\t\tsetIsUploading( false );\n\t};\n\n\treturn (\n\t\t<div className=\"font-library__tabpanel-layout\">\n\t\t\t<DropZone onFilesDrop={ handleDropZone } />\n\t\t\t<VStack className=\"font-library__local-fonts\" justify=\"start\">\n\t\t\t\t{ notice && (\n\t\t\t\t\t<Notice\n\t\t\t\t\t\tstatus={ notice.type }\n\t\t\t\t\t\t__unstableHTML\n\t\t\t\t\t\tonRemove={ () => setNotice( null ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ notice.message }\n\t\t\t\t\t\t{ notice.errors && (\n\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t{ notice.errors.map( ( error, index ) => (\n\t\t\t\t\t\t\t\t\t<li key={ index }>{ error }</li>\n\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Notice>\n\t\t\t\t) }\n\t\t\t\t{ isUploading && (\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<div className=\"font-library__upload-area\">\n\t\t\t\t\t\t\t<ProgressBar />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t) }\n\t\t\t\t{ ! isUploading && (\n\t\t\t\t\t<FormFileUpload\n\t\t\t\t\t\taccept={ ALLOWED_FILE_EXTENSIONS.map(\n\t\t\t\t\t\t\t( ext ) => `.${ ext }`\n\t\t\t\t\t\t).join( ',' ) }\n\t\t\t\t\t\tmultiple\n\t\t\t\t\t\tonChange={ onFilesUpload }\n\t\t\t\t\t\trender={ ( { openFileDialog } ) => (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tclassName=\"font-library__upload-area\"\n\t\t\t\t\t\t\t\tonClick={ openFileDialog }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Upload font' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<Text className=\"font-library__upload-area__text\">\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2.'\n\t\t\t\t\t) }\n\t\t\t\t</Text>\n\t\t\t</VStack>\n\t\t</div>\n\t);\n}\n\nexport default UploadFonts;\n", "/**\n * Credits:\n *\n * lib-font\n * https://github.com/Pomax/lib-font\n * https://github.com/Pomax/lib-font/blob/master/lib/unbrotli.js\n *\n * The MIT License (MIT)\n *\n * Copyright (c) 2020 pomax@nihongoresources.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n/* eslint eslint-comments/no-unlimited-disable: 0 */\n/* eslint-disable */\nexport default ( function () {\n\tvar define, module, exports;\n\treturn ( function () {\n\t\tfunction r( e, n, t ) {\n\t\t\tfunction o( i, f ) {\n\t\t\t\tif ( ! n[ i ] ) {\n\t\t\t\t\tif ( ! e[ i ] ) {\n\t\t\t\t\t\tvar c = 'function' == typeof require && require;\n\t\t\t\t\t\tif ( ! f && c ) return c( i, ! 0 );\n\t\t\t\t\t\tif ( u ) return u( i, ! 0 );\n\t\t\t\t\t\tvar a = new Error( \"Cannot find module '\" + i + \"'\" );\n\t\t\t\t\t\tthrow ( ( a.code = 'MODULE_NOT_FOUND' ), a );\n\t\t\t\t\t}\n\t\t\t\t\tvar p = ( n[ i ] = { exports: {} } );\n\t\t\t\t\te[ i ][ 0 ].call(\n\t\t\t\t\t\tp.exports,\n\t\t\t\t\t\tfunction ( r ) {\n\t\t\t\t\t\t\tvar n = e[ i ][ 1 ][ r ];\n\t\t\t\t\t\t\treturn o( n || r );\n\t\t\t\t\t\t},\n\t\t\t\t\t\tp,\n\t\t\t\t\t\tp.exports,\n\t\t\t\t\t\tr,\n\t\t\t\t\t\te,\n\t\t\t\t\t\tn,\n\t\t\t\t\t\tt\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn n[ i ].exports;\n\t\t\t}\n\t\t\tfor (\n\t\t\t\tvar u = 'function' == typeof require && require, i = 0;\n\t\t\t\ti < t.length;\n\t\t\t\ti++\n\t\t\t)\n\t\t\t\to( t[ i ] );\n\t\t\treturn o;\n\t\t}\n\t\treturn r;\n\t} )()(\n\t\t{\n\t\t\t1: [\n\t\t\t\tfunction ( require, module, exports ) {\n\t\t\t\t\t/* Copyright 2013 Google Inc. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n Bit reading helpers\n*/\n\n\t\t\t\t\tvar BROTLI_READ_SIZE = 4096;\n\t\t\t\t\tvar BROTLI_IBUF_SIZE = 2 * BROTLI_READ_SIZE + 32;\n\t\t\t\t\tvar BROTLI_IBUF_MASK = 2 * BROTLI_READ_SIZE - 1;\n\n\t\t\t\t\tvar kBitMask = new Uint32Array( [\n\t\t\t\t\t\t0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095,\n\t\t\t\t\t\t8191, 16383, 32767, 65535, 131071, 262143, 524287,\n\t\t\t\t\t\t1048575, 2097151, 4194303, 8388607, 16777215,\n\t\t\t\t\t] );\n\n\t\t\t\t\t/* Input byte buffer, consist of a ringbuffer and a \"slack\" region where */\n\t\t\t\t\t/* bytes from the start of the ringbuffer are copied. */\n\t\t\t\t\tfunction BrotliBitReader( input ) {\n\t\t\t\t\t\tthis.buf_ = new Uint8Array( BROTLI_IBUF_SIZE );\n\t\t\t\t\t\tthis.input_ = input; /* input callback */\n\n\t\t\t\t\t\tthis.reset();\n\t\t\t\t\t}\n\n\t\t\t\t\tBrotliBitReader.READ_SIZE = BROTLI_READ_SIZE;\n\t\t\t\t\tBrotliBitReader.IBUF_MASK = BROTLI_IBUF_MASK;\n\n\t\t\t\t\tBrotliBitReader.prototype.reset = function () {\n\t\t\t\t\t\tthis.buf_ptr_ = 0; /* next input will write here */\n\t\t\t\t\t\tthis.val_ = 0; /* pre-fetched bits */\n\t\t\t\t\t\tthis.pos_ = 0; /* byte position in stream */\n\t\t\t\t\t\tthis.bit_pos_ = 0; /* current bit-reading position in val_ */\n\t\t\t\t\t\tthis.bit_end_pos_ = 0; /* bit-reading end position from LSB of val_ */\n\t\t\t\t\t\tthis.eos_ = 0; /* input stream is finished */\n\n\t\t\t\t\t\tthis.readMoreInput();\n\t\t\t\t\t\tfor ( var i = 0; i < 4; i++ ) {\n\t\t\t\t\t\t\tthis.val_ |= this.buf_[ this.pos_ ] << ( 8 * i );\n\t\t\t\t\t\t\t++this.pos_;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn this.bit_end_pos_ > 0;\n\t\t\t\t\t};\n\n\t\t\t\t\t/* Fills up the input ringbuffer by calling the input callback.\n\n Does nothing if there are at least 32 bytes present after current position.\n\n Returns 0 if either:\n - the input callback returned an error, or\n - there is no more input and the position is past the end of the stream.\n\n After encountering the end of the input stream, 32 additional zero bytes are\n copied to the ringbuffer, therefore it is safe to call this function after\n every 32 bytes of input is read.\n*/\n\t\t\t\t\tBrotliBitReader.prototype.readMoreInput = function () {\n\t\t\t\t\t\tif ( this.bit_end_pos_ > 256 ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t} else if ( this.eos_ ) {\n\t\t\t\t\t\t\tif ( this.bit_pos_ > this.bit_end_pos_ )\n\t\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t\t'Unexpected end of input ' +\n\t\t\t\t\t\t\t\t\t\tthis.bit_pos_ +\n\t\t\t\t\t\t\t\t\t\t' ' +\n\t\t\t\t\t\t\t\t\t\tthis.bit_end_pos_\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvar dst = this.buf_ptr_;\n\t\t\t\t\t\t\tvar bytes_read = this.input_.read(\n\t\t\t\t\t\t\t\tthis.buf_,\n\t\t\t\t\t\t\t\tdst,\n\t\t\t\t\t\t\t\tBROTLI_READ_SIZE\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tif ( bytes_read < 0 ) {\n\t\t\t\t\t\t\t\tthrow new Error( 'Unexpected end of input' );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( bytes_read < BROTLI_READ_SIZE ) {\n\t\t\t\t\t\t\t\tthis.eos_ = 1;\n\t\t\t\t\t\t\t\t/* Store 32 bytes of zero after the stream end. */\n\t\t\t\t\t\t\t\tfor ( var p = 0; p < 32; p++ )\n\t\t\t\t\t\t\t\t\tthis.buf_[ dst + bytes_read + p ] = 0;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( dst === 0 ) {\n\t\t\t\t\t\t\t\t/* Copy the head of the ringbuffer to the slack region. */\n\t\t\t\t\t\t\t\tfor ( var p = 0; p < 32; p++ )\n\t\t\t\t\t\t\t\t\tthis.buf_[ ( BROTLI_READ_SIZE << 1 ) + p ] =\n\t\t\t\t\t\t\t\t\t\tthis.buf_[ p ];\n\n\t\t\t\t\t\t\t\tthis.buf_ptr_ = BROTLI_READ_SIZE;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.buf_ptr_ = 0;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthis.bit_end_pos_ += bytes_read << 3;\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\t/* Guarantees that there are at least 24 bits in the buffer. */\n\t\t\t\t\tBrotliBitReader.prototype.fillBitWindow = function () {\n\t\t\t\t\t\twhile ( this.bit_pos_ >= 8 ) {\n\t\t\t\t\t\t\tthis.val_ >>>= 8;\n\t\t\t\t\t\t\tthis.val_ |=\n\t\t\t\t\t\t\t\tthis.buf_[ this.pos_ & BROTLI_IBUF_MASK ] << 24;\n\t\t\t\t\t\t\t++this.pos_;\n\t\t\t\t\t\t\tthis.bit_pos_ = ( this.bit_pos_ - 8 ) >>> 0;\n\t\t\t\t\t\t\tthis.bit_end_pos_ = ( this.bit_end_pos_ - 8 ) >>> 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\t/* Reads the specified number of bits from Read Buffer. */\n\t\t\t\t\tBrotliBitReader.prototype.readBits = function ( n_bits ) {\n\t\t\t\t\t\tif ( 32 - this.bit_pos_ < n_bits ) {\n\t\t\t\t\t\t\tthis.fillBitWindow();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar val =\n\t\t\t\t\t\t\t( this.val_ >>> this.bit_pos_ ) &\n\t\t\t\t\t\t\tkBitMask[ n_bits ];\n\t\t\t\t\t\tthis.bit_pos_ += n_bits;\n\t\t\t\t\t\treturn val;\n\t\t\t\t\t};\n\n\t\t\t\t\tmodule.exports = BrotliBitReader;\n\t\t\t\t},\n\t\t\t\t{},\n\t\t\t],\n\t\t\t2: [\n\t\t\t\tfunction ( require, module, exports ) {\n\t\t\t\t\t/* Copyright 2013 Google Inc. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n Lookup table to map the previous two bytes to a context id.\n\n There are four different context modeling modes defined here:\n CONTEXT_LSB6: context id is the least significant 6 bits of the last byte,\n CONTEXT_MSB6: context id is the most significant 6 bits of the last byte,\n CONTEXT_UTF8: second-order context model tuned for UTF8-encoded text,\n CONTEXT_SIGNED: second-order context model tuned for signed integers.\n\n The context id for the UTF8 context model is calculated as follows. If p1\n and p2 are the previous two bytes, we calcualte the context as\n\n context = kContextLookup[p1] | kContextLookup[p2 + 256].\n\n If the previous two bytes are ASCII characters (i.e. < 128), this will be\n equivalent to\n\n context = 4 * context1(p1) + context2(p2),\n\n where context1 is based on the previous byte in the following way:\n\n 0 : non-ASCII control\n 1 : \\t, \\n, \\r\n 2 : space\n 3 : other punctuation\n 4 : \" '\n 5 : %\n 6 : ( < [ {\n 7 : ) > ] }\n 8 : , ; :\n 9 : .\n 10 : =\n 11 : number\n 12 : upper-case vowel\n 13 : upper-case consonant\n 14 : lower-case vowel\n 15 : lower-case consonant\n\n and context2 is based on the second last byte:\n\n 0 : control, space\n 1 : punctuation\n 2 : upper-case letter, number\n 3 : lower-case letter\n\n If the last byte is ASCII, and the second last byte is not (in a valid UTF8\n stream it will be a continuation byte, value between 128 and 191), the\n context is the same as if the second last byte was an ASCII control or space.\n\n If the last byte is a UTF8 lead byte (value >= 192), then the next byte will\n be a continuation byte and the context id is 2 or 3 depending on the LSB of\n the last byte and to a lesser extent on the second last byte if it is ASCII.\n\n If the last byte is a UTF8 continuation byte, the second last byte can be:\n - continuation byte: the next byte is probably ASCII or lead byte (assuming\n 4-byte UTF8 characters are rare) and the context id is 0 or 1.\n - lead byte (192 - 207): next byte is ASCII or lead byte, context is 0 or 1\n - lead byte (208 - 255): next byte is continuation byte, context is 2 or 3\n\n The possible value combinations of the previous two bytes, the range of\n context ids and the type of the next byte is summarized in the table below:\n\n |--------\\-----------------------------------------------------------------|\n | \\ Last byte |\n | Second \\---------------------------------------------------------------|\n | last byte \\ ASCII | cont. byte | lead byte |\n | \\ (0-127) | (128-191) | (192-) |\n |=============|===================|=====================|==================|\n | ASCII | next: ASCII/lead | not valid | next: cont. |\n | (0-127) | context: 4 - 63 | | context: 2 - 3 |\n |-------------|-------------------|---------------------|------------------|\n | cont. byte | next: ASCII/lead | next: ASCII/lead | next: cont. |\n | (128-191) | context: 4 - 63 | context: 0 - 1 | context: 2 - 3 |\n |-------------|-------------------|---------------------|------------------|\n | lead byte | not valid | next: ASCII/lead | not valid |\n | (192-207) | | context: 0 - 1 | |\n |-------------|-------------------|---------------------|------------------|\n | lead byte | not valid | next: cont. | not valid |\n | (208-) | | context: 2 - 3 | |\n |-------------|-------------------|---------------------|------------------|\n\n The context id for the signed context mode is calculated as:\n\n context = (kContextLookup[512 + p1] << 3) | kContextLookup[512 + p2].\n\n For any context modeling modes, the context ids can be calculated by |-ing\n together two lookups from one table using context model dependent offsets:\n\n context = kContextLookup[offset1 + p1] | kContextLookup[offset2 + p2].\n\n where offset1 and offset2 are dependent on the context mode.\n*/\n\n\t\t\t\t\tvar CONTEXT_LSB6 = 0;\n\t\t\t\t\tvar CONTEXT_MSB6 = 1;\n\t\t\t\t\tvar CONTEXT_UTF8 = 2;\n\t\t\t\t\tvar CONTEXT_SIGNED = 3;\n\n\t\t\t\t\t/* Common context lookup table for all context modes. */\n\t\t\t\t\texports.lookup = new Uint8Array( [\n\t\t\t\t\t\t/* CONTEXT_UTF8, last byte. */\n\t\t\t\t\t\t/* ASCII range. */\n\t\t\t\t\t\t0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 4, 0, 0, 0, 0, 0,\n\t\t\t\t\t\t0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 12, 16, 12,\n\t\t\t\t\t\t12, 20, 12, 16, 24, 28, 12, 12, 32, 12, 36, 12, 44, 44,\n\t\t\t\t\t\t44, 44, 44, 44, 44, 44, 44, 44, 32, 32, 24, 40, 28, 12,\n\t\t\t\t\t\t12, 48, 52, 52, 52, 48, 52, 52, 52, 48, 52, 52, 52, 52,\n\t\t\t\t\t\t52, 48, 52, 52, 52, 52, 52, 48, 52, 52, 52, 52, 52, 24,\n\t\t\t\t\t\t12, 28, 12, 12, 12, 56, 60, 60, 60, 56, 60, 60, 60, 56,\n\t\t\t\t\t\t60, 60, 60, 60, 60, 56, 60, 60, 60, 60, 60, 56, 60, 60,\n\t\t\t\t\t\t60, 60, 60, 24, 12, 28, 12, 0,\n\t\t\t\t\t\t/* UTF8 continuation byte range. */\n\t\t\t\t\t\t0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,\n\t\t\t\t\t\t1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,\n\t\t\t\t\t\t0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,\n\t\t\t\t\t\t1, 0, 1, 0, 1, 0, 1 /* UTF8 lead byte range. */, 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5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,\n\t\t\t\t\t\t5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,\n\t\t\t\t\t\t5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6,\n\t\t\t\t\t\t6, 6, 6, 6, 6, 6, 6, 6, 7,\n\t\t\t\t\t\t/* CONTEXT_SIGNED, last byte, same as the above values shifted by 3 bits. */\n\t\t\t\t\t\t0,\n\t\t\t\t\t\t8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16,\n\t\t\t\t\t\t16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,\n\t\t\t\t\t\t16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,\n\t\t\t\t\t\t16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,\n\t\t\t\t\t\t16, 16, 16, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n\t\t\t\t\t\t24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n\t\t\t\t\t\t24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n\t\t\t\t\t\t24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n\t\t\t\t\t\t24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 32, 32, 32,\n\t\t\t\t\t\t32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,\n\t\t\t\t\t\t32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,\n\t\t\t\t\t\t32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,\n\t\t\t\t\t\t32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,\n\t\t\t\t\t\t32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 40, 40, 40, 40,\n\t\t\t\t\t\t40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,\n\t\t\t\t\t\t40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,\n\t\t\t\t\t\t40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 48, 48, 48,\n\t\t\t\t\t\t48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 56,\n\t\t\t\t\t\t/* CONTEXT_LSB6, last byte. */\n\t\t\t\t\t\t0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n\t\t\t\t\t\t16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,\n\t\t\t\t\t\t30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,\n\t\t\t\t\t\t44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,\n\t\t\t\t\t\t58, 59, 60, 61, 62, 63, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,\n\t\t\t\t\t\t10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,\n\t\t\t\t\t\t24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,\n\t\t\t\t\t\t38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,\n\t\t\t\t\t\t52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, 1, 2,\n\t\t\t\t\t\t3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,\n\t\t\t\t\t\t19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,\n\t\t\t\t\t\t33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,\n\t\t\t\t\t\t47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,\n\t\t\t\t\t\t61, 62, 63, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,\n\t\t\t\t\t\t13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,\n\t\t\t\t\t\t27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,\n\t\t\t\t\t\t41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,\n\t\t\t\t\t\t55, 56, 57, 58, 59, 60, 61, 62, 63,\n\t\t\t\t\t\t/* CONTEXT_MSB6, last byte. */\n\t\t\t\t\t\t0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4,\n\t\t\t\t\t\t4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9,\n\t\t\t\t\t\t9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12,\n\t\t\t\t\t\t13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16,\n\t\t\t\t\t\t16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19,\n\t\t\t\t\t\t20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23,\n\t\t\t\t\t\t23, 23, 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26,\n\t\t\t\t\t\t27, 27, 27, 27, 28, 28, 28, 28, 29, 29, 29, 29, 30, 30,\n\t\t\t\t\t\t30, 30, 31, 31, 31, 31, 32, 32, 32, 32, 33, 33, 33, 33,\n\t\t\t\t\t\t34, 34, 34, 34, 35, 35, 35, 35, 36, 36, 36, 36, 37, 37,\n\t\t\t\t\t\t37, 37, 38, 38, 38, 38, 39, 39, 39, 39, 40, 40, 40, 40,\n\t\t\t\t\t\t41, 41, 41, 41, 42, 42, 42, 42, 43, 43, 43, 43, 44, 44,\n\t\t\t\t\t\t44, 44, 45, 45, 45, 45, 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\t\t\t\t0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t\t\t\t\t\t0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t\t\t\t\t\t0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t\t\t\t\t\t0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t\t\t\t\t] );\n\n\t\t\t\t\texports.lookupOffsets = new Uint16Array( [\n\t\t\t\t\t\t/* CONTEXT_LSB6 */\n\t\t\t\t\t\t1024, 1536 /* CONTEXT_MSB6 */, 1280,\n\t\t\t\t\t\t1536 /* CONTEXT_UTF8 */, 0, 256 /* CONTEXT_SIGNED */,\n\t\t\t\t\t\t768, 512,\n\t\t\t\t\t] );\n\t\t\t\t},\n\t\t\t\t{},\n\t\t\t],\n\t\t\t3: [\n\t\t\t\tfunction ( require, module, exports ) {\n\t\t\t\t\t/* Copyright 2013 Google Inc. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\n\n\t\t\t\t\tvar BrotliInput = require( './streams' ).BrotliInput;\n\t\t\t\t\tvar BrotliOutput = require( './streams' ).BrotliOutput;\n\t\t\t\t\tvar BrotliBitReader = require( './bit_reader' );\n\t\t\t\t\tvar BrotliDictionary = require( './dictionary' );\n\t\t\t\t\tvar HuffmanCode = require( './huffman' ).HuffmanCode;\n\t\t\t\t\tvar BrotliBuildHuffmanTable =\n\t\t\t\t\t\trequire( './huffman' ).BrotliBuildHuffmanTable;\n\t\t\t\t\tvar Context = require( './context' );\n\t\t\t\t\tvar Prefix = require( './prefix' );\n\t\t\t\t\tvar Transform = require( './transform' );\n\n\t\t\t\t\tvar kDefaultCodeLength = 8;\n\t\t\t\t\tvar kCodeLengthRepeatCode = 16;\n\t\t\t\t\tvar kNumLiteralCodes = 256;\n\t\t\t\t\tvar kNumInsertAndCopyCodes = 704;\n\t\t\t\t\tvar kNumBlockLengthCodes = 26;\n\t\t\t\t\tvar kLiteralContextBits = 6;\n\t\t\t\t\tvar kDistanceContextBits = 2;\n\n\t\t\t\t\tvar HUFFMAN_TABLE_BITS = 8;\n\t\t\t\t\tvar HUFFMAN_TABLE_MASK = 0xff;\n\t\t\t\t\t/* Maximum possible Huffman table size for an alphabet size of 704, max code\n\t\t\t\t\t * length 15 and root table bits 8. */\n\t\t\t\t\tvar HUFFMAN_MAX_TABLE_SIZE = 1080;\n\n\t\t\t\t\tvar CODE_LENGTH_CODES = 18;\n\t\t\t\t\tvar kCodeLengthCodeOrder = new Uint8Array( [\n\t\t\t\t\t\t1, 2, 3, 4, 0, 5, 17, 6, 16, 7, 8, 9, 10, 11, 12, 13,\n\t\t\t\t\t\t14, 15,\n\t\t\t\t\t] );\n\n\t\t\t\t\tvar NUM_DISTANCE_SHORT_CODES = 16;\n\t\t\t\t\tvar kDistanceShortCodeIndexOffset = new Uint8Array( [\n\t\t\t\t\t\t3, 2, 1, 0, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2,\n\t\t\t\t\t] );\n\n\t\t\t\t\tvar kDistanceShortCodeValueOffset = new Int8Array( [\n\t\t\t\t\t\t0, 0, 0, 0, -1, 1, -2, 2, -3, 3, -1, 1, -2, 2, -3, 3,\n\t\t\t\t\t] );\n\n\t\t\t\t\tvar kMaxHuffmanTableSize = new Uint16Array( [\n\t\t\t\t\t\t256, 402, 436, 468, 500, 534, 566, 598, 630, 662, 694,\n\t\t\t\t\t\t726, 758, 790, 822, 854, 886, 920, 952, 984, 1016, 1048,\n\t\t\t\t\t\t1080,\n\t\t\t\t\t] );\n\n\t\t\t\t\tfunction DecodeWindowBits( br ) {\n\t\t\t\t\t\tvar n;\n\t\t\t\t\t\tif ( br.readBits( 1 ) === 0 ) {\n\t\t\t\t\t\t\treturn 16;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn = br.readBits( 3 );\n\t\t\t\t\t\tif ( n > 0 ) {\n\t\t\t\t\t\t\treturn 17 + n;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn = br.readBits( 3 );\n\t\t\t\t\t\tif ( n > 0 ) {\n\t\t\t\t\t\t\treturn 8 + n;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn 17;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Decodes a number in the range [0..255], by reading 1 - 11 bits. */\n\t\t\t\t\tfunction DecodeVarLenUint8( br ) {\n\t\t\t\t\t\tif ( br.readBits( 1 ) ) {\n\t\t\t\t\t\t\tvar nbits = br.readBits( 3 );\n\t\t\t\t\t\t\tif ( nbits === 0 ) {\n\t\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treturn br.readBits( nbits ) + ( 1 << nbits );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction MetaBlockLength() {\n\t\t\t\t\t\tthis.meta_block_length = 0;\n\t\t\t\t\t\tthis.input_end = 0;\n\t\t\t\t\t\tthis.is_uncompressed = 0;\n\t\t\t\t\t\tthis.is_metadata = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction DecodeMetaBlockLength( br ) {\n\t\t\t\t\t\tvar out = new MetaBlockLength();\n\t\t\t\t\t\tvar size_nibbles;\n\t\t\t\t\t\tvar size_bytes;\n\t\t\t\t\t\tvar i;\n\n\t\t\t\t\t\tout.input_end = br.readBits( 1 );\n\t\t\t\t\t\tif ( out.input_end && br.readBits( 1 ) ) {\n\t\t\t\t\t\t\treturn out;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tsize_nibbles = br.readBits( 2 ) + 4;\n\t\t\t\t\t\tif ( size_nibbles === 7 ) {\n\t\t\t\t\t\t\tout.is_metadata = true;\n\n\t\t\t\t\t\t\tif ( br.readBits( 1 ) !== 0 )\n\t\t\t\t\t\t\t\tthrow new Error( 'Invalid reserved bit' );\n\n\t\t\t\t\t\t\tsize_bytes = br.readBits( 2 );\n\t\t\t\t\t\t\tif ( size_bytes === 0 ) return out;\n\n\t\t\t\t\t\t\tfor ( i = 0; i < size_bytes; i++ ) {\n\t\t\t\t\t\t\t\tvar next_byte = br.readBits( 8 );\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\ti + 1 === size_bytes &&\n\t\t\t\t\t\t\t\t\tsize_bytes > 1 &&\n\t\t\t\t\t\t\t\t\tnext_byte === 0\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\tthrow new Error( 'Invalid size byte' );\n\n\t\t\t\t\t\t\t\tout.meta_block_length |= next_byte << ( i * 8 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfor ( i = 0; i < size_nibbles; ++i ) {\n\t\t\t\t\t\t\t\tvar next_nibble = br.readBits( 4 );\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\ti + 1 === size_nibbles &&\n\t\t\t\t\t\t\t\t\tsize_nibbles > 4 &&\n\t\t\t\t\t\t\t\t\tnext_nibble === 0\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\tthrow new Error( 'Invalid size nibble' );\n\n\t\t\t\t\t\t\t\tout.meta_block_length |=\n\t\t\t\t\t\t\t\t\tnext_nibble << ( i * 4 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t++out.meta_block_length;\n\n\t\t\t\t\t\tif ( ! out.input_end && ! out.is_metadata ) {\n\t\t\t\t\t\t\tout.is_uncompressed = br.readBits( 1 );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn out;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Decodes the next Huffman code from bit-stream. */\n\t\t\t\t\tfunction ReadSymbol( table, index, br ) {\n\t\t\t\t\t\tvar start_index = index;\n\n\t\t\t\t\t\tvar nbits;\n\t\t\t\t\t\tbr.fillBitWindow();\n\t\t\t\t\t\tindex +=\n\t\t\t\t\t\t\t( br.val_ >>> br.bit_pos_ ) & HUFFMAN_TABLE_MASK;\n\t\t\t\t\t\tnbits = table[ index ].bits - HUFFMAN_TABLE_BITS;\n\t\t\t\t\t\tif ( nbits > 0 ) {\n\t\t\t\t\t\t\tbr.bit_pos_ += HUFFMAN_TABLE_BITS;\n\t\t\t\t\t\t\tindex += table[ index ].value;\n\t\t\t\t\t\t\tindex +=\n\t\t\t\t\t\t\t\t( br.val_ >>> br.bit_pos_ ) &\n\t\t\t\t\t\t\t\t( ( 1 << nbits ) - 1 );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbr.bit_pos_ += table[ index ].bits;\n\t\t\t\t\t\treturn table[ index ].value;\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction ReadHuffmanCodeLengths(\n\t\t\t\t\t\tcode_length_code_lengths,\n\t\t\t\t\t\tnum_symbols,\n\t\t\t\t\t\tcode_lengths,\n\t\t\t\t\t\tbr\n\t\t\t\t\t) {\n\t\t\t\t\t\tvar symbol = 0;\n\t\t\t\t\t\tvar prev_code_len = kDefaultCodeLength;\n\t\t\t\t\t\tvar repeat = 0;\n\t\t\t\t\t\tvar repeat_code_len = 0;\n\t\t\t\t\t\tvar space = 32768;\n\n\t\t\t\t\t\tvar table = [];\n\t\t\t\t\t\tfor ( var i = 0; i < 32; i++ )\n\t\t\t\t\t\t\ttable.push( new HuffmanCode( 0, 0 ) );\n\n\t\t\t\t\t\tBrotliBuildHuffmanTable(\n\t\t\t\t\t\t\ttable,\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t5,\n\t\t\t\t\t\t\tcode_length_code_lengths,\n\t\t\t\t\t\t\tCODE_LENGTH_CODES\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\twhile ( symbol < num_symbols && space > 0 ) {\n\t\t\t\t\t\t\tvar p = 0;\n\t\t\t\t\t\t\tvar code_len;\n\n\t\t\t\t\t\t\tbr.readMoreInput();\n\t\t\t\t\t\t\tbr.fillBitWindow();\n\t\t\t\t\t\t\tp += ( br.val_ >>> br.bit_pos_ ) & 31;\n\t\t\t\t\t\t\tbr.bit_pos_ += table[ p ].bits;\n\t\t\t\t\t\t\tcode_len = table[ p ].value & 0xff;\n\t\t\t\t\t\t\tif ( code_len < kCodeLengthRepeatCode ) {\n\t\t\t\t\t\t\t\trepeat = 0;\n\t\t\t\t\t\t\t\tcode_lengths[ symbol++ ] = code_len;\n\t\t\t\t\t\t\t\tif ( code_len !== 0 ) {\n\t\t\t\t\t\t\t\t\tprev_code_len = code_len;\n\t\t\t\t\t\t\t\t\tspace -= 32768 >> code_len;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tvar extra_bits = code_len - 14;\n\t\t\t\t\t\t\t\tvar old_repeat;\n\t\t\t\t\t\t\t\tvar repeat_delta;\n\t\t\t\t\t\t\t\tvar new_len = 0;\n\t\t\t\t\t\t\t\tif ( code_len === kCodeLengthRepeatCode ) {\n\t\t\t\t\t\t\t\t\tnew_len = prev_code_len;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( repeat_code_len !== new_len ) {\n\t\t\t\t\t\t\t\t\trepeat = 0;\n\t\t\t\t\t\t\t\t\trepeat_code_len = new_len;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\told_repeat = repeat;\n\t\t\t\t\t\t\t\tif ( repeat > 0 ) {\n\t\t\t\t\t\t\t\t\trepeat -= 2;\n\t\t\t\t\t\t\t\t\trepeat <<= extra_bits;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\trepeat += br.readBits( extra_bits ) + 3;\n\t\t\t\t\t\t\t\trepeat_delta = repeat - old_repeat;\n\t\t\t\t\t\t\t\tif ( symbol + repeat_delta > num_symbols ) {\n\t\t\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t\t\t'[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tfor ( var x = 0; x < repeat_delta; x++ )\n\t\t\t\t\t\t\t\t\tcode_lengths[ symbol + x ] =\n\t\t\t\t\t\t\t\t\t\trepeat_code_len;\n\n\t\t\t\t\t\t\t\tsymbol += repeat_delta;\n\n\t\t\t\t\t\t\t\tif ( repeat_code_len !== 0 ) {\n\t\t\t\t\t\t\t\t\tspace -=\n\t\t\t\t\t\t\t\t\t\trepeat_delta <<\n\t\t\t\t\t\t\t\t\t\t( 15 - repeat_code_len );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( space !== 0 ) {\n\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t'[ReadHuffmanCodeLengths] space = ' + space\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor ( ; symbol < num_symbols; symbol++ )\n\t\t\t\t\t\t\tcode_lengths[ symbol ] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction ReadHuffmanCode(\n\t\t\t\t\t\talphabet_size,\n\t\t\t\t\t\ttables,\n\t\t\t\t\t\ttable,\n\t\t\t\t\t\tbr\n\t\t\t\t\t) {\n\t\t\t\t\t\tvar table_size = 0;\n\t\t\t\t\t\tvar simple_code_or_skip;\n\t\t\t\t\t\tvar code_lengths = new Uint8Array( alphabet_size );\n\n\t\t\t\t\t\tbr.readMoreInput();\n\n\t\t\t\t\t\t/* simple_code_or_skip is used as follows:\n 1 for simple code;\n 0 for no skipping, 2 skips 2 code lengths, 3 skips 3 code lengths */\n\t\t\t\t\t\tsimple_code_or_skip = br.readBits( 2 );\n\t\t\t\t\t\tif ( simple_code_or_skip === 1 ) {\n\t\t\t\t\t\t\t/* Read symbols, codes & code lengths directly. */\n\t\t\t\t\t\t\tvar i;\n\t\t\t\t\t\t\tvar max_bits_counter = alphabet_size - 1;\n\t\t\t\t\t\t\tvar max_bits = 0;\n\t\t\t\t\t\t\tvar symbols = new Int32Array( 4 );\n\t\t\t\t\t\t\tvar num_symbols = br.readBits( 2 ) + 1;\n\t\t\t\t\t\t\twhile ( max_bits_counter ) {\n\t\t\t\t\t\t\t\tmax_bits_counter >>= 1;\n\t\t\t\t\t\t\t\t++max_bits;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfor ( i = 0; i < num_symbols; ++i ) {\n\t\t\t\t\t\t\t\tsymbols[ i ] =\n\t\t\t\t\t\t\t\t\tbr.readBits( max_bits ) % alphabet_size;\n\t\t\t\t\t\t\t\tcode_lengths[ symbols[ i ] ] = 2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcode_lengths[ symbols[ 0 ] ] = 1;\n\t\t\t\t\t\t\tswitch ( num_symbols ) {\n\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\tsymbols[ 0 ] === symbols[ 1 ] ||\n\t\t\t\t\t\t\t\t\t\tsymbols[ 0 ] === symbols[ 2 ] ||\n\t\t\t\t\t\t\t\t\t\tsymbols[ 1 ] === symbols[ 2 ]\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t\t\t\t'[ReadHuffmanCode] invalid symbols'\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\tif ( symbols[ 0 ] === symbols[ 1 ] ) {\n\t\t\t\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t\t\t\t'[ReadHuffmanCode] invalid symbols'\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tcode_lengths[ symbols[ 1 ] ] = 1;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\tsymbols[ 0 ] === symbols[ 1 ] ||\n\t\t\t\t\t\t\t\t\t\tsymbols[ 0 ] === symbols[ 2 ] ||\n\t\t\t\t\t\t\t\t\t\tsymbols[ 0 ] === symbols[ 3 ] ||\n\t\t\t\t\t\t\t\t\t\tsymbols[ 1 ] === symbols[ 2 ] ||\n\t\t\t\t\t\t\t\t\t\tsymbols[ 1 ] === symbols[ 3 ] ||\n\t\t\t\t\t\t\t\t\t\tsymbols[ 2 ] === symbols[ 3 ]\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t\t\t\t'[ReadHuffmanCode] invalid symbols'\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif ( br.readBits( 1 ) ) {\n\t\t\t\t\t\t\t\t\t\tcode_lengths[ symbols[ 2 ] ] = 3;\n\t\t\t\t\t\t\t\t\t\tcode_lengths[ symbols[ 3 ] ] = 3;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tcode_lengths[ symbols[ 0 ] ] = 2;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t/* Decode Huffman-coded code lengths. */\n\t\t\t\t\t\t\tvar i;\n\t\t\t\t\t\t\tvar code_length_code_lengths = new Uint8Array(\n\t\t\t\t\t\t\t\tCODE_LENGTH_CODES\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tvar space = 32;\n\t\t\t\t\t\t\tvar num_codes = 0;\n\t\t\t\t\t\t\t/* Static Huffman code for the code length code lengths */\n\t\t\t\t\t\t\tvar huff = [\n\t\t\t\t\t\t\t\tnew HuffmanCode( 2, 0 ),\n\t\t\t\t\t\t\t\tnew HuffmanCode( 2, 4 ),\n\t\t\t\t\t\t\t\tnew HuffmanCode( 2, 3 ),\n\t\t\t\t\t\t\t\tnew HuffmanCode( 3, 2 ),\n\t\t\t\t\t\t\t\tnew HuffmanCode( 2, 0 ),\n\t\t\t\t\t\t\t\tnew HuffmanCode( 2, 4 ),\n\t\t\t\t\t\t\t\tnew HuffmanCode( 2, 3 ),\n\t\t\t\t\t\t\t\tnew HuffmanCode( 4, 1 ),\n\t\t\t\t\t\t\t\tnew HuffmanCode( 2, 0 ),\n\t\t\t\t\t\t\t\tnew HuffmanCode( 2, 4 ),\n\t\t\t\t\t\t\t\tnew HuffmanCode( 2, 3 ),\n\t\t\t\t\t\t\t\tnew HuffmanCode( 3, 2 ),\n\t\t\t\t\t\t\t\tnew HuffmanCode( 2, 0 ),\n\t\t\t\t\t\t\t\tnew HuffmanCode( 2, 4 ),\n\t\t\t\t\t\t\t\tnew HuffmanCode( 2, 3 ),\n\t\t\t\t\t\t\t\tnew HuffmanCode( 4, 5 ),\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\tfor (\n\t\t\t\t\t\t\t\ti = simple_code_or_skip;\n\t\t\t\t\t\t\t\ti < CODE_LENGTH_CODES && space > 0;\n\t\t\t\t\t\t\t\t++i\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tvar code_len_idx = kCodeLengthCodeOrder[ i ];\n\t\t\t\t\t\t\t\tvar p = 0;\n\t\t\t\t\t\t\t\tvar v;\n\t\t\t\t\t\t\t\tbr.fillBitWindow();\n\t\t\t\t\t\t\t\tp += ( br.val_ >>> br.bit_pos_ ) & 15;\n\t\t\t\t\t\t\t\tbr.bit_pos_ += huff[ p ].bits;\n\t\t\t\t\t\t\t\tv = huff[ p ].value;\n\t\t\t\t\t\t\t\tcode_length_code_lengths[ code_len_idx ] = v;\n\t\t\t\t\t\t\t\tif ( v !== 0 ) {\n\t\t\t\t\t\t\t\t\tspace -= 32 >> v;\n\t\t\t\t\t\t\t\t\t++num_codes;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( ! ( num_codes === 1 || space === 0 ) )\n\t\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t\t'[ReadHuffmanCode] invalid num_codes or space'\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tReadHuffmanCodeLengths(\n\t\t\t\t\t\t\t\tcode_length_code_lengths,\n\t\t\t\t\t\t\t\talphabet_size,\n\t\t\t\t\t\t\t\tcode_lengths,\n\t\t\t\t\t\t\t\tbr\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttable_size = BrotliBuildHuffmanTable(\n\t\t\t\t\t\t\ttables,\n\t\t\t\t\t\t\ttable,\n\t\t\t\t\t\t\tHUFFMAN_TABLE_BITS,\n\t\t\t\t\t\t\tcode_lengths,\n\t\t\t\t\t\t\talphabet_size\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif ( table_size === 0 ) {\n\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t'[ReadHuffmanCode] BuildHuffmanTable failed: '\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn table_size;\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction ReadBlockLength( table, index, br ) {\n\t\t\t\t\t\tvar code;\n\t\t\t\t\t\tvar nbits;\n\t\t\t\t\t\tcode = ReadSymbol( table, index, br );\n\t\t\t\t\t\tnbits = Prefix.kBlockLengthPrefixCode[ code ].nbits;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\tPrefix.kBlockLengthPrefixCode[ code ].offset +\n\t\t\t\t\t\t\tbr.readBits( nbits )\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction TranslateShortCodes( code, ringbuffer, index ) {\n\t\t\t\t\t\tvar val;\n\t\t\t\t\t\tif ( code < NUM_DISTANCE_SHORT_CODES ) {\n\t\t\t\t\t\t\tindex += kDistanceShortCodeIndexOffset[ code ];\n\t\t\t\t\t\t\tindex &= 3;\n\t\t\t\t\t\t\tval =\n\t\t\t\t\t\t\t\tringbuffer[ index ] +\n\t\t\t\t\t\t\t\tkDistanceShortCodeValueOffset[ code ];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tval = code - NUM_DISTANCE_SHORT_CODES + 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn val;\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction MoveToFront( v, index ) {\n\t\t\t\t\t\tvar value = v[ index ];\n\t\t\t\t\t\tvar i = index;\n\t\t\t\t\t\tfor ( ; i; --i ) v[ i ] = v[ i - 1 ];\n\t\t\t\t\t\tv[ 0 ] = value;\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction InverseMoveToFrontTransform( v, v_len ) {\n\t\t\t\t\t\tvar mtf = new Uint8Array( 256 );\n\t\t\t\t\t\tvar i;\n\t\t\t\t\t\tfor ( i = 0; i < 256; ++i ) {\n\t\t\t\t\t\t\tmtf[ i ] = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( i = 0; i < v_len; ++i ) {\n\t\t\t\t\t\t\tvar index = v[ i ];\n\t\t\t\t\t\t\tv[ i ] = mtf[ index ];\n\t\t\t\t\t\t\tif ( index ) MoveToFront( mtf, index );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Contains a collection of huffman trees with the same alphabet size. */\n\t\t\t\t\tfunction HuffmanTreeGroup( alphabet_size, num_htrees ) {\n\t\t\t\t\t\tthis.alphabet_size = alphabet_size;\n\t\t\t\t\t\tthis.num_htrees = num_htrees;\n\t\t\t\t\t\tthis.codes = new Array(\n\t\t\t\t\t\t\tnum_htrees +\n\t\t\t\t\t\t\t\tnum_htrees *\n\t\t\t\t\t\t\t\t\tkMaxHuffmanTableSize[\n\t\t\t\t\t\t\t\t\t\t( alphabet_size + 31 ) >>> 5\n\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t);\n\t\t\t\t\t\tthis.htrees = new Uint32Array( num_htrees );\n\t\t\t\t\t}\n\n\t\t\t\t\tHuffmanTreeGroup.prototype.decode = function ( br ) {\n\t\t\t\t\t\tvar i;\n\t\t\t\t\t\tvar table_size;\n\t\t\t\t\t\tvar next = 0;\n\t\t\t\t\t\tfor ( i = 0; i < this.num_htrees; ++i ) {\n\t\t\t\t\t\t\tthis.htrees[ i ] = next;\n\t\t\t\t\t\t\ttable_size = ReadHuffmanCode(\n\t\t\t\t\t\t\t\tthis.alphabet_size,\n\t\t\t\t\t\t\t\tthis.codes,\n\t\t\t\t\t\t\t\tnext,\n\t\t\t\t\t\t\t\tbr\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tnext += table_size;\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\tfunction DecodeContextMap( context_map_size, br ) {\n\t\t\t\t\t\tvar out = { num_htrees: null, context_map: null };\n\t\t\t\t\t\tvar use_rle_for_zeros;\n\t\t\t\t\t\tvar max_run_length_prefix = 0;\n\t\t\t\t\t\tvar table;\n\t\t\t\t\t\tvar i;\n\n\t\t\t\t\t\tbr.readMoreInput();\n\t\t\t\t\t\tvar num_htrees = ( out.num_htrees =\n\t\t\t\t\t\t\tDecodeVarLenUint8( br ) + 1 );\n\n\t\t\t\t\t\tvar context_map = ( out.context_map = new Uint8Array(\n\t\t\t\t\t\t\tcontext_map_size\n\t\t\t\t\t\t) );\n\t\t\t\t\t\tif ( num_htrees <= 1 ) {\n\t\t\t\t\t\t\treturn out;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tuse_rle_for_zeros = br.readBits( 1 );\n\t\t\t\t\t\tif ( use_rle_for_zeros ) {\n\t\t\t\t\t\t\tmax_run_length_prefix = br.readBits( 4 ) + 1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttable = [];\n\t\t\t\t\t\tfor ( i = 0; i < HUFFMAN_MAX_TABLE_SIZE; i++ ) {\n\t\t\t\t\t\t\ttable[ i ] = new HuffmanCode( 0, 0 );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tReadHuffmanCode(\n\t\t\t\t\t\t\tnum_htrees + max_run_length_prefix,\n\t\t\t\t\t\t\ttable,\n\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\tbr\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tfor ( i = 0; i < context_map_size; ) {\n\t\t\t\t\t\t\tvar code;\n\n\t\t\t\t\t\t\tbr.readMoreInput();\n\t\t\t\t\t\t\tcode = ReadSymbol( table, 0, br );\n\t\t\t\t\t\t\tif ( code === 0 ) {\n\t\t\t\t\t\t\t\tcontext_map[ i ] = 0;\n\t\t\t\t\t\t\t\t++i;\n\t\t\t\t\t\t\t} else if ( code <= max_run_length_prefix ) {\n\t\t\t\t\t\t\t\tvar reps =\n\t\t\t\t\t\t\t\t\t1 + ( 1 << code ) + br.readBits( code );\n\t\t\t\t\t\t\t\twhile ( --reps ) {\n\t\t\t\t\t\t\t\t\tif ( i >= context_map_size ) {\n\t\t\t\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t\t\t\t'[DecodeContextMap] i >= context_map_size'\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tcontext_map[ i ] = 0;\n\t\t\t\t\t\t\t\t\t++i;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcontext_map[ i ] = code - max_run_length_prefix;\n\t\t\t\t\t\t\t\t++i;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( br.readBits( 1 ) ) {\n\t\t\t\t\t\t\tInverseMoveToFrontTransform(\n\t\t\t\t\t\t\t\tcontext_map,\n\t\t\t\t\t\t\t\tcontext_map_size\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn out;\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction DecodeBlockType(\n\t\t\t\t\t\tmax_block_type,\n\t\t\t\t\t\ttrees,\n\t\t\t\t\t\ttree_type,\n\t\t\t\t\t\tblock_types,\n\t\t\t\t\t\tringbuffers,\n\t\t\t\t\t\tindexes,\n\t\t\t\t\t\tbr\n\t\t\t\t\t) {\n\t\t\t\t\t\tvar ringbuffer = tree_type * 2;\n\t\t\t\t\t\tvar index = tree_type;\n\t\t\t\t\t\tvar type_code = ReadSymbol(\n\t\t\t\t\t\t\ttrees,\n\t\t\t\t\t\t\ttree_type * HUFFMAN_MAX_TABLE_SIZE,\n\t\t\t\t\t\t\tbr\n\t\t\t\t\t\t);\n\t\t\t\t\t\tvar block_type;\n\t\t\t\t\t\tif ( type_code === 0 ) {\n\t\t\t\t\t\t\tblock_type =\n\t\t\t\t\t\t\t\tringbuffers[\n\t\t\t\t\t\t\t\t\tringbuffer + ( indexes[ index ] & 1 )\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t} else if ( type_code === 1 ) {\n\t\t\t\t\t\t\tblock_type =\n\t\t\t\t\t\t\t\tringbuffers[\n\t\t\t\t\t\t\t\t\tringbuffer +\n\t\t\t\t\t\t\t\t\t\t( ( indexes[ index ] - 1 ) & 1 )\n\t\t\t\t\t\t\t\t] + 1;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tblock_type = type_code - 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( block_type >= max_block_type ) {\n\t\t\t\t\t\t\tblock_type -= max_block_type;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tblock_types[ tree_type ] = block_type;\n\t\t\t\t\t\tringbuffers[ ringbuffer + ( indexes[ index ] & 1 ) ] =\n\t\t\t\t\t\t\tblock_type;\n\t\t\t\t\t\t++indexes[ index ];\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction CopyUncompressedBlockToOutput(\n\t\t\t\t\t\toutput,\n\t\t\t\t\t\tlen,\n\t\t\t\t\t\tpos,\n\t\t\t\t\t\tringbuffer,\n\t\t\t\t\t\tringbuffer_mask,\n\t\t\t\t\t\tbr\n\t\t\t\t\t) {\n\t\t\t\t\t\tvar rb_size = ringbuffer_mask + 1;\n\t\t\t\t\t\tvar rb_pos = pos & ringbuffer_mask;\n\t\t\t\t\t\tvar br_pos = br.pos_ & BrotliBitReader.IBUF_MASK;\n\t\t\t\t\t\tvar nbytes;\n\n\t\t\t\t\t\t/* For short lengths copy byte-by-byte */\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tlen < 8 ||\n\t\t\t\t\t\t\tbr.bit_pos_ + ( len << 3 ) < br.bit_end_pos_\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\twhile ( len-- > 0 ) {\n\t\t\t\t\t\t\t\tbr.readMoreInput();\n\t\t\t\t\t\t\t\tringbuffer[ rb_pos++ ] = br.readBits( 8 );\n\t\t\t\t\t\t\t\tif ( rb_pos === rb_size ) {\n\t\t\t\t\t\t\t\t\toutput.write( ringbuffer, rb_size );\n\t\t\t\t\t\t\t\t\trb_pos = 0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( br.bit_end_pos_ < 32 ) {\n\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t'[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* Copy remaining 0-4 bytes from br.val_ to ringbuffer. */\n\t\t\t\t\t\twhile ( br.bit_pos_ < 32 ) {\n\t\t\t\t\t\t\tringbuffer[ rb_pos ] = br.val_ >>> br.bit_pos_;\n\t\t\t\t\t\t\tbr.bit_pos_ += 8;\n\t\t\t\t\t\t\t++rb_pos;\n\t\t\t\t\t\t\t--len;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* Copy remaining bytes from br.buf_ to ringbuffer. */\n\t\t\t\t\t\tnbytes = ( br.bit_end_pos_ - br.bit_pos_ ) >> 3;\n\t\t\t\t\t\tif ( br_pos + nbytes > BrotliBitReader.IBUF_MASK ) {\n\t\t\t\t\t\t\tvar tail = BrotliBitReader.IBUF_MASK + 1 - br_pos;\n\t\t\t\t\t\t\tfor ( var x = 0; x < tail; x++ )\n\t\t\t\t\t\t\t\tringbuffer[ rb_pos + x ] =\n\t\t\t\t\t\t\t\t\tbr.buf_[ br_pos + x ];\n\n\t\t\t\t\t\t\tnbytes -= tail;\n\t\t\t\t\t\t\trb_pos += tail;\n\t\t\t\t\t\t\tlen -= tail;\n\t\t\t\t\t\t\tbr_pos = 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor ( var x = 0; x < nbytes; x++ )\n\t\t\t\t\t\t\tringbuffer[ rb_pos + x ] = br.buf_[ br_pos + x ];\n\n\t\t\t\t\t\trb_pos += nbytes;\n\t\t\t\t\t\tlen -= nbytes;\n\n\t\t\t\t\t\t/* If we wrote past the logical end of the ringbuffer, copy the tail of the\n ringbuffer to its beginning and flush the ringbuffer to the output. */\n\t\t\t\t\t\tif ( rb_pos >= rb_size ) {\n\t\t\t\t\t\t\toutput.write( ringbuffer, rb_size );\n\t\t\t\t\t\t\trb_pos -= rb_size;\n\t\t\t\t\t\t\tfor ( var x = 0; x < rb_pos; x++ )\n\t\t\t\t\t\t\t\tringbuffer[ x ] = ringbuffer[ rb_size + x ];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* If we have more to copy than the remaining size of the ringbuffer, then we\n first fill the ringbuffer from the input and then flush the ringbuffer to\n the output */\n\t\t\t\t\t\twhile ( rb_pos + len >= rb_size ) {\n\t\t\t\t\t\t\tnbytes = rb_size - rb_pos;\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tbr.input_.read( ringbuffer, rb_pos, nbytes ) <\n\t\t\t\t\t\t\t\tnbytes\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t\t'[CopyUncompressedBlockToOutput] not enough bytes'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\toutput.write( ringbuffer, rb_size );\n\t\t\t\t\t\t\tlen -= nbytes;\n\t\t\t\t\t\t\trb_pos = 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* Copy straight from the input onto the ringbuffer. The ringbuffer will be\n flushed to the output at a later time. */\n\t\t\t\t\t\tif ( br.input_.read( ringbuffer, rb_pos, len ) < len ) {\n\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t'[CopyUncompressedBlockToOutput] not enough bytes'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* Restore the state of the bit reader. */\n\t\t\t\t\t\tbr.reset();\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Advances the bit reader position to the next byte boundary and verifies\n that any skipped bits are set to zero. */\n\t\t\t\t\tfunction JumpToByteBoundary( br ) {\n\t\t\t\t\t\tvar new_bit_pos = ( br.bit_pos_ + 7 ) & ~7;\n\t\t\t\t\t\tvar pad_bits = br.readBits( new_bit_pos - br.bit_pos_ );\n\t\t\t\t\t\treturn pad_bits == 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction BrotliDecompressedSize( buffer ) {\n\t\t\t\t\t\tvar input = new BrotliInput( buffer );\n\t\t\t\t\t\tvar br = new BrotliBitReader( input );\n\t\t\t\t\t\tDecodeWindowBits( br );\n\t\t\t\t\t\tvar out = DecodeMetaBlockLength( br );\n\t\t\t\t\t\treturn out.meta_block_length;\n\t\t\t\t\t}\n\n\t\t\t\t\texports.BrotliDecompressedSize = BrotliDecompressedSize;\n\n\t\t\t\t\tfunction BrotliDecompressBuffer( buffer, output_size ) {\n\t\t\t\t\t\tvar input = new BrotliInput( buffer );\n\n\t\t\t\t\t\tif ( output_size == null ) {\n\t\t\t\t\t\t\toutput_size = BrotliDecompressedSize( buffer );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar output_buffer = new Uint8Array( output_size );\n\t\t\t\t\t\tvar output = new BrotliOutput( output_buffer );\n\n\t\t\t\t\t\tBrotliDecompress( input, output );\n\n\t\t\t\t\t\tif ( output.pos < output.buffer.length ) {\n\t\t\t\t\t\t\toutput.buffer = output.buffer.subarray(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\toutput.pos\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn output.buffer;\n\t\t\t\t\t}\n\n\t\t\t\t\texports.BrotliDecompressBuffer = BrotliDecompressBuffer;\n\n\t\t\t\t\tfunction BrotliDecompress( input, output ) {\n\t\t\t\t\t\tvar i;\n\t\t\t\t\t\tvar pos = 0;\n\t\t\t\t\t\tvar input_end = 0;\n\t\t\t\t\t\tvar window_bits = 0;\n\t\t\t\t\t\tvar max_backward_distance;\n\t\t\t\t\t\tvar max_distance = 0;\n\t\t\t\t\t\tvar ringbuffer_size;\n\t\t\t\t\t\tvar ringbuffer_mask;\n\t\t\t\t\t\tvar ringbuffer;\n\t\t\t\t\t\tvar ringbuffer_end;\n\t\t\t\t\t\t/* This ring buffer holds a few past copy distances that will be used by */\n\t\t\t\t\t\t/* some special distance codes. */\n\t\t\t\t\t\tvar dist_rb = [ 16, 15, 11, 4 ];\n\t\t\t\t\t\tvar dist_rb_idx = 0;\n\t\t\t\t\t\t/* The previous 2 bytes used for context. */\n\t\t\t\t\t\tvar prev_byte1 = 0;\n\t\t\t\t\t\tvar prev_byte2 = 0;\n\t\t\t\t\t\tvar hgroup = [\n\t\t\t\t\t\t\tnew HuffmanTreeGroup( 0, 0 ),\n\t\t\t\t\t\t\tnew HuffmanTreeGroup( 0, 0 ),\n\t\t\t\t\t\t\tnew HuffmanTreeGroup( 0, 0 ),\n\t\t\t\t\t\t];\n\t\t\t\t\t\tvar block_type_trees;\n\t\t\t\t\t\tvar block_len_trees;\n\t\t\t\t\t\tvar br;\n\n\t\t\t\t\t\t/* We need the slack region for the following reasons:\n - always doing two 8-byte copies for fast backward copying\n - transforms\n - flushing the input ringbuffer when decoding uncompressed blocks */\n\t\t\t\t\t\tvar kRingBufferWriteAheadSlack =\n\t\t\t\t\t\t\t128 + BrotliBitReader.READ_SIZE;\n\n\t\t\t\t\t\tbr = new BrotliBitReader( input );\n\n\t\t\t\t\t\t/* Decode window size. */\n\t\t\t\t\t\twindow_bits = DecodeWindowBits( br );\n\t\t\t\t\t\tmax_backward_distance = ( 1 << window_bits ) - 16;\n\n\t\t\t\t\t\tringbuffer_size = 1 << window_bits;\n\t\t\t\t\t\tringbuffer_mask = ringbuffer_size - 1;\n\t\t\t\t\t\tringbuffer = new Uint8Array(\n\t\t\t\t\t\t\tringbuffer_size +\n\t\t\t\t\t\t\t\tkRingBufferWriteAheadSlack +\n\t\t\t\t\t\t\t\tBrotliDictionary.maxDictionaryWordLength\n\t\t\t\t\t\t);\n\t\t\t\t\t\tringbuffer_end = ringbuffer_size;\n\n\t\t\t\t\t\tblock_type_trees = [];\n\t\t\t\t\t\tblock_len_trees = [];\n\t\t\t\t\t\tfor ( var x = 0; x < 3 * HUFFMAN_MAX_TABLE_SIZE; x++ ) {\n\t\t\t\t\t\t\tblock_type_trees[ x ] = new HuffmanCode( 0, 0 );\n\t\t\t\t\t\t\tblock_len_trees[ x ] = new HuffmanCode( 0, 0 );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\twhile ( ! input_end ) {\n\t\t\t\t\t\t\tvar meta_block_remaining_len = 0;\n\t\t\t\t\t\t\tvar is_uncompressed;\n\t\t\t\t\t\t\tvar block_length = [ 1 << 28, 1 << 28, 1 << 28 ];\n\t\t\t\t\t\t\tvar block_type = [ 0 ];\n\t\t\t\t\t\t\tvar num_block_types = [ 1, 1, 1 ];\n\t\t\t\t\t\t\tvar block_type_rb = [ 0, 1, 0, 1, 0, 1 ];\n\t\t\t\t\t\t\tvar block_type_rb_index = [ 0 ];\n\t\t\t\t\t\t\tvar distance_postfix_bits;\n\t\t\t\t\t\t\tvar num_direct_distance_codes;\n\t\t\t\t\t\t\tvar distance_postfix_mask;\n\t\t\t\t\t\t\tvar num_distance_codes;\n\t\t\t\t\t\t\tvar context_map = null;\n\t\t\t\t\t\t\tvar context_modes = null;\n\t\t\t\t\t\t\tvar num_literal_htrees;\n\t\t\t\t\t\t\tvar dist_context_map = null;\n\t\t\t\t\t\t\tvar num_dist_htrees;\n\t\t\t\t\t\t\tvar context_offset = 0;\n\t\t\t\t\t\t\tvar context_map_slice = null;\n\t\t\t\t\t\t\tvar literal_htree_index = 0;\n\t\t\t\t\t\t\tvar dist_context_offset = 0;\n\t\t\t\t\t\t\tvar dist_context_map_slice = null;\n\t\t\t\t\t\t\tvar dist_htree_index = 0;\n\t\t\t\t\t\t\tvar context_lookup_offset1 = 0;\n\t\t\t\t\t\t\tvar context_lookup_offset2 = 0;\n\t\t\t\t\t\t\tvar context_mode;\n\t\t\t\t\t\t\tvar htree_command;\n\n\t\t\t\t\t\t\tfor ( i = 0; i < 3; ++i ) {\n\t\t\t\t\t\t\t\thgroup[ i ].codes = null;\n\t\t\t\t\t\t\t\thgroup[ i ].htrees = null;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tbr.readMoreInput();\n\n\t\t\t\t\t\t\tvar _out = DecodeMetaBlockLength( br );\n\t\t\t\t\t\t\tmeta_block_remaining_len = _out.meta_block_length;\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tpos + meta_block_remaining_len >\n\t\t\t\t\t\t\t\toutput.buffer.length\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t/* We need to grow the output buffer to fit the additional data. */\n\t\t\t\t\t\t\t\tvar tmp = new Uint8Array(\n\t\t\t\t\t\t\t\t\tpos + meta_block_remaining_len\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\ttmp.set( output.buffer );\n\t\t\t\t\t\t\t\toutput.buffer = tmp;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tinput_end = _out.input_end;\n\t\t\t\t\t\t\tis_uncompressed = _out.is_uncompressed;\n\n\t\t\t\t\t\t\tif ( _out.is_metadata ) {\n\t\t\t\t\t\t\t\tJumpToByteBoundary( br );\n\n\t\t\t\t\t\t\t\tfor (\n\t\t\t\t\t\t\t\t\t;\n\t\t\t\t\t\t\t\t\tmeta_block_remaining_len > 0;\n\t\t\t\t\t\t\t\t\t--meta_block_remaining_len\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tbr.readMoreInput();\n\t\t\t\t\t\t\t\t\t/* Read one byte and ignore it. */\n\t\t\t\t\t\t\t\t\tbr.readBits( 8 );\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( meta_block_remaining_len === 0 ) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( is_uncompressed ) {\n\t\t\t\t\t\t\t\tbr.bit_pos_ = ( br.bit_pos_ + 7 ) & ~7;\n\t\t\t\t\t\t\t\tCopyUncompressedBlockToOutput(\n\t\t\t\t\t\t\t\t\toutput,\n\t\t\t\t\t\t\t\t\tmeta_block_remaining_len,\n\t\t\t\t\t\t\t\t\tpos,\n\t\t\t\t\t\t\t\t\tringbuffer,\n\t\t\t\t\t\t\t\t\tringbuffer_mask,\n\t\t\t\t\t\t\t\t\tbr\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tpos += meta_block_remaining_len;\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfor ( i = 0; i < 3; ++i ) {\n\t\t\t\t\t\t\t\tnum_block_types[ i ] =\n\t\t\t\t\t\t\t\t\tDecodeVarLenUint8( br ) + 1;\n\t\t\t\t\t\t\t\tif ( num_block_types[ i ] >= 2 ) {\n\t\t\t\t\t\t\t\t\tReadHuffmanCode(\n\t\t\t\t\t\t\t\t\t\tnum_block_types[ i ] + 2,\n\t\t\t\t\t\t\t\t\t\tblock_type_trees,\n\t\t\t\t\t\t\t\t\t\ti * HUFFMAN_MAX_TABLE_SIZE,\n\t\t\t\t\t\t\t\t\t\tbr\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tReadHuffmanCode(\n\t\t\t\t\t\t\t\t\t\tkNumBlockLengthCodes,\n\t\t\t\t\t\t\t\t\t\tblock_len_trees,\n\t\t\t\t\t\t\t\t\t\ti * HUFFMAN_MAX_TABLE_SIZE,\n\t\t\t\t\t\t\t\t\t\tbr\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tblock_length[ i ] = ReadBlockLength(\n\t\t\t\t\t\t\t\t\t\tblock_len_trees,\n\t\t\t\t\t\t\t\t\t\ti * HUFFMAN_MAX_TABLE_SIZE,\n\t\t\t\t\t\t\t\t\t\tbr\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tblock_type_rb_index[ i ] = 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tbr.readMoreInput();\n\n\t\t\t\t\t\t\tdistance_postfix_bits = br.readBits( 2 );\n\t\t\t\t\t\t\tnum_direct_distance_codes =\n\t\t\t\t\t\t\t\tNUM_DISTANCE_SHORT_CODES +\n\t\t\t\t\t\t\t\t( br.readBits( 4 ) << distance_postfix_bits );\n\t\t\t\t\t\t\tdistance_postfix_mask =\n\t\t\t\t\t\t\t\t( 1 << distance_postfix_bits ) - 1;\n\t\t\t\t\t\t\tnum_distance_codes =\n\t\t\t\t\t\t\t\tnum_direct_distance_codes +\n\t\t\t\t\t\t\t\t( 48 << distance_postfix_bits );\n\t\t\t\t\t\t\tcontext_modes = new Uint8Array(\n\t\t\t\t\t\t\t\tnum_block_types[ 0 ]\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tfor ( i = 0; i < num_block_types[ 0 ]; ++i ) {\n\t\t\t\t\t\t\t\tbr.readMoreInput();\n\t\t\t\t\t\t\t\tcontext_modes[ i ] = br.readBits( 2 ) << 1;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar _o1 = DecodeContextMap(\n\t\t\t\t\t\t\t\tnum_block_types[ 0 ] << kLiteralContextBits,\n\t\t\t\t\t\t\t\tbr\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tnum_literal_htrees = _o1.num_htrees;\n\t\t\t\t\t\t\tcontext_map = _o1.context_map;\n\n\t\t\t\t\t\t\tvar _o2 = DecodeContextMap(\n\t\t\t\t\t\t\t\tnum_block_types[ 2 ] << kDistanceContextBits,\n\t\t\t\t\t\t\t\tbr\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tnum_dist_htrees = _o2.num_htrees;\n\t\t\t\t\t\t\tdist_context_map = _o2.context_map;\n\n\t\t\t\t\t\t\thgroup[ 0 ] = new HuffmanTreeGroup(\n\t\t\t\t\t\t\t\tkNumLiteralCodes,\n\t\t\t\t\t\t\t\tnum_literal_htrees\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\thgroup[ 1 ] = new HuffmanTreeGroup(\n\t\t\t\t\t\t\t\tkNumInsertAndCopyCodes,\n\t\t\t\t\t\t\t\tnum_block_types[ 1 ]\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\thgroup[ 2 ] = new HuffmanTreeGroup(\n\t\t\t\t\t\t\t\tnum_distance_codes,\n\t\t\t\t\t\t\t\tnum_dist_htrees\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tfor ( i = 0; i < 3; ++i ) {\n\t\t\t\t\t\t\t\thgroup[ i ].decode( br );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tcontext_map_slice = 0;\n\t\t\t\t\t\t\tdist_context_map_slice = 0;\n\t\t\t\t\t\t\tcontext_mode = context_modes[ block_type[ 0 ] ];\n\t\t\t\t\t\t\tcontext_lookup_offset1 =\n\t\t\t\t\t\t\t\tContext.lookupOffsets[ context_mode ];\n\t\t\t\t\t\t\tcontext_lookup_offset2 =\n\t\t\t\t\t\t\t\tContext.lookupOffsets[ context_mode + 1 ];\n\t\t\t\t\t\t\thtree_command = hgroup[ 1 ].htrees[ 0 ];\n\n\t\t\t\t\t\t\twhile ( meta_block_remaining_len > 0 ) {\n\t\t\t\t\t\t\t\tvar cmd_code;\n\t\t\t\t\t\t\t\tvar range_idx;\n\t\t\t\t\t\t\t\tvar insert_code;\n\t\t\t\t\t\t\t\tvar copy_code;\n\t\t\t\t\t\t\t\tvar insert_length;\n\t\t\t\t\t\t\t\tvar copy_length;\n\t\t\t\t\t\t\t\tvar distance_code;\n\t\t\t\t\t\t\t\tvar distance;\n\t\t\t\t\t\t\t\tvar context;\n\t\t\t\t\t\t\t\tvar j;\n\t\t\t\t\t\t\t\tvar copy_dst;\n\n\t\t\t\t\t\t\t\tbr.readMoreInput();\n\n\t\t\t\t\t\t\t\tif ( block_length[ 1 ] === 0 ) {\n\t\t\t\t\t\t\t\t\tDecodeBlockType(\n\t\t\t\t\t\t\t\t\t\tnum_block_types[ 1 ],\n\t\t\t\t\t\t\t\t\t\tblock_type_trees,\n\t\t\t\t\t\t\t\t\t\t1,\n\t\t\t\t\t\t\t\t\t\tblock_type,\n\t\t\t\t\t\t\t\t\t\tblock_type_rb,\n\t\t\t\t\t\t\t\t\t\tblock_type_rb_index,\n\t\t\t\t\t\t\t\t\t\tbr\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tblock_length[ 1 ] = ReadBlockLength(\n\t\t\t\t\t\t\t\t\t\tblock_len_trees,\n\t\t\t\t\t\t\t\t\t\tHUFFMAN_MAX_TABLE_SIZE,\n\t\t\t\t\t\t\t\t\t\tbr\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\thtree_command =\n\t\t\t\t\t\t\t\t\t\thgroup[ 1 ].htrees[ block_type[ 1 ] ];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t--block_length[ 1 ];\n\t\t\t\t\t\t\t\tcmd_code = ReadSymbol(\n\t\t\t\t\t\t\t\t\thgroup[ 1 ].codes,\n\t\t\t\t\t\t\t\t\thtree_command,\n\t\t\t\t\t\t\t\t\tbr\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\trange_idx = cmd_code >> 6;\n\t\t\t\t\t\t\t\tif ( range_idx >= 2 ) {\n\t\t\t\t\t\t\t\t\trange_idx -= 2;\n\t\t\t\t\t\t\t\t\tdistance_code = -1;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tdistance_code = 0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tinsert_code =\n\t\t\t\t\t\t\t\t\tPrefix.kInsertRangeLut[ range_idx ] +\n\t\t\t\t\t\t\t\t\t( ( cmd_code >> 3 ) & 7 );\n\t\t\t\t\t\t\t\tcopy_code =\n\t\t\t\t\t\t\t\t\tPrefix.kCopyRangeLut[ range_idx ] +\n\t\t\t\t\t\t\t\t\t( cmd_code & 7 );\n\t\t\t\t\t\t\t\tinsert_length =\n\t\t\t\t\t\t\t\t\tPrefix.kInsertLengthPrefixCode[\n\t\t\t\t\t\t\t\t\t\tinsert_code\n\t\t\t\t\t\t\t\t\t].offset +\n\t\t\t\t\t\t\t\t\tbr.readBits(\n\t\t\t\t\t\t\t\t\t\tPrefix.kInsertLengthPrefixCode[\n\t\t\t\t\t\t\t\t\t\t\tinsert_code\n\t\t\t\t\t\t\t\t\t\t].nbits\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tcopy_length =\n\t\t\t\t\t\t\t\t\tPrefix.kCopyLengthPrefixCode[ copy_code ]\n\t\t\t\t\t\t\t\t\t\t.offset +\n\t\t\t\t\t\t\t\t\tbr.readBits(\n\t\t\t\t\t\t\t\t\t\tPrefix.kCopyLengthPrefixCode[\n\t\t\t\t\t\t\t\t\t\t\tcopy_code\n\t\t\t\t\t\t\t\t\t\t].nbits\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tprev_byte1 =\n\t\t\t\t\t\t\t\t\tringbuffer[ ( pos - 1 ) & ringbuffer_mask ];\n\t\t\t\t\t\t\t\tprev_byte2 =\n\t\t\t\t\t\t\t\t\tringbuffer[ ( pos - 2 ) & ringbuffer_mask ];\n\t\t\t\t\t\t\t\tfor ( j = 0; j < insert_length; ++j ) {\n\t\t\t\t\t\t\t\t\tbr.readMoreInput();\n\n\t\t\t\t\t\t\t\t\tif ( block_length[ 0 ] === 0 ) {\n\t\t\t\t\t\t\t\t\t\tDecodeBlockType(\n\t\t\t\t\t\t\t\t\t\t\tnum_block_types[ 0 ],\n\t\t\t\t\t\t\t\t\t\t\tblock_type_trees,\n\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\tblock_type,\n\t\t\t\t\t\t\t\t\t\t\tblock_type_rb,\n\t\t\t\t\t\t\t\t\t\t\tblock_type_rb_index,\n\t\t\t\t\t\t\t\t\t\t\tbr\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\tblock_length[ 0 ] = ReadBlockLength(\n\t\t\t\t\t\t\t\t\t\t\tblock_len_trees,\n\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\tbr\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\tcontext_offset =\n\t\t\t\t\t\t\t\t\t\t\tblock_type[ 0 ] <<\n\t\t\t\t\t\t\t\t\t\t\tkLiteralContextBits;\n\t\t\t\t\t\t\t\t\t\tcontext_map_slice = context_offset;\n\t\t\t\t\t\t\t\t\t\tcontext_mode =\n\t\t\t\t\t\t\t\t\t\t\tcontext_modes[ block_type[ 0 ] ];\n\t\t\t\t\t\t\t\t\t\tcontext_lookup_offset1 =\n\t\t\t\t\t\t\t\t\t\t\tContext.lookupOffsets[\n\t\t\t\t\t\t\t\t\t\t\t\tcontext_mode\n\t\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t\tcontext_lookup_offset2 =\n\t\t\t\t\t\t\t\t\t\t\tContext.lookupOffsets[\n\t\t\t\t\t\t\t\t\t\t\t\tcontext_mode + 1\n\t\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tcontext =\n\t\t\t\t\t\t\t\t\t\tContext.lookup[\n\t\t\t\t\t\t\t\t\t\t\tcontext_lookup_offset1 + prev_byte1\n\t\t\t\t\t\t\t\t\t\t] |\n\t\t\t\t\t\t\t\t\t\tContext.lookup[\n\t\t\t\t\t\t\t\t\t\t\tcontext_lookup_offset2 + prev_byte2\n\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\tliteral_htree_index =\n\t\t\t\t\t\t\t\t\t\tcontext_map[\n\t\t\t\t\t\t\t\t\t\t\tcontext_map_slice + context\n\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t--block_length[ 0 ];\n\t\t\t\t\t\t\t\t\tprev_byte2 = prev_byte1;\n\t\t\t\t\t\t\t\t\tprev_byte1 = ReadSymbol(\n\t\t\t\t\t\t\t\t\t\thgroup[ 0 ].codes,\n\t\t\t\t\t\t\t\t\t\thgroup[ 0 ].htrees[\n\t\t\t\t\t\t\t\t\t\t\tliteral_htree_index\n\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\tbr\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tringbuffer[ pos & ringbuffer_mask ] =\n\t\t\t\t\t\t\t\t\t\tprev_byte1;\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t( pos & ringbuffer_mask ) ===\n\t\t\t\t\t\t\t\t\t\tringbuffer_mask\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\toutput.write(\n\t\t\t\t\t\t\t\t\t\t\tringbuffer,\n\t\t\t\t\t\t\t\t\t\t\tringbuffer_size\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t++pos;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmeta_block_remaining_len -= insert_length;\n\t\t\t\t\t\t\t\tif ( meta_block_remaining_len <= 0 ) break;\n\n\t\t\t\t\t\t\t\tif ( distance_code < 0 ) {\n\t\t\t\t\t\t\t\t\tvar context;\n\n\t\t\t\t\t\t\t\t\tbr.readMoreInput();\n\t\t\t\t\t\t\t\t\tif ( block_length[ 2 ] === 0 ) {\n\t\t\t\t\t\t\t\t\t\tDecodeBlockType(\n\t\t\t\t\t\t\t\t\t\t\tnum_block_types[ 2 ],\n\t\t\t\t\t\t\t\t\t\t\tblock_type_trees,\n\t\t\t\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t\t\t\t\tblock_type,\n\t\t\t\t\t\t\t\t\t\t\tblock_type_rb,\n\t\t\t\t\t\t\t\t\t\t\tblock_type_rb_index,\n\t\t\t\t\t\t\t\t\t\t\tbr\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\tblock_length[ 2 ] = ReadBlockLength(\n\t\t\t\t\t\t\t\t\t\t\tblock_len_trees,\n\t\t\t\t\t\t\t\t\t\t\t2 * HUFFMAN_MAX_TABLE_SIZE,\n\t\t\t\t\t\t\t\t\t\t\tbr\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\tdist_context_offset =\n\t\t\t\t\t\t\t\t\t\t\tblock_type[ 2 ] <<\n\t\t\t\t\t\t\t\t\t\t\tkDistanceContextBits;\n\t\t\t\t\t\t\t\t\t\tdist_context_map_slice =\n\t\t\t\t\t\t\t\t\t\t\tdist_context_offset;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t--block_length[ 2 ];\n\t\t\t\t\t\t\t\t\tcontext =\n\t\t\t\t\t\t\t\t\t\t( copy_length > 4\n\t\t\t\t\t\t\t\t\t\t\t? 3\n\t\t\t\t\t\t\t\t\t\t\t: copy_length - 2 ) & 0xff;\n\t\t\t\t\t\t\t\t\tdist_htree_index =\n\t\t\t\t\t\t\t\t\t\tdist_context_map[\n\t\t\t\t\t\t\t\t\t\t\tdist_context_map_slice + context\n\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\tdistance_code = ReadSymbol(\n\t\t\t\t\t\t\t\t\t\thgroup[ 2 ].codes,\n\t\t\t\t\t\t\t\t\t\thgroup[ 2 ].htrees[ dist_htree_index ],\n\t\t\t\t\t\t\t\t\t\tbr\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\tdistance_code >=\n\t\t\t\t\t\t\t\t\t\tnum_direct_distance_codes\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\tvar nbits;\n\t\t\t\t\t\t\t\t\t\tvar postfix;\n\t\t\t\t\t\t\t\t\t\tvar offset;\n\t\t\t\t\t\t\t\t\t\tdistance_code -=\n\t\t\t\t\t\t\t\t\t\t\tnum_direct_distance_codes;\n\t\t\t\t\t\t\t\t\t\tpostfix =\n\t\t\t\t\t\t\t\t\t\t\tdistance_code &\n\t\t\t\t\t\t\t\t\t\t\tdistance_postfix_mask;\n\t\t\t\t\t\t\t\t\t\tdistance_code >>= distance_postfix_bits;\n\t\t\t\t\t\t\t\t\t\tnbits = ( distance_code >> 1 ) + 1;\n\t\t\t\t\t\t\t\t\t\toffset =\n\t\t\t\t\t\t\t\t\t\t\t( ( 2 + ( distance_code & 1 ) ) <<\n\t\t\t\t\t\t\t\t\t\t\t\tnbits ) -\n\t\t\t\t\t\t\t\t\t\t\t4;\n\t\t\t\t\t\t\t\t\t\tdistance_code =\n\t\t\t\t\t\t\t\t\t\t\tnum_direct_distance_codes +\n\t\t\t\t\t\t\t\t\t\t\t( ( offset +\n\t\t\t\t\t\t\t\t\t\t\t\tbr.readBits( nbits ) ) <<\n\t\t\t\t\t\t\t\t\t\t\t\tdistance_postfix_bits ) +\n\t\t\t\t\t\t\t\t\t\t\tpostfix;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t/* Convert the distance code to the actual distance by possibly looking */\n\t\t\t\t\t\t\t\t/* up past distnaces from the ringbuffer. */\n\t\t\t\t\t\t\t\tdistance = TranslateShortCodes(\n\t\t\t\t\t\t\t\t\tdistance_code,\n\t\t\t\t\t\t\t\t\tdist_rb,\n\t\t\t\t\t\t\t\t\tdist_rb_idx\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tif ( distance < 0 ) {\n\t\t\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t\t\t'[BrotliDecompress] invalid distance'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tpos < max_backward_distance &&\n\t\t\t\t\t\t\t\t\tmax_distance !== max_backward_distance\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tmax_distance = pos;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmax_distance = max_backward_distance;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tcopy_dst = pos & ringbuffer_mask;\n\n\t\t\t\t\t\t\t\tif ( distance > max_distance ) {\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\tcopy_length >=\n\t\t\t\t\t\t\t\t\t\t\tBrotliDictionary.minDictionaryWordLength &&\n\t\t\t\t\t\t\t\t\t\tcopy_length <=\n\t\t\t\t\t\t\t\t\t\t\tBrotliDictionary.maxDictionaryWordLength\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\tvar offset =\n\t\t\t\t\t\t\t\t\t\t\tBrotliDictionary.offsetsByLength[\n\t\t\t\t\t\t\t\t\t\t\t\tcopy_length\n\t\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t\tvar word_id =\n\t\t\t\t\t\t\t\t\t\t\tdistance - max_distance - 1;\n\t\t\t\t\t\t\t\t\t\tvar shift =\n\t\t\t\t\t\t\t\t\t\t\tBrotliDictionary.sizeBitsByLength[\n\t\t\t\t\t\t\t\t\t\t\t\tcopy_length\n\t\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t\tvar mask = ( 1 << shift ) - 1;\n\t\t\t\t\t\t\t\t\t\tvar word_idx = word_id & mask;\n\t\t\t\t\t\t\t\t\t\tvar transform_idx = word_id >> shift;\n\t\t\t\t\t\t\t\t\t\toffset += word_idx * copy_length;\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\ttransform_idx <\n\t\t\t\t\t\t\t\t\t\t\tTransform.kNumTransforms\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\tvar len =\n\t\t\t\t\t\t\t\t\t\t\t\tTransform.transformDictionaryWord(\n\t\t\t\t\t\t\t\t\t\t\t\t\tringbuffer,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcopy_dst,\n\t\t\t\t\t\t\t\t\t\t\t\t\toffset,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcopy_length,\n\t\t\t\t\t\t\t\t\t\t\t\t\ttransform_idx\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\tcopy_dst += len;\n\t\t\t\t\t\t\t\t\t\t\tpos += len;\n\t\t\t\t\t\t\t\t\t\t\tmeta_block_remaining_len -= len;\n\t\t\t\t\t\t\t\t\t\t\tif ( copy_dst >= ringbuffer_end ) {\n\t\t\t\t\t\t\t\t\t\t\t\toutput.write(\n\t\t\t\t\t\t\t\t\t\t\t\t\tringbuffer,\n\t\t\t\t\t\t\t\t\t\t\t\t\tringbuffer_size\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t\t\tfor (\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar _x = 0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t_x <\n\t\t\t\t\t\t\t\t\t\t\t\t\tcopy_dst - ringbuffer_end;\n\t\t\t\t\t\t\t\t\t\t\t\t\t_x++\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\tringbuffer[ _x ] =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tringbuffer[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tringbuffer_end + _x\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t\t\t\t\t'Invalid backward reference. pos: ' +\n\t\t\t\t\t\t\t\t\t\t\t\t\tpos +\n\t\t\t\t\t\t\t\t\t\t\t\t\t' distance: ' +\n\t\t\t\t\t\t\t\t\t\t\t\t\tdistance +\n\t\t\t\t\t\t\t\t\t\t\t\t\t' len: ' +\n\t\t\t\t\t\t\t\t\t\t\t\t\tcopy_length +\n\t\t\t\t\t\t\t\t\t\t\t\t\t' bytes left: ' +\n\t\t\t\t\t\t\t\t\t\t\t\t\tmeta_block_remaining_len\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t\t\t\t'Invalid backward reference. pos: ' +\n\t\t\t\t\t\t\t\t\t\t\t\tpos +\n\t\t\t\t\t\t\t\t\t\t\t\t' distance: ' +\n\t\t\t\t\t\t\t\t\t\t\t\tdistance +\n\t\t\t\t\t\t\t\t\t\t\t\t' len: ' +\n\t\t\t\t\t\t\t\t\t\t\t\tcopy_length +\n\t\t\t\t\t\t\t\t\t\t\t\t' bytes left: ' +\n\t\t\t\t\t\t\t\t\t\t\t\tmeta_block_remaining_len\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif ( distance_code > 0 ) {\n\t\t\t\t\t\t\t\t\t\tdist_rb[ dist_rb_idx & 3 ] = distance;\n\t\t\t\t\t\t\t\t\t\t++dist_rb_idx;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\tcopy_length > meta_block_remaining_len\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t\t\t\t'Invalid backward reference. pos: ' +\n\t\t\t\t\t\t\t\t\t\t\t\tpos +\n\t\t\t\t\t\t\t\t\t\t\t\t' distance: ' +\n\t\t\t\t\t\t\t\t\t\t\t\tdistance +\n\t\t\t\t\t\t\t\t\t\t\t\t' len: ' +\n\t\t\t\t\t\t\t\t\t\t\t\tcopy_length +\n\t\t\t\t\t\t\t\t\t\t\t\t' bytes left: ' +\n\t\t\t\t\t\t\t\t\t\t\t\tmeta_block_remaining_len\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tfor ( j = 0; j < copy_length; ++j ) {\n\t\t\t\t\t\t\t\t\t\tringbuffer[ pos & ringbuffer_mask ] =\n\t\t\t\t\t\t\t\t\t\t\tringbuffer[\n\t\t\t\t\t\t\t\t\t\t\t\t( pos - distance ) &\n\t\t\t\t\t\t\t\t\t\t\t\t\tringbuffer_mask\n\t\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t( pos & ringbuffer_mask ) ===\n\t\t\t\t\t\t\t\t\t\t\tringbuffer_mask\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\toutput.write(\n\t\t\t\t\t\t\t\t\t\t\t\tringbuffer,\n\t\t\t\t\t\t\t\t\t\t\t\tringbuffer_size\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t++pos;\n\t\t\t\t\t\t\t\t\t\t--meta_block_remaining_len;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t/* When we get here, we must have inserted at least one literal and */\n\t\t\t\t\t\t\t\t/* made a copy of at least length two, therefore accessing the last 2 */\n\t\t\t\t\t\t\t\t/* bytes is valid. */\n\t\t\t\t\t\t\t\tprev_byte1 =\n\t\t\t\t\t\t\t\t\tringbuffer[ ( pos - 1 ) & ringbuffer_mask ];\n\t\t\t\t\t\t\t\tprev_byte2 =\n\t\t\t\t\t\t\t\t\tringbuffer[ ( pos - 2 ) & ringbuffer_mask ];\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/* Protect pos from overflow, wrap it around at every GB of input data */\n\t\t\t\t\t\t\tpos &= 0x3fffffff;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\toutput.write( ringbuffer, pos & ringbuffer_mask );\n\t\t\t\t\t}\n\n\t\t\t\t\texports.BrotliDecompress = BrotliDecompress;\n\n\t\t\t\t\tBrotliDictionary.init();\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t'./bit_reader': 1,\n\t\t\t\t\t'./context': 2,\n\t\t\t\t\t'./dictionary': 6,\n\t\t\t\t\t'./huffman': 7,\n\t\t\t\t\t'./prefix': 9,\n\t\t\t\t\t'./streams': 10,\n\t\t\t\t\t'./transform': 11,\n\t\t\t\t},\n\t\t\t],\n\t\t\t4: [\n\t\t\t\tfunction ( require, module, exports ) {\n\t\t\t\t\tvar base64 = require( 'base64-js' );\n\t\t\t\t\t//var fs = require('fs');\n\n\t\t\t\t\t/**\n\t\t\t\t\t * The normal dictionary-data.js is quite large, which makes it\n\t\t\t\t\t * unsuitable for browser usage. In order to make it smaller,\n\t\t\t\t\t * we read dictionary.bin, which is a compressed version of\n\t\t\t\t\t * the dictionary, and on initial load, Brotli decompresses\n\t\t\t\t\t * it's own dictionary. \uD83D\uDE1C\n\t\t\t\t\t */\n\t\t\t\t\texports.init = function () {\n\t\t\t\t\t\tvar BrotliDecompressBuffer =\n\t\t\t\t\t\t\trequire( './decode' ).BrotliDecompressBuffer;\n\t\t\t\t\t\tvar compressed = base64.toByteArray(\n\t\t\t\t\t\t\trequire( './dictionary.bin.js' )\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn BrotliDecompressBuffer( compressed );\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{ './decode': 3, './dictionary.bin.js': 5, 'base64-js': 8 },\n\t\t\t],\n\t\t\t5: [\n\t\t\t\tfunction ( require, module, exports ) {\n\t\t\t\t\tmodule.exports =\n\t\t\t\t\t\t'W5/fcQLn5gKf2XUbAiQ1XULX+TZz6ADToDsgqk6qVfeC0e4m6OO2wcQ1J76ZBVRV1fRkEsdu//62zQsFEZWSTCnMhcsQKlS2qOhuVYYMGCkV0fXWEoMFbESXrKEZ9wdUEsyw9g4bJlEt1Y6oVMxMRTEVbCIwZzJzboK5j8m4YH02qgXYhv1V+PM435sLVxyHJihaJREEhZGqL03txGFQLm76caGO/ovxKvzCby/3vMTtX/459f0igi7WutnKiMQ6wODSoRh/8Lx1V3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aaH7rK4+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=';\n\t\t\t\t},\n\t\t\t\t{},\n\t\t\t],\n\t\t\t6: [\n\t\t\t\tfunction ( require, module, exports ) {\n\t\t\t\t\t/* Copyright 2013 Google Inc. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n Collection of static dictionary words.\n*/\n\n\t\t\t\t\tvar data = require( './dictionary-browser' );\n\t\t\t\t\texports.init = function () {\n\t\t\t\t\t\texports.dictionary = data.init();\n\t\t\t\t\t};\n\n\t\t\t\t\texports.offsetsByLength = new Uint32Array( [\n\t\t\t\t\t\t0, 0, 0, 0, 0, 4096, 9216, 21504, 35840, 44032, 53248,\n\t\t\t\t\t\t63488, 74752, 87040, 93696, 100864, 104704, 106752,\n\t\t\t\t\t\t108928, 113536, 115968, 118528, 119872, 121280, 122016,\n\t\t\t\t\t] );\n\n\t\t\t\t\texports.sizeBitsByLength = new Uint8Array( [\n\t\t\t\t\t\t0, 0, 0, 0, 10, 10, 11, 11, 10, 10, 10, 10, 10, 9, 9, 8,\n\t\t\t\t\t\t7, 7, 8, 7, 7, 6, 6, 5, 5,\n\t\t\t\t\t] );\n\n\t\t\t\t\texports.minDictionaryWordLength = 4;\n\t\t\t\t\texports.maxDictionaryWordLength = 24;\n\t\t\t\t},\n\t\t\t\t{ './dictionary-browser': 4 },\n\t\t\t],\n\t\t\t7: [\n\t\t\t\tfunction ( require, module, exports ) {\n\t\t\t\t\tfunction HuffmanCode( bits, value ) {\n\t\t\t\t\t\tthis.bits =\n\t\t\t\t\t\t\tbits; /* number of bits used for this symbol */\n\t\t\t\t\t\tthis.value = value; /* symbol value or table offset */\n\t\t\t\t\t}\n\n\t\t\t\t\texports.HuffmanCode = HuffmanCode;\n\n\t\t\t\t\tvar MAX_LENGTH = 15;\n\n\t\t\t\t\t/* Returns reverse(reverse(key, len) + 1, len), where reverse(key, len) is the\n bit-wise reversal of the len least significant bits of key. */\n\t\t\t\t\tfunction GetNextKey( key, len ) {\n\t\t\t\t\t\tvar step = 1 << ( len - 1 );\n\t\t\t\t\t\twhile ( key & step ) {\n\t\t\t\t\t\t\tstep >>= 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn ( key & ( step - 1 ) ) + step;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Stores code in table[0], table[step], table[2*step], ..., table[end] */\n\t\t\t\t\t/* Assumes that end is an integer multiple of step */\n\t\t\t\t\tfunction ReplicateValue( table, i, step, end, code ) {\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tend -= step;\n\t\t\t\t\t\t\ttable[ i + end ] = new HuffmanCode(\n\t\t\t\t\t\t\t\tcode.bits,\n\t\t\t\t\t\t\t\tcode.value\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} while ( end > 0 );\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Returns the table width of the next 2nd level table. count is the histogram\n of bit lengths for the remaining symbols, len is the code length of the next\n processed symbol */\n\t\t\t\t\tfunction NextTableBitSize( count, len, root_bits ) {\n\t\t\t\t\t\tvar left = 1 << ( len - root_bits );\n\t\t\t\t\t\twhile ( len < MAX_LENGTH ) {\n\t\t\t\t\t\t\tleft -= count[ len ];\n\t\t\t\t\t\t\tif ( left <= 0 ) break;\n\t\t\t\t\t\t\t++len;\n\t\t\t\t\t\t\tleft <<= 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn len - root_bits;\n\t\t\t\t\t}\n\n\t\t\t\t\texports.BrotliBuildHuffmanTable = function (\n\t\t\t\t\t\troot_table,\n\t\t\t\t\t\ttable,\n\t\t\t\t\t\troot_bits,\n\t\t\t\t\t\tcode_lengths,\n\t\t\t\t\t\tcode_lengths_size\n\t\t\t\t\t) {\n\t\t\t\t\t\tvar start_table = table;\n\t\t\t\t\t\tvar code; /* current table entry */\n\t\t\t\t\t\tvar len; /* current code length */\n\t\t\t\t\t\tvar symbol; /* symbol index in original or sorted table */\n\t\t\t\t\t\tvar key; /* reversed prefix code */\n\t\t\t\t\t\tvar step; /* step size to replicate values in current table */\n\t\t\t\t\t\tvar low; /* low bits for current root entry */\n\t\t\t\t\t\tvar mask; /* mask for low bits */\n\t\t\t\t\t\tvar table_bits; /* key length of current table */\n\t\t\t\t\t\tvar table_size; /* size of current table */\n\t\t\t\t\t\tvar total_size; /* sum of root table size and 2nd level table sizes */\n\t\t\t\t\t\tvar sorted; /* symbols sorted by code length */\n\t\t\t\t\t\tvar count = new Int32Array(\n\t\t\t\t\t\t\tMAX_LENGTH + 1\n\t\t\t\t\t\t); /* number of codes of each length */\n\t\t\t\t\t\tvar offset = new Int32Array(\n\t\t\t\t\t\t\tMAX_LENGTH + 1\n\t\t\t\t\t\t); /* offsets in sorted table for each length */\n\n\t\t\t\t\t\tsorted = new Int32Array( code_lengths_size );\n\n\t\t\t\t\t\t/* build histogram of code lengths */\n\t\t\t\t\t\tfor (\n\t\t\t\t\t\t\tsymbol = 0;\n\t\t\t\t\t\t\tsymbol < code_lengths_size;\n\t\t\t\t\t\t\tsymbol++\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tcount[ code_lengths[ symbol ] ]++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* generate offsets into sorted symbol table by code length */\n\t\t\t\t\t\toffset[ 1 ] = 0;\n\t\t\t\t\t\tfor ( len = 1; len < MAX_LENGTH; len++ ) {\n\t\t\t\t\t\t\toffset[ len + 1 ] = offset[ len ] + count[ len ];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* sort symbols by length, by symbol order within each length */\n\t\t\t\t\t\tfor (\n\t\t\t\t\t\t\tsymbol = 0;\n\t\t\t\t\t\t\tsymbol < code_lengths_size;\n\t\t\t\t\t\t\tsymbol++\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tif ( code_lengths[ symbol ] !== 0 ) {\n\t\t\t\t\t\t\t\tsorted[ offset[ code_lengths[ symbol ] ]++ ] =\n\t\t\t\t\t\t\t\t\tsymbol;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttable_bits = root_bits;\n\t\t\t\t\t\ttable_size = 1 << table_bits;\n\t\t\t\t\t\ttotal_size = table_size;\n\n\t\t\t\t\t\t/* special case code with only one value */\n\t\t\t\t\t\tif ( offset[ MAX_LENGTH ] === 1 ) {\n\t\t\t\t\t\t\tfor ( key = 0; key < total_size; ++key ) {\n\t\t\t\t\t\t\t\troot_table[ table + key ] = new HuffmanCode(\n\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\tsorted[ 0 ] & 0xffff\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn total_size;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* fill in root table */\n\t\t\t\t\t\tkey = 0;\n\t\t\t\t\t\tsymbol = 0;\n\t\t\t\t\t\tfor (\n\t\t\t\t\t\t\tlen = 1, step = 2;\n\t\t\t\t\t\t\tlen <= root_bits;\n\t\t\t\t\t\t\t++len, step <<= 1\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tfor ( ; count[ len ] > 0; --count[ len ] ) {\n\t\t\t\t\t\t\t\tcode = new HuffmanCode(\n\t\t\t\t\t\t\t\t\tlen & 0xff,\n\t\t\t\t\t\t\t\t\tsorted[ symbol++ ] & 0xffff\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tReplicateValue(\n\t\t\t\t\t\t\t\t\troot_table,\n\t\t\t\t\t\t\t\t\ttable + key,\n\t\t\t\t\t\t\t\t\tstep,\n\t\t\t\t\t\t\t\t\ttable_size,\n\t\t\t\t\t\t\t\t\tcode\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tkey = GetNextKey( key, len );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* fill in 2nd level tables and add pointers to root table */\n\t\t\t\t\t\tmask = total_size - 1;\n\t\t\t\t\t\tlow = -1;\n\t\t\t\t\t\tfor (\n\t\t\t\t\t\t\tlen = root_bits + 1, step = 2;\n\t\t\t\t\t\t\tlen <= MAX_LENGTH;\n\t\t\t\t\t\t\t++len, step <<= 1\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tfor ( ; count[ len ] > 0; --count[ len ] ) {\n\t\t\t\t\t\t\t\tif ( ( key & mask ) !== low ) {\n\t\t\t\t\t\t\t\t\ttable += table_size;\n\t\t\t\t\t\t\t\t\ttable_bits = NextTableBitSize(\n\t\t\t\t\t\t\t\t\t\tcount,\n\t\t\t\t\t\t\t\t\t\tlen,\n\t\t\t\t\t\t\t\t\t\troot_bits\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\ttable_size = 1 << table_bits;\n\t\t\t\t\t\t\t\t\ttotal_size += table_size;\n\t\t\t\t\t\t\t\t\tlow = key & mask;\n\t\t\t\t\t\t\t\t\troot_table[ start_table + low ] =\n\t\t\t\t\t\t\t\t\t\tnew HuffmanCode(\n\t\t\t\t\t\t\t\t\t\t\t( table_bits + root_bits ) & 0xff,\n\t\t\t\t\t\t\t\t\t\t\t( table - start_table - low ) &\n\t\t\t\t\t\t\t\t\t\t\t\t0xffff\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcode = new HuffmanCode(\n\t\t\t\t\t\t\t\t\t( len - root_bits ) & 0xff,\n\t\t\t\t\t\t\t\t\tsorted[ symbol++ ] & 0xffff\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tReplicateValue(\n\t\t\t\t\t\t\t\t\troot_table,\n\t\t\t\t\t\t\t\t\ttable + ( key >> root_bits ),\n\t\t\t\t\t\t\t\t\tstep,\n\t\t\t\t\t\t\t\t\ttable_size,\n\t\t\t\t\t\t\t\t\tcode\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tkey = GetNextKey( key, len );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn total_size;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{},\n\t\t\t],\n\t\t\t8: [\n\t\t\t\tfunction ( require, module, exports ) {\n\t\t\t\t\t'use strict';\n\n\t\t\t\t\texports.byteLength = byteLength;\n\t\t\t\t\texports.toByteArray = toByteArray;\n\t\t\t\t\texports.fromByteArray = fromByteArray;\n\n\t\t\t\t\tvar lookup = [];\n\t\t\t\t\tvar revLookup = [];\n\t\t\t\t\tvar Arr =\n\t\t\t\t\t\ttypeof Uint8Array !== 'undefined' ? Uint8Array : Array;\n\n\t\t\t\t\tvar code =\n\t\t\t\t\t\t'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\t\t\t\t\tfor ( var i = 0, len = code.length; i < len; ++i ) {\n\t\t\t\t\t\tlookup[ i ] = code[ i ];\n\t\t\t\t\t\trevLookup[ code.charCodeAt( i ) ] = i;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support decoding URL-safe base64 strings, as Node.js does.\n\t\t\t\t\t// See: https://en.wikipedia.org/wiki/Base64#URL_applications\n\t\t\t\t\trevLookup[ '-'.charCodeAt( 0 ) ] = 62;\n\t\t\t\t\trevLookup[ '_'.charCodeAt( 0 ) ] = 63;\n\n\t\t\t\t\tfunction getLens( b64 ) {\n\t\t\t\t\t\tvar len = b64.length;\n\n\t\t\t\t\t\tif ( len % 4 > 0 ) {\n\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t'Invalid string. Length must be a multiple of 4'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Trim off extra bytes after placeholder bytes are found\n\t\t\t\t\t\t// See: https://github.com/beatgammit/base64-js/issues/42\n\t\t\t\t\t\tvar validLen = b64.indexOf( '=' );\n\t\t\t\t\t\tif ( validLen === -1 ) validLen = len;\n\n\t\t\t\t\t\tvar placeHoldersLen =\n\t\t\t\t\t\t\tvalidLen === len ? 0 : 4 - ( validLen % 4 );\n\n\t\t\t\t\t\treturn [ validLen, placeHoldersLen ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// base64 is 4/3 + up to two characters of the original data\n\t\t\t\t\tfunction byteLength( b64 ) {\n\t\t\t\t\t\tvar lens = getLens( b64 );\n\t\t\t\t\t\tvar validLen = lens[ 0 ];\n\t\t\t\t\t\tvar placeHoldersLen = lens[ 1 ];\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t( ( validLen + placeHoldersLen ) * 3 ) / 4 -\n\t\t\t\t\t\t\tplaceHoldersLen\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction _byteLength( b64, validLen, placeHoldersLen ) {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t( ( validLen + placeHoldersLen ) * 3 ) / 4 -\n\t\t\t\t\t\t\tplaceHoldersLen\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction toByteArray( b64 ) {\n\t\t\t\t\t\tvar tmp;\n\t\t\t\t\t\tvar lens = getLens( b64 );\n\t\t\t\t\t\tvar validLen = lens[ 0 ];\n\t\t\t\t\t\tvar placeHoldersLen = lens[ 1 ];\n\n\t\t\t\t\t\tvar arr = new Arr(\n\t\t\t\t\t\t\t_byteLength( b64, validLen, placeHoldersLen )\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tvar curByte = 0;\n\n\t\t\t\t\t\t// if there are placeholders, only get up to the last complete 4 chars\n\t\t\t\t\t\tvar len = placeHoldersLen > 0 ? validLen - 4 : validLen;\n\n\t\t\t\t\t\tfor ( var i = 0; i < len; i += 4 ) {\n\t\t\t\t\t\t\ttmp =\n\t\t\t\t\t\t\t\t( revLookup[ b64.charCodeAt( i ) ] << 18 ) |\n\t\t\t\t\t\t\t\t( revLookup[ b64.charCodeAt( i + 1 ) ] << 12 ) |\n\t\t\t\t\t\t\t\t( revLookup[ b64.charCodeAt( i + 2 ) ] << 6 ) |\n\t\t\t\t\t\t\t\trevLookup[ b64.charCodeAt( i + 3 ) ];\n\t\t\t\t\t\t\tarr[ curByte++ ] = ( tmp >> 16 ) & 0xff;\n\t\t\t\t\t\t\tarr[ curByte++ ] = ( tmp >> 8 ) & 0xff;\n\t\t\t\t\t\t\tarr[ curByte++ ] = tmp & 0xff;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( placeHoldersLen === 2 ) {\n\t\t\t\t\t\t\ttmp =\n\t\t\t\t\t\t\t\t( revLookup[ b64.charCodeAt( i ) ] << 2 ) |\n\t\t\t\t\t\t\t\t( revLookup[ b64.charCodeAt( i + 1 ) ] >> 4 );\n\t\t\t\t\t\t\tarr[ curByte++ ] = tmp & 0xff;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( placeHoldersLen === 1 ) {\n\t\t\t\t\t\t\ttmp =\n\t\t\t\t\t\t\t\t( revLookup[ b64.charCodeAt( i ) ] << 10 ) |\n\t\t\t\t\t\t\t\t( revLookup[ b64.charCodeAt( i + 1 ) ] << 4 ) |\n\t\t\t\t\t\t\t\t( revLookup[ b64.charCodeAt( i + 2 ) ] >> 2 );\n\t\t\t\t\t\t\tarr[ curByte++ ] = ( tmp >> 8 ) & 0xff;\n\t\t\t\t\t\t\tarr[ curByte++ ] = tmp & 0xff;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn arr;\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction tripletToBase64( num ) {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\tlookup[ ( num >> 18 ) & 0x3f ] +\n\t\t\t\t\t\t\tlookup[ ( num >> 12 ) & 0x3f ] +\n\t\t\t\t\t\t\tlookup[ ( num >> 6 ) & 0x3f ] +\n\t\t\t\t\t\t\tlookup[ num & 0x3f ]\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction encodeChunk( uint8, start, end ) {\n\t\t\t\t\t\tvar tmp;\n\t\t\t\t\t\tvar output = [];\n\t\t\t\t\t\tfor ( var i = start; i < end; i += 3 ) {\n\t\t\t\t\t\t\ttmp =\n\t\t\t\t\t\t\t\t( ( uint8[ i ] << 16 ) & 0xff0000 ) +\n\t\t\t\t\t\t\t\t( ( uint8[ i + 1 ] << 8 ) & 0xff00 ) +\n\t\t\t\t\t\t\t\t( uint8[ i + 2 ] & 0xff );\n\t\t\t\t\t\t\toutput.push( tripletToBase64( tmp ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn output.join( '' );\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction fromByteArray( uint8 ) {\n\t\t\t\t\t\tvar tmp;\n\t\t\t\t\t\tvar len = uint8.length;\n\t\t\t\t\t\tvar extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes\n\t\t\t\t\t\tvar parts = [];\n\t\t\t\t\t\tvar maxChunkLength = 16383; // must be multiple of 3\n\n\t\t\t\t\t\t// go through the array every three bytes, we'll deal with trailing stuff later\n\t\t\t\t\t\tfor (\n\t\t\t\t\t\t\tvar i = 0, len2 = len - extraBytes;\n\t\t\t\t\t\t\ti < len2;\n\t\t\t\t\t\t\ti += maxChunkLength\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tparts.push(\n\t\t\t\t\t\t\t\tencodeChunk(\n\t\t\t\t\t\t\t\t\tuint8,\n\t\t\t\t\t\t\t\t\ti,\n\t\t\t\t\t\t\t\t\ti + maxChunkLength > len2\n\t\t\t\t\t\t\t\t\t\t? len2\n\t\t\t\t\t\t\t\t\t\t: i + maxChunkLength\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// pad the end with zeros, but make sure to not forget the extra bytes\n\t\t\t\t\t\tif ( extraBytes === 1 ) {\n\t\t\t\t\t\t\ttmp = uint8[ len - 1 ];\n\t\t\t\t\t\t\tparts.push(\n\t\t\t\t\t\t\t\tlookup[ tmp >> 2 ] +\n\t\t\t\t\t\t\t\t\tlookup[ ( tmp << 4 ) & 0x3f ] +\n\t\t\t\t\t\t\t\t\t'=='\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else if ( extraBytes === 2 ) {\n\t\t\t\t\t\t\ttmp = ( uint8[ len - 2 ] << 8 ) + uint8[ len - 1 ];\n\t\t\t\t\t\t\tparts.push(\n\t\t\t\t\t\t\t\tlookup[ tmp >> 10 ] +\n\t\t\t\t\t\t\t\t\tlookup[ ( tmp >> 4 ) & 0x3f ] +\n\t\t\t\t\t\t\t\t\tlookup[ ( tmp << 2 ) & 0x3f ] +\n\t\t\t\t\t\t\t\t\t'='\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn parts.join( '' );\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{},\n\t\t\t],\n\t\t\t9: [\n\t\t\t\tfunction ( require, module, exports ) {\n\t\t\t\t\t/* Copyright 2013 Google Inc. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n Lookup tables to map prefix codes to value ranges. This is used during\n decoding of the block lengths, literal insertion lengths and copy lengths.\n*/\n\n\t\t\t\t\t/* Represents the range of values belonging to a prefix code: */\n\t\t\t\t\t/* [offset, offset + 2^nbits) */\n\t\t\t\t\tfunction PrefixCodeRange( offset, nbits ) {\n\t\t\t\t\t\tthis.offset = offset;\n\t\t\t\t\t\tthis.nbits = nbits;\n\t\t\t\t\t}\n\n\t\t\t\t\texports.kBlockLengthPrefixCode = [\n\t\t\t\t\t\tnew PrefixCodeRange( 1, 2 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 5, 2 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 9, 2 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 13, 2 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 17, 3 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 25, 3 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 33, 3 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 41, 3 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 49, 4 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 65, 4 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 81, 4 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 97, 4 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 113, 5 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 145, 5 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 177, 5 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 209, 5 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 241, 6 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 305, 6 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 369, 7 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 497, 8 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 753, 9 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 1265, 10 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 2289, 11 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 4337, 12 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 8433, 13 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 16625, 24 ),\n\t\t\t\t\t];\n\n\t\t\t\t\texports.kInsertLengthPrefixCode = [\n\t\t\t\t\t\tnew PrefixCodeRange( 0, 0 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 1, 0 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 2, 0 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 3, 0 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 4, 0 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 5, 0 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 6, 1 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 8, 1 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 10, 2 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 14, 2 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 18, 3 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 26, 3 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 34, 4 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 50, 4 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 66, 5 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 98, 5 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 130, 6 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 194, 7 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 322, 8 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 578, 9 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 1090, 10 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 2114, 12 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 6210, 14 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 22594, 24 ),\n\t\t\t\t\t];\n\n\t\t\t\t\texports.kCopyLengthPrefixCode = [\n\t\t\t\t\t\tnew PrefixCodeRange( 2, 0 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 3, 0 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 4, 0 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 5, 0 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 6, 0 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 7, 0 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 8, 0 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 9, 0 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 10, 1 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 12, 1 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 14, 2 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 18, 2 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 22, 3 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 30, 3 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 38, 4 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 54, 4 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 70, 5 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 102, 5 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 134, 6 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 198, 7 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 326, 8 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 582, 9 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 1094, 10 ),\n\t\t\t\t\t\tnew PrefixCodeRange( 2118, 24 ),\n\t\t\t\t\t];\n\n\t\t\t\t\texports.kInsertRangeLut = [ 0, 0, 8, 8, 0, 16, 8, 16, 16 ];\n\n\t\t\t\t\texports.kCopyRangeLut = [ 0, 8, 0, 8, 16, 0, 16, 8, 16 ];\n\t\t\t\t},\n\t\t\t\t{},\n\t\t\t],\n\t\t\t10: [\n\t\t\t\tfunction ( require, module, exports ) {\n\t\t\t\t\tfunction BrotliInput( buffer ) {\n\t\t\t\t\t\tthis.buffer = buffer;\n\t\t\t\t\t\tthis.pos = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tBrotliInput.prototype.read = function ( buf, i, count ) {\n\t\t\t\t\t\tif ( this.pos + count > this.buffer.length ) {\n\t\t\t\t\t\t\tcount = this.buffer.length - this.pos;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor ( var p = 0; p < count; p++ )\n\t\t\t\t\t\t\tbuf[ i + p ] = this.buffer[ this.pos + p ];\n\n\t\t\t\t\t\tthis.pos += count;\n\t\t\t\t\t\treturn count;\n\t\t\t\t\t};\n\n\t\t\t\t\texports.BrotliInput = BrotliInput;\n\n\t\t\t\t\tfunction BrotliOutput( buf ) {\n\t\t\t\t\t\tthis.buffer = buf;\n\t\t\t\t\t\tthis.pos = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tBrotliOutput.prototype.write = function ( buf, count ) {\n\t\t\t\t\t\tif ( this.pos + count > this.buffer.length )\n\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t'Output buffer is not large enough'\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\tthis.buffer.set( buf.subarray( 0, count ), this.pos );\n\t\t\t\t\t\tthis.pos += count;\n\t\t\t\t\t\treturn count;\n\t\t\t\t\t};\n\n\t\t\t\t\texports.BrotliOutput = BrotliOutput;\n\t\t\t\t},\n\t\t\t\t{},\n\t\t\t],\n\t\t\t11: [\n\t\t\t\tfunction ( require, module, exports ) {\n\t\t\t\t\t/* Copyright 2013 Google Inc. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n Transformations on dictionary words.\n*/\n\n\t\t\t\t\tvar BrotliDictionary = require( './dictionary' );\n\n\t\t\t\t\tvar kIdentity = 0;\n\t\t\t\t\tvar kOmitLast1 = 1;\n\t\t\t\t\tvar kOmitLast2 = 2;\n\t\t\t\t\tvar kOmitLast3 = 3;\n\t\t\t\t\tvar kOmitLast4 = 4;\n\t\t\t\t\tvar kOmitLast5 = 5;\n\t\t\t\t\tvar kOmitLast6 = 6;\n\t\t\t\t\tvar kOmitLast7 = 7;\n\t\t\t\t\tvar kOmitLast8 = 8;\n\t\t\t\t\tvar kOmitLast9 = 9;\n\t\t\t\t\tvar kUppercaseFirst = 10;\n\t\t\t\t\tvar kUppercaseAll = 11;\n\t\t\t\t\tvar kOmitFirst1 = 12;\n\t\t\t\t\tvar kOmitFirst2 = 13;\n\t\t\t\t\tvar kOmitFirst3 = 14;\n\t\t\t\t\tvar kOmitFirst4 = 15;\n\t\t\t\t\tvar kOmitFirst5 = 16;\n\t\t\t\t\tvar kOmitFirst6 = 17;\n\t\t\t\t\tvar kOmitFirst7 = 18;\n\t\t\t\t\tvar kOmitFirst8 = 19;\n\t\t\t\t\tvar kOmitFirst9 = 20;\n\n\t\t\t\t\tfunction Transform( prefix, transform, suffix ) {\n\t\t\t\t\t\tthis.prefix = new Uint8Array( prefix.length );\n\t\t\t\t\t\tthis.transform = transform;\n\t\t\t\t\t\tthis.suffix = new Uint8Array( suffix.length );\n\n\t\t\t\t\t\tfor ( var i = 0; i < prefix.length; i++ )\n\t\t\t\t\t\t\tthis.prefix[ i ] = prefix.charCodeAt( i );\n\n\t\t\t\t\t\tfor ( var i = 0; i < suffix.length; i++ )\n\t\t\t\t\t\t\tthis.suffix[ i ] = suffix.charCodeAt( i );\n\t\t\t\t\t}\n\n\t\t\t\t\tvar kTransforms = [\n\t\t\t\t\t\tnew Transform( '', kIdentity, '' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, ' ' ),\n\t\t\t\t\t\tnew Transform( ' ', kIdentity, ' ' ),\n\t\t\t\t\t\tnew Transform( '', kOmitFirst1, '' ),\n\t\t\t\t\t\tnew Transform( '', kUppercaseFirst, ' ' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, ' the ' ),\n\t\t\t\t\t\tnew Transform( ' ', kIdentity, '' ),\n\t\t\t\t\t\tnew Transform( 's ', kIdentity, ' ' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, ' of ' ),\n\t\t\t\t\t\tnew Transform( '', kUppercaseFirst, '' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, ' and ' ),\n\t\t\t\t\t\tnew Transform( '', kOmitFirst2, '' ),\n\t\t\t\t\t\tnew Transform( '', kOmitLast1, '' ),\n\t\t\t\t\t\tnew Transform( ', ', kIdentity, ' ' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, ', ' ),\n\t\t\t\t\t\tnew Transform( ' ', kUppercaseFirst, ' ' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, ' in ' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, ' to ' ),\n\t\t\t\t\t\tnew Transform( 'e ', kIdentity, ' ' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, '\"' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, '.' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, '\">' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, '\\n' ),\n\t\t\t\t\t\tnew Transform( '', kOmitLast3, '' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, ']' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, ' for ' ),\n\t\t\t\t\t\tnew Transform( '', kOmitFirst3, '' ),\n\t\t\t\t\t\tnew Transform( '', kOmitLast2, '' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, ' a ' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, ' that ' ),\n\t\t\t\t\t\tnew Transform( ' ', kUppercaseFirst, '' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, '. ' ),\n\t\t\t\t\t\tnew Transform( '.', kIdentity, '' ),\n\t\t\t\t\t\tnew Transform( ' ', kIdentity, ', ' ),\n\t\t\t\t\t\tnew Transform( '', kOmitFirst4, '' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, ' with ' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, \"'\" ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, ' from ' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, ' by ' ),\n\t\t\t\t\t\tnew Transform( '', kOmitFirst5, '' ),\n\t\t\t\t\t\tnew Transform( '', kOmitFirst6, '' ),\n\t\t\t\t\t\tnew Transform( ' the ', kIdentity, '' ),\n\t\t\t\t\t\tnew Transform( '', kOmitLast4, '' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, '. The ' ),\n\t\t\t\t\t\tnew Transform( '', kUppercaseAll, '' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, ' on ' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, ' as ' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, ' is ' ),\n\t\t\t\t\t\tnew Transform( '', kOmitLast7, '' ),\n\t\t\t\t\t\tnew Transform( '', kOmitLast1, 'ing ' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, '\\n\\t' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, ':' ),\n\t\t\t\t\t\tnew Transform( ' ', kIdentity, '. ' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, 'ed ' ),\n\t\t\t\t\t\tnew Transform( '', kOmitFirst9, '' ),\n\t\t\t\t\t\tnew Transform( '', kOmitFirst7, '' ),\n\t\t\t\t\t\tnew Transform( '', kOmitLast6, '' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, '(' ),\n\t\t\t\t\t\tnew Transform( '', kUppercaseFirst, ', ' ),\n\t\t\t\t\t\tnew Transform( '', kOmitLast8, '' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, ' at ' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, 'ly ' ),\n\t\t\t\t\t\tnew Transform( ' the ', kIdentity, ' of ' ),\n\t\t\t\t\t\tnew Transform( '', kOmitLast5, '' ),\n\t\t\t\t\t\tnew Transform( '', kOmitLast9, '' ),\n\t\t\t\t\t\tnew Transform( ' ', kUppercaseFirst, ', ' ),\n\t\t\t\t\t\tnew Transform( '', kUppercaseFirst, '\"' ),\n\t\t\t\t\t\tnew Transform( '.', kIdentity, '(' ),\n\t\t\t\t\t\tnew Transform( '', kUppercaseAll, ' ' ),\n\t\t\t\t\t\tnew Transform( '', kUppercaseFirst, '\">' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, '=\"' ),\n\t\t\t\t\t\tnew Transform( ' ', kIdentity, '.' ),\n\t\t\t\t\t\tnew Transform( '.com/', kIdentity, '' ),\n\t\t\t\t\t\tnew Transform( ' the ', kIdentity, ' of the ' ),\n\t\t\t\t\t\tnew Transform( '', kUppercaseFirst, \"'\" ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, '. This ' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, ',' ),\n\t\t\t\t\t\tnew Transform( '.', kIdentity, ' ' ),\n\t\t\t\t\t\tnew Transform( '', kUppercaseFirst, '(' ),\n\t\t\t\t\t\tnew Transform( '', kUppercaseFirst, '.' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, ' not ' ),\n\t\t\t\t\t\tnew Transform( ' ', kIdentity, '=\"' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, 'er ' ),\n\t\t\t\t\t\tnew Transform( ' ', kUppercaseAll, ' ' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, 'al ' ),\n\t\t\t\t\t\tnew Transform( ' ', kUppercaseAll, '' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, \"='\" ),\n\t\t\t\t\t\tnew Transform( '', kUppercaseAll, '\"' ),\n\t\t\t\t\t\tnew Transform( '', kUppercaseFirst, '. ' ),\n\t\t\t\t\t\tnew Transform( ' ', kIdentity, '(' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, 'ful ' ),\n\t\t\t\t\t\tnew Transform( ' ', kUppercaseFirst, '. ' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, 'ive ' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, 'less ' ),\n\t\t\t\t\t\tnew Transform( '', kUppercaseAll, \"'\" ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, 'est ' ),\n\t\t\t\t\t\tnew Transform( ' ', kUppercaseFirst, '.' ),\n\t\t\t\t\t\tnew Transform( '', kUppercaseAll, '\">' ),\n\t\t\t\t\t\tnew Transform( ' ', kIdentity, \"='\" ),\n\t\t\t\t\t\tnew Transform( '', kUppercaseFirst, ',' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, 'ize ' ),\n\t\t\t\t\t\tnew Transform( '', kUppercaseAll, '.' ),\n\t\t\t\t\t\tnew Transform( '\\xc2\\xa0', kIdentity, '' ),\n\t\t\t\t\t\tnew Transform( ' ', kIdentity, ',' ),\n\t\t\t\t\t\tnew Transform( '', kUppercaseFirst, '=\"' ),\n\t\t\t\t\t\tnew Transform( '', kUppercaseAll, '=\"' ),\n\t\t\t\t\t\tnew Transform( '', kIdentity, 'ous ' ),\n\t\t\t\t\t\tnew Transform( '', kUppercaseAll, ', ' ),\n\t\t\t\t\t\tnew Transform( '', kUppercaseFirst, \"='\" ),\n\t\t\t\t\t\tnew Transform( ' ', kUppercaseFirst, ',' ),\n\t\t\t\t\t\tnew Transform( ' ', kUppercaseAll, '=\"' ),\n\t\t\t\t\t\tnew Transform( ' ', kUppercaseAll, ', ' ),\n\t\t\t\t\t\tnew Transform( '', kUppercaseAll, ',' ),\n\t\t\t\t\t\tnew Transform( '', kUppercaseAll, '(' ),\n\t\t\t\t\t\tnew Transform( '', kUppercaseAll, '. ' ),\n\t\t\t\t\t\tnew Transform( ' ', kUppercaseAll, '.' ),\n\t\t\t\t\t\tnew Transform( '', kUppercaseAll, \"='\" ),\n\t\t\t\t\t\tnew Transform( ' ', kUppercaseAll, '. ' ),\n\t\t\t\t\t\tnew Transform( ' ', kUppercaseFirst, '=\"' ),\n\t\t\t\t\t\tnew Transform( ' ', kUppercaseAll, \"='\" ),\n\t\t\t\t\t\tnew Transform( ' ', kUppercaseFirst, \"='\" ),\n\t\t\t\t\t];\n\n\t\t\t\t\texports.kTransforms = kTransforms;\n\t\t\t\t\texports.kNumTransforms = kTransforms.length;\n\n\t\t\t\t\tfunction ToUpperCase( p, i ) {\n\t\t\t\t\t\tif ( p[ i ] < 0xc0 ) {\n\t\t\t\t\t\t\tif ( p[ i ] >= 97 && p[ i ] <= 122 ) {\n\t\t\t\t\t\t\t\tp[ i ] ^= 32;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* An overly simplified uppercasing model for utf-8. */\n\t\t\t\t\t\tif ( p[ i ] < 0xe0 ) {\n\t\t\t\t\t\t\tp[ i + 1 ] ^= 32;\n\t\t\t\t\t\t\treturn 2;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* An arbitrary transform for three byte characters. */\n\t\t\t\t\t\tp[ i + 2 ] ^= 5;\n\t\t\t\t\t\treturn 3;\n\t\t\t\t\t}\n\n\t\t\t\t\texports.transformDictionaryWord = function (\n\t\t\t\t\t\tdst,\n\t\t\t\t\t\tidx,\n\t\t\t\t\t\tword,\n\t\t\t\t\t\tlen,\n\t\t\t\t\t\ttransform\n\t\t\t\t\t) {\n\t\t\t\t\t\tvar prefix = kTransforms[ transform ].prefix;\n\t\t\t\t\t\tvar suffix = kTransforms[ transform ].suffix;\n\t\t\t\t\t\tvar t = kTransforms[ transform ].transform;\n\t\t\t\t\t\tvar skip =\n\t\t\t\t\t\t\tt < kOmitFirst1 ? 0 : t - ( kOmitFirst1 - 1 );\n\t\t\t\t\t\tvar i = 0;\n\t\t\t\t\t\tvar start_idx = idx;\n\t\t\t\t\t\tvar uppercase;\n\n\t\t\t\t\t\tif ( skip > len ) {\n\t\t\t\t\t\t\tskip = len;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar prefix_pos = 0;\n\t\t\t\t\t\twhile ( prefix_pos < prefix.length ) {\n\t\t\t\t\t\t\tdst[ idx++ ] = prefix[ prefix_pos++ ];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tword += skip;\n\t\t\t\t\t\tlen -= skip;\n\n\t\t\t\t\t\tif ( t <= kOmitLast9 ) {\n\t\t\t\t\t\t\tlen -= t;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\t\t\tdst[ idx++ ] =\n\t\t\t\t\t\t\t\tBrotliDictionary.dictionary[ word + i ];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tuppercase = idx - len;\n\n\t\t\t\t\t\tif ( t === kUppercaseFirst ) {\n\t\t\t\t\t\t\tToUpperCase( dst, uppercase );\n\t\t\t\t\t\t} else if ( t === kUppercaseAll ) {\n\t\t\t\t\t\t\twhile ( len > 0 ) {\n\t\t\t\t\t\t\t\tvar step = ToUpperCase( dst, uppercase );\n\t\t\t\t\t\t\t\tuppercase += step;\n\t\t\t\t\t\t\t\tlen -= step;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar suffix_pos = 0;\n\t\t\t\t\t\twhile ( suffix_pos < suffix.length ) {\n\t\t\t\t\t\t\tdst[ idx++ ] = suffix[ suffix_pos++ ];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn idx - start_idx;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{ './dictionary': 6 },\n\t\t\t],\n\t\t\t12: [\n\t\t\t\tfunction ( require, module, exports ) {\n\t\t\t\t\tmodule.exports =\n\t\t\t\t\t\trequire( './dec/decode' ).BrotliDecompressBuffer;\n\t\t\t\t},\n\t\t\t\t{ './dec/decode': 3 },\n\t\t\t],\n\t\t},\n\t\t{},\n\t\t[ 12 ]\n\t)( 12 );\n} )();\n/* eslint-enable */\n", "/**\n * Credits:\n *\n * lib-font\n * https://github.com/Pomax/lib-font\n * https://github.com/Pomax/lib-font/blob/master/lib/inflate.js\n *\n * The MIT License (MIT)\n *\n * Copyright (c) 2020 pomax@nihongoresources.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n/* eslint eslint-comments/no-unlimited-disable: 0 */\n/* eslint-disable */\n/* pako 1.0.10 nodeca/pako */\nexport default ( function () {\n\tvar define, module, exports;\n\treturn ( function () {\n\t\tfunction r( e, n, t ) {\n\t\t\tfunction o( i, f ) {\n\t\t\t\tif ( ! n[ i ] ) {\n\t\t\t\t\tif ( ! e[ i ] ) {\n\t\t\t\t\t\tvar c = 'function' == typeof require && require;\n\t\t\t\t\t\tif ( ! f && c ) return c( i, ! 0 );\n\t\t\t\t\t\tif ( u ) return u( i, ! 0 );\n\t\t\t\t\t\tvar a = new Error( \"Cannot find module '\" + i + \"'\" );\n\t\t\t\t\t\tthrow ( ( a.code = 'MODULE_NOT_FOUND' ), a );\n\t\t\t\t\t}\n\t\t\t\t\tvar p = ( n[ i ] = { exports: {} } );\n\t\t\t\t\te[ i ][ 0 ].call(\n\t\t\t\t\t\tp.exports,\n\t\t\t\t\t\tfunction ( r ) {\n\t\t\t\t\t\t\tvar n = e[ i ][ 1 ][ r ];\n\t\t\t\t\t\t\treturn o( n || r );\n\t\t\t\t\t\t},\n\t\t\t\t\t\tp,\n\t\t\t\t\t\tp.exports,\n\t\t\t\t\t\tr,\n\t\t\t\t\t\te,\n\t\t\t\t\t\tn,\n\t\t\t\t\t\tt\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn n[ i ].exports;\n\t\t\t}\n\t\t\tfor (\n\t\t\t\tvar u = 'function' == typeof require && require, i = 0;\n\t\t\t\ti < t.length;\n\t\t\t\ti++\n\t\t\t)\n\t\t\t\to( t[ i ] );\n\t\t\treturn o;\n\t\t}\n\t\treturn r;\n\t} )()(\n\t\t{\n\t\t\t1: [\n\t\t\t\tfunction ( require, module, exports ) {\n\t\t\t\t\t'use strict';\n\n\t\t\t\t\tvar TYPED_OK =\n\t\t\t\t\t\ttypeof Uint8Array !== 'undefined' &&\n\t\t\t\t\t\ttypeof Uint16Array !== 'undefined' &&\n\t\t\t\t\t\ttypeof Int32Array !== 'undefined';\n\n\t\t\t\t\tfunction _has( obj, key ) {\n\t\t\t\t\t\treturn Object.prototype.hasOwnProperty.call( obj, key );\n\t\t\t\t\t}\n\n\t\t\t\t\texports.assign = function (\n\t\t\t\t\t\tobj /*from1, from2, from3, ...*/\n\t\t\t\t\t) {\n\t\t\t\t\t\tvar sources = Array.prototype.slice.call(\n\t\t\t\t\t\t\targuments,\n\t\t\t\t\t\t\t1\n\t\t\t\t\t\t);\n\t\t\t\t\t\twhile ( sources.length ) {\n\t\t\t\t\t\t\tvar source = sources.shift();\n\t\t\t\t\t\t\tif ( ! source ) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( typeof source !== 'object' ) {\n\t\t\t\t\t\t\t\tthrow new TypeError(\n\t\t\t\t\t\t\t\t\tsource + 'must be non-object'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfor ( var p in source ) {\n\t\t\t\t\t\t\t\tif ( _has( source, p ) ) {\n\t\t\t\t\t\t\t\t\tobj[ p ] = source[ p ];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn obj;\n\t\t\t\t\t};\n\n\t\t\t\t\t// reduce buffer size, avoiding mem copy\n\t\t\t\t\texports.shrinkBuf = function ( buf, size ) {\n\t\t\t\t\t\tif ( buf.length === size ) {\n\t\t\t\t\t\t\treturn buf;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( buf.subarray ) {\n\t\t\t\t\t\t\treturn buf.subarray( 0, size );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbuf.length = size;\n\t\t\t\t\t\treturn buf;\n\t\t\t\t\t};\n\n\t\t\t\t\tvar fnTyped = {\n\t\t\t\t\t\tarraySet: function (\n\t\t\t\t\t\t\tdest,\n\t\t\t\t\t\t\tsrc,\n\t\t\t\t\t\t\tsrc_offs,\n\t\t\t\t\t\t\tlen,\n\t\t\t\t\t\t\tdest_offs\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tif ( src.subarray && dest.subarray ) {\n\t\t\t\t\t\t\t\tdest.set(\n\t\t\t\t\t\t\t\t\tsrc.subarray( src_offs, src_offs + len ),\n\t\t\t\t\t\t\t\t\tdest_offs\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Fallback to ordinary array\n\t\t\t\t\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\t\t\t\t\tdest[ dest_offs + i ] = src[ src_offs + i ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t// Join array of chunks to single array.\n\t\t\t\t\t\tflattenChunks: function ( chunks ) {\n\t\t\t\t\t\t\tvar i, l, len, pos, chunk, result;\n\n\t\t\t\t\t\t\t// calculate data length\n\t\t\t\t\t\t\tlen = 0;\n\t\t\t\t\t\t\tfor ( i = 0, l = chunks.length; i < l; i++ ) {\n\t\t\t\t\t\t\t\tlen += chunks[ i ].length;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// join chunks\n\t\t\t\t\t\t\tresult = new Uint8Array( len );\n\t\t\t\t\t\t\tpos = 0;\n\t\t\t\t\t\t\tfor ( i = 0, l = chunks.length; i < l; i++ ) {\n\t\t\t\t\t\t\t\tchunk = chunks[ i ];\n\t\t\t\t\t\t\t\tresult.set( chunk, pos );\n\t\t\t\t\t\t\t\tpos += chunk.length;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn result;\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\n\t\t\t\t\tvar fnUntyped = {\n\t\t\t\t\t\tarraySet: function (\n\t\t\t\t\t\t\tdest,\n\t\t\t\t\t\t\tsrc,\n\t\t\t\t\t\t\tsrc_offs,\n\t\t\t\t\t\t\tlen,\n\t\t\t\t\t\t\tdest_offs\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\t\t\t\t\tdest[ dest_offs + i ] = src[ src_offs + i ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t// Join array of chunks to single array.\n\t\t\t\t\t\tflattenChunks: function ( chunks ) {\n\t\t\t\t\t\t\treturn [].concat.apply( [], chunks );\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\n\t\t\t\t\t// Enable/Disable typed arrays use, for testing\n\t\t\t\t\t//\n\t\t\t\t\texports.setTyped = function ( on ) {\n\t\t\t\t\t\tif ( on ) {\n\t\t\t\t\t\t\texports.Buf8 = Uint8Array;\n\t\t\t\t\t\t\texports.Buf16 = Uint16Array;\n\t\t\t\t\t\t\texports.Buf32 = Int32Array;\n\t\t\t\t\t\t\texports.assign( exports, fnTyped );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\texports.Buf8 = Array;\n\t\t\t\t\t\t\texports.Buf16 = Array;\n\t\t\t\t\t\t\texports.Buf32 = Array;\n\t\t\t\t\t\t\texports.assign( exports, fnUntyped );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\texports.setTyped( TYPED_OK );\n\t\t\t\t},\n\t\t\t\t{},\n\t\t\t],\n\t\t\t2: [\n\t\t\t\tfunction ( require, module, exports ) {\n\t\t\t\t\t// String encode/decode helpers\n\t\t\t\t\t'use strict';\n\n\t\t\t\t\tvar utils = require( './common' );\n\n\t\t\t\t\t// Quick check if we can use fast array to bin string conversion\n\t\t\t\t\t//\n\t\t\t\t\t// - apply(Array) can fail on Android 2.2\n\t\t\t\t\t// - apply(Uint8Array) can fail on iOS 5.1 Safari\n\t\t\t\t\t//\n\t\t\t\t\tvar STR_APPLY_OK = true;\n\t\t\t\t\tvar STR_APPLY_UIA_OK = true;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString.fromCharCode.apply( null, [ 0 ] );\n\t\t\t\t\t} catch ( __ ) {\n\t\t\t\t\t\tSTR_APPLY_OK = false;\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString.fromCharCode.apply( null, new Uint8Array( 1 ) );\n\t\t\t\t\t} catch ( __ ) {\n\t\t\t\t\t\tSTR_APPLY_UIA_OK = false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Table with utf8 lengths (calculated by first byte of sequence)\n\t\t\t\t\t// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n\t\t\t\t\t// because max possible codepoint is 0x10ffff\n\t\t\t\t\tvar _utf8len = new utils.Buf8( 256 );\n\t\t\t\t\tfor ( var q = 0; q < 256; q++ ) {\n\t\t\t\t\t\t_utf8len[ q ] =\n\t\t\t\t\t\t\tq >= 252\n\t\t\t\t\t\t\t\t? 6\n\t\t\t\t\t\t\t\t: q >= 248\n\t\t\t\t\t\t\t\t? 5\n\t\t\t\t\t\t\t\t: q >= 240\n\t\t\t\t\t\t\t\t? 4\n\t\t\t\t\t\t\t\t: q >= 224\n\t\t\t\t\t\t\t\t? 3\n\t\t\t\t\t\t\t\t: q >= 192\n\t\t\t\t\t\t\t\t? 2\n\t\t\t\t\t\t\t\t: 1;\n\t\t\t\t\t}\n\t\t\t\t\t_utf8len[ 254 ] = _utf8len[ 254 ] = 1; // Invalid sequence start\n\n\t\t\t\t\t// convert string to array (typed, when possible)\n\t\t\t\t\texports.string2buf = function ( str ) {\n\t\t\t\t\t\tvar buf,\n\t\t\t\t\t\t\tc,\n\t\t\t\t\t\t\tc2,\n\t\t\t\t\t\t\tm_pos,\n\t\t\t\t\t\t\ti,\n\t\t\t\t\t\t\tstr_len = str.length,\n\t\t\t\t\t\t\tbuf_len = 0;\n\n\t\t\t\t\t\t// count binary size\n\t\t\t\t\t\tfor ( m_pos = 0; m_pos < str_len; m_pos++ ) {\n\t\t\t\t\t\t\tc = str.charCodeAt( m_pos );\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t( c & 0xfc00 ) === 0xd800 &&\n\t\t\t\t\t\t\t\tm_pos + 1 < str_len\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tc2 = str.charCodeAt( m_pos + 1 );\n\t\t\t\t\t\t\t\tif ( ( c2 & 0xfc00 ) === 0xdc00 ) {\n\t\t\t\t\t\t\t\t\tc =\n\t\t\t\t\t\t\t\t\t\t0x10000 +\n\t\t\t\t\t\t\t\t\t\t( ( c - 0xd800 ) << 10 ) +\n\t\t\t\t\t\t\t\t\t\t( c2 - 0xdc00 );\n\t\t\t\t\t\t\t\t\tm_pos++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbuf_len +=\n\t\t\t\t\t\t\t\tc < 0x80\n\t\t\t\t\t\t\t\t\t? 1\n\t\t\t\t\t\t\t\t\t: c < 0x800\n\t\t\t\t\t\t\t\t\t? 2\n\t\t\t\t\t\t\t\t\t: c < 0x10000\n\t\t\t\t\t\t\t\t\t? 3\n\t\t\t\t\t\t\t\t\t: 4;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// allocate buffer\n\t\t\t\t\t\tbuf = new utils.Buf8( buf_len );\n\n\t\t\t\t\t\t// convert\n\t\t\t\t\t\tfor ( i = 0, m_pos = 0; i < buf_len; m_pos++ ) {\n\t\t\t\t\t\t\tc = str.charCodeAt( m_pos );\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t( c & 0xfc00 ) === 0xd800 &&\n\t\t\t\t\t\t\t\tm_pos + 1 < str_len\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tc2 = str.charCodeAt( m_pos + 1 );\n\t\t\t\t\t\t\t\tif ( ( c2 & 0xfc00 ) === 0xdc00 ) {\n\t\t\t\t\t\t\t\t\tc =\n\t\t\t\t\t\t\t\t\t\t0x10000 +\n\t\t\t\t\t\t\t\t\t\t( ( c - 0xd800 ) << 10 ) +\n\t\t\t\t\t\t\t\t\t\t( c2 - 0xdc00 );\n\t\t\t\t\t\t\t\t\tm_pos++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( c < 0x80 ) {\n\t\t\t\t\t\t\t\t/* one byte */\n\t\t\t\t\t\t\t\tbuf[ i++ ] = c;\n\t\t\t\t\t\t\t} else if ( c < 0x800 ) {\n\t\t\t\t\t\t\t\t/* two bytes */\n\t\t\t\t\t\t\t\tbuf[ i++ ] = 0xc0 | ( c >>> 6 );\n\t\t\t\t\t\t\t\tbuf[ i++ ] = 0x80 | ( c & 0x3f );\n\t\t\t\t\t\t\t} else if ( c < 0x10000 ) {\n\t\t\t\t\t\t\t\t/* three bytes */\n\t\t\t\t\t\t\t\tbuf[ i++ ] = 0xe0 | ( c >>> 12 );\n\t\t\t\t\t\t\t\tbuf[ i++ ] = 0x80 | ( ( c >>> 6 ) & 0x3f );\n\t\t\t\t\t\t\t\tbuf[ i++ ] = 0x80 | ( c & 0x3f );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t/* four bytes */\n\t\t\t\t\t\t\t\tbuf[ i++ ] = 0xf0 | ( c >>> 18 );\n\t\t\t\t\t\t\t\tbuf[ i++ ] = 0x80 | ( ( c >>> 12 ) & 0x3f );\n\t\t\t\t\t\t\t\tbuf[ i++ ] = 0x80 | ( ( c >>> 6 ) & 0x3f );\n\t\t\t\t\t\t\t\tbuf[ i++ ] = 0x80 | ( c & 0x3f );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn buf;\n\t\t\t\t\t};\n\n\t\t\t\t\t// Helper (used in 2 places)\n\t\t\t\t\tfunction buf2binstring( buf, len ) {\n\t\t\t\t\t\t// On Chrome, the arguments in a function call that are allowed is `65534`.\n\t\t\t\t\t\t// If the length of the buffer is smaller than that, we can use this optimization,\n\t\t\t\t\t\t// otherwise we will take a slower path.\n\t\t\t\t\t\tif ( len < 65534 ) {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t( buf.subarray && STR_APPLY_UIA_OK ) ||\n\t\t\t\t\t\t\t\t( ! buf.subarray && STR_APPLY_OK )\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\treturn String.fromCharCode.apply(\n\t\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t\tutils.shrinkBuf( buf, len )\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar result = '';\n\t\t\t\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\t\t\t\tresult += String.fromCharCode( buf[ i ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Convert byte array to binary string\n\t\t\t\t\texports.buf2binstring = function ( buf ) {\n\t\t\t\t\t\treturn buf2binstring( buf, buf.length );\n\t\t\t\t\t};\n\n\t\t\t\t\t// Convert binary string (typed, when possible)\n\t\t\t\t\texports.binstring2buf = function ( str ) {\n\t\t\t\t\t\tvar buf = new utils.Buf8( str.length );\n\t\t\t\t\t\tfor ( var i = 0, len = buf.length; i < len; i++ ) {\n\t\t\t\t\t\t\tbuf[ i ] = str.charCodeAt( i );\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn buf;\n\t\t\t\t\t};\n\n\t\t\t\t\t// convert array to string\n\t\t\t\t\texports.buf2string = function ( buf, max ) {\n\t\t\t\t\t\tvar i, out, c, c_len;\n\t\t\t\t\t\tvar len = max || buf.length;\n\n\t\t\t\t\t\t// Reserve max possible length (2 words per char)\n\t\t\t\t\t\t// NB: by unknown reasons, Array is significantly faster for\n\t\t\t\t\t\t// String.fromCharCode.apply than Uint16Array.\n\t\t\t\t\t\tvar utf16buf = new Array( len * 2 );\n\n\t\t\t\t\t\tfor ( out = 0, i = 0; i < len; ) {\n\t\t\t\t\t\t\tc = buf[ i++ ];\n\t\t\t\t\t\t\t// quick process ascii\n\t\t\t\t\t\t\tif ( c < 0x80 ) {\n\t\t\t\t\t\t\t\tutf16buf[ out++ ] = c;\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc_len = _utf8len[ c ];\n\t\t\t\t\t\t\t// skip 5 & 6 byte codes\n\t\t\t\t\t\t\tif ( c_len > 4 ) {\n\t\t\t\t\t\t\t\tutf16buf[ out++ ] = 0xfffd;\n\t\t\t\t\t\t\t\ti += c_len - 1;\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// apply mask on first byte\n\t\t\t\t\t\t\tc &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n\t\t\t\t\t\t\t// join the rest\n\t\t\t\t\t\t\twhile ( c_len > 1 && i < len ) {\n\t\t\t\t\t\t\t\tc = ( c << 6 ) | ( buf[ i++ ] & 0x3f );\n\t\t\t\t\t\t\t\tc_len--;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// terminated by end of string?\n\t\t\t\t\t\t\tif ( c_len > 1 ) {\n\t\t\t\t\t\t\t\tutf16buf[ out++ ] = 0xfffd;\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( c < 0x10000 ) {\n\t\t\t\t\t\t\t\tutf16buf[ out++ ] = c;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tc -= 0x10000;\n\t\t\t\t\t\t\t\tutf16buf[ out++ ] =\n\t\t\t\t\t\t\t\t\t0xd800 | ( ( c >> 10 ) & 0x3ff );\n\t\t\t\t\t\t\t\tutf16buf[ out++ ] = 0xdc00 | ( c & 0x3ff );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn buf2binstring( utf16buf, out );\n\t\t\t\t\t};\n\n\t\t\t\t\t// Calculate max possible position in utf8 buffer,\n\t\t\t\t\t// that will not break sequence. If that's not possible\n\t\t\t\t\t// - (very small limits) return max size as is.\n\t\t\t\t\t//\n\t\t\t\t\t// buf[] - utf8 bytes array\n\t\t\t\t\t// max - length limit (mandatory);\n\t\t\t\t\texports.utf8border = function ( buf, max ) {\n\t\t\t\t\t\tvar pos;\n\n\t\t\t\t\t\tmax = max || buf.length;\n\t\t\t\t\t\tif ( max > buf.length ) {\n\t\t\t\t\t\t\tmax = buf.length;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// go back from last position, until start of sequence found\n\t\t\t\t\t\tpos = max - 1;\n\t\t\t\t\t\twhile ( pos >= 0 && ( buf[ pos ] & 0xc0 ) === 0x80 ) {\n\t\t\t\t\t\t\tpos--;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Very small and broken sequence,\n\t\t\t\t\t\t// return max, because we should return something anyway.\n\t\t\t\t\t\tif ( pos < 0 ) {\n\t\t\t\t\t\t\treturn max;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If we came to start of buffer - that means buffer is too small,\n\t\t\t\t\t\t// return max too.\n\t\t\t\t\t\tif ( pos === 0 ) {\n\t\t\t\t\t\t\treturn max;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn pos + _utf8len[ buf[ pos ] ] > max ? pos : max;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{ './common': 1 },\n\t\t\t],\n\t\t\t3: [\n\t\t\t\tfunction ( require, module, exports ) {\n\t\t\t\t\t'use strict';\n\n\t\t\t\t\t// Note: adler32 takes 12% for level 0 and 2% for level 6.\n\t\t\t\t\t// It isn't worth it to make additional optimizations as in original.\n\t\t\t\t\t// Small size is preferable.\n\n\t\t\t\t\t// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n\t\t\t\t\t// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n\t\t\t\t\t//\n\t\t\t\t\t// This software is provided 'as-is', without any express or implied\n\t\t\t\t\t// warranty. In no event will the authors be held liable for any damages\n\t\t\t\t\t// arising from the use of this software.\n\t\t\t\t\t//\n\t\t\t\t\t// Permission is granted to anyone to use this software for any purpose,\n\t\t\t\t\t// including commercial applications, and to alter it and redistribute it\n\t\t\t\t\t// freely, subject to the following restrictions:\n\t\t\t\t\t//\n\t\t\t\t\t// 1. The origin of this software must not be misrepresented; you must not\n\t\t\t\t\t// claim that you wrote the original software. If you use this software\n\t\t\t\t\t// in a product, an acknowledgment in the product documentation would be\n\t\t\t\t\t// appreciated but is not required.\n\t\t\t\t\t// 2. Altered source versions must be plainly marked as such, and must not be\n\t\t\t\t\t// misrepresented as being the original software.\n\t\t\t\t\t// 3. This notice may not be removed or altered from any source distribution.\n\n\t\t\t\t\tfunction adler32( adler, buf, len, pos ) {\n\t\t\t\t\t\tvar s1 = ( adler & 0xffff ) | 0,\n\t\t\t\t\t\t\ts2 = ( ( adler >>> 16 ) & 0xffff ) | 0,\n\t\t\t\t\t\t\tn = 0;\n\n\t\t\t\t\t\twhile ( len !== 0 ) {\n\t\t\t\t\t\t\t// Set limit ~ twice less than 5552, to keep\n\t\t\t\t\t\t\t// s2 in 31-bits, because we force signed ints.\n\t\t\t\t\t\t\t// in other case %= will fail.\n\t\t\t\t\t\t\tn = len > 2000 ? 2000 : len;\n\t\t\t\t\t\t\tlen -= n;\n\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\ts1 = ( s1 + buf[ pos++ ] ) | 0;\n\t\t\t\t\t\t\t\ts2 = ( s2 + s1 ) | 0;\n\t\t\t\t\t\t\t} while ( --n );\n\n\t\t\t\t\t\t\ts1 %= 65521;\n\t\t\t\t\t\t\ts2 %= 65521;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn s1 | ( s2 << 16 ) | 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tmodule.exports = adler32;\n\t\t\t\t},\n\t\t\t\t{},\n\t\t\t],\n\t\t\t4: [\n\t\t\t\tfunction ( require, module, exports ) {\n\t\t\t\t\t'use strict';\n\n\t\t\t\t\t// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n\t\t\t\t\t// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n\t\t\t\t\t//\n\t\t\t\t\t// This software is provided 'as-is', without any express or implied\n\t\t\t\t\t// warranty. In no event will the authors be held liable for any damages\n\t\t\t\t\t// arising from the use of this software.\n\t\t\t\t\t//\n\t\t\t\t\t// Permission is granted to anyone to use this software for any purpose,\n\t\t\t\t\t// including commercial applications, and to alter it and redistribute it\n\t\t\t\t\t// freely, subject to the following restrictions:\n\t\t\t\t\t//\n\t\t\t\t\t// 1. The origin of this software must not be misrepresented; you must not\n\t\t\t\t\t// claim that you wrote the original software. If you use this software\n\t\t\t\t\t// in a product, an acknowledgment in the product documentation would be\n\t\t\t\t\t// appreciated but is not required.\n\t\t\t\t\t// 2. Altered source versions must be plainly marked as such, and must not be\n\t\t\t\t\t// misrepresented as being the original software.\n\t\t\t\t\t// 3. This notice may not be removed or altered from any source distribution.\n\n\t\t\t\t\tmodule.exports = {\n\t\t\t\t\t\t/* Allowed flush values; see deflate() and inflate() below for details */\n\t\t\t\t\t\tZ_NO_FLUSH: 0,\n\t\t\t\t\t\tZ_PARTIAL_FLUSH: 1,\n\t\t\t\t\t\tZ_SYNC_FLUSH: 2,\n\t\t\t\t\t\tZ_FULL_FLUSH: 3,\n\t\t\t\t\t\tZ_FINISH: 4,\n\t\t\t\t\t\tZ_BLOCK: 5,\n\t\t\t\t\t\tZ_TREES: 6,\n\n\t\t\t\t\t\t/* Return codes for the compression/decompression functions. Negative values\n\t\t\t\t\t\t * are errors, positive values are used for special but normal events.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tZ_OK: 0,\n\t\t\t\t\t\tZ_STREAM_END: 1,\n\t\t\t\t\t\tZ_NEED_DICT: 2,\n\t\t\t\t\t\tZ_ERRNO: -1,\n\t\t\t\t\t\tZ_STREAM_ERROR: -2,\n\t\t\t\t\t\tZ_DATA_ERROR: -3,\n\t\t\t\t\t\t//Z_MEM_ERROR: -4,\n\t\t\t\t\t\tZ_BUF_ERROR: -5,\n\t\t\t\t\t\t//Z_VERSION_ERROR: -6,\n\n\t\t\t\t\t\t/* compression levels */\n\t\t\t\t\t\tZ_NO_COMPRESSION: 0,\n\t\t\t\t\t\tZ_BEST_SPEED: 1,\n\t\t\t\t\t\tZ_BEST_COMPRESSION: 9,\n\t\t\t\t\t\tZ_DEFAULT_COMPRESSION: -1,\n\n\t\t\t\t\t\tZ_FILTERED: 1,\n\t\t\t\t\t\tZ_HUFFMAN_ONLY: 2,\n\t\t\t\t\t\tZ_RLE: 3,\n\t\t\t\t\t\tZ_FIXED: 4,\n\t\t\t\t\t\tZ_DEFAULT_STRATEGY: 0,\n\n\t\t\t\t\t\t/* Possible values of the data_type field (though see inflate()) */\n\t\t\t\t\t\tZ_BINARY: 0,\n\t\t\t\t\t\tZ_TEXT: 1,\n\t\t\t\t\t\t//Z_ASCII: 1, // = Z_TEXT (deprecated)\n\t\t\t\t\t\tZ_UNKNOWN: 2,\n\n\t\t\t\t\t\t/* The deflate compression method */\n\t\t\t\t\t\tZ_DEFLATED: 8,\n\t\t\t\t\t\t//Z_NULL: null // Use -1 or null inline, depending on var type\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{},\n\t\t\t],\n\t\t\t5: [\n\t\t\t\tfunction ( require, module, exports ) {\n\t\t\t\t\t'use strict';\n\n\t\t\t\t\t// Note: we can't get significant speed boost here.\n\t\t\t\t\t// So write code to minimize size - no pregenerated tables\n\t\t\t\t\t// and array tools dependencies.\n\n\t\t\t\t\t// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n\t\t\t\t\t// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n\t\t\t\t\t//\n\t\t\t\t\t// This software is provided 'as-is', without any express or implied\n\t\t\t\t\t// warranty. In no event will the authors be held liable for any damages\n\t\t\t\t\t// arising from the use of this software.\n\t\t\t\t\t//\n\t\t\t\t\t// Permission is granted to anyone to use this software for any purpose,\n\t\t\t\t\t// including commercial applications, and to alter it and redistribute it\n\t\t\t\t\t// freely, subject to the following restrictions:\n\t\t\t\t\t//\n\t\t\t\t\t// 1. The origin of this software must not be misrepresented; you must not\n\t\t\t\t\t// claim that you wrote the original software. If you use this software\n\t\t\t\t\t// in a product, an acknowledgment in the product documentation would be\n\t\t\t\t\t// appreciated but is not required.\n\t\t\t\t\t// 2. Altered source versions must be plainly marked as such, and must not be\n\t\t\t\t\t// misrepresented as being the original software.\n\t\t\t\t\t// 3. This notice may not be removed or altered from any source distribution.\n\n\t\t\t\t\t// Use ordinary array, since untyped makes no boost here\n\t\t\t\t\tfunction makeTable() {\n\t\t\t\t\t\tvar c,\n\t\t\t\t\t\t\ttable = [];\n\n\t\t\t\t\t\tfor ( var n = 0; n < 256; n++ ) {\n\t\t\t\t\t\t\tc = n;\n\t\t\t\t\t\t\tfor ( var k = 0; k < 8; k++ ) {\n\t\t\t\t\t\t\t\tc = c & 1 ? 0xedb88320 ^ ( c >>> 1 ) : c >>> 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttable[ n ] = c;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn table;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Create table on load. Just 255 signed longs. Not a problem.\n\t\t\t\t\tvar crcTable = makeTable();\n\n\t\t\t\t\tfunction crc32( crc, buf, len, pos ) {\n\t\t\t\t\t\tvar t = crcTable,\n\t\t\t\t\t\t\tend = pos + len;\n\n\t\t\t\t\t\tcrc ^= -1;\n\n\t\t\t\t\t\tfor ( var i = pos; i < end; i++ ) {\n\t\t\t\t\t\t\tcrc =\n\t\t\t\t\t\t\t\t( crc >>> 8 ) ^ t[ ( crc ^ buf[ i ] ) & 0xff ];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn crc ^ -1; // >>> 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tmodule.exports = crc32;\n\t\t\t\t},\n\t\t\t\t{},\n\t\t\t],\n\t\t\t6: [\n\t\t\t\tfunction ( require, module, exports ) {\n\t\t\t\t\t'use strict';\n\n\t\t\t\t\t// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n\t\t\t\t\t// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n\t\t\t\t\t//\n\t\t\t\t\t// This software is provided 'as-is', without any express or implied\n\t\t\t\t\t// warranty. In no event will the authors be held liable for any damages\n\t\t\t\t\t// arising from the use of this software.\n\t\t\t\t\t//\n\t\t\t\t\t// Permission is granted to anyone to use this software for any purpose,\n\t\t\t\t\t// including commercial applications, and to alter it and redistribute it\n\t\t\t\t\t// freely, subject to the following restrictions:\n\t\t\t\t\t//\n\t\t\t\t\t// 1. The origin of this software must not be misrepresented; you must not\n\t\t\t\t\t// claim that you wrote the original software. If you use this software\n\t\t\t\t\t// in a product, an acknowledgment in the product documentation would be\n\t\t\t\t\t// appreciated but is not required.\n\t\t\t\t\t// 2. Altered source versions must be plainly marked as such, and must not be\n\t\t\t\t\t// misrepresented as being the original software.\n\t\t\t\t\t// 3. This notice may not be removed or altered from any source distribution.\n\n\t\t\t\t\tfunction GZheader() {\n\t\t\t\t\t\t/* true if compressed data believed to be text */\n\t\t\t\t\t\tthis.text = 0;\n\t\t\t\t\t\t/* modification time */\n\t\t\t\t\t\tthis.time = 0;\n\t\t\t\t\t\t/* extra flags (not used when writing a gzip file) */\n\t\t\t\t\t\tthis.xflags = 0;\n\t\t\t\t\t\t/* operating system */\n\t\t\t\t\t\tthis.os = 0;\n\t\t\t\t\t\t/* pointer to extra field or Z_NULL if none */\n\t\t\t\t\t\tthis.extra = null;\n\t\t\t\t\t\t/* extra field length (valid if extra != Z_NULL) */\n\t\t\t\t\t\tthis.extra_len = 0; // Actually, we don't need it in JS,\n\t\t\t\t\t\t// but leave for few code modifications\n\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// Setup limits is not necessary because in js we should not preallocate memory\n\t\t\t\t\t\t// for inflate use constant limit in 65536 bytes\n\t\t\t\t\t\t//\n\n\t\t\t\t\t\t/* space at extra (only when reading header) */\n\t\t\t\t\t\t// this.extra_max = 0;\n\t\t\t\t\t\t/* pointer to zero-terminated file name or Z_NULL */\n\t\t\t\t\t\tthis.name = '';\n\t\t\t\t\t\t/* space at name (only when reading header) */\n\t\t\t\t\t\t// this.name_max = 0;\n\t\t\t\t\t\t/* pointer to zero-terminated comment or Z_NULL */\n\t\t\t\t\t\tthis.comment = '';\n\t\t\t\t\t\t/* space at comment (only when reading header) */\n\t\t\t\t\t\t// this.comm_max = 0;\n\t\t\t\t\t\t/* true if there was or will be a header crc */\n\t\t\t\t\t\tthis.hcrc = 0;\n\t\t\t\t\t\t/* true when done reading gzip header (not used when writing a gzip file) */\n\t\t\t\t\t\tthis.done = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tmodule.exports = GZheader;\n\t\t\t\t},\n\t\t\t\t{},\n\t\t\t],\n\t\t\t7: [\n\t\t\t\tfunction ( require, module, exports ) {\n\t\t\t\t\t'use strict';\n\n\t\t\t\t\t// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n\t\t\t\t\t// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n\t\t\t\t\t//\n\t\t\t\t\t// This software is provided 'as-is', without any express or implied\n\t\t\t\t\t// warranty. In no event will the authors be held liable for any damages\n\t\t\t\t\t// arising from the use of this software.\n\t\t\t\t\t//\n\t\t\t\t\t// Permission is granted to anyone to use this software for any purpose,\n\t\t\t\t\t// including commercial applications, and to alter it and redistribute it\n\t\t\t\t\t// freely, subject to the following restrictions:\n\t\t\t\t\t//\n\t\t\t\t\t// 1. The origin of this software must not be misrepresented; you must not\n\t\t\t\t\t// claim that you wrote the original software. If you use this software\n\t\t\t\t\t// in a product, an acknowledgment in the product documentation would be\n\t\t\t\t\t// appreciated but is not required.\n\t\t\t\t\t// 2. Altered source versions must be plainly marked as such, and must not be\n\t\t\t\t\t// misrepresented as being the original software.\n\t\t\t\t\t// 3. This notice may not be removed or altered from any source distribution.\n\n\t\t\t\t\t// See state defs from inflate.js\n\t\t\t\t\tvar BAD = 30; /* got a data error -- remain here until reset */\n\t\t\t\t\tvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n\n\t\t\t\t\t/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\n\t\t\t\t\tmodule.exports = function inflate_fast( strm, start ) {\n\t\t\t\t\t\tvar state;\n\t\t\t\t\t\tvar _in; /* local strm.input */\n\t\t\t\t\t\tvar last; /* have enough input while in < last */\n\t\t\t\t\t\tvar _out; /* local strm.output */\n\t\t\t\t\t\tvar beg; /* inflate()'s initial strm.output */\n\t\t\t\t\t\tvar end; /* while out < end, enough space available */\n\t\t\t\t\t\t//#ifdef INFLATE_STRICT\n\t\t\t\t\t\tvar dmax; /* maximum distance from zlib header */\n\t\t\t\t\t\t//#endif\n\t\t\t\t\t\tvar wsize; /* window size or zero if not using window */\n\t\t\t\t\t\tvar whave; /* valid bytes in the window */\n\t\t\t\t\t\tvar wnext; /* window write index */\n\t\t\t\t\t\t// Use `s_window` instead `window`, avoid conflict with instrumentation tools\n\t\t\t\t\t\tvar s_window; /* allocated sliding window, if wsize != 0 */\n\t\t\t\t\t\tvar hold; /* local strm.hold */\n\t\t\t\t\t\tvar bits; /* local strm.bits */\n\t\t\t\t\t\tvar lcode; /* local strm.lencode */\n\t\t\t\t\t\tvar dcode; /* local strm.distcode */\n\t\t\t\t\t\tvar lmask; /* mask for first level of length codes */\n\t\t\t\t\t\tvar dmask; /* mask for first level of distance codes */\n\t\t\t\t\t\tvar here; /* retrieved table entry */\n\t\t\t\t\t\tvar op; /* code bits, operation, extra bits, or */\n\t\t\t\t\t\t/* window position, window bytes to copy */\n\t\t\t\t\t\tvar len; /* match length, unused bytes */\n\t\t\t\t\t\tvar dist; /* match distance */\n\t\t\t\t\t\tvar from; /* where to copy match from */\n\t\t\t\t\t\tvar from_source;\n\n\t\t\t\t\t\tvar input, output; // JS specific, because we have no pointers\n\n\t\t\t\t\t\t/* copy state to local variables */\n\t\t\t\t\t\tstate = strm.state;\n\t\t\t\t\t\t//here = state.here;\n\t\t\t\t\t\t_in = strm.next_in;\n\t\t\t\t\t\tinput = strm.input;\n\t\t\t\t\t\tlast = _in + ( strm.avail_in - 5 );\n\t\t\t\t\t\t_out = strm.next_out;\n\t\t\t\t\t\toutput = strm.output;\n\t\t\t\t\t\tbeg = _out - ( start - strm.avail_out );\n\t\t\t\t\t\tend = _out + ( strm.avail_out - 257 );\n\t\t\t\t\t\t//#ifdef INFLATE_STRICT\n\t\t\t\t\t\tdmax = state.dmax;\n\t\t\t\t\t\t//#endif\n\t\t\t\t\t\twsize = state.wsize;\n\t\t\t\t\t\twhave = state.whave;\n\t\t\t\t\t\twnext = state.wnext;\n\t\t\t\t\t\ts_window = state.window;\n\t\t\t\t\t\thold = state.hold;\n\t\t\t\t\t\tbits = state.bits;\n\t\t\t\t\t\tlcode = state.lencode;\n\t\t\t\t\t\tdcode = state.distcode;\n\t\t\t\t\t\tlmask = ( 1 << state.lenbits ) - 1;\n\t\t\t\t\t\tdmask = ( 1 << state.distbits ) - 1;\n\n\t\t\t\t\t\t/* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n\t\t\t\t\t\ttop: do {\n\t\t\t\t\t\t\tif ( bits < 15 ) {\n\t\t\t\t\t\t\t\thold += input[ _in++ ] << bits;\n\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\thold += input[ _in++ ] << bits;\n\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\there = lcode[ hold & lmask ];\n\n\t\t\t\t\t\t\tdolen: for (;;) {\n\t\t\t\t\t\t\t\t// Goto emulation\n\t\t\t\t\t\t\t\top = here >>> 24 /*here.bits*/;\n\t\t\t\t\t\t\t\thold >>>= op;\n\t\t\t\t\t\t\t\tbits -= op;\n\t\t\t\t\t\t\t\top = ( here >>> 16 ) & 0xff /*here.op*/;\n\t\t\t\t\t\t\t\tif ( op === 0 ) {\n\t\t\t\t\t\t\t\t\t/* literal */\n\t\t\t\t\t\t\t\t\t//Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n\t\t\t\t\t\t\t\t\t// \"inflate: literal '%c'\\n\" :\n\t\t\t\t\t\t\t\t\t// \"inflate: literal 0x%02x\\n\", here.val));\n\t\t\t\t\t\t\t\t\toutput[ _out++ ] =\n\t\t\t\t\t\t\t\t\t\there & 0xffff /*here.val*/;\n\t\t\t\t\t\t\t\t} else if ( op & 16 ) {\n\t\t\t\t\t\t\t\t\t/* length base */\n\t\t\t\t\t\t\t\t\tlen = here & 0xffff /*here.val*/;\n\t\t\t\t\t\t\t\t\top &= 15; /* number of extra bits */\n\t\t\t\t\t\t\t\t\tif ( op ) {\n\t\t\t\t\t\t\t\t\t\tif ( bits < op ) {\n\t\t\t\t\t\t\t\t\t\t\thold += input[ _in++ ] << bits;\n\t\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tlen += hold & ( ( 1 << op ) - 1 );\n\t\t\t\t\t\t\t\t\t\thold >>>= op;\n\t\t\t\t\t\t\t\t\t\tbits -= op;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//Tracevv((stderr, \"inflate: length %u\\n\", len));\n\t\t\t\t\t\t\t\t\tif ( bits < 15 ) {\n\t\t\t\t\t\t\t\t\t\thold += input[ _in++ ] << bits;\n\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t\thold += input[ _in++ ] << bits;\n\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\there = dcode[ hold & dmask ];\n\n\t\t\t\t\t\t\t\t\tdodist: for (;;) {\n\t\t\t\t\t\t\t\t\t\t// goto emulation\n\t\t\t\t\t\t\t\t\t\top = here >>> 24 /*here.bits*/;\n\t\t\t\t\t\t\t\t\t\thold >>>= op;\n\t\t\t\t\t\t\t\t\t\tbits -= op;\n\t\t\t\t\t\t\t\t\t\top = ( here >>> 16 ) & 0xff /*here.op*/;\n\n\t\t\t\t\t\t\t\t\t\tif ( op & 16 ) {\n\t\t\t\t\t\t\t\t\t\t\t/* distance base */\n\t\t\t\t\t\t\t\t\t\t\tdist = here & 0xffff /*here.val*/;\n\t\t\t\t\t\t\t\t\t\t\top &= 15; /* number of extra bits */\n\t\t\t\t\t\t\t\t\t\t\tif ( bits < op ) {\n\t\t\t\t\t\t\t\t\t\t\t\thold += input[ _in++ ] << bits;\n\t\t\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t\t\t\tif ( bits < op ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\thold +=\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput[ _in++ ] << bits;\n\t\t\t\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tdist += hold & ( ( 1 << op ) - 1 );\n\t\t\t\t\t\t\t\t\t\t\t//#ifdef INFLATE_STRICT\n\t\t\t\t\t\t\t\t\t\t\tif ( dist > dmax ) {\n\t\t\t\t\t\t\t\t\t\t\t\tstrm.msg =\n\t\t\t\t\t\t\t\t\t\t\t\t\t'invalid distance too far back';\n\t\t\t\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak top;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t//#endif\n\t\t\t\t\t\t\t\t\t\t\thold >>>= op;\n\t\t\t\t\t\t\t\t\t\t\tbits -= op;\n\t\t\t\t\t\t\t\t\t\t\t//Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n\t\t\t\t\t\t\t\t\t\t\top =\n\t\t\t\t\t\t\t\t\t\t\t\t_out -\n\t\t\t\t\t\t\t\t\t\t\t\tbeg; /* max distance in output */\n\t\t\t\t\t\t\t\t\t\t\tif ( dist > op ) {\n\t\t\t\t\t\t\t\t\t\t\t\t/* see if copy from window */\n\t\t\t\t\t\t\t\t\t\t\t\top =\n\t\t\t\t\t\t\t\t\t\t\t\t\tdist -\n\t\t\t\t\t\t\t\t\t\t\t\t\top; /* distance back in window */\n\t\t\t\t\t\t\t\t\t\t\t\tif ( op > whave ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( state.sane ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrm.msg =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'invalid distance too far back';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak top;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t// (!) This block is disabled in zlib defaults,\n\t\t\t\t\t\t\t\t\t\t\t\t\t// don't enable it for binary compatibility\n\t\t\t\t\t\t\t\t\t\t\t\t\t//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n\t\t\t\t\t\t\t\t\t\t\t\t\t// if (len <= op - whave) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// do {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// output[_out++] = 0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t// } while (--len);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// continue top;\n\t\t\t\t\t\t\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\t\t\t\t\t\t\t// len -= op - whave;\n\t\t\t\t\t\t\t\t\t\t\t\t\t// do {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// output[_out++] = 0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t// } while (--op > whave);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// if (op === 0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// from = _out - dist;\n\t\t\t\t\t\t\t\t\t\t\t\t\t// do {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// output[_out++] = output[from++];\n\t\t\t\t\t\t\t\t\t\t\t\t\t// } while (--len);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// continue top;\n\t\t\t\t\t\t\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\t\t\t\t\t\t\t//#endif\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tfrom = 0; // window index\n\t\t\t\t\t\t\t\t\t\t\t\tfrom_source = s_window;\n\t\t\t\t\t\t\t\t\t\t\t\tif ( wnext === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t/* very common case */\n\t\t\t\t\t\t\t\t\t\t\t\t\tfrom += wsize - op;\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( op < len ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* some from window */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlen -= op;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\toutput[ _out++ ] =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ts_window[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom++\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} while ( --op );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t_out -\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdist; /* rest from output */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom_source = output;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t} else if ( wnext < op ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t/* wrap around window */\n\t\t\t\t\t\t\t\t\t\t\t\t\tfrom += wsize + wnext - op;\n\t\t\t\t\t\t\t\t\t\t\t\t\top -= wnext;\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( op < len ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* some from end of window */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlen -= op;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\toutput[ _out++ ] =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ts_window[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom++\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} while ( --op );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom = 0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( wnext < len ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* some from start of window */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\top = wnext;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlen -= op;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\toutput[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t_out++\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t] =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ts_window[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom++\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} while ( --op );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t_out -\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdist; /* rest from output */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom_source =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\toutput;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t/* contiguous in window */\n\t\t\t\t\t\t\t\t\t\t\t\t\tfrom += wnext - op;\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( op < len ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* some from window */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlen -= op;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\toutput[ _out++ ] =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ts_window[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom++\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} while ( --op );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t_out -\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdist; /* rest from output */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom_source = output;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\twhile ( len > 2 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\toutput[ _out++ ] =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom_source[ from++ ];\n\t\t\t\t\t\t\t\t\t\t\t\t\toutput[ _out++ ] =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom_source[ from++ ];\n\t\t\t\t\t\t\t\t\t\t\t\t\toutput[ _out++ ] =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom_source[ from++ ];\n\t\t\t\t\t\t\t\t\t\t\t\t\tlen -= 3;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tif ( len ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\toutput[ _out++ ] =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom_source[ from++ ];\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( len > 1 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\toutput[ _out++ ] =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom_source[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom++\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tfrom =\n\t\t\t\t\t\t\t\t\t\t\t\t\t_out -\n\t\t\t\t\t\t\t\t\t\t\t\t\tdist; /* copy direct from output */\n\t\t\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\t\t\t/* minimum length is three */\n\t\t\t\t\t\t\t\t\t\t\t\t\toutput[ _out++ ] =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\toutput[ from++ ];\n\t\t\t\t\t\t\t\t\t\t\t\t\toutput[ _out++ ] =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\toutput[ from++ ];\n\t\t\t\t\t\t\t\t\t\t\t\t\toutput[ _out++ ] =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\toutput[ from++ ];\n\t\t\t\t\t\t\t\t\t\t\t\t\tlen -= 3;\n\t\t\t\t\t\t\t\t\t\t\t\t} while ( len > 2 );\n\t\t\t\t\t\t\t\t\t\t\t\tif ( len ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\toutput[ _out++ ] =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\toutput[ from++ ];\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( len > 1 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\toutput[ _out++ ] =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\toutput[ from++ ];\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else if ( ( op & 64 ) === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t/* 2nd level distance code */\n\t\t\t\t\t\t\t\t\t\t\there =\n\t\t\t\t\t\t\t\t\t\t\t\tdcode[\n\t\t\t\t\t\t\t\t\t\t\t\t\t( here &\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t0xffff ) /*here.val*/ +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t( hold &\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t( ( 1 << op ) -\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t1 ) )\n\t\t\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t\t\tcontinue dodist;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tstrm.msg = 'invalid distance code';\n\t\t\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\t\t\tbreak top;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tbreak; // need to emulate goto via \"continue\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if ( ( op & 64 ) === 0 ) {\n\t\t\t\t\t\t\t\t\t/* 2nd level length code */\n\t\t\t\t\t\t\t\t\there =\n\t\t\t\t\t\t\t\t\t\tlcode[\n\t\t\t\t\t\t\t\t\t\t\t( here & 0xffff ) /*here.val*/ +\n\t\t\t\t\t\t\t\t\t\t\t\t( hold & ( ( 1 << op ) - 1 ) )\n\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\tcontinue dolen;\n\t\t\t\t\t\t\t\t} else if ( op & 32 ) {\n\t\t\t\t\t\t\t\t\t/* end-of-block */\n\t\t\t\t\t\t\t\t\t//Tracevv((stderr, \"inflate: end of block\\n\"));\n\t\t\t\t\t\t\t\t\tstate.mode = TYPE;\n\t\t\t\t\t\t\t\t\tbreak top;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tstrm.msg = 'invalid literal/length code';\n\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\tbreak top;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tbreak; // need to emulate goto via \"continue\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} while ( _in < last && _out < end );\n\n\t\t\t\t\t\t/* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n\t\t\t\t\t\tlen = bits >> 3;\n\t\t\t\t\t\t_in -= len;\n\t\t\t\t\t\tbits -= len << 3;\n\t\t\t\t\t\thold &= ( 1 << bits ) - 1;\n\n\t\t\t\t\t\t/* update state and return */\n\t\t\t\t\t\tstrm.next_in = _in;\n\t\t\t\t\t\tstrm.next_out = _out;\n\t\t\t\t\t\tstrm.avail_in =\n\t\t\t\t\t\t\t_in < last\n\t\t\t\t\t\t\t\t? 5 + ( last - _in )\n\t\t\t\t\t\t\t\t: 5 - ( _in - last );\n\t\t\t\t\t\tstrm.avail_out =\n\t\t\t\t\t\t\t_out < end\n\t\t\t\t\t\t\t\t? 257 + ( end - _out )\n\t\t\t\t\t\t\t\t: 257 - ( _out - end );\n\t\t\t\t\t\tstate.hold = hold;\n\t\t\t\t\t\tstate.bits = bits;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{},\n\t\t\t],\n\t\t\t8: [\n\t\t\t\tfunction ( require, module, exports ) {\n\t\t\t\t\t'use strict';\n\n\t\t\t\t\t// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n\t\t\t\t\t// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n\t\t\t\t\t//\n\t\t\t\t\t// This software is provided 'as-is', without any express or implied\n\t\t\t\t\t// warranty. In no event will the authors be held liable for any damages\n\t\t\t\t\t// arising from the use of this software.\n\t\t\t\t\t//\n\t\t\t\t\t// Permission is granted to anyone to use this software for any purpose,\n\t\t\t\t\t// including commercial applications, and to alter it and redistribute it\n\t\t\t\t\t// freely, subject to the following restrictions:\n\t\t\t\t\t//\n\t\t\t\t\t// 1. The origin of this software must not be misrepresented; you must not\n\t\t\t\t\t// claim that you wrote the original software. If you use this software\n\t\t\t\t\t// in a product, an acknowledgment in the product documentation would be\n\t\t\t\t\t// appreciated but is not required.\n\t\t\t\t\t// 2. Altered source versions must be plainly marked as such, and must not be\n\t\t\t\t\t// misrepresented as being the original software.\n\t\t\t\t\t// 3. This notice may not be removed or altered from any source distribution.\n\n\t\t\t\t\tvar utils = require( '../utils/common' );\n\t\t\t\t\tvar adler32 = require( './adler32' );\n\t\t\t\t\tvar crc32 = require( './crc32' );\n\t\t\t\t\tvar inflate_fast = require( './inffast' );\n\t\t\t\t\tvar inflate_table = require( './inftrees' );\n\n\t\t\t\t\tvar CODES = 0;\n\t\t\t\t\tvar LENS = 1;\n\t\t\t\t\tvar DISTS = 2;\n\n\t\t\t\t\t/* Public constants ==========================================================*/\n\t\t\t\t\t/* ===========================================================================*/\n\n\t\t\t\t\t/* Allowed flush values; see deflate() and inflate() below for details */\n\t\t\t\t\t//var Z_NO_FLUSH = 0;\n\t\t\t\t\t//var Z_PARTIAL_FLUSH = 1;\n\t\t\t\t\t//var Z_SYNC_FLUSH = 2;\n\t\t\t\t\t//var Z_FULL_FLUSH = 3;\n\t\t\t\t\tvar Z_FINISH = 4;\n\t\t\t\t\tvar Z_BLOCK = 5;\n\t\t\t\t\tvar Z_TREES = 6;\n\n\t\t\t\t\t/* Return codes for the compression/decompression functions. Negative values\n\t\t\t\t\t * are errors, positive values are used for special but normal events.\n\t\t\t\t\t */\n\t\t\t\t\tvar Z_OK = 0;\n\t\t\t\t\tvar Z_STREAM_END = 1;\n\t\t\t\t\tvar Z_NEED_DICT = 2;\n\t\t\t\t\t//var Z_ERRNO = -1;\n\t\t\t\t\tvar Z_STREAM_ERROR = -2;\n\t\t\t\t\tvar Z_DATA_ERROR = -3;\n\t\t\t\t\tvar Z_MEM_ERROR = -4;\n\t\t\t\t\tvar Z_BUF_ERROR = -5;\n\t\t\t\t\t//var Z_VERSION_ERROR = -6;\n\n\t\t\t\t\t/* The deflate compression method */\n\t\t\t\t\tvar Z_DEFLATED = 8;\n\n\t\t\t\t\t/* STATES ====================================================================*/\n\t\t\t\t\t/* ===========================================================================*/\n\n\t\t\t\t\tvar HEAD = 1; /* i: waiting for magic header */\n\t\t\t\t\tvar FLAGS = 2; /* i: waiting for method and flags (gzip) */\n\t\t\t\t\tvar TIME = 3; /* i: waiting for modification time (gzip) */\n\t\t\t\t\tvar OS = 4; /* i: waiting for extra flags and operating system (gzip) */\n\t\t\t\t\tvar EXLEN = 5; /* i: waiting for extra length (gzip) */\n\t\t\t\t\tvar EXTRA = 6; /* i: waiting for extra bytes (gzip) */\n\t\t\t\t\tvar NAME = 7; /* i: waiting for end of file name (gzip) */\n\t\t\t\t\tvar COMMENT = 8; /* i: waiting for end of comment (gzip) */\n\t\t\t\t\tvar HCRC = 9; /* i: waiting for header crc (gzip) */\n\t\t\t\t\tvar DICTID = 10; /* i: waiting for dictionary check value */\n\t\t\t\t\tvar DICT = 11; /* waiting for inflateSetDictionary() call */\n\t\t\t\t\tvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n\t\t\t\t\tvar TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\n\t\t\t\t\tvar STORED = 14; /* i: waiting for stored size (length and complement) */\n\t\t\t\t\tvar COPY_ = 15; /* i/o: same as COPY below, but only first time in */\n\t\t\t\t\tvar COPY = 16; /* i/o: waiting for input or output to copy stored block */\n\t\t\t\t\tvar TABLE = 17; /* i: waiting for dynamic block table lengths */\n\t\t\t\t\tvar LENLENS = 18; /* i: waiting for code length code lengths */\n\t\t\t\t\tvar CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\n\t\t\t\t\tvar LEN_ = 20; /* i: same as LEN below, but only first time in */\n\t\t\t\t\tvar LEN = 21; /* i: waiting for length/lit/eob code */\n\t\t\t\t\tvar LENEXT = 22; /* i: waiting for length extra bits */\n\t\t\t\t\tvar DIST = 23; /* i: waiting for distance code */\n\t\t\t\t\tvar DISTEXT = 24; /* i: waiting for distance extra bits */\n\t\t\t\t\tvar MATCH = 25; /* o: waiting for output space to copy string */\n\t\t\t\t\tvar LIT = 26; /* o: waiting for output space to write literal */\n\t\t\t\t\tvar CHECK = 27; /* i: waiting for 32-bit check value */\n\t\t\t\t\tvar LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\n\t\t\t\t\tvar DONE = 29; /* finished check, done -- remain here until reset */\n\t\t\t\t\tvar BAD = 30; /* got a data error -- remain here until reset */\n\t\t\t\t\tvar MEM = 31; /* got an inflate() memory error -- remain here until reset */\n\t\t\t\t\tvar SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n\t\t\t\t\t/* ===========================================================================*/\n\n\t\t\t\t\tvar ENOUGH_LENS = 852;\n\t\t\t\t\tvar ENOUGH_DISTS = 592;\n\t\t\t\t\t//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\n\t\t\t\t\tvar MAX_WBITS = 15;\n\t\t\t\t\t/* 32K LZ77 window */\n\t\t\t\t\tvar DEF_WBITS = MAX_WBITS;\n\n\t\t\t\t\tfunction zswap32( q ) {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t( ( q >>> 24 ) & 0xff ) +\n\t\t\t\t\t\t\t( ( q >>> 8 ) & 0xff00 ) +\n\t\t\t\t\t\t\t( ( q & 0xff00 ) << 8 ) +\n\t\t\t\t\t\t\t( ( q & 0xff ) << 24 )\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction InflateState() {\n\t\t\t\t\t\tthis.mode = 0; /* current inflate mode */\n\t\t\t\t\t\tthis.last = false; /* true if processing last block */\n\t\t\t\t\t\tthis.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n\t\t\t\t\t\tthis.havedict = false; /* true if dictionary provided */\n\t\t\t\t\t\tthis.flags = 0; /* gzip header method and flags (0 if zlib) */\n\t\t\t\t\t\tthis.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n\t\t\t\t\t\tthis.check = 0; /* protected copy of check value */\n\t\t\t\t\t\tthis.total = 0; /* protected copy of output count */\n\t\t\t\t\t\t// TODO: may be {}\n\t\t\t\t\t\tthis.head =\n\t\t\t\t\t\t\tnull; /* where to save gzip header information */\n\n\t\t\t\t\t\t/* sliding window */\n\t\t\t\t\t\tthis.wbits = 0; /* log base 2 of requested window size */\n\t\t\t\t\t\tthis.wsize = 0; /* window size or zero if not using window */\n\t\t\t\t\t\tthis.whave = 0; /* valid bytes in the window */\n\t\t\t\t\t\tthis.wnext = 0; /* window write index */\n\t\t\t\t\t\tthis.window =\n\t\t\t\t\t\t\tnull; /* allocated sliding window, if needed */\n\n\t\t\t\t\t\t/* bit accumulator */\n\t\t\t\t\t\tthis.hold = 0; /* input bit accumulator */\n\t\t\t\t\t\tthis.bits = 0; /* number of bits in \"in\" */\n\n\t\t\t\t\t\t/* for string and stored block copying */\n\t\t\t\t\t\tthis.length = 0; /* literal or length of data to copy */\n\t\t\t\t\t\tthis.offset = 0; /* distance back to copy string from */\n\n\t\t\t\t\t\t/* for table and code decoding */\n\t\t\t\t\t\tthis.extra = 0; /* extra bits needed */\n\n\t\t\t\t\t\t/* fixed and dynamic code tables */\n\t\t\t\t\t\tthis.lencode =\n\t\t\t\t\t\t\tnull; /* starting table for length/literal codes */\n\t\t\t\t\t\tthis.distcode =\n\t\t\t\t\t\t\tnull; /* starting table for distance codes */\n\t\t\t\t\t\tthis.lenbits = 0; /* index bits for lencode */\n\t\t\t\t\t\tthis.distbits = 0; /* index bits for distcode */\n\n\t\t\t\t\t\t/* dynamic table building */\n\t\t\t\t\t\tthis.ncode = 0; /* number of code length code lengths */\n\t\t\t\t\t\tthis.nlen = 0; /* number of length code lengths */\n\t\t\t\t\t\tthis.ndist = 0; /* number of distance code lengths */\n\t\t\t\t\t\tthis.have = 0; /* number of code lengths in lens[] */\n\t\t\t\t\t\tthis.next = null; /* next available space in codes[] */\n\n\t\t\t\t\t\tthis.lens = new utils.Buf16(\n\t\t\t\t\t\t\t320\n\t\t\t\t\t\t); /* temporary storage for code lengths */\n\t\t\t\t\t\tthis.work = new utils.Buf16(\n\t\t\t\t\t\t\t288\n\t\t\t\t\t\t); /* work area for code table building */\n\n\t\t\t\t\t\t/*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n\t\t\t\t\t\t//this.codes = new utils.Buf32(ENOUGH); /* space for code tables */\n\t\t\t\t\t\tthis.lendyn =\n\t\t\t\t\t\t\tnull; /* dynamic table for length/literal codes (JS specific) */\n\t\t\t\t\t\tthis.distdyn =\n\t\t\t\t\t\t\tnull; /* dynamic table for distance codes (JS specific) */\n\t\t\t\t\t\tthis.sane = 0; /* if false, allow invalid distance too far */\n\t\t\t\t\t\tthis.back = 0; /* bits back of last unprocessed length/lit */\n\t\t\t\t\t\tthis.was = 0; /* initial length of match */\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction inflateResetKeep( strm ) {\n\t\t\t\t\t\tvar state;\n\n\t\t\t\t\t\tif ( ! strm || ! strm.state ) {\n\t\t\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate = strm.state;\n\t\t\t\t\t\tstrm.total_in = strm.total_out = state.total = 0;\n\t\t\t\t\t\tstrm.msg = ''; /*Z_NULL*/\n\t\t\t\t\t\tif ( state.wrap ) {\n\t\t\t\t\t\t\t/* to support ill-conceived Java test suite */\n\t\t\t\t\t\t\tstrm.adler = state.wrap & 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.mode = HEAD;\n\t\t\t\t\t\tstate.last = 0;\n\t\t\t\t\t\tstate.havedict = 0;\n\t\t\t\t\t\tstate.dmax = 32768;\n\t\t\t\t\t\tstate.head = null /*Z_NULL*/;\n\t\t\t\t\t\tstate.hold = 0;\n\t\t\t\t\t\tstate.bits = 0;\n\t\t\t\t\t\t//state.lencode = state.distcode = state.next = state.codes;\n\t\t\t\t\t\tstate.lencode = state.lendyn = new utils.Buf32(\n\t\t\t\t\t\t\tENOUGH_LENS\n\t\t\t\t\t\t);\n\t\t\t\t\t\tstate.distcode = state.distdyn = new utils.Buf32(\n\t\t\t\t\t\t\tENOUGH_DISTS\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tstate.sane = 1;\n\t\t\t\t\t\tstate.back = -1;\n\t\t\t\t\t\t//Tracev((stderr, \"inflate: reset\\n\"));\n\t\t\t\t\t\treturn Z_OK;\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction inflateReset( strm ) {\n\t\t\t\t\t\tvar state;\n\n\t\t\t\t\t\tif ( ! strm || ! strm.state ) {\n\t\t\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate = strm.state;\n\t\t\t\t\t\tstate.wsize = 0;\n\t\t\t\t\t\tstate.whave = 0;\n\t\t\t\t\t\tstate.wnext = 0;\n\t\t\t\t\t\treturn inflateResetKeep( strm );\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction inflateReset2( strm, windowBits ) {\n\t\t\t\t\t\tvar wrap;\n\t\t\t\t\t\tvar state;\n\n\t\t\t\t\t\t/* get the state */\n\t\t\t\t\t\tif ( ! strm || ! strm.state ) {\n\t\t\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate = strm.state;\n\n\t\t\t\t\t\t/* extract wrap request from windowBits parameter */\n\t\t\t\t\t\tif ( windowBits < 0 ) {\n\t\t\t\t\t\t\twrap = 0;\n\t\t\t\t\t\t\twindowBits = -windowBits;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twrap = ( windowBits >> 4 ) + 1;\n\t\t\t\t\t\t\tif ( windowBits < 48 ) {\n\t\t\t\t\t\t\t\twindowBits &= 15;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* set number of window bits, free window if different */\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\twindowBits &&\n\t\t\t\t\t\t\t( windowBits < 8 || windowBits > 15 )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tstate.window !== null &&\n\t\t\t\t\t\t\tstate.wbits !== windowBits\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tstate.window = null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* update state and reset the rest of it */\n\t\t\t\t\t\tstate.wrap = wrap;\n\t\t\t\t\t\tstate.wbits = windowBits;\n\t\t\t\t\t\treturn inflateReset( strm );\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction inflateInit2( strm, windowBits ) {\n\t\t\t\t\t\tvar ret;\n\t\t\t\t\t\tvar state;\n\n\t\t\t\t\t\tif ( ! strm ) {\n\t\t\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//strm.msg = Z_NULL; /* in case we return an error */\n\n\t\t\t\t\t\tstate = new InflateState();\n\n\t\t\t\t\t\t//if (state === Z_NULL) return Z_MEM_ERROR;\n\t\t\t\t\t\t//Tracev((stderr, \"inflate: allocated\\n\"));\n\t\t\t\t\t\tstrm.state = state;\n\t\t\t\t\t\tstate.window = null /*Z_NULL*/;\n\t\t\t\t\t\tret = inflateReset2( strm, windowBits );\n\t\t\t\t\t\tif ( ret !== Z_OK ) {\n\t\t\t\t\t\t\tstrm.state = null /*Z_NULL*/;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn ret;\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction inflateInit( strm ) {\n\t\t\t\t\t\treturn inflateInit2( strm, DEF_WBITS );\n\t\t\t\t\t}\n\n\t\t\t\t\t/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\n\t\t\t\t\tvar virgin = true;\n\n\t\t\t\t\tvar lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\n\t\t\t\t\tfunction fixedtables( state ) {\n\t\t\t\t\t\t/* build fixed huffman tables if first call (may not be thread safe) */\n\t\t\t\t\t\tif ( virgin ) {\n\t\t\t\t\t\t\tvar sym;\n\n\t\t\t\t\t\t\tlenfix = new utils.Buf32( 512 );\n\t\t\t\t\t\t\tdistfix = new utils.Buf32( 32 );\n\n\t\t\t\t\t\t\t/* literal/length table */\n\t\t\t\t\t\t\tsym = 0;\n\t\t\t\t\t\t\twhile ( sym < 144 ) {\n\t\t\t\t\t\t\t\tstate.lens[ sym++ ] = 8;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\twhile ( sym < 256 ) {\n\t\t\t\t\t\t\t\tstate.lens[ sym++ ] = 9;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\twhile ( sym < 280 ) {\n\t\t\t\t\t\t\t\tstate.lens[ sym++ ] = 7;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\twhile ( sym < 288 ) {\n\t\t\t\t\t\t\t\tstate.lens[ sym++ ] = 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tinflate_table(\n\t\t\t\t\t\t\t\tLENS,\n\t\t\t\t\t\t\t\tstate.lens,\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t288,\n\t\t\t\t\t\t\t\tlenfix,\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tstate.work,\n\t\t\t\t\t\t\t\t{ bits: 9 }\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t/* distance table */\n\t\t\t\t\t\t\tsym = 0;\n\t\t\t\t\t\t\twhile ( sym < 32 ) {\n\t\t\t\t\t\t\t\tstate.lens[ sym++ ] = 5;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tinflate_table(\n\t\t\t\t\t\t\t\tDISTS,\n\t\t\t\t\t\t\t\tstate.lens,\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t32,\n\t\t\t\t\t\t\t\tdistfix,\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tstate.work,\n\t\t\t\t\t\t\t\t{ bits: 5 }\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t/* do this just once */\n\t\t\t\t\t\t\tvirgin = false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstate.lencode = lenfix;\n\t\t\t\t\t\tstate.lenbits = 9;\n\t\t\t\t\t\tstate.distcode = distfix;\n\t\t\t\t\t\tstate.distbits = 5;\n\t\t\t\t\t}\n\n\t\t\t\t\t/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\n\t\t\t\t\tfunction updatewindow( strm, src, end, copy ) {\n\t\t\t\t\t\tvar dist;\n\t\t\t\t\t\tvar state = strm.state;\n\n\t\t\t\t\t\t/* if it hasn't been done already, allocate space for the window */\n\t\t\t\t\t\tif ( state.window === null ) {\n\t\t\t\t\t\t\tstate.wsize = 1 << state.wbits;\n\t\t\t\t\t\t\tstate.wnext = 0;\n\t\t\t\t\t\t\tstate.whave = 0;\n\n\t\t\t\t\t\t\tstate.window = new utils.Buf8( state.wsize );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* copy state->wsize or less output bytes into the circular window */\n\t\t\t\t\t\tif ( copy >= state.wsize ) {\n\t\t\t\t\t\t\tutils.arraySet(\n\t\t\t\t\t\t\t\tstate.window,\n\t\t\t\t\t\t\t\tsrc,\n\t\t\t\t\t\t\t\tend - state.wsize,\n\t\t\t\t\t\t\t\tstate.wsize,\n\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tstate.wnext = 0;\n\t\t\t\t\t\t\tstate.whave = state.wsize;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdist = state.wsize - state.wnext;\n\t\t\t\t\t\t\tif ( dist > copy ) {\n\t\t\t\t\t\t\t\tdist = copy;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//zmemcpy(state->window + state->wnext, end - copy, dist);\n\t\t\t\t\t\t\tutils.arraySet(\n\t\t\t\t\t\t\t\tstate.window,\n\t\t\t\t\t\t\t\tsrc,\n\t\t\t\t\t\t\t\tend - copy,\n\t\t\t\t\t\t\t\tdist,\n\t\t\t\t\t\t\t\tstate.wnext\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tcopy -= dist;\n\t\t\t\t\t\t\tif ( copy ) {\n\t\t\t\t\t\t\t\t//zmemcpy(state->window, end - copy, copy);\n\t\t\t\t\t\t\t\tutils.arraySet(\n\t\t\t\t\t\t\t\t\tstate.window,\n\t\t\t\t\t\t\t\t\tsrc,\n\t\t\t\t\t\t\t\t\tend - copy,\n\t\t\t\t\t\t\t\t\tcopy,\n\t\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tstate.wnext = copy;\n\t\t\t\t\t\t\t\tstate.whave = state.wsize;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tstate.wnext += dist;\n\t\t\t\t\t\t\t\tif ( state.wnext === state.wsize ) {\n\t\t\t\t\t\t\t\t\tstate.wnext = 0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( state.whave < state.wsize ) {\n\t\t\t\t\t\t\t\t\tstate.whave += dist;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction inflate( strm, flush ) {\n\t\t\t\t\t\tvar state;\n\t\t\t\t\t\tvar input, output; // input/output buffers\n\t\t\t\t\t\tvar next; /* next input INDEX */\n\t\t\t\t\t\tvar put; /* next output INDEX */\n\t\t\t\t\t\tvar have, left; /* available input and output */\n\t\t\t\t\t\tvar hold; /* bit buffer */\n\t\t\t\t\t\tvar bits; /* bits in bit buffer */\n\t\t\t\t\t\tvar _in,\n\t\t\t\t\t\t\t_out; /* save starting available input and output */\n\t\t\t\t\t\tvar copy; /* number of stored or match bytes to copy */\n\t\t\t\t\t\tvar from; /* where to copy match bytes from */\n\t\t\t\t\t\tvar from_source;\n\t\t\t\t\t\tvar here = 0; /* current decoding table entry */\n\t\t\t\t\t\tvar here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n\t\t\t\t\t\t//var last; /* parent table entry */\n\t\t\t\t\t\tvar last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n\t\t\t\t\t\tvar len; /* length to copy for repeats, bits to drop */\n\t\t\t\t\t\tvar ret; /* return code */\n\t\t\t\t\t\tvar hbuf = new utils.Buf8(\n\t\t\t\t\t\t\t4\n\t\t\t\t\t\t); /* buffer for gzip header crc calculation */\n\t\t\t\t\t\tvar opts;\n\n\t\t\t\t\t\tvar n; // temporary var for NEED_BITS\n\n\t\t\t\t\t\tvar order =\n\t\t\t\t\t\t\t/* permutation of code lengths */\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3,\n\t\t\t\t\t\t\t\t13, 2, 14, 1, 15,\n\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t! strm ||\n\t\t\t\t\t\t\t! strm.state ||\n\t\t\t\t\t\t\t! strm.output ||\n\t\t\t\t\t\t\t( ! strm.input && strm.avail_in !== 0 )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstate = strm.state;\n\t\t\t\t\t\tif ( state.mode === TYPE ) {\n\t\t\t\t\t\t\tstate.mode = TYPEDO;\n\t\t\t\t\t\t} /* skip check */\n\n\t\t\t\t\t\t//--- LOAD() ---\n\t\t\t\t\t\tput = strm.next_out;\n\t\t\t\t\t\toutput = strm.output;\n\t\t\t\t\t\tleft = strm.avail_out;\n\t\t\t\t\t\tnext = strm.next_in;\n\t\t\t\t\t\tinput = strm.input;\n\t\t\t\t\t\thave = strm.avail_in;\n\t\t\t\t\t\thold = state.hold;\n\t\t\t\t\t\tbits = state.bits;\n\t\t\t\t\t\t//---\n\n\t\t\t\t\t\t_in = have;\n\t\t\t\t\t\t_out = left;\n\t\t\t\t\t\tret = Z_OK;\n\n\t\t\t\t\t\t// goto emulation\n\t\t\t\t\t\tinf_leave: for (;;) {\n\t\t\t\t\t\t\tswitch ( state.mode ) {\n\t\t\t\t\t\t\t\tcase HEAD:\n\t\t\t\t\t\t\t\t\tif ( state.wrap === 0 ) {\n\t\t\t\t\t\t\t\t\t\tstate.mode = TYPEDO;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//=== NEEDBITS(16);\n\t\t\t\t\t\t\t\t\twhile ( bits < 16 ) {\n\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\thave--;\n\t\t\t\t\t\t\t\t\t\thold += input[ next++ ] << bits;\n\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\tif ( state.wrap & 2 && hold === 0x8b1f ) {\n\t\t\t\t\t\t\t\t\t\t/* gzip header */\n\t\t\t\t\t\t\t\t\t\tstate.check = 0 /*crc32(0L, Z_NULL, 0)*/;\n\t\t\t\t\t\t\t\t\t\t//=== CRC2(state.check, hold);\n\t\t\t\t\t\t\t\t\t\thbuf[ 0 ] = hold & 0xff;\n\t\t\t\t\t\t\t\t\t\thbuf[ 1 ] = ( hold >>> 8 ) & 0xff;\n\t\t\t\t\t\t\t\t\t\tstate.check = crc32(\n\t\t\t\t\t\t\t\t\t\t\tstate.check,\n\t\t\t\t\t\t\t\t\t\t\thbuf,\n\t\t\t\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t//===//\n\n\t\t\t\t\t\t\t\t\t\t//=== INITBITS();\n\t\t\t\t\t\t\t\t\t\thold = 0;\n\t\t\t\t\t\t\t\t\t\tbits = 0;\n\t\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\t\tstate.mode = FLAGS;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tstate.flags = 0; /* expect zlib header */\n\t\t\t\t\t\t\t\t\tif ( state.head ) {\n\t\t\t\t\t\t\t\t\t\tstate.head.done = false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t! (\n\t\t\t\t\t\t\t\t\t\t\tstate.wrap & 1\n\t\t\t\t\t\t\t\t\t\t) /* check if zlib header allowed */ ||\n\t\t\t\t\t\t\t\t\t\t( ( ( hold & 0xff ) /*BITS(8)*/ << 8 ) +\n\t\t\t\t\t\t\t\t\t\t\t( hold >> 8 ) ) %\n\t\t\t\t\t\t\t\t\t\t\t31\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\tstrm.msg = 'incorrect header check';\n\t\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t( hold & 0x0f ) /*BITS(4)*/ !==\n\t\t\t\t\t\t\t\t\t\tZ_DEFLATED\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\tstrm.msg = 'unknown compression method';\n\t\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//--- DROPBITS(4) ---//\n\t\t\t\t\t\t\t\t\thold >>>= 4;\n\t\t\t\t\t\t\t\t\tbits -= 4;\n\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\tlen = ( hold & 0x0f ) /*BITS(4)*/ + 8;\n\t\t\t\t\t\t\t\t\tif ( state.wbits === 0 ) {\n\t\t\t\t\t\t\t\t\t\tstate.wbits = len;\n\t\t\t\t\t\t\t\t\t} else if ( len > state.wbits ) {\n\t\t\t\t\t\t\t\t\t\tstrm.msg = 'invalid window size';\n\t\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tstate.dmax = 1 << len;\n\t\t\t\t\t\t\t\t\t//Tracev((stderr, \"inflate: zlib header ok\\n\"));\n\t\t\t\t\t\t\t\t\tstrm.adler =\n\t\t\t\t\t\t\t\t\t\tstate.check = 1 /*adler32(0L, Z_NULL, 0)*/;\n\t\t\t\t\t\t\t\t\tstate.mode = hold & 0x200 ? DICTID : TYPE;\n\t\t\t\t\t\t\t\t\t//=== INITBITS();\n\t\t\t\t\t\t\t\t\thold = 0;\n\t\t\t\t\t\t\t\t\tbits = 0;\n\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase FLAGS:\n\t\t\t\t\t\t\t\t\t//=== NEEDBITS(16); */\n\t\t\t\t\t\t\t\t\twhile ( bits < 16 ) {\n\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\thave--;\n\t\t\t\t\t\t\t\t\t\thold += input[ next++ ] << bits;\n\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\tstate.flags = hold;\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t( state.flags & 0xff ) !==\n\t\t\t\t\t\t\t\t\t\tZ_DEFLATED\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\tstrm.msg = 'unknown compression method';\n\t\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( state.flags & 0xe000 ) {\n\t\t\t\t\t\t\t\t\t\tstrm.msg = 'unknown header flags set';\n\t\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( state.head ) {\n\t\t\t\t\t\t\t\t\t\tstate.head.text = ( hold >> 8 ) & 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( state.flags & 0x0200 ) {\n\t\t\t\t\t\t\t\t\t\t//=== CRC2(state.check, hold);\n\t\t\t\t\t\t\t\t\t\thbuf[ 0 ] = hold & 0xff;\n\t\t\t\t\t\t\t\t\t\thbuf[ 1 ] = ( hold >>> 8 ) & 0xff;\n\t\t\t\t\t\t\t\t\t\tstate.check = crc32(\n\t\t\t\t\t\t\t\t\t\t\tstate.check,\n\t\t\t\t\t\t\t\t\t\t\thbuf,\n\t\t\t\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//=== INITBITS();\n\t\t\t\t\t\t\t\t\thold = 0;\n\t\t\t\t\t\t\t\t\tbits = 0;\n\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\tstate.mode = TIME;\n\t\t\t\t\t\t\t\t/* falls through */\n\t\t\t\t\t\t\t\tcase TIME:\n\t\t\t\t\t\t\t\t\t//=== NEEDBITS(32); */\n\t\t\t\t\t\t\t\t\twhile ( bits < 32 ) {\n\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\thave--;\n\t\t\t\t\t\t\t\t\t\thold += input[ next++ ] << bits;\n\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\tif ( state.head ) {\n\t\t\t\t\t\t\t\t\t\tstate.head.time = hold;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( state.flags & 0x0200 ) {\n\t\t\t\t\t\t\t\t\t\t//=== CRC4(state.check, hold)\n\t\t\t\t\t\t\t\t\t\thbuf[ 0 ] = hold & 0xff;\n\t\t\t\t\t\t\t\t\t\thbuf[ 1 ] = ( hold >>> 8 ) & 0xff;\n\t\t\t\t\t\t\t\t\t\thbuf[ 2 ] = ( hold >>> 16 ) & 0xff;\n\t\t\t\t\t\t\t\t\t\thbuf[ 3 ] = ( hold >>> 24 ) & 0xff;\n\t\t\t\t\t\t\t\t\t\tstate.check = crc32(\n\t\t\t\t\t\t\t\t\t\t\tstate.check,\n\t\t\t\t\t\t\t\t\t\t\thbuf,\n\t\t\t\t\t\t\t\t\t\t\t4,\n\t\t\t\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t//===\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//=== INITBITS();\n\t\t\t\t\t\t\t\t\thold = 0;\n\t\t\t\t\t\t\t\t\tbits = 0;\n\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\tstate.mode = OS;\n\t\t\t\t\t\t\t\t/* falls through */\n\t\t\t\t\t\t\t\tcase OS:\n\t\t\t\t\t\t\t\t\t//=== NEEDBITS(16); */\n\t\t\t\t\t\t\t\t\twhile ( bits < 16 ) {\n\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\thave--;\n\t\t\t\t\t\t\t\t\t\thold += input[ next++ ] << bits;\n\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\tif ( state.head ) {\n\t\t\t\t\t\t\t\t\t\tstate.head.xflags = hold & 0xff;\n\t\t\t\t\t\t\t\t\t\tstate.head.os = hold >> 8;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( state.flags & 0x0200 ) {\n\t\t\t\t\t\t\t\t\t\t//=== CRC2(state.check, hold);\n\t\t\t\t\t\t\t\t\t\thbuf[ 0 ] = hold & 0xff;\n\t\t\t\t\t\t\t\t\t\thbuf[ 1 ] = ( hold >>> 8 ) & 0xff;\n\t\t\t\t\t\t\t\t\t\tstate.check = crc32(\n\t\t\t\t\t\t\t\t\t\t\tstate.check,\n\t\t\t\t\t\t\t\t\t\t\thbuf,\n\t\t\t\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//=== INITBITS();\n\t\t\t\t\t\t\t\t\thold = 0;\n\t\t\t\t\t\t\t\t\tbits = 0;\n\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\tstate.mode = EXLEN;\n\t\t\t\t\t\t\t\t/* falls through */\n\t\t\t\t\t\t\t\tcase EXLEN:\n\t\t\t\t\t\t\t\t\tif ( state.flags & 0x0400 ) {\n\t\t\t\t\t\t\t\t\t\t//=== NEEDBITS(16); */\n\t\t\t\t\t\t\t\t\t\twhile ( bits < 16 ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\thave--;\n\t\t\t\t\t\t\t\t\t\t\thold += input[ next++ ] << bits;\n\t\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\t\tstate.length = hold;\n\t\t\t\t\t\t\t\t\t\tif ( state.head ) {\n\t\t\t\t\t\t\t\t\t\t\tstate.head.extra_len = hold;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( state.flags & 0x0200 ) {\n\t\t\t\t\t\t\t\t\t\t\t//=== CRC2(state.check, hold);\n\t\t\t\t\t\t\t\t\t\t\thbuf[ 0 ] = hold & 0xff;\n\t\t\t\t\t\t\t\t\t\t\thbuf[ 1 ] = ( hold >>> 8 ) & 0xff;\n\t\t\t\t\t\t\t\t\t\t\tstate.check = crc32(\n\t\t\t\t\t\t\t\t\t\t\t\tstate.check,\n\t\t\t\t\t\t\t\t\t\t\t\thbuf,\n\t\t\t\t\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//=== INITBITS();\n\t\t\t\t\t\t\t\t\t\thold = 0;\n\t\t\t\t\t\t\t\t\t\tbits = 0;\n\t\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\t} else if ( state.head ) {\n\t\t\t\t\t\t\t\t\t\tstate.head.extra = null /*Z_NULL*/;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tstate.mode = EXTRA;\n\t\t\t\t\t\t\t\t/* falls through */\n\t\t\t\t\t\t\t\tcase EXTRA:\n\t\t\t\t\t\t\t\t\tif ( state.flags & 0x0400 ) {\n\t\t\t\t\t\t\t\t\t\tcopy = state.length;\n\t\t\t\t\t\t\t\t\t\tif ( copy > have ) {\n\t\t\t\t\t\t\t\t\t\t\tcopy = have;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( copy ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( state.head ) {\n\t\t\t\t\t\t\t\t\t\t\t\tlen =\n\t\t\t\t\t\t\t\t\t\t\t\t\tstate.head.extra_len -\n\t\t\t\t\t\t\t\t\t\t\t\t\tstate.length;\n\t\t\t\t\t\t\t\t\t\t\t\tif ( ! state.head.extra ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Use untyped array for more convenient processing later\n\t\t\t\t\t\t\t\t\t\t\t\t\tstate.head.extra =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew Array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstate.head.extra_len\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tutils.arraySet(\n\t\t\t\t\t\t\t\t\t\t\t\t\tstate.head.extra,\n\t\t\t\t\t\t\t\t\t\t\t\t\tinput,\n\t\t\t\t\t\t\t\t\t\t\t\t\tnext,\n\t\t\t\t\t\t\t\t\t\t\t\t\t// extra field is limited to 65536 bytes\n\t\t\t\t\t\t\t\t\t\t\t\t\t// - no need for additional size check\n\t\t\t\t\t\t\t\t\t\t\t\t\tcopy,\n\t\t\t\t\t\t\t\t\t\t\t\t\t/*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n\t\t\t\t\t\t\t\t\t\t\t\t\tlen\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t//zmemcpy(state.head.extra + len, next,\n\t\t\t\t\t\t\t\t\t\t\t\t// len + copy > state.head.extra_max ?\n\t\t\t\t\t\t\t\t\t\t\t\t// state.head.extra_max - len : copy);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif ( state.flags & 0x0200 ) {\n\t\t\t\t\t\t\t\t\t\t\t\tstate.check = crc32(\n\t\t\t\t\t\t\t\t\t\t\t\t\tstate.check,\n\t\t\t\t\t\t\t\t\t\t\t\t\tinput,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcopy,\n\t\t\t\t\t\t\t\t\t\t\t\t\tnext\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\thave -= copy;\n\t\t\t\t\t\t\t\t\t\t\tnext += copy;\n\t\t\t\t\t\t\t\t\t\t\tstate.length -= copy;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( state.length ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tstate.length = 0;\n\t\t\t\t\t\t\t\t\tstate.mode = NAME;\n\t\t\t\t\t\t\t\t/* falls through */\n\t\t\t\t\t\t\t\tcase NAME:\n\t\t\t\t\t\t\t\t\tif ( state.flags & 0x0800 ) {\n\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tcopy = 0;\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\t// TODO: 2 or 1 bytes?\n\t\t\t\t\t\t\t\t\t\t\tlen = input[ next + copy++ ];\n\t\t\t\t\t\t\t\t\t\t\t/* use constant limit because in js we should not preallocate memory */\n\t\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t\tstate.head &&\n\t\t\t\t\t\t\t\t\t\t\t\tlen &&\n\t\t\t\t\t\t\t\t\t\t\t\tstate.length <\n\t\t\t\t\t\t\t\t\t\t\t\t\t65536 /*state.head.name_max*/\n\t\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t\tstate.head.name +=\n\t\t\t\t\t\t\t\t\t\t\t\t\tString.fromCharCode( len );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} while ( len && copy < have );\n\n\t\t\t\t\t\t\t\t\t\tif ( state.flags & 0x0200 ) {\n\t\t\t\t\t\t\t\t\t\t\tstate.check = crc32(\n\t\t\t\t\t\t\t\t\t\t\t\tstate.check,\n\t\t\t\t\t\t\t\t\t\t\t\tinput,\n\t\t\t\t\t\t\t\t\t\t\t\tcopy,\n\t\t\t\t\t\t\t\t\t\t\t\tnext\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\thave -= copy;\n\t\t\t\t\t\t\t\t\t\tnext += copy;\n\t\t\t\t\t\t\t\t\t\tif ( len ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else if ( state.head ) {\n\t\t\t\t\t\t\t\t\t\tstate.head.name = null;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tstate.length = 0;\n\t\t\t\t\t\t\t\t\tstate.mode = COMMENT;\n\t\t\t\t\t\t\t\t/* falls through */\n\t\t\t\t\t\t\t\tcase COMMENT:\n\t\t\t\t\t\t\t\t\tif ( state.flags & 0x1000 ) {\n\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tcopy = 0;\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\tlen = input[ next + copy++ ];\n\t\t\t\t\t\t\t\t\t\t\t/* use constant limit because in js we should not preallocate memory */\n\t\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t\tstate.head &&\n\t\t\t\t\t\t\t\t\t\t\t\tlen &&\n\t\t\t\t\t\t\t\t\t\t\t\tstate.length <\n\t\t\t\t\t\t\t\t\t\t\t\t\t65536 /*state.head.comm_max*/\n\t\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t\tstate.head.comment +=\n\t\t\t\t\t\t\t\t\t\t\t\t\tString.fromCharCode( len );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} while ( len && copy < have );\n\t\t\t\t\t\t\t\t\t\tif ( state.flags & 0x0200 ) {\n\t\t\t\t\t\t\t\t\t\t\tstate.check = crc32(\n\t\t\t\t\t\t\t\t\t\t\t\tstate.check,\n\t\t\t\t\t\t\t\t\t\t\t\tinput,\n\t\t\t\t\t\t\t\t\t\t\t\tcopy,\n\t\t\t\t\t\t\t\t\t\t\t\tnext\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\thave -= copy;\n\t\t\t\t\t\t\t\t\t\tnext += copy;\n\t\t\t\t\t\t\t\t\t\tif ( len ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else if ( state.head ) {\n\t\t\t\t\t\t\t\t\t\tstate.head.comment = null;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tstate.mode = HCRC;\n\t\t\t\t\t\t\t\t/* falls through */\n\t\t\t\t\t\t\t\tcase HCRC:\n\t\t\t\t\t\t\t\t\tif ( state.flags & 0x0200 ) {\n\t\t\t\t\t\t\t\t\t\t//=== NEEDBITS(16); */\n\t\t\t\t\t\t\t\t\t\twhile ( bits < 16 ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\thave--;\n\t\t\t\t\t\t\t\t\t\t\thold += input[ next++ ] << bits;\n\t\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\thold !==\n\t\t\t\t\t\t\t\t\t\t\t( state.check & 0xffff )\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\tstrm.msg = 'header crc mismatch';\n\t\t\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//=== INITBITS();\n\t\t\t\t\t\t\t\t\t\thold = 0;\n\t\t\t\t\t\t\t\t\t\tbits = 0;\n\t\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( state.head ) {\n\t\t\t\t\t\t\t\t\t\tstate.head.hcrc =\n\t\t\t\t\t\t\t\t\t\t\t( state.flags >> 9 ) & 1;\n\t\t\t\t\t\t\t\t\t\tstate.head.done = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tstrm.adler = state.check = 0;\n\t\t\t\t\t\t\t\t\tstate.mode = TYPE;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase DICTID:\n\t\t\t\t\t\t\t\t\t//=== NEEDBITS(32); */\n\t\t\t\t\t\t\t\t\twhile ( bits < 32 ) {\n\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\thave--;\n\t\t\t\t\t\t\t\t\t\thold += input[ next++ ] << bits;\n\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\tstrm.adler = state.check = zswap32( hold );\n\t\t\t\t\t\t\t\t\t//=== INITBITS();\n\t\t\t\t\t\t\t\t\thold = 0;\n\t\t\t\t\t\t\t\t\tbits = 0;\n\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\tstate.mode = DICT;\n\t\t\t\t\t\t\t\t/* falls through */\n\t\t\t\t\t\t\t\tcase DICT:\n\t\t\t\t\t\t\t\t\tif ( state.havedict === 0 ) {\n\t\t\t\t\t\t\t\t\t\t//--- RESTORE() ---\n\t\t\t\t\t\t\t\t\t\tstrm.next_out = put;\n\t\t\t\t\t\t\t\t\t\tstrm.avail_out = left;\n\t\t\t\t\t\t\t\t\t\tstrm.next_in = next;\n\t\t\t\t\t\t\t\t\t\tstrm.avail_in = have;\n\t\t\t\t\t\t\t\t\t\tstate.hold = hold;\n\t\t\t\t\t\t\t\t\t\tstate.bits = bits;\n\t\t\t\t\t\t\t\t\t\t//---\n\t\t\t\t\t\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tstrm.adler =\n\t\t\t\t\t\t\t\t\t\tstate.check = 1 /*adler32(0L, Z_NULL, 0)*/;\n\t\t\t\t\t\t\t\t\tstate.mode = TYPE;\n\t\t\t\t\t\t\t\t/* falls through */\n\t\t\t\t\t\t\t\tcase TYPE:\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\tflush === Z_BLOCK ||\n\t\t\t\t\t\t\t\t\t\tflush === Z_TREES\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/* falls through */\n\t\t\t\t\t\t\t\tcase TYPEDO:\n\t\t\t\t\t\t\t\t\tif ( state.last ) {\n\t\t\t\t\t\t\t\t\t\t//--- BYTEBITS() ---//\n\t\t\t\t\t\t\t\t\t\thold >>>= bits & 7;\n\t\t\t\t\t\t\t\t\t\tbits -= bits & 7;\n\t\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\t\tstate.mode = CHECK;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//=== NEEDBITS(3); */\n\t\t\t\t\t\t\t\t\twhile ( bits < 3 ) {\n\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\thave--;\n\t\t\t\t\t\t\t\t\t\thold += input[ next++ ] << bits;\n\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\tstate.last = hold & 0x01 /*BITS(1)*/;\n\t\t\t\t\t\t\t\t\t//--- DROPBITS(1) ---//\n\t\t\t\t\t\t\t\t\thold >>>= 1;\n\t\t\t\t\t\t\t\t\tbits -= 1;\n\t\t\t\t\t\t\t\t\t//---//\n\n\t\t\t\t\t\t\t\t\tswitch ( hold & 0x03 /*BITS(2)*/ ) {\n\t\t\t\t\t\t\t\t\t\tcase 0 /* stored block */:\n\t\t\t\t\t\t\t\t\t\t\t//Tracev((stderr, \"inflate: stored block%s\\n\",\n\t\t\t\t\t\t\t\t\t\t\t// state.last ? \" (last)\" : \"\"));\n\t\t\t\t\t\t\t\t\t\t\tstate.mode = STORED;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 1 /* fixed block */:\n\t\t\t\t\t\t\t\t\t\t\tfixedtables( state );\n\t\t\t\t\t\t\t\t\t\t\t//Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n\t\t\t\t\t\t\t\t\t\t\t// state.last ? \" (last)\" : \"\"));\n\t\t\t\t\t\t\t\t\t\t\tstate.mode =\n\t\t\t\t\t\t\t\t\t\t\t\tLEN_; /* decode codes */\n\t\t\t\t\t\t\t\t\t\t\tif ( flush === Z_TREES ) {\n\t\t\t\t\t\t\t\t\t\t\t\t//--- DROPBITS(2) ---//\n\t\t\t\t\t\t\t\t\t\t\t\thold >>>= 2;\n\t\t\t\t\t\t\t\t\t\t\t\tbits -= 2;\n\t\t\t\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 2 /* dynamic block */:\n\t\t\t\t\t\t\t\t\t\t\t//Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n\t\t\t\t\t\t\t\t\t\t\t// state.last ? \" (last)\" : \"\"));\n\t\t\t\t\t\t\t\t\t\t\tstate.mode = TABLE;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\t\t\t\tstrm.msg = 'invalid block type';\n\t\t\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//--- DROPBITS(2) ---//\n\t\t\t\t\t\t\t\t\thold >>>= 2;\n\t\t\t\t\t\t\t\t\tbits -= 2;\n\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase STORED:\n\t\t\t\t\t\t\t\t\t//--- BYTEBITS() ---// /* go to byte boundary */\n\t\t\t\t\t\t\t\t\thold >>>= bits & 7;\n\t\t\t\t\t\t\t\t\tbits -= bits & 7;\n\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\t//=== NEEDBITS(32); */\n\t\t\t\t\t\t\t\t\twhile ( bits < 32 ) {\n\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\thave--;\n\t\t\t\t\t\t\t\t\t\thold += input[ next++ ] << bits;\n\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t( hold & 0xffff ) !==\n\t\t\t\t\t\t\t\t\t\t( ( hold >>> 16 ) ^ 0xffff )\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\tstrm.msg =\n\t\t\t\t\t\t\t\t\t\t\t'invalid stored block lengths';\n\t\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tstate.length = hold & 0xffff;\n\t\t\t\t\t\t\t\t\t//Tracev((stderr, \"inflate: stored length %u\\n\",\n\t\t\t\t\t\t\t\t\t// state.length));\n\t\t\t\t\t\t\t\t\t//=== INITBITS();\n\t\t\t\t\t\t\t\t\thold = 0;\n\t\t\t\t\t\t\t\t\tbits = 0;\n\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\tstate.mode = COPY_;\n\t\t\t\t\t\t\t\t\tif ( flush === Z_TREES ) {\n\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/* falls through */\n\t\t\t\t\t\t\t\tcase COPY_:\n\t\t\t\t\t\t\t\t\tstate.mode = COPY;\n\t\t\t\t\t\t\t\t/* falls through */\n\t\t\t\t\t\t\t\tcase COPY:\n\t\t\t\t\t\t\t\t\tcopy = state.length;\n\t\t\t\t\t\t\t\t\tif ( copy ) {\n\t\t\t\t\t\t\t\t\t\tif ( copy > have ) {\n\t\t\t\t\t\t\t\t\t\t\tcopy = have;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( copy > left ) {\n\t\t\t\t\t\t\t\t\t\t\tcopy = left;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( copy === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//--- zmemcpy(put, next, copy); ---\n\t\t\t\t\t\t\t\t\t\tutils.arraySet(\n\t\t\t\t\t\t\t\t\t\t\toutput,\n\t\t\t\t\t\t\t\t\t\t\tinput,\n\t\t\t\t\t\t\t\t\t\t\tnext,\n\t\t\t\t\t\t\t\t\t\t\tcopy,\n\t\t\t\t\t\t\t\t\t\t\tput\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\t\thave -= copy;\n\t\t\t\t\t\t\t\t\t\tnext += copy;\n\t\t\t\t\t\t\t\t\t\tleft -= copy;\n\t\t\t\t\t\t\t\t\t\tput += copy;\n\t\t\t\t\t\t\t\t\t\tstate.length -= copy;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//Tracev((stderr, \"inflate: stored end\\n\"));\n\t\t\t\t\t\t\t\t\tstate.mode = TYPE;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase TABLE:\n\t\t\t\t\t\t\t\t\t//=== NEEDBITS(14); */\n\t\t\t\t\t\t\t\t\twhile ( bits < 14 ) {\n\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\thave--;\n\t\t\t\t\t\t\t\t\t\thold += input[ next++ ] << bits;\n\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\tstate.nlen =\n\t\t\t\t\t\t\t\t\t\t( hold & 0x1f ) /*BITS(5)*/ + 257;\n\t\t\t\t\t\t\t\t\t//--- DROPBITS(5) ---//\n\t\t\t\t\t\t\t\t\thold >>>= 5;\n\t\t\t\t\t\t\t\t\tbits -= 5;\n\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\tstate.ndist =\n\t\t\t\t\t\t\t\t\t\t( hold & 0x1f ) /*BITS(5)*/ + 1;\n\t\t\t\t\t\t\t\t\t//--- DROPBITS(5) ---//\n\t\t\t\t\t\t\t\t\thold >>>= 5;\n\t\t\t\t\t\t\t\t\tbits -= 5;\n\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\tstate.ncode =\n\t\t\t\t\t\t\t\t\t\t( hold & 0x0f ) /*BITS(4)*/ + 4;\n\t\t\t\t\t\t\t\t\t//--- DROPBITS(4) ---//\n\t\t\t\t\t\t\t\t\thold >>>= 4;\n\t\t\t\t\t\t\t\t\tbits -= 4;\n\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\t//#ifndef PKZIP_BUG_WORKAROUND\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\tstate.nlen > 286 ||\n\t\t\t\t\t\t\t\t\t\tstate.ndist > 30\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\tstrm.msg =\n\t\t\t\t\t\t\t\t\t\t\t'too many length or distance symbols';\n\t\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//#endif\n\t\t\t\t\t\t\t\t\t//Tracev((stderr, \"inflate: table sizes ok\\n\"));\n\t\t\t\t\t\t\t\t\tstate.have = 0;\n\t\t\t\t\t\t\t\t\tstate.mode = LENLENS;\n\t\t\t\t\t\t\t\t/* falls through */\n\t\t\t\t\t\t\t\tcase LENLENS:\n\t\t\t\t\t\t\t\t\twhile ( state.have < state.ncode ) {\n\t\t\t\t\t\t\t\t\t\t//=== NEEDBITS(3);\n\t\t\t\t\t\t\t\t\t\twhile ( bits < 3 ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\thave--;\n\t\t\t\t\t\t\t\t\t\t\thold += input[ next++ ] << bits;\n\t\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\t\tstate.lens[ order[ state.have++ ] ] =\n\t\t\t\t\t\t\t\t\t\t\thold & 0x07; //BITS(3);\n\t\t\t\t\t\t\t\t\t\t//--- DROPBITS(3) ---//\n\t\t\t\t\t\t\t\t\t\thold >>>= 3;\n\t\t\t\t\t\t\t\t\t\tbits -= 3;\n\t\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\twhile ( state.have < 19 ) {\n\t\t\t\t\t\t\t\t\t\tstate.lens[ order[ state.have++ ] ] = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// We have separate tables & no pointers. 2 commented lines below not needed.\n\t\t\t\t\t\t\t\t\t//state.next = state.codes;\n\t\t\t\t\t\t\t\t\t//state.lencode = state.next;\n\t\t\t\t\t\t\t\t\t// Switch to use dynamic table\n\t\t\t\t\t\t\t\t\tstate.lencode = state.lendyn;\n\t\t\t\t\t\t\t\t\tstate.lenbits = 7;\n\n\t\t\t\t\t\t\t\t\topts = { bits: state.lenbits };\n\t\t\t\t\t\t\t\t\tret = inflate_table(\n\t\t\t\t\t\t\t\t\t\tCODES,\n\t\t\t\t\t\t\t\t\t\tstate.lens,\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t19,\n\t\t\t\t\t\t\t\t\t\tstate.lencode,\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\tstate.work,\n\t\t\t\t\t\t\t\t\t\topts\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tstate.lenbits = opts.bits;\n\n\t\t\t\t\t\t\t\t\tif ( ret ) {\n\t\t\t\t\t\t\t\t\t\tstrm.msg = 'invalid code lengths set';\n\t\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//Tracev((stderr, \"inflate: code lengths ok\\n\"));\n\t\t\t\t\t\t\t\t\tstate.have = 0;\n\t\t\t\t\t\t\t\t\tstate.mode = CODELENS;\n\t\t\t\t\t\t\t\t/* falls through */\n\t\t\t\t\t\t\t\tcase CODELENS:\n\t\t\t\t\t\t\t\t\twhile (\n\t\t\t\t\t\t\t\t\t\tstate.have <\n\t\t\t\t\t\t\t\t\t\tstate.nlen + state.ndist\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\tfor (;;) {\n\t\t\t\t\t\t\t\t\t\t\there =\n\t\t\t\t\t\t\t\t\t\t\t\tstate.lencode[\n\t\t\t\t\t\t\t\t\t\t\t\t\thold &\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t( ( 1 <<\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstate.lenbits ) -\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t1 )\n\t\t\t\t\t\t\t\t\t\t\t\t]; /*BITS(state.lenbits)*/\n\t\t\t\t\t\t\t\t\t\t\there_bits = here >>> 24;\n\t\t\t\t\t\t\t\t\t\t\there_op = ( here >>> 16 ) & 0xff;\n\t\t\t\t\t\t\t\t\t\t\there_val = here & 0xffff;\n\n\t\t\t\t\t\t\t\t\t\t\tif ( here_bits <= bits ) {\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t//--- PULLBYTE() ---//\n\t\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\thave--;\n\t\t\t\t\t\t\t\t\t\t\thold += input[ next++ ] << bits;\n\t\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( here_val < 16 ) {\n\t\t\t\t\t\t\t\t\t\t\t//--- DROPBITS(here.bits) ---//\n\t\t\t\t\t\t\t\t\t\t\thold >>>= here_bits;\n\t\t\t\t\t\t\t\t\t\t\tbits -= here_bits;\n\t\t\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\t\t\tstate.lens[ state.have++ ] =\n\t\t\t\t\t\t\t\t\t\t\t\there_val;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tif ( here_val === 16 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t//=== NEEDBITS(here.bits + 2);\n\t\t\t\t\t\t\t\t\t\t\t\tn = here_bits + 2;\n\t\t\t\t\t\t\t\t\t\t\t\twhile ( bits < n ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\thave--;\n\t\t\t\t\t\t\t\t\t\t\t\t\thold +=\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput[ next++ ] << bits;\n\t\t\t\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\t\t\t\t//--- DROPBITS(here.bits) ---//\n\t\t\t\t\t\t\t\t\t\t\t\thold >>>= here_bits;\n\t\t\t\t\t\t\t\t\t\t\t\tbits -= here_bits;\n\t\t\t\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\t\t\t\tif ( state.have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tstrm.msg =\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'invalid bit length repeat';\n\t\t\t\t\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tlen =\n\t\t\t\t\t\t\t\t\t\t\t\t\tstate.lens[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstate.have - 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t\t\t\tcopy = 3 + ( hold & 0x03 ); //BITS(2);\n\t\t\t\t\t\t\t\t\t\t\t\t//--- DROPBITS(2) ---//\n\t\t\t\t\t\t\t\t\t\t\t\thold >>>= 2;\n\t\t\t\t\t\t\t\t\t\t\t\tbits -= 2;\n\t\t\t\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\t\t\t} else if ( here_val === 17 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t//=== NEEDBITS(here.bits + 3);\n\t\t\t\t\t\t\t\t\t\t\t\tn = here_bits + 3;\n\t\t\t\t\t\t\t\t\t\t\t\twhile ( bits < n ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\thave--;\n\t\t\t\t\t\t\t\t\t\t\t\t\thold +=\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput[ next++ ] << bits;\n\t\t\t\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\t\t\t\t//--- DROPBITS(here.bits) ---//\n\t\t\t\t\t\t\t\t\t\t\t\thold >>>= here_bits;\n\t\t\t\t\t\t\t\t\t\t\t\tbits -= here_bits;\n\t\t\t\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\t\t\t\tlen = 0;\n\t\t\t\t\t\t\t\t\t\t\t\tcopy = 3 + ( hold & 0x07 ); //BITS(3);\n\t\t\t\t\t\t\t\t\t\t\t\t//--- DROPBITS(3) ---//\n\t\t\t\t\t\t\t\t\t\t\t\thold >>>= 3;\n\t\t\t\t\t\t\t\t\t\t\t\tbits -= 3;\n\t\t\t\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t//=== NEEDBITS(here.bits + 7);\n\t\t\t\t\t\t\t\t\t\t\t\tn = here_bits + 7;\n\t\t\t\t\t\t\t\t\t\t\t\twhile ( bits < n ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\thave--;\n\t\t\t\t\t\t\t\t\t\t\t\t\thold +=\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput[ next++ ] << bits;\n\t\t\t\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\t\t\t\t//--- DROPBITS(here.bits) ---//\n\t\t\t\t\t\t\t\t\t\t\t\thold >>>= here_bits;\n\t\t\t\t\t\t\t\t\t\t\t\tbits -= here_bits;\n\t\t\t\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\t\t\t\tlen = 0;\n\t\t\t\t\t\t\t\t\t\t\t\tcopy = 11 + ( hold & 0x7f ); //BITS(7);\n\t\t\t\t\t\t\t\t\t\t\t\t//--- DROPBITS(7) ---//\n\t\t\t\t\t\t\t\t\t\t\t\thold >>>= 7;\n\t\t\t\t\t\t\t\t\t\t\t\tbits -= 7;\n\t\t\t\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t\tstate.have + copy >\n\t\t\t\t\t\t\t\t\t\t\t\tstate.nlen + state.ndist\n\t\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t\tstrm.msg =\n\t\t\t\t\t\t\t\t\t\t\t\t\t'invalid bit length repeat';\n\t\t\t\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\twhile ( copy-- ) {\n\t\t\t\t\t\t\t\t\t\t\t\tstate.lens[ state.have++ ] =\n\t\t\t\t\t\t\t\t\t\t\t\t\tlen;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t/* handle error breaks in while */\n\t\t\t\t\t\t\t\t\tif ( state.mode === BAD ) {\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t/* check for end-of-block code (better have one) */\n\t\t\t\t\t\t\t\t\tif ( state.lens[ 256 ] === 0 ) {\n\t\t\t\t\t\t\t\t\t\tstrm.msg =\n\t\t\t\t\t\t\t\t\t\t\t'invalid code -- missing end-of-block';\n\t\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t/* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n\t\t\t\t\t\t\t\t\tstate.lenbits = 9;\n\n\t\t\t\t\t\t\t\t\topts = { bits: state.lenbits };\n\t\t\t\t\t\t\t\t\tret = inflate_table(\n\t\t\t\t\t\t\t\t\t\tLENS,\n\t\t\t\t\t\t\t\t\t\tstate.lens,\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\tstate.nlen,\n\t\t\t\t\t\t\t\t\t\tstate.lencode,\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\tstate.work,\n\t\t\t\t\t\t\t\t\t\topts\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t// We have separate tables & no pointers. 2 commented lines below not needed.\n\t\t\t\t\t\t\t\t\t// state.next_index = opts.table_index;\n\t\t\t\t\t\t\t\t\tstate.lenbits = opts.bits;\n\t\t\t\t\t\t\t\t\t// state.lencode = state.next;\n\n\t\t\t\t\t\t\t\t\tif ( ret ) {\n\t\t\t\t\t\t\t\t\t\tstrm.msg =\n\t\t\t\t\t\t\t\t\t\t\t'invalid literal/lengths set';\n\t\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tstate.distbits = 6;\n\t\t\t\t\t\t\t\t\t//state.distcode.copy(state.codes);\n\t\t\t\t\t\t\t\t\t// Switch to use dynamic table\n\t\t\t\t\t\t\t\t\tstate.distcode = state.distdyn;\n\t\t\t\t\t\t\t\t\topts = { bits: state.distbits };\n\t\t\t\t\t\t\t\t\tret = inflate_table(\n\t\t\t\t\t\t\t\t\t\tDISTS,\n\t\t\t\t\t\t\t\t\t\tstate.lens,\n\t\t\t\t\t\t\t\t\t\tstate.nlen,\n\t\t\t\t\t\t\t\t\t\tstate.ndist,\n\t\t\t\t\t\t\t\t\t\tstate.distcode,\n\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\tstate.work,\n\t\t\t\t\t\t\t\t\t\topts\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t// We have separate tables & no pointers. 2 commented lines below not needed.\n\t\t\t\t\t\t\t\t\t// state.next_index = opts.table_index;\n\t\t\t\t\t\t\t\t\tstate.distbits = opts.bits;\n\t\t\t\t\t\t\t\t\t// state.distcode = state.next;\n\n\t\t\t\t\t\t\t\t\tif ( ret ) {\n\t\t\t\t\t\t\t\t\t\tstrm.msg = 'invalid distances set';\n\t\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//Tracev((stderr, 'inflate: codes ok\\n'));\n\t\t\t\t\t\t\t\t\tstate.mode = LEN_;\n\t\t\t\t\t\t\t\t\tif ( flush === Z_TREES ) {\n\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/* falls through */\n\t\t\t\t\t\t\t\tcase LEN_:\n\t\t\t\t\t\t\t\t\tstate.mode = LEN;\n\t\t\t\t\t\t\t\t/* falls through */\n\t\t\t\t\t\t\t\tcase LEN:\n\t\t\t\t\t\t\t\t\tif ( have >= 6 && left >= 258 ) {\n\t\t\t\t\t\t\t\t\t\t//--- RESTORE() ---\n\t\t\t\t\t\t\t\t\t\tstrm.next_out = put;\n\t\t\t\t\t\t\t\t\t\tstrm.avail_out = left;\n\t\t\t\t\t\t\t\t\t\tstrm.next_in = next;\n\t\t\t\t\t\t\t\t\t\tstrm.avail_in = have;\n\t\t\t\t\t\t\t\t\t\tstate.hold = hold;\n\t\t\t\t\t\t\t\t\t\tstate.bits = bits;\n\t\t\t\t\t\t\t\t\t\t//---\n\t\t\t\t\t\t\t\t\t\tinflate_fast( strm, _out );\n\t\t\t\t\t\t\t\t\t\t//--- LOAD() ---\n\t\t\t\t\t\t\t\t\t\tput = strm.next_out;\n\t\t\t\t\t\t\t\t\t\toutput = strm.output;\n\t\t\t\t\t\t\t\t\t\tleft = strm.avail_out;\n\t\t\t\t\t\t\t\t\t\tnext = strm.next_in;\n\t\t\t\t\t\t\t\t\t\tinput = strm.input;\n\t\t\t\t\t\t\t\t\t\thave = strm.avail_in;\n\t\t\t\t\t\t\t\t\t\thold = state.hold;\n\t\t\t\t\t\t\t\t\t\tbits = state.bits;\n\t\t\t\t\t\t\t\t\t\t//---\n\n\t\t\t\t\t\t\t\t\t\tif ( state.mode === TYPE ) {\n\t\t\t\t\t\t\t\t\t\t\tstate.back = -1;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tstate.back = 0;\n\t\t\t\t\t\t\t\t\tfor (;;) {\n\t\t\t\t\t\t\t\t\t\there =\n\t\t\t\t\t\t\t\t\t\t\tstate.lencode[\n\t\t\t\t\t\t\t\t\t\t\t\thold &\n\t\t\t\t\t\t\t\t\t\t\t\t\t( ( 1 << state.lenbits ) -\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t1 )\n\t\t\t\t\t\t\t\t\t\t\t]; /*BITS(state.lenbits)*/\n\t\t\t\t\t\t\t\t\t\there_bits = here >>> 24;\n\t\t\t\t\t\t\t\t\t\there_op = ( here >>> 16 ) & 0xff;\n\t\t\t\t\t\t\t\t\t\there_val = here & 0xffff;\n\n\t\t\t\t\t\t\t\t\t\tif ( here_bits <= bits ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//--- PULLBYTE() ---//\n\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\thave--;\n\t\t\t\t\t\t\t\t\t\thold += input[ next++ ] << bits;\n\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( here_op && ( here_op & 0xf0 ) === 0 ) {\n\t\t\t\t\t\t\t\t\t\tlast_bits = here_bits;\n\t\t\t\t\t\t\t\t\t\tlast_op = here_op;\n\t\t\t\t\t\t\t\t\t\tlast_val = here_val;\n\t\t\t\t\t\t\t\t\t\tfor (;;) {\n\t\t\t\t\t\t\t\t\t\t\there =\n\t\t\t\t\t\t\t\t\t\t\t\tstate.lencode[\n\t\t\t\t\t\t\t\t\t\t\t\t\tlast_val +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t( ( hold &\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t( ( 1 <<\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t( last_bits +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlast_op ) ) -\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t1 ) ) /*BITS(last.bits + last.op)*/ >>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlast_bits )\n\t\t\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t\t\there_bits = here >>> 24;\n\t\t\t\t\t\t\t\t\t\t\there_op = ( here >>> 16 ) & 0xff;\n\t\t\t\t\t\t\t\t\t\t\there_val = here & 0xffff;\n\n\t\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t\tlast_bits + here_bits <=\n\t\t\t\t\t\t\t\t\t\t\t\tbits\n\t\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t//--- PULLBYTE() ---//\n\t\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\thave--;\n\t\t\t\t\t\t\t\t\t\t\thold += input[ next++ ] << bits;\n\t\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//--- DROPBITS(last.bits) ---//\n\t\t\t\t\t\t\t\t\t\thold >>>= last_bits;\n\t\t\t\t\t\t\t\t\t\tbits -= last_bits;\n\t\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\t\tstate.back += last_bits;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//--- DROPBITS(here.bits) ---//\n\t\t\t\t\t\t\t\t\thold >>>= here_bits;\n\t\t\t\t\t\t\t\t\tbits -= here_bits;\n\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\tstate.back += here_bits;\n\t\t\t\t\t\t\t\t\tstate.length = here_val;\n\t\t\t\t\t\t\t\t\tif ( here_op === 0 ) {\n\t\t\t\t\t\t\t\t\t\t//Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n\t\t\t\t\t\t\t\t\t\t// \"inflate: literal '%c'\\n\" :\n\t\t\t\t\t\t\t\t\t\t// \"inflate: literal 0x%02x\\n\", here.val));\n\t\t\t\t\t\t\t\t\t\tstate.mode = LIT;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( here_op & 32 ) {\n\t\t\t\t\t\t\t\t\t\t//Tracevv((stderr, \"inflate: end of block\\n\"));\n\t\t\t\t\t\t\t\t\t\tstate.back = -1;\n\t\t\t\t\t\t\t\t\t\tstate.mode = TYPE;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( here_op & 64 ) {\n\t\t\t\t\t\t\t\t\t\tstrm.msg =\n\t\t\t\t\t\t\t\t\t\t\t'invalid literal/length code';\n\t\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tstate.extra = here_op & 15;\n\t\t\t\t\t\t\t\t\tstate.mode = LENEXT;\n\t\t\t\t\t\t\t\t/* falls through */\n\t\t\t\t\t\t\t\tcase LENEXT:\n\t\t\t\t\t\t\t\t\tif ( state.extra ) {\n\t\t\t\t\t\t\t\t\t\t//=== NEEDBITS(state.extra);\n\t\t\t\t\t\t\t\t\t\tn = state.extra;\n\t\t\t\t\t\t\t\t\t\twhile ( bits < n ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\thave--;\n\t\t\t\t\t\t\t\t\t\t\thold += input[ next++ ] << bits;\n\t\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\t\tstate.length +=\n\t\t\t\t\t\t\t\t\t\t\thold &\n\t\t\t\t\t\t\t\t\t\t\t( ( 1 << state.extra ) -\n\t\t\t\t\t\t\t\t\t\t\t\t1 ) /*BITS(state.extra)*/;\n\t\t\t\t\t\t\t\t\t\t//--- DROPBITS(state.extra) ---//\n\t\t\t\t\t\t\t\t\t\thold >>>= state.extra;\n\t\t\t\t\t\t\t\t\t\tbits -= state.extra;\n\t\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\t\tstate.back += state.extra;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n\t\t\t\t\t\t\t\t\tstate.was = state.length;\n\t\t\t\t\t\t\t\t\tstate.mode = DIST;\n\t\t\t\t\t\t\t\t/* falls through */\n\t\t\t\t\t\t\t\tcase DIST:\n\t\t\t\t\t\t\t\t\tfor (;;) {\n\t\t\t\t\t\t\t\t\t\there =\n\t\t\t\t\t\t\t\t\t\t\tstate.distcode[\n\t\t\t\t\t\t\t\t\t\t\t\thold &\n\t\t\t\t\t\t\t\t\t\t\t\t\t( ( 1 << state.distbits ) -\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t1 )\n\t\t\t\t\t\t\t\t\t\t\t]; /*BITS(state.distbits)*/\n\t\t\t\t\t\t\t\t\t\there_bits = here >>> 24;\n\t\t\t\t\t\t\t\t\t\there_op = ( here >>> 16 ) & 0xff;\n\t\t\t\t\t\t\t\t\t\there_val = here & 0xffff;\n\n\t\t\t\t\t\t\t\t\t\tif ( here_bits <= bits ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//--- PULLBYTE() ---//\n\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\thave--;\n\t\t\t\t\t\t\t\t\t\thold += input[ next++ ] << bits;\n\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( ( here_op & 0xf0 ) === 0 ) {\n\t\t\t\t\t\t\t\t\t\tlast_bits = here_bits;\n\t\t\t\t\t\t\t\t\t\tlast_op = here_op;\n\t\t\t\t\t\t\t\t\t\tlast_val = here_val;\n\t\t\t\t\t\t\t\t\t\tfor (;;) {\n\t\t\t\t\t\t\t\t\t\t\there =\n\t\t\t\t\t\t\t\t\t\t\t\tstate.distcode[\n\t\t\t\t\t\t\t\t\t\t\t\t\tlast_val +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t( ( hold &\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t( ( 1 <<\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t( last_bits +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlast_op ) ) -\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t1 ) ) /*BITS(last.bits + last.op)*/ >>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlast_bits )\n\t\t\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t\t\there_bits = here >>> 24;\n\t\t\t\t\t\t\t\t\t\t\there_op = ( here >>> 16 ) & 0xff;\n\t\t\t\t\t\t\t\t\t\t\there_val = here & 0xffff;\n\n\t\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t\tlast_bits + here_bits <=\n\t\t\t\t\t\t\t\t\t\t\t\tbits\n\t\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t//--- PULLBYTE() ---//\n\t\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\thave--;\n\t\t\t\t\t\t\t\t\t\t\thold += input[ next++ ] << bits;\n\t\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//--- DROPBITS(last.bits) ---//\n\t\t\t\t\t\t\t\t\t\thold >>>= last_bits;\n\t\t\t\t\t\t\t\t\t\tbits -= last_bits;\n\t\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\t\tstate.back += last_bits;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//--- DROPBITS(here.bits) ---//\n\t\t\t\t\t\t\t\t\thold >>>= here_bits;\n\t\t\t\t\t\t\t\t\tbits -= here_bits;\n\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\tstate.back += here_bits;\n\t\t\t\t\t\t\t\t\tif ( here_op & 64 ) {\n\t\t\t\t\t\t\t\t\t\tstrm.msg = 'invalid distance code';\n\t\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tstate.offset = here_val;\n\t\t\t\t\t\t\t\t\tstate.extra = here_op & 15;\n\t\t\t\t\t\t\t\t\tstate.mode = DISTEXT;\n\t\t\t\t\t\t\t\t/* falls through */\n\t\t\t\t\t\t\t\tcase DISTEXT:\n\t\t\t\t\t\t\t\t\tif ( state.extra ) {\n\t\t\t\t\t\t\t\t\t\t//=== NEEDBITS(state.extra);\n\t\t\t\t\t\t\t\t\t\tn = state.extra;\n\t\t\t\t\t\t\t\t\t\twhile ( bits < n ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\thave--;\n\t\t\t\t\t\t\t\t\t\t\thold += input[ next++ ] << bits;\n\t\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\t\tstate.offset +=\n\t\t\t\t\t\t\t\t\t\t\thold &\n\t\t\t\t\t\t\t\t\t\t\t( ( 1 << state.extra ) -\n\t\t\t\t\t\t\t\t\t\t\t\t1 ) /*BITS(state.extra)*/;\n\t\t\t\t\t\t\t\t\t\t//--- DROPBITS(state.extra) ---//\n\t\t\t\t\t\t\t\t\t\thold >>>= state.extra;\n\t\t\t\t\t\t\t\t\t\tbits -= state.extra;\n\t\t\t\t\t\t\t\t\t\t//---//\n\t\t\t\t\t\t\t\t\t\tstate.back += state.extra;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//#ifdef INFLATE_STRICT\n\t\t\t\t\t\t\t\t\tif ( state.offset > state.dmax ) {\n\t\t\t\t\t\t\t\t\t\tstrm.msg =\n\t\t\t\t\t\t\t\t\t\t\t'invalid distance too far back';\n\t\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//#endif\n\t\t\t\t\t\t\t\t\t//Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n\t\t\t\t\t\t\t\t\tstate.mode = MATCH;\n\t\t\t\t\t\t\t\t/* falls through */\n\t\t\t\t\t\t\t\tcase MATCH:\n\t\t\t\t\t\t\t\t\tif ( left === 0 ) {\n\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tcopy = _out - left;\n\t\t\t\t\t\t\t\t\tif ( state.offset > copy ) {\n\t\t\t\t\t\t\t\t\t\t/* copy from window */\n\t\t\t\t\t\t\t\t\t\tcopy = state.offset - copy;\n\t\t\t\t\t\t\t\t\t\tif ( copy > state.whave ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( state.sane ) {\n\t\t\t\t\t\t\t\t\t\t\t\tstrm.msg =\n\t\t\t\t\t\t\t\t\t\t\t\t\t'invalid distance too far back';\n\t\t\t\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// (!) This block is disabled in zlib defaults,\n\t\t\t\t\t\t\t\t\t\t\t// don't enable it for binary compatibility\n\t\t\t\t\t\t\t\t\t\t\t//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n\t\t\t\t\t\t\t\t\t\t\t// Trace((stderr, \"inflate.c too far\\n\"));\n\t\t\t\t\t\t\t\t\t\t\t// copy -= state.whave;\n\t\t\t\t\t\t\t\t\t\t\t// if (copy > state.length) { copy = state.length; }\n\t\t\t\t\t\t\t\t\t\t\t// if (copy > left) { copy = left; }\n\t\t\t\t\t\t\t\t\t\t\t// left -= copy;\n\t\t\t\t\t\t\t\t\t\t\t// state.length -= copy;\n\t\t\t\t\t\t\t\t\t\t\t// do {\n\t\t\t\t\t\t\t\t\t\t\t// output[put++] = 0;\n\t\t\t\t\t\t\t\t\t\t\t// } while (--copy);\n\t\t\t\t\t\t\t\t\t\t\t// if (state.length === 0) { state.mode = LEN; }\n\t\t\t\t\t\t\t\t\t\t\t// break;\n\t\t\t\t\t\t\t\t\t\t\t//#endif\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( copy > state.wnext ) {\n\t\t\t\t\t\t\t\t\t\t\tcopy -= state.wnext;\n\t\t\t\t\t\t\t\t\t\t\tfrom = state.wsize - copy;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tfrom = state.wnext - copy;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( copy > state.length ) {\n\t\t\t\t\t\t\t\t\t\t\tcopy = state.length;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tfrom_source = state.window;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t/* copy from output */\n\t\t\t\t\t\t\t\t\t\tfrom_source = output;\n\t\t\t\t\t\t\t\t\t\tfrom = put - state.offset;\n\t\t\t\t\t\t\t\t\t\tcopy = state.length;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( copy > left ) {\n\t\t\t\t\t\t\t\t\t\tcopy = left;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tleft -= copy;\n\t\t\t\t\t\t\t\t\tstate.length -= copy;\n\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\toutput[ put++ ] = from_source[ from++ ];\n\t\t\t\t\t\t\t\t\t} while ( --copy );\n\t\t\t\t\t\t\t\t\tif ( state.length === 0 ) {\n\t\t\t\t\t\t\t\t\t\tstate.mode = LEN;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase LIT:\n\t\t\t\t\t\t\t\t\tif ( left === 0 ) {\n\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\toutput[ put++ ] = state.length;\n\t\t\t\t\t\t\t\t\tleft--;\n\t\t\t\t\t\t\t\t\tstate.mode = LEN;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase CHECK:\n\t\t\t\t\t\t\t\t\tif ( state.wrap ) {\n\t\t\t\t\t\t\t\t\t\t//=== NEEDBITS(32);\n\t\t\t\t\t\t\t\t\t\twhile ( bits < 32 ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\thave--;\n\t\t\t\t\t\t\t\t\t\t\t// Use '|' instead of '+' to make sure that result is signed\n\t\t\t\t\t\t\t\t\t\t\thold |= input[ next++ ] << bits;\n\t\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\t\t_out -= left;\n\t\t\t\t\t\t\t\t\t\tstrm.total_out += _out;\n\t\t\t\t\t\t\t\t\t\tstate.total += _out;\n\t\t\t\t\t\t\t\t\t\tif ( _out ) {\n\t\t\t\t\t\t\t\t\t\t\tstrm.adler = state.check =\n\t\t\t\t\t\t\t\t\t\t\t\t/*UPDATE(state.check, put - _out, _out);*/\n\t\t\t\t\t\t\t\t\t\t\t\tstate.flags\n\t\t\t\t\t\t\t\t\t\t\t\t\t? crc32(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstate.check,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\toutput,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t_out,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tput - _out\n\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t: adler32(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstate.check,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\toutput,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t_out,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tput - _out\n\t\t\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t_out = left;\n\t\t\t\t\t\t\t\t\t\t// NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t( state.flags\n\t\t\t\t\t\t\t\t\t\t\t\t? hold\n\t\t\t\t\t\t\t\t\t\t\t\t: zswap32( hold ) ) !==\n\t\t\t\t\t\t\t\t\t\t\tstate.check\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\tstrm.msg = 'incorrect data check';\n\t\t\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//=== INITBITS();\n\t\t\t\t\t\t\t\t\t\thold = 0;\n\t\t\t\t\t\t\t\t\t\tbits = 0;\n\t\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\t\t//Tracev((stderr, \"inflate: check matches trailer\\n\"));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tstate.mode = LENGTH;\n\t\t\t\t\t\t\t\t/* falls through */\n\t\t\t\t\t\t\t\tcase LENGTH:\n\t\t\t\t\t\t\t\t\tif ( state.wrap && state.flags ) {\n\t\t\t\t\t\t\t\t\t\t//=== NEEDBITS(32);\n\t\t\t\t\t\t\t\t\t\twhile ( bits < 32 ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( have === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\thave--;\n\t\t\t\t\t\t\t\t\t\t\thold += input[ next++ ] << bits;\n\t\t\t\t\t\t\t\t\t\t\tbits += 8;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\thold !==\n\t\t\t\t\t\t\t\t\t\t\t( state.total & 0xffffffff )\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\tstrm.msg = 'incorrect length check';\n\t\t\t\t\t\t\t\t\t\t\tstate.mode = BAD;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//=== INITBITS();\n\t\t\t\t\t\t\t\t\t\thold = 0;\n\t\t\t\t\t\t\t\t\t\tbits = 0;\n\t\t\t\t\t\t\t\t\t\t//===//\n\t\t\t\t\t\t\t\t\t\t//Tracev((stderr, \"inflate: length matches trailer\\n\"));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tstate.mode = DONE;\n\t\t\t\t\t\t\t\t/* falls through */\n\t\t\t\t\t\t\t\tcase DONE:\n\t\t\t\t\t\t\t\t\tret = Z_STREAM_END;\n\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\tcase BAD:\n\t\t\t\t\t\t\t\t\tret = Z_DATA_ERROR;\n\t\t\t\t\t\t\t\t\tbreak inf_leave;\n\t\t\t\t\t\t\t\tcase MEM:\n\t\t\t\t\t\t\t\t\treturn Z_MEM_ERROR;\n\t\t\t\t\t\t\t\tcase SYNC:\n\t\t\t\t\t\t\t\t/* falls through */\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n\t\t\t\t\t\t/*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n\t\t\t\t\t\t//--- RESTORE() ---\n\t\t\t\t\t\tstrm.next_out = put;\n\t\t\t\t\t\tstrm.avail_out = left;\n\t\t\t\t\t\tstrm.next_in = next;\n\t\t\t\t\t\tstrm.avail_in = have;\n\t\t\t\t\t\tstate.hold = hold;\n\t\t\t\t\t\tstate.bits = bits;\n\t\t\t\t\t\t//---\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tstate.wsize ||\n\t\t\t\t\t\t\t( _out !== strm.avail_out &&\n\t\t\t\t\t\t\t\tstate.mode < BAD &&\n\t\t\t\t\t\t\t\t( state.mode < CHECK || flush !== Z_FINISH ) )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tupdatewindow(\n\t\t\t\t\t\t\t\t\tstrm,\n\t\t\t\t\t\t\t\t\tstrm.output,\n\t\t\t\t\t\t\t\t\tstrm.next_out,\n\t\t\t\t\t\t\t\t\t_out - strm.avail_out\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tstate.mode = MEM;\n\t\t\t\t\t\t\t\treturn Z_MEM_ERROR;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t_in -= strm.avail_in;\n\t\t\t\t\t\t_out -= strm.avail_out;\n\t\t\t\t\t\tstrm.total_in += _in;\n\t\t\t\t\t\tstrm.total_out += _out;\n\t\t\t\t\t\tstate.total += _out;\n\t\t\t\t\t\tif ( state.wrap && _out ) {\n\t\t\t\t\t\t\tstrm.adler = state.check =\n\t\t\t\t\t\t\t\t/*UPDATE(state.check, strm.next_out - _out, _out);*/\n\t\t\t\t\t\t\t\tstate.flags\n\t\t\t\t\t\t\t\t\t? crc32(\n\t\t\t\t\t\t\t\t\t\t\tstate.check,\n\t\t\t\t\t\t\t\t\t\t\toutput,\n\t\t\t\t\t\t\t\t\t\t\t_out,\n\t\t\t\t\t\t\t\t\t\t\tstrm.next_out - _out\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t: adler32(\n\t\t\t\t\t\t\t\t\t\t\tstate.check,\n\t\t\t\t\t\t\t\t\t\t\toutput,\n\t\t\t\t\t\t\t\t\t\t\t_out,\n\t\t\t\t\t\t\t\t\t\t\tstrm.next_out - _out\n\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstrm.data_type =\n\t\t\t\t\t\t\tstate.bits +\n\t\t\t\t\t\t\t( state.last ? 64 : 0 ) +\n\t\t\t\t\t\t\t( state.mode === TYPE ? 128 : 0 ) +\n\t\t\t\t\t\t\t( state.mode === LEN_ || state.mode === COPY_\n\t\t\t\t\t\t\t\t? 256\n\t\t\t\t\t\t\t\t: 0 );\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t( ( _in === 0 && _out === 0 ) ||\n\t\t\t\t\t\t\t\tflush === Z_FINISH ) &&\n\t\t\t\t\t\t\tret === Z_OK\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tret = Z_BUF_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn ret;\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction inflateEnd( strm ) {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t! strm ||\n\t\t\t\t\t\t\t! strm.state /*|| strm->zfree == (free_func)0*/\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar state = strm.state;\n\t\t\t\t\t\tif ( state.window ) {\n\t\t\t\t\t\t\tstate.window = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstrm.state = null;\n\t\t\t\t\t\treturn Z_OK;\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction inflateGetHeader( strm, head ) {\n\t\t\t\t\t\tvar state;\n\n\t\t\t\t\t\t/* check state */\n\t\t\t\t\t\tif ( ! strm || ! strm.state ) {\n\t\t\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate = strm.state;\n\t\t\t\t\t\tif ( ( state.wrap & 2 ) === 0 ) {\n\t\t\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* save header structure */\n\t\t\t\t\t\tstate.head = head;\n\t\t\t\t\t\thead.done = false;\n\t\t\t\t\t\treturn Z_OK;\n\t\t\t\t\t}\n\n\t\t\t\t\tfunction inflateSetDictionary( strm, dictionary ) {\n\t\t\t\t\t\tvar dictLength = dictionary.length;\n\n\t\t\t\t\t\tvar state;\n\t\t\t\t\t\tvar dictid;\n\t\t\t\t\t\tvar ret;\n\n\t\t\t\t\t\t/* check state */\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t! strm /* == Z_NULL */ ||\n\t\t\t\t\t\t\t! strm.state /* == Z_NULL */\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate = strm.state;\n\n\t\t\t\t\t\tif ( state.wrap !== 0 && state.mode !== DICT ) {\n\t\t\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* check for correct dictionary identifier */\n\t\t\t\t\t\tif ( state.mode === DICT ) {\n\t\t\t\t\t\t\tdictid = 1; /* adler32(0, null, 0)*/\n\t\t\t\t\t\t\t/* dictid = adler32(dictid, dictionary, dictLength); */\n\t\t\t\t\t\t\tdictid = adler32(\n\t\t\t\t\t\t\t\tdictid,\n\t\t\t\t\t\t\t\tdictionary,\n\t\t\t\t\t\t\t\tdictLength,\n\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tif ( dictid !== state.check ) {\n\t\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n\t\t\t\t\t\tret = updatewindow(\n\t\t\t\t\t\t\tstrm,\n\t\t\t\t\t\t\tdictionary,\n\t\t\t\t\t\t\tdictLength,\n\t\t\t\t\t\t\tdictLength\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif ( ret ) {\n\t\t\t\t\t\t\tstate.mode = MEM;\n\t\t\t\t\t\t\treturn Z_MEM_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.havedict = 1;\n\t\t\t\t\t\t// Tracev((stderr, \"inflate: dictionary set\\n\"));\n\t\t\t\t\t\treturn Z_OK;\n\t\t\t\t\t}\n\n\t\t\t\t\texports.inflateReset = inflateReset;\n\t\t\t\t\texports.inflateReset2 = inflateReset2;\n\t\t\t\t\texports.inflateResetKeep = inflateResetKeep;\n\t\t\t\t\texports.inflateInit = inflateInit;\n\t\t\t\t\texports.inflateInit2 = inflateInit2;\n\t\t\t\t\texports.inflate = inflate;\n\t\t\t\t\texports.inflateEnd = inflateEnd;\n\t\t\t\t\texports.inflateGetHeader = inflateGetHeader;\n\t\t\t\t\texports.inflateSetDictionary = inflateSetDictionary;\n\t\t\t\t\texports.inflateInfo = 'pako inflate (from Nodeca project)';\n\n\t\t\t\t\t/* Not implemented\n exports.inflateCopy = inflateCopy;\n exports.inflateGetDictionary = inflateGetDictionary;\n exports.inflateMark = inflateMark;\n exports.inflatePrime = inflatePrime;\n exports.inflateSync = inflateSync;\n exports.inflateSyncPoint = inflateSyncPoint;\n exports.inflateUndermine = inflateUndermine;\n */\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t'../utils/common': 1,\n\t\t\t\t\t'./adler32': 3,\n\t\t\t\t\t'./crc32': 5,\n\t\t\t\t\t'./inffast': 7,\n\t\t\t\t\t'./inftrees': 9,\n\t\t\t\t},\n\t\t\t],\n\t\t\t9: [\n\t\t\t\tfunction ( require, module, exports ) {\n\t\t\t\t\t'use strict';\n\n\t\t\t\t\t// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n\t\t\t\t\t// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n\t\t\t\t\t//\n\t\t\t\t\t// This software is provided 'as-is', without any express or implied\n\t\t\t\t\t// warranty. In no event will the authors be held liable for any damages\n\t\t\t\t\t// arising from the use of this software.\n\t\t\t\t\t//\n\t\t\t\t\t// Permission is granted to anyone to use this software for any purpose,\n\t\t\t\t\t// including commercial applications, and to alter it and redistribute it\n\t\t\t\t\t// freely, subject to the following restrictions:\n\t\t\t\t\t//\n\t\t\t\t\t// 1. The origin of this software must not be misrepresented; you must not\n\t\t\t\t\t// claim that you wrote the original software. If you use this software\n\t\t\t\t\t// in a product, an acknowledgment in the product documentation would be\n\t\t\t\t\t// appreciated but is not required.\n\t\t\t\t\t// 2. Altered source versions must be plainly marked as such, and must not be\n\t\t\t\t\t// misrepresented as being the original software.\n\t\t\t\t\t// 3. This notice may not be removed or altered from any source distribution.\n\n\t\t\t\t\tvar utils = require( '../utils/common' );\n\n\t\t\t\t\tvar MAXBITS = 15;\n\t\t\t\t\tvar ENOUGH_LENS = 852;\n\t\t\t\t\tvar ENOUGH_DISTS = 592;\n\t\t\t\t\t//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\n\t\t\t\t\tvar CODES = 0;\n\t\t\t\t\tvar LENS = 1;\n\t\t\t\t\tvar DISTS = 2;\n\n\t\t\t\t\tvar lbase = [\n\t\t\t\t\t\t/* Length codes 257..285 base */ 3, 4, 5, 6, 7, 8, 9,\n\t\t\t\t\t\t10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67,\n\t\t\t\t\t\t83, 99, 115, 131, 163, 195, 227, 258, 0, 0,\n\t\t\t\t\t];\n\n\t\t\t\t\tvar lext = [\n\t\t\t\t\t\t/* Length codes 257..285 extra */ 16, 16, 16, 16, 16,\n\t\t\t\t\t\t16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19,\n\t\t\t\t\t\t19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78,\n\t\t\t\t\t];\n\n\t\t\t\t\tvar dbase = [\n\t\t\t\t\t\t/* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13,\n\t\t\t\t\t\t17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769,\n\t\t\t\t\t\t1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385,\n\t\t\t\t\t\t24577, 0, 0,\n\t\t\t\t\t];\n\n\t\t\t\t\tvar dext = [\n\t\t\t\t\t\t/* Distance codes 0..29 extra */ 16, 16, 16, 16, 17, 17,\n\t\t\t\t\t\t18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24,\n\t\t\t\t\t\t25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64,\n\t\t\t\t\t];\n\n\t\t\t\t\tmodule.exports = function inflate_table(\n\t\t\t\t\t\ttype,\n\t\t\t\t\t\tlens,\n\t\t\t\t\t\tlens_index,\n\t\t\t\t\t\tcodes,\n\t\t\t\t\t\ttable,\n\t\t\t\t\t\ttable_index,\n\t\t\t\t\t\twork,\n\t\t\t\t\t\topts\n\t\t\t\t\t) {\n\t\t\t\t\t\tvar bits = opts.bits;\n\t\t\t\t\t\t//here = opts.here; /* table entry for duplication */\n\n\t\t\t\t\t\tvar len = 0; /* a code's length in bits */\n\t\t\t\t\t\tvar sym = 0; /* index of code symbols */\n\t\t\t\t\t\tvar min = 0,\n\t\t\t\t\t\t\tmax = 0; /* minimum and maximum code lengths */\n\t\t\t\t\t\tvar root = 0; /* number of index bits for root table */\n\t\t\t\t\t\tvar curr = 0; /* number of index bits for current table */\n\t\t\t\t\t\tvar drop = 0; /* code bits to drop for sub-table */\n\t\t\t\t\t\tvar left = 0; /* number of prefix codes available */\n\t\t\t\t\t\tvar used = 0; /* code entries in table used */\n\t\t\t\t\t\tvar huff = 0; /* Huffman code */\n\t\t\t\t\t\tvar incr; /* for incrementing code, index */\n\t\t\t\t\t\tvar fill; /* index for replicating entries */\n\t\t\t\t\t\tvar low; /* low bits for current root entry */\n\t\t\t\t\t\tvar mask; /* mask for low root bits */\n\t\t\t\t\t\tvar next; /* next available space in table */\n\t\t\t\t\t\tvar base = null; /* base value table to use */\n\t\t\t\t\t\tvar base_index = 0;\n\t\t\t\t\t\t// var shoextra; /* extra bits table to use */\n\t\t\t\t\t\tvar end; /* use base and extra for symbol > end */\n\t\t\t\t\t\tvar count = new utils.Buf16( MAXBITS + 1 ); //[MAXBITS+1]; /* number of codes of each length */\n\t\t\t\t\t\tvar offs = new utils.Buf16( MAXBITS + 1 ); //[MAXBITS+1]; /* offsets in table for each length */\n\t\t\t\t\t\tvar extra = null;\n\t\t\t\t\t\tvar extra_index = 0;\n\n\t\t\t\t\t\tvar here_bits, here_op, here_val;\n\n\t\t\t\t\t\t/*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n\t\t\t\t\t\t/* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n\t\t\t\t\t\tfor ( len = 0; len <= MAXBITS; len++ ) {\n\t\t\t\t\t\t\tcount[ len ] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( sym = 0; sym < codes; sym++ ) {\n\t\t\t\t\t\t\tcount[ lens[ lens_index + sym ] ]++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* bound code lengths, force root to be within code lengths */\n\t\t\t\t\t\troot = bits;\n\t\t\t\t\t\tfor ( max = MAXBITS; max >= 1; max-- ) {\n\t\t\t\t\t\t\tif ( count[ max ] !== 0 ) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( root > max ) {\n\t\t\t\t\t\t\troot = max;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( max === 0 ) {\n\t\t\t\t\t\t\t/* no symbols to code at all */\n\t\t\t\t\t\t\t//table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n\t\t\t\t\t\t\t//table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n\t\t\t\t\t\t\t//table.val[opts.table_index++] = 0; //here.val = (var short)0;\n\t\t\t\t\t\t\ttable[ table_index++ ] =\n\t\t\t\t\t\t\t\t( 1 << 24 ) | ( 64 << 16 ) | 0;\n\n\t\t\t\t\t\t\t//table.op[opts.table_index] = 64;\n\t\t\t\t\t\t\t//table.bits[opts.table_index] = 1;\n\t\t\t\t\t\t\t//table.val[opts.table_index++] = 0;\n\t\t\t\t\t\t\ttable[ table_index++ ] =\n\t\t\t\t\t\t\t\t( 1 << 24 ) | ( 64 << 16 ) | 0;\n\n\t\t\t\t\t\t\topts.bits = 1;\n\t\t\t\t\t\t\treturn 0; /* no symbols, but wait for decoding to report error */\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor ( min = 1; min < max; min++ ) {\n\t\t\t\t\t\t\tif ( count[ min ] !== 0 ) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( root < min ) {\n\t\t\t\t\t\t\troot = min;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* check for an over-subscribed or incomplete set of lengths */\n\t\t\t\t\t\tleft = 1;\n\t\t\t\t\t\tfor ( len = 1; len <= MAXBITS; len++ ) {\n\t\t\t\t\t\t\tleft <<= 1;\n\t\t\t\t\t\t\tleft -= count[ len ];\n\t\t\t\t\t\t\tif ( left < 0 ) {\n\t\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\t\t} /* over-subscribed */\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( left > 0 && ( type === CODES || max !== 1 ) ) {\n\t\t\t\t\t\t\treturn -1; /* incomplete set */\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* generate offsets into symbol table for each length for sorting */\n\t\t\t\t\t\toffs[ 1 ] = 0;\n\t\t\t\t\t\tfor ( len = 1; len < MAXBITS; len++ ) {\n\t\t\t\t\t\t\toffs[ len + 1 ] = offs[ len ] + count[ len ];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* sort symbols by length, by symbol order within each length */\n\t\t\t\t\t\tfor ( sym = 0; sym < codes; sym++ ) {\n\t\t\t\t\t\t\tif ( lens[ lens_index + sym ] !== 0 ) {\n\t\t\t\t\t\t\t\twork[ offs[ lens[ lens_index + sym ] ]++ ] =\n\t\t\t\t\t\t\t\t\tsym;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n\t\t\t\t\t\t/* set up for code type */\n\t\t\t\t\t\t// poor man optimization - use if-else instead of switch,\n\t\t\t\t\t\t// to avoid deopts in old v8\n\t\t\t\t\t\tif ( type === CODES ) {\n\t\t\t\t\t\t\tbase = extra = work; /* dummy value--not used */\n\t\t\t\t\t\t\tend = 19;\n\t\t\t\t\t\t} else if ( type === LENS ) {\n\t\t\t\t\t\t\tbase = lbase;\n\t\t\t\t\t\t\tbase_index -= 257;\n\t\t\t\t\t\t\textra = lext;\n\t\t\t\t\t\t\textra_index -= 257;\n\t\t\t\t\t\t\tend = 256;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t/* DISTS */\n\t\t\t\t\t\t\tbase = dbase;\n\t\t\t\t\t\t\textra = dext;\n\t\t\t\t\t\t\tend = -1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* initialize opts for loop */\n\t\t\t\t\t\thuff = 0; /* starting code */\n\t\t\t\t\t\tsym = 0; /* starting code symbol */\n\t\t\t\t\t\tlen = min; /* starting code length */\n\t\t\t\t\t\tnext = table_index; /* current table to fill in */\n\t\t\t\t\t\tcurr = root; /* current table index bits */\n\t\t\t\t\t\tdrop = 0; /* current bits to drop from code for index */\n\t\t\t\t\t\tlow = -1; /* trigger new sub-table when len > root */\n\t\t\t\t\t\tused = 1 << root; /* use root table entries */\n\t\t\t\t\t\tmask = used - 1; /* mask for comparing low */\n\n\t\t\t\t\t\t/* check available table space */\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t( type === LENS && used > ENOUGH_LENS ) ||\n\t\t\t\t\t\t\t( type === DISTS && used > ENOUGH_DISTS )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* process all codes and make table entries */\n\t\t\t\t\t\tfor (;;) {\n\t\t\t\t\t\t\t/* create table entry */\n\t\t\t\t\t\t\there_bits = len - drop;\n\t\t\t\t\t\t\tif ( work[ sym ] < end ) {\n\t\t\t\t\t\t\t\there_op = 0;\n\t\t\t\t\t\t\t\there_val = work[ sym ];\n\t\t\t\t\t\t\t} else if ( work[ sym ] > end ) {\n\t\t\t\t\t\t\t\there_op = extra[ extra_index + work[ sym ] ];\n\t\t\t\t\t\t\t\there_val = base[ base_index + work[ sym ] ];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\there_op = 32 + 64; /* end of block */\n\t\t\t\t\t\t\t\there_val = 0;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/* replicate for those indices with low len bits equal to huff */\n\t\t\t\t\t\t\tincr = 1 << ( len - drop );\n\t\t\t\t\t\t\tfill = 1 << curr;\n\t\t\t\t\t\t\tmin = fill; /* save offset to next table */\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tfill -= incr;\n\t\t\t\t\t\t\t\ttable[ next + ( huff >> drop ) + fill ] =\n\t\t\t\t\t\t\t\t\t( here_bits << 24 ) |\n\t\t\t\t\t\t\t\t\t( here_op << 16 ) |\n\t\t\t\t\t\t\t\t\there_val |\n\t\t\t\t\t\t\t\t\t0;\n\t\t\t\t\t\t\t} while ( fill !== 0 );\n\n\t\t\t\t\t\t\t/* backwards increment the len-bit code huff */\n\t\t\t\t\t\t\tincr = 1 << ( len - 1 );\n\t\t\t\t\t\t\twhile ( huff & incr ) {\n\t\t\t\t\t\t\t\tincr >>= 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( incr !== 0 ) {\n\t\t\t\t\t\t\t\thuff &= incr - 1;\n\t\t\t\t\t\t\t\thuff += incr;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\thuff = 0;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/* go to next symbol, update count, len */\n\t\t\t\t\t\t\tsym++;\n\t\t\t\t\t\t\tif ( --count[ len ] === 0 ) {\n\t\t\t\t\t\t\t\tif ( len === max ) {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tlen = lens[ lens_index + work[ sym ] ];\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/* create new sub-table if needed */\n\t\t\t\t\t\t\tif ( len > root && ( huff & mask ) !== low ) {\n\t\t\t\t\t\t\t\t/* if first time, transition to sub-tables */\n\t\t\t\t\t\t\t\tif ( drop === 0 ) {\n\t\t\t\t\t\t\t\t\tdrop = root;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t/* increment past last table */\n\t\t\t\t\t\t\t\tnext += min; /* here min is 1 << curr */\n\n\t\t\t\t\t\t\t\t/* determine length of next table */\n\t\t\t\t\t\t\t\tcurr = len - drop;\n\t\t\t\t\t\t\t\tleft = 1 << curr;\n\t\t\t\t\t\t\t\twhile ( curr + drop < max ) {\n\t\t\t\t\t\t\t\t\tleft -= count[ curr + drop ];\n\t\t\t\t\t\t\t\t\tif ( left <= 0 ) {\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tcurr++;\n\t\t\t\t\t\t\t\t\tleft <<= 1;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t/* check for enough space */\n\t\t\t\t\t\t\t\tused += 1 << curr;\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t( type === LENS && used > ENOUGH_LENS ) ||\n\t\t\t\t\t\t\t\t\t( type === DISTS && used > ENOUGH_DISTS )\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t/* point entry in root table to sub-table */\n\t\t\t\t\t\t\t\tlow = huff & mask;\n\t\t\t\t\t\t\t\t/*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n\t\t\t\t\t\t\t\ttable[ low ] =\n\t\t\t\t\t\t\t\t\t( root << 24 ) |\n\t\t\t\t\t\t\t\t\t( curr << 16 ) |\n\t\t\t\t\t\t\t\t\t( next - table_index ) |\n\t\t\t\t\t\t\t\t\t0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n\t\t\t\t\t\tif ( huff !== 0 ) {\n\t\t\t\t\t\t\t//table.op[next + huff] = 64; /* invalid code marker */\n\t\t\t\t\t\t\t//table.bits[next + huff] = len - drop;\n\t\t\t\t\t\t\t//table.val[next + huff] = 0;\n\t\t\t\t\t\t\ttable[ next + huff ] =\n\t\t\t\t\t\t\t\t( ( len - drop ) << 24 ) | ( 64 << 16 ) | 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* set return parameters */\n\t\t\t\t\t\t//opts.table_index += used;\n\t\t\t\t\t\topts.bits = root;\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{ '../utils/common': 1 },\n\t\t\t],\n\t\t\t10: [\n\t\t\t\tfunction ( require, module, exports ) {\n\t\t\t\t\t'use strict';\n\n\t\t\t\t\t// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n\t\t\t\t\t// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n\t\t\t\t\t//\n\t\t\t\t\t// This software is provided 'as-is', without any express or implied\n\t\t\t\t\t// warranty. In no event will the authors be held liable for any damages\n\t\t\t\t\t// arising from the use of this software.\n\t\t\t\t\t//\n\t\t\t\t\t// Permission is granted to anyone to use this software for any purpose,\n\t\t\t\t\t// including commercial applications, and to alter it and redistribute it\n\t\t\t\t\t// freely, subject to the following restrictions:\n\t\t\t\t\t//\n\t\t\t\t\t// 1. The origin of this software must not be misrepresented; you must not\n\t\t\t\t\t// claim that you wrote the original software. If you use this software\n\t\t\t\t\t// in a product, an acknowledgment in the product documentation would be\n\t\t\t\t\t// appreciated but is not required.\n\t\t\t\t\t// 2. Altered source versions must be plainly marked as such, and must not be\n\t\t\t\t\t// misrepresented as being the original software.\n\t\t\t\t\t// 3. This notice may not be removed or altered from any source distribution.\n\n\t\t\t\t\tmodule.exports = {\n\t\t\t\t\t\t2: 'need dictionary' /* Z_NEED_DICT 2 */,\n\t\t\t\t\t\t1: 'stream end' /* Z_STREAM_END 1 */,\n\t\t\t\t\t\t0: '' /* Z_OK 0 */,\n\t\t\t\t\t\t'-1': 'file error' /* Z_ERRNO (-1) */,\n\t\t\t\t\t\t'-2': 'stream error' /* Z_STREAM_ERROR (-2) */,\n\t\t\t\t\t\t'-3': 'data error' /* Z_DATA_ERROR (-3) */,\n\t\t\t\t\t\t'-4': 'insufficient memory' /* Z_MEM_ERROR (-4) */,\n\t\t\t\t\t\t'-5': 'buffer error' /* Z_BUF_ERROR (-5) */,\n\t\t\t\t\t\t'-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */,\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t{},\n\t\t\t],\n\t\t\t11: [\n\t\t\t\tfunction ( require, module, exports ) {\n\t\t\t\t\t'use strict';\n\n\t\t\t\t\t// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n\t\t\t\t\t// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n\t\t\t\t\t//\n\t\t\t\t\t// This software is provided 'as-is', without any express or implied\n\t\t\t\t\t// warranty. In no event will the authors be held liable for any damages\n\t\t\t\t\t// arising from the use of this software.\n\t\t\t\t\t//\n\t\t\t\t\t// Permission is granted to anyone to use this software for any purpose,\n\t\t\t\t\t// including commercial applications, and to alter it and redistribute it\n\t\t\t\t\t// freely, subject to the following restrictions:\n\t\t\t\t\t//\n\t\t\t\t\t// 1. The origin of this software must not be misrepresented; you must not\n\t\t\t\t\t// claim that you wrote the original software. If you use this software\n\t\t\t\t\t// in a product, an acknowledgment in the product documentation would be\n\t\t\t\t\t// appreciated but is not required.\n\t\t\t\t\t// 2. Altered source versions must be plainly marked as such, and must not be\n\t\t\t\t\t// misrepresented as being the original software.\n\t\t\t\t\t// 3. This notice may not be removed or altered from any source distribution.\n\n\t\t\t\t\tfunction ZStream() {\n\t\t\t\t\t\t/* next input byte */\n\t\t\t\t\t\tthis.input = null; // JS specific, because we have no pointers\n\t\t\t\t\t\tthis.next_in = 0;\n\t\t\t\t\t\t/* number of bytes available at input */\n\t\t\t\t\t\tthis.avail_in = 0;\n\t\t\t\t\t\t/* total number of input bytes read so far */\n\t\t\t\t\t\tthis.total_in = 0;\n\t\t\t\t\t\t/* next output byte should be put there */\n\t\t\t\t\t\tthis.output = null; // JS specific, because we have no pointers\n\t\t\t\t\t\tthis.next_out = 0;\n\t\t\t\t\t\t/* remaining free space at output */\n\t\t\t\t\t\tthis.avail_out = 0;\n\t\t\t\t\t\t/* total number of bytes output so far */\n\t\t\t\t\t\tthis.total_out = 0;\n\t\t\t\t\t\t/* last error message, NULL if no error */\n\t\t\t\t\t\tthis.msg = '' /*Z_NULL*/;\n\t\t\t\t\t\t/* not visible by applications */\n\t\t\t\t\t\tthis.state = null;\n\t\t\t\t\t\t/* best guess about the data type: binary or text */\n\t\t\t\t\t\tthis.data_type = 2 /*Z_UNKNOWN*/;\n\t\t\t\t\t\t/* adler32 value of the uncompressed data */\n\t\t\t\t\t\tthis.adler = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tmodule.exports = ZStream;\n\t\t\t\t},\n\t\t\t\t{},\n\t\t\t],\n\t\t\t'/lib/inflate.js': [\n\t\t\t\tfunction ( require, module, exports ) {\n\t\t\t\t\t'use strict';\n\n\t\t\t\t\tvar zlib_inflate = require( './zlib/inflate' );\n\t\t\t\t\tvar utils = require( './utils/common' );\n\t\t\t\t\tvar strings = require( './utils/strings' );\n\t\t\t\t\tvar c = require( './zlib/constants' );\n\t\t\t\t\tvar msg = require( './zlib/messages' );\n\t\t\t\t\tvar ZStream = require( './zlib/zstream' );\n\t\t\t\t\tvar GZheader = require( './zlib/gzheader' );\n\n\t\t\t\t\tvar toString = Object.prototype.toString;\n\n\t\t\t\t\t/**\n\t\t\t\t\t * class Inflate\n\t\t\t\t\t *\n\t\t\t\t\t * Generic JS-style wrapper for zlib calls. If you don't need\n\t\t\t\t\t * streaming behaviour - use more simple functions: [[inflate]]\n\t\t\t\t\t * and [[inflateRaw]].\n\t\t\t\t\t **/\n\n\t\t\t\t\t/* internal\n\t\t\t\t\t * inflate.chunks -> Array\n\t\t\t\t\t *\n\t\t\t\t\t * Chunks of output data, if [[Inflate#onData]] not overridden.\n\t\t\t\t\t **/\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Inflate.result -> Uint8Array|Array|String\n\t\t\t\t\t *\n\t\t\t\t\t * Uncompressed result, generated by default [[Inflate#onData]]\n\t\t\t\t\t * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n\t\t\t\t\t * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you\n\t\t\t\t\t * push a chunk with explicit flush (call [[Inflate#push]] with\n\t\t\t\t\t * `Z_SYNC_FLUSH` param).\n\t\t\t\t\t **/\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Inflate.err -> Number\n\t\t\t\t\t *\n\t\t\t\t\t * Error code after inflate finished. 0 (Z_OK) on success.\n\t\t\t\t\t * Should be checked if broken data possible.\n\t\t\t\t\t **/\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Inflate.msg -> String\n\t\t\t\t\t *\n\t\t\t\t\t * Error message, if [[Inflate.err]] != 0\n\t\t\t\t\t **/\n\n\t\t\t\t\t/**\n\t\t\t\t\t * new Inflate(options)\n\t\t\t\t\t * - options (Object): zlib inflate options.\n\t\t\t\t\t *\n\t\t\t\t\t * Creates new inflator instance with specified params. Throws exception\n\t\t\t\t\t * on bad params. Supported options:\n\t\t\t\t\t *\n\t\t\t\t\t * - `windowBits`\n\t\t\t\t\t * - `dictionary`\n\t\t\t\t\t *\n\t\t\t\t\t * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n\t\t\t\t\t * for more information on these.\n\t\t\t\t\t *\n\t\t\t\t\t * Additional options, for internal needs:\n\t\t\t\t\t *\n\t\t\t\t\t * - `chunkSize` - size of generated data chunks (16K by default)\n\t\t\t\t\t * - `raw` (Boolean) - do raw inflate\n\t\t\t\t\t * - `to` (String) - if equal to 'string', then result will be converted\n\t\t\t\t\t * from utf8 to utf16 (javascript) string. When string output requested,\n\t\t\t\t\t * chunk length can differ from `chunkSize`, depending on content.\n\t\t\t\t\t *\n\t\t\t\t\t * By default, when no options set, autodetect deflate/gzip data format via\n\t\t\t\t\t * wrapper header.\n\t\t\t\t\t *\n\t\t\t\t\t * ##### Example:\n\t\t\t\t\t *\n\t\t\t\t\t * ```javascript\n\t\t\t\t\t * var pako = require('pako')\n\t\t\t\t\t * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n\t\t\t\t\t * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n\t\t\t\t\t *\n\t\t\t\t\t * var inflate = new pako.Inflate({ level: 3});\n\t\t\t\t\t *\n\t\t\t\t\t * inflate.push(chunk1, false);\n\t\t\t\t\t * inflate.push(chunk2, true); // true -> last chunk\n\t\t\t\t\t *\n\t\t\t\t\t * if (inflate.err) { throw new Error(inflate.err); }\n\t\t\t\t\t *\n\t\t\t\t\t * console.log(inflate.result);\n\t\t\t\t\t * ```\n\t\t\t\t\t **/\n\t\t\t\t\tfunction Inflate( options ) {\n\t\t\t\t\t\tif ( ! ( this instanceof Inflate ) )\n\t\t\t\t\t\t\treturn new Inflate( options );\n\n\t\t\t\t\t\tthis.options = utils.assign(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tchunkSize: 16384,\n\t\t\t\t\t\t\t\twindowBits: 0,\n\t\t\t\t\t\t\t\tto: '',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\toptions || {}\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tvar opt = this.options;\n\n\t\t\t\t\t\t// Force window size for `raw` data, if not set directly,\n\t\t\t\t\t\t// because we have no header for autodetect.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\topt.raw &&\n\t\t\t\t\t\t\topt.windowBits >= 0 &&\n\t\t\t\t\t\t\topt.windowBits < 16\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\topt.windowBits = -opt.windowBits;\n\t\t\t\t\t\t\tif ( opt.windowBits === 0 ) {\n\t\t\t\t\t\t\t\topt.windowBits = -15;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\topt.windowBits >= 0 &&\n\t\t\t\t\t\t\topt.windowBits < 16 &&\n\t\t\t\t\t\t\t! ( options && options.windowBits )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\topt.windowBits += 32;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Gzip header has no info about windows size, we can do autodetect only\n\t\t\t\t\t\t// for deflate. So, if window size not set, force it to max when gzip possible\n\t\t\t\t\t\tif ( opt.windowBits > 15 && opt.windowBits < 48 ) {\n\t\t\t\t\t\t\t// bit 3 (16) -> gzipped data\n\t\t\t\t\t\t\t// bit 4 (32) -> autodetect gzip/deflate\n\t\t\t\t\t\t\tif ( ( opt.windowBits & 15 ) === 0 ) {\n\t\t\t\t\t\t\t\topt.windowBits |= 15;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis.err = 0; // error code, if happens (0 = Z_OK)\n\t\t\t\t\t\tthis.msg = ''; // error message\n\t\t\t\t\t\tthis.ended = false; // used to avoid multiple onEnd() calls\n\t\t\t\t\t\tthis.chunks = []; // chunks of compressed data\n\n\t\t\t\t\t\tthis.strm = new ZStream();\n\t\t\t\t\t\tthis.strm.avail_out = 0;\n\n\t\t\t\t\t\tvar status = zlib_inflate.inflateInit2(\n\t\t\t\t\t\t\tthis.strm,\n\t\t\t\t\t\t\topt.windowBits\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif ( status !== c.Z_OK ) {\n\t\t\t\t\t\t\tthrow new Error( msg[ status ] );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis.header = new GZheader();\n\n\t\t\t\t\t\tzlib_inflate.inflateGetHeader( this.strm, this.header );\n\n\t\t\t\t\t\t// Setup dictionary\n\t\t\t\t\t\tif ( opt.dictionary ) {\n\t\t\t\t\t\t\t// Convert data if needed\n\t\t\t\t\t\t\tif ( typeof opt.dictionary === 'string' ) {\n\t\t\t\t\t\t\t\topt.dictionary = strings.string2buf(\n\t\t\t\t\t\t\t\t\topt.dictionary\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\t\ttoString.call( opt.dictionary ) ===\n\t\t\t\t\t\t\t\t'[object ArrayBuffer]'\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\topt.dictionary = new Uint8Array(\n\t\t\t\t\t\t\t\t\topt.dictionary\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( opt.raw ) {\n\t\t\t\t\t\t\t\t//In raw mode we need to set the dictionary early\n\t\t\t\t\t\t\t\tstatus = zlib_inflate.inflateSetDictionary(\n\t\t\t\t\t\t\t\t\tthis.strm,\n\t\t\t\t\t\t\t\t\topt.dictionary\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tif ( status !== c.Z_OK ) {\n\t\t\t\t\t\t\t\t\tthrow new Error( msg[ status ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Inflate#push(data[, mode]) -> Boolean\n\t\t\t\t\t * - data (Uint8Array|Array|ArrayBuffer|String): input data\n\t\t\t\t\t * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n\t\t\t\t\t * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n\t\t\t\t\t *\n\t\t\t\t\t * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n\t\t\t\t\t * new output chunks. Returns `true` on success. The last data block must have\n\t\t\t\t\t * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n\t\t\t\t\t * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n\t\t\t\t\t * can use mode Z_SYNC_FLUSH, keeping the decompression context.\n\t\t\t\t\t *\n\t\t\t\t\t * On fail call [[Inflate#onEnd]] with error code and return false.\n\t\t\t\t\t *\n\t\t\t\t\t * We strongly recommend to use `Uint8Array` on input for best speed (output\n\t\t\t\t\t * format is detected automatically). Also, don't skip last param and always\n\t\t\t\t\t * use the same type in your code (boolean or number). That will improve JS speed.\n\t\t\t\t\t *\n\t\t\t\t\t * For regular `Array`-s make sure all elements are [0..255].\n\t\t\t\t\t *\n\t\t\t\t\t * ##### Example\n\t\t\t\t\t *\n\t\t\t\t\t * ```javascript\n\t\t\t\t\t * push(chunk, false); // push one of data chunks\n\t\t\t\t\t * ...\n\t\t\t\t\t * push(chunk, true); // push last chunk\n\t\t\t\t\t * ```\n\t\t\t\t\t **/\n\t\t\t\t\tInflate.prototype.push = function ( data, mode ) {\n\t\t\t\t\t\tvar strm = this.strm;\n\t\t\t\t\t\tvar chunkSize = this.options.chunkSize;\n\t\t\t\t\t\tvar dictionary = this.options.dictionary;\n\t\t\t\t\t\tvar status, _mode;\n\t\t\t\t\t\tvar next_out_utf8, tail, utf8str;\n\n\t\t\t\t\t\t// Flag to properly process Z_BUF_ERROR on testing inflate call\n\t\t\t\t\t\t// when we check that all output data was flushed.\n\t\t\t\t\t\tvar allowBufError = false;\n\n\t\t\t\t\t\tif ( this.ended ) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t_mode =\n\t\t\t\t\t\t\tmode === ~~mode\n\t\t\t\t\t\t\t\t? mode\n\t\t\t\t\t\t\t\t: mode === true\n\t\t\t\t\t\t\t\t? c.Z_FINISH\n\t\t\t\t\t\t\t\t: c.Z_NO_FLUSH;\n\n\t\t\t\t\t\t// Convert data if needed\n\t\t\t\t\t\tif ( typeof data === 'string' ) {\n\t\t\t\t\t\t\t// Only binary strings can be decompressed on practice\n\t\t\t\t\t\t\tstrm.input = strings.binstring2buf( data );\n\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\ttoString.call( data ) === '[object ArrayBuffer]'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tstrm.input = new Uint8Array( data );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstrm.input = data;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstrm.next_in = 0;\n\t\t\t\t\t\tstrm.avail_in = strm.input.length;\n\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tif ( strm.avail_out === 0 ) {\n\t\t\t\t\t\t\t\tstrm.output = new utils.Buf8( chunkSize );\n\t\t\t\t\t\t\t\tstrm.next_out = 0;\n\t\t\t\t\t\t\t\tstrm.avail_out = chunkSize;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tstatus = zlib_inflate.inflate(\n\t\t\t\t\t\t\t\tstrm,\n\t\t\t\t\t\t\t\tc.Z_NO_FLUSH\n\t\t\t\t\t\t\t); /* no bad return value */\n\n\t\t\t\t\t\t\tif ( status === c.Z_NEED_DICT && dictionary ) {\n\t\t\t\t\t\t\t\tstatus = zlib_inflate.inflateSetDictionary(\n\t\t\t\t\t\t\t\t\tthis.strm,\n\t\t\t\t\t\t\t\t\tdictionary\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tstatus === c.Z_BUF_ERROR &&\n\t\t\t\t\t\t\t\tallowBufError === true\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tstatus = c.Z_OK;\n\t\t\t\t\t\t\t\tallowBufError = false;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tstatus !== c.Z_STREAM_END &&\n\t\t\t\t\t\t\t\tstatus !== c.Z_OK\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tthis.onEnd( status );\n\t\t\t\t\t\t\t\tthis.ended = true;\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( strm.next_out ) {\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tstrm.avail_out === 0 ||\n\t\t\t\t\t\t\t\t\tstatus === c.Z_STREAM_END ||\n\t\t\t\t\t\t\t\t\t( strm.avail_in === 0 &&\n\t\t\t\t\t\t\t\t\t\t( _mode === c.Z_FINISH ||\n\t\t\t\t\t\t\t\t\t\t\t_mode === c.Z_SYNC_FLUSH ) )\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tif ( this.options.to === 'string' ) {\n\t\t\t\t\t\t\t\t\t\tnext_out_utf8 = strings.utf8border(\n\t\t\t\t\t\t\t\t\t\t\tstrm.output,\n\t\t\t\t\t\t\t\t\t\t\tstrm.next_out\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\ttail = strm.next_out - next_out_utf8;\n\t\t\t\t\t\t\t\t\t\tutf8str = strings.buf2string(\n\t\t\t\t\t\t\t\t\t\t\tstrm.output,\n\t\t\t\t\t\t\t\t\t\t\tnext_out_utf8\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t// move tail\n\t\t\t\t\t\t\t\t\t\tstrm.next_out = tail;\n\t\t\t\t\t\t\t\t\t\tstrm.avail_out = chunkSize - tail;\n\t\t\t\t\t\t\t\t\t\tif ( tail ) {\n\t\t\t\t\t\t\t\t\t\t\tutils.arraySet(\n\t\t\t\t\t\t\t\t\t\t\t\tstrm.output,\n\t\t\t\t\t\t\t\t\t\t\t\tstrm.output,\n\t\t\t\t\t\t\t\t\t\t\t\tnext_out_utf8,\n\t\t\t\t\t\t\t\t\t\t\t\ttail,\n\t\t\t\t\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tthis.onData( utf8str );\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tthis.onData(\n\t\t\t\t\t\t\t\t\t\t\tutils.shrinkBuf(\n\t\t\t\t\t\t\t\t\t\t\t\tstrm.output,\n\t\t\t\t\t\t\t\t\t\t\t\tstrm.next_out\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// When no more input data, we should check that internal inflate buffers\n\t\t\t\t\t\t\t// are flushed. The only way to do it when avail_out = 0 - run one more\n\t\t\t\t\t\t\t// inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.\n\t\t\t\t\t\t\t// Here we set flag to process this error properly.\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// NOTE. Deflate does not return error in this case and does not needs such\n\t\t\t\t\t\t\t// logic.\n\t\t\t\t\t\t\tif ( strm.avail_in === 0 && strm.avail_out === 0 ) {\n\t\t\t\t\t\t\t\tallowBufError = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} while (\n\t\t\t\t\t\t\t( strm.avail_in > 0 || strm.avail_out === 0 ) &&\n\t\t\t\t\t\t\tstatus !== c.Z_STREAM_END\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif ( status === c.Z_STREAM_END ) {\n\t\t\t\t\t\t\t_mode = c.Z_FINISH;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Finalize on the last chunk.\n\t\t\t\t\t\tif ( _mode === c.Z_FINISH ) {\n\t\t\t\t\t\t\tstatus = zlib_inflate.inflateEnd( this.strm );\n\t\t\t\t\t\t\tthis.onEnd( status );\n\t\t\t\t\t\t\tthis.ended = true;\n\t\t\t\t\t\t\treturn status === c.Z_OK;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// callback interim results if Z_SYNC_FLUSH.\n\t\t\t\t\t\tif ( _mode === c.Z_SYNC_FLUSH ) {\n\t\t\t\t\t\t\tthis.onEnd( c.Z_OK );\n\t\t\t\t\t\t\tstrm.avail_out = 0;\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t};\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Inflate#onData(chunk) -> Void\n\t\t\t\t\t * - chunk (Uint8Array|Array|String): output data. Type of array depends\n\t\t\t\t\t * on js engine support. When string output requested, each chunk\n\t\t\t\t\t * will be string.\n\t\t\t\t\t *\n\t\t\t\t\t * By default, stores data blocks in `chunks[]` property and glue\n\t\t\t\t\t * those in `onEnd`. Override this handler, if you need another behaviour.\n\t\t\t\t\t **/\n\t\t\t\t\tInflate.prototype.onData = function ( chunk ) {\n\t\t\t\t\t\tthis.chunks.push( chunk );\n\t\t\t\t\t};\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Inflate#onEnd(status) -> Void\n\t\t\t\t\t * - status (Number): inflate status. 0 (Z_OK) on success,\n\t\t\t\t\t * other if not.\n\t\t\t\t\t *\n\t\t\t\t\t * Called either after you tell inflate that the input stream is\n\t\t\t\t\t * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n\t\t\t\t\t * or if an error happened. By default - join collected chunks,\n\t\t\t\t\t * free memory and fill `results` / `err` properties.\n\t\t\t\t\t **/\n\t\t\t\t\tInflate.prototype.onEnd = function ( status ) {\n\t\t\t\t\t\t// On success - join\n\t\t\t\t\t\tif ( status === c.Z_OK ) {\n\t\t\t\t\t\t\tif ( this.options.to === 'string' ) {\n\t\t\t\t\t\t\t\t// Glue & convert here, until we teach pako to send\n\t\t\t\t\t\t\t\t// utf8 aligned strings to onData\n\t\t\t\t\t\t\t\tthis.result = this.chunks.join( '' );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.result = utils.flattenChunks(\n\t\t\t\t\t\t\t\t\tthis.chunks\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.chunks = [];\n\t\t\t\t\t\tthis.err = status;\n\t\t\t\t\t\tthis.msg = this.strm.msg;\n\t\t\t\t\t};\n\n\t\t\t\t\t/**\n\t\t\t\t\t * inflate(data[, options]) -> Uint8Array|Array|String\n\t\t\t\t\t * - data (Uint8Array|Array|String): input data to decompress.\n\t\t\t\t\t * - options (Object): zlib inflate options.\n\t\t\t\t\t *\n\t\t\t\t\t * Decompress `data` with inflate/ungzip and `options`. Autodetect\n\t\t\t\t\t * format via wrapper header by default. That's why we don't provide\n\t\t\t\t\t * separate `ungzip` method.\n\t\t\t\t\t *\n\t\t\t\t\t * Supported options are:\n\t\t\t\t\t *\n\t\t\t\t\t * - windowBits\n\t\t\t\t\t *\n\t\t\t\t\t * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n\t\t\t\t\t * for more information.\n\t\t\t\t\t *\n\t\t\t\t\t * Sugar (options):\n\t\t\t\t\t *\n\t\t\t\t\t * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n\t\t\t\t\t * negative windowBits implicitly.\n\t\t\t\t\t * - `to` (String) - if equal to 'string', then result will be converted\n\t\t\t\t\t * from utf8 to utf16 (javascript) string. When string output requested,\n\t\t\t\t\t * chunk length can differ from `chunkSize`, depending on content.\n\t\t\t\t\t *\n\t\t\t\t\t *\n\t\t\t\t\t * ##### Example:\n\t\t\t\t\t *\n\t\t\t\t\t * ```javascript\n\t\t\t\t\t * var pako = require('pako')\n\t\t\t\t\t * , input = pako.deflate([1,2,3,4,5,6,7,8,9])\n\t\t\t\t\t * , output;\n\t\t\t\t\t *\n\t\t\t\t\t * try {\n\t\t\t\t\t * output = pako.inflate(input);\n\t\t\t\t\t * } catch (err)\n\t\t\t\t\t * console.log(err);\n\t\t\t\t\t * }\n\t\t\t\t\t * ```\n\t\t\t\t\t **/\n\t\t\t\t\tfunction inflate( input, options ) {\n\t\t\t\t\t\tvar inflator = new Inflate( options );\n\n\t\t\t\t\t\tinflator.push( input, true );\n\n\t\t\t\t\t\t// That will never happens, if you don't cheat with options :)\n\t\t\t\t\t\tif ( inflator.err ) {\n\t\t\t\t\t\t\tthrow inflator.msg || msg[ inflator.err ];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn inflator.result;\n\t\t\t\t\t}\n\n\t\t\t\t\t/**\n\t\t\t\t\t * inflateRaw(data[, options]) -> Uint8Array|Array|String\n\t\t\t\t\t * - data (Uint8Array|Array|String): input data to decompress.\n\t\t\t\t\t * - options (Object): zlib inflate options.\n\t\t\t\t\t *\n\t\t\t\t\t * The same as [[inflate]], but creates raw data, without wrapper\n\t\t\t\t\t * (header and adler32 crc).\n\t\t\t\t\t **/\n\t\t\t\t\tfunction inflateRaw( input, options ) {\n\t\t\t\t\t\toptions = options || {};\n\t\t\t\t\t\toptions.raw = true;\n\t\t\t\t\t\treturn inflate( input, options );\n\t\t\t\t\t}\n\n\t\t\t\t\t/**\n\t\t\t\t\t * ungzip(data[, options]) -> Uint8Array|Array|String\n\t\t\t\t\t * - data (Uint8Array|Array|String): input data to decompress.\n\t\t\t\t\t * - options (Object): zlib inflate options.\n\t\t\t\t\t *\n\t\t\t\t\t * Just shortcut to [[inflate]], because it autodetects format\n\t\t\t\t\t * by header.content. Done for convenience.\n\t\t\t\t\t **/\n\n\t\t\t\t\texports.Inflate = Inflate;\n\t\t\t\t\texports.inflate = inflate;\n\t\t\t\t\texports.inflateRaw = inflateRaw;\n\t\t\t\t\texports.ungzip = inflate;\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t'./utils/common': 1,\n\t\t\t\t\t'./utils/strings': 2,\n\t\t\t\t\t'./zlib/constants': 4,\n\t\t\t\t\t'./zlib/gzheader': 6,\n\t\t\t\t\t'./zlib/inflate': 8,\n\t\t\t\t\t'./zlib/messages': 10,\n\t\t\t\t\t'./zlib/zstream': 11,\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t\t{},\n\t\t[]\n\t)( '/lib/inflate.js' );\n} )();\n/* eslint-enable */\n", "/**\n * Credits:\n *\n * lib-font\n * https://github.com/Pomax/lib-font\n * https://github.com/Pomax/lib-font/blob/master/lib-font.browser.js\n *\n * The MIT License (MIT)\n *\n * Copyright (c) 2020 pomax@nihongoresources.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n/* eslint eslint-comments/no-unlimited-disable: 0 */\n/* eslint-disable */\n// import pako from 'pako';\nimport unbrotli from './unbrotli';\nimport GzipDecode from './inflate';\n\nlet fetchFunction = globalThis.fetch;\n// if ( ! fetchFunction ) {\n// \tlet backlog = [];\n// \tfetchFunction = globalThis.fetch = ( ...args ) =>\n// \t\tnew Promise( ( resolve, reject ) => {\n// \t\t\tbacklog.push( { args: args, resolve: resolve, reject: reject } );\n// \t\t} );\n// \timport( 'fs' )\n// \t\t.then( ( fs ) => {\n// \t\t\tfetchFunction = globalThis.fetch = async function ( path ) {\n// \t\t\t\treturn new Promise( ( resolve, reject ) => {\n// \t\t\t\t\tfs.readFile( path, ( err, data ) => {\n// \t\t\t\t\t\tif ( err ) return reject( err );\n// \t\t\t\t\t\tresolve( { ok: true, arrayBuffer: () => data.buffer } );\n// \t\t\t\t\t} );\n// \t\t\t\t} );\n// \t\t\t};\n// \t\t\twhile ( backlog.length ) {\n// \t\t\t\tlet instruction = backlog.shift();\n// \t\t\t\tfetchFunction( ...instruction.args )\n// \t\t\t\t\t.then( ( data ) => instruction.resolve( data ) )\n// \t\t\t\t\t.catch( ( err ) => instruction.reject( err ) );\n// \t\t\t}\n// \t\t} )\n// \t\t.catch( ( err ) => {\n// \t\t\tconsole.error( err );\n// \t\t\tthrow new Error(\n// \t\t\t\t`lib-font cannot run unless either the Fetch API or Node's filesystem module is available.`\n// \t\t\t);\n// \t\t} );\n// }\nclass Event {\n\tconstructor( type, detail = {}, msg ) {\n\t\tthis.type = type;\n\t\tthis.detail = detail;\n\t\tthis.msg = msg;\n\t\tObject.defineProperty( this, `__mayPropagate`, {\n\t\t\tenumerable: false,\n\t\t\twritable: true,\n\t\t} );\n\t\tthis.__mayPropagate = true;\n\t}\n\tpreventDefault() {}\n\tstopPropagation() {\n\t\tthis.__mayPropagate = false;\n\t}\n\tvalueOf() {\n\t\treturn this;\n\t}\n\ttoString() {\n\t\treturn this.msg\n\t\t\t? `[${ this.type } event]: ${ this.msg }`\n\t\t\t: `[${ this.type } event]`;\n\t}\n}\nclass EventManager {\n\tconstructor() {\n\t\tthis.listeners = {};\n\t}\n\taddEventListener( type, listener, useCapture ) {\n\t\tlet bin = this.listeners[ type ] || [];\n\t\tif ( useCapture ) bin.unshift( listener );\n\t\telse bin.push( listener );\n\t\tthis.listeners[ type ] = bin;\n\t}\n\tremoveEventListener( type, listener ) {\n\t\tlet bin = this.listeners[ type ] || [];\n\t\tlet pos = bin.findIndex( ( e ) => e === listener );\n\t\tif ( pos > -1 ) {\n\t\t\tbin.splice( pos, 1 );\n\t\t\tthis.listeners[ type ] = bin;\n\t\t}\n\t}\n\tdispatch( event ) {\n\t\tlet bin = this.listeners[ event.type ];\n\t\tif ( bin ) {\n\t\t\tfor ( let l = 0, e = bin.length; l < e; l++ ) {\n\t\t\t\tif ( ! event.__mayPropagate ) break;\n\t\t\t\tbin[ l ]( event );\n\t\t\t}\n\t\t}\n\t}\n}\nconst startDate = new Date( `1904-01-01T00:00:00+0000` ).getTime();\nfunction asText( data ) {\n\treturn Array.from( data )\n\t\t.map( ( v ) => String.fromCharCode( v ) )\n\t\t.join( `` );\n}\nclass Parser {\n\tconstructor( dict, dataview, name ) {\n\t\tthis.name = ( name || dict.tag || `` ).trim();\n\t\tthis.length = dict.length;\n\t\tthis.start = dict.offset;\n\t\tthis.offset = 0;\n\t\tthis.data = dataview;\n\t\t[\n\t\t\t`getInt8`,\n\t\t\t`getUint8`,\n\t\t\t`getInt16`,\n\t\t\t`getUint16`,\n\t\t\t`getInt32`,\n\t\t\t`getUint32`,\n\t\t\t`getBigInt64`,\n\t\t\t`getBigUint64`,\n\t\t].forEach( ( name ) => {\n\t\t\tlet fn = name.replace( /get(Big)?/, '' ).toLowerCase();\n\t\t\tlet increment = parseInt( name.replace( /[^\\d]/g, '' ) ) / 8;\n\t\t\tObject.defineProperty( this, fn, {\n\t\t\t\tget: () => this.getValue( name, increment ),\n\t\t\t} );\n\t\t} );\n\t}\n\tget currentPosition() {\n\t\treturn this.start + this.offset;\n\t}\n\tset currentPosition( position ) {\n\t\tthis.start = position;\n\t\tthis.offset = 0;\n\t}\n\tskip( n = 0, bits = 8 ) {\n\t\tthis.offset += ( n * bits ) / 8;\n\t}\n\tgetValue( type, increment ) {\n\t\tlet pos = this.start + this.offset;\n\t\tthis.offset += increment;\n\t\ttry {\n\t\t\treturn this.data[ type ]( pos );\n\t\t} catch ( e ) {\n\t\t\tconsole.error( `parser`, type, increment, this );\n\t\t\tconsole.error( `parser`, this.start, this.offset );\n\t\t\tthrow e;\n\t\t}\n\t}\n\tflags( n ) {\n\t\tif ( n === 8 || n === 16 || n === 32 || n === 64 ) {\n\t\t\treturn this[ `uint${ n }` ]\n\t\t\t\t.toString( 2 )\n\t\t\t\t.padStart( n, 0 )\n\t\t\t\t.split( `` )\n\t\t\t\t.map( ( v ) => v === '1' );\n\t\t}\n\t\tconsole.error(\n\t\t\t`Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long`\n\t\t);\n\t\tconsole.trace();\n\t}\n\tget tag() {\n\t\tconst t = this.uint32;\n\t\treturn asText( [\n\t\t\t( t >> 24 ) & 255,\n\t\t\t( t >> 16 ) & 255,\n\t\t\t( t >> 8 ) & 255,\n\t\t\tt & 255,\n\t\t] );\n\t}\n\tget fixed() {\n\t\tlet major = this.int16;\n\t\tlet minor = Math.round( ( 1e3 * this.uint16 ) / 65356 );\n\t\treturn major + minor / 1e3;\n\t}\n\tget legacyFixed() {\n\t\tlet major = this.uint16;\n\t\tlet minor = this.uint16.toString( 16 ).padStart( 4, 0 );\n\t\treturn parseFloat( `${ major }.${ minor }` );\n\t}\n\tget uint24() {\n\t\treturn ( this.uint8 << 16 ) + ( this.uint8 << 8 ) + this.uint8;\n\t}\n\tget uint128() {\n\t\tlet value = 0;\n\t\tfor ( let i = 0; i < 5; i++ ) {\n\t\t\tlet byte = this.uint8;\n\t\t\tvalue = value * 128 + ( byte & 127 );\n\t\t\tif ( byte < 128 ) break;\n\t\t}\n\t\treturn value;\n\t}\n\tget longdatetime() {\n\t\treturn new Date( startDate + 1e3 * parseInt( this.int64.toString() ) );\n\t}\n\tget fword() {\n\t\treturn this.int16;\n\t}\n\tget ufword() {\n\t\treturn this.uint16;\n\t}\n\tget Offset16() {\n\t\treturn this.uint16;\n\t}\n\tget Offset32() {\n\t\treturn this.uint32;\n\t}\n\tget F2DOT14() {\n\t\tconst bits = p.uint16;\n\t\tconst integer = [ 0, 1, -2, -1 ][ bits >> 14 ];\n\t\tconst fraction = bits & 16383;\n\t\treturn integer + fraction / 16384;\n\t}\n\tverifyLength() {\n\t\tif ( this.offset != this.length ) {\n\t\t\tconsole.error(\n\t\t\t\t`unexpected parsed table size (${ this.offset }) for \"${ this.name }\" (expected ${ this.length })`\n\t\t\t);\n\t\t}\n\t}\n\treadBytes( n = 0, position = 0, bits = 8, signed = false ) {\n\t\tn = n || this.length;\n\t\tif ( n === 0 ) return [];\n\t\tif ( position ) this.currentPosition = position;\n\t\tconst fn = `${ signed ? `` : `u` }int${ bits }`,\n\t\t\tslice = [];\n\t\twhile ( n-- ) slice.push( this[ fn ] );\n\t\treturn slice;\n\t}\n}\nclass ParsedData {\n\tconstructor( parser ) {\n\t\tconst pGetter = { enumerable: false, get: () => parser };\n\t\tObject.defineProperty( this, `parser`, pGetter );\n\t\tconst start = parser.currentPosition;\n\t\tconst startGetter = { enumerable: false, get: () => start };\n\t\tObject.defineProperty( this, `start`, startGetter );\n\t}\n\tload( struct ) {\n\t\tObject.keys( struct ).forEach( ( p ) => {\n\t\t\tlet props = Object.getOwnPropertyDescriptor( struct, p );\n\t\t\tif ( props.get ) {\n\t\t\t\tthis[ p ] = props.get.bind( this );\n\t\t\t} else if ( props.value !== undefined ) {\n\t\t\t\tthis[ p ] = props.value;\n\t\t\t}\n\t\t} );\n\t\tif ( this.parser.length ) {\n\t\t\tthis.parser.verifyLength();\n\t\t}\n\t}\n}\nclass SimpleTable extends ParsedData {\n\tconstructor( dict, dataview, name ) {\n\t\tconst { parser: parser, start: start } = super(\n\t\t\tnew Parser( dict, dataview, name )\n\t\t);\n\t\tconst pGetter = { enumerable: false, get: () => parser };\n\t\tObject.defineProperty( this, `p`, pGetter );\n\t\tconst startGetter = { enumerable: false, get: () => start };\n\t\tObject.defineProperty( this, `tableStart`, startGetter );\n\t}\n}\nfunction lazy$1( object, property, getter ) {\n\tlet val;\n\tObject.defineProperty( object, property, {\n\t\tget: () => {\n\t\t\tif ( val ) return val;\n\t\t\tval = getter();\n\t\t\treturn val;\n\t\t},\n\t\tenumerable: true,\n\t} );\n}\nclass SFNT extends SimpleTable {\n\tconstructor( font, dataview, createTable ) {\n\t\tconst { p: p } = super( { offset: 0, length: 12 }, dataview, `sfnt` );\n\t\tthis.version = p.uint32;\n\t\tthis.numTables = p.uint16;\n\t\tthis.searchRange = p.uint16;\n\t\tthis.entrySelector = p.uint16;\n\t\tthis.rangeShift = p.uint16;\n\t\tp.verifyLength();\n\t\tthis.directory = [ ...new Array( this.numTables ) ].map(\n\t\t\t( _ ) => new TableRecord( p )\n\t\t);\n\t\tthis.tables = {};\n\t\tthis.directory.forEach( ( entry ) => {\n\t\t\tconst getter = () =>\n\t\t\t\tcreateTable(\n\t\t\t\t\tthis.tables,\n\t\t\t\t\t{\n\t\t\t\t\t\ttag: entry.tag,\n\t\t\t\t\t\toffset: entry.offset,\n\t\t\t\t\t\tlength: entry.length,\n\t\t\t\t\t},\n\t\t\t\t\tdataview\n\t\t\t\t);\n\t\t\tlazy$1( this.tables, entry.tag.trim(), getter );\n\t\t} );\n\t}\n}\nclass TableRecord {\n\tconstructor( p ) {\n\t\tthis.tag = p.tag;\n\t\tthis.checksum = p.uint32;\n\t\tthis.offset = p.uint32;\n\t\tthis.length = p.uint32;\n\t}\n}\nconst gzipDecode = GzipDecode.inflate || undefined;\nlet nativeGzipDecode = undefined;\n// if ( ! gzipDecode ) {\n// \timport( 'zlib' ).then( ( zlib ) => {\n// \t\tnativeGzipDecode = ( buffer ) => zlib.unzipSync( buffer );\n// \t} );\n// }\nclass WOFF$1 extends SimpleTable {\n\tconstructor( font, dataview, createTable ) {\n\t\tconst { p: p } = super( { offset: 0, length: 44 }, dataview, `woff` );\n\t\tthis.signature = p.tag;\n\t\tthis.flavor = p.uint32;\n\t\tthis.length = p.uint32;\n\t\tthis.numTables = p.uint16;\n\t\tp.uint16;\n\t\tthis.totalSfntSize = p.uint32;\n\t\tthis.majorVersion = p.uint16;\n\t\tthis.minorVersion = p.uint16;\n\t\tthis.metaOffset = p.uint32;\n\t\tthis.metaLength = p.uint32;\n\t\tthis.metaOrigLength = p.uint32;\n\t\tthis.privOffset = p.uint32;\n\t\tthis.privLength = p.uint32;\n\t\tp.verifyLength();\n\t\tthis.directory = [ ...new Array( this.numTables ) ].map(\n\t\t\t( _ ) => new WoffTableDirectoryEntry( p )\n\t\t);\n\t\tbuildWoffLazyLookups( this, dataview, createTable );\n\t}\n}\nclass WoffTableDirectoryEntry {\n\tconstructor( p ) {\n\t\tthis.tag = p.tag;\n\t\tthis.offset = p.uint32;\n\t\tthis.compLength = p.uint32;\n\t\tthis.origLength = p.uint32;\n\t\tthis.origChecksum = p.uint32;\n\t}\n}\nfunction buildWoffLazyLookups( woff, dataview, createTable ) {\n\twoff.tables = {};\n\twoff.directory.forEach( ( entry ) => {\n\t\tlazy$1( woff.tables, entry.tag.trim(), () => {\n\t\t\tlet offset = 0;\n\t\t\tlet view = dataview;\n\t\t\tif ( entry.compLength !== entry.origLength ) {\n\t\t\t\tconst data = dataview.buffer.slice(\n\t\t\t\t\tentry.offset,\n\t\t\t\t\tentry.offset + entry.compLength\n\t\t\t\t);\n\t\t\t\tlet unpacked;\n\t\t\t\tif ( gzipDecode ) {\n\t\t\t\t\tunpacked = gzipDecode( new Uint8Array( data ) );\n\t\t\t\t} else if ( nativeGzipDecode ) {\n\t\t\t\t\tunpacked = nativeGzipDecode( new Uint8Array( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tconst msg = `no brotli decoder available to decode WOFF2 font`;\n\t\t\t\t\tif ( font.onerror ) font.onerror( msg );\n\t\t\t\t\tthrow new Error( msg );\n\t\t\t\t}\n\t\t\t\tview = new DataView( unpacked.buffer );\n\t\t\t} else {\n\t\t\t\toffset = entry.offset;\n\t\t\t}\n\t\t\treturn createTable(\n\t\t\t\twoff.tables,\n\t\t\t\t{ tag: entry.tag, offset: offset, length: entry.origLength },\n\t\t\t\tview\n\t\t\t);\n\t\t} );\n\t} );\n}\nconst brotliDecode = unbrotli;\nlet nativeBrotliDecode = undefined;\n// if ( ! brotliDecode ) {\n// \timport( 'zlib' ).then( ( zlib ) => {\n// \t\tnativeBrotliDecode = ( buffer ) => zlib.brotliDecompressSync( buffer );\n// \t} );\n// }\nclass WOFF2$1 extends SimpleTable {\n\tconstructor( font, dataview, createTable ) {\n\t\tconst { p: p } = super( { offset: 0, length: 48 }, dataview, `woff2` );\n\t\tthis.signature = p.tag;\n\t\tthis.flavor = p.uint32;\n\t\tthis.length = p.uint32;\n\t\tthis.numTables = p.uint16;\n\t\tp.uint16;\n\t\tthis.totalSfntSize = p.uint32;\n\t\tthis.totalCompressedSize = p.uint32;\n\t\tthis.majorVersion = p.uint16;\n\t\tthis.minorVersion = p.uint16;\n\t\tthis.metaOffset = p.uint32;\n\t\tthis.metaLength = p.uint32;\n\t\tthis.metaOrigLength = p.uint32;\n\t\tthis.privOffset = p.uint32;\n\t\tthis.privLength = p.uint32;\n\t\tp.verifyLength();\n\t\tthis.directory = [ ...new Array( this.numTables ) ].map(\n\t\t\t( _ ) => new Woff2TableDirectoryEntry( p )\n\t\t);\n\t\tlet dictOffset = p.currentPosition;\n\t\tthis.directory[ 0 ].offset = 0;\n\t\tthis.directory.forEach( ( e, i ) => {\n\t\t\tlet next = this.directory[ i + 1 ];\n\t\t\tif ( next ) {\n\t\t\t\tnext.offset =\n\t\t\t\t\te.offset +\n\t\t\t\t\t( e.transformLength !== undefined\n\t\t\t\t\t\t? e.transformLength\n\t\t\t\t\t\t: e.origLength );\n\t\t\t}\n\t\t} );\n\t\tlet decoded;\n\t\tlet buffer = dataview.buffer.slice( dictOffset );\n\t\tif ( brotliDecode ) {\n\t\t\tdecoded = brotliDecode( new Uint8Array( buffer ) );\n\t\t} else if ( nativeBrotliDecode ) {\n\t\t\tdecoded = new Uint8Array( nativeBrotliDecode( buffer ) );\n\t\t} else {\n\t\t\tconst msg = `no brotli decoder available to decode WOFF2 font`;\n\t\t\tif ( font.onerror ) font.onerror( msg );\n\t\t\tthrow new Error( msg );\n\t\t}\n\t\tbuildWoff2LazyLookups( this, decoded, createTable );\n\t}\n}\nclass Woff2TableDirectoryEntry {\n\tconstructor( p ) {\n\t\tthis.flags = p.uint8;\n\t\tconst tagNumber = ( this.tagNumber = this.flags & 63 );\n\t\tif ( tagNumber === 63 ) {\n\t\t\tthis.tag = p.tag;\n\t\t} else {\n\t\t\tthis.tag = getWOFF2Tag( tagNumber );\n\t\t}\n\t\tconst transformVersion = ( this.transformVersion =\n\t\t\t( this.flags & 192 ) >> 6 );\n\t\tlet hasTransforms = transformVersion !== 0;\n\t\tif ( this.tag === `glyf` || this.tag === `loca` ) {\n\t\t\thasTransforms = this.transformVersion !== 3;\n\t\t}\n\t\tthis.origLength = p.uint128;\n\t\tif ( hasTransforms ) {\n\t\t\tthis.transformLength = p.uint128;\n\t\t}\n\t}\n}\nfunction buildWoff2LazyLookups( woff2, decoded, createTable ) {\n\twoff2.tables = {};\n\twoff2.directory.forEach( ( entry ) => {\n\t\tlazy$1( woff2.tables, entry.tag.trim(), () => {\n\t\t\tconst start = entry.offset;\n\t\t\tconst end =\n\t\t\t\tstart +\n\t\t\t\t( entry.transformLength\n\t\t\t\t\t? entry.transformLength\n\t\t\t\t\t: entry.origLength );\n\t\t\tconst data = new DataView( decoded.slice( start, end ).buffer );\n\t\t\ttry {\n\t\t\t\treturn createTable(\n\t\t\t\t\twoff2.tables,\n\t\t\t\t\t{ tag: entry.tag, offset: 0, length: entry.origLength },\n\t\t\t\t\tdata\n\t\t\t\t);\n\t\t\t} catch ( e ) {\n\t\t\t\tconsole.error( e );\n\t\t\t}\n\t\t} );\n\t} );\n}\nfunction getWOFF2Tag( flag ) {\n\treturn [\n\t\t`cmap`,\n\t\t`head`,\n\t\t`hhea`,\n\t\t`hmtx`,\n\t\t`maxp`,\n\t\t`name`,\n\t\t`OS/2`,\n\t\t`post`,\n\t\t`cvt `,\n\t\t`fpgm`,\n\t\t`glyf`,\n\t\t`loca`,\n\t\t`prep`,\n\t\t`CFF `,\n\t\t`VORG`,\n\t\t`EBDT`,\n\t\t`EBLC`,\n\t\t`gasp`,\n\t\t`hdmx`,\n\t\t`kern`,\n\t\t`LTSH`,\n\t\t`PCLT`,\n\t\t`VDMX`,\n\t\t`vhea`,\n\t\t`vmtx`,\n\t\t`BASE`,\n\t\t`GDEF`,\n\t\t`GPOS`,\n\t\t`GSUB`,\n\t\t`EBSC`,\n\t\t`JSTF`,\n\t\t`MATH`,\n\t\t`CBDT`,\n\t\t`CBLC`,\n\t\t`COLR`,\n\t\t`CPAL`,\n\t\t`SVG `,\n\t\t`sbix`,\n\t\t`acnt`,\n\t\t`avar`,\n\t\t`bdat`,\n\t\t`bloc`,\n\t\t`bsln`,\n\t\t`cvar`,\n\t\t`fdsc`,\n\t\t`feat`,\n\t\t`fmtx`,\n\t\t`fvar`,\n\t\t`gvar`,\n\t\t`hsty`,\n\t\t`just`,\n\t\t`lcar`,\n\t\t`mort`,\n\t\t`morx`,\n\t\t`opbd`,\n\t\t`prop`,\n\t\t`trak`,\n\t\t`Zapf`,\n\t\t`Silf`,\n\t\t`Glat`,\n\t\t`Gloc`,\n\t\t`Feat`,\n\t\t`Sill`,\n\t][ flag & 63 ];\n}\nconst tableClasses = {};\nlet tableClassesLoaded = false;\nPromise.all( [\n\tPromise.resolve().then( function () {\n\t\treturn cmap$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn head$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn hhea$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn hmtx$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn maxp$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn name$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn OS2$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn post$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn BASE$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn GDEF$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn GSUB$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn GPOS$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn SVG$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn fvar$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn cvt$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn fpgm$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn gasp$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn glyf$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn loca$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn prep$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn CFF$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn CFF2$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn VORG$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn EBLC$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn EBDT$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn EBSC$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn CBLC$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn CBDT$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn sbix$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn COLR$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn CPAL$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn DSIG$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn hdmx$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn kern$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn LTSH$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn MERG$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn meta$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn PCLT$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn VDMX$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn vhea$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn vmtx$1;\n\t} ),\n] ).then( ( data ) => {\n\tdata.forEach( ( e ) => {\n\t\tlet name = Object.keys( e )[ 0 ];\n\t\ttableClasses[ name ] = e[ name ];\n\t} );\n\ttableClassesLoaded = true;\n} );\nfunction createTable( tables, dict, dataview ) {\n\tlet name = dict.tag.replace( /[^\\w\\d]/g, `` );\n\tlet Type = tableClasses[ name ];\n\tif ( Type ) return new Type( dict, dataview, tables );\n\tconsole.warn(\n\t\t`lib-font has no definition for ${ name }. The table was skipped.`\n\t);\n\treturn {};\n}\nfunction loadTableClasses() {\n\tlet count = 0;\n\tfunction checkLoaded( resolve, reject ) {\n\t\tif ( ! tableClassesLoaded ) {\n\t\t\tif ( count > 10 ) {\n\t\t\t\treturn reject( new Error( `loading took too long` ) );\n\t\t\t}\n\t\t\tcount++;\n\t\t\treturn setTimeout( () => checkLoaded( resolve ), 250 );\n\t\t}\n\t\tresolve( createTable );\n\t}\n\treturn new Promise( ( resolve, reject ) => checkLoaded( resolve ) );\n}\nfunction getFontCSSFormat( path, errorOnStyle ) {\n\tlet pos = path.lastIndexOf( `.` );\n\tlet ext = ( path.substring( pos + 1 ) || `` ).toLowerCase();\n\tlet format = {\n\t\tttf: `truetype`,\n\t\totf: `opentype`,\n\t\twoff: `woff`,\n\t\twoff2: `woff2`,\n\t}[ ext ];\n\tif ( format ) return format;\n\tlet msg = {\n\t\teot: `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.`,\n\t\tsvg: `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.`,\n\t\tfon: `The .fon format is not supported: this is an ancient Windows bitmap font format.`,\n\t\tttc: `Based on the current CSS specification, font collections are not (yet?) supported.`,\n\t}[ ext ];\n\tif ( ! msg ) msg = `${ path } is not a known webfont format.`;\n\tif ( errorOnStyle ) {\n\t\tthrow new Error( msg );\n\t} else {\n\t\tconsole.warn( `Could not load font: ${ msg }` );\n\t}\n}\nasync function setupFontFace( name, url, options = {} ) {\n\tif ( ! globalThis.document ) return;\n\tlet format = getFontCSSFormat( url, options.errorOnStyle );\n\tif ( ! format ) return;\n\tlet style = document.createElement( `style` );\n\tstyle.className = `injected-by-Font-js`;\n\tlet rules = [];\n\tif ( options.styleRules ) {\n\t\trules = Object.entries( options.styleRules ).map(\n\t\t\t( [ key, value ] ) => `${ key }: ${ value };`\n\t\t);\n\t}\n\tstyle.textContent = `\\n@font-face {\\n font-family: \"${ name }\";\\n ${ rules.join(\n\t\t`\\n\\t`\n\t) }\\n src: url(\"${ url }\") format(\"${ format }\");\\n}`;\n\tglobalThis.document.head.appendChild( style );\n\treturn style;\n}\nconst TTF = [ 0, 1, 0, 0 ];\nconst OTF = [ 79, 84, 84, 79 ];\nconst WOFF = [ 119, 79, 70, 70 ];\nconst WOFF2 = [ 119, 79, 70, 50 ];\nfunction match( ar1, ar2 ) {\n\tif ( ar1.length !== ar2.length ) return;\n\tfor ( let i = 0; i < ar1.length; i++ ) {\n\t\tif ( ar1[ i ] !== ar2[ i ] ) return;\n\t}\n\treturn true;\n}\nfunction validFontFormat( dataview ) {\n\tconst LEAD_BYTES = [\n\t\tdataview.getUint8( 0 ),\n\t\tdataview.getUint8( 1 ),\n\t\tdataview.getUint8( 2 ),\n\t\tdataview.getUint8( 3 ),\n\t];\n\tif ( match( LEAD_BYTES, TTF ) || match( LEAD_BYTES, OTF ) ) return `SFNT`;\n\tif ( match( LEAD_BYTES, WOFF ) ) return `WOFF`;\n\tif ( match( LEAD_BYTES, WOFF2 ) ) return `WOFF2`;\n}\nfunction checkFetchResponseStatus( response ) {\n\tif ( ! response.ok ) {\n\t\tthrow new Error(\n\t\t\t`HTTP ${ response.status } - ${ response.statusText }`\n\t\t);\n\t}\n\treturn response;\n}\nclass Font extends EventManager {\n\tconstructor( name, options = {} ) {\n\t\tsuper();\n\t\tthis.name = name;\n\t\tthis.options = options;\n\t\tthis.metrics = false;\n\t}\n\tget src() {\n\t\treturn this.__src;\n\t}\n\tset src( src ) {\n\t\tthis.__src = src;\n\t\t( async () => {\n\t\t\tif ( globalThis.document && ! this.options.skipStyleSheet ) {\n\t\t\t\tawait setupFontFace( this.name, src, this.options );\n\t\t\t}\n\t\t\tthis.loadFont( src );\n\t\t} )();\n\t}\n\tasync loadFont( url, filename ) {\n\t\tfetch( url )\n\t\t\t.then(\n\t\t\t\t( response ) =>\n\t\t\t\t\tcheckFetchResponseStatus( response ) &&\n\t\t\t\t\tresponse.arrayBuffer()\n\t\t\t)\n\t\t\t.then( ( buffer ) =>\n\t\t\t\tthis.fromDataBuffer( buffer, filename || url )\n\t\t\t)\n\t\t\t.catch( ( err ) => {\n\t\t\t\tconst evt = new Event(\n\t\t\t\t\t`error`,\n\t\t\t\t\terr,\n\t\t\t\t\t`Failed to load font at ${ filename || url }`\n\t\t\t\t);\n\t\t\t\tthis.dispatch( evt );\n\t\t\t\tif ( this.onerror ) this.onerror( evt );\n\t\t\t} );\n\t}\n\tasync fromDataBuffer( buffer, filenameOrUrL ) {\n\t\tthis.fontData = new DataView( buffer );\n\t\tlet type = validFontFormat( this.fontData );\n\t\tif ( ! type ) {\n\t\t\tthrow new Error(\n\t\t\t\t`${ filenameOrUrL } is either an unsupported font format, or not a font at all.`\n\t\t\t);\n\t\t}\n\t\tawait this.parseBasicData( type );\n\t\tconst evt = new Event( 'load', { font: this } );\n\t\tthis.dispatch( evt );\n\t\tif ( this.onload ) this.onload( evt );\n\t}\n\tasync parseBasicData( type ) {\n\t\treturn loadTableClasses().then( ( createTable ) => {\n\t\t\tif ( type === `SFNT` ) {\n\t\t\t\tthis.opentype = new SFNT( this, this.fontData, createTable );\n\t\t\t}\n\t\t\tif ( type === `WOFF` ) {\n\t\t\t\tthis.opentype = new WOFF$1( this, this.fontData, createTable );\n\t\t\t}\n\t\t\tif ( type === `WOFF2` ) {\n\t\t\t\tthis.opentype = new WOFF2$1( this, this.fontData, createTable );\n\t\t\t}\n\t\t\treturn this.opentype;\n\t\t} );\n\t}\n\tgetGlyphId( char ) {\n\t\treturn this.opentype.tables.cmap.getGlyphId( char );\n\t}\n\treverse( glyphid ) {\n\t\treturn this.opentype.tables.cmap.reverse( glyphid );\n\t}\n\tsupports( char ) {\n\t\treturn this.getGlyphId( char ) !== 0;\n\t}\n\tsupportsVariation( variation ) {\n\t\treturn (\n\t\t\tthis.opentype.tables.cmap.supportsVariation( variation ) !== false\n\t\t);\n\t}\n\tmeasureText( text, size = 16 ) {\n\t\tif ( this.__unloaded )\n\t\t\tthrow new Error(\n\t\t\t\t'Cannot measure text: font was unloaded. Please reload before calling measureText()'\n\t\t\t);\n\t\tlet d = document.createElement( 'div' );\n\t\td.textContent = text;\n\t\td.style.fontFamily = this.name;\n\t\td.style.fontSize = `${ size }px`;\n\t\td.style.color = `transparent`;\n\t\td.style.background = `transparent`;\n\t\td.style.top = `0`;\n\t\td.style.left = `0`;\n\t\td.style.position = `absolute`;\n\t\tdocument.body.appendChild( d );\n\t\tlet bbox = d.getBoundingClientRect();\n\t\tdocument.body.removeChild( d );\n\t\tconst OS2 = this.opentype.tables[ 'OS/2' ];\n\t\tbbox.fontSize = size;\n\t\tbbox.ascender = OS2.sTypoAscender;\n\t\tbbox.descender = OS2.sTypoDescender;\n\t\treturn bbox;\n\t}\n\tunload() {\n\t\tif ( this.styleElement.parentNode ) {\n\t\t\tthis.styleElement.parentNode.removeElement( this.styleElement );\n\t\t\tconst evt = new Event( 'unload', { font: this } );\n\t\t\tthis.dispatch( evt );\n\t\t\tif ( this.onunload ) this.onunload( evt );\n\t\t}\n\t\tthis._unloaded = true;\n\t}\n\tload() {\n\t\tif ( this.__unloaded ) {\n\t\t\tdelete this.__unloaded;\n\t\t\tdocument.head.appendChild( this.styleElement );\n\t\t\tconst evt = new Event( 'load', { font: this } );\n\t\t\tthis.dispatch( evt );\n\t\t\tif ( this.onload ) this.onload( evt );\n\t\t}\n\t}\n}\nglobalThis.Font = Font;\nclass Subtable extends ParsedData {\n\tconstructor( p, plaformID, encodingID ) {\n\t\tsuper( p );\n\t\tthis.plaformID = plaformID;\n\t\tthis.encodingID = encodingID;\n\t}\n}\nclass Format0 extends Subtable {\n\tconstructor( p, platformID, encodingID ) {\n\t\tsuper( p, platformID, encodingID );\n\t\tthis.format = 0;\n\t\tthis.length = p.uint16;\n\t\tthis.language = p.uint16;\n\t\tthis.glyphIdArray = [ ...new Array( 256 ) ].map( ( _ ) => p.uint8 );\n\t}\n\tsupports( charCode ) {\n\t\tif ( charCode.charCodeAt ) {\n\t\t\tcharCode = -1;\n\t\t\tconsole.warn(\n\t\t\t\t`supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.`\n\t\t\t);\n\t\t}\n\t\treturn 0 <= charCode && charCode <= 255;\n\t}\n\treverse( glyphID ) {\n\t\tconsole.warn( `reverse not implemented for cmap subtable format 0` );\n\t\treturn {};\n\t}\n\tgetSupportedCharCodes() {\n\t\treturn [ { start: 1, end: 256 } ];\n\t}\n}\nclass Format2 extends Subtable {\n\tconstructor( p, platformID, encodingID ) {\n\t\tsuper( p, platformID, encodingID );\n\t\tthis.format = 2;\n\t\tthis.length = p.uint16;\n\t\tthis.language = p.uint16;\n\t\tthis.subHeaderKeys = [ ...new Array( 256 ) ].map( ( _ ) => p.uint16 );\n\t\tconst subHeaderCount = Math.max( ...this.subHeaderKeys );\n\t\tconst subHeaderOffset = p.currentPosition;\n\t\tlazy$1( this, `subHeaders`, () => {\n\t\t\tp.currentPosition = subHeaderOffset;\n\t\t\treturn [ ...new Array( subHeaderCount ) ].map(\n\t\t\t\t( _ ) => new SubHeader( p )\n\t\t\t);\n\t\t} );\n\t\tconst glyphIndexOffset = subHeaderOffset + subHeaderCount * 8;\n\t\tlazy$1( this, `glyphIndexArray`, () => {\n\t\t\tp.currentPosition = glyphIndexOffset;\n\t\t\treturn [ ...new Array( subHeaderCount ) ].map( ( _ ) => p.uint16 );\n\t\t} );\n\t}\n\tsupports( charCode ) {\n\t\tif ( charCode.charCodeAt ) {\n\t\t\tcharCode = -1;\n\t\t\tconsole.warn(\n\t\t\t\t`supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented.`\n\t\t\t);\n\t\t}\n\t\tconst low = charCode && 255;\n\t\tconst high = charCode && 65280;\n\t\tconst subHeaderKey = this.subHeaders[ high ];\n\t\tconst subheader = this.subHeaders[ subHeaderKey ];\n\t\tconst first = subheader.firstCode;\n\t\tconst last = first + subheader.entryCount;\n\t\treturn first <= low && low <= last;\n\t}\n\treverse( glyphID ) {\n\t\tconsole.warn( `reverse not implemented for cmap subtable format 2` );\n\t\treturn {};\n\t}\n\tgetSupportedCharCodes( preservePropNames = false ) {\n\t\tif ( preservePropNames ) {\n\t\t\treturn this.subHeaders.map( ( h ) => ( {\n\t\t\t\tfirstCode: h.firstCode,\n\t\t\t\tlastCode: h.lastCode,\n\t\t\t} ) );\n\t\t}\n\t\treturn this.subHeaders.map( ( h ) => ( {\n\t\t\tstart: h.firstCode,\n\t\t\tend: h.lastCode,\n\t\t} ) );\n\t}\n}\nclass SubHeader {\n\tconstructor( p ) {\n\t\tthis.firstCode = p.uint16;\n\t\tthis.entryCount = p.uint16;\n\t\tthis.lastCode = this.first + this.entryCount;\n\t\tthis.idDelta = p.int16;\n\t\tthis.idRangeOffset = p.uint16;\n\t}\n}\nclass Format4 extends Subtable {\n\tconstructor( p, platformID, encodingID ) {\n\t\tsuper( p, platformID, encodingID );\n\t\tthis.format = 4;\n\t\tthis.length = p.uint16;\n\t\tthis.language = p.uint16;\n\t\tthis.segCountX2 = p.uint16;\n\t\tthis.segCount = this.segCountX2 / 2;\n\t\tthis.searchRange = p.uint16;\n\t\tthis.entrySelector = p.uint16;\n\t\tthis.rangeShift = p.uint16;\n\t\tconst endCodePosition = p.currentPosition;\n\t\tlazy$1( this, `endCode`, () =>\n\t\t\tp.readBytes( this.segCount, endCodePosition, 16 )\n\t\t);\n\t\tconst startCodePosition = endCodePosition + 2 + this.segCountX2;\n\t\tlazy$1( this, `startCode`, () =>\n\t\t\tp.readBytes( this.segCount, startCodePosition, 16 )\n\t\t);\n\t\tconst idDeltaPosition = startCodePosition + this.segCountX2;\n\t\tlazy$1( this, `idDelta`, () =>\n\t\t\tp.readBytes( this.segCount, idDeltaPosition, 16, true )\n\t\t);\n\t\tconst idRangePosition = idDeltaPosition + this.segCountX2;\n\t\tlazy$1( this, `idRangeOffset`, () =>\n\t\t\tp.readBytes( this.segCount, idRangePosition, 16 )\n\t\t);\n\t\tconst glyphIdArrayPosition = idRangePosition + this.segCountX2;\n\t\tconst glyphIdArrayLength =\n\t\t\tthis.length - ( glyphIdArrayPosition - this.tableStart );\n\t\tlazy$1( this, `glyphIdArray`, () =>\n\t\t\tp.readBytes( glyphIdArrayLength, glyphIdArrayPosition, 16 )\n\t\t);\n\t\tlazy$1( this, `segments`, () =>\n\t\t\tthis.buildSegments( idRangePosition, glyphIdArrayPosition, p )\n\t\t);\n\t}\n\tbuildSegments( idRangePosition, glyphIdArrayPosition, p ) {\n\t\tconst build = ( _, i ) => {\n\t\t\tlet startCode = this.startCode[ i ],\n\t\t\t\tendCode = this.endCode[ i ],\n\t\t\t\tidDelta = this.idDelta[ i ],\n\t\t\t\tidRangeOffset = this.idRangeOffset[ i ],\n\t\t\t\tidRangeOffsetPointer = idRangePosition + 2 * i,\n\t\t\t\tglyphIDs = [];\n\t\t\tif ( idRangeOffset === 0 ) {\n\t\t\t\tfor (\n\t\t\t\t\tlet i = startCode + idDelta, e = endCode + idDelta;\n\t\t\t\t\ti <= e;\n\t\t\t\t\ti++\n\t\t\t\t) {\n\t\t\t\t\tglyphIDs.push( i );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( let i = 0, e = endCode - startCode; i <= e; i++ ) {\n\t\t\t\t\tp.currentPosition =\n\t\t\t\t\t\tidRangeOffsetPointer + idRangeOffset + i * 2;\n\t\t\t\t\tglyphIDs.push( p.uint16 );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tstartCode: startCode,\n\t\t\t\tendCode: endCode,\n\t\t\t\tidDelta: idDelta,\n\t\t\t\tidRangeOffset: idRangeOffset,\n\t\t\t\tglyphIDs: glyphIDs,\n\t\t\t};\n\t\t};\n\t\treturn [ ...new Array( this.segCount ) ].map( build );\n\t}\n\treverse( glyphID ) {\n\t\tlet s = this.segments.find( ( v ) => v.glyphIDs.includes( glyphID ) );\n\t\tif ( ! s ) return {};\n\t\tconst code = s.startCode + s.glyphIDs.indexOf( glyphID );\n\t\treturn { code: code, unicode: String.fromCodePoint( code ) };\n\t}\n\tgetGlyphId( charCode ) {\n\t\tif ( charCode.charCodeAt ) charCode = charCode.charCodeAt( 0 );\n\t\tif ( 55296 <= charCode && charCode <= 57343 ) return 0;\n\t\tif ( ( charCode & 65534 ) === 65534 || ( charCode & 65535 ) === 65535 )\n\t\t\treturn 0;\n\t\tlet segment = this.segments.find(\n\t\t\t( s ) => s.startCode <= charCode && charCode <= s.endCode\n\t\t);\n\t\tif ( ! segment ) return 0;\n\t\treturn segment.glyphIDs[ charCode - segment.startCode ];\n\t}\n\tsupports( charCode ) {\n\t\treturn this.getGlyphId( charCode ) !== 0;\n\t}\n\tgetSupportedCharCodes( preservePropNames = false ) {\n\t\tif ( preservePropNames ) return this.segments;\n\t\treturn this.segments.map( ( v ) => ( {\n\t\t\tstart: v.startCode,\n\t\t\tend: v.endCode,\n\t\t} ) );\n\t}\n}\nclass Format6 extends Subtable {\n\tconstructor( p, platformID, encodingID ) {\n\t\tsuper( p, platformID, encodingID );\n\t\tthis.format = 6;\n\t\tthis.length = p.uint16;\n\t\tthis.language = p.uint16;\n\t\tthis.firstCode = p.uint16;\n\t\tthis.entryCount = p.uint16;\n\t\tthis.lastCode = this.firstCode + this.entryCount - 1;\n\t\tconst getter = () =>\n\t\t\t[ ...new Array( this.entryCount ) ].map( ( _ ) => p.uint16 );\n\t\tlazy$1( this, `glyphIdArray`, getter );\n\t}\n\tsupports( charCode ) {\n\t\tif ( charCode.charCodeAt ) {\n\t\t\tcharCode = -1;\n\t\t\tconsole.warn(\n\t\t\t\t`supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.`\n\t\t\t);\n\t\t}\n\t\tif ( charCode < this.firstCode ) return {};\n\t\tif ( charCode > this.firstCode + this.entryCount ) return {};\n\t\tconst code = charCode - this.firstCode;\n\t\treturn { code: code, unicode: String.fromCodePoint( code ) };\n\t}\n\treverse( glyphID ) {\n\t\tlet pos = this.glyphIdArray.indexOf( glyphID );\n\t\tif ( pos > -1 ) return this.firstCode + pos;\n\t}\n\tgetSupportedCharCodes( preservePropNames = false ) {\n\t\tif ( preservePropNames ) {\n\t\t\treturn [ { firstCode: this.firstCode, lastCode: this.lastCode } ];\n\t\t}\n\t\treturn [ { start: this.firstCode, end: this.lastCode } ];\n\t}\n}\nclass Format8 extends Subtable {\n\tconstructor( p, platformID, encodingID ) {\n\t\tsuper( p, platformID, encodingID );\n\t\tthis.format = 8;\n\t\tp.uint16;\n\t\tthis.length = p.uint32;\n\t\tthis.language = p.uint32;\n\t\tthis.is32 = [ ...new Array( 8192 ) ].map( ( _ ) => p.uint8 );\n\t\tthis.numGroups = p.uint32;\n\t\tconst getter = () =>\n\t\t\t[ ...new Array( this.numGroups ) ].map(\n\t\t\t\t( _ ) => new SequentialMapGroup$1( p )\n\t\t\t);\n\t\tlazy$1( this, `groups`, getter );\n\t}\n\tsupports( charCode ) {\n\t\tif ( charCode.charCodeAt ) {\n\t\t\tcharCode = -1;\n\t\t\tconsole.warn(\n\t\t\t\t`supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.`\n\t\t\t);\n\t\t}\n\t\treturn (\n\t\t\tthis.groups.findIndex(\n\t\t\t\t( s ) =>\n\t\t\t\t\ts.startcharCode <= charCode && charCode <= s.endcharCode\n\t\t\t) !== -1\n\t\t);\n\t}\n\treverse( glyphID ) {\n\t\tconsole.warn( `reverse not implemented for cmap subtable format 8` );\n\t\treturn {};\n\t}\n\tgetSupportedCharCodes( preservePropNames = false ) {\n\t\tif ( preservePropNames ) return this.groups;\n\t\treturn this.groups.map( ( v ) => ( {\n\t\t\tstart: v.startcharCode,\n\t\t\tend: v.endcharCode,\n\t\t} ) );\n\t}\n}\nclass SequentialMapGroup$1 {\n\tconstructor( p ) {\n\t\tthis.startcharCode = p.uint32;\n\t\tthis.endcharCode = p.uint32;\n\t\tthis.startGlyphID = p.uint32;\n\t}\n}\nclass Format10 extends Subtable {\n\tconstructor( p, platformID, encodingID ) {\n\t\tsuper( p, platformID, encodingID );\n\t\tthis.format = 10;\n\t\tp.uint16;\n\t\tthis.length = p.uint32;\n\t\tthis.language = p.uint32;\n\t\tthis.startCharCode = p.uint32;\n\t\tthis.numChars = p.uint32;\n\t\tthis.endCharCode = this.startCharCode + this.numChars;\n\t\tconst getter = () =>\n\t\t\t[ ...new Array( this.numChars ) ].map( ( _ ) => p.uint16 );\n\t\tlazy$1( this, `glyphs`, getter );\n\t}\n\tsupports( charCode ) {\n\t\tif ( charCode.charCodeAt ) {\n\t\t\tcharCode = -1;\n\t\t\tconsole.warn(\n\t\t\t\t`supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.`\n\t\t\t);\n\t\t}\n\t\tif ( charCode < this.startCharCode ) return false;\n\t\tif ( charCode > this.startCharCode + this.numChars ) return false;\n\t\treturn charCode - this.startCharCode;\n\t}\n\treverse( glyphID ) {\n\t\tconsole.warn( `reverse not implemented for cmap subtable format 10` );\n\t\treturn {};\n\t}\n\tgetSupportedCharCodes( preservePropNames = false ) {\n\t\tif ( preservePropNames ) {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tstartCharCode: this.startCharCode,\n\t\t\t\t\tendCharCode: this.endCharCode,\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\t\treturn [ { start: this.startCharCode, end: this.endCharCode } ];\n\t}\n}\nclass Format12 extends Subtable {\n\tconstructor( p, platformID, encodingID ) {\n\t\tsuper( p, platformID, encodingID );\n\t\tthis.format = 12;\n\t\tp.uint16;\n\t\tthis.length = p.uint32;\n\t\tthis.language = p.uint32;\n\t\tthis.numGroups = p.uint32;\n\t\tconst getter = () =>\n\t\t\t[ ...new Array( this.numGroups ) ].map(\n\t\t\t\t( _ ) => new SequentialMapGroup( p )\n\t\t\t);\n\t\tlazy$1( this, `groups`, getter );\n\t}\n\tsupports( charCode ) {\n\t\tif ( charCode.charCodeAt ) charCode = charCode.charCodeAt( 0 );\n\t\tif ( 55296 <= charCode && charCode <= 57343 ) return 0;\n\t\tif ( ( charCode & 65534 ) === 65534 || ( charCode & 65535 ) === 65535 )\n\t\t\treturn 0;\n\t\treturn (\n\t\t\tthis.groups.findIndex(\n\t\t\t\t( s ) =>\n\t\t\t\t\ts.startCharCode <= charCode && charCode <= s.endCharCode\n\t\t\t) !== -1\n\t\t);\n\t}\n\treverse( glyphID ) {\n\t\tfor ( let group of this.groups ) {\n\t\t\tlet start = group.startGlyphID;\n\t\t\tif ( start > glyphID ) continue;\n\t\t\tif ( start === glyphID ) return group.startCharCode;\n\t\t\tlet end = start + ( group.endCharCode - group.startCharCode );\n\t\t\tif ( end < glyphID ) continue;\n\t\t\tconst code = group.startCharCode + ( glyphID - start );\n\t\t\treturn { code: code, unicode: String.fromCodePoint( code ) };\n\t\t}\n\t\treturn {};\n\t}\n\tgetSupportedCharCodes( preservePropNames = false ) {\n\t\tif ( preservePropNames ) return this.groups;\n\t\treturn this.groups.map( ( v ) => ( {\n\t\t\tstart: v.startCharCode,\n\t\t\tend: v.endCharCode,\n\t\t} ) );\n\t}\n}\nclass SequentialMapGroup {\n\tconstructor( p ) {\n\t\tthis.startCharCode = p.uint32;\n\t\tthis.endCharCode = p.uint32;\n\t\tthis.startGlyphID = p.uint32;\n\t}\n}\nclass Format13 extends Subtable {\n\tconstructor( p, platformID, encodingID ) {\n\t\tsuper( p, platformID, encodingID );\n\t\tthis.format = 13;\n\t\tp.uint16;\n\t\tthis.length = p.uint32;\n\t\tthis.language = p.uint32;\n\t\tthis.numGroups = p.uint32;\n\t\tconst getter = [ ...new Array( this.numGroups ) ].map(\n\t\t\t( _ ) => new ConstantMapGroup( p )\n\t\t);\n\t\tlazy$1( this, `groups`, getter );\n\t}\n\tsupports( charCode ) {\n\t\tif ( charCode.charCodeAt ) charCode = charCode.charCodeAt( 0 );\n\t\treturn (\n\t\t\tthis.groups.findIndex(\n\t\t\t\t( s ) =>\n\t\t\t\t\ts.startCharCode <= charCode && charCode <= s.endCharCode\n\t\t\t) !== -1\n\t\t);\n\t}\n\treverse( glyphID ) {\n\t\tconsole.warn( `reverse not implemented for cmap subtable format 13` );\n\t\treturn {};\n\t}\n\tgetSupportedCharCodes( preservePropNames = false ) {\n\t\tif ( preservePropNames ) return this.groups;\n\t\treturn this.groups.map( ( v ) => ( {\n\t\t\tstart: v.startCharCode,\n\t\t\tend: v.endCharCode,\n\t\t} ) );\n\t}\n}\nclass ConstantMapGroup {\n\tconstructor( p ) {\n\t\tthis.startCharCode = p.uint32;\n\t\tthis.endCharCode = p.uint32;\n\t\tthis.glyphID = p.uint32;\n\t}\n}\nclass Format14 extends Subtable {\n\tconstructor( p, platformID, encodingID ) {\n\t\tsuper( p, platformID, encodingID );\n\t\tthis.subTableStart = p.currentPosition;\n\t\tthis.format = 14;\n\t\tthis.length = p.uint32;\n\t\tthis.numVarSelectorRecords = p.uint32;\n\t\tlazy$1( this, `varSelectors`, () =>\n\t\t\t[ ...new Array( this.numVarSelectorRecords ) ].map(\n\t\t\t\t( _ ) => new VariationSelector( p )\n\t\t\t)\n\t\t);\n\t}\n\tsupports() {\n\t\tconsole.warn( `supports not implemented for cmap subtable format 14` );\n\t\treturn 0;\n\t}\n\tgetSupportedCharCodes() {\n\t\tconsole.warn(\n\t\t\t`getSupportedCharCodes not implemented for cmap subtable format 14`\n\t\t);\n\t\treturn [];\n\t}\n\treverse( glyphID ) {\n\t\tconsole.warn( `reverse not implemented for cmap subtable format 14` );\n\t\treturn {};\n\t}\n\tsupportsVariation( variation ) {\n\t\tlet v = this.varSelector.find(\n\t\t\t( uvs ) => uvs.varSelector === variation\n\t\t);\n\t\treturn v ? v : false;\n\t}\n\tgetSupportedVariations() {\n\t\treturn this.varSelectors.map( ( v ) => v.varSelector );\n\t}\n}\nclass VariationSelector {\n\tconstructor( p ) {\n\t\tthis.varSelector = p.uint24;\n\t\tthis.defaultUVSOffset = p.Offset32;\n\t\tthis.nonDefaultUVSOffset = p.Offset32;\n\t}\n}\nfunction createSubTable( parser, platformID, encodingID ) {\n\tconst format = parser.uint16;\n\tif ( format === 0 ) return new Format0( parser, platformID, encodingID );\n\tif ( format === 2 ) return new Format2( parser, platformID, encodingID );\n\tif ( format === 4 ) return new Format4( parser, platformID, encodingID );\n\tif ( format === 6 ) return new Format6( parser, platformID, encodingID );\n\tif ( format === 8 ) return new Format8( parser, platformID, encodingID );\n\tif ( format === 10 ) return new Format10( parser, platformID, encodingID );\n\tif ( format === 12 ) return new Format12( parser, platformID, encodingID );\n\tif ( format === 13 ) return new Format13( parser, platformID, encodingID );\n\tif ( format === 14 ) return new Format14( parser, platformID, encodingID );\n\treturn {};\n}\nclass cmap extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint16;\n\t\tthis.numTables = p.uint16;\n\t\tthis.encodingRecords = [ ...new Array( this.numTables ) ].map(\n\t\t\t( _ ) => new EncodingRecord( p, this.tableStart )\n\t\t);\n\t}\n\tgetSubTable( tableID ) {\n\t\treturn this.encodingRecords[ tableID ].table;\n\t}\n\tgetSupportedEncodings() {\n\t\treturn this.encodingRecords.map( ( r ) => ( {\n\t\t\tplatformID: r.platformID,\n\t\t\tencodingId: r.encodingID,\n\t\t} ) );\n\t}\n\tgetSupportedCharCodes( platformID, encodingID ) {\n\t\tconst recordID = this.encodingRecords.findIndex(\n\t\t\t( r ) => r.platformID === platformID && r.encodingID === encodingID\n\t\t);\n\t\tif ( recordID === -1 ) return false;\n\t\tconst subtable = this.getSubTable( recordID );\n\t\treturn subtable.getSupportedCharCodes();\n\t}\n\treverse( glyphid ) {\n\t\tfor ( let i = 0; i < this.numTables; i++ ) {\n\t\t\tlet code = this.getSubTable( i ).reverse( glyphid );\n\t\t\tif ( code ) return code;\n\t\t}\n\t}\n\tgetGlyphId( char ) {\n\t\tlet last = 0;\n\t\tthis.encodingRecords.some( ( _, tableID ) => {\n\t\t\tlet t = this.getSubTable( tableID );\n\t\t\tif ( ! t.getGlyphId ) return false;\n\t\t\tlast = t.getGlyphId( char );\n\t\t\treturn last !== 0;\n\t\t} );\n\t\treturn last;\n\t}\n\tsupports( char ) {\n\t\treturn this.encodingRecords.some( ( _, tableID ) => {\n\t\t\tconst t = this.getSubTable( tableID );\n\t\t\treturn t.supports && t.supports( char ) !== false;\n\t\t} );\n\t}\n\tsupportsVariation( variation ) {\n\t\treturn this.encodingRecords.some( ( _, tableID ) => {\n\t\t\tconst t = this.getSubTable( tableID );\n\t\t\treturn (\n\t\t\t\tt.supportsVariation &&\n\t\t\t\tt.supportsVariation( variation ) !== false\n\t\t\t);\n\t\t} );\n\t}\n}\nclass EncodingRecord {\n\tconstructor( p, tableStart ) {\n\t\tconst platformID = ( this.platformID = p.uint16 );\n\t\tconst encodingID = ( this.encodingID = p.uint16 );\n\t\tconst offset = ( this.offset = p.Offset32 );\n\t\tlazy$1( this, `table`, () => {\n\t\t\tp.currentPosition = tableStart + offset;\n\t\t\treturn createSubTable( p, platformID, encodingID );\n\t\t} );\n\t}\n}\nvar cmap$1 = Object.freeze( { __proto__: null, cmap: cmap } );\nclass head extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.load( {\n\t\t\tmajorVersion: p.uint16,\n\t\t\tminorVersion: p.uint16,\n\t\t\tfontRevision: p.fixed,\n\t\t\tcheckSumAdjustment: p.uint32,\n\t\t\tmagicNumber: p.uint32,\n\t\t\tflags: p.flags( 16 ),\n\t\t\tunitsPerEm: p.uint16,\n\t\t\tcreated: p.longdatetime,\n\t\t\tmodified: p.longdatetime,\n\t\t\txMin: p.int16,\n\t\t\tyMin: p.int16,\n\t\t\txMax: p.int16,\n\t\t\tyMax: p.int16,\n\t\t\tmacStyle: p.flags( 16 ),\n\t\t\tlowestRecPPEM: p.uint16,\n\t\t\tfontDirectionHint: p.uint16,\n\t\t\tindexToLocFormat: p.uint16,\n\t\t\tglyphDataFormat: p.uint16,\n\t\t} );\n\t}\n}\nvar head$1 = Object.freeze( { __proto__: null, head: head } );\nclass hhea extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.majorVersion = p.uint16;\n\t\tthis.minorVersion = p.uint16;\n\t\tthis.ascender = p.fword;\n\t\tthis.descender = p.fword;\n\t\tthis.lineGap = p.fword;\n\t\tthis.advanceWidthMax = p.ufword;\n\t\tthis.minLeftSideBearing = p.fword;\n\t\tthis.minRightSideBearing = p.fword;\n\t\tthis.xMaxExtent = p.fword;\n\t\tthis.caretSlopeRise = p.int16;\n\t\tthis.caretSlopeRun = p.int16;\n\t\tthis.caretOffset = p.int16;\n\t\tp.int16;\n\t\tp.int16;\n\t\tp.int16;\n\t\tp.int16;\n\t\tthis.metricDataFormat = p.int16;\n\t\tthis.numberOfHMetrics = p.uint16;\n\t\tp.verifyLength();\n\t}\n}\nvar hhea$1 = Object.freeze( { __proto__: null, hhea: hhea } );\nclass hmtx extends SimpleTable {\n\tconstructor( dict, dataview, tables ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tconst numberOfHMetrics = tables.hhea.numberOfHMetrics;\n\t\tconst numGlyphs = tables.maxp.numGlyphs;\n\t\tconst metricsStart = p.currentPosition;\n\t\tlazy$1( this, `hMetrics`, () => {\n\t\t\tp.currentPosition = metricsStart;\n\t\t\treturn [ ...new Array( numberOfHMetrics ) ].map(\n\t\t\t\t( _ ) => new LongHorMetric( p.uint16, p.int16 )\n\t\t\t);\n\t\t} );\n\t\tif ( numberOfHMetrics < numGlyphs ) {\n\t\t\tconst lsbStart = metricsStart + numberOfHMetrics * 4;\n\t\t\tlazy$1( this, `leftSideBearings`, () => {\n\t\t\t\tp.currentPosition = lsbStart;\n\t\t\t\treturn [ ...new Array( numGlyphs - numberOfHMetrics ) ].map(\n\t\t\t\t\t( _ ) => p.int16\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\t}\n}\nclass LongHorMetric {\n\tconstructor( w, b ) {\n\t\tthis.advanceWidth = w;\n\t\tthis.lsb = b;\n\t}\n}\nvar hmtx$1 = Object.freeze( { __proto__: null, hmtx: hmtx } );\nclass maxp extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.legacyFixed;\n\t\tthis.numGlyphs = p.uint16;\n\t\tif ( this.version === 1 ) {\n\t\t\tthis.maxPoints = p.uint16;\n\t\t\tthis.maxContours = p.uint16;\n\t\t\tthis.maxCompositePoints = p.uint16;\n\t\t\tthis.maxCompositeContours = p.uint16;\n\t\t\tthis.maxZones = p.uint16;\n\t\t\tthis.maxTwilightPoints = p.uint16;\n\t\t\tthis.maxStorage = p.uint16;\n\t\t\tthis.maxFunctionDefs = p.uint16;\n\t\t\tthis.maxInstructionDefs = p.uint16;\n\t\t\tthis.maxStackElements = p.uint16;\n\t\t\tthis.maxSizeOfInstructions = p.uint16;\n\t\t\tthis.maxComponentElements = p.uint16;\n\t\t\tthis.maxComponentDepth = p.uint16;\n\t\t}\n\t\tp.verifyLength();\n\t}\n}\nvar maxp$1 = Object.freeze( { __proto__: null, maxp: maxp } );\nclass name extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.format = p.uint16;\n\t\tthis.count = p.uint16;\n\t\tthis.stringOffset = p.Offset16;\n\t\tthis.nameRecords = [ ...new Array( this.count ) ].map(\n\t\t\t( _ ) => new NameRecord( p, this )\n\t\t);\n\t\tif ( this.format === 1 ) {\n\t\t\tthis.langTagCount = p.uint16;\n\t\t\tthis.langTagRecords = [ ...new Array( this.langTagCount ) ].map(\n\t\t\t\t( _ ) => new LangTagRecord( p.uint16, p.Offset16 )\n\t\t\t);\n\t\t}\n\t\tthis.stringStart = this.tableStart + this.stringOffset;\n\t}\n\tget( nameID ) {\n\t\tlet record = this.nameRecords.find(\n\t\t\t( record ) => record.nameID === nameID\n\t\t);\n\t\tif ( record ) return record.string;\n\t}\n}\nclass LangTagRecord {\n\tconstructor( length, offset ) {\n\t\tthis.length = length;\n\t\tthis.offset = offset;\n\t}\n}\nclass NameRecord {\n\tconstructor( p, nameTable ) {\n\t\tthis.platformID = p.uint16;\n\t\tthis.encodingID = p.uint16;\n\t\tthis.languageID = p.uint16;\n\t\tthis.nameID = p.uint16;\n\t\tthis.length = p.uint16;\n\t\tthis.offset = p.Offset16;\n\t\tlazy$1( this, `string`, () => {\n\t\t\tp.currentPosition = nameTable.stringStart + this.offset;\n\t\t\treturn decodeString( p, this );\n\t\t} );\n\t}\n}\nfunction decodeString( p, record ) {\n\tconst { platformID: platformID, length: length } = record;\n\tif ( length === 0 ) return ``;\n\tif ( platformID === 0 || platformID === 3 ) {\n\t\tconst str = [];\n\t\tfor ( let i = 0, e = length / 2; i < e; i++ )\n\t\t\tstr[ i ] = String.fromCharCode( p.uint16 );\n\t\treturn str.join( `` );\n\t}\n\tconst bytes = p.readBytes( length );\n\tconst str = [];\n\tbytes.forEach( function ( b, i ) {\n\t\tstr[ i ] = String.fromCharCode( b );\n\t} );\n\treturn str.join( `` );\n}\nvar name$1 = Object.freeze( { __proto__: null, name: name } );\nclass OS2 extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint16;\n\t\tthis.xAvgCharWidth = p.int16;\n\t\tthis.usWeightClass = p.uint16;\n\t\tthis.usWidthClass = p.uint16;\n\t\tthis.fsType = p.uint16;\n\t\tthis.ySubscriptXSize = p.int16;\n\t\tthis.ySubscriptYSize = p.int16;\n\t\tthis.ySubscriptXOffset = p.int16;\n\t\tthis.ySubscriptYOffset = p.int16;\n\t\tthis.ySuperscriptXSize = p.int16;\n\t\tthis.ySuperscriptYSize = p.int16;\n\t\tthis.ySuperscriptXOffset = p.int16;\n\t\tthis.ySuperscriptYOffset = p.int16;\n\t\tthis.yStrikeoutSize = p.int16;\n\t\tthis.yStrikeoutPosition = p.int16;\n\t\tthis.sFamilyClass = p.int16;\n\t\tthis.panose = [ ...new Array( 10 ) ].map( ( _ ) => p.uint8 );\n\t\tthis.ulUnicodeRange1 = p.flags( 32 );\n\t\tthis.ulUnicodeRange2 = p.flags( 32 );\n\t\tthis.ulUnicodeRange3 = p.flags( 32 );\n\t\tthis.ulUnicodeRange4 = p.flags( 32 );\n\t\tthis.achVendID = p.tag;\n\t\tthis.fsSelection = p.uint16;\n\t\tthis.usFirstCharIndex = p.uint16;\n\t\tthis.usLastCharIndex = p.uint16;\n\t\tthis.sTypoAscender = p.int16;\n\t\tthis.sTypoDescender = p.int16;\n\t\tthis.sTypoLineGap = p.int16;\n\t\tthis.usWinAscent = p.uint16;\n\t\tthis.usWinDescent = p.uint16;\n\t\tif ( this.version === 0 ) return p.verifyLength();\n\t\tthis.ulCodePageRange1 = p.flags( 32 );\n\t\tthis.ulCodePageRange2 = p.flags( 32 );\n\t\tif ( this.version === 1 ) return p.verifyLength();\n\t\tthis.sxHeight = p.int16;\n\t\tthis.sCapHeight = p.int16;\n\t\tthis.usDefaultChar = p.uint16;\n\t\tthis.usBreakChar = p.uint16;\n\t\tthis.usMaxContext = p.uint16;\n\t\tif ( this.version <= 4 ) return p.verifyLength();\n\t\tthis.usLowerOpticalPointSize = p.uint16;\n\t\tthis.usUpperOpticalPointSize = p.uint16;\n\t\tif ( this.version === 5 ) return p.verifyLength();\n\t}\n}\nvar OS2$1 = Object.freeze( { __proto__: null, OS2: OS2 } );\nclass post extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.legacyFixed;\n\t\tthis.italicAngle = p.fixed;\n\t\tthis.underlinePosition = p.fword;\n\t\tthis.underlineThickness = p.fword;\n\t\tthis.isFixedPitch = p.uint32;\n\t\tthis.minMemType42 = p.uint32;\n\t\tthis.maxMemType42 = p.uint32;\n\t\tthis.minMemType1 = p.uint32;\n\t\tthis.maxMemType1 = p.uint32;\n\t\tif ( this.version === 1 || this.version === 3 ) return p.verifyLength();\n\t\tthis.numGlyphs = p.uint16;\n\t\tif ( this.version === 2 ) {\n\t\t\tthis.glyphNameIndex = [ ...new Array( this.numGlyphs ) ].map(\n\t\t\t\t( _ ) => p.uint16\n\t\t\t);\n\t\t\tthis.namesOffset = p.currentPosition;\n\t\t\tthis.glyphNameOffsets = [ 1 ];\n\t\t\tfor ( let i = 0; i < this.numGlyphs; i++ ) {\n\t\t\t\tlet index = this.glyphNameIndex[ i ];\n\t\t\t\tif ( index < macStrings.length ) {\n\t\t\t\t\tthis.glyphNameOffsets.push( this.glyphNameOffsets[ i ] );\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tlet bytelength = p.int8;\n\t\t\t\tp.skip( bytelength );\n\t\t\t\tthis.glyphNameOffsets.push(\n\t\t\t\t\tthis.glyphNameOffsets[ i ] + bytelength + 1\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif ( this.version === 2.5 ) {\n\t\t\tthis.offset = [ ...new Array( this.numGlyphs ) ].map(\n\t\t\t\t( _ ) => p.int8\n\t\t\t);\n\t\t}\n\t}\n\tgetGlyphName( glyphid ) {\n\t\tif ( this.version !== 2 ) {\n\t\t\tconsole.warn(\n\t\t\t\t`post table version ${ this.version } does not support glyph name lookups`\n\t\t\t);\n\t\t\treturn ``;\n\t\t}\n\t\tlet index = this.glyphNameIndex[ glyphid ];\n\t\tif ( index < 258 ) return macStrings[ index ];\n\t\tlet offset = this.glyphNameOffsets[ glyphid ];\n\t\tlet next = this.glyphNameOffsets[ glyphid + 1 ];\n\t\tlet len = next - offset - 1;\n\t\tif ( len === 0 ) return `.notdef.`;\n\t\tthis.parser.currentPosition = this.namesOffset + offset;\n\t\tconst data = this.parser.readBytes(\n\t\t\tlen,\n\t\t\tthis.namesOffset + offset,\n\t\t\t8,\n\t\t\ttrue\n\t\t);\n\t\treturn data.map( ( b ) => String.fromCharCode( b ) ).join( `` );\n\t}\n}\nconst macStrings = [\n\t`.notdef`,\n\t`.null`,\n\t`nonmarkingreturn`,\n\t`space`,\n\t`exclam`,\n\t`quotedbl`,\n\t`numbersign`,\n\t`dollar`,\n\t`percent`,\n\t`ampersand`,\n\t`quotesingle`,\n\t`parenleft`,\n\t`parenright`,\n\t`asterisk`,\n\t`plus`,\n\t`comma`,\n\t`hyphen`,\n\t`period`,\n\t`slash`,\n\t`zero`,\n\t`one`,\n\t`two`,\n\t`three`,\n\t`four`,\n\t`five`,\n\t`six`,\n\t`seven`,\n\t`eight`,\n\t`nine`,\n\t`colon`,\n\t`semicolon`,\n\t`less`,\n\t`equal`,\n\t`greater`,\n\t`question`,\n\t`at`,\n\t`A`,\n\t`B`,\n\t`C`,\n\t`D`,\n\t`E`,\n\t`F`,\n\t`G`,\n\t`H`,\n\t`I`,\n\t`J`,\n\t`K`,\n\t`L`,\n\t`M`,\n\t`N`,\n\t`O`,\n\t`P`,\n\t`Q`,\n\t`R`,\n\t`S`,\n\t`T`,\n\t`U`,\n\t`V`,\n\t`W`,\n\t`X`,\n\t`Y`,\n\t`Z`,\n\t`bracketleft`,\n\t`backslash`,\n\t`bracketright`,\n\t`asciicircum`,\n\t`underscore`,\n\t`grave`,\n\t`a`,\n\t`b`,\n\t`c`,\n\t`d`,\n\t`e`,\n\t`f`,\n\t`g`,\n\t`h`,\n\t`i`,\n\t`j`,\n\t`k`,\n\t`l`,\n\t`m`,\n\t`n`,\n\t`o`,\n\t`p`,\n\t`q`,\n\t`r`,\n\t`s`,\n\t`t`,\n\t`u`,\n\t`v`,\n\t`w`,\n\t`x`,\n\t`y`,\n\t`z`,\n\t`braceleft`,\n\t`bar`,\n\t`braceright`,\n\t`asciitilde`,\n\t`Adieresis`,\n\t`Aring`,\n\t`Ccedilla`,\n\t`Eacute`,\n\t`Ntilde`,\n\t`Odieresis`,\n\t`Udieresis`,\n\t`aacute`,\n\t`agrave`,\n\t`acircumflex`,\n\t`adieresis`,\n\t`atilde`,\n\t`aring`,\n\t`ccedilla`,\n\t`eacute`,\n\t`egrave`,\n\t`ecircumflex`,\n\t`edieresis`,\n\t`iacute`,\n\t`igrave`,\n\t`icircumflex`,\n\t`idieresis`,\n\t`ntilde`,\n\t`oacute`,\n\t`ograve`,\n\t`ocircumflex`,\n\t`odieresis`,\n\t`otilde`,\n\t`uacute`,\n\t`ugrave`,\n\t`ucircumflex`,\n\t`udieresis`,\n\t`dagger`,\n\t`degree`,\n\t`cent`,\n\t`sterling`,\n\t`section`,\n\t`bullet`,\n\t`paragraph`,\n\t`germandbls`,\n\t`registered`,\n\t`copyright`,\n\t`trademark`,\n\t`acute`,\n\t`dieresis`,\n\t`notequal`,\n\t`AE`,\n\t`Oslash`,\n\t`infinity`,\n\t`plusminus`,\n\t`lessequal`,\n\t`greaterequal`,\n\t`yen`,\n\t`mu`,\n\t`partialdiff`,\n\t`summation`,\n\t`product`,\n\t`pi`,\n\t`integral`,\n\t`ordfeminine`,\n\t`ordmasculine`,\n\t`Omega`,\n\t`ae`,\n\t`oslash`,\n\t`questiondown`,\n\t`exclamdown`,\n\t`logicalnot`,\n\t`radical`,\n\t`florin`,\n\t`approxequal`,\n\t`Delta`,\n\t`guillemotleft`,\n\t`guillemotright`,\n\t`ellipsis`,\n\t`nonbreakingspace`,\n\t`Agrave`,\n\t`Atilde`,\n\t`Otilde`,\n\t`OE`,\n\t`oe`,\n\t`endash`,\n\t`emdash`,\n\t`quotedblleft`,\n\t`quotedblright`,\n\t`quoteleft`,\n\t`quoteright`,\n\t`divide`,\n\t`lozenge`,\n\t`ydieresis`,\n\t`Ydieresis`,\n\t`fraction`,\n\t`currency`,\n\t`guilsinglleft`,\n\t`guilsinglright`,\n\t`fi`,\n\t`fl`,\n\t`daggerdbl`,\n\t`periodcentered`,\n\t`quotesinglbase`,\n\t`quotedblbase`,\n\t`perthousand`,\n\t`Acircumflex`,\n\t`Ecircumflex`,\n\t`Aacute`,\n\t`Edieresis`,\n\t`Egrave`,\n\t`Iacute`,\n\t`Icircumflex`,\n\t`Idieresis`,\n\t`Igrave`,\n\t`Oacute`,\n\t`Ocircumflex`,\n\t`apple`,\n\t`Ograve`,\n\t`Uacute`,\n\t`Ucircumflex`,\n\t`Ugrave`,\n\t`dotlessi`,\n\t`circumflex`,\n\t`tilde`,\n\t`macron`,\n\t`breve`,\n\t`dotaccent`,\n\t`ring`,\n\t`cedilla`,\n\t`hungarumlaut`,\n\t`ogonek`,\n\t`caron`,\n\t`Lslash`,\n\t`lslash`,\n\t`Scaron`,\n\t`scaron`,\n\t`Zcaron`,\n\t`zcaron`,\n\t`brokenbar`,\n\t`Eth`,\n\t`eth`,\n\t`Yacute`,\n\t`yacute`,\n\t`Thorn`,\n\t`thorn`,\n\t`minus`,\n\t`multiply`,\n\t`onesuperior`,\n\t`twosuperior`,\n\t`threesuperior`,\n\t`onehalf`,\n\t`onequarter`,\n\t`threequarters`,\n\t`franc`,\n\t`Gbreve`,\n\t`gbreve`,\n\t`Idotaccent`,\n\t`Scedilla`,\n\t`scedilla`,\n\t`Cacute`,\n\t`cacute`,\n\t`Ccaron`,\n\t`ccaron`,\n\t`dcroat`,\n];\nvar post$1 = Object.freeze( { __proto__: null, post: post } );\nclass BASE extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.majorVersion = p.uint16;\n\t\tthis.minorVersion = p.uint16;\n\t\tthis.horizAxisOffset = p.Offset16;\n\t\tthis.vertAxisOffset = p.Offset16;\n\t\tlazy$1(\n\t\t\tthis,\n\t\t\t`horizAxis`,\n\t\t\t() =>\n\t\t\t\tnew AxisTable(\n\t\t\t\t\t{ offset: dict.offset + this.horizAxisOffset },\n\t\t\t\t\tdataview\n\t\t\t\t)\n\t\t);\n\t\tlazy$1(\n\t\t\tthis,\n\t\t\t`vertAxis`,\n\t\t\t() =>\n\t\t\t\tnew AxisTable(\n\t\t\t\t\t{ offset: dict.offset + this.vertAxisOffset },\n\t\t\t\t\tdataview\n\t\t\t\t)\n\t\t);\n\t\tif ( this.majorVersion === 1 && this.minorVersion === 1 ) {\n\t\t\tthis.itemVarStoreOffset = p.Offset32;\n\t\t\tlazy$1(\n\t\t\t\tthis,\n\t\t\t\t`itemVarStore`,\n\t\t\t\t() =>\n\t\t\t\t\tnew AxisTable(\n\t\t\t\t\t\t{ offset: dict.offset + this.itemVarStoreOffset },\n\t\t\t\t\t\tdataview\n\t\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}\n}\nclass AxisTable extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview, `AxisTable` );\n\t\tthis.baseTagListOffset = p.Offset16;\n\t\tthis.baseScriptListOffset = p.Offset16;\n\t\tlazy$1(\n\t\t\tthis,\n\t\t\t`baseTagList`,\n\t\t\t() =>\n\t\t\t\tnew BaseTagListTable(\n\t\t\t\t\t{ offset: dict.offset + this.baseTagListOffset },\n\t\t\t\t\tdataview\n\t\t\t\t)\n\t\t);\n\t\tlazy$1(\n\t\t\tthis,\n\t\t\t`baseScriptList`,\n\t\t\t() =>\n\t\t\t\tnew BaseScriptListTable(\n\t\t\t\t\t{ offset: dict.offset + this.baseScriptListOffset },\n\t\t\t\t\tdataview\n\t\t\t\t)\n\t\t);\n\t}\n}\nclass BaseTagListTable extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview, `BaseTagListTable` );\n\t\tthis.baseTagCount = p.uint16;\n\t\tthis.baselineTags = [ ...new Array( this.baseTagCount ) ].map(\n\t\t\t( _ ) => p.tag\n\t\t);\n\t}\n}\nclass BaseScriptListTable extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview, `BaseScriptListTable` );\n\t\tthis.baseScriptCount = p.uint16;\n\t\tconst recordStart = p.currentPosition;\n\t\tlazy$1( this, `baseScriptRecords`, () => {\n\t\t\tp.currentPosition = recordStart;\n\t\t\treturn [ ...new Array( this.baseScriptCount ) ].map(\n\t\t\t\t( _ ) => new BaseScriptRecord( this.start, p )\n\t\t\t);\n\t\t} );\n\t}\n}\nclass BaseScriptRecord {\n\tconstructor( baseScriptListTableStart, p ) {\n\t\tthis.baseScriptTag = p.tag;\n\t\tthis.baseScriptOffset = p.Offset16;\n\t\tlazy$1( this, `baseScriptTable`, () => {\n\t\t\tp.currentPosition =\n\t\t\t\tbaseScriptListTableStart + this.baseScriptOffset;\n\t\t\treturn new BaseScriptTable( p );\n\t\t} );\n\t}\n}\nclass BaseScriptTable {\n\tconstructor( p ) {\n\t\tthis.start = p.currentPosition;\n\t\tthis.baseValuesOffset = p.Offset16;\n\t\tthis.defaultMinMaxOffset = p.Offset16;\n\t\tthis.baseLangSysCount = p.uint16;\n\t\tthis.baseLangSysRecords = [ ...new Array( this.baseLangSysCount ) ].map(\n\t\t\t( _ ) => new BaseLangSysRecord( this.start, p )\n\t\t);\n\t\tlazy$1( this, `baseValues`, () => {\n\t\t\tp.currentPosition = this.start + this.baseValuesOffset;\n\t\t\treturn new BaseValuesTable( p );\n\t\t} );\n\t\tlazy$1( this, `defaultMinMax`, () => {\n\t\t\tp.currentPosition = this.start + this.defaultMinMaxOffset;\n\t\t\treturn new MinMaxTable( p );\n\t\t} );\n\t}\n}\nclass BaseLangSysRecord {\n\tconstructor( baseScriptTableStart, p ) {\n\t\tthis.baseLangSysTag = p.tag;\n\t\tthis.minMaxOffset = p.Offset16;\n\t\tlazy$1( this, `minMax`, () => {\n\t\t\tp.currentPosition = baseScriptTableStart + this.minMaxOffset;\n\t\t\treturn new MinMaxTable( p );\n\t\t} );\n\t}\n}\nclass BaseValuesTable {\n\tconstructor( p ) {\n\t\tthis.parser = p;\n\t\tthis.start = p.currentPosition;\n\t\tthis.defaultBaselineIndex = p.uint16;\n\t\tthis.baseCoordCount = p.uint16;\n\t\tthis.baseCoords = [ ...new Array( this.baseCoordCount ) ].map(\n\t\t\t( _ ) => p.Offset16\n\t\t);\n\t}\n\tgetTable( id ) {\n\t\tthis.parser.currentPosition = this.start + this.baseCoords[ id ];\n\t\treturn new BaseCoordTable( this.parser );\n\t}\n}\nclass MinMaxTable {\n\tconstructor( p ) {\n\t\tthis.minCoord = p.Offset16;\n\t\tthis.maxCoord = p.Offset16;\n\t\tthis.featMinMaxCount = p.uint16;\n\t\tconst recordStart = p.currentPosition;\n\t\tlazy$1( this, `featMinMaxRecords`, () => {\n\t\t\tp.currentPosition = recordStart;\n\t\t\treturn [ ...new Array( this.featMinMaxCount ) ].map(\n\t\t\t\t( _ ) => new FeatMinMaxRecord( p )\n\t\t\t);\n\t\t} );\n\t}\n}\nclass FeatMinMaxRecord {\n\tconstructor( p ) {\n\t\tthis.featureTableTag = p.tag;\n\t\tthis.minCoord = p.Offset16;\n\t\tthis.maxCoord = p.Offset16;\n\t}\n}\nclass BaseCoordTable {\n\tconstructor( p ) {\n\t\tthis.baseCoordFormat = p.uint16;\n\t\tthis.coordinate = p.int16;\n\t\tif ( this.baseCoordFormat === 2 ) {\n\t\t\tthis.referenceGlyph = p.uint16;\n\t\t\tthis.baseCoordPoint = p.uint16;\n\t\t}\n\t\tif ( this.baseCoordFormat === 3 ) {\n\t\t\tthis.deviceTable = p.Offset16;\n\t\t}\n\t}\n}\nvar BASE$1 = Object.freeze( { __proto__: null, BASE: BASE } );\nclass ClassDefinition {\n\tconstructor( p ) {\n\t\tthis.classFormat = p.uint16;\n\t\tif ( this.classFormat === 1 ) {\n\t\t\tthis.startGlyphID = p.uint16;\n\t\t\tthis.glyphCount = p.uint16;\n\t\t\tthis.classValueArray = [ ...new Array( this.glyphCount ) ].map(\n\t\t\t\t( _ ) => p.uint16\n\t\t\t);\n\t\t}\n\t\tif ( this.classFormat === 2 ) {\n\t\t\tthis.classRangeCount = p.uint16;\n\t\t\tthis.classRangeRecords = [\n\t\t\t\t...new Array( this.classRangeCount ),\n\t\t\t].map( ( _ ) => new ClassRangeRecord( p ) );\n\t\t}\n\t}\n}\nclass ClassRangeRecord {\n\tconstructor( p ) {\n\t\tthis.startGlyphID = p.uint16;\n\t\tthis.endGlyphID = p.uint16;\n\t\tthis.class = p.uint16;\n\t}\n}\nclass CoverageTable extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.coverageFormat = p.uint16;\n\t\tif ( this.coverageFormat === 1 ) {\n\t\t\tthis.glyphCount = p.uint16;\n\t\t\tthis.glyphArray = [ ...new Array( this.glyphCount ) ].map(\n\t\t\t\t( _ ) => p.uint16\n\t\t\t);\n\t\t}\n\t\tif ( this.coverageFormat === 2 ) {\n\t\t\tthis.rangeCount = p.uint16;\n\t\t\tthis.rangeRecords = [ ...new Array( this.rangeCount ) ].map(\n\t\t\t\t( _ ) => new CoverageRangeRecord( p )\n\t\t\t);\n\t\t}\n\t}\n}\nclass CoverageRangeRecord {\n\tconstructor( p ) {\n\t\tthis.startGlyphID = p.uint16;\n\t\tthis.endGlyphID = p.uint16;\n\t\tthis.startCoverageIndex = p.uint16;\n\t}\n}\nclass ItemVariationStoreTable {\n\tconstructor( table, p ) {\n\t\tthis.table = table;\n\t\tthis.parser = p;\n\t\tthis.start = p.currentPosition;\n\t\tthis.format = p.uint16;\n\t\tthis.variationRegionListOffset = p.Offset32;\n\t\tthis.itemVariationDataCount = p.uint16;\n\t\tthis.itemVariationDataOffsets = [\n\t\t\t...new Array( this.itemVariationDataCount ),\n\t\t].map( ( _ ) => p.Offset32 );\n\t}\n}\nclass GDEF extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.majorVersion = p.uint16;\n\t\tthis.minorVersion = p.uint16;\n\t\tthis.glyphClassDefOffset = p.Offset16;\n\t\tlazy$1( this, `glyphClassDefs`, () => {\n\t\t\tif ( this.glyphClassDefOffset === 0 ) return undefined;\n\t\t\tp.currentPosition = this.tableStart + this.glyphClassDefOffset;\n\t\t\treturn new ClassDefinition( p );\n\t\t} );\n\t\tthis.attachListOffset = p.Offset16;\n\t\tlazy$1( this, `attachList`, () => {\n\t\t\tif ( this.attachListOffset === 0 ) return undefined;\n\t\t\tp.currentPosition = this.tableStart + this.attachListOffset;\n\t\t\treturn new AttachList( p );\n\t\t} );\n\t\tthis.ligCaretListOffset = p.Offset16;\n\t\tlazy$1( this, `ligCaretList`, () => {\n\t\t\tif ( this.ligCaretListOffset === 0 ) return undefined;\n\t\t\tp.currentPosition = this.tableStart + this.ligCaretListOffset;\n\t\t\treturn new LigCaretList( p );\n\t\t} );\n\t\tthis.markAttachClassDefOffset = p.Offset16;\n\t\tlazy$1( this, `markAttachClassDef`, () => {\n\t\t\tif ( this.markAttachClassDefOffset === 0 ) return undefined;\n\t\t\tp.currentPosition = this.tableStart + this.markAttachClassDefOffset;\n\t\t\treturn new ClassDefinition( p );\n\t\t} );\n\t\tif ( this.minorVersion >= 2 ) {\n\t\t\tthis.markGlyphSetsDefOffset = p.Offset16;\n\t\t\tlazy$1( this, `markGlyphSetsDef`, () => {\n\t\t\t\tif ( this.markGlyphSetsDefOffset === 0 ) return undefined;\n\t\t\t\tp.currentPosition =\n\t\t\t\t\tthis.tableStart + this.markGlyphSetsDefOffset;\n\t\t\t\treturn new MarkGlyphSetsTable( p );\n\t\t\t} );\n\t\t}\n\t\tif ( this.minorVersion === 3 ) {\n\t\t\tthis.itemVarStoreOffset = p.Offset32;\n\t\t\tlazy$1( this, `itemVarStore`, () => {\n\t\t\t\tif ( this.itemVarStoreOffset === 0 ) return undefined;\n\t\t\t\tp.currentPosition = this.tableStart + this.itemVarStoreOffset;\n\t\t\t\treturn new ItemVariationStoreTable( p );\n\t\t\t} );\n\t\t}\n\t}\n}\nclass AttachList extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.coverageOffset = p.Offset16;\n\t\tthis.glyphCount = p.uint16;\n\t\tthis.attachPointOffsets = [ ...new Array( this.glyphCount ) ].map(\n\t\t\t( _ ) => p.Offset16\n\t\t);\n\t}\n\tgetPoint( pointID ) {\n\t\tthis.parser.currentPosition =\n\t\t\tthis.start + this.attachPointOffsets[ pointID ];\n\t\treturn new AttachPoint( this.parser );\n\t}\n}\nclass AttachPoint {\n\tconstructor( p ) {\n\t\tthis.pointCount = p.uint16;\n\t\tthis.pointIndices = [ ...new Array( this.pointCount ) ].map(\n\t\t\t( _ ) => p.uint16\n\t\t);\n\t}\n}\nclass LigCaretList extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.coverageOffset = p.Offset16;\n\t\tlazy$1( this, `coverage`, () => {\n\t\t\tp.currentPosition = this.start + this.coverageOffset;\n\t\t\treturn new CoverageTable( p );\n\t\t} );\n\t\tthis.ligGlyphCount = p.uint16;\n\t\tthis.ligGlyphOffsets = [ ...new Array( this.ligGlyphCount ) ].map(\n\t\t\t( _ ) => p.Offset16\n\t\t);\n\t}\n\tgetLigGlyph( ligGlyphID ) {\n\t\tthis.parser.currentPosition =\n\t\t\tthis.start + this.ligGlyphOffsets[ ligGlyphID ];\n\t\treturn new LigGlyph( this.parser );\n\t}\n}\nclass LigGlyph extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.caretCount = p.uint16;\n\t\tthis.caretValueOffsets = [ ...new Array( this.caretCount ) ].map(\n\t\t\t( _ ) => p.Offset16\n\t\t);\n\t}\n\tgetCaretValue( caretID ) {\n\t\tthis.parser.currentPosition =\n\t\t\tthis.start + this.caretValueOffsets[ caretID ];\n\t\treturn new CaretValue( this.parser );\n\t}\n}\nclass CaretValue {\n\tconstructor( p ) {\n\t\tthis.caretValueFormat = p.uint16;\n\t\tif ( this.caretValueFormat === 1 ) {\n\t\t\tthis.coordinate = p.int16;\n\t\t}\n\t\tif ( this.caretValueFormat === 2 ) {\n\t\t\tthis.caretValuePointIndex = p.uint16;\n\t\t}\n\t\tif ( this.caretValueFormat === 3 ) {\n\t\t\tthis.coordinate = p.int16;\n\t\t\tthis.deviceOffset = p.Offset16;\n\t\t}\n\t}\n}\nclass MarkGlyphSetsTable extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.markGlyphSetTableFormat = p.uint16;\n\t\tthis.markGlyphSetCount = p.uint16;\n\t\tthis.coverageOffsets = [ ...new Array( this.markGlyphSetCount ) ].map(\n\t\t\t( _ ) => p.Offset32\n\t\t);\n\t}\n\tgetMarkGlyphSet( markGlyphSetID ) {\n\t\tthis.parser.currentPosition =\n\t\t\tthis.start + this.coverageOffsets[ markGlyphSetID ];\n\t\treturn new CoverageTable( this.parser );\n\t}\n}\nvar GDEF$1 = Object.freeze( { __proto__: null, GDEF: GDEF } );\nclass ScriptList extends ParsedData {\n\tstatic EMPTY = { scriptCount: 0, scriptRecords: [] };\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.scriptCount = p.uint16;\n\t\tthis.scriptRecords = [ ...new Array( this.scriptCount ) ].map(\n\t\t\t( _ ) => new ScriptRecord( p )\n\t\t);\n\t}\n}\nclass ScriptRecord {\n\tconstructor( p ) {\n\t\tthis.scriptTag = p.tag;\n\t\tthis.scriptOffset = p.Offset16;\n\t}\n}\nclass ScriptTable extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.defaultLangSys = p.Offset16;\n\t\tthis.langSysCount = p.uint16;\n\t\tthis.langSysRecords = [ ...new Array( this.langSysCount ) ].map(\n\t\t\t( _ ) => new LangSysRecord( p )\n\t\t);\n\t}\n}\nclass LangSysRecord {\n\tconstructor( p ) {\n\t\tthis.langSysTag = p.tag;\n\t\tthis.langSysOffset = p.Offset16;\n\t}\n}\nclass LangSysTable {\n\tconstructor( p ) {\n\t\tthis.lookupOrder = p.Offset16;\n\t\tthis.requiredFeatureIndex = p.uint16;\n\t\tthis.featureIndexCount = p.uint16;\n\t\tthis.featureIndices = [ ...new Array( this.featureIndexCount ) ].map(\n\t\t\t( _ ) => p.uint16\n\t\t);\n\t}\n}\nclass FeatureList extends ParsedData {\n\tstatic EMPTY = { featureCount: 0, featureRecords: [] };\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.featureCount = p.uint16;\n\t\tthis.featureRecords = [ ...new Array( this.featureCount ) ].map(\n\t\t\t( _ ) => new FeatureRecord( p )\n\t\t);\n\t}\n}\nclass FeatureRecord {\n\tconstructor( p ) {\n\t\tthis.featureTag = p.tag;\n\t\tthis.featureOffset = p.Offset16;\n\t}\n}\nclass FeatureTable extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.featureParams = p.Offset16;\n\t\tthis.lookupIndexCount = p.uint16;\n\t\tthis.lookupListIndices = [ ...new Array( this.lookupIndexCount ) ].map(\n\t\t\t( _ ) => p.uint16\n\t\t);\n\t}\n\tgetFeatureParams() {\n\t\tif ( this.featureParams > 0 ) {\n\t\t\tconst p = this.parser;\n\t\t\tp.currentPosition = this.start + this.featureParams;\n\t\t\tconst tag = this.featureTag;\n\t\t\tif ( tag === `size` ) return new Size( p );\n\t\t\tif ( tag.startsWith( `cc` ) ) return new CharacterVariant( p );\n\t\t\tif ( tag.startsWith( `ss` ) ) return new StylisticSet( p );\n\t\t}\n\t}\n}\nclass CharacterVariant {\n\tconstructor( p ) {\n\t\tthis.format = p.uint16;\n\t\tthis.featUiLabelNameId = p.uint16;\n\t\tthis.featUiTooltipTextNameId = p.uint16;\n\t\tthis.sampleTextNameId = p.uint16;\n\t\tthis.numNamedParameters = p.uint16;\n\t\tthis.firstParamUiLabelNameId = p.uint16;\n\t\tthis.charCount = p.uint16;\n\t\tthis.character = [ ...new Array( this.charCount ) ].map(\n\t\t\t( _ ) => p.uint24\n\t\t);\n\t}\n}\nclass Size {\n\tconstructor( p ) {\n\t\tthis.designSize = p.uint16;\n\t\tthis.subfamilyIdentifier = p.uint16;\n\t\tthis.subfamilyNameID = p.uint16;\n\t\tthis.smallEnd = p.uint16;\n\t\tthis.largeEnd = p.uint16;\n\t}\n}\nclass StylisticSet {\n\tconstructor( p ) {\n\t\tthis.version = p.uint16;\n\t\tthis.UINameID = p.uint16;\n\t}\n}\nfunction undoCoverageOffsetParsing( instance ) {\n\tinstance.parser.currentPosition -= 2;\n\tdelete instance.coverageOffset;\n\tdelete instance.getCoverageTable;\n}\nclass LookupType$1 extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.substFormat = p.uint16;\n\t\tthis.coverageOffset = p.Offset16;\n\t}\n\tgetCoverageTable() {\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.coverageOffset;\n\t\treturn new CoverageTable( p );\n\t}\n}\nclass SubstLookupRecord {\n\tconstructor( p ) {\n\t\tthis.glyphSequenceIndex = p.uint16;\n\t\tthis.lookupListIndex = p.uint16;\n\t}\n}\nclass LookupType1$1 extends LookupType$1 {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.deltaGlyphID = p.int16;\n\t}\n}\nclass LookupType2$1 extends LookupType$1 {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.sequenceCount = p.uint16;\n\t\tthis.sequenceOffsets = [ ...new Array( this.sequenceCount ) ].map(\n\t\t\t( _ ) => p.Offset16\n\t\t);\n\t}\n\tgetSequence( index ) {\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.sequenceOffsets[ index ];\n\t\treturn new SequenceTable( p );\n\t}\n}\nclass SequenceTable {\n\tconstructor( p ) {\n\t\tthis.glyphCount = p.uint16;\n\t\tthis.substituteGlyphIDs = [ ...new Array( this.glyphCount ) ].map(\n\t\t\t( _ ) => p.uint16\n\t\t);\n\t}\n}\nclass LookupType3$1 extends LookupType$1 {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.alternateSetCount = p.uint16;\n\t\tthis.alternateSetOffsets = [\n\t\t\t...new Array( this.alternateSetCount ),\n\t\t].map( ( _ ) => p.Offset16 );\n\t}\n\tgetAlternateSet( index ) {\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.alternateSetOffsets[ index ];\n\t\treturn new AlternateSetTable( p );\n\t}\n}\nclass AlternateSetTable {\n\tconstructor( p ) {\n\t\tthis.glyphCount = p.uint16;\n\t\tthis.alternateGlyphIDs = [ ...new Array( this.glyphCount ) ].map(\n\t\t\t( _ ) => p.uint16\n\t\t);\n\t}\n}\nclass LookupType4$1 extends LookupType$1 {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.ligatureSetCount = p.uint16;\n\t\tthis.ligatureSetOffsets = [ ...new Array( this.ligatureSetCount ) ].map(\n\t\t\t( _ ) => p.Offset16\n\t\t);\n\t}\n\tgetLigatureSet( index ) {\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.ligatureSetOffsets[ index ];\n\t\treturn new LigatureSetTable( p );\n\t}\n}\nclass LigatureSetTable extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.ligatureCount = p.uint16;\n\t\tthis.ligatureOffsets = [ ...new Array( this.ligatureCount ) ].map(\n\t\t\t( _ ) => p.Offset16\n\t\t);\n\t}\n\tgetLigature( index ) {\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.ligatureOffsets[ index ];\n\t\treturn new LigatureTable( p );\n\t}\n}\nclass LigatureTable {\n\tconstructor( p ) {\n\t\tthis.ligatureGlyph = p.uint16;\n\t\tthis.componentCount = p.uint16;\n\t\tthis.componentGlyphIDs = [\n\t\t\t...new Array( this.componentCount - 1 ),\n\t\t].map( ( _ ) => p.uint16 );\n\t}\n}\nclass LookupType5$1 extends LookupType$1 {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tif ( this.substFormat === 1 ) {\n\t\t\tthis.subRuleSetCount = p.uint16;\n\t\t\tthis.subRuleSetOffsets = [\n\t\t\t\t...new Array( this.subRuleSetCount ),\n\t\t\t].map( ( _ ) => p.Offset16 );\n\t\t}\n\t\tif ( this.substFormat === 2 ) {\n\t\t\tthis.classDefOffset = p.Offset16;\n\t\t\tthis.subClassSetCount = p.uint16;\n\t\t\tthis.subClassSetOffsets = [\n\t\t\t\t...new Array( this.subClassSetCount ),\n\t\t\t].map( ( _ ) => p.Offset16 );\n\t\t}\n\t\tif ( this.substFormat === 3 ) {\n\t\t\tundoCoverageOffsetParsing( this );\n\t\t\tthis.glyphCount = p.uint16;\n\t\t\tthis.substitutionCount = p.uint16;\n\t\t\tthis.coverageOffsets = [ ...new Array( this.glyphCount ) ].map(\n\t\t\t\t( _ ) => p.Offset16\n\t\t\t);\n\t\t\tthis.substLookupRecords = [\n\t\t\t\t...new Array( this.substitutionCount ),\n\t\t\t].map( ( _ ) => new SubstLookupRecord( p ) );\n\t\t}\n\t}\n\tgetSubRuleSet( index ) {\n\t\tif ( this.substFormat !== 1 )\n\t\t\tthrow new Error(\n\t\t\t\t`lookup type 5.${ this.substFormat } has no subrule sets.`\n\t\t\t);\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.subRuleSetOffsets[ index ];\n\t\treturn new SubRuleSetTable( p );\n\t}\n\tgetSubClassSet( index ) {\n\t\tif ( this.substFormat !== 2 )\n\t\t\tthrow new Error(\n\t\t\t\t`lookup type 5.${ this.substFormat } has no subclass sets.`\n\t\t\t);\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.subClassSetOffsets[ index ];\n\t\treturn new SubClassSetTable( p );\n\t}\n\tgetCoverageTable( index ) {\n\t\tif ( this.substFormat !== 3 && ! index )\n\t\t\treturn super.getCoverageTable();\n\t\tif ( ! index )\n\t\t\tthrow new Error(\n\t\t\t\t`lookup type 5.${ this.substFormat } requires an coverage table index.`\n\t\t\t);\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.coverageOffsets[ index ];\n\t\treturn new CoverageTable( p );\n\t}\n}\nclass SubRuleSetTable extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.subRuleCount = p.uint16;\n\t\tthis.subRuleOffsets = [ ...new Array( this.subRuleCount ) ].map(\n\t\t\t( _ ) => p.Offset16\n\t\t);\n\t}\n\tgetSubRule( index ) {\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.subRuleOffsets[ index ];\n\t\treturn new SubRuleTable( p );\n\t}\n}\nclass SubRuleTable {\n\tconstructor( p ) {\n\t\tthis.glyphCount = p.uint16;\n\t\tthis.substitutionCount = p.uint16;\n\t\tthis.inputSequence = [ ...new Array( this.glyphCount - 1 ) ].map(\n\t\t\t( _ ) => p.uint16\n\t\t);\n\t\tthis.substLookupRecords = [\n\t\t\t...new Array( this.substitutionCount ),\n\t\t].map( ( _ ) => new SubstLookupRecord( p ) );\n\t}\n}\nclass SubClassSetTable extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.subClassRuleCount = p.uint16;\n\t\tthis.subClassRuleOffsets = [\n\t\t\t...new Array( this.subClassRuleCount ),\n\t\t].map( ( _ ) => p.Offset16 );\n\t}\n\tgetSubClass( index ) {\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.subClassRuleOffsets[ index ];\n\t\treturn new SubClassRuleTable( p );\n\t}\n}\nclass SubClassRuleTable extends SubRuleTable {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t}\n}\nclass LookupType6$1 extends LookupType$1 {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tif ( this.substFormat === 1 ) {\n\t\t\tthis.chainSubRuleSetCount = p.uint16;\n\t\t\tthis.chainSubRuleSetOffsets = [\n\t\t\t\t...new Array( this.chainSubRuleSetCount ),\n\t\t\t].map( ( _ ) => p.Offset16 );\n\t\t}\n\t\tif ( this.substFormat === 2 ) {\n\t\t\tthis.backtrackClassDefOffset = p.Offset16;\n\t\t\tthis.inputClassDefOffset = p.Offset16;\n\t\t\tthis.lookaheadClassDefOffset = p.Offset16;\n\t\t\tthis.chainSubClassSetCount = p.uint16;\n\t\t\tthis.chainSubClassSetOffsets = [\n\t\t\t\t...new Array( this.chainSubClassSetCount ),\n\t\t\t].map( ( _ ) => p.Offset16 );\n\t\t}\n\t\tif ( this.substFormat === 3 ) {\n\t\t\tundoCoverageOffsetParsing( this );\n\t\t\tthis.backtrackGlyphCount = p.uint16;\n\t\t\tthis.backtrackCoverageOffsets = [\n\t\t\t\t...new Array( this.backtrackGlyphCount ),\n\t\t\t].map( ( _ ) => p.Offset16 );\n\t\t\tthis.inputGlyphCount = p.uint16;\n\t\t\tthis.inputCoverageOffsets = [\n\t\t\t\t...new Array( this.inputGlyphCount ),\n\t\t\t].map( ( _ ) => p.Offset16 );\n\t\t\tthis.lookaheadGlyphCount = p.uint16;\n\t\t\tthis.lookaheadCoverageOffsets = [\n\t\t\t\t...new Array( this.lookaheadGlyphCount ),\n\t\t\t].map( ( _ ) => p.Offset16 );\n\t\t\tthis.seqLookupCount = p.uint16;\n\t\t\tthis.seqLookupRecords = [\n\t\t\t\t...new Array( this.substitutionCount ),\n\t\t\t].map( ( _ ) => new SequenceLookupRecord( p ) );\n\t\t}\n\t}\n\tgetChainSubRuleSet( index ) {\n\t\tif ( this.substFormat !== 1 )\n\t\t\tthrow new Error(\n\t\t\t\t`lookup type 6.${ this.substFormat } has no chainsubrule sets.`\n\t\t\t);\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.chainSubRuleSetOffsets[ index ];\n\t\treturn new ChainSubRuleSetTable( p );\n\t}\n\tgetChainSubClassSet( index ) {\n\t\tif ( this.substFormat !== 2 )\n\t\t\tthrow new Error(\n\t\t\t\t`lookup type 6.${ this.substFormat } has no chainsubclass sets.`\n\t\t\t);\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.chainSubClassSetOffsets[ index ];\n\t\treturn new ChainSubClassSetTable( p );\n\t}\n\tgetCoverageFromOffset( offset ) {\n\t\tif ( this.substFormat !== 3 )\n\t\t\tthrow new Error(\n\t\t\t\t`lookup type 6.${ this.substFormat } does not use contextual coverage offsets.`\n\t\t\t);\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + offset;\n\t\treturn new CoverageTable( p );\n\t}\n}\nclass ChainSubRuleSetTable extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.chainSubRuleCount = p.uint16;\n\t\tthis.chainSubRuleOffsets = [\n\t\t\t...new Array( this.chainSubRuleCount ),\n\t\t].map( ( _ ) => p.Offset16 );\n\t}\n\tgetSubRule( index ) {\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.chainSubRuleOffsets[ index ];\n\t\treturn new ChainSubRuleTable( p );\n\t}\n}\nclass ChainSubRuleTable {\n\tconstructor( p ) {\n\t\tthis.backtrackGlyphCount = p.uint16;\n\t\tthis.backtrackSequence = [\n\t\t\t...new Array( this.backtrackGlyphCount ),\n\t\t].map( ( _ ) => p.uint16 );\n\t\tthis.inputGlyphCount = p.uint16;\n\t\tthis.inputSequence = [ ...new Array( this.inputGlyphCount - 1 ) ].map(\n\t\t\t( _ ) => p.uint16\n\t\t);\n\t\tthis.lookaheadGlyphCount = p.uint16;\n\t\tthis.lookAheadSequence = [\n\t\t\t...new Array( this.lookAheadGlyphCount ),\n\t\t].map( ( _ ) => p.uint16 );\n\t\tthis.substitutionCount = p.uint16;\n\t\tthis.substLookupRecords = [ ...new Array( this.SubstCount ) ].map(\n\t\t\t( _ ) => new SubstLookupRecord( p )\n\t\t);\n\t}\n}\nclass ChainSubClassSetTable extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.chainSubClassRuleCount = p.uint16;\n\t\tthis.chainSubClassRuleOffsets = [\n\t\t\t...new Array( this.chainSubClassRuleCount ),\n\t\t].map( ( _ ) => p.Offset16 );\n\t}\n\tgetSubClass( index ) {\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.chainSubRuleOffsets[ index ];\n\t\treturn new ChainSubClassRuleTable( p );\n\t}\n}\nclass ChainSubClassRuleTable {\n\tconstructor( p ) {\n\t\tthis.backtrackGlyphCount = p.uint16;\n\t\tthis.backtrackSequence = [\n\t\t\t...new Array( this.backtrackGlyphCount ),\n\t\t].map( ( _ ) => p.uint16 );\n\t\tthis.inputGlyphCount = p.uint16;\n\t\tthis.inputSequence = [ ...new Array( this.inputGlyphCount - 1 ) ].map(\n\t\t\t( _ ) => p.uint16\n\t\t);\n\t\tthis.lookaheadGlyphCount = p.uint16;\n\t\tthis.lookAheadSequence = [\n\t\t\t...new Array( this.lookAheadGlyphCount ),\n\t\t].map( ( _ ) => p.uint16 );\n\t\tthis.substitutionCount = p.uint16;\n\t\tthis.substLookupRecords = [\n\t\t\t...new Array( this.substitutionCount ),\n\t\t].map( ( _ ) => new SequenceLookupRecord( p ) );\n\t}\n}\nclass SequenceLookupRecord extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.sequenceIndex = p.uint16;\n\t\tthis.lookupListIndex = p.uint16;\n\t}\n}\nclass LookupType7$1 extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.substFormat = p.uint16;\n\t\tthis.extensionLookupType = p.uint16;\n\t\tthis.extensionOffset = p.Offset32;\n\t}\n}\nclass LookupType8$1 extends LookupType$1 {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.backtrackGlyphCount = p.uint16;\n\t\tthis.backtrackCoverageOffsets = [\n\t\t\t...new Array( this.backtrackGlyphCount ),\n\t\t].map( ( _ ) => p.Offset16 );\n\t\tthis.lookaheadGlyphCount = p.uint16;\n\t\tthis.lookaheadCoverageOffsets = [\n\t\t\tnew Array( this.lookaheadGlyphCount ),\n\t\t].map( ( _ ) => p.Offset16 );\n\t\tthis.glyphCount = p.uint16;\n\t\tthis.substituteGlyphIDs = [ ...new Array( this.glyphCount ) ].map(\n\t\t\t( _ ) => p.uint16\n\t\t);\n\t}\n}\nvar GSUBtables = {\n\tbuildSubtable: function ( type, p ) {\n\t\tconst subtable = new [\n\t\t\tundefined,\n\t\t\tLookupType1$1,\n\t\t\tLookupType2$1,\n\t\t\tLookupType3$1,\n\t\t\tLookupType4$1,\n\t\t\tLookupType5$1,\n\t\t\tLookupType6$1,\n\t\t\tLookupType7$1,\n\t\t\tLookupType8$1,\n\t\t][ type ]( p );\n\t\tsubtable.type = type;\n\t\treturn subtable;\n\t},\n};\nclass LookupType extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t}\n}\nclass LookupType1 extends LookupType {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tconsole.log( `lookup type 1` );\n\t}\n}\nclass LookupType2 extends LookupType {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tconsole.log( `lookup type 2` );\n\t}\n}\nclass LookupType3 extends LookupType {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tconsole.log( `lookup type 3` );\n\t}\n}\nclass LookupType4 extends LookupType {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tconsole.log( `lookup type 4` );\n\t}\n}\nclass LookupType5 extends LookupType {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tconsole.log( `lookup type 5` );\n\t}\n}\nclass LookupType6 extends LookupType {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tconsole.log( `lookup type 6` );\n\t}\n}\nclass LookupType7 extends LookupType {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tconsole.log( `lookup type 7` );\n\t}\n}\nclass LookupType8 extends LookupType {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tconsole.log( `lookup type 8` );\n\t}\n}\nclass LookupType9 extends LookupType {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tconsole.log( `lookup type 9` );\n\t}\n}\nvar GPOStables = {\n\tbuildSubtable: function ( type, p ) {\n\t\tconst subtable = new [\n\t\t\tundefined,\n\t\t\tLookupType1,\n\t\t\tLookupType2,\n\t\t\tLookupType3,\n\t\t\tLookupType4,\n\t\t\tLookupType5,\n\t\t\tLookupType6,\n\t\t\tLookupType7,\n\t\t\tLookupType8,\n\t\t\tLookupType9,\n\t\t][ type ]( p );\n\t\tsubtable.type = type;\n\t\treturn subtable;\n\t},\n};\nclass LookupList extends ParsedData {\n\tstatic EMPTY = { lookupCount: 0, lookups: [] };\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.lookupCount = p.uint16;\n\t\tthis.lookups = [ ...new Array( this.lookupCount ) ].map(\n\t\t\t( _ ) => p.Offset16\n\t\t);\n\t}\n}\nclass LookupTable extends ParsedData {\n\tconstructor( p, type ) {\n\t\tsuper( p );\n\t\tthis.ctType = type;\n\t\tthis.lookupType = p.uint16;\n\t\tthis.lookupFlag = p.uint16;\n\t\tthis.subTableCount = p.uint16;\n\t\tthis.subtableOffsets = [ ...new Array( this.subTableCount ) ].map(\n\t\t\t( _ ) => p.Offset16\n\t\t);\n\t\tthis.markFilteringSet = p.uint16;\n\t}\n\tget rightToLeft() {\n\t\treturn this.lookupFlag & ( 1 === 1 );\n\t}\n\tget ignoreBaseGlyphs() {\n\t\treturn this.lookupFlag & ( 2 === 2 );\n\t}\n\tget ignoreLigatures() {\n\t\treturn this.lookupFlag & ( 4 === 4 );\n\t}\n\tget ignoreMarks() {\n\t\treturn this.lookupFlag & ( 8 === 8 );\n\t}\n\tget useMarkFilteringSet() {\n\t\treturn this.lookupFlag & ( 16 === 16 );\n\t}\n\tget markAttachmentType() {\n\t\treturn this.lookupFlag & ( 65280 === 65280 );\n\t}\n\tgetSubTable( index ) {\n\t\tconst builder = this.ctType === `GSUB` ? GSUBtables : GPOStables;\n\t\tthis.parser.currentPosition =\n\t\t\tthis.start + this.subtableOffsets[ index ];\n\t\treturn builder.buildSubtable( this.lookupType, this.parser );\n\t}\n}\nclass CommonLayoutTable extends SimpleTable {\n\tconstructor( dict, dataview, name ) {\n\t\tconst { p: p, tableStart: tableStart } = super( dict, dataview, name );\n\t\tthis.majorVersion = p.uint16;\n\t\tthis.minorVersion = p.uint16;\n\t\tthis.scriptListOffset = p.Offset16;\n\t\tthis.featureListOffset = p.Offset16;\n\t\tthis.lookupListOffset = p.Offset16;\n\t\tif ( this.majorVersion === 1 && this.minorVersion === 1 ) {\n\t\t\tthis.featureVariationsOffset = p.Offset32;\n\t\t}\n\t\tconst no_content = ! (\n\t\t\tthis.scriptListOffset ||\n\t\t\tthis.featureListOffset ||\n\t\t\tthis.lookupListOffset\n\t\t);\n\t\tlazy$1( this, `scriptList`, () => {\n\t\t\tif ( no_content ) return ScriptList.EMPTY;\n\t\t\tp.currentPosition = tableStart + this.scriptListOffset;\n\t\t\treturn new ScriptList( p );\n\t\t} );\n\t\tlazy$1( this, `featureList`, () => {\n\t\t\tif ( no_content ) return FeatureList.EMPTY;\n\t\t\tp.currentPosition = tableStart + this.featureListOffset;\n\t\t\treturn new FeatureList( p );\n\t\t} );\n\t\tlazy$1( this, `lookupList`, () => {\n\t\t\tif ( no_content ) return LookupList.EMPTY;\n\t\t\tp.currentPosition = tableStart + this.lookupListOffset;\n\t\t\treturn new LookupList( p );\n\t\t} );\n\t\tif ( this.featureVariationsOffset ) {\n\t\t\tlazy$1( this, `featureVariations`, () => {\n\t\t\t\tif ( no_content ) return FeatureVariations.EMPTY;\n\t\t\t\tp.currentPosition = tableStart + this.featureVariationsOffset;\n\t\t\t\treturn new FeatureVariations( p );\n\t\t\t} );\n\t\t}\n\t}\n\tgetSupportedScripts() {\n\t\treturn this.scriptList.scriptRecords.map( ( r ) => r.scriptTag );\n\t}\n\tgetScriptTable( scriptTag ) {\n\t\tlet record = this.scriptList.scriptRecords.find(\n\t\t\t( r ) => r.scriptTag === scriptTag\n\t\t);\n\t\tthis.parser.currentPosition =\n\t\t\tthis.scriptList.start + record.scriptOffset;\n\t\tlet table = new ScriptTable( this.parser );\n\t\ttable.scriptTag = scriptTag;\n\t\treturn table;\n\t}\n\tensureScriptTable( arg ) {\n\t\tif ( typeof arg === 'string' ) {\n\t\t\treturn this.getScriptTable( arg );\n\t\t}\n\t\treturn arg;\n\t}\n\tgetSupportedLangSys( scriptTable ) {\n\t\tscriptTable = this.ensureScriptTable( scriptTable );\n\t\tconst hasDefault = scriptTable.defaultLangSys !== 0;\n\t\tconst supported = scriptTable.langSysRecords.map(\n\t\t\t( l ) => l.langSysTag\n\t\t);\n\t\tif ( hasDefault ) supported.unshift( `dflt` );\n\t\treturn supported;\n\t}\n\tgetDefaultLangSysTable( scriptTable ) {\n\t\tscriptTable = this.ensureScriptTable( scriptTable );\n\t\tlet offset = scriptTable.defaultLangSys;\n\t\tif ( offset !== 0 ) {\n\t\t\tthis.parser.currentPosition = scriptTable.start + offset;\n\t\t\tlet table = new LangSysTable( this.parser );\n\t\t\ttable.langSysTag = ``;\n\t\t\ttable.defaultForScript = scriptTable.scriptTag;\n\t\t\treturn table;\n\t\t}\n\t}\n\tgetLangSysTable( scriptTable, langSysTag = `dflt` ) {\n\t\tif ( langSysTag === `dflt` )\n\t\t\treturn this.getDefaultLangSysTable( scriptTable );\n\t\tscriptTable = this.ensureScriptTable( scriptTable );\n\t\tlet record = scriptTable.langSysRecords.find(\n\t\t\t( l ) => l.langSysTag === langSysTag\n\t\t);\n\t\tthis.parser.currentPosition = scriptTable.start + record.langSysOffset;\n\t\tlet table = new LangSysTable( this.parser );\n\t\ttable.langSysTag = langSysTag;\n\t\treturn table;\n\t}\n\tgetFeatures( langSysTable ) {\n\t\treturn langSysTable.featureIndices.map( ( index ) =>\n\t\t\tthis.getFeature( index )\n\t\t);\n\t}\n\tgetFeature( indexOrTag ) {\n\t\tlet record;\n\t\tif ( parseInt( indexOrTag ) == indexOrTag ) {\n\t\t\trecord = this.featureList.featureRecords[ indexOrTag ];\n\t\t} else {\n\t\t\trecord = this.featureList.featureRecords.find(\n\t\t\t\t( f ) => f.featureTag === indexOrTag\n\t\t\t);\n\t\t}\n\t\tif ( ! record ) return;\n\t\tthis.parser.currentPosition =\n\t\t\tthis.featureList.start + record.featureOffset;\n\t\tlet table = new FeatureTable( this.parser );\n\t\ttable.featureTag = record.featureTag;\n\t\treturn table;\n\t}\n\tgetLookups( featureTable ) {\n\t\treturn featureTable.lookupListIndices.map( ( index ) =>\n\t\t\tthis.getLookup( index )\n\t\t);\n\t}\n\tgetLookup( lookupIndex, type ) {\n\t\tlet lookupOffset = this.lookupList.lookups[ lookupIndex ];\n\t\tthis.parser.currentPosition = this.lookupList.start + lookupOffset;\n\t\treturn new LookupTable( this.parser, type );\n\t}\n}\nclass GSUB extends CommonLayoutTable {\n\tconstructor( dict, dataview ) {\n\t\tsuper( dict, dataview, `GSUB` );\n\t}\n\tgetLookup( lookupIndex ) {\n\t\treturn super.getLookup( lookupIndex, `GSUB` );\n\t}\n}\nvar GSUB$1 = Object.freeze( { __proto__: null, GSUB: GSUB } );\nclass GPOS extends CommonLayoutTable {\n\tconstructor( dict, dataview ) {\n\t\tsuper( dict, dataview, `GPOS` );\n\t}\n\tgetLookup( lookupIndex ) {\n\t\treturn super.getLookup( lookupIndex, `GPOS` );\n\t}\n}\nvar GPOS$1 = Object.freeze( { __proto__: null, GPOS: GPOS } );\nclass SVG extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint16;\n\t\tthis.offsetToSVGDocumentList = p.Offset32;\n\t\tp.currentPosition = this.tableStart + this.offsetToSVGDocumentList;\n\t\tthis.documentList = new SVGDocumentList( p );\n\t}\n}\nclass SVGDocumentList extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.numEntries = p.uint16;\n\t\tthis.documentRecords = [ ...new Array( this.numEntries ) ].map(\n\t\t\t( _ ) => new SVGDocumentRecord( p )\n\t\t);\n\t}\n\tgetDocument( documentID ) {\n\t\tlet record = this.documentRecords[ documentID ];\n\t\tif ( ! record ) return '';\n\t\tlet offset = this.start + record.svgDocOffset;\n\t\tthis.parser.currentPosition = offset;\n\t\treturn this.parser.readBytes( record.svgDocLength );\n\t}\n\tgetDocumentForGlyph( glyphID ) {\n\t\tlet id = this.documentRecords.findIndex(\n\t\t\t( d ) => d.startGlyphID <= glyphID && glyphID <= d.endGlyphID\n\t\t);\n\t\tif ( id === -1 ) return '';\n\t\treturn this.getDocument( id );\n\t}\n}\nclass SVGDocumentRecord {\n\tconstructor( p ) {\n\t\tthis.startGlyphID = p.uint16;\n\t\tthis.endGlyphID = p.uint16;\n\t\tthis.svgDocOffset = p.Offset32;\n\t\tthis.svgDocLength = p.uint32;\n\t}\n}\nvar SVG$1 = Object.freeze( { __proto__: null, SVG: SVG } );\nclass fvar extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.majorVersion = p.uint16;\n\t\tthis.minorVersion = p.uint16;\n\t\tthis.axesArrayOffset = p.Offset16;\n\t\tp.uint16;\n\t\tthis.axisCount = p.uint16;\n\t\tthis.axisSize = p.uint16;\n\t\tthis.instanceCount = p.uint16;\n\t\tthis.instanceSize = p.uint16;\n\t\tconst axisStart = this.tableStart + this.axesArrayOffset;\n\t\tlazy$1( this, `axes`, () => {\n\t\t\tp.currentPosition = axisStart;\n\t\t\treturn [ ...new Array( this.axisCount ) ].map(\n\t\t\t\t( _ ) => new VariationAxisRecord( p )\n\t\t\t);\n\t\t} );\n\t\tconst instanceStart = axisStart + this.axisCount * this.axisSize;\n\t\tlazy$1( this, `instances`, () => {\n\t\t\tlet instances = [];\n\t\t\tfor ( let i = 0; i < this.instanceCount; i++ ) {\n\t\t\t\tp.currentPosition = instanceStart + i * this.instanceSize;\n\t\t\t\tinstances.push(\n\t\t\t\t\tnew InstanceRecord( p, this.axisCount, this.instanceSize )\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn instances;\n\t\t} );\n\t}\n\tgetSupportedAxes() {\n\t\treturn this.axes.map( ( a ) => a.tag );\n\t}\n\tgetAxis( name ) {\n\t\treturn this.axes.find( ( a ) => a.tag === name );\n\t}\n}\nclass VariationAxisRecord {\n\tconstructor( p ) {\n\t\tthis.tag = p.tag;\n\t\tthis.minValue = p.fixed;\n\t\tthis.defaultValue = p.fixed;\n\t\tthis.maxValue = p.fixed;\n\t\tthis.flags = p.flags( 16 );\n\t\tthis.axisNameID = p.uint16;\n\t}\n}\nclass InstanceRecord {\n\tconstructor( p, axisCount, size ) {\n\t\tlet start = p.currentPosition;\n\t\tthis.subfamilyNameID = p.uint16;\n\t\tp.uint16;\n\t\tthis.coordinates = [ ...new Array( axisCount ) ].map(\n\t\t\t( _ ) => p.fixed\n\t\t);\n\t\tif ( p.currentPosition - start < size ) {\n\t\t\tthis.postScriptNameID = p.uint16;\n\t\t}\n\t}\n}\nvar fvar$1 = Object.freeze( { __proto__: null, fvar: fvar } );\nclass cvt extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tconst n = dict.length / 2;\n\t\tlazy$1( this, `items`, () =>\n\t\t\t[ ...new Array( n ) ].map( ( _ ) => p.fword )\n\t\t);\n\t}\n}\nvar cvt$1 = Object.freeze( { __proto__: null, cvt: cvt } );\nclass fpgm extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tlazy$1( this, `instructions`, () =>\n\t\t\t[ ...new Array( dict.length ) ].map( ( _ ) => p.uint8 )\n\t\t);\n\t}\n}\nvar fpgm$1 = Object.freeze( { __proto__: null, fpgm: fpgm } );\nclass gasp extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint16;\n\t\tthis.numRanges = p.uint16;\n\t\tconst getter = () =>\n\t\t\t[ ...new Array( this.numRanges ) ].map(\n\t\t\t\t( _ ) => new GASPRange( p )\n\t\t\t);\n\t\tlazy$1( this, `gaspRanges`, getter );\n\t}\n}\nclass GASPRange {\n\tconstructor( p ) {\n\t\tthis.rangeMaxPPEM = p.uint16;\n\t\tthis.rangeGaspBehavior = p.uint16;\n\t}\n}\nvar gasp$1 = Object.freeze( { __proto__: null, gasp: gasp } );\nclass glyf extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tsuper( dict, dataview );\n\t}\n\tgetGlyphData( offset, length ) {\n\t\tthis.parser.currentPosition = this.tableStart + offset;\n\t\treturn this.parser.readBytes( length );\n\t}\n}\nvar glyf$1 = Object.freeze( { __proto__: null, glyf: glyf } );\nclass loca extends SimpleTable {\n\tconstructor( dict, dataview, tables ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tconst n = tables.maxp.numGlyphs + 1;\n\t\tif ( tables.head.indexToLocFormat === 0 ) {\n\t\t\tthis.x2 = true;\n\t\t\tlazy$1( this, `offsets`, () =>\n\t\t\t\t[ ...new Array( n ) ].map( ( _ ) => p.Offset16 )\n\t\t\t);\n\t\t} else {\n\t\t\tlazy$1( this, `offsets`, () =>\n\t\t\t\t[ ...new Array( n ) ].map( ( _ ) => p.Offset32 )\n\t\t\t);\n\t\t}\n\t}\n\tgetGlyphDataOffsetAndLength( glyphID ) {\n\t\tlet offset = this.offsets[ glyphID ] * this.x2 ? 2 : 1;\n\t\tlet nextOffset = this.offsets[ glyphID + 1 ] * this.x2 ? 2 : 1;\n\t\treturn { offset: offset, length: nextOffset - offset };\n\t}\n}\nvar loca$1 = Object.freeze( { __proto__: null, loca: loca } );\nclass prep extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tlazy$1( this, `instructions`, () =>\n\t\t\t[ ...new Array( dict.length ) ].map( ( _ ) => p.uint8 )\n\t\t);\n\t}\n}\nvar prep$1 = Object.freeze( { __proto__: null, prep: prep } );\nclass CFF extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tlazy$1( this, `data`, () => p.readBytes() );\n\t}\n}\nvar CFF$1 = Object.freeze( { __proto__: null, CFF: CFF } );\nclass CFF2 extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tlazy$1( this, `data`, () => p.readBytes() );\n\t}\n}\nvar CFF2$1 = Object.freeze( { __proto__: null, CFF2: CFF2 } );\nclass VORG extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.majorVersion = p.uint16;\n\t\tthis.minorVersion = p.uint16;\n\t\tthis.defaultVertOriginY = p.int16;\n\t\tthis.numVertOriginYMetrics = p.uint16;\n\t\tlazy$1( this, `vertORiginYMetrics`, () =>\n\t\t\t[ ...new Array( this.numVertOriginYMetrics ) ].map(\n\t\t\t\t( _ ) => new VertOriginYMetric( p )\n\t\t\t)\n\t\t);\n\t}\n}\nclass VertOriginYMetric {\n\tconstructor( p ) {\n\t\tthis.glyphIndex = p.uint16;\n\t\tthis.vertOriginY = p.int16;\n\t}\n}\nvar VORG$1 = Object.freeze( { __proto__: null, VORG: VORG } );\nclass BitmapSize {\n\tconstructor( p ) {\n\t\tthis.indexSubTableArrayOffset = p.Offset32;\n\t\tthis.indexTablesSize = p.uint32;\n\t\tthis.numberofIndexSubTables = p.uint32;\n\t\tthis.colorRef = p.uint32;\n\t\tthis.hori = new SbitLineMetrics( p );\n\t\tthis.vert = new SbitLineMetrics( p );\n\t\tthis.startGlyphIndex = p.uint16;\n\t\tthis.endGlyphIndex = p.uint16;\n\t\tthis.ppemX = p.uint8;\n\t\tthis.ppemY = p.uint8;\n\t\tthis.bitDepth = p.uint8;\n\t\tthis.flags = p.int8;\n\t}\n}\nclass BitmapScale {\n\tconstructor( p ) {\n\t\tthis.hori = new SbitLineMetrics( p );\n\t\tthis.vert = new SbitLineMetrics( p );\n\t\tthis.ppemX = p.uint8;\n\t\tthis.ppemY = p.uint8;\n\t\tthis.substitutePpemX = p.uint8;\n\t\tthis.substitutePpemY = p.uint8;\n\t}\n}\nclass SbitLineMetrics {\n\tconstructor( p ) {\n\t\tthis.ascender = p.int8;\n\t\tthis.descender = p.int8;\n\t\tthis.widthMax = p.uint8;\n\t\tthis.caretSlopeNumerator = p.int8;\n\t\tthis.caretSlopeDenominator = p.int8;\n\t\tthis.caretOffset = p.int8;\n\t\tthis.minOriginSB = p.int8;\n\t\tthis.minAdvanceSB = p.int8;\n\t\tthis.maxBeforeBL = p.int8;\n\t\tthis.minAfterBL = p.int8;\n\t\tthis.pad1 = p.int8;\n\t\tthis.pad2 = p.int8;\n\t}\n}\nclass EBLC extends SimpleTable {\n\tconstructor( dict, dataview, name ) {\n\t\tconst { p: p } = super( dict, dataview, name );\n\t\tthis.majorVersion = p.uint16;\n\t\tthis.minorVersion = p.uint16;\n\t\tthis.numSizes = p.uint32;\n\t\tlazy$1( this, `bitMapSizes`, () =>\n\t\t\t[ ...new Array( this.numSizes ) ].map(\n\t\t\t\t( _ ) => new BitmapSize( p )\n\t\t\t)\n\t\t);\n\t}\n}\nvar EBLC$1 = Object.freeze( { __proto__: null, EBLC: EBLC } );\nclass EBDT extends SimpleTable {\n\tconstructor( dict, dataview, name ) {\n\t\tconst { p: p } = super( dict, dataview, name );\n\t\tthis.majorVersion = p.uint16;\n\t\tthis.minorVersion = p.uint16;\n\t}\n}\nvar EBDT$1 = Object.freeze( { __proto__: null, EBDT: EBDT } );\nclass EBSC extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.majorVersion = p.uint16;\n\t\tthis.minorVersion = p.uint16;\n\t\tthis.numSizes = p.uint32;\n\t\tlazy$1( this, `bitmapScales`, () =>\n\t\t\t[ ...new Array( this.numSizes ) ].map(\n\t\t\t\t( _ ) => new BitmapScale( p )\n\t\t\t)\n\t\t);\n\t}\n}\nvar EBSC$1 = Object.freeze( { __proto__: null, EBSC: EBSC } );\nclass CBLC extends EBLC {\n\tconstructor( dict, dataview ) {\n\t\tsuper( dict, dataview, `CBLC` );\n\t}\n}\nvar CBLC$1 = Object.freeze( { __proto__: null, CBLC: CBLC } );\nclass CBDT extends EBDT {\n\tconstructor( dict, dataview ) {\n\t\tsuper( dict, dataview, `CBDT` );\n\t}\n}\nvar CBDT$1 = Object.freeze( { __proto__: null, CBDT: CBDT } );\nclass sbix extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint16;\n\t\tthis.flags = p.flags( 16 );\n\t\tthis.numStrikes = p.uint32;\n\t\tlazy$1( this, `strikeOffsets`, () =>\n\t\t\t[ ...new Array( this.numStrikes ) ].map( ( _ ) => p.Offset32 )\n\t\t);\n\t}\n}\nvar sbix$1 = Object.freeze( { __proto__: null, sbix: sbix } );\nclass COLR extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint16;\n\t\tthis.numBaseGlyphRecords = p.uint16;\n\t\tthis.baseGlyphRecordsOffset = p.Offset32;\n\t\tthis.layerRecordsOffset = p.Offset32;\n\t\tthis.numLayerRecords = p.uint16;\n\t}\n\tgetBaseGlyphRecord( glyphID ) {\n\t\tlet start = this.tableStart + this.baseGlyphRecordsOffset;\n\t\tthis.parser.currentPosition = start;\n\t\tlet first = new BaseGlyphRecord( this.parser );\n\t\tlet firstID = first.gID;\n\t\tlet end = this.tableStart + this.layerRecordsOffset - 6;\n\t\tthis.parser.currentPosition = end;\n\t\tlet last = new BaseGlyphRecord( this.parser );\n\t\tlet lastID = last.gID;\n\t\tif ( firstID === glyphID ) return first;\n\t\tif ( lastID === glyphID ) return last;\n\t\twhile ( true ) {\n\t\t\tif ( start === end ) break;\n\t\t\tlet mid = start + ( end - start ) / 12;\n\t\t\tthis.parser.currentPosition = mid;\n\t\t\tlet middle = new BaseGlyphRecord( this.parser );\n\t\t\tlet midID = middle.gID;\n\t\t\tif ( midID === glyphID ) return middle;\n\t\t\telse if ( midID > glyphID ) {\n\t\t\t\tend = mid;\n\t\t\t} else if ( midID < glyphID ) {\n\t\t\t\tstart = mid;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\tgetLayers( glyphID ) {\n\t\tlet record = this.getBaseGlyphRecord( glyphID );\n\t\tthis.parser.currentPosition =\n\t\t\tthis.tableStart +\n\t\t\tthis.layerRecordsOffset +\n\t\t\t4 * record.firstLayerIndex;\n\t\treturn [ ...new Array( record.numLayers ) ].map(\n\t\t\t( _ ) => new LayerRecord( p )\n\t\t);\n\t}\n}\nclass BaseGlyphRecord {\n\tconstructor( p ) {\n\t\tthis.gID = p.uint16;\n\t\tthis.firstLayerIndex = p.uint16;\n\t\tthis.numLayers = p.uint16;\n\t}\n}\nclass LayerRecord {\n\tconstructor( p ) {\n\t\tthis.gID = p.uint16;\n\t\tthis.paletteIndex = p.uint16;\n\t}\n}\nvar COLR$1 = Object.freeze( { __proto__: null, COLR: COLR } );\nclass CPAL extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint16;\n\t\tthis.numPaletteEntries = p.uint16;\n\t\tconst numPalettes = ( this.numPalettes = p.uint16 );\n\t\tthis.numColorRecords = p.uint16;\n\t\tthis.offsetFirstColorRecord = p.Offset32;\n\t\tthis.colorRecordIndices = [ ...new Array( this.numPalettes ) ].map(\n\t\t\t( _ ) => p.uint16\n\t\t);\n\t\tlazy$1( this, `colorRecords`, () => {\n\t\t\tp.currentPosition = this.tableStart + this.offsetFirstColorRecord;\n\t\t\treturn [ ...new Array( this.numColorRecords ) ].map(\n\t\t\t\t( _ ) => new ColorRecord( p )\n\t\t\t);\n\t\t} );\n\t\tif ( this.version === 1 ) {\n\t\t\tthis.offsetPaletteTypeArray = p.Offset32;\n\t\t\tthis.offsetPaletteLabelArray = p.Offset32;\n\t\t\tthis.offsetPaletteEntryLabelArray = p.Offset32;\n\t\t\tlazy$1( this, `paletteTypeArray`, () => {\n\t\t\t\tp.currentPosition =\n\t\t\t\t\tthis.tableStart + this.offsetPaletteTypeArray;\n\t\t\t\treturn new PaletteTypeArray( p, numPalettes );\n\t\t\t} );\n\t\t\tlazy$1( this, `paletteLabelArray`, () => {\n\t\t\t\tp.currentPosition =\n\t\t\t\t\tthis.tableStart + this.offsetPaletteLabelArray;\n\t\t\t\treturn new PaletteLabelsArray( p, numPalettes );\n\t\t\t} );\n\t\t\tlazy$1( this, `paletteEntryLabelArray`, () => {\n\t\t\t\tp.currentPosition =\n\t\t\t\t\tthis.tableStart + this.offsetPaletteEntryLabelArray;\n\t\t\t\treturn new PaletteEntryLabelArray( p, numPalettes );\n\t\t\t} );\n\t\t}\n\t}\n}\nclass ColorRecord {\n\tconstructor( p ) {\n\t\tthis.blue = p.uint8;\n\t\tthis.green = p.uint8;\n\t\tthis.red = p.uint8;\n\t\tthis.alpha = p.uint8;\n\t}\n}\nclass PaletteTypeArray {\n\tconstructor( p, numPalettes ) {\n\t\tthis.paletteTypes = [ ...new Array( numPalettes ) ].map(\n\t\t\t( _ ) => p.uint32\n\t\t);\n\t}\n}\nclass PaletteLabelsArray {\n\tconstructor( p, numPalettes ) {\n\t\tthis.paletteLabels = [ ...new Array( numPalettes ) ].map(\n\t\t\t( _ ) => p.uint16\n\t\t);\n\t}\n}\nclass PaletteEntryLabelArray {\n\tconstructor( p, numPalettes ) {\n\t\tthis.paletteEntryLabels = [ ...new Array( numPalettes ) ].map(\n\t\t\t( _ ) => p.uint16\n\t\t);\n\t}\n}\nvar CPAL$1 = Object.freeze( { __proto__: null, CPAL: CPAL } );\nclass DSIG extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint32;\n\t\tthis.numSignatures = p.uint16;\n\t\tthis.flags = p.uint16;\n\t\tthis.signatureRecords = [ ...new Array( this.numSignatures ) ].map(\n\t\t\t( _ ) => new SignatureRecord( p )\n\t\t);\n\t}\n\tgetData( signatureID ) {\n\t\tconst record = this.signatureRecords[ signatureID ];\n\t\tthis.parser.currentPosition = this.tableStart + record.offset;\n\t\treturn new SignatureBlockFormat1( this.parser );\n\t}\n}\nclass SignatureRecord {\n\tconstructor( p ) {\n\t\tthis.format = p.uint32;\n\t\tthis.length = p.uint32;\n\t\tthis.offset = p.Offset32;\n\t}\n}\nclass SignatureBlockFormat1 {\n\tconstructor( p ) {\n\t\tp.uint16;\n\t\tp.uint16;\n\t\tthis.signatureLength = p.uint32;\n\t\tthis.signature = p.readBytes( this.signatureLength );\n\t}\n}\nvar DSIG$1 = Object.freeze( { __proto__: null, DSIG: DSIG } );\nclass hdmx extends SimpleTable {\n\tconstructor( dict, dataview, tables ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tconst numGlyphs = tables.hmtx.numGlyphs;\n\t\tthis.version = p.uint16;\n\t\tthis.numRecords = p.int16;\n\t\tthis.sizeDeviceRecord = p.int32;\n\t\tthis.records = [ ...new Array( numRecords ) ].map(\n\t\t\t( _ ) => new DeviceRecord( p, numGlyphs )\n\t\t);\n\t}\n}\nclass DeviceRecord {\n\tconstructor( p, numGlyphs ) {\n\t\tthis.pixelSize = p.uint8;\n\t\tthis.maxWidth = p.uint8;\n\t\tthis.widths = p.readBytes( numGlyphs );\n\t}\n}\nvar hdmx$1 = Object.freeze( { __proto__: null, hdmx: hdmx } );\nclass kern extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint16;\n\t\tthis.nTables = p.uint16;\n\t\tlazy$1( this, `tables`, () => {\n\t\t\tlet offset = this.tableStart + 4;\n\t\t\tconst tables = [];\n\t\t\tfor ( let i = 0; i < this.nTables; i++ ) {\n\t\t\t\tp.currentPosition = offset;\n\t\t\t\tlet subtable = new KernSubTable( p );\n\t\t\t\ttables.push( subtable );\n\t\t\t\toffset += subtable;\n\t\t\t}\n\t\t\treturn tables;\n\t\t} );\n\t}\n}\nclass KernSubTable {\n\tconstructor( p ) {\n\t\tthis.version = p.uint16;\n\t\tthis.length = p.uint16;\n\t\tthis.coverage = p.flags( 8 );\n\t\tthis.format = p.uint8;\n\t\tif ( this.format === 0 ) {\n\t\t\tthis.nPairs = p.uint16;\n\t\t\tthis.searchRange = p.uint16;\n\t\t\tthis.entrySelector = p.uint16;\n\t\t\tthis.rangeShift = p.uint16;\n\t\t\tlazy$1( this, `pairs`, () =>\n\t\t\t\t[ ...new Array( this.nPairs ) ].map( ( _ ) => new Pair( p ) )\n\t\t\t);\n\t\t}\n\t\tif ( this.format === 2 ) {\n\t\t\tconsole.warn(\n\t\t\t\t`Kern subtable format 2 is not supported: this parser currently only parses universal table data.`\n\t\t\t);\n\t\t}\n\t}\n\tget horizontal() {\n\t\treturn this.coverage[ 0 ];\n\t}\n\tget minimum() {\n\t\treturn this.coverage[ 1 ];\n\t}\n\tget crossstream() {\n\t\treturn this.coverage[ 2 ];\n\t}\n\tget override() {\n\t\treturn this.coverage[ 3 ];\n\t}\n}\nclass Pair {\n\tconstructor( p ) {\n\t\tthis.left = p.uint16;\n\t\tthis.right = p.uint16;\n\t\tthis.value = p.fword;\n\t}\n}\nvar kern$1 = Object.freeze( { __proto__: null, kern: kern } );\nclass LTSH extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint16;\n\t\tthis.numGlyphs = p.uint16;\n\t\tthis.yPels = p.readBytes( this.numGlyphs );\n\t}\n}\nvar LTSH$1 = Object.freeze( { __proto__: null, LTSH: LTSH } );\nclass MERG extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint16;\n\t\tthis.mergeClassCount = p.uint16;\n\t\tthis.mergeDataOffset = p.Offset16;\n\t\tthis.classDefCount = p.uint16;\n\t\tthis.offsetToClassDefOffsets = p.Offset16;\n\t\tlazy$1( this, `mergeEntryMatrix`, () =>\n\t\t\t[ ...new Array( this.mergeClassCount ) ].map( ( _ ) =>\n\t\t\t\tp.readBytes( this.mergeClassCount )\n\t\t\t)\n\t\t);\n\t\tconsole.warn( `Full MERG parsing is currently not supported.` );\n\t\tconsole.warn(\n\t\t\t`If you need this table parsed, please file an issue, or better yet, a PR.`\n\t\t);\n\t}\n}\nvar MERG$1 = Object.freeze( { __proto__: null, MERG: MERG } );\nclass meta extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint32;\n\t\tthis.flags = p.uint32;\n\t\tp.uint32;\n\t\tthis.dataMapsCount = p.uint32;\n\t\tthis.dataMaps = [ ...new Array( this.dataMapsCount ) ].map(\n\t\t\t( _ ) => new DataMap( this.tableStart, p )\n\t\t);\n\t}\n}\nclass DataMap {\n\tconstructor( tableStart, p ) {\n\t\tthis.tableStart = tableStart;\n\t\tthis.parser = p;\n\t\tthis.tag = p.tag;\n\t\tthis.dataOffset = p.Offset32;\n\t\tthis.dataLength = p.uint32;\n\t}\n\tgetData() {\n\t\tthis.parser.currentField = this.tableStart + this.dataOffset;\n\t\treturn this.parser.readBytes( this.dataLength );\n\t}\n}\nvar meta$1 = Object.freeze( { __proto__: null, meta: meta } );\nclass PCLT extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tsuper( dict, dataview );\n\t\tconsole.warn(\n\t\t\t`This font uses a PCLT table, which is currently not supported by this parser.`\n\t\t);\n\t\tconsole.warn(\n\t\t\t`If you need this table parsed, please file an issue, or better yet, a PR.`\n\t\t);\n\t}\n}\nvar PCLT$1 = Object.freeze( { __proto__: null, PCLT: PCLT } );\nclass VDMX extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint16;\n\t\tthis.numRecs = p.uint16;\n\t\tthis.numRatios = p.uint16;\n\t\tthis.ratRanges = [ ...new Array( this.numRatios ) ].map(\n\t\t\t( _ ) => new RatioRange( p )\n\t\t);\n\t\tthis.offsets = [ ...new Array( this.numRatios ) ].map(\n\t\t\t( _ ) => p.Offset16\n\t\t);\n\t\tthis.VDMXGroups = [ ...new Array( this.numRecs ) ].map(\n\t\t\t( _ ) => new VDMXGroup( p )\n\t\t);\n\t}\n}\nclass RatioRange {\n\tconstructor( p ) {\n\t\tthis.bCharSet = p.uint8;\n\t\tthis.xRatio = p.uint8;\n\t\tthis.yStartRatio = p.uint8;\n\t\tthis.yEndRatio = p.uint8;\n\t}\n}\nclass VDMXGroup {\n\tconstructor( p ) {\n\t\tthis.recs = p.uint16;\n\t\tthis.startsz = p.uint8;\n\t\tthis.endsz = p.uint8;\n\t\tthis.records = [ ...new Array( this.recs ) ].map(\n\t\t\t( _ ) => new vTable( p )\n\t\t);\n\t}\n}\nclass vTable {\n\tconstructor( p ) {\n\t\tthis.yPelHeight = p.uint16;\n\t\tthis.yMax = p.int16;\n\t\tthis.yMin = p.int16;\n\t}\n}\nvar VDMX$1 = Object.freeze( { __proto__: null, VDMX: VDMX } );\nclass vhea extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.fixed;\n\t\tthis.ascent = this.vertTypoAscender = p.int16;\n\t\tthis.descent = this.vertTypoDescender = p.int16;\n\t\tthis.lineGap = this.vertTypoLineGap = p.int16;\n\t\tthis.advanceHeightMax = p.int16;\n\t\tthis.minTopSideBearing = p.int16;\n\t\tthis.minBottomSideBearing = p.int16;\n\t\tthis.yMaxExtent = p.int16;\n\t\tthis.caretSlopeRise = p.int16;\n\t\tthis.caretSlopeRun = p.int16;\n\t\tthis.caretOffset = p.int16;\n\t\tthis.reserved = p.int16;\n\t\tthis.reserved = p.int16;\n\t\tthis.reserved = p.int16;\n\t\tthis.reserved = p.int16;\n\t\tthis.metricDataFormat = p.int16;\n\t\tthis.numOfLongVerMetrics = p.uint16;\n\t\tp.verifyLength();\n\t}\n}\nvar vhea$1 = Object.freeze( { __proto__: null, vhea: vhea } );\nclass vmtx extends SimpleTable {\n\tconstructor( dict, dataview, tables ) {\n\t\tsuper( dict, dataview );\n\t\tconst numOfLongVerMetrics = tables.vhea.numOfLongVerMetrics;\n\t\tconst numGlyphs = tables.maxp.numGlyphs;\n\t\tconst metricsStart = p.currentPosition;\n\t\tlazy( this, `vMetrics`, () => {\n\t\t\tp.currentPosition = metricsStart;\n\t\t\treturn [ ...new Array( numOfLongVerMetrics ) ].map(\n\t\t\t\t( _ ) => new LongVertMetric( p.uint16, p.int16 )\n\t\t\t);\n\t\t} );\n\t\tif ( numOfLongVerMetrics < numGlyphs ) {\n\t\t\tconst tsbStart = metricsStart + numOfLongVerMetrics * 4;\n\t\t\tlazy( this, `topSideBearings`, () => {\n\t\t\t\tp.currentPosition = tsbStart;\n\t\t\t\treturn [ ...new Array( numGlyphs - numOfLongVerMetrics ) ].map(\n\t\t\t\t\t( _ ) => p.int16\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\t}\n}\nclass LongVertMetric {\n\tconstructor( h, b ) {\n\t\tthis.advanceHeight = h;\n\t\tthis.topSideBearing = b;\n\t}\n}\nvar vmtx$1 = Object.freeze( { __proto__: null, vmtx: vmtx } );\nexport { Font };\n/* eslint-enable */\n", "/**\n * WordPress dependencies\n */\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport type { FontFamily, FontFace } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { kebabCase } = unlock( componentsPrivateApis );\n\nexport default function makeFamiliesFromFaces(\n\tfontFaces: FontFace[]\n): FontFamily[] {\n\tconst fontFamiliesObject = fontFaces.reduce(\n\t\t( acc: Record< string, FontFamily >, item: FontFace ) => {\n\t\t\tif ( ! acc[ item.fontFamily ] ) {\n\t\t\t\tacc[ item.fontFamily ] = {\n\t\t\t\t\tname: item.fontFamily,\n\t\t\t\t\tfontFamily: item.fontFamily,\n\t\t\t\t\tslug: kebabCase( item.fontFamily.toLowerCase() ),\n\t\t\t\t\tfontFace: [],\n\t\t\t\t};\n\t\t\t}\n\t\t\t// @ts-expect-error\n\t\t\tacc[ item.fontFamily ].fontFace.push( item );\n\t\t\treturn acc;\n\t\t},\n\t\t{}\n\t);\n\treturn Object.values( fontFamiliesObject ) as FontFamily[];\n}\n", "/**\n * WordPress dependencies\n */\nimport { _n, sprintf } from '@wordpress/i18n';\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalItem as Item,\n\tFlexItem,\n} from '@wordpress/components';\nimport { useContext } from '@wordpress/element';\nimport type { FontFamily } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { FontLibraryContext } from './font-library/context';\nimport { getFamilyPreviewStyle } from './font-library/utils/preview-styles';\n\ninterface FontFamilyItemProps {\n\tfont: FontFamily;\n}\n\nfunction FontFamilyItem( { font }: FontFamilyItemProps ) {\n\tconst { handleSetLibraryFontSelected, setModalTabOpen } =\n\t\tuseContext( FontLibraryContext );\n\n\tconst variantsCount = font?.fontFace?.length || 1;\n\n\tconst handleClick = () => {\n\t\thandleSetLibraryFontSelected?.( font );\n\t\tsetModalTabOpen?.( 'installed-fonts' );\n\t};\n\n\tconst previewStyle = getFamilyPreviewStyle( font );\n\n\treturn (\n\t\t<Item onClick={ handleClick }>\n\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t<FlexItem style={ previewStyle }>{ font.name }</FlexItem>\n\t\t\t\t<FlexItem className=\"global-styles-ui-screen-typography__font-variants-count\">\n\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t/* translators: %d: Number of font variants. */\n\t\t\t\t\t\t_n( '%d variant', '%d variants', variantsCount ),\n\t\t\t\t\t\tvariantsCount\n\t\t\t\t\t) }\n\t\t\t\t</FlexItem>\n\t\t\t</HStack>\n\t\t</Item>\n\t);\n}\n\nexport default FontFamilyItem;\n", "/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\tFlexItem,\n} from '@wordpress/components';\nimport { Icon, chevronLeft, chevronRight } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { Subtitle } from '../subtitle';\nimport { NavigationButtonAsItem } from '../navigation-button';\n\nfunction FontSizes() {\n\treturn (\n\t\t<VStack spacing={ 2 }>\n\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t<Subtitle level={ 3 }>{ __( 'Font Sizes' ) }</Subtitle>\n\t\t\t</HStack>\n\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t<NavigationButtonAsItem path=\"/typography/font-sizes\">\n\t\t\t\t\t<HStack direction=\"row\">\n\t\t\t\t\t\t<FlexItem>{ __( 'Font size presets' ) }</FlexItem>\n\t\t\t\t\t\t<Icon icon={ isRTL() ? chevronLeft : chevronRight } />\n\t\t\t\t\t</HStack>\n\t\t\t\t</NavigationButtonAsItem>\n\t\t\t</ItemGroup>\n\t\t</VStack>\n\t);\n}\n\nexport default FontSizes;\n", "/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\t__experimentalSpacer as Spacer,\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport TypographyPanel from './typography-panel';\nimport { ScreenHeader } from './screen-header';\nimport TypographyPreview from './typography-preview';\n\nconst elements = {\n\ttext: {\n\t\tdescription: __( 'Manage the fonts used on the site.' ),\n\t\ttitle: __( 'Text' ),\n\t},\n\tlink: {\n\t\tdescription: __( 'Manage the fonts and typography used on the links.' ),\n\t\ttitle: __( 'Links' ),\n\t},\n\theading: {\n\t\tdescription: __( 'Manage the fonts and typography used on headings.' ),\n\t\ttitle: __( 'Headings' ),\n\t},\n\tcaption: {\n\t\tdescription: __( 'Manage the fonts and typography used on captions.' ),\n\t\ttitle: __( 'Captions' ),\n\t},\n\tbutton: {\n\t\tdescription: __( 'Manage the fonts and typography used on buttons.' ),\n\t\ttitle: __( 'Buttons' ),\n\t},\n};\n\ninterface ScreenTypographyElementProps {\n\telement: keyof typeof elements;\n}\n\nfunction ScreenTypographyElement( { element }: ScreenTypographyElementProps ) {\n\tconst [ headingLevel, setHeadingLevel ] = useState( 'heading' );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ elements[ element ].title }\n\t\t\t\tdescription={ elements[ element ].description }\n\t\t\t/>\n\t\t\t<Spacer marginX={ 4 }>\n\t\t\t\t<TypographyPreview\n\t\t\t\t\telement={ element }\n\t\t\t\t\theadingLevel={ headingLevel }\n\t\t\t\t/>\n\t\t\t</Spacer>\n\t\t\t{ element === 'heading' && (\n\t\t\t\t<Spacer marginX={ 4 } marginBottom=\"1em\">\n\t\t\t\t\t<ToggleGroupControl\n\t\t\t\t\t\tlabel={ __( 'Select heading level' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\tvalue={ headingLevel }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetHeadingLevel( value as string )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tisBlock\n\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"heading\"\n\t\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\t\taria-label={ __( 'All headings' ) }\n\t\t\t\t\t\t\tlabel={ _x( 'All', 'heading levels' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"h1\"\n\t\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\t\taria-label={ __( 'Heading 1' ) }\n\t\t\t\t\t\t\tlabel={ __( 'H1' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"h2\"\n\t\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\t\taria-label={ __( 'Heading 2' ) }\n\t\t\t\t\t\t\tlabel={ __( 'H2' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"h3\"\n\t\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\t\taria-label={ __( 'Heading 3' ) }\n\t\t\t\t\t\t\tlabel={ __( 'H3' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"h4\"\n\t\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\t\taria-label={ __( 'Heading 4' ) }\n\t\t\t\t\t\t\tlabel={ __( 'H4' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"h5\"\n\t\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\t\taria-label={ __( 'Heading 5' ) }\n\t\t\t\t\t\t\tlabel={ __( 'H5' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"h6\"\n\t\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\t\taria-label={ __( 'Heading 6' ) }\n\t\t\t\t\t\t\tlabel={ __( 'H6' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToggleGroupControl>\n\t\t\t\t</Spacer>\n\t\t\t) }\n\t\t\t<TypographyPanel\n\t\t\t\telement={ element }\n\t\t\t\theadingLevel={ headingLevel }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default ScreenTypographyElement;\n", "/**\n * WordPress dependencies\n */\n// @ts-expect-error: Not typed yet.\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { useStyle, useSetting } from './hooks';\nimport { unlock } from './lock-unlock';\n\nconst { useSettingsForBlockElement, TypographyPanel: StylesTypographyPanel } =\n\tunlock( blockEditorPrivateApis );\n\ninterface TypographyPanelProps {\n\telement: string;\n\theadingLevel: string;\n}\n\nexport default function TypographyPanel( {\n\telement,\n\theadingLevel,\n}: TypographyPanelProps ) {\n\tlet prefixParts: string[] = [];\n\tif ( element === 'heading' ) {\n\t\tprefixParts = prefixParts.concat( [ 'elements', headingLevel ] );\n\t} else if ( element && element !== 'text' ) {\n\t\tprefixParts = prefixParts.concat( [ 'elements', element ] );\n\t}\n\tconst prefix = prefixParts.join( '.' );\n\n\tconst [ style ] = useStyle( prefix, '', 'user', false );\n\tconst [ inheritedStyle, setStyle ] = useStyle(\n\t\tprefix,\n\t\t'',\n\t\t'merged',\n\t\tfalse\n\t);\n\tconst [ rawSettings ] = useSetting( '' );\n\tconst usedElement = element === 'heading' ? headingLevel : element;\n\tconst settings = useSettingsForBlockElement(\n\t\trawSettings,\n\t\tundefined,\n\t\tusedElement\n\t);\n\n\treturn (\n\t\t<StylesTypographyPanel\n\t\t\tinheritedValue={ inheritedStyle }\n\t\t\tvalue={ style }\n\t\t\tonChange={ setStyle }\n\t\t\tsettings={ settings }\n\t\t/>\n\t);\n}\n", "/**\n * Internal dependencies\n */\nimport { useStyle } from './hooks';\n\ninterface TypographyPreviewProps {\n\tname?: string;\n\telement: string;\n\theadingLevel: string;\n}\n\nexport default function TypographyPreview( {\n\tname,\n\telement,\n\theadingLevel,\n}: TypographyPreviewProps ) {\n\tlet prefix = '';\n\tif ( element === 'heading' ) {\n\t\tprefix = `elements.${ headingLevel }.`;\n\t} else if ( element && element !== 'text' ) {\n\t\tprefix = `elements.${ element }.`;\n\t}\n\n\tconst [ fontFamily ] = useStyle( prefix + 'typography.fontFamily', name );\n\tconst [ gradientValue ] = useStyle( prefix + 'color.gradient', name );\n\tconst [ backgroundColor ] = useStyle( prefix + 'color.background', name );\n\tconst [ fallbackBackgroundColor ] = useStyle( 'color.background' );\n\tconst [ color ] = useStyle( prefix + 'color.text', name );\n\tconst [ fontSize ] = useStyle( prefix + 'typography.fontSize', name );\n\tconst [ fontStyle ] = useStyle( prefix + 'typography.fontStyle', name );\n\tconst [ fontWeight ] = useStyle( prefix + 'typography.fontWeight', name );\n\tconst [ letterSpacing ] = useStyle(\n\t\tprefix + 'typography.letterSpacing',\n\t\tname\n\t);\n\tconst extraStyles =\n\t\telement === 'link'\n\t\t\t? {\n\t\t\t\t\ttextDecoration: 'underline',\n\t\t\t }\n\t\t\t: {};\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"global-styles-ui-typography-preview\"\n\t\t\tstyle={ {\n\t\t\t\tfontFamily: fontFamily ?? 'serif',\n\t\t\t\tbackground:\n\t\t\t\t\tgradientValue ?? backgroundColor ?? fallbackBackgroundColor,\n\t\t\t\tcolor,\n\t\t\t\tfontSize,\n\t\t\t\tfontStyle,\n\t\t\t\tfontWeight,\n\t\t\t\tletterSpacing,\n\t\t\t\t...extraStyles,\n\t\t\t} }\n\t\t>\n\t\t\tAa\n\t\t</div>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\n// @ts-expect-error: Not typed yet.\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport type {\n\tGlobalStylesStyles,\n\tGlobalStylesSettings,\n} from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport { ScreenHeader } from './screen-header';\nimport { ScreenBody } from './screen-body';\nimport Palette from './palette';\nimport { useStyle, useSetting } from './hooks';\nimport { unlock } from './lock-unlock';\n\nconst { useSettingsForBlockElement, ColorPanel: StylesColorPanel } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction ScreenColors() {\n\t// Get user styles for editing\n\tconst [ style, setStyle ] = useStyle< GlobalStylesStyles >(\n\t\t'',\n\t\tundefined,\n\t\t'user',\n\t\tfalse\n\t);\n\t// Get inherited styles for display\n\tconst [ inheritedStyle ] = useStyle< GlobalStylesStyles >(\n\t\t'',\n\t\tundefined,\n\t\t'merged',\n\t\tfalse\n\t);\n\t// Get settings for the color panel\n\tconst [ rawSettings ] = useSetting< GlobalStylesSettings >( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Colors' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Palette colors and the application of those colors on site elements.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<ScreenBody>\n\t\t\t\t<VStack spacing={ 7 }>\n\t\t\t\t\t<Palette />\n\t\t\t\t</VStack>\n\t\t\t</ScreenBody>\n\t\t\t<StylesColorPanel\n\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\tvalue={ style }\n\t\t\t\tonChange={ setStyle }\n\t\t\t\tsettings={ settings }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default ScreenColors;\n", "/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\tFlexItem,\n\t__experimentalHStack as HStack,\n\t__experimentalZStack as ZStack,\n\t__experimentalVStack as VStack,\n\tColorIndicator,\n} from '@wordpress/components';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { Icon, chevronLeft, chevronRight } from '@wordpress/icons';\nimport { useMemo } from '@wordpress/element';\nimport type { Color } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport { Subtitle } from './subtitle';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport ColorIndicatorWrapper from './color-indicator-wrapper';\nimport { useSetting } from './hooks';\n\nconst EMPTY_COLORS: Color[] = [];\n\ninterface PaletteProps {\n\tname?: string;\n}\n\nfunction Palette( { name }: PaletteProps ) {\n\tconst [ customColors ] = useSetting< Color[] >( 'color.palette.custom' );\n\tconst [ themeColors ] = useSetting< Color[] >( 'color.palette.theme' );\n\tconst [ defaultColors ] = useSetting< Color[] >( 'color.palette.default' );\n\tconst [ defaultPaletteEnabled ] = useSetting< boolean >(\n\t\t'color.defaultPalette',\n\t\tname\n\t);\n\n\tconst safeCustomColors = customColors || EMPTY_COLORS;\n\tconst safeThemeColors = themeColors || EMPTY_COLORS;\n\tconst safeDefaultColors = defaultColors || EMPTY_COLORS;\n\tconst safeDefaultPaletteEnabled = defaultPaletteEnabled ?? true;\n\n\tconst colors = useMemo(\n\t\t() => [\n\t\t\t...safeCustomColors,\n\t\t\t...safeThemeColors,\n\t\t\t...( safeDefaultColors && safeDefaultPaletteEnabled\n\t\t\t\t? safeDefaultColors\n\t\t\t\t: EMPTY_COLORS ),\n\t\t],\n\t\t[\n\t\t\tsafeCustomColors,\n\t\t\tsafeThemeColors,\n\t\t\tsafeDefaultColors,\n\t\t\tsafeDefaultPaletteEnabled,\n\t\t]\n\t);\n\n\tconst screenPath = ! name\n\t\t? '/colors/palette'\n\t\t: '/blocks/' + encodeURIComponent( name ) + '/colors/palette';\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t<Subtitle level={ 3 }>{ __( 'Palette' ) }</Subtitle>\n\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t<NavigationButtonAsItem path={ screenPath }>\n\t\t\t\t\t<HStack direction=\"row\">\n\t\t\t\t\t\t{ colors.length > 0 ? (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<ZStack isLayered={ false } offset={ -8 }>\n\t\t\t\t\t\t\t\t\t{ colors\n\t\t\t\t\t\t\t\t\t\t.slice( 0, 5 )\n\t\t\t\t\t\t\t\t\t\t.map( ( { color }, index ) => (\n\t\t\t\t\t\t\t\t\t\t\t<ColorIndicatorWrapper\n\t\t\t\t\t\t\t\t\t\t\t\tkey={ `${ color }-${ index }` }\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<ColorIndicator\n\t\t\t\t\t\t\t\t\t\t\t\t\tcolorValue={ color }\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</ColorIndicatorWrapper>\n\t\t\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t\t</ZStack>\n\t\t\t\t\t\t\t\t<FlexItem isBlock>\n\t\t\t\t\t\t\t\t\t{ __( 'Edit palette' ) }\n\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<FlexItem>{ __( 'Add colors' ) }</FlexItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<Icon icon={ isRTL() ? chevronLeft : chevronRight } />\n\t\t\t\t\t</HStack>\n\t\t\t\t</NavigationButtonAsItem>\n\t\t\t</ItemGroup>\n\t\t</VStack>\n\t);\n}\n\nexport default Palette;\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Flex } from '@wordpress/components';\n\ninterface ColorIndicatorWrapperProps {\n\tclassName?: string;\n\t[ key: string ]: any;\n}\n\nfunction ColorIndicatorWrapper( {\n\tclassName,\n\tchildren,\n\t...props\n}: ColorIndicatorWrapperProps ) {\n\treturn (\n\t\t<Flex\n\t\t\tclassName={ clsx(\n\t\t\t\t'global-styles-ui__color-indicator-wrapper',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ children }\n\t\t</Flex>\n\t);\n}\n\nexport default ColorIndicatorWrapper;\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n// @ts-ignore - WordPress private APIs\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { ScreenHeader } from './screen-header';\nimport ColorPalettePanel from './color-palette-panel';\nimport GradientPalettePanel from './gradients-palette-panel';\n\n/**\n * External dependencies\n */\nimport { unlock } from './lock-unlock';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nfunction ScreenColorPalette( { name }: { name?: string } ) {\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Edit palette' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'The combination of colors used across the site and in color pickers.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<Tabs>\n\t\t\t\t<Tabs.TabList>\n\t\t\t\t\t<Tabs.Tab tabId=\"color\">{ __( 'Color' ) }</Tabs.Tab>\n\t\t\t\t\t<Tabs.Tab tabId=\"gradient\">{ __( 'Gradient' ) }</Tabs.Tab>\n\t\t\t\t</Tabs.TabList>\n\t\t\t\t<Tabs.TabPanel tabId=\"color\" focusable={ false }>\n\t\t\t\t\t<ColorPalettePanel name={ name } />\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel tabId=\"gradient\" focusable={ false }>\n\t\t\t\t\t<GradientPalettePanel name={ name } />\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t</Tabs>\n\t\t</>\n\t);\n}\n\nexport default ScreenColorPalette;\n", "/**\n * WordPress dependencies\n */\nimport type { Color } from '@wordpress/global-styles-engine';\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\t__experimentalPaletteEdit as PaletteEdit,\n\t__experimentalVStack as VStack,\n\tButton,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { shuffle } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { useSetting, useColorRandomizer } from './hooks';\nimport ColorVariations from './variations/variations-color';\n\nconst mobilePopoverProps = { placement: 'bottom-start' as const, offset: 8 };\n\ninterface ColorPalettePanelProps {\n\tname?: string;\n}\n\nexport default function ColorPalettePanel( { name }: ColorPalettePanelProps ) {\n\tconst [ themeColors, setThemeColors ] = useSetting< Color[] >(\n\t\t'color.palette.theme',\n\t\tname\n\t);\n\tconst [ baseThemeColors ] = useSetting< Color[] >(\n\t\t'color.palette.theme',\n\t\tname,\n\t\t'base'\n\t);\n\tconst [ defaultColors, setDefaultColors ] = useSetting< Color[] >(\n\t\t'color.palette.default',\n\t\tname\n\t);\n\tconst [ baseDefaultColors ] = useSetting< Color[] >(\n\t\t'color.palette.default',\n\t\tname,\n\t\t'base'\n\t);\n\tconst [ customColors, setCustomColors ] = useSetting< Color[] >(\n\t\t'color.palette.custom',\n\t\tname\n\t);\n\n\tconst [ defaultPaletteEnabled ] = useSetting< boolean >(\n\t\t'color.defaultPalette',\n\t\tname\n\t);\n\n\tconst isMobileViewport = useViewportMatch( 'small', '<' );\n\tconst popoverProps = isMobileViewport ? mobilePopoverProps : undefined;\n\n\tconst [ randomizeThemeColors ] = useColorRandomizer( name );\n\n\treturn (\n\t\t<VStack className=\"global-styles-ui-color-palette-panel\" spacing={ 8 }>\n\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t{ !! themeColors && !! themeColors.length && (\n\t\t\t\t\t<PaletteEdit\n\t\t\t\t\t\tcanReset={ themeColors !== baseThemeColors }\n\t\t\t\t\t\tcanOnlyChangeValues\n\t\t\t\t\t\tcolors={ themeColors }\n\t\t\t\t\t\tonChange={ setThemeColors }\n\t\t\t\t\t\tpaletteLabel={ __( 'Theme' ) }\n\t\t\t\t\t\tpaletteLabelHeadingLevel={ 3 }\n\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ ( window as any ).__experimentalEnableColorRandomizer &&\n\t\t\t\t\tthemeColors?.length > 0 &&\n\t\t\t\t\trandomizeThemeColors && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\ticon={ shuffle }\n\t\t\t\t\t\t\tonClick={ randomizeThemeColors }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Randomize colors' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t</VStack>\n\t\t\t{ !! defaultColors &&\n\t\t\t\t!! defaultColors.length &&\n\t\t\t\t!! defaultPaletteEnabled && (\n\t\t\t\t\t<PaletteEdit\n\t\t\t\t\t\tcanReset={ defaultColors !== baseDefaultColors }\n\t\t\t\t\t\tcanOnlyChangeValues\n\t\t\t\t\t\tcolors={ defaultColors }\n\t\t\t\t\t\tonChange={ setDefaultColors }\n\t\t\t\t\t\tpaletteLabel={ __( 'Default' ) }\n\t\t\t\t\t\tpaletteLabelHeadingLevel={ 3 }\n\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t<PaletteEdit\n\t\t\t\tcolors={ customColors }\n\t\t\t\tonChange={ setCustomColors }\n\t\t\t\tpaletteLabel={ __( 'Custom' ) }\n\t\t\t\tpaletteLabelHeadingLevel={ 3 }\n\t\t\t\tslugPrefix=\"custom-\"\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t/>\n\t\t\t<ColorVariations title={ __( 'Palettes' ) } />\n\t\t</VStack>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalGrid as Grid,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport StylesPreviewColors from '../preview-colors';\nimport { useCurrentMergeThemeStyleVariationsWithUserConfig } from '../hooks';\nimport { Subtitle } from '../subtitle';\nimport Variation from './variation';\n\ninterface ColorVariationsProps {\n\ttitle?: string;\n\tgap?: number;\n}\n\nconst propertiesToFilter = [ 'color' ];\n\nexport default function ColorVariations( {\n\ttitle,\n\tgap = 2,\n}: ColorVariationsProps ) {\n\tconst colorVariations =\n\t\tuseCurrentMergeThemeStyleVariationsWithUserConfig( propertiesToFilter );\n\n\t// Return null if there is only one variation (the default).\n\tif ( colorVariations?.length <= 1 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t{ title && <Subtitle level={ 3 }>{ title }</Subtitle> }\n\t\t\t<Grid gap={ gap }>\n\t\t\t\t{ colorVariations.map( ( variation: any, index: number ) => (\n\t\t\t\t\t<Variation\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\tisPill\n\t\t\t\t\t\tproperties={ propertiesToFilter }\n\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t>\n\t\t\t\t\t\t{ () => <StylesPreviewColors /> }\n\t\t\t\t\t</Variation>\n\t\t\t\t) ) }\n\t\t\t</Grid>\n\t\t</VStack>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport PresetColors from './preset-colors';\nimport PreviewWrapper from './preview-wrapper';\n\nconst firstFrameVariants = {\n\tstart: {\n\t\tscale: 1,\n\t\topacity: 1,\n\t},\n\thover: {\n\t\tscale: 0,\n\t\topacity: 0,\n\t},\n};\n\ninterface StylesPreviewColorsProps {\n\tlabel?: string;\n\tisFocused?: boolean;\n\twithHoverView?: boolean;\n}\n\nconst StylesPreviewColors = ( {\n\tlabel,\n\tisFocused,\n\twithHoverView,\n}: StylesPreviewColorsProps ) => {\n\treturn (\n\t\t<PreviewWrapper\n\t\t\tlabel={ label }\n\t\t\tisFocused={ isFocused }\n\t\t\twithHoverView={ withHoverView }\n\t\t>\n\t\t\t{ ( { key } ) => (\n\t\t\t\t<motion.div\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tvariants={ firstFrameVariants }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<PresetColors />\n\t\t\t\t\t</HStack>\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t</PreviewWrapper>\n\t);\n};\n\nexport default StylesPreviewColors;\n", "/**\n * Internal dependencies\n */\nimport { useStylesPreviewColors } from './preview-hooks';\n\nexport default function PresetColors() {\n\tconst { paletteColors } = useStylesPreviewColors();\n\treturn paletteColors.slice( 0, 4 ).map( ( { slug, color }, index ) => (\n\t\t<div\n\t\t\tkey={ `${ slug }-${ index }` }\n\t\t\tstyle={ {\n\t\t\t\tflexGrow: 1,\n\t\t\t\theight: '100%',\n\t\t\t\tbackground: color,\n\t\t\t} }\n\t\t/>\n\t) );\n}\n", "/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalPaletteEdit as PaletteEdit,\n\t__experimentalSpacer as Spacer,\n\tDuotonePicker,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport type { Gradient } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport { Subtitle } from './subtitle';\nimport { useSetting } from './hooks';\n\nconst mobilePopoverProps = { placement: 'bottom-start' as const, offset: 8 };\n\nconst noop = () => {};\n\ninterface GradientPalettePanelProps {\n\tname?: string;\n}\n\nexport default function GradientPalettePanel( {\n\tname,\n}: GradientPalettePanelProps ) {\n\tconst [ themeGradients, setThemeGradients ] = useSetting< Gradient[] >(\n\t\t'color.gradients.theme',\n\t\tname\n\t);\n\tconst [ baseThemeGradients ] = useSetting< Gradient[] >(\n\t\t'color.gradients.theme',\n\t\tname,\n\t\t'base'\n\t);\n\tconst [ defaultGradients, setDefaultGradients ] = useSetting< Gradient[] >(\n\t\t'color.gradients.default',\n\t\tname\n\t);\n\tconst [ baseDefaultGradients ] = useSetting< Gradient[] >(\n\t\t'color.gradients.default',\n\t\tname,\n\t\t'base'\n\t);\n\tconst [ customGradients, setCustomGradients ] = useSetting< Gradient[] >(\n\t\t'color.gradients.custom',\n\t\tname\n\t);\n\n\tconst [ defaultPaletteEnabled ] = useSetting< boolean >(\n\t\t'color.defaultGradients',\n\t\tname\n\t);\n\n\tconst [ customDuotone ] = useSetting( 'color.duotone.custom' ) || [];\n\tconst [ defaultDuotone ] = useSetting( 'color.duotone.default' ) || [];\n\tconst [ themeDuotone ] = useSetting( 'color.duotone.theme' ) || [];\n\tconst [ defaultDuotoneEnabled ] = useSetting( 'color.defaultDuotone' );\n\n\tconst duotonePalette = [\n\t\t...( customDuotone || [] ),\n\t\t...( themeDuotone || [] ),\n\t\t...( defaultDuotone && defaultDuotoneEnabled ? defaultDuotone : [] ),\n\t];\n\n\tconst isMobileViewport = useViewportMatch( 'small', '<' );\n\tconst popoverProps = isMobileViewport ? mobilePopoverProps : undefined;\n\n\treturn (\n\t\t<VStack\n\t\t\tclassName=\"global-styles-ui-gradient-palette-panel\"\n\t\t\tspacing={ 8 }\n\t\t>\n\t\t\t{ !! themeGradients && !! themeGradients.length && (\n\t\t\t\t<PaletteEdit\n\t\t\t\t\tcanReset={ themeGradients !== baseThemeGradients }\n\t\t\t\t\tcanOnlyChangeValues\n\t\t\t\t\tgradients={ themeGradients }\n\t\t\t\t\tonChange={ setThemeGradients }\n\t\t\t\t\tpaletteLabel={ __( 'Theme' ) }\n\t\t\t\t\tpaletteLabelHeadingLevel={ 3 }\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ !! defaultGradients &&\n\t\t\t\t!! defaultGradients.length &&\n\t\t\t\t!! defaultPaletteEnabled && (\n\t\t\t\t\t<PaletteEdit\n\t\t\t\t\t\tcanReset={ defaultGradients !== baseDefaultGradients }\n\t\t\t\t\t\tcanOnlyChangeValues\n\t\t\t\t\t\tgradients={ defaultGradients }\n\t\t\t\t\t\tonChange={ setDefaultGradients }\n\t\t\t\t\t\tpaletteLabel={ __( 'Default' ) }\n\t\t\t\t\t\tpaletteLabelHeadingLevel={ 3 }\n\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t<PaletteEdit\n\t\t\t\tgradients={ customGradients }\n\t\t\t\tonChange={ setCustomGradients }\n\t\t\t\tpaletteLabel={ __( 'Custom' ) }\n\t\t\t\tpaletteLabelHeadingLevel={ 3 }\n\t\t\t\tslugPrefix=\"custom-\"\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t/>\n\t\t\t{ !! duotonePalette && !! duotonePalette.length && (\n\t\t\t\t<div>\n\t\t\t\t\t<Subtitle level={ 3 }>{ __( 'Duotone' ) }</Subtitle>\n\t\t\t\t\t<Spacer margin={ 3 } />\n\t\t\t\t\t<DuotonePicker\n\t\t\t\t\t\tduotonePalette={ duotonePalette }\n\t\t\t\t\t\tdisableCustomDuotone\n\t\t\t\t\t\tdisableCustomColors\n\t\t\t\t\t\tclearable={ false }\n\t\t\t\t\t\tonChange={ noop }\n\t\t\t\t\t\tcolorPalette={ [] }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n// @ts-expect-error: Not typed yet.\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { __experimentalText as Text } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport BackgroundPanel from './background-panel';\nimport { ScreenHeader } from './screen-header';\nimport { useSetting } from './hooks';\nimport { unlock } from './lock-unlock';\n\nconst { useHasBackgroundPanel } = unlock( blockEditorPrivateApis );\n\nfunction ScreenBackground() {\n\tconst [ settings ] = useSetting( '' );\n\tconst hasBackgroundPanel = useHasBackgroundPanel( settings );\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Background' ) }\n\t\t\t\tdescription={\n\t\t\t\t\t<Text>\n\t\t\t\t\t\t{ __( \"Set styles for the site's background.\" ) }\n\t\t\t\t\t</Text>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ hasBackgroundPanel && <BackgroundPanel /> }\n\t\t</>\n\t);\n}\n\nexport default ScreenBackground;\n", "/**\n * WordPress dependencies\n */\n// @ts-expect-error: Not typed yet.\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { useStyle, useSetting } from './hooks';\nimport { unlock } from './lock-unlock';\n\n// Initial control values where no block style is set.\nconst BACKGROUND_DEFAULT_VALUES = {\n\tbackgroundSize: 'auto',\n};\n\nconst { BackgroundPanel: StylesBackgroundPanel } = unlock(\n\tblockEditorPrivateApis\n);\n\n/**\n * Checks if there is a current value in the background image block support\n * attributes.\n *\n * @param style Style attribute.\n * @return Whether the block has a background image value set.\n */\nexport function hasBackgroundImageValue( style: any ): boolean {\n\treturn (\n\t\t!! style?.background?.backgroundImage?.id ||\n\t\t!! style?.background?.backgroundImage?.url ||\n\t\ttypeof style?.background?.backgroundImage === 'string'\n\t);\n}\n\nexport default function BackgroundPanel() {\n\tconst [ style ] = useStyle( '', undefined, 'user', false );\n\tconst [ inheritedStyle, setStyle ] = useStyle(\n\t\t'',\n\t\tundefined,\n\t\t'merged',\n\t\tfalse\n\t);\n\tconst [ settings ] = useSetting( '' );\n\n\treturn (\n\t\t<StylesBackgroundPanel\n\t\t\tinheritedValue={ inheritedStyle }\n\t\t\tvalue={ style }\n\t\t\tonChange={ setStyle }\n\t\t\tsettings={ settings }\n\t\t\tdefaultValues={ BACKGROUND_DEFAULT_VALUES }\n\t\t/>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalItemGroup as ItemGroup,\n\tButton,\n\tFlexItem,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { __, sprintf, isRTL } from '@wordpress/i18n';\nimport {\n\tplus,\n\tIcon,\n\tchevronLeft,\n\tchevronRight,\n\tmoreVertical,\n} from '@wordpress/icons';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { Subtitle } from './subtitle';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport { ScreenHeader } from './screen-header';\nimport { ScreenBody } from './screen-body';\nimport { getNewIndexFromPresets } from './utils';\nimport ConfirmResetShadowDialog from './confirm-reset-shadow-dialog';\nimport { useSetting } from './hooks';\nimport { unlock } from './lock-unlock';\n\nconst { Menu } = unlock( componentsPrivateApis );\n\nexport const defaultShadow = '6px 6px 9px rgba(0, 0, 0, 0.2)';\n\nexport default function ShadowsPanel() {\n\tconst [ defaultShadows ] = useSetting( 'shadow.presets.default' );\n\tconst [ defaultShadowsEnabled ] = useSetting( 'shadow.defaultPresets' );\n\tconst [ themeShadows ] = useSetting( 'shadow.presets.theme' );\n\tconst [ customShadows, setCustomShadows ] = useSetting(\n\t\t'shadow.presets.custom'\n\t);\n\n\tconst onCreateShadow = ( shadow: any ) => {\n\t\tsetCustomShadows( [ ...( customShadows || [] ), shadow ] );\n\t};\n\n\tconst handleResetShadows = () => {\n\t\tsetCustomShadows( [] );\n\t};\n\n\tconst [ isResetDialogOpen, setIsResetDialogOpen ] = useState( false );\n\n\tconst toggleResetDialog = () => setIsResetDialogOpen( ! isResetDialogOpen );\n\n\treturn (\n\t\t<>\n\t\t\t{ isResetDialogOpen && (\n\t\t\t\t<ConfirmResetShadowDialog\n\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t'Are you sure you want to remove all custom shadows?'\n\t\t\t\t\t) }\n\t\t\t\t\tconfirmButtonText={ __( 'Remove' ) }\n\t\t\t\t\tisOpen={ isResetDialogOpen }\n\t\t\t\t\ttoggleOpen={ toggleResetDialog }\n\t\t\t\t\tonConfirm={ handleResetShadows }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Shadows' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Manage and create shadow styles for use across the site.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<ScreenBody>\n\t\t\t\t<VStack\n\t\t\t\t\tclassName=\"global-styles-ui__shadows-panel\"\n\t\t\t\t\tspacing={ 7 }\n\t\t\t\t>\n\t\t\t\t\t{ defaultShadowsEnabled && (\n\t\t\t\t\t\t<ShadowList\n\t\t\t\t\t\t\tlabel={ __( 'Default' ) }\n\t\t\t\t\t\t\tshadows={ defaultShadows || [] }\n\t\t\t\t\t\t\tcategory=\"default\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ themeShadows && themeShadows.length > 0 && (\n\t\t\t\t\t\t<ShadowList\n\t\t\t\t\t\t\tlabel={ __( 'Theme' ) }\n\t\t\t\t\t\t\tshadows={ themeShadows || [] }\n\t\t\t\t\t\t\tcategory=\"theme\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t<ShadowList\n\t\t\t\t\t\tlabel={ __( 'Custom' ) }\n\t\t\t\t\t\tshadows={ customShadows || [] }\n\t\t\t\t\t\tcategory=\"custom\"\n\t\t\t\t\t\tcanCreate\n\t\t\t\t\t\tonCreate={ onCreateShadow }\n\t\t\t\t\t\tonReset={ toggleResetDialog }\n\t\t\t\t\t/>\n\t\t\t\t</VStack>\n\t\t\t</ScreenBody>\n\t\t</>\n\t);\n}\n\ninterface ShadowListProps {\n\tlabel: string;\n\tshadows: any[];\n\tcategory: string;\n\tcanCreate?: boolean;\n\tonCreate?: ( shadow: any ) => void;\n\tonReset?: () => void;\n}\n\nfunction ShadowList( {\n\tlabel,\n\tshadows,\n\tcategory,\n\tcanCreate,\n\tonCreate,\n\tonReset,\n}: ShadowListProps ) {\n\tconst handleAddShadow = () => {\n\t\tconst newIndex = getNewIndexFromPresets( shadows, 'shadow-' );\n\t\tonCreate?.( {\n\t\t\tname: sprintf(\n\t\t\t\t/* translators: %d: is an index for a preset */\n\t\t\t\t__( 'Shadow %d' ),\n\t\t\t\tnewIndex\n\t\t\t),\n\t\t\tshadow: defaultShadow,\n\t\t\tslug: `shadow-${ newIndex }`,\n\t\t} );\n\t};\n\n\treturn (\n\t\t<VStack spacing={ 2 }>\n\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t<Subtitle level={ 3 }>{ label }</Subtitle>\n\t\t\t\t<FlexItem className=\"global-styles-ui__shadows-panel__options-container\">\n\t\t\t\t\t{ canCreate && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\t\tlabel={ __( 'Add shadow' ) }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\thandleAddShadow();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ !! shadows?.length && category === 'custom' && (\n\t\t\t\t\t\t<Menu>\n\t\t\t\t\t\t\t<Menu.TriggerButton\n\t\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Shadow options' ) }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Menu.Popover>\n\t\t\t\t\t\t\t\t<Menu.Item onClick={ onReset }>\n\t\t\t\t\t\t\t\t\t<Menu.ItemLabel>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Remove all custom shadows' ) }\n\t\t\t\t\t\t\t\t\t</Menu.ItemLabel>\n\t\t\t\t\t\t\t\t</Menu.Item>\n\t\t\t\t\t\t\t</Menu.Popover>\n\t\t\t\t\t\t</Menu>\n\t\t\t\t\t) }\n\t\t\t\t</FlexItem>\n\t\t\t</HStack>\n\t\t\t{ shadows.length > 0 && (\n\t\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t\t{ shadows.map( ( shadow ) => (\n\t\t\t\t\t\t<ShadowItem\n\t\t\t\t\t\t\tkey={ shadow.slug }\n\t\t\t\t\t\t\tshadow={ shadow }\n\t\t\t\t\t\t\tcategory={ category }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</ItemGroup>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\ninterface ShadowItemProps {\n\tshadow: any;\n\tcategory: string;\n}\n\nfunction ShadowItem( { shadow, category }: ShadowItemProps ) {\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ `/shadows/edit/${ category }/${ shadow.slug }` }\n\t\t>\n\t\t\t<HStack>\n\t\t\t\t<FlexItem>{ shadow.name }</FlexItem>\n\t\t\t\t<Icon icon={ isRTL() ? chevronLeft : chevronRight } />\n\t\t\t</HStack>\n\t\t</NavigationButtonAsItem>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\ninterface ConfirmResetShadowDialogProps {\n\ttext: string;\n\tconfirmButtonText: string;\n\tisOpen: boolean;\n\ttoggleOpen: () => void;\n\tonConfirm: () => void;\n}\n\nfunction ConfirmResetShadowDialog( {\n\ttext,\n\tconfirmButtonText,\n\tisOpen,\n\ttoggleOpen,\n\tonConfirm,\n}: ConfirmResetShadowDialogProps ) {\n\tconst handleConfirm = async () => {\n\t\ttoggleOpen();\n\t\tonConfirm();\n\t};\n\n\tconst handleCancel = () => {\n\t\ttoggleOpen();\n\t};\n\n\treturn (\n\t\t<ConfirmDialog\n\t\t\tisOpen={ isOpen }\n\t\t\tcancelButtonText={ __( 'Cancel' ) }\n\t\t\tconfirmButtonText={ confirmButtonText }\n\t\t\tonCancel={ handleCancel }\n\t\t\tonConfirm={ handleConfirm }\n\t\t\tsize=\"medium\"\n\t\t>\n\t\t\t{ text }\n\t\t</ConfirmDialog>\n\t);\n}\n\nexport default ConfirmResetShadowDialog;\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalSpacer as Spacer,\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalInputControl as InputControl,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalGrid as Grid,\n\t__experimentalDropdownContentWrapper as DropdownContentWrapper,\n\tuseNavigator,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\t__experimentalConfirmDialog as ConfirmDialog,\n\tDropdown,\n\tButton,\n\tFlex,\n\tFlexItem,\n\tColorPalette,\n\tModal,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tplus,\n\tshadow as shadowIcon,\n\treset,\n\tmoreVertical,\n} from '@wordpress/icons';\nimport { useState, useMemo, useEffect, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { Subtitle } from './subtitle';\nimport { ScreenHeader } from './screen-header';\nimport { ScreenBody } from './screen-body';\nimport { defaultShadow } from './shadows-panel';\nimport {\n\tgetShadowParts,\n\tshadowStringToObject,\n\tshadowObjectToString,\n} from './shadow-utils';\nimport { useSetting } from './hooks';\nimport { unlock } from './lock-unlock';\n\nconst { Menu } = unlock( componentsPrivateApis );\n\nconst customShadowMenuItems = [\n\t{\n\t\tlabel: __( 'Rename' ),\n\t\taction: 'rename',\n\t},\n\t{\n\t\tlabel: __( 'Delete' ),\n\t\taction: 'delete',\n\t},\n];\n\nconst presetShadowMenuItems = [\n\t{\n\t\tlabel: __( 'Reset' ),\n\t\taction: 'reset',\n\t},\n];\n\nexport default function ShadowsEditPanel() {\n\tconst { goBack, params } = useNavigator();\n\tconst { category, slug } = params;\n\n\tconst [ shadows, setShadows ] = useSetting(\n\t\t`shadow.presets.${ category }`\n\t);\n\n\tuseEffect( () => {\n\t\tconst hasCurrentShadow = shadows?.some(\n\t\t\t( shadow: any ) => shadow.slug === slug\n\t\t);\n\t\t// If the shadow being edited doesn't exist anymore in the global styles setting, navigate back\n\t\t// to prevent the user from editing a non-existent shadow entry.\n\t\t// This can happen, for example:\n\t\t// - when the user deletes the shadow\n\t\t// - when the user resets the styles while editing a custom shadow\n\t\t//\n\t\t// The check on the slug is necessary to prevent a double back navigation when the user triggers\n\t\t// a backward navigation by interacting with the screen's UI.\n\t\tif ( !! slug && ! hasCurrentShadow ) {\n\t\t\tgoBack();\n\t\t}\n\t}, [ shadows, slug, goBack ] );\n\n\tconst [ baseShadows ] = useSetting(\n\t\t`shadow.presets.${ category }`,\n\t\tundefined,\n\t\t'base'\n\t);\n\tconst [ selectedShadow, setSelectedShadow ] = useState( () =>\n\t\t( shadows || [] ).find( ( shadow: any ) => shadow.slug === slug )\n\t);\n\tconst baseSelectedShadow = useMemo(\n\t\t() => ( baseShadows || [] ).find( ( b: any ) => b.slug === slug ),\n\t\t[ baseShadows, slug ]\n\t);\n\tconst [ isConfirmDialogVisible, setIsConfirmDialogVisible ] =\n\t\tuseState( false );\n\tconst [ isRenameModalVisible, setIsRenameModalVisible ] = useState( false );\n\tconst [ shadowName, setShadowName ] = useState< string | undefined >(\n\t\tselectedShadow?.name\n\t);\n\n\tif ( ! category || ! slug ) {\n\t\treturn null;\n\t}\n\n\tconst onShadowChange = ( shadow: string ) => {\n\t\tsetSelectedShadow( { ...selectedShadow, shadow } );\n\t\tconst updatedShadows = shadows.map( ( s: any ) =>\n\t\t\ts.slug === slug ? { ...selectedShadow, shadow } : s\n\t\t);\n\t\tsetShadows( updatedShadows );\n\t};\n\n\tconst onMenuClick = ( action: string ) => {\n\t\tif ( action === 'reset' ) {\n\t\t\tconst updatedShadows = shadows.map( ( s: any ) =>\n\t\t\t\ts.slug === slug ? baseSelectedShadow : s\n\t\t\t);\n\t\t\tsetSelectedShadow( baseSelectedShadow );\n\t\t\tsetShadows( updatedShadows );\n\t\t} else if ( action === 'delete' ) {\n\t\t\tsetIsConfirmDialogVisible( true );\n\t\t} else if ( action === 'rename' ) {\n\t\t\tsetIsRenameModalVisible( true );\n\t\t}\n\t};\n\n\tconst handleShadowDelete = () => {\n\t\tsetShadows( shadows.filter( ( s: any ) => s.slug !== slug ) );\n\t};\n\n\tconst handleShadowRename = ( newName: string | undefined ) => {\n\t\tif ( ! newName ) {\n\t\t\treturn;\n\t\t}\n\t\tconst updatedShadows = shadows.map( ( s: any ) =>\n\t\t\ts.slug === slug ? { ...selectedShadow, name: newName } : s\n\t\t);\n\t\tsetSelectedShadow( { ...selectedShadow, name: newName } );\n\t\tsetShadows( updatedShadows );\n\t};\n\n\treturn ! selectedShadow ? (\n\t\t<ScreenHeader title=\"\" />\n\t) : (\n\t\t<>\n\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t<ScreenHeader title={ selectedShadow.name } />\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<Spacer marginTop={ 2 } marginBottom={ 0 } paddingX={ 4 }>\n\t\t\t\t\t\t<Menu>\n\t\t\t\t\t\t\t<Menu.TriggerButton\n\t\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Menu' ) }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Menu.Popover>\n\t\t\t\t\t\t\t\t{ ( category === 'custom'\n\t\t\t\t\t\t\t\t\t? customShadowMenuItems\n\t\t\t\t\t\t\t\t\t: presetShadowMenuItems\n\t\t\t\t\t\t\t\t).map( ( item ) => (\n\t\t\t\t\t\t\t\t\t<Menu.Item\n\t\t\t\t\t\t\t\t\t\tkey={ item.action }\n\t\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t\tonMenuClick( item.action )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\t\t\titem.action === 'reset' &&\n\t\t\t\t\t\t\t\t\t\t\tselectedShadow.shadow ===\n\t\t\t\t\t\t\t\t\t\t\t\tbaseSelectedShadow?.shadow\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Menu.ItemLabel>\n\t\t\t\t\t\t\t\t\t\t\t{ item.label }\n\t\t\t\t\t\t\t\t\t\t</Menu.ItemLabel>\n\t\t\t\t\t\t\t\t\t</Menu.Item>\n\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t</Menu.Popover>\n\t\t\t\t\t\t</Menu>\n\t\t\t\t\t</Spacer>\n\t\t\t\t</FlexItem>\n\t\t\t</HStack>\n\t\t\t<ScreenBody>\n\t\t\t\t<ShadowsPreview shadow={ selectedShadow.shadow } />\n\t\t\t\t<ShadowEditor\n\t\t\t\t\tshadow={ selectedShadow.shadow }\n\t\t\t\t\tonChange={ onShadowChange }\n\t\t\t\t/>\n\t\t\t</ScreenBody>\n\t\t\t{ isConfirmDialogVisible && (\n\t\t\t\t<ConfirmDialog\n\t\t\t\t\tisOpen\n\t\t\t\t\tonConfirm={ () => {\n\t\t\t\t\t\thandleShadowDelete();\n\t\t\t\t\t\tsetIsConfirmDialogVisible( false );\n\t\t\t\t\t} }\n\t\t\t\t\tonCancel={ () => {\n\t\t\t\t\t\tsetIsConfirmDialogVisible( false );\n\t\t\t\t\t} }\n\t\t\t\t\tconfirmButtonText={ __( 'Delete' ) }\n\t\t\t\t\tsize=\"medium\"\n\t\t\t\t>\n\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t/* translators: %s: Name of the shadow preset. */\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'Are you sure you want to delete \"%s\" shadow preset?'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tselectedShadow.name\n\t\t\t\t\t) }\n\t\t\t\t</ConfirmDialog>\n\t\t\t) }\n\t\t\t{ isRenameModalVisible && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={ __( 'Rename' ) }\n\t\t\t\t\tonRequestClose={ () => setIsRenameModalVisible( false ) }\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\thandleShadowRename( shadowName );\n\t\t\t\t\t\t\tsetIsRenameModalVisible( false );\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<InputControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\t\t\tplaceholder={ __( 'Shadow name' ) }\n\t\t\t\t\t\t\tvalue={ shadowName ?? '' }\n\t\t\t\t\t\t\tonChange={ setShadowName }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Spacer marginBottom={ 6 } />\n\t\t\t\t\t\t<Flex\n\t\t\t\t\t\t\tclassName=\"block-editor-shadow-edit-modal__actions\"\n\t\t\t\t\t\t\tjustify=\"flex-end\"\n\t\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\tsetIsRenameModalVisible( false )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Save' ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t</Flex>\n\t\t\t\t\t</form>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\ninterface ShadowsPreviewProps {\n\tshadow: string;\n}\n\nfunction ShadowsPreview( { shadow }: ShadowsPreviewProps ) {\n\tconst shadowStyle = {\n\t\tboxShadow: shadow,\n\t};\n\n\treturn (\n\t\t<Spacer marginBottom={ 4 } marginTop={ -2 }>\n\t\t\t<HStack\n\t\t\t\talignment=\"center\"\n\t\t\t\tjustify=\"center\"\n\t\t\t\tclassName=\"global-styles-ui__shadow-preview-panel\"\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"global-styles-ui__shadow-preview-block\"\n\t\t\t\t\tstyle={ shadowStyle }\n\t\t\t\t/>\n\t\t\t</HStack>\n\t\t</Spacer>\n\t);\n}\n\ninterface ShadowEditorProps {\n\tshadow: string;\n\tonChange: ( shadow: string ) => void;\n}\n\nfunction ShadowEditor( { shadow, onChange }: ShadowEditorProps ) {\n\tconst addShadowButtonRef = useRef< HTMLButtonElement >( null );\n\tconst shadowParts = useMemo( () => getShadowParts( shadow ), [ shadow ] );\n\n\tconst onChangeShadowPart = ( index: number, part: string ) => {\n\t\tconst newShadowParts = [ ...shadowParts ];\n\t\tnewShadowParts[ index ] = part;\n\t\tonChange( newShadowParts.join( ', ' ) );\n\t};\n\n\tconst onAddShadowPart = () => {\n\t\tonChange( [ ...shadowParts, defaultShadow ].join( ', ' ) );\n\t};\n\n\tconst onRemoveShadowPart = ( index: number ) => {\n\t\tonChange( shadowParts.filter( ( p, i ) => i !== index ).join( ', ' ) );\n\t\taddShadowButtonRef.current?.focus();\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<VStack spacing={ 2 }>\n\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t<Subtitle level={ 3 }>{ __( 'Shadows' ) }</Subtitle>\n\t\t\t\t\t<FlexItem className=\"global-styles-ui__shadows-panel__options-container\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\t\tlabel={ __( 'Add shadow' ) }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tonAddShadowPart();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tref={ addShadowButtonRef }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t\t<Spacer />\n\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t{ shadowParts.map( ( part, index ) => (\n\t\t\t\t\t<ShadowItem\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tshadow={ part }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tonChangeShadowPart( index, value )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcanRemove={ shadowParts.length > 1 }\n\t\t\t\t\t\tonRemove={ () => onRemoveShadowPart( index ) }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</ItemGroup>\n\t\t</>\n\t);\n}\n\ninterface ShadowItemProps {\n\tshadow: string;\n\tonChange: ( shadow: string ) => void;\n\tcanRemove: boolean;\n\tonRemove: () => void;\n}\n\nfunction ShadowItem( {\n\tshadow,\n\tonChange,\n\tcanRemove,\n\tonRemove,\n}: ShadowItemProps ) {\n\tconst popoverProps = {\n\t\tplacement: 'left-start' as const,\n\t\toffset: 36,\n\t\tshift: true,\n\t};\n\tconst shadowObj = useMemo(\n\t\t() => shadowStringToObject( shadow ),\n\t\t[ shadow ]\n\t);\n\tconst onShadowChange = ( newShadow: any ) => {\n\t\tonChange( shadowObjectToString( newShadow ) );\n\t};\n\n\treturn (\n\t\t<Dropdown\n\t\t\tpopoverProps={ popoverProps }\n\t\t\tclassName=\"global-styles-ui__shadow-editor__dropdown\"\n\t\t\trenderToggle={ ( { onToggle, isOpen } ) => {\n\t\t\t\tconst toggleProps = {\n\t\t\t\t\tonClick: onToggle,\n\t\t\t\t\tclassName: clsx(\n\t\t\t\t\t\t'global-styles-ui__shadow-editor__dropdown-toggle',\n\t\t\t\t\t\t{ 'is-open': isOpen }\n\t\t\t\t\t),\n\t\t\t\t\t'aria-expanded': isOpen,\n\t\t\t\t};\n\t\t\t\tconst removeButtonProps = {\n\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\tif ( isOpen ) {\n\t\t\t\t\t\t\tonToggle();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonRemove();\n\t\t\t\t\t},\n\t\t\t\t\tclassName: clsx(\n\t\t\t\t\t\t'global-styles-ui__shadow-editor__remove-button',\n\t\t\t\t\t\t{ 'is-open': isOpen }\n\t\t\t\t\t),\n\t\t\t\t\tlabel: __( 'Remove shadow' ),\n\t\t\t\t};\n\n\t\t\t\treturn (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\ticon={ shadowIcon }\n\t\t\t\t\t\t\t{ ...toggleProps }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ shadowObj.inset\n\t\t\t\t\t\t\t\t? __( 'Inner shadow' )\n\t\t\t\t\t\t\t\t: __( 'Drop shadow' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t{ canRemove && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\ticon={ reset }\n\t\t\t\t\t\t\t\t{ ...removeButtonProps }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t);\n\t\t\t} }\n\t\t\trenderContent={ () => (\n\t\t\t\t<DropdownContentWrapper\n\t\t\t\t\tpaddingSize=\"medium\"\n\t\t\t\t\tclassName=\"global-styles-ui__shadow-editor__dropdown-content\"\n\t\t\t\t>\n\t\t\t\t\t<ShadowPopover\n\t\t\t\t\t\tshadowObj={ shadowObj }\n\t\t\t\t\t\tonChange={ onShadowChange }\n\t\t\t\t\t/>\n\t\t\t\t</DropdownContentWrapper>\n\t\t\t) }\n\t\t/>\n\t);\n}\n\ninterface ShadowPopoverProps {\n\tshadowObj: any;\n\tonChange: ( shadow: any ) => void;\n}\n\nfunction ShadowPopover( { shadowObj, onChange }: ShadowPopoverProps ) {\n\tconst __experimentalIsRenderedInSidebar = true;\n\tconst enableAlpha = true;\n\n\tconst onShadowChange = ( key: string, value: any ) => {\n\t\tconst newShadow = {\n\t\t\t...shadowObj,\n\t\t\t[ key ]: value,\n\t\t};\n\t\tonChange( newShadow );\n\t};\n\n\treturn (\n\t\t<VStack spacing={ 4 } className=\"global-styles-ui__shadow-editor-panel\">\n\t\t\t<ColorPalette\n\t\t\t\tclearable={ false }\n\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t}\n\t\t\t\tvalue={ shadowObj.color }\n\t\t\t\tonChange={ ( value ) => onShadowChange( 'color', value ) }\n\t\t\t/>\n\t\t\t<ToggleGroupControl\n\t\t\t\tlabel={ __( 'Shadow Type' ) }\n\t\t\t\tvalue={ shadowObj.inset ? 'inset' : 'outset' }\n\t\t\t\tisBlock\n\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\tonShadowChange( 'inset', value === 'inset' )\n\t\t\t\t}\n\t\t\t\thideLabelFromVision\n\t\t\t\t__next40pxDefaultSize\n\t\t\t>\n\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\tvalue=\"outset\"\n\t\t\t\t\tlabel={ __( 'Outset' ) }\n\t\t\t\t/>\n\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\tvalue=\"inset\"\n\t\t\t\t\tlabel={ __( 'Inset' ) }\n\t\t\t\t/>\n\t\t\t</ToggleGroupControl>\n\t\t\t<Grid columns={ 2 } gap={ 4 }>\n\t\t\t\t<ShadowInputControl\n\t\t\t\t\tlabel={ __( 'X Position' ) }\n\t\t\t\t\tvalue={ shadowObj.x }\n\t\t\t\t\tonChange={ ( value ) => onShadowChange( 'x', value ) }\n\t\t\t\t/>\n\t\t\t\t<ShadowInputControl\n\t\t\t\t\tlabel={ __( 'Y Position' ) }\n\t\t\t\t\tvalue={ shadowObj.y }\n\t\t\t\t\tonChange={ ( value ) => onShadowChange( 'y', value ) }\n\t\t\t\t/>\n\t\t\t\t<ShadowInputControl\n\t\t\t\t\tlabel={ __( 'Blur' ) }\n\t\t\t\t\tvalue={ shadowObj.blur }\n\t\t\t\t\tonChange={ ( value ) => onShadowChange( 'blur', value ) }\n\t\t\t\t/>\n\t\t\t\t<ShadowInputControl\n\t\t\t\t\tlabel={ __( 'Spread' ) }\n\t\t\t\t\tvalue={ shadowObj.spread }\n\t\t\t\t\tonChange={ ( value ) => onShadowChange( 'spread', value ) }\n\t\t\t\t/>\n\t\t\t</Grid>\n\t\t</VStack>\n\t);\n}\n\ninterface ShadowInputControlProps {\n\tlabel: string;\n\tvalue: string;\n\tonChange: ( value: string ) => void;\n}\n\nfunction ShadowInputControl( {\n\tlabel,\n\tvalue,\n\tonChange,\n}: ShadowInputControlProps ) {\n\tconst onValueChange = ( next: string | undefined ) => {\n\t\tconst isNumeric = next !== undefined && ! isNaN( parseFloat( next ) );\n\t\tconst nextValue = isNumeric ? next : '0px';\n\t\tonChange( nextValue );\n\t};\n\n\treturn (\n\t\t<UnitControl\n\t\t\tlabel={ label }\n\t\t\t__next40pxDefaultSize\n\t\t\tvalue={ value }\n\t\t\tonChange={ onValueChange }\n\t\t/>\n\t);\n}\n", "export const CUSTOM_VALUE_SETTINGS = {\n\tpx: { max: 20, step: 1 },\n\t'%': { max: 100, step: 1 },\n\tvw: { max: 100, step: 1 },\n\tvh: { max: 100, step: 1 },\n\tem: { max: 10, step: 0.1 },\n\trm: { max: 10, step: 0.1 },\n\tsvw: { max: 100, step: 1 },\n\tlvw: { max: 100, step: 1 },\n\tdvw: { max: 100, step: 1 },\n\tsvh: { max: 100, step: 1 },\n\tlvh: { max: 100, step: 1 },\n\tdvh: { max: 100, step: 1 },\n\tvi: { max: 100, step: 1 },\n\tsvi: { max: 100, step: 1 },\n\tlvi: { max: 100, step: 1 },\n\tdvi: { max: 100, step: 1 },\n\tvb: { max: 100, step: 1 },\n\tsvb: { max: 100, step: 1 },\n\tlvb: { max: 100, step: 1 },\n\tdvb: { max: 100, step: 1 },\n\tvmin: { max: 100, step: 1 },\n\tsvmin: { max: 100, step: 1 },\n\tlvmin: { max: 100, step: 1 },\n\tdvmin: { max: 100, step: 1 },\n\tvmax: { max: 100, step: 1 },\n\tsvmax: { max: 100, step: 1 },\n\tlvmax: { max: 100, step: 1 },\n\tdvmax: { max: 100, step: 1 },\n};\n\nexport interface ShadowObject {\n\tx: string;\n\ty: string;\n\tblur: string;\n\tspread: string;\n\tcolor: string;\n\tinset: boolean;\n}\n\nexport function getShadowParts( shadow: string ): string[] {\n\tconst shadowValues = shadow.match( /(?:[^,(]|\\([^)]*\\))+/g ) || [];\n\treturn shadowValues.map( ( value ) => value.trim() );\n}\n\nexport function shadowStringToObject( shadowValue: string ): ShadowObject {\n\t/*\n\t * Shadow spec: https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow\n\t * Shadow string format: <offset-x> <offset-y> <blur-radius> <spread-radius> <color> [inset]\n\t *\n\t * A shadow to be valid it must satisfy the following.\n\t *\n\t * 1. Should not contain \"none\" keyword.\n\t * 2. Values x, y, blur, spread should be in the order. Color and inset can be anywhere in the string except in between x, y, blur, spread values.\n\t * 3. Should not contain more than one set of x, y, blur, spread values.\n\t * 4. Should contain at least x and y values. Others are optional.\n\t * 5. Should not contain more than one \"inset\" (case insensitive) keyword.\n\t * 6. Should not contain more than one color value.\n\t */\n\n\tconst defaultShadow: ShadowObject = {\n\t\tx: '0',\n\t\ty: '0',\n\t\tblur: '0',\n\t\tspread: '0',\n\t\tcolor: '#000',\n\t\tinset: false,\n\t};\n\n\tif ( ! shadowValue ) {\n\t\treturn defaultShadow;\n\t}\n\n\t// Rule 1: Should not contain \"none\" keyword.\n\t// if the shadow has \"none\" keyword, it is not a valid shadow string\n\tif ( shadowValue.includes( 'none' ) ) {\n\t\treturn defaultShadow;\n\t}\n\n\t// Rule 2: Values x, y, blur, spread should be in the order.\n\t//\t\t Color and inset can be anywhere in the string except in between x, y, blur, spread values.\n\t// Extract length values (x, y, blur, spread) from shadow string\n\t// Regex match groups of 1 to 4 length values.\n\tconst lengthsRegex =\n\t\t/((?:^|\\s+)(-?\\d*\\.?\\d+(?:px|%|in|cm|mm|em|rem|ex|pt|pc|vh|vw|vmin|vmax|ch|lh)?)(?=\\s|$)(?![^(]*\\))){1,4}/g;\n\tconst matches = shadowValue.match( lengthsRegex ) || [];\n\n\t// Rule 3: Should not contain more than one set of x, y, blur, spread values.\n\t// if the string doesn't contain exactly 1 set of x, y, blur, spread values,\n\t// it is not a valid shadow string\n\tif ( matches.length !== 1 ) {\n\t\treturn defaultShadow;\n\t}\n\n\t// Extract length values (x, y, blur, spread) from shadow string\n\tconst lengths = matches[ 0 ]\n\t\t.split( ' ' )\n\t\t.map( ( value ) => value.trim() )\n\t\t.filter( ( value ) => value );\n\n\t// Rule 4: Should contain at least x and y values. Others are optional.\n\tif ( lengths.length < 2 ) {\n\t\treturn defaultShadow;\n\t}\n\n\t// Rule 5: Should not contain more than one \"inset\" (case insensitive) keyword.\n\t// check if the shadow string contains \"inset\" keyword\n\tconst insets = shadowValue.match( /inset/gi ) || [];\n\tif ( insets.length > 1 ) {\n\t\treturn defaultShadow;\n\t}\n\n\t// Strip lengths and inset from shadow string, leaving just color.\n\tconst hasInset = insets.length === 1;\n\tlet colorString = shadowValue.replace( lengthsRegex, '' ).trim();\n\tif ( hasInset ) {\n\t\tcolorString = colorString\n\t\t\t.replace( 'inset', '' )\n\t\t\t.replace( 'INSET', '' )\n\t\t\t.trim();\n\t}\n\n\t// Rule 6: Should not contain more than one color value.\n\t// validate color string with regular expression\n\t// check if color has matching hex, rgb or hsl values\n\tconst colorRegex =\n\t\t/^#([0-9a-f]{3}){1,2}$|^#([0-9a-f]{4}){1,2}$|^(?:rgb|hsl)a?\\(?[\\d*\\.?\\d+%?,?\\/?\\s]*\\)$/gi;\n\tlet colorMatches = ( colorString.match( colorRegex ) || [] )\n\t\t.map( ( value ) => value?.trim() )\n\t\t.filter( ( value ) => value );\n\n\t// If color string has more than one color values, it is not a valid\n\tif ( colorMatches.length > 1 ) {\n\t\treturn defaultShadow;\n\t} else if ( colorMatches.length === 0 ) {\n\t\t// check if color string has multiple named color values separated by space\n\t\tcolorMatches = colorString\n\t\t\t.trim()\n\t\t\t.split( ' ' )\n\t\t\t.filter( ( value ) => value );\n\t\t// If color string has more than one color values, it is not a valid\n\t\tif ( colorMatches.length > 1 ) {\n\t\t\treturn defaultShadow;\n\t\t}\n\t}\n\n\t// Return parsed shadow object.\n\tconst [ x, y, blur, spread ] = lengths;\n\treturn {\n\t\tx,\n\t\ty,\n\t\tblur: blur || defaultShadow.blur,\n\t\tspread: spread || defaultShadow.spread,\n\t\tinset: hasInset,\n\t\tcolor: colorString || defaultShadow.color,\n\t};\n}\n\nexport function shadowObjectToString( shadowObj: ShadowObject ): string {\n\tconst shadowString = `${ shadowObj.x || '0px' } ${ shadowObj.y || '0px' } ${\n\t\tshadowObj.blur || '0px'\n\t} ${ shadowObj.spread || '0px' }`;\n\n\treturn `${ shadowObj.inset ? 'inset' : '' } ${ shadowString } ${\n\t\tshadowObj.color || ''\n\t}`.trim();\n}\n", "/**\n * Internal dependencies\n */\nimport ShadowsPanel from './shadows-panel';\nimport ShadowsEditPanel from './shadows-edit-panel';\n\nexport function ScreenShadows() {\n\treturn <ShadowsPanel />;\n}\n\nexport function ScreenShadowsEdit() {\n\treturn <ShadowsEditPanel />;\n}\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n// @ts-expect-error: Not typed yet.\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport type { GlobalStylesSettings } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport { ScreenHeader } from './screen-header';\nimport DimensionsPanel from './dimensions-panel';\nimport { useSetting } from './hooks';\nimport { unlock } from './lock-unlock';\n\nconst { useHasDimensionsPanel, useSettingsForBlockElement } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction ScreenLayout() {\n\tconst [ rawSettings ] = useSetting< GlobalStylesSettings >( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader title={ __( 'Layout' ) } />\n\t\t\t{ hasDimensionsPanel && <DimensionsPanel /> }\n\t\t</>\n\t);\n}\n\nexport default ScreenLayout;\n", "/**\n * WordPress dependencies\n */\n// @ts-expect-error: Not typed yet.\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useStyle, useSetting } from './hooks';\nimport { unlock } from './lock-unlock';\n\nconst { useSettingsForBlockElement, DimensionsPanel: StylesDimensionsPanel } =\n\tunlock( blockEditorPrivateApis );\n\nconst DEFAULT_CONTROLS = {\n\tcontentSize: true,\n\twideSize: true,\n\tpadding: true,\n\tmargin: true,\n\tblockGap: true,\n\theight: true,\n\tminHeight: true,\n\twidth: true,\n\tchildLayout: false,\n};\n\nexport default function DimensionsPanel() {\n\tconst [ style ] = useStyle( '', undefined, 'user', false );\n\tconst [ inheritedStyle, setStyle ] = useStyle(\n\t\t'',\n\t\tundefined,\n\t\t'merged',\n\t\tfalse\n\t);\n\tconst [ userSettings ] = useSetting( '', undefined, 'user' );\n\tconst [ rawSettings, setSettings ] = useSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\n\t// These intermediary objects are needed because the \"layout\" property is stored\n\t// in settings rather than styles.\n\tconst inheritedStyleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...inheritedStyle,\n\t\t\tlayout: settings.layout,\n\t\t};\n\t}, [ inheritedStyle, settings.layout ] );\n\n\tconst styleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...style,\n\t\t\tlayout: userSettings.layout,\n\t\t};\n\t}, [ style, userSettings.layout ] );\n\n\tconst onChange = ( newStyle: any ) => {\n\t\tconst updatedStyle = { ...newStyle };\n\t\tdelete updatedStyle.layout;\n\t\tsetStyle( updatedStyle );\n\n\t\tif ( newStyle.layout !== userSettings.layout ) {\n\t\t\tconst updatedSettings = {\n\t\t\t\t...userSettings,\n\t\t\t\tlayout: newStyle.layout,\n\t\t\t};\n\n\t\t\t// Ensure any changes to layout definitions are not persisted.\n\t\t\tif ( updatedSettings.layout?.definitions ) {\n\t\t\t\tdelete updatedSettings.layout.definitions;\n\t\t\t}\n\n\t\t\tsetSettings( updatedSettings );\n\t\t}\n\t};\n\n\treturn (\n\t\t<StylesDimensionsPanel\n\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\tvalue={ styleWithLayout }\n\t\t\tonChange={ onChange }\n\t\t\tsettings={ settings }\n\t\t\tincludeLayoutControls\n\t\t\tdefaultControls={ DEFAULT_CONTROLS }\n\t\t/>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { Card, CardBody } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { ScreenHeader } from './screen-header';\nimport { StyleVariationsContent } from './style-variations-content';\n\nfunction ScreenStyleVariations() {\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Browse styles' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Choose a variation to change the look of the site.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<Card\n\t\t\t\tsize=\"small\"\n\t\t\t\tisBorderless\n\t\t\t\tclassName=\"global-styles-ui-screen-style-variations\"\n\t\t\t>\n\t\t\t\t<CardBody>\n\t\t\t\t\t<StyleVariationsContent />\n\t\t\t\t</CardBody>\n\t\t\t</Card>\n\t\t</>\n\t);\n}\n\nexport default ScreenStyleVariations;\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport StyleVariationsContainer from './style-variations-container';\nimport TypographyVariations from './variations/variations-typography';\nimport ColorVariations from './variations/variations-color';\n\nexport function StyleVariationsContent() {\n\tconst gap = 3;\n\n\treturn (\n\t\t<VStack spacing={ 10 } className=\"global-styles-ui-variation-container\">\n\t\t\t<StyleVariationsContainer gap={ gap } />\n\t\t\t<ColorVariations title={ __( 'Color Variations' ) } gap={ gap } />\n\t\t\t<TypographyVariations title={ __( 'Typography' ) } gap={ gap } />\n\t\t</VStack>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useContext, useMemo } from '@wordpress/element';\nimport { __experimentalGrid as Grid } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport type {\n\tGlobalStylesConfig,\n\tStyleVariation,\n} from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport PreviewStyles from './preview-styles';\nimport Variation from './variations/variation';\nimport { GlobalStylesContext } from './context';\nimport { isVariationWithProperties } from './utils';\n\ninterface StyleVariationsContainerProps {\n\tgap?: number;\n}\n\nfunction StyleVariationsContainer( {\n\tgap = 2,\n}: StyleVariationsContainerProps ) {\n\tconst { user } = useContext( GlobalStylesContext );\n\tconst userStyles = user?.styles;\n\n\tconst variations = useSelect( ( select ) => {\n\t\tconst result =\n\t\t\tselect(\n\t\t\t\tcoreStore\n\t\t\t).__experimentalGetCurrentThemeGlobalStylesVariations();\n\t\t// The API might return null or an array\n\t\treturn Array.isArray( result )\n\t\t\t? ( result as GlobalStylesConfig[] )\n\t\t\t: undefined;\n\t}, [] );\n\n\t// Filter out variations that are color or typography variations.\n\tconst fullStyleVariations = variations?.filter(\n\t\t( variation: GlobalStylesConfig ) => {\n\t\t\treturn (\n\t\t\t\t! isVariationWithProperties( variation, [ 'color' ] ) &&\n\t\t\t\t! isVariationWithProperties( variation, [\n\t\t\t\t\t'typography',\n\t\t\t\t\t'spacing',\n\t\t\t\t] )\n\t\t\t);\n\t\t}\n\t);\n\n\tconst themeVariations = useMemo( () => {\n\t\tconst withEmptyVariation: StyleVariation[] = [\n\t\t\t{\n\t\t\t\ttitle: __( 'Default' ),\n\t\t\t\tsettings: {},\n\t\t\t\tstyles: {},\n\t\t\t},\n\t\t\t...( fullStyleVariations ?? [] ),\n\t\t];\n\t\treturn [\n\t\t\t...withEmptyVariation.map( ( variation: StyleVariation ) => {\n\t\t\t\tconst blockStyles = variation?.styles?.blocks\n\t\t\t\t\t? { ...variation.styles.blocks }\n\t\t\t\t\t: {};\n\n\t\t\t\t// We need to copy any user custom CSS to the variation to prevent it being lost\n\t\t\t\t// when switching variations.\n\t\t\t\tif ( userStyles?.blocks ) {\n\t\t\t\t\tObject.keys( userStyles.blocks ).forEach( ( blockName ) => {\n\t\t\t\t\t\t// First get any block specific custom CSS from the current user styles and merge with any custom CSS for\n\t\t\t\t\t\t// that block in the variation.\n\t\t\t\t\t\tif ( userStyles.blocks?.[ blockName ]?.css ) {\n\t\t\t\t\t\t\tconst variationBlockStyles =\n\t\t\t\t\t\t\t\tblockStyles[ blockName ] || {};\n\t\t\t\t\t\t\tconst customCSS = {\n\t\t\t\t\t\t\t\tcss: `${\n\t\t\t\t\t\t\t\t\tblockStyles[ blockName ]?.css || ''\n\t\t\t\t\t\t\t\t} ${\n\t\t\t\t\t\t\t\t\tuserStyles.blocks?.[\n\t\t\t\t\t\t\t\t\t\tblockName\n\t\t\t\t\t\t\t\t\t]?.css?.trim() || ''\n\t\t\t\t\t\t\t\t}`,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tblockStyles[ blockName ] = {\n\t\t\t\t\t\t\t\t...variationBlockStyles,\n\t\t\t\t\t\t\t\t...customCSS,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\t// Now merge any global custom CSS from current user styles with global custom CSS in the variation.\n\t\t\t\tconst css =\n\t\t\t\t\tuserStyles?.css || variation.styles?.css\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tcss: `${ variation.styles?.css || '' } ${\n\t\t\t\t\t\t\t\t\tuserStyles?.css || ''\n\t\t\t\t\t\t\t\t}`,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: {};\n\n\t\t\t\tconst blocks =\n\t\t\t\t\tObject.keys( blockStyles ).length > 0\n\t\t\t\t\t\t? { blocks: blockStyles }\n\t\t\t\t\t\t: {};\n\n\t\t\t\tconst styles = {\n\t\t\t\t\t...variation.styles,\n\t\t\t\t\t...css,\n\t\t\t\t\t...blocks,\n\t\t\t\t};\n\t\t\t\treturn {\n\t\t\t\t\t...variation,\n\t\t\t\t\tsettings: variation.settings ?? {},\n\t\t\t\t\tstyles,\n\t\t\t\t};\n\t\t\t} ),\n\t\t];\n\t}, [ fullStyleVariations, userStyles?.blocks, userStyles?.css ] );\n\n\tif ( ! fullStyleVariations || fullStyleVariations.length < 1 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Grid\n\t\t\tcolumns={ 2 }\n\t\t\tclassName=\"global-styles-ui-style-variations-container\"\n\t\t\tgap={ gap }\n\t\t>\n\t\t\t{ themeVariations.map(\n\t\t\t\t( variation: StyleVariation, index: number ) => (\n\t\t\t\t\t<Variation key={ index } variation={ variation }>\n\t\t\t\t\t\t{ ( isFocused: boolean ) => (\n\t\t\t\t\t\t\t<PreviewStyles\n\t\t\t\t\t\t\t\tlabel={ variation?.title }\n\t\t\t\t\t\t\t\twithHoverView\n\t\t\t\t\t\t\t\tisFocused={ isFocused }\n\t\t\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Variation>\n\t\t\t\t)\n\t\t\t) }\n\t\t</Grid>\n\t);\n}\n\nexport default StyleVariationsContainer;\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { ExternalLink } from '@wordpress/components';\n// @ts-expect-error: Not typed yet.\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { ScreenHeader } from './screen-header';\nimport { useStyle } from './hooks';\nimport { unlock } from './lock-unlock';\n\n// Access AdvancedPanel from block-editor private APIs\nconst { AdvancedPanel: StylesAdvancedPanel } = unlock( blockEditorPrivateApis );\n\nfunction ScreenCSS() {\n\t// Get user-only styles (should not decode/encode to preserve raw CSS)\n\tconst [ style ] = useStyle( '', undefined, 'user', false );\n\t// Get all styles (inherited + user) for context\n\tconst [ inheritedStyle, setStyle ] = useStyle(\n\t\t'',\n\t\tundefined,\n\t\t'merged',\n\t\tfalse\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Additional CSS' ) }\n\t\t\t\tdescription={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'You can add custom CSS to further customize the appearance and layout of your site.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t'https://developer.wordpress.org/advanced-administration/wordpress/css/'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tclassName=\"global-styles-ui-screen-css-help-link\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Learn more about CSS' ) }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<div className=\"global-styles-ui-screen-css\">\n\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenCSS;\n", "/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\t__experimentalConfirmDialog as ConfirmDialog,\n\tSpinner,\n\tuseNavigator,\n} from '@wordpress/components';\nimport { useContext, useState, useMemo } from '@wordpress/element';\nimport { areGlobalStylesEqual } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport { ScreenHeader } from '../screen-header';\nimport { GlobalStylesContext } from '../context';\nimport useGlobalStylesRevisions from './use-global-styles-revisions';\nimport RevisionsButtons from './revisions-buttons';\nimport Pagination from '../pagination';\n\nconst PAGE_SIZE = 10;\n\ninterface ScreenRevisionsProps {\n\tonClose?: () => void;\n}\n\nfunction ScreenRevisions( { onClose }: ScreenRevisionsProps = {} ) {\n\tconst { user: currentEditorGlobalStyles, onChange: setUserConfig } =\n\t\tuseContext( GlobalStylesContext );\n\tconst { params, goTo } = useNavigator();\n\tconst { revisionId } = params;\n\tconst [ currentPage, setCurrentPage ] = useState( 1 );\n\tconst { revisions, isLoading, hasUnsavedChanges, revisionsCount } =\n\t\tuseGlobalStylesRevisions( {\n\t\t\tquery: {\n\t\t\t\tper_page: PAGE_SIZE,\n\t\t\t\tpage: currentPage,\n\t\t\t},\n\t\t} );\n\n\tconst numPages = Math.ceil( revisionsCount / PAGE_SIZE );\n\n\tconst [\n\t\tisLoadingRevisionWithUnsavedChanges,\n\t\tsetIsLoadingRevisionWithUnsavedChanges,\n\t] = useState( false );\n\n\t// Derive the currently selected revision from the path parameter\n\tconst currentlySelectedRevision = useMemo( () => {\n\t\tif ( ! revisionId ) {\n\t\t\treturn currentEditorGlobalStyles;\n\t\t}\n\t\tconst revision = revisions.find(\n\t\t\t( rev ) => String( rev.id ) === String( revisionId )\n\t\t);\n\t\treturn revision || currentEditorGlobalStyles;\n\t}, [ revisionId, revisions, currentEditorGlobalStyles ] );\n\n\tconst selectedRevisionMatchesEditorStyles = areGlobalStylesEqual(\n\t\tcurrentlySelectedRevision,\n\t\tcurrentEditorGlobalStyles\n\t);\n\n\tconst onCloseRevisions = () => {\n\t\tif ( onClose ) {\n\t\t\tonClose();\n\t\t}\n\t};\n\n\tconst restoreRevision = ( revision: any ) => {\n\t\tsetUserConfig( revision );\n\t\tsetIsLoadingRevisionWithUnsavedChanges( false );\n\t\tonCloseRevisions();\n\t};\n\n\tconst handleRevisionSelect = ( revision: any ) => {\n\t\tgoTo( `/revisions/${ revision.id }` );\n\t};\n\n\tconst currentlySelectedRevisionId =\n\t\t// @ts-expect-error: revision id is not present in the fallback (default object).\n\t\tcurrentlySelectedRevision?.id ?? revisions[ 0 ]?.id;\n\n\t// Only display load button if there is a revision to load,\n\t// and it is different from the current editor styles.\n\tconst isLoadButtonEnabled =\n\t\t!! currentlySelectedRevisionId &&\n\t\tcurrentlySelectedRevisionId !== 'unsaved' &&\n\t\t! selectedRevisionMatchesEditorStyles;\n\tconst hasRevisions = !! revisions.length;\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={\n\t\t\t\t\trevisionsCount\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t// translators: %d: number of revisions.\n\t\t\t\t\t\t\t\t__( 'Revisions (%d)' ),\n\t\t\t\t\t\t\t\trevisionsCount\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: __( 'Revisions' )\n\t\t\t\t}\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Click on previously saved styles to preview them. To restore a selected version to the editor, hit \"Apply.\" When you\\'re ready, use the Save button to save your changes.'\n\t\t\t\t) }\n\t\t\t\tonBack={ onCloseRevisions }\n\t\t\t/>\n\t\t\t{ ! hasRevisions && (\n\t\t\t\t<Spinner className=\"global-styles-ui-screen-revisions__loading\" />\n\t\t\t) }\n\t\t\t<RevisionsButtons\n\t\t\t\tonChange={ handleRevisionSelect }\n\t\t\t\tselectedRevisionId={ currentlySelectedRevisionId }\n\t\t\t\tuserRevisions={ revisions }\n\t\t\t\tcanApplyRevision={ isLoadButtonEnabled }\n\t\t\t\tonApplyRevision={ () =>\n\t\t\t\t\thasUnsavedChanges\n\t\t\t\t\t\t? setIsLoadingRevisionWithUnsavedChanges( true )\n\t\t\t\t\t\t: restoreRevision( currentlySelectedRevision )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ numPages > 1 && (\n\t\t\t\t<div className=\"global-styles-ui-screen-revisions__footer\">\n\t\t\t\t\t<Pagination\n\t\t\t\t\t\tclassName=\"global-styles-ui-screen-revisions__pagination\"\n\t\t\t\t\t\tcurrentPage={ currentPage }\n\t\t\t\t\t\tnumPages={ numPages }\n\t\t\t\t\t\tchangePage={ setCurrentPage }\n\t\t\t\t\t\ttotalItems={ revisionsCount }\n\t\t\t\t\t\tdisabled={ isLoading }\n\t\t\t\t\t\tlabel={ __( 'Global Styles pagination' ) }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ isLoadingRevisionWithUnsavedChanges && (\n\t\t\t\t<ConfirmDialog\n\t\t\t\t\tisOpen={ isLoadingRevisionWithUnsavedChanges }\n\t\t\t\t\tconfirmButtonText={ __( 'Apply' ) }\n\t\t\t\t\tonConfirm={ () =>\n\t\t\t\t\t\trestoreRevision( currentlySelectedRevision )\n\t\t\t\t\t}\n\t\t\t\t\tonCancel={ () =>\n\t\t\t\t\t\tsetIsLoadingRevisionWithUnsavedChanges( false )\n\t\t\t\t\t}\n\t\t\t\t\tsize=\"medium\"\n\t\t\t\t>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Are you sure you want to apply this revision? Any unsaved changes will be lost.'\n\t\t\t\t\t) }\n\t\t\t\t</ConfirmDialog>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ScreenRevisions;\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\tstore as coreStore,\n\ttype GlobalStylesRevision,\n} from '@wordpress/core-data';\nimport { useContext, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { GlobalStylesContext } from '../context';\nimport type { Revision, User } from './types';\n\ninterface RawRevision extends Omit< Revision, 'author' > {\n\tauthor?: number;\n}\n\ninterface Query {\n\tper_page?: number;\n\tpage?: number;\n}\n\ninterface UseGlobalStylesRevisionsParams {\n\tquery?: Query;\n}\n\ninterface UseGlobalStylesRevisionsReturn {\n\trevisions: Revision[];\n\thasUnsavedChanges: boolean;\n\tisLoading: boolean;\n\trevisionsCount: number;\n}\n\nconst SITE_EDITOR_AUTHORS_QUERY = {\n\tper_page: -1,\n\t_fields: 'id,name,avatar_urls',\n\tcontext: 'view',\n\tcapabilities: [ 'edit_theme_options' ],\n};\nconst DEFAULT_QUERY = { per_page: 100, page: 1 };\nconst EMPTY_ARRAY: [] = [];\n\nexport default function useGlobalStylesRevisions( {\n\tquery,\n}: UseGlobalStylesRevisionsParams = {} ): UseGlobalStylesRevisionsReturn {\n\tconst { user: userConfig } = useContext( GlobalStylesContext );\n\tconst _query: Query = useMemo(\n\t\t() => ( { ...DEFAULT_QUERY, ...query } ),\n\t\t[ query ]\n\t);\n\tconst {\n\t\tauthors,\n\t\tcurrentUser,\n\t\tisDirty,\n\t\trevisions,\n\t\tisLoadingGlobalStylesRevisions,\n\t\trevisionsCount,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\t__experimentalGetDirtyEntityRecords,\n\t\t\t\tgetCurrentUser,\n\t\t\t\tgetUsers,\n\t\t\t\tgetRevisions,\n\t\t\t\t__experimentalGetCurrentGlobalStylesId,\n\t\t\t\tgetEntityRecord,\n\t\t\t\t// @ts-expect-error\n\t\t\t\tisResolving,\n\t\t\t} = select( coreStore );\n\t\t\tconst dirtyEntityRecords =\n\t\t\t\t__experimentalGetDirtyEntityRecords() || [];\n\t\t\tconst _currentUser = getCurrentUser();\n\t\t\tconst _isDirty = dirtyEntityRecords.length > 0;\n\t\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\t\tconst globalStyles = globalStylesId\n\t\t\t\t? getEntityRecord< GlobalStylesRevision >(\n\t\t\t\t\t\t'root',\n\t\t\t\t\t\t'globalStyles',\n\t\t\t\t\t\tglobalStylesId\n\t\t\t\t )\n\t\t\t\t: undefined;\n\t\t\tconst _revisionsCount: number =\n\t\t\t\t// @ts-expect-error - _links is not typed in GlobalStylesRevision\n\t\t\t\tglobalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0;\n\t\t\t// @ts-expect-error - getRevisions is not fully typed\n\t\t\tconst globalStylesRevisions: RawRevision[] = globalStylesId\n\t\t\t\t? getRevisions(\n\t\t\t\t\t\t'root',\n\t\t\t\t\t\t'globalStyles',\n\t\t\t\t\t\tglobalStylesId,\n\t\t\t\t\t\t_query\n\t\t\t\t ) || EMPTY_ARRAY\n\t\t\t\t: EMPTY_ARRAY;\n\t\t\t// @ts-expect-error - getUsers is not fully typed\n\t\t\tconst _authors: User[] =\n\t\t\t\tgetUsers( SITE_EDITOR_AUTHORS_QUERY ) || EMPTY_ARRAY;\n\t\t\tconst _isResolving = globalStylesId\n\t\t\t\t? isResolving( 'getRevisions', [\n\t\t\t\t\t\t'root',\n\t\t\t\t\t\t'globalStyles',\n\t\t\t\t\t\tglobalStylesId,\n\t\t\t\t\t\t_query,\n\t\t\t\t ] )\n\t\t\t\t: false;\n\t\t\treturn {\n\t\t\t\tauthors: _authors,\n\t\t\t\tcurrentUser: _currentUser,\n\t\t\t\tisDirty: _isDirty,\n\t\t\t\trevisions: globalStylesRevisions,\n\t\t\t\tisLoadingGlobalStylesRevisions: _isResolving,\n\t\t\t\trevisionsCount: _revisionsCount,\n\t\t\t};\n\t\t},\n\t\t[ _query ]\n\t);\n\treturn useMemo( (): UseGlobalStylesRevisionsReturn => {\n\t\tif ( ! authors.length || isLoadingGlobalStylesRevisions ) {\n\t\t\treturn {\n\t\t\t\trevisions: EMPTY_ARRAY as Revision[],\n\t\t\t\thasUnsavedChanges: isDirty,\n\t\t\t\tisLoading: true,\n\t\t\t\trevisionsCount,\n\t\t\t};\n\t\t}\n\n\t\t// Adds author details to each revision.\n\t\tconst _modifiedRevisions: Revision[] = revisions.map( ( revision ) => {\n\t\t\treturn {\n\t\t\t\t...revision,\n\t\t\t\tauthor: authors.find(\n\t\t\t\t\t( author ) => author.id === revision.author\n\t\t\t\t),\n\t\t\t};\n\t\t} );\n\n\t\tconst fetchedRevisionsCount = revisions.length;\n\n\t\tif ( fetchedRevisionsCount ) {\n\t\t\t// Flags the most current saved revision.\n\t\t\tif (\n\t\t\t\t_modifiedRevisions[ 0 ].id !== 'unsaved' &&\n\t\t\t\t_query.page === 1\n\t\t\t) {\n\t\t\t\t_modifiedRevisions[ 0 ].isLatest = true;\n\t\t\t}\n\n\t\t\t// Adds an item for unsaved changes.\n\t\t\tif (\n\t\t\t\tisDirty &&\n\t\t\t\tuserConfig &&\n\t\t\t\tObject.keys( userConfig ).length > 0 &&\n\t\t\t\tcurrentUser &&\n\t\t\t\t_query.page === 1\n\t\t\t) {\n\t\t\t\tconst unsavedRevision: Revision = {\n\t\t\t\t\tid: 'unsaved',\n\t\t\t\t\tstyles: userConfig?.styles,\n\t\t\t\t\tsettings: userConfig?.settings,\n\t\t\t\t\t_links: userConfig?._links,\n\t\t\t\t\tauthor: {\n\t\t\t\t\t\tname: currentUser?.name || '',\n\t\t\t\t\t\t// @ts-expect-error - avatar_urls is not typed in User\n\t\t\t\t\t\tavatar_urls: currentUser?.avatar_urls || {},\n\t\t\t\t\t},\n\t\t\t\t\tmodified: new Date(),\n\t\t\t\t};\n\n\t\t\t\t_modifiedRevisions.unshift( unsavedRevision );\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t_query.per_page &&\n\t\t\t\t_query.page === Math.ceil( revisionsCount / _query.per_page )\n\t\t\t) {\n\t\t\t\t// Adds an item for the default theme styles.\n\t\t\t\t_modifiedRevisions.push( {\n\t\t\t\t\tid: 'parent',\n\t\t\t\t\tstyles: {},\n\t\t\t\t\tsettings: {},\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\trevisions: _modifiedRevisions,\n\t\t\thasUnsavedChanges: isDirty,\n\t\t\tisLoading: false,\n\t\t\trevisionsCount,\n\t\t};\n\t}, [\n\t\tisDirty,\n\t\trevisions,\n\t\tcurrentUser,\n\t\tauthors,\n\t\tuserConfig,\n\t\tisLoadingGlobalStylesRevisions,\n\t\trevisionsCount,\n\t\t_query.page,\n\t\t_query.per_page,\n\t] );\n}\n", "/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Button, Composite } from '@wordpress/components';\nimport { dateI18n, getDate, humanTimeDiff, getSettings } from '@wordpress/date';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { getGlobalStylesChanges } from '@wordpress/global-styles-engine';\nimport { ENTER, SPACE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport type { Revision } from './types';\n\nconst DAY_IN_MILLISECONDS = 60 * 60 * 1000 * 24;\n\ninterface ChangesSummaryProps {\n\trevision: Revision;\n\tpreviousRevision?: Revision;\n}\n\nfunction ChangesSummary( { revision, previousRevision }: ChangesSummaryProps ) {\n\tconst changes: string[] = getGlobalStylesChanges(\n\t\trevision,\n\t\tpreviousRevision,\n\t\t{\n\t\t\tmaxResults: 7,\n\t\t}\n\t);\n\n\tif ( ! changes.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<ul\n\t\t\tdata-testid=\"global-styles-revision-changes\"\n\t\t\tclassName=\"global-styles-ui-screen-revisions__changes\"\n\t\t>\n\t\t\t{ changes.map( ( change ) => (\n\t\t\t\t<li key={ change }>{ change }</li>\n\t\t\t) ) }\n\t\t</ul>\n\t);\n}\n\n/**\n * Returns a button label for the revision.\n * @param id\n * @param authorDisplayName\n * @param formattedModifiedDate\n * @param areStylesEqual\n */\nfunction getRevisionLabel(\n\tid: string | number,\n\tauthorDisplayName: string,\n\tformattedModifiedDate: string,\n\tareStylesEqual: boolean\n): string {\n\tif ( 'parent' === id ) {\n\t\treturn __( 'Reset the styles to the theme defaults' );\n\t}\n\n\tif ( 'unsaved' === id ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %s: author display name */\n\t\t\t__( 'Unsaved changes by %s' ),\n\t\t\tauthorDisplayName\n\t\t);\n\t}\n\n\treturn areStylesEqual\n\t\t? sprintf(\n\t\t\t\t// translators: 1: author display name. 2: revision creation date.\n\t\t\t\t__(\n\t\t\t\t\t'Changes saved by %1$s on %2$s. This revision matches current editor styles.'\n\t\t\t\t),\n\t\t\t\tauthorDisplayName,\n\t\t\t\tformattedModifiedDate\n\t\t )\n\t\t: sprintf(\n\t\t\t\t// translators: 1: author display name. 2: revision creation date.\n\t\t\t\t__( 'Changes saved by %1$s on %2$s' ),\n\t\t\t\tauthorDisplayName,\n\t\t\t\tformattedModifiedDate\n\t\t );\n}\n\ninterface RevisionButtonsProps {\n\tuserRevisions: Revision[];\n\tselectedRevisionId?: string | number;\n\tonChange: ( revision: Revision ) => void;\n\tcanApplyRevision?: boolean;\n\tonApplyRevision?: () => void;\n}\n\n/**\n * Returns a rendered list of revisions buttons.\n * @param root0\n * @param root0.userRevisions\n * @param root0.selectedRevisionId\n * @param root0.onChange\n * @param root0.canApplyRevision\n * @param root0.onApplyRevision\n */\nfunction RevisionsButtons( {\n\tuserRevisions,\n\tselectedRevisionId,\n\tonChange,\n\tcanApplyRevision,\n\tonApplyRevision,\n}: RevisionButtonsProps ) {\n\tconst { currentThemeName, currentUser } = useSelect( ( select ) => {\n\t\tconst { getCurrentTheme, getCurrentUser } = select( coreStore );\n\t\tconst currentTheme = getCurrentTheme();\n\t\treturn {\n\t\t\tcurrentThemeName:\n\t\t\t\tcurrentTheme?.name?.rendered || currentTheme?.stylesheet,\n\t\t\tcurrentUser: getCurrentUser(),\n\t\t};\n\t}, [] );\n\tconst dateNowInMs = getDate( null ).getTime();\n\tconst { datetimeAbbreviated } = getSettings().formats;\n\n\treturn (\n\t\t<Composite\n\t\t\torientation=\"vertical\"\n\t\t\tclassName=\"global-styles-ui-screen-revisions__revisions-list\"\n\t\t\taria-label={ __( 'Global styles revisions list' ) }\n\t\t\trole=\"listbox\"\n\t\t>\n\t\t\t{ userRevisions.map( ( revision, index ) => {\n\t\t\t\tconst { id, author, modified } = revision;\n\t\t\t\tconst isUnsaved = 'unsaved' === id;\n\t\t\t\t// Unsaved changes are created by the current user.\n\t\t\t\tconst revisionAuthor = isUnsaved ? currentUser : author;\n\t\t\t\tconst authorDisplayName = revisionAuthor?.name || __( 'User' );\n\t\t\t\tconst authorAvatar = revisionAuthor?.avatar_urls?.[ '48' ];\n\t\t\t\tconst isFirstItem = index === 0;\n\t\t\t\tconst isSelected = selectedRevisionId\n\t\t\t\t\t? selectedRevisionId === id\n\t\t\t\t\t: isFirstItem;\n\t\t\t\tconst areStylesEqual = ! canApplyRevision && isSelected;\n\t\t\t\tconst isReset = 'parent' === id;\n\t\t\t\t// Convert modified to string if it's a Date, for type compatibility\n\t\t\t\tconst modifiedString =\n\t\t\t\t\tmodified instanceof Date\n\t\t\t\t\t\t? modified.toISOString()\n\t\t\t\t\t\t: modified;\n\t\t\t\tconst modifiedDate = getDate( modifiedString ?? null );\n\t\t\t\tconst displayDate =\n\t\t\t\t\tmodifiedString &&\n\t\t\t\t\tdateNowInMs - modifiedDate.getTime() > DAY_IN_MILLISECONDS\n\t\t\t\t\t\t? dateI18n( datetimeAbbreviated, modifiedDate )\n\t\t\t\t\t\t: humanTimeDiff(\n\t\t\t\t\t\t\t\tmodifiedString ?? modifiedDate,\n\t\t\t\t\t\t\t\tundefined\n\t\t\t\t\t\t );\n\t\t\t\tconst revisionLabel = getRevisionLabel(\n\t\t\t\t\tid,\n\t\t\t\t\tauthorDisplayName,\n\t\t\t\t\tdateI18n( datetimeAbbreviated, modifiedDate ),\n\t\t\t\t\tareStylesEqual\n\t\t\t\t);\n\n\t\t\t\treturn (\n\t\t\t\t\t<Composite.Item\n\t\t\t\t\t\tkey={ id }\n\t\t\t\t\t\tclassName=\"global-styles-ui-screen-revisions__revision-item\"\n\t\t\t\t\t\taria-current={ isSelected }\n\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\tconst { keyCode } = event;\n\t\t\t\t\t\t\tif ( keyCode === ENTER || keyCode === SPACE ) {\n\t\t\t\t\t\t\t\tonChange( revision );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tonChange( revision );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\taria-selected={ isSelected }\n\t\t\t\t\t\taria-label={ revisionLabel }\n\t\t\t\t\t\trender={ <div /> }\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className=\"global-styles-ui-screen-revisions__revision-item-wrapper\">\n\t\t\t\t\t\t\t{ isReset ? (\n\t\t\t\t\t\t\t\t<span className=\"global-styles-ui-screen-revisions__description\">\n\t\t\t\t\t\t\t\t\t{ __( 'Default styles' ) }\n\t\t\t\t\t\t\t\t\t<span className=\"global-styles-ui-screen-revisions__meta\">\n\t\t\t\t\t\t\t\t\t\t{ currentThemeName }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<span className=\"global-styles-ui-screen-revisions__description\">\n\t\t\t\t\t\t\t\t\t{ isUnsaved ? (\n\t\t\t\t\t\t\t\t\t\t<span className=\"global-styles-ui-screen-revisions__date\">\n\t\t\t\t\t\t\t\t\t\t\t{ __( '(Unsaved)' ) }\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<time\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"global-styles-ui-screen-revisions__date\"\n\t\t\t\t\t\t\t\t\t\t\tdateTime={ modifiedString }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ displayDate }\n\t\t\t\t\t\t\t\t\t\t</time>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t<span className=\"global-styles-ui-screen-revisions__meta\">\n\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\talt={ authorDisplayName }\n\t\t\t\t\t\t\t\t\t\t\tsrc={ authorAvatar }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t{ authorDisplayName }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t{ isSelected && (\n\t\t\t\t\t\t\t\t\t\t<ChangesSummary\n\t\t\t\t\t\t\t\t\t\t\trevision={ revision }\n\t\t\t\t\t\t\t\t\t\t\tpreviousRevision={\n\t\t\t\t\t\t\t\t\t\t\t\tindex < userRevisions.length\n\t\t\t\t\t\t\t\t\t\t\t\t\t? userRevisions[ index + 1 ]\n\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t{ isSelected &&\n\t\t\t\t\t\t\t( areStylesEqual ? (\n\t\t\t\t\t\t\t\t<p className=\"global-styles-ui-screen-revisions__applied-text\">\n\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t'These styles are already applied to your site.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\t\tclassName=\"global-styles-ui-screen-revisions__apply-button\"\n\t\t\t\t\t\t\t\t\tonClick={ onApplyRevision }\n\t\t\t\t\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t\t\t\t\t'Apply the selected revision to your site.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ isReset\n\t\t\t\t\t\t\t\t\t\t? __( 'Reset to defaults' )\n\t\t\t\t\t\t\t\t\t\t: __( 'Apply' ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t</Composite.Item>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Composite>\n\t);\n}\n\nexport default RevisionsButtons;\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalText as Text,\n\tButton,\n} from '@wordpress/components';\nimport { __, _x, _n, sprintf, isRTL } from '@wordpress/i18n';\nimport { previous, chevronLeft, chevronRight, next } from '@wordpress/icons';\n\ninterface PaginationProps {\n\tcurrentPage: number;\n\tnumPages: number;\n\tchangePage: ( page: number ) => void;\n\ttotalItems: number;\n\tclassName?: string;\n\tdisabled?: boolean;\n\tbuttonVariant?: 'primary' | 'secondary' | 'tertiary';\n\tlabel?: string;\n}\n\nexport default function Pagination( {\n\tcurrentPage,\n\tnumPages,\n\tchangePage,\n\ttotalItems,\n\tclassName,\n\tdisabled = false,\n\tbuttonVariant = 'tertiary',\n\tlabel = __( 'Pagination' ),\n}: PaginationProps ) {\n\treturn (\n\t\t<HStack\n\t\t\texpanded={ false }\n\t\t\tas=\"nav\"\n\t\t\taria-label={ label }\n\t\t\tspacing={ 3 }\n\t\t\tjustify=\"flex-start\"\n\t\t\tclassName={ clsx( 'global-styles-ui-pagination', className ) }\n\t\t>\n\t\t\t<Text\n\t\t\t\tvariant=\"muted\"\n\t\t\t\tclassName=\"global-styles-ui-pagination__total\"\n\t\t\t>\n\t\t\t\t{ sprintf(\n\t\t\t\t\t// translators: %d: Total number of patterns.\n\t\t\t\t\t_n( '%d item', '%d items', totalItems ),\n\t\t\t\t\ttotalItems\n\t\t\t\t) }\n\t\t\t</Text>\n\t\t\t<HStack expanded={ false } spacing={ 1 }>\n\t\t\t\t<Button\n\t\t\t\t\tvariant={ buttonVariant }\n\t\t\t\t\tonClick={ () => changePage( 1 ) }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tdisabled={ disabled || currentPage === 1 }\n\t\t\t\t\tlabel={ __( 'First page' ) }\n\t\t\t\t\ticon={ isRTL() ? next : previous }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t\t<Button\n\t\t\t\t\tvariant={ buttonVariant }\n\t\t\t\t\tonClick={ () => changePage( currentPage - 1 ) }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tdisabled={ disabled || currentPage === 1 }\n\t\t\t\t\tlabel={ __( 'Previous page' ) }\n\t\t\t\t\ticon={ isRTL() ? chevronRight : chevronLeft }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t</HStack>\n\t\t\t<Text variant=\"muted\">\n\t\t\t\t{ sprintf(\n\t\t\t\t\t// translators: 1: Current page number. 2: Total number of pages.\n\t\t\t\t\t_x( '%1$d of %2$d', 'paging' ),\n\t\t\t\t\tcurrentPage,\n\t\t\t\t\tnumPages\n\t\t\t\t) }\n\t\t\t</Text>\n\t\t\t<HStack expanded={ false } spacing={ 1 }>\n\t\t\t\t<Button\n\t\t\t\t\tvariant={ buttonVariant }\n\t\t\t\t\tonClick={ () => changePage( currentPage + 1 ) }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tdisabled={ disabled || currentPage === numPages }\n\t\t\t\t\tlabel={ __( 'Next page' ) }\n\t\t\t\t\ticon={ isRTL() ? chevronLeft : chevronRight }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t\t<Button\n\t\t\t\t\tvariant={ buttonVariant }\n\t\t\t\t\tonClick={ () => changePage( numPages ) }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tdisabled={ disabled || currentPage === numPages }\n\t\t\t\t\tlabel={ __( 'Last page' ) }\n\t\t\t\t\ticon={ isRTL() ? previous : next }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t</HStack>\n\t\t</HStack>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { __, sprintf, isRTL } from '@wordpress/i18n';\nimport {\n\tprivateApis as componentsPrivateApis,\n\t__experimentalSpacer as Spacer,\n\t__experimentalView as View,\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\tFlexItem,\n\tButton,\n} from '@wordpress/components';\nimport {\n\tIcon,\n\tplus,\n\tmoreVertical,\n\tchevronLeft,\n\tchevronRight,\n} from '@wordpress/icons';\nimport { useState } from '@wordpress/element';\nimport type { FontSize } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport { Subtitle } from '../subtitle';\nimport { NavigationButtonAsItem } from '../navigation-button';\nimport { getNewIndexFromPresets } from '../utils';\nimport { ScreenHeader } from '../screen-header';\nimport ConfirmResetFontSizesDialog from './confirm-reset-font-sizes-dialog';\nimport { useSetting } from '../hooks';\nimport { unlock } from '../lock-unlock';\n\nconst { Menu } = unlock( componentsPrivateApis );\n\ninterface FontSizeGroupProps {\n\tlabel: string;\n\torigin: string;\n\tsizes: FontSize[];\n\thandleAddFontSize: () => void;\n\thandleResetFontSizes?: () => void;\n}\n\nfunction FontSizeGroup( {\n\tlabel,\n\torigin,\n\tsizes,\n\thandleAddFontSize,\n\thandleResetFontSizes,\n}: FontSizeGroupProps ) {\n\tconst [ isResetDialogOpen, setIsResetDialogOpen ] = useState( false );\n\n\tconst toggleResetDialog = () => setIsResetDialogOpen( ! isResetDialogOpen );\n\n\tconst resetDialogText =\n\t\torigin === 'custom'\n\t\t\t? __(\n\t\t\t\t\t'Are you sure you want to remove all custom font size presets?'\n\t\t\t )\n\t\t\t: __(\n\t\t\t\t\t'Are you sure you want to reset all font size presets to their default values?'\n\t\t\t );\n\n\treturn (\n\t\t<>\n\t\t\t{ handleResetFontSizes && isResetDialogOpen && (\n\t\t\t\t<ConfirmResetFontSizesDialog\n\t\t\t\t\ttext={ resetDialogText }\n\t\t\t\t\tconfirmButtonText={\n\t\t\t\t\t\torigin === 'custom' ? __( 'Remove' ) : __( 'Reset' )\n\t\t\t\t\t}\n\t\t\t\t\tisOpen={ isResetDialogOpen }\n\t\t\t\t\ttoggleOpen={ toggleResetDialog }\n\t\t\t\t\tonConfirm={ handleResetFontSizes }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t<HStack>\n\t\t\t\t\t<Subtitle level={ 3 }>{ label }</Subtitle>\n\t\t\t\t\t<FlexItem className=\"global-styles-ui__typography-panel__options-container\">\n\t\t\t\t\t\t{ origin === 'custom' && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tlabel={ __( 'Add font size' ) }\n\t\t\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tonClick={ handleAddFontSize }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ !! handleResetFontSizes && (\n\t\t\t\t\t\t\t<Menu>\n\t\t\t\t\t\t\t\t<Menu.TriggerButton\n\t\t\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Font size presets options'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Menu.Popover>\n\t\t\t\t\t\t\t\t\t<Menu.Item onClick={ toggleResetDialog }>\n\t\t\t\t\t\t\t\t\t\t<Menu.ItemLabel>\n\t\t\t\t\t\t\t\t\t\t\t{ origin === 'custom'\n\t\t\t\t\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Remove font size presets'\n\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Reset font size presets'\n\t\t\t\t\t\t\t\t\t\t\t\t ) }\n\t\t\t\t\t\t\t\t\t\t</Menu.ItemLabel>\n\t\t\t\t\t\t\t\t\t</Menu.Item>\n\t\t\t\t\t\t\t\t</Menu.Popover>\n\t\t\t\t\t\t\t</Menu>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</FlexItem>\n\t\t\t\t</HStack>\n\n\t\t\t\t{ !! sizes.length && (\n\t\t\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t\t\t{ sizes.map( ( size ) => (\n\t\t\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\t\t\tkey={ size.slug }\n\t\t\t\t\t\t\t\tpath={ `/typography/font-sizes/${ origin }/${ size.slug }` }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<HStack>\n\t\t\t\t\t\t\t\t\t<FlexItem className=\"global-styles-ui-font-size__item\">\n\t\t\t\t\t\t\t\t\t\t{ size.name }\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t<FlexItem display=\"flex\">\n\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\t\tisRTL()\n\t\t\t\t\t\t\t\t\t\t\t\t\t? chevronLeft\n\t\t\t\t\t\t\t\t\t\t\t\t\t: chevronRight\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</ItemGroup>\n\t\t\t\t) }\n\t\t\t</VStack>\n\t\t</>\n\t);\n}\n\nfunction FontSizes() {\n\tconst [ themeFontSizes, setThemeFontSizes ] = useSetting(\n\t\t'typography.fontSizes.theme'\n\t);\n\n\tconst [ baseThemeFontSizes ] = useSetting(\n\t\t'typography.fontSizes.theme',\n\t\t'base'\n\t);\n\tconst [ defaultFontSizes, setDefaultFontSizes ] = useSetting(\n\t\t'typography.fontSizes.default'\n\t);\n\n\tconst [ baseDefaultFontSizes ] = useSetting(\n\t\t'typography.fontSizes.default',\n\t\t'base'\n\t);\n\n\tconst [ customFontSizes = [], setCustomFontSizes ] = useSetting(\n\t\t'typography.fontSizes.custom'\n\t);\n\n\tconst [ defaultFontSizesEnabled ] = useSetting(\n\t\t'typography.defaultFontSizes'\n\t);\n\n\tconst handleAddFontSize = () => {\n\t\tconst index = getNewIndexFromPresets( customFontSizes, 'custom-' );\n\t\tconst newFontSize = {\n\t\t\t/* translators: %d: font size index */\n\t\t\tname: sprintf( __( 'New Font Size %d' ), index ),\n\t\t\tsize: '16px',\n\t\t\tslug: `custom-${ index }`,\n\t\t};\n\n\t\tsetCustomFontSizes( [ ...customFontSizes, newFontSize ] );\n\t};\n\n\tconst hasSameSizeValues = ( arr1: FontSize[], arr2: FontSize[] ): boolean =>\n\t\tarr1.map( ( item ) => item.size ).join( '' ) ===\n\t\tarr2.map( ( item ) => item.size ).join( '' );\n\n\treturn (\n\t\t<VStack spacing={ 2 }>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Font size presets' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Create and edit the presets used for font sizes across the site.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<View>\n\t\t\t\t<Spacer paddingX={ 4 }>\n\t\t\t\t\t<VStack spacing={ 8 }>\n\t\t\t\t\t\t{ !! themeFontSizes?.length && (\n\t\t\t\t\t\t\t<FontSizeGroup\n\t\t\t\t\t\t\t\tlabel={ __( 'Theme' ) }\n\t\t\t\t\t\t\t\torigin=\"theme\"\n\t\t\t\t\t\t\t\tsizes={ themeFontSizes }\n\t\t\t\t\t\t\t\thandleAddFontSize={ handleAddFontSize }\n\t\t\t\t\t\t\t\thandleResetFontSizes={\n\t\t\t\t\t\t\t\t\thasSameSizeValues(\n\t\t\t\t\t\t\t\t\t\tthemeFontSizes,\n\t\t\t\t\t\t\t\t\t\tbaseThemeFontSizes\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t\t: () =>\n\t\t\t\t\t\t\t\t\t\t\t\tsetThemeFontSizes(\n\t\t\t\t\t\t\t\t\t\t\t\t\tbaseThemeFontSizes\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t{ defaultFontSizesEnabled &&\n\t\t\t\t\t\t\t!! defaultFontSizes?.length && (\n\t\t\t\t\t\t\t\t<FontSizeGroup\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Default' ) }\n\t\t\t\t\t\t\t\t\torigin=\"default\"\n\t\t\t\t\t\t\t\t\tsizes={ defaultFontSizes }\n\t\t\t\t\t\t\t\t\thandleAddFontSize={ handleAddFontSize }\n\t\t\t\t\t\t\t\t\thandleResetFontSizes={\n\t\t\t\t\t\t\t\t\t\thasSameSizeValues(\n\t\t\t\t\t\t\t\t\t\t\tdefaultFontSizes,\n\t\t\t\t\t\t\t\t\t\t\tbaseDefaultFontSizes\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t\t\t: () =>\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetDefaultFontSizes(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbaseDefaultFontSizes\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t<FontSizeGroup\n\t\t\t\t\t\t\tlabel={ __( 'Custom' ) }\n\t\t\t\t\t\t\torigin=\"custom\"\n\t\t\t\t\t\t\tsizes={ customFontSizes }\n\t\t\t\t\t\t\thandleAddFontSize={ handleAddFontSize }\n\t\t\t\t\t\t\thandleResetFontSizes={\n\t\t\t\t\t\t\t\tcustomFontSizes.length > 0\n\t\t\t\t\t\t\t\t\t? () => setCustomFontSizes( [] )\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</VStack>\n\t\t\t\t</Spacer>\n\t\t\t</View>\n\t\t</VStack>\n\t);\n}\n\nexport default FontSizes;\n", "/**\n * WordPress dependencies\n */\nimport { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\ninterface ConfirmResetFontSizesDialogProps {\n\ttext: string;\n\tconfirmButtonText: string;\n\tisOpen: boolean;\n\ttoggleOpen: () => void;\n\tonConfirm: () => void;\n}\n\nfunction ConfirmResetFontSizesDialog( {\n\ttext,\n\tconfirmButtonText,\n\tisOpen,\n\ttoggleOpen,\n\tonConfirm,\n}: ConfirmResetFontSizesDialogProps ) {\n\tconst handleConfirm = async () => {\n\t\ttoggleOpen();\n\t\tonConfirm();\n\t};\n\n\tconst handleCancel = () => {\n\t\ttoggleOpen();\n\t};\n\n\treturn (\n\t\t<ConfirmDialog\n\t\t\tisOpen={ isOpen }\n\t\t\tcancelButtonText={ __( 'Cancel' ) }\n\t\t\tconfirmButtonText={ confirmButtonText }\n\t\t\tonCancel={ handleCancel }\n\t\t\tonConfirm={ handleConfirm }\n\t\t\tsize=\"medium\"\n\t\t>\n\t\t\t{ text }\n\t\t</ConfirmDialog>\n\t);\n}\n\nexport default ConfirmResetFontSizesDialog;\n", "/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\t__experimentalSpacer as Spacer,\n\tuseNavigator,\n\t__experimentalView as View,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tprivateApis as componentsPrivateApis,\n\tButton,\n\tFlexItem,\n\tToggleControl,\n} from '@wordpress/components';\nimport { moreVertical } from '@wordpress/icons';\nimport { useState, useEffect } from '@wordpress/element';\nimport type {\n\tTypographyPreset,\n\tFluidTypographySettings,\n\tFontSize,\n\tFluidTypographyConfig,\n} from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport { ScreenHeader } from '../screen-header';\nimport FontSizePreview from './font-size-preview';\nimport ConfirmDeleteFontSizeDialog from './confirm-delete-font-size-dialog';\nimport RenameFontSizeDialog from './rename-font-size-dialog';\nimport { SizeControl } from '../size-control';\nimport { useSetting } from '../hooks';\nimport { unlock } from '../lock-unlock';\n\nconst { Menu } = unlock( componentsPrivateApis );\n\nfunction FontSize() {\n\tconst [ isDeleteConfirmOpen, setIsDeleteConfirmOpen ] = useState( false );\n\tconst [ isRenameDialogOpen, setIsRenameDialogOpen ] = useState( false );\n\n\tconst {\n\t\tparams: { origin, slug },\n\t\tgoBack,\n\t} = useNavigator();\n\n\tconst [ fontSizes, setFontSizes ] = useSetting<\n\t\tRecord< string, TypographyPreset[] > | undefined\n\t>( 'typography.fontSizes' );\n\tconst [ globalFluid ] = useSetting<\n\t\tboolean | FluidTypographySettings | undefined\n\t>( 'typography.fluid' );\n\n\t// Get the font sizes from the origin, default to empty array.\n\tconst sizes = fontSizes?.[ origin as string ] ?? [];\n\n\t// Get the font size by slug.\n\tconst fontSize: FontSize | undefined = sizes.find(\n\t\t( size ) => size.slug === slug\n\t);\n\n\t// Navigate to the font sizes list if the font size is not available.\n\tuseEffect( () => {\n\t\tif ( !! slug && ! fontSize ) {\n\t\t\tgoBack();\n\t\t}\n\t}, [ slug, fontSize, goBack ] );\n\n\tif ( ! origin || ! slug || ! fontSize ) {\n\t\treturn null;\n\t}\n\n\t// Whether the font size is fluid. If not defined, use the global fluid value of the theme.\n\tconst isFluid =\n\t\tfontSize?.fluid !== undefined ? !! fontSize.fluid : !! globalFluid;\n\n\t// Whether custom fluid values are used.\n\tconst isCustomFluid = typeof fontSize?.fluid === 'object';\n\n\tconst handleNameChange = ( value: string ) => {\n\t\tupdateFontSize( 'name', value );\n\t};\n\n\tconst handleFontSizeChange = ( value: string | undefined ) => {\n\t\tupdateFontSize( 'size', value );\n\t};\n\n\tconst handleFluidChange = ( value: boolean ) => {\n\t\tupdateFontSize( 'fluid', value );\n\t};\n\n\tconst handleCustomFluidValues = ( value: boolean ) => {\n\t\tif ( value ) {\n\t\t\t// If custom values are used, init the values with the current ones.\n\t\t\tupdateFontSize( 'fluid', {\n\t\t\t\tmin: fontSize.size,\n\t\t\t\tmax: fontSize.size,\n\t\t\t} );\n\t\t} else {\n\t\t\t// If custom fluid values are disabled, set fluid to true.\n\t\t\tupdateFontSize( 'fluid', true );\n\t\t}\n\t};\n\n\tconst handleMinChange = ( value: string | undefined ) => {\n\t\tconst fluid: FluidTypographyConfig =\n\t\t\ttypeof fontSize.fluid === 'object' ? fontSize.fluid : {};\n\t\tupdateFontSize( 'fluid', { ...fluid, min: value } );\n\t};\n\n\tconst handleMaxChange = ( value: string | undefined ) => {\n\t\tconst fluid: FluidTypographyConfig =\n\t\t\ttypeof fontSize.fluid === 'object' ? fontSize.fluid : {};\n\t\tupdateFontSize( 'fluid', { ...fluid, max: value } );\n\t};\n\n\tconst updateFontSize = ( key: string, value: any ) => {\n\t\tconst newFontSizes = sizes.map( ( size ) => {\n\t\t\tif ( size.slug === slug ) {\n\t\t\t\treturn { ...size, [ key ]: value }; // Create a new object with updated key\n\t\t\t}\n\t\t\treturn size;\n\t\t} );\n\n\t\tsetFontSizes( {\n\t\t\t...fontSizes,\n\t\t\t[ origin as string ]: newFontSizes,\n\t\t} );\n\t};\n\n\tconst handleRemoveFontSize = () => {\n\t\tconst newFontSizes = sizes.filter( ( size ) => size.slug !== slug );\n\t\tsetFontSizes( {\n\t\t\t...fontSizes,\n\t\t\t[ origin as string ]: newFontSizes,\n\t\t} );\n\t};\n\n\tconst toggleDeleteConfirm = () => {\n\t\tsetIsDeleteConfirmOpen( ! isDeleteConfirmOpen );\n\t};\n\n\tconst toggleRenameDialog = () => {\n\t\tsetIsRenameDialogOpen( ! isRenameDialogOpen );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<ConfirmDeleteFontSizeDialog\n\t\t\t\tfontSize={ fontSize }\n\t\t\t\tisOpen={ isDeleteConfirmOpen }\n\t\t\t\ttoggleOpen={ toggleDeleteConfirm }\n\t\t\t\thandleRemoveFontSize={ handleRemoveFontSize }\n\t\t\t/>\n\n\t\t\t{ isRenameDialogOpen && (\n\t\t\t\t<RenameFontSizeDialog\n\t\t\t\t\tfontSize={ fontSize }\n\t\t\t\t\ttoggleOpen={ toggleRenameDialog }\n\t\t\t\t\thandleRename={ handleNameChange }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t<HStack justify=\"space-between\" alignment=\"flex-start\">\n\t\t\t\t\t<ScreenHeader\n\t\t\t\t\t\ttitle={ fontSize.name }\n\t\t\t\t\t\tdescription={ sprintf(\n\t\t\t\t\t\t\t/* translators: %s: font size preset name. */\n\t\t\t\t\t\t\t__( 'Manage the font size %s.' ),\n\t\t\t\t\t\t\tfontSize.name\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t\t{ origin === 'custom' && (\n\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t<Spacer\n\t\t\t\t\t\t\t\tmarginTop={ 3 }\n\t\t\t\t\t\t\t\tmarginBottom={ 0 }\n\t\t\t\t\t\t\t\tpaddingX={ 4 }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Menu>\n\t\t\t\t\t\t\t\t\t<Menu.TriggerButton\n\t\t\t\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Font size options'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<Menu.Popover>\n\t\t\t\t\t\t\t\t\t\t<Menu.Item\n\t\t\t\t\t\t\t\t\t\t\tonClick={ toggleRenameDialog }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Menu.ItemLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t{ __( 'Rename' ) }\n\t\t\t\t\t\t\t\t\t\t\t</Menu.ItemLabel>\n\t\t\t\t\t\t\t\t\t\t</Menu.Item>\n\t\t\t\t\t\t\t\t\t\t<Menu.Item\n\t\t\t\t\t\t\t\t\t\t\tonClick={ toggleDeleteConfirm }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Menu.ItemLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t{ __( 'Delete' ) }\n\t\t\t\t\t\t\t\t\t\t\t</Menu.ItemLabel>\n\t\t\t\t\t\t\t\t\t\t</Menu.Item>\n\t\t\t\t\t\t\t\t\t</Menu.Popover>\n\t\t\t\t\t\t\t\t</Menu>\n\t\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\n\n\t\t\t\t<View>\n\t\t\t\t\t<Spacer\n\t\t\t\t\t\tpaddingX={ 4 }\n\t\t\t\t\t\tmarginBottom={ 0 }\n\t\t\t\t\t\tpaddingBottom={ 6 }\n\t\t\t\t\t>\n\t\t\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t<FontSizePreview fontSize={ fontSize } />\n\t\t\t\t\t\t\t</FlexItem>\n\n\t\t\t\t\t\t\t<SizeControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Size' ) }\n\t\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\t\t! isCustomFluid && fontSize.size\n\t\t\t\t\t\t\t\t\t\t? String( fontSize.size )\n\t\t\t\t\t\t\t\t\t\t: ''\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonChange={ handleFontSizeChange }\n\t\t\t\t\t\t\t\tdisabled={ isCustomFluid }\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Fluid typography' ) }\n\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t'Scale the font size dynamically to fit the screen or viewport.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tchecked={ isFluid }\n\t\t\t\t\t\t\t\tonChange={ handleFluidChange }\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t{ isFluid && (\n\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Custom fluid values' ) }\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Set custom min and max values for the fluid font size.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tchecked={ isCustomFluid }\n\t\t\t\t\t\t\t\t\tonChange={ handleCustomFluidValues }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t\t{ isCustomFluid && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<SizeControl\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Minimum' ) }\n\t\t\t\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\t\t\t\ttypeof fontSize?.fluid === 'object'\n\t\t\t\t\t\t\t\t\t\t\t\t? fontSize.fluid?.min\n\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonChange={ handleMinChange }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<SizeControl\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Maximum' ) }\n\t\t\t\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\t\t\t\ttypeof fontSize?.fluid === 'object'\n\t\t\t\t\t\t\t\t\t\t\t\t? fontSize.fluid?.max\n\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonChange={ handleMaxChange }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t</Spacer>\n\t\t\t\t</View>\n\t\t\t</VStack>\n\t\t</>\n\t);\n}\n\nexport default FontSize;\n", "/**\n * WordPress dependencies\n */\n// @ts-expect-error: Not typed yet.\nimport { getComputedFluidTypographyValue } from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport type { FontSize } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport { useStyle } from '../hooks';\n\ninterface FontSizePreviewProps {\n\tfontSize: FontSize;\n}\n\nfunction FontSizePreview( { fontSize }: FontSizePreviewProps ) {\n\tconst [ font ] = useStyle< { fontFamily?: string } >( 'typography' );\n\n\tconst input =\n\t\ttypeof fontSize?.fluid === 'object' &&\n\t\tfontSize?.fluid?.min &&\n\t\tfontSize?.fluid?.max\n\t\t\t? {\n\t\t\t\t\tminimumFontSize: fontSize.fluid.min,\n\t\t\t\t\tmaximumFontSize: fontSize.fluid.max,\n\t\t\t }\n\t\t\t: {\n\t\t\t\t\tfontSize: fontSize.size,\n\t\t\t };\n\n\tconst computedFontSize = getComputedFluidTypographyValue( input );\n\treturn (\n\t\t<div\n\t\t\tclassName=\"global-styles-ui-typography-preview\"\n\t\t\tstyle={ {\n\t\t\t\tfontSize: computedFontSize,\n\t\t\t\tfontFamily: font?.fontFamily ?? 'serif',\n\t\t\t} }\n\t\t>\n\t\t\t{ __( 'Aa' ) }\n\t\t</div>\n\t);\n}\n\nexport default FontSizePreview;\n", "/**\n * WordPress dependencies\n */\nimport { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport type { FontSize } from '@wordpress/global-styles-engine';\n\ninterface ConfirmDeleteFontSizeDialogProps {\n\tfontSize: FontSize;\n\tisOpen: boolean;\n\ttoggleOpen: () => void;\n\thandleRemoveFontSize: ( fontSize: FontSize ) => void;\n}\n\nfunction ConfirmDeleteFontSizeDialog( {\n\tfontSize,\n\tisOpen,\n\ttoggleOpen,\n\thandleRemoveFontSize,\n}: ConfirmDeleteFontSizeDialogProps ) {\n\tconst handleConfirm = async () => {\n\t\ttoggleOpen();\n\t\thandleRemoveFontSize( fontSize );\n\t};\n\n\tconst handleCancel = () => {\n\t\ttoggleOpen();\n\t};\n\n\treturn (\n\t\t<ConfirmDialog\n\t\t\tisOpen={ isOpen }\n\t\t\tcancelButtonText={ __( 'Cancel' ) }\n\t\t\tconfirmButtonText={ __( 'Delete' ) }\n\t\t\tonCancel={ handleCancel }\n\t\t\tonConfirm={ handleConfirm }\n\t\t\tsize=\"medium\"\n\t\t>\n\t\t\t{ fontSize &&\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %s: Name of the font size preset. */\n\t\t\t\t\t__(\n\t\t\t\t\t\t'Are you sure you want to delete \"%s\" font size preset?'\n\t\t\t\t\t),\n\t\t\t\t\tfontSize.name\n\t\t\t\t) }\n\t\t</ConfirmDialog>\n\t);\n}\n\nexport default ConfirmDeleteFontSizeDialog;\n", "/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalInputControl as InputControl,\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\tButton,\n\tModal,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport type { FontSize } from '@wordpress/global-styles-engine';\n\ninterface RenameFontSizeDialogProps {\n\tfontSize: FontSize;\n\ttoggleOpen: () => void;\n\thandleRename: ( newName: string ) => void;\n}\n\nfunction RenameFontSizeDialog( {\n\tfontSize,\n\ttoggleOpen,\n\thandleRename,\n}: RenameFontSizeDialogProps ) {\n\tconst [ newName, setNewName ] = useState< string | undefined >(\n\t\tfontSize.name\n\t);\n\n\tconst handleConfirm = () => {\n\t\t// If the new name is not empty, call the handleRename function\n\t\tif ( newName && newName.trim() ) {\n\t\t\thandleRename( newName );\n\t\t}\n\t\ttoggleOpen();\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\tonRequestClose={ toggleOpen }\n\t\t\tfocusOnMount=\"firstContentElement\"\n\t\t\ttitle={ __( 'Rename' ) }\n\t\t\tsize=\"small\"\n\t\t>\n\t\t\t<form\n\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\thandleConfirm();\n\t\t\t\t\ttoggleOpen();\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<VStack spacing=\"3\">\n\t\t\t\t\t<InputControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\tvalue={ newName }\n\t\t\t\t\t\tonChange={ setNewName }\n\t\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\t\tplaceholder={ __( 'Font size preset name' ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ toggleOpen }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Save' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</VStack>\n\t\t\t</form>\n\t\t</Modal>\n\t);\n}\n\nexport default RenameFontSizeDialog;\n", "/**\n * WordPress dependencies\n */\nimport {\n\tBaseControl,\n\tRangeControl,\n\tFlex,\n\tFlexItem,\n\tuseBaseControlProps,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalSpacer as Spacer,\n} from '@wordpress/components';\n\nconst DEFAULT_UNITS = [ 'px', 'em', 'rem', 'vw', 'vh' ];\n\ninterface SizeControlProps {\n\tvalue?: string;\n\tonChange?: ( value: string | undefined ) => void;\n\tfallbackValue?: number;\n\tdisabled?: boolean;\n\tlabel?: string;\n}\n\nfunction SizeControl( props: SizeControlProps ) {\n\tconst { baseControlProps } = useBaseControlProps( props );\n\tconst { value, onChange, fallbackValue, disabled, label } = props;\n\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: DEFAULT_UNITS,\n\t} );\n\n\tconst [ valueQuantity, valueUnit = 'px' ] =\n\t\tparseQuantityAndUnitFromRawValue( value, units );\n\n\tconst isValueUnitRelative =\n\t\t!! valueUnit && [ 'em', 'rem', 'vw', 'vh' ].includes( valueUnit );\n\n\t// Receives the new value from the UnitControl component as a string containing the value and unit.\n\tconst handleUnitControlChange = ( newValue: string | undefined ) => {\n\t\tonChange?.( newValue );\n\t};\n\n\t// Receives the new value from the RangeControl component as a number.\n\tconst handleRangeControlChange = ( newValue: number | undefined ) => {\n\t\tif ( newValue !== undefined ) {\n\t\t\tonChange?.( newValue + valueUnit );\n\t\t} else {\n\t\t\tonChange?.( undefined );\n\t\t}\n\t};\n\n\treturn (\n\t\t<BaseControl { ...baseControlProps }>\n\t\t\t<Flex>\n\t\t\t\t<FlexItem isBlock>\n\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tonChange={ handleUnitControlChange }\n\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t/>\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem isBlock>\n\t\t\t\t\t<Spacer marginX={ 2 } marginBottom={ 0 }>\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\tvalue={ valueQuantity }\n\t\t\t\t\t\t\tinitialPosition={ fallbackValue }\n\t\t\t\t\t\t\twithInputField={ false }\n\t\t\t\t\t\t\tonChange={ handleRangeControlChange }\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tmax={ isValueUnitRelative ? 10 : 100 }\n\t\t\t\t\t\t\tstep={ isValueUnitRelative ? 0.1 : 1 }\n\t\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Spacer>\n\t\t\t\t</FlexItem>\n\t\t\t</Flex>\n\t\t</BaseControl>\n\t);\n}\n\nexport { SizeControl };\n", "/**\n * WordPress dependencies\n */\nimport type { GlobalStylesConfig } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport { GlobalStylesProvider } from './provider';\n\ninterface GlobalStylesProviderProps {\n\tvalue: GlobalStylesConfig;\n\tbaseValue: GlobalStylesConfig;\n\tonChange: ( config: GlobalStylesConfig ) => void;\n}\n\n/**\n * Higher-order component that wraps a component with GlobalStylesProvider.\n * This allows components to access GlobalStylesContext without exposing\n * the provider directly in the public API.\n *\n * @param Component - The component to wrap\n * @return A wrapped component that accepts value, baseValue, and onChange props\n */\nexport function withGlobalStylesProvider< P extends object >(\n\tComponent: React.ComponentType< P >\n) {\n\treturn function WrappedComponent( {\n\t\tvalue,\n\t\tbaseValue,\n\t\tonChange,\n\t\t...props\n\t}: P & GlobalStylesProviderProps ) {\n\t\treturn (\n\t\t\t<GlobalStylesProvider\n\t\t\t\tvalue={ value }\n\t\t\t\tbaseValue={ baseValue }\n\t\t\t\tonChange={ onChange }\n\t\t\t>\n\t\t\t\t<Component { ...( props as P ) } />\n\t\t\t</GlobalStylesProvider>\n\t\t);\n\t};\n}\n", "/**\n * WordPress dependencies\n */\nimport type { GlobalStylesConfig } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport StyleVariationsContainer from './style-variations-container';\nimport { withGlobalStylesProvider } from './with-global-styles-provider';\n\nexport interface StyleVariationsProps {\n\tvalue: GlobalStylesConfig;\n\tbaseValue: GlobalStylesConfig;\n\tonChange: ( config: GlobalStylesConfig ) => void;\n\tgap?: number;\n}\n\n/**\n * Render Style Variations.\n *\n * @example\n * ```tsx\n * <StyleVariations\n * value={userConfig}\n * baseValue={baseConfig}\n * onChange={setUserConfig}\n * gap={3}\n * />\n * ```\n */\nexport const StyleVariations: React.ComponentType< StyleVariationsProps > =\n\twithGlobalStylesProvider( StyleVariationsContainer );\n", "/**\n * WordPress dependencies\n */\nimport type { GlobalStylesConfig } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport ColorVariationsInternal from './variations/variations-color';\nimport { withGlobalStylesProvider } from './with-global-styles-provider';\n\nexport interface ColorVariationsProps {\n\tvalue: GlobalStylesConfig;\n\tbaseValue: GlobalStylesConfig;\n\tonChange: ( config: GlobalStylesConfig ) => void;\n\ttitle?: string;\n\tgap?: number;\n}\n\n/**\n * Render Global Styles Color Variations.\n *\n * @example\n * ```tsx\n * <ColorVariations\n * value={userConfig}\n * baseValue={baseConfig}\n * onChange={setUserConfig}\n * title=\"Palettes\"\n * gap={3}\n * />\n * ```\n */\nexport const ColorVariations: React.ComponentType< ColorVariationsProps > =\n\twithGlobalStylesProvider( ColorVariationsInternal );\n", "/**\n * WordPress dependencies\n */\nimport type { GlobalStylesConfig } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport TypographyVariationsInternal from './variations/variations-typography';\nimport { withGlobalStylesProvider } from './with-global-styles-provider';\n\nexport interface TypographyVariationsProps {\n\tvalue: GlobalStylesConfig;\n\tbaseValue: GlobalStylesConfig;\n\tonChange: ( config: GlobalStylesConfig ) => void;\n\ttitle?: string;\n\tgap?: number;\n}\n\n/**\n * Render Typography Variations.\n *\n * @example\n * ```tsx\n * <TypographyVariations\n * value={userConfig}\n * baseValue={baseConfig}\n * onChange={setUserConfig}\n * title=\"Typography\"\n * gap={3}\n * />\n * ```\n */\nexport const TypographyVariations: React.ComponentType< TypographyVariationsProps > =\n\twithGlobalStylesProvider( TypographyVariationsInternal );\n", "/**\n * WordPress dependencies\n */\n\n/**\n * Internal dependencies\n */\nimport { GlobalStylesProvider } from '../provider';\nimport FontLibraryProvider from './context';\nimport InstalledFonts from './installed-fonts';\nimport UploadFonts from './upload-fonts';\nimport FontCollection from './font-collection';\n\ninterface FontLibraryProps {\n\tvalue: any;\n\tbaseValue: any;\n\tonChange: ( value: any ) => void;\n\tactiveTab?: string;\n\tonTabChange?: ( tab: string ) => void;\n}\n\nexport function FontLibrary( {\n\tvalue,\n\tbaseValue,\n\tonChange,\n\tactiveTab = 'installed-fonts',\n}: FontLibraryProps ) {\n\tlet content;\n\tswitch ( activeTab ) {\n\t\tcase 'upload-fonts':\n\t\t\tcontent = <UploadFonts />;\n\t\t\tbreak;\n\t\tcase 'installed-fonts':\n\t\t\tcontent = <InstalledFonts />;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tcontent = <FontCollection slug={ activeTab } />;\n\t}\n\n\treturn (\n\t\t<GlobalStylesProvider\n\t\t\tvalue={ value }\n\t\t\tbaseValue={ baseValue }\n\t\t\tonChange={ onChange }\n\t\t>\n\t\t\t<FontLibraryProvider>{ content }</FontLibraryProvider>\n\t\t</GlobalStylesProvider>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { usePrevious } from '@wordpress/compose';\n\n/**\n * Auto-navigate to block styles when a block is selected in the canvas.\n *\n * @param {Object} props\n * @param {string} props.path Current navigation path.\n * @param {Function} props.onPathChange Callback to change the navigation path.\n */\nexport function GlobalStylesBlockLink( { path, onPathChange } ) {\n\tconst { selectedBlockName, selectedBlockClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSelectedBlockClientId, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\treturn {\n\t\t\t\tselectedBlockName: getBlockName( clientId ),\n\t\t\t\tselectedBlockClientId: clientId,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\t// const blockHasGlobalStyles = useBlockHasGlobalStyles( selectedBlockName );\n\tconst blockHasGlobalStyles = true;\n\tconst previousBlockClientId = usePrevious( selectedBlockClientId );\n\n\t// When we're in the `Blocks` screen enable deep linking to the selected block.\n\tuseEffect( () => {\n\t\t// Only navigate when block selection changes, not when path changes\n\t\tif ( selectedBlockClientId === previousBlockClientId ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( ! selectedBlockClientId || ! blockHasGlobalStyles ) {\n\t\t\treturn;\n\t\t}\n\t\tif (\n\t\t\t! path ||\n\t\t\t( path !== '/blocks' && ! path.startsWith( '/blocks/' ) )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst newPath = '/blocks/' + encodeURIComponent( selectedBlockName );\n\t\t// Avoid navigating to the same path. This can happen when selecting\n\t\t// a new block of the same type.\n\t\tif ( newPath !== path ) {\n\t\t\tonPathChange?.( newPath );\n\t\t}\n\t}, [\n\t\tselectedBlockClientId,\n\t\tpreviousBlockClientId,\n\t\tselectedBlockName,\n\t\tblockHasGlobalStyles,\n\t\tpath,\n\t\tonPathChange,\n\t] );\n\n\treturn null;\n}\n", "/**\n * WordPress dependencies\n */\nimport { useMemo, useCallback } from '@wordpress/element';\nimport {\n\tmergeGlobalStyles,\n\tgetStyle,\n\tgetSetting,\n} from '@wordpress/global-styles-engine';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { cleanEmptyObject } = unlock( blockEditorPrivateApis );\n\n/**\n * Hook to fetch and manage user global styles config\n */\nfunction useGlobalStylesUserConfig() {\n\tconst { globalStylesId, isReady, settings, styles, _links } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEntityRecord,\n\t\t\t\tgetEditedEntityRecord,\n\t\t\t\thasFinishedResolution,\n\t\t\t\tcanUser,\n\t\t\t} = select( coreStore );\n\t\t\tconst _globalStylesId =\n\t\t\t\tselect( coreStore ).__experimentalGetCurrentGlobalStylesId();\n\n\t\t\tlet record;\n\n\t\t\tconst userCanEditGlobalStyles = _globalStylesId\n\t\t\t\t? canUser( 'update', {\n\t\t\t\t\t\tkind: 'root',\n\t\t\t\t\t\tname: 'globalStyles',\n\t\t\t\t\t\tid: _globalStylesId,\n\t\t\t\t } )\n\t\t\t\t: null;\n\n\t\t\tif (\n\t\t\t\t_globalStylesId &&\n\t\t\t\ttypeof userCanEditGlobalStyles === 'boolean'\n\t\t\t) {\n\t\t\t\tif ( userCanEditGlobalStyles ) {\n\t\t\t\t\trecord = getEditedEntityRecord(\n\t\t\t\t\t\t'root',\n\t\t\t\t\t\t'globalStyles',\n\t\t\t\t\t\t_globalStylesId\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\trecord = getEntityRecord(\n\t\t\t\t\t\t'root',\n\t\t\t\t\t\t'globalStyles',\n\t\t\t\t\t\t_globalStylesId,\n\t\t\t\t\t\t{ context: 'view' }\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet hasResolved = false;\n\t\t\tif (\n\t\t\t\thasFinishedResolution(\n\t\t\t\t\t'__experimentalGetCurrentGlobalStylesId'\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tif ( _globalStylesId ) {\n\t\t\t\t\thasResolved = userCanEditGlobalStyles\n\t\t\t\t\t\t? hasFinishedResolution( 'getEditedEntityRecord', [\n\t\t\t\t\t\t\t\t'root',\n\t\t\t\t\t\t\t\t'globalStyles',\n\t\t\t\t\t\t\t\t_globalStylesId,\n\t\t\t\t\t\t ] )\n\t\t\t\t\t\t: hasFinishedResolution( 'getEntityRecord', [\n\t\t\t\t\t\t\t\t'root',\n\t\t\t\t\t\t\t\t'globalStyles',\n\t\t\t\t\t\t\t\t_globalStylesId,\n\t\t\t\t\t\t\t\t{ context: 'view' },\n\t\t\t\t\t\t ] );\n\t\t\t\t} else {\n\t\t\t\t\thasResolved = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tglobalStylesId: _globalStylesId,\n\t\t\t\tisReady: hasResolved,\n\t\t\t\tsettings: record?.settings,\n\t\t\t\tstyles: record?.styles,\n\t\t\t\t_links: record?._links,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst { getEditedEntityRecord } = useSelect( coreStore );\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\n\tconst config = useMemo( () => {\n\t\treturn {\n\t\t\tsettings: settings ?? {},\n\t\t\tstyles: styles ?? {},\n\t\t\t_links: _links ?? {},\n\t\t};\n\t}, [ settings, styles, _links ] );\n\n\tconst setConfig = useCallback(\n\t\t( callbackOrObject, options = {} ) => {\n\t\t\tconst record = getEditedEntityRecord(\n\t\t\t\t'root',\n\t\t\t\t'globalStyles',\n\t\t\t\tglobalStylesId\n\t\t\t);\n\n\t\t\tconst currentConfig = {\n\t\t\t\tstyles: record?.styles ?? {},\n\t\t\t\tsettings: record?.settings ?? {},\n\t\t\t\t_links: record?._links ?? {},\n\t\t\t};\n\n\t\t\tconst updatedConfig =\n\t\t\t\ttypeof callbackOrObject === 'function'\n\t\t\t\t\t? callbackOrObject( currentConfig )\n\t\t\t\t\t: callbackOrObject;\n\n\t\t\teditEntityRecord(\n\t\t\t\t'root',\n\t\t\t\t'globalStyles',\n\t\t\t\tglobalStylesId,\n\t\t\t\t{\n\t\t\t\t\tstyles: cleanEmptyObject( updatedConfig.styles ) || {},\n\t\t\t\t\tsettings: cleanEmptyObject( updatedConfig.settings ) || {},\n\t\t\t\t\t_links: cleanEmptyObject( updatedConfig._links ) || {},\n\t\t\t\t},\n\t\t\t\toptions\n\t\t\t);\n\t\t},\n\t\t[ globalStylesId, editEntityRecord, getEditedEntityRecord ]\n\t);\n\n\treturn [ isReady, config, setConfig ];\n}\n\n/**\n * Hook to fetch base/theme global styles config\n */\nfunction useGlobalStylesBaseConfig() {\n\tconst baseConfig = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).__experimentalGetCurrentThemeBaseGlobalStyles(),\n\t\t[]\n\t);\n\treturn [ !! baseConfig, baseConfig ];\n}\n\n/**\n * Hook to get merged global styles configuration\n *\n * @return {Object} Object containing merged, base, user configs and setUser function\n * { merged, base, user, setUser }\n */\nexport function useGlobalStyles() {\n\tconst [ isUserConfigReady, userConfig, setUserConfig ] =\n\t\tuseGlobalStylesUserConfig();\n\tconst [ isBaseConfigReady, baseConfig ] = useGlobalStylesBaseConfig();\n\n\tconst merged = useMemo( () => {\n\t\tif ( ! isUserConfigReady || ! isBaseConfigReady ) {\n\t\t\treturn {};\n\t\t}\n\t\treturn mergeGlobalStyles( baseConfig || {}, userConfig );\n\t}, [ isUserConfigReady, isBaseConfigReady, baseConfig, userConfig ] );\n\n\treturn {\n\t\tmerged,\n\t\tbase: baseConfig || {},\n\t\tuser: userConfig,\n\t\tsetUser: setUserConfig,\n\t\tisReady: isUserConfigReady && isBaseConfigReady,\n\t};\n}\n\n/**\n * Hook to get a style value from global styles\n *\n * @param {string} path Style path (e.g., 'color.background')\n * @param {string=} blockName Optional block name\n * @return {*} Style value\n */\nexport function useStyle( path, blockName ) {\n\tconst { merged } = useGlobalStyles();\n\treturn useMemo(\n\t\t() => getStyle( merged, path, blockName ),\n\t\t[ merged, path, blockName ]\n\t);\n}\n\n/**\n * Hook to get a setting value from global styles\n *\n * @param {string} path Setting path (e.g., 'spacing.blockGap')\n * @param {string=} blockName Optional block name\n * @return {*} Setting value\n */\nexport function useSetting( path, blockName ) {\n\tconst { merged } = useGlobalStyles();\n\treturn useMemo(\n\t\t() => getSetting( merged, path, blockName ),\n\t\t[ merged, path, blockName ]\n\t);\n}\n", "/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal';\n\n/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { createSelector, createRegistrySelector } from '@wordpress/data';\nimport {\n\tlayout,\n\tsymbol,\n\tnavigation,\n\tpage as pageIcon,\n\tverse,\n} from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { getRenderingMode, getCurrentPost } from './selectors';\nimport {\n\tgetEntityActions as _getEntityActions,\n\tgetEntityFields as _getEntityFields,\n\tisEntityReady as _isEntityReady,\n} from '../dataviews/store/private-selectors';\nimport { getTemplatePartIcon } from '../utils';\n\nconst EMPTY_INSERTION_POINT = {\n\trootClientId: undefined,\n\tinsertionIndex: undefined,\n\tfilterValue: undefined,\n};\n\n/**\n * These are rendering modes that the editor supports.\n */\nconst RENDERING_MODES = [ 'post-only', 'template-locked' ];\n\n/**\n * Get the inserter.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID, index to insert at and starting filter value.\n */\nexport const getInserter = createRegistrySelector( ( select ) =>\n\tcreateSelector(\n\t\t( state ) => {\n\t\t\tif ( typeof state.blockInserterPanel === 'object' ) {\n\t\t\t\treturn state.blockInserterPanel;\n\t\t\t}\n\n\t\t\tif ( getRenderingMode( state ) === 'template-locked' ) {\n\t\t\t\tconst [ postContentClientId ] =\n\t\t\t\t\tselect( blockEditorStore ).getBlocksByName(\n\t\t\t\t\t\t'core/post-content'\n\t\t\t\t\t);\n\t\t\t\tif ( postContentClientId ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\trootClientId: postContentClientId,\n\t\t\t\t\t\tinsertionIndex: undefined,\n\t\t\t\t\t\tfilterValue: undefined,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn EMPTY_INSERTION_POINT;\n\t\t},\n\t\t( state ) => {\n\t\t\tconst [ postContentClientId ] =\n\t\t\t\tselect( blockEditorStore ).getBlocksByName(\n\t\t\t\t\t'core/post-content'\n\t\t\t\t);\n\t\t\treturn [\n\t\t\t\tstate.blockInserterPanel,\n\t\t\t\tgetRenderingMode( state ),\n\t\t\t\tpostContentClientId,\n\t\t\t];\n\t\t}\n\t)\n);\n\nexport function getListViewToggleRef( state ) {\n\treturn state.listViewToggleRef;\n}\nexport function getInserterSidebarToggleRef( state ) {\n\treturn state.inserterSidebarToggleRef;\n}\nconst CARD_ICONS = {\n\twp_block: symbol,\n\twp_navigation: navigation,\n\tpage: pageIcon,\n\tpost: verse,\n};\n\nexport const getPostIcon = createRegistrySelector(\n\t( select ) => ( state, postType, options ) => {\n\t\t{\n\t\t\tif (\n\t\t\t\tpostType === 'wp_template_part' ||\n\t\t\t\tpostType === 'wp_template'\n\t\t\t) {\n\t\t\t\tconst templateAreas =\n\t\t\t\t\tselect( coreStore ).getCurrentTheme()\n\t\t\t\t\t\t?.default_template_part_areas || [];\n\n\t\t\t\tconst areaData = templateAreas.find(\n\t\t\t\t\t( item ) => options.area === item.area\n\t\t\t\t);\n\n\t\t\t\tif ( areaData?.icon ) {\n\t\t\t\t\treturn getTemplatePartIcon( areaData.icon );\n\t\t\t\t}\n\n\t\t\t\treturn layout;\n\t\t\t}\n\t\t\tif ( CARD_ICONS[ postType ] ) {\n\t\t\t\treturn CARD_ICONS[ postType ];\n\t\t\t}\n\t\t\tconst postTypeEntity = select( coreStore ).getPostType( postType );\n\t\t\t// `icon` is the `menu_icon` property of a post type. We\n\t\t\t// only handle `dashicons` for now, even if the `menu_icon`\n\t\t\t// also supports urls and svg as values.\n\t\t\tif (\n\t\t\t\ttypeof postTypeEntity?.icon === 'string' &&\n\t\t\t\tpostTypeEntity.icon.startsWith( 'dashicons-' )\n\t\t\t) {\n\t\t\t\treturn postTypeEntity.icon.slice( 10 );\n\t\t\t}\n\t\t\treturn pageIcon;\n\t\t}\n\t}\n);\n\n/**\n * Returns true if there are unsaved changes to the\n * post's meta fields, and false otherwise.\n *\n * @param {Object} state Global application state.\n * @param {string} postType The post type of the post.\n * @param {number} postId The ID of the post.\n *\n * @return {boolean} Whether there are edits or not in the meta fields of the relevant post.\n */\nexport const hasPostMetaChanges = createRegistrySelector(\n\t( select ) => ( state, postType, postId ) => {\n\t\tconst { type: currentPostType, id: currentPostId } =\n\t\t\tgetCurrentPost( state );\n\t\t// If no postType or postId is passed, use the current post.\n\t\tconst edits = select( coreStore ).getEntityRecordNonTransientEdits(\n\t\t\t'postType',\n\t\t\tpostType || currentPostType,\n\t\t\tpostId || currentPostId\n\t\t);\n\n\t\tif ( ! edits?.meta ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Compare if anything apart from `footnotes` has changed.\n\t\tconst originalPostMeta = select( coreStore ).getEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType || currentPostType,\n\t\t\tpostId || currentPostId\n\t\t)?.meta;\n\n\t\treturn ! fastDeepEqual(\n\t\t\t{ ...originalPostMeta, footnotes: undefined },\n\t\t\t{ ...edits.meta, footnotes: undefined }\n\t\t);\n\t}\n);\n\nexport function getEntityActions( state, ...args ) {\n\treturn _getEntityActions( state.dataviews, ...args );\n}\n\nexport function isEntityReady( state, ...args ) {\n\treturn _isEntityReady( state.dataviews, ...args );\n}\n\nexport function getEntityFields( state, ...args ) {\n\treturn _getEntityFields( state.dataviews, ...args );\n}\n\n/**\n * Similar to getBlocksByName in @wordpress/block-editor, but only returns the top-most\n * blocks that aren't descendants of the query block.\n *\n * @param {Object} state Global application state.\n * @param {Array|string} blockNames Block names of the blocks to retrieve.\n *\n * @return {Array} Block client IDs.\n */\nexport const getPostBlocksByName = createRegistrySelector( ( select ) =>\n\tcreateSelector(\n\t\t( state, blockNames ) => {\n\t\t\tblockNames = Array.isArray( blockNames )\n\t\t\t\t? blockNames\n\t\t\t\t: [ blockNames ];\n\t\t\tconst { getBlocksByName, getBlockParents, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn getBlocksByName( blockNames ).filter( ( clientId ) =>\n\t\t\t\tgetBlockParents( clientId ).every( ( parentClientId ) => {\n\t\t\t\t\tconst parentBlockName = getBlockName( parentClientId );\n\t\t\t\t\treturn (\n\t\t\t\t\t\t// Ignore descendents of the query block.\n\t\t\t\t\t\tparentBlockName !== 'core/query' &&\n\t\t\t\t\t\t// Enable only the top-most block.\n\t\t\t\t\t\t! blockNames.includes( parentBlockName )\n\t\t\t\t\t);\n\t\t\t\t} )\n\t\t\t);\n\t\t},\n\t\t() => [ select( blockEditorStore ).getBlocks() ]\n\t)\n);\n\n/**\n * Returns the default rendering mode for a post type by user preference or post type configuration.\n *\n * @param {Object} state Global application state.\n * @param {string} postType The post type.\n *\n * @return {string} The default rendering mode. Returns `undefined` while resolving value.\n */\nexport const getDefaultRenderingMode = createRegistrySelector(\n\t( select ) => ( state, postType ) => {\n\t\tconst { getPostType, getCurrentTheme, hasFinishedResolution } =\n\t\t\tselect( coreStore );\n\n\t\t// This needs to be called before `hasFinishedResolution`.\n\t\t// eslint-disable-next-line @wordpress/no-unused-vars-before-return\n\t\tconst currentTheme = getCurrentTheme();\n\t\t// eslint-disable-next-line @wordpress/no-unused-vars-before-return\n\t\tconst postTypeEntity = getPostType( postType );\n\n\t\t// Wait for the post type and theme resolution.\n\t\tif (\n\t\t\t! hasFinishedResolution( 'getPostType', [ postType ] ) ||\n\t\t\t! hasFinishedResolution( 'getCurrentTheme' )\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst theme = currentTheme?.stylesheet;\n\t\tconst defaultModePreference = select( preferencesStore ).get(\n\t\t\t'core',\n\t\t\t'renderingModes'\n\t\t)?.[ theme ]?.[ postType ];\n\t\tconst postTypeDefaultMode = Array.isArray(\n\t\t\tpostTypeEntity?.supports?.editor\n\t\t)\n\t\t\t? postTypeEntity.supports.editor.find(\n\t\t\t\t\t( features ) => 'default-mode' in features\n\t\t\t )?.[ 'default-mode' ]\n\t\t\t: undefined;\n\n\t\tconst defaultMode = defaultModePreference || postTypeDefaultMode;\n\n\t\t// Fallback gracefully to 'post-only' when rendering mode is not supported.\n\t\tif ( ! RENDERING_MODES.includes( defaultMode ) ) {\n\t\t\treturn 'post-only';\n\t\t}\n\n\t\treturn defaultMode;\n\t}\n);\n\n/**\n * Get the current global styles navigation path.\n *\n * @param {Object} state Global application state.\n * @return {string} The current styles path.\n */\nexport function getStylesPath( state ) {\n\treturn state.stylesPath ?? '/';\n}\n\n/**\n * Get whether the stylebook is currently visible.\n *\n * @param {Object} state Global application state.\n * @return {boolean} Whether the stylebook is visible.\n */\nexport function getShowStylebook( state ) {\n\treturn state.showStylebook ?? false;\n}\n\n/**\n * Get the canvas minimum height.\n *\n * @param {Object} state Global application state.\n * @return {number} The canvas minimum height.\n */\nexport function getCanvasMinHeight( state ) {\n\treturn state.canvasMinHeight;\n}\n", "/**\n * Internal dependencies\n */\nimport type { State } from './reducer';\n\nconst EMPTY_ARRAY = [] as [];\n\nexport function getEntityActions( state: State, kind: string, name: string ) {\n\treturn state.actions[ kind ]?.[ name ] ?? EMPTY_ARRAY;\n}\n\nexport function getEntityFields( state: State, kind: string, name: string ) {\n\treturn state.fields[ kind ]?.[ name ] ?? EMPTY_ARRAY;\n}\n\nexport function isEntityReady( state: State, kind: string, name: string ) {\n\treturn state.isReady[ kind ]?.[ name ];\n}\n", "/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport { userAutocompleter } from '../components';\n\nfunction setDefaultCompleters( completers = [] ) {\n\t// Provide copies so filters may directly modify them.\n\tcompleters.push( { ...userAutocompleter } );\n\n\treturn completers;\n}\n\naddFilter(\n\t'editor.Autocomplete.completers',\n\t'editor/autocompleters/set-default-completers',\n\tsetDefaultCompleters\n);\n", "/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Renders a user label for the autocompleter.\n *\n * @param {Object} user User object.\n * @return {JSX.Element} User label component.\n */\nexport function getUserLabel( user ) {\n\tconst avatar =\n\t\tuser.avatar_urls && user.avatar_urls[ 24 ] ? (\n\t\t\t<img\n\t\t\t\tclassName=\"editor-autocompleters__user-avatar\"\n\t\t\t\talt=\"\"\n\t\t\t\tsrc={ user.avatar_urls[ 24 ] }\n\t\t\t/>\n\t\t) : (\n\t\t\t<span className=\"editor-autocompleters__no-avatar\"></span>\n\t\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ avatar }\n\t\t\t<span className=\"editor-autocompleters__user-name\">\n\t\t\t\t{ user.name }\n\t\t\t</span>\n\t\t\t<span className=\"editor-autocompleters__user-slug\">\n\t\t\t\t{ user.slug }\n\t\t\t</span>\n\t\t</>\n\t);\n}\n\n/**\n * A user mentions completer.\n *\n * @type {Object}\n */\nexport default {\n\tname: 'users',\n\tclassName: 'editor-autocompleters__user',\n\ttriggerPrefix: '@',\n\n\tuseItems( filterValue ) {\n\t\tconst users = useSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst { getUsers } = select( coreStore );\n\t\t\t\treturn getUsers( {\n\t\t\t\t\tcontext: 'view',\n\t\t\t\t\tsearch: encodeURIComponent( filterValue ),\n\t\t\t\t} );\n\t\t\t},\n\t\t\t[ filterValue ]\n\t\t);\n\n\t\tconst options = useMemo(\n\t\t\t() =>\n\t\t\t\tusers\n\t\t\t\t\t? users.map( ( user ) => ( {\n\t\t\t\t\t\t\tkey: `user-${ user.slug }`,\n\t\t\t\t\t\t\tvalue: user,\n\t\t\t\t\t\t\tlabel: getUserLabel( user ),\n\t\t\t\t\t } ) )\n\t\t\t\t\t: [],\n\t\t\t[ users ]\n\t\t);\n\n\t\treturn [ options ];\n\t},\n\n\tgetOptionCompletion( user ) {\n\t\treturn `@${ user.slug }`;\n\t},\n};\n", "/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport class AutosaveMonitor extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.needsAutosave = !! ( props.isDirty && props.isAutosaveable );\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( ! this.props.disableIntervalChecks ) {\n\t\t\tthis.setAutosaveTimer();\n\t\t}\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( this.props.disableIntervalChecks ) {\n\t\t\tif ( this.props.editsReference !== prevProps.editsReference ) {\n\t\t\t\tthis.props.autosave();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.props.interval !== prevProps.interval ) {\n\t\t\tclearTimeout( this.timerId );\n\t\t\tthis.setAutosaveTimer();\n\t\t}\n\n\t\tif ( ! this.props.isDirty ) {\n\t\t\tthis.needsAutosave = false;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.props.isAutosaving && ! prevProps.isAutosaving ) {\n\t\t\tthis.needsAutosave = false;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.props.editsReference !== prevProps.editsReference ) {\n\t\t\tthis.needsAutosave = true;\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tclearTimeout( this.timerId );\n\t}\n\n\tsetAutosaveTimer( timeout = this.props.interval * 1000 ) {\n\t\tthis.timerId = setTimeout( () => {\n\t\t\tthis.autosaveTimerHandler();\n\t\t}, timeout );\n\t}\n\n\tautosaveTimerHandler() {\n\t\tif ( ! this.props.isAutosaveable ) {\n\t\t\tthis.setAutosaveTimer( 1000 );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.needsAutosave ) {\n\t\t\tthis.needsAutosave = false;\n\t\t\tthis.props.autosave();\n\t\t}\n\n\t\tthis.setAutosaveTimer();\n\t}\n\n\trender() {\n\t\treturn null;\n\t}\n}\n\n/**\n * Monitors the changes made to the edited post and triggers autosave if necessary.\n *\n * The logic is straightforward: a check is performed every `props.interval` seconds. If any changes are detected, `props.autosave()` is called.\n * The time between the change and the autosave varies but is no larger than `props.interval` seconds. Refer to the code below for more details, such as\n * the specific way of detecting changes.\n *\n * There are two caveats:\n * * If `props.isAutosaveable` happens to be false at a time of checking for changes, the check is retried every second.\n * * The timer may be disabled by setting `props.disableIntervalChecks` to `true`. In that mode, any change will immediately trigger `props.autosave()`.\n *\n * @param {Object} props - The properties passed to the component.\n * @param {Function} props.autosave - The function to call when changes need to be saved.\n * @param {number} props.interval - The maximum time in seconds between an unsaved change and an autosave.\n * @param {boolean} props.isAutosaveable - If false, the check for changes is retried every second.\n * @param {boolean} props.disableIntervalChecks - If true, disables the timer and any change will immediately trigger `props.autosave()`.\n * @param {boolean} props.isDirty - Indicates if there are unsaved changes.\n *\n * @example\n * ```jsx\n * <AutosaveMonitor interval={30000} />\n * ```\n */\nexport default compose( [\n\twithSelect( ( select, ownProps ) => {\n\t\tconst { getReferenceByDistinctEdits } = select( coreStore );\n\n\t\tconst {\n\t\t\tisEditedPostDirty,\n\t\t\tisEditedPostAutosaveable,\n\t\t\tisAutosavingPost,\n\t\t\tgetEditorSettings,\n\t\t} = select( editorStore );\n\n\t\tconst { interval = getEditorSettings().autosaveInterval } = ownProps;\n\n\t\treturn {\n\t\t\teditsReference: getReferenceByDistinctEdits(),\n\t\t\tisDirty: isEditedPostDirty(),\n\t\t\tisAutosaveable: isEditedPostAutosaveable(),\n\t\t\tisAutosaving: isAutosavingPost(),\n\t\t\tinterval,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, ownProps ) => ( {\n\t\tautosave() {\n\t\t\tconst { autosave = dispatch( editorStore ).autosave } = ownProps;\n\t\t\tautosave();\n\t\t},\n\t} ) ),\n] )( AutosaveMonitor );\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tButton,\n\t__experimentalText as Text,\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { BlockIcon, store as blockEditorStore } from '@wordpress/block-editor';\nimport { chevronLeftSmall, chevronRightSmall, layout } from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as commandsStore } from '@wordpress/commands';\nimport { useRef, useEffect } from '@wordpress/element';\nimport { useReducedMotion } from '@wordpress/compose';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPES } from '../../store/constants';\nimport { store as editorStore } from '../../store';\nimport usePageTypeBadge from '../../utils/pageTypeBadge';\nimport { getTemplateInfo } from '../../utils/get-template-info';\nimport { getStylesCanvasTitle } from '../styles-canvas';\nimport { unlock } from '../../lock-unlock';\nimport useEditedSectionDetails from './useEditedSectionDetails';\n\n/** @typedef {import(\"@wordpress/components\").IconType} IconType */\n\nconst MotionButton = motion.create( Button );\n\n/**\n * This component renders a navigation bar at the top of the editor. It displays the title of the current document,\n * a back button (if applicable), and a command center button. It also handles different states of the document,\n * such as \"not found\" or \"unsynced\".\n *\n * @example\n * ```jsx\n * <DocumentBar />\n * ```\n *\n * @param {Object} props The component props.\n * @param {string} props.title A title for the document, defaulting to the document or template title currently being edited.\n * @param {IconType} props.icon An icon for the document, no default.\n * (A default icon indicating the document post type is no longer used.)\n *\n * @return {React.ReactNode} The rendered DocumentBar component.\n */\nexport default function DocumentBar( props ) {\n\t// Get action to lock the pattern design\n\tconst { stopEditingContentOnlySection } = unlock(\n\t\tuseDispatch( blockEditorStore )\n\t);\n\n\t// Get details about the currently edited content-only section\n\tconst unlockedPatternInfo = useEditedSectionDetails();\n\n\tconst {\n\t\tpostId,\n\t\tpostType,\n\t\tpostTypeLabel,\n\t\tdocumentTitle,\n\t\tisNotFound,\n\t\ttemplateTitle,\n\t\tonNavigateToPreviousEntityRecord,\n\t\tisTemplatePreview,\n\t\tstylesCanvasTitle,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetCurrentPostType,\n\t\t\tgetCurrentPostId,\n\t\t\tgetEditorSettings,\n\t\t\tgetRenderingMode,\n\t\t} = select( editorStore );\n\n\t\tconst {\n\t\t\tgetEditedEntityRecord,\n\t\t\tgetPostType,\n\t\t\tgetCurrentTheme,\n\t\t\tisResolving: isResolvingSelector,\n\t\t} = select( coreStore );\n\t\tconst _postType = getCurrentPostType();\n\t\tconst _postId = getCurrentPostId();\n\t\tconst _document = getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\t_postType,\n\t\t\t_postId\n\t\t);\n\n\t\tconst { default_template_types: templateTypes = [] } =\n\t\t\tgetCurrentTheme() ?? {};\n\n\t\tconst _templateInfo = getTemplateInfo( {\n\t\t\ttemplateTypes,\n\t\t\ttemplate: _document,\n\t\t} );\n\t\tconst _postTypeLabel = getPostType( _postType )?.labels?.singular_name;\n\n\t\t// Check if styles canvas is active and get its title\n\t\tconst { getStylesPath, getShowStylebook } = unlock(\n\t\t\tselect( editorStore )\n\t\t);\n\t\tconst _stylesPath = getStylesPath();\n\t\tconst _showStylebook = getShowStylebook();\n\t\tconst _stylesCanvasTitle = getStylesCanvasTitle(\n\t\t\t_stylesPath,\n\t\t\t_showStylebook\n\t\t);\n\n\t\treturn {\n\t\t\tpostId: _postId,\n\t\t\tpostType: _postType,\n\t\t\tpostTypeLabel: _postTypeLabel,\n\t\t\tdocumentTitle: _document.title,\n\t\t\tisNotFound:\n\t\t\t\t! _document &&\n\t\t\t\t! isResolvingSelector(\n\t\t\t\t\t'getEditedEntityRecord',\n\t\t\t\t\t'postType',\n\t\t\t\t\t_postType,\n\t\t\t\t\t_postId\n\t\t\t\t),\n\t\t\ttemplateTitle: _templateInfo.title,\n\t\t\tonNavigateToPreviousEntityRecord:\n\t\t\t\tgetEditorSettings().onNavigateToPreviousEntityRecord,\n\t\t\tisTemplatePreview: getRenderingMode() === 'template-locked',\n\t\t\tstylesCanvasTitle: _stylesCanvasTitle,\n\t\t};\n\t}, [] );\n\n\tconst { open: openCommandCenter } = useDispatch( commandsStore );\n\tconst isReducedMotion = useReducedMotion();\n\n\tconst isTemplate = TEMPLATE_POST_TYPES.includes( postType );\n\tconst hasBackButton =\n\t\t!! onNavigateToPreviousEntityRecord || !! unlockedPatternInfo;\n\tconst entityTitle = isTemplate ? templateTitle : documentTitle;\n\n\t// Use pattern info if a pattern block is unlocked, otherwise use document/entity info\n\tconst title =\n\t\tunlockedPatternInfo?.patternTitle ||\n\t\tprops.title ||\n\t\tstylesCanvasTitle ||\n\t\tentityTitle;\n\tconst icon = props.icon;\n\n\t// Determine the back button action\n\tconst handleBackClick = ( event ) => {\n\t\tevent.stopPropagation();\n\t\tif ( unlockedPatternInfo ) {\n\t\t\tstopEditingContentOnlySection();\n\t\t} else if ( onNavigateToPreviousEntityRecord ) {\n\t\t\tonNavigateToPreviousEntityRecord();\n\t\t}\n\t};\n\n\tconst pageTypeBadge = usePageTypeBadge( postId );\n\n\tconst mountedRef = useRef( false );\n\tuseEffect( () => {\n\t\tmountedRef.current = true;\n\t}, [] );\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx( 'editor-document-bar', {\n\t\t\t\t'has-back-button': hasBackButton,\n\t\t\t} ) }\n\t\t>\n\t\t\t<AnimatePresence>\n\t\t\t\t{ hasBackButton && (\n\t\t\t\t\t<MotionButton\n\t\t\t\t\t\tclassName=\"editor-document-bar__back\"\n\t\t\t\t\t\ticon={ isRTL() ? chevronRightSmall : chevronLeftSmall }\n\t\t\t\t\t\tonClick={ handleBackClick }\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tinitial={\n\t\t\t\t\t\t\tmountedRef.current\n\t\t\t\t\t\t\t\t? { opacity: 0, transform: 'translateX(15%)' }\n\t\t\t\t\t\t\t\t: false // Don't show entry animation when DocumentBar mounts.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tanimate={ { opacity: 1, transform: 'translateX(0%)' } }\n\t\t\t\t\t\texit={ { opacity: 0, transform: 'translateX(15%)' } }\n\t\t\t\t\t\ttransition={\n\t\t\t\t\t\t\tisReducedMotion ? { duration: 0 } : undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Back' ) }\n\t\t\t\t\t</MotionButton>\n\t\t\t\t) }\n\t\t\t</AnimatePresence>\n\t\t\t{ ! isTemplate && isTemplatePreview && ! hasBackButton && (\n\t\t\t\t<BlockIcon\n\t\t\t\t\ticon={ layout }\n\t\t\t\t\tclassName=\"editor-document-bar__icon-layout\"\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ isNotFound ? (\n\t\t\t\t<Text>{ __( 'Document not found' ) }</Text>\n\t\t\t) : (\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"editor-document-bar__command\"\n\t\t\t\t\tonClick={ () => openCommandCenter() }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t>\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tclassName=\"editor-document-bar__title\"\n\t\t\t\t\t\t// Force entry animation when the back button is added or removed.\n\t\t\t\t\t\tkey={ hasBackButton }\n\t\t\t\t\t\tinitial={\n\t\t\t\t\t\t\tmountedRef.current\n\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\t\t\ttransform: hasBackButton\n\t\t\t\t\t\t\t\t\t\t\t? 'translateX(15%)'\n\t\t\t\t\t\t\t\t\t\t\t: 'translateX(-15%)',\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t: false // Don't show entry animation when DocumentBar mounts.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tanimate={ {\n\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\ttransform: 'translateX(0%)',\n\t\t\t\t\t\t} }\n\t\t\t\t\t\ttransition={\n\t\t\t\t\t\t\tisReducedMotion ? { duration: 0 } : undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{ icon && <BlockIcon icon={ icon } /> }\n\t\t\t\t\t\t<Text size=\"body\" as=\"h1\">\n\t\t\t\t\t\t\t<span className=\"editor-document-bar__post-title\">\n\t\t\t\t\t\t\t\t{ title\n\t\t\t\t\t\t\t\t\t? stripHTML( title )\n\t\t\t\t\t\t\t\t\t: __( 'No title' ) }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t{ unlockedPatternInfo && (\n\t\t\t\t\t\t\t\t<span className=\"editor-document-bar__post-type-label\">\n\t\t\t\t\t\t\t\t\t{ unlockedPatternInfo.type ===\n\t\t\t\t\t\t\t\t\t'template-part'\n\t\t\t\t\t\t\t\t\t\t? `\u00B7 ${ __( 'Template Part' ) }`\n\t\t\t\t\t\t\t\t\t\t: `\u00B7 ${ __( 'Pattern' ) }` }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ ! unlockedPatternInfo && pageTypeBadge && (\n\t\t\t\t\t\t\t\t<span className=\"editor-document-bar__post-type-label\">\n\t\t\t\t\t\t\t\t\t{ `\u00B7 ${ pageTypeBadge }` }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ ! unlockedPatternInfo &&\n\t\t\t\t\t\t\t\tpostTypeLabel &&\n\t\t\t\t\t\t\t\t! props.title &&\n\t\t\t\t\t\t\t\t! pageTypeBadge && (\n\t\t\t\t\t\t\t\t\t<span className=\"editor-document-bar__post-type-label\">\n\t\t\t\t\t\t\t\t\t\t{ `\u00B7 ${ decodeEntities(\n\t\t\t\t\t\t\t\t\t\t\tpostTypeLabel\n\t\t\t\t\t\t\t\t\t\t) }` }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</motion.div>\n\t\t\t\t\t<span className=\"editor-document-bar__shortcut\">\n\t\t\t\t\t\t{ displayShortcut.primary( 'k' ) }\n\t\t\t\t\t</span>\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Custom hook to get the page type badge for the current post on edit site view.\n *\n * @param {number|string} postId postId of the current post being edited.\n */\nexport default function usePageTypeBadge( postId ) {\n\tconst { isFrontPage, isPostsPage } = useSelect( ( select ) => {\n\t\tconst { canUser, getEditedEntityRecord } = select( coreStore );\n\t\tconst siteSettings = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? getEditedEntityRecord( 'root', 'site' )\n\t\t\t: undefined;\n\n\t\tconst _postId = parseInt( postId, 10 );\n\n\t\treturn {\n\t\t\tisFrontPage: siteSettings?.page_on_front === _postId,\n\t\t\tisPostsPage: siteSettings?.page_for_posts === _postId,\n\t\t};\n\t} );\n\n\tif ( isFrontPage ) {\n\t\treturn __( 'Homepage' );\n\t} else if ( isPostsPage ) {\n\t\treturn __( 'Posts Page' );\n\t}\n\n\treturn false;\n}\n", "/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { ESCAPE } from '@wordpress/keycodes';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { closeSmall } from '@wordpress/icons';\nimport { useFocusOnMount, useFocusReturn } from '@wordpress/compose';\nimport { store as preferencesStore } from '@wordpress/preferences';\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport StylesCanvasStyleBook from './style-book';\nimport StylesCanvasRevisions from './revisions';\nimport { store as editorStore } from '../../store';\nimport ResizableEditor from '../resizable-editor';\n\n/**\n * Helper function to get the title for the styles canvas based on current state.\n *\n * @param {string} path Current styles path.\n * @param {boolean} showStylebook Whether stylebook is visible.\n * @return {string} Translated string for the canvas title.\n */\nexport function getStylesCanvasTitle( path, showStylebook ) {\n\tif ( showStylebook ) {\n\t\treturn __( 'Style Book' );\n\t}\n\tif ( path?.startsWith( '/revisions' ) ) {\n\t\treturn __( 'Style Revisions' );\n\t}\n\treturn '';\n}\n\n/**\n * Styles canvas component - orchestrates rendering of style book and revisions.\n * Determines what content to show based on global styles navigation state.\n *\n * @return {JSX.Element|null} The styles canvas or null if nothing to render.\n */\nexport default function StylesCanvas() {\n\tconst { stylesPath, showStylebook, showListViewByDefault } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getStylesPath, getShowStylebook } = unlock(\n\t\t\t\tselect( editorStore )\n\t\t\t);\n\n\t\t\tconst _showListViewByDefault = select( preferencesStore ).get(\n\t\t\t\t'core',\n\t\t\t\t'showListViewByDefault'\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tstylesPath: getStylesPath(),\n\t\t\t\tshowStylebook: getShowStylebook(),\n\t\t\t\tshowListViewByDefault: _showListViewByDefault,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst { resetStylesNavigation, setStylesPath } = unlock(\n\t\tuseDispatch( editorStore )\n\t);\n\tconst { setIsListViewOpened } = useDispatch( editorStore );\n\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\tconst sectionFocusReturnRef = useFocusReturn();\n\n\t// Determine what content to render\n\tlet content = null;\n\n\tif ( showStylebook ) {\n\t\tcontent = (\n\t\t\t<StylesCanvasStyleBook\n\t\t\t\tpath={ stylesPath }\n\t\t\t\tonPathChange={ setStylesPath }\n\t\t\t\tref={ sectionFocusReturnRef }\n\t\t\t/>\n\t\t);\n\t} else if ( stylesPath?.startsWith( '/revisions' ) ) {\n\t\tcontent = (\n\t\t\t<StylesCanvasRevisions\n\t\t\t\tpath={ stylesPath }\n\t\t\t\tref={ sectionFocusReturnRef }\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst title = getStylesCanvasTitle( stylesPath, showStylebook );\n\tconst onCloseCanvas = () => {\n\t\tsetIsListViewOpened( showListViewByDefault );\n\t\tresetStylesNavigation();\n\t};\n\n\tconst closeOnEscape = ( event ) => {\n\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\tevent.preventDefault();\n\t\t\tonCloseCanvas();\n\t\t}\n\t};\n\n\treturn (\n\t\t<div className=\"editor-styles-canvas\">\n\t\t\t<ResizableEditor enableResizing={ false }>\n\t\t\t\t{ /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */ }\n\t\t\t\t<section\n\t\t\t\t\tclassName=\"editor-styles-canvas__section\"\n\t\t\t\t\tref={ focusOnMountRef }\n\t\t\t\t\tonKeyDown={ closeOnEscape }\n\t\t\t\t\taria-label={ title }\n\t\t\t\t>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tclassName=\"editor-styles-canvas__close-button\"\n\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\tlabel={ __( 'Close' ) }\n\t\t\t\t\t\tonClick={ onCloseCanvas }\n\t\t\t\t\t/>\n\t\t\t\t\t{ content }\n\t\t\t\t</section>\n\t\t\t</ResizableEditor>\n\t\t</div>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport StyleBook from '../style-book';\nimport { STYLE_BOOK_COLOR_GROUPS } from '../style-book/constants';\n\n/**\n * Style Book content component for global styles.\n * Provides the business logic for StyleBook behavior in the global styles context.\n *\n * @param {Object} props Component props.\n * @param {string} props.path Current path in global styles.\n * @param {Function} props.onPathChange Callback when the path changes.\n * @param {import('react').ForwardedRef} ref Ref to the Style Book component.\n * @return {JSX.Element} The Style Book component.\n */\nfunction StylesCanvasStyleBook( { path, onPathChange }, ref ) {\n\treturn (\n\t\t<StyleBook\n\t\t\tref={ ref }\n\t\t\tisSelected={ ( blockName ) =>\n\t\t\t\t// Match '/blocks/core%2Fbutton' and\n\t\t\t\t// '/blocks/core%2Fbutton/typography', but not\n\t\t\t\t// '/blocks/core%2Fbuttons'.\n\t\t\t\tpath === `/blocks/${ encodeURIComponent( blockName ) }` ||\n\t\t\t\tpath?.startsWith(\n\t\t\t\t\t`/blocks/${ encodeURIComponent( blockName ) }/`\n\t\t\t\t)\n\t\t\t}\n\t\t\tonSelect={ ( blockName ) => {\n\t\t\t\tif (\n\t\t\t\t\tSTYLE_BOOK_COLOR_GROUPS.find(\n\t\t\t\t\t\t( group ) => group.slug === blockName\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\t// Go to color palettes Global Styles.\n\t\t\t\t\tonPathChange?.( '/colors/palette' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( blockName === 'typography' ) {\n\t\t\t\t\t// Go to typography Global Styles.\n\t\t\t\t\tonPathChange?.( '/typography' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Now go to the selected block.\n\t\t\t\tonPathChange?.( '/blocks/' + encodeURIComponent( blockName ) );\n\t\t\t} }\n\t\t/>\n\t);\n}\nexport default forwardRef( StylesCanvasStyleBook );\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tDisabled,\n\tComposite,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport {\n\tBlockList,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n\tuseSettings,\n\tBlockEditorProvider,\n\t__unstableEditorStyles as EditorStyles,\n\t__unstableIframe as Iframe,\n\t__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,\n} from '@wordpress/block-editor';\nimport { useSelect, dispatch } from '@wordpress/data';\nimport { mergeGlobalStyles } from '@wordpress/global-styles-engine';\nimport {\n\tuseMemo,\n\tuseState,\n\tmemo,\n\tuseRef,\n\tuseLayoutEffect,\n\tuseEffect,\n\tforwardRef,\n} from '@wordpress/element';\nimport { ENTER, SPACE } from '@wordpress/keycodes';\nimport { uploadMedia } from '@wordpress/media-utils';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { STYLE_BOOK_IFRAME_STYLES } from './constants';\nimport {\n\tgetExamplesByCategory,\n\tgetTopLevelStyleBookCategories,\n} from './categories';\nimport { getExamples } from './examples';\nimport { GlobalStylesRenderer } from '../global-styles-renderer';\nimport {\n\tSTYLE_BOOK_COLOR_GROUPS,\n\tSTYLE_BOOK_PREVIEW_CATEGORIES,\n} from '../style-book/constants';\nimport { useGlobalStylesOutputWithConfig } from '../../hooks/use-global-styles-output';\nimport { useStyle, useGlobalStyles } from '../global-styles';\nimport { store as editorStore } from '../../store';\n\nconst { ExperimentalBlockEditorProvider } = unlock( blockEditorPrivateApis );\nconst { Tabs } = unlock( componentsPrivateApis );\n\nfunction isObjectEmpty( object ) {\n\treturn ! object || Object.keys( object ).length === 0;\n}\n\n/**\n * Scrolls to a section within an iframe.\n *\n * @param {string} anchorId The id of the element to scroll to.\n * @param {HTMLIFrameElement} iframe The target iframe.\n */\nconst scrollToSection = ( anchorId, iframe ) => {\n\tif ( ! anchorId || ! iframe || ! iframe?.contentDocument ) {\n\t\treturn;\n\t}\n\n\tconst element =\n\t\tanchorId === 'top'\n\t\t\t? iframe.contentDocument.body\n\t\t\t: iframe.contentDocument.getElementById( anchorId );\n\tif ( element ) {\n\t\telement.scrollIntoView( {\n\t\t\tbehavior: 'smooth',\n\t\t} );\n\t}\n};\n\n/**\n * Parses a Block Editor navigation path to build a style book navigation path.\n * The object can be extended to include a category, representing a style book tab/section.\n *\n * @param {string} path An internal Block Editor navigation path.\n * @return {null|{block: string}} An object containing the example to navigate to.\n */\nconst getStyleBookNavigationFromPath = ( path ) => {\n\tif ( path && typeof path === 'string' ) {\n\t\tif (\n\t\t\tpath === '/' ||\n\t\t\tpath.startsWith( '/typography' ) ||\n\t\t\tpath.startsWith( '/colors' ) ||\n\t\t\tpath.startsWith( '/blocks' )\n\t\t) {\n\t\t\treturn {\n\t\t\t\ttop: true,\n\t\t\t};\n\t\t}\n\t}\n\treturn null;\n};\n\n/**\n * Retrieves colors, gradients, and duotone filters from Global Styles.\n * The inclusion of default (Core) palettes is controlled by the relevant\n * theme.json property e.g. defaultPalette, defaultGradients, defaultDuotone.\n *\n * @return {Object} Object containing properties for each type of palette.\n */\nfunction useMultiOriginPalettes() {\n\tconst { colors, gradients } = useMultipleOriginColorsAndGradients();\n\n\t// Add duotone filters to the palettes data.\n\tconst [\n\t\tshouldDisplayDefaultDuotones,\n\t\tcustomDuotones,\n\t\tthemeDuotones,\n\t\tdefaultDuotones,\n\t] = useSettings(\n\t\t'color.defaultDuotone',\n\t\t'color.duotone.custom',\n\t\t'color.duotone.theme',\n\t\t'color.duotone.default'\n\t);\n\n\tconst palettes = useMemo( () => {\n\t\tconst result = { colors, gradients, duotones: [] };\n\n\t\tif ( themeDuotones && themeDuotones.length ) {\n\t\t\tresult.duotones.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Theme',\n\t\t\t\t\t'Indicates these duotone filters come from the theme.'\n\t\t\t\t),\n\t\t\t\tslug: 'theme',\n\t\t\t\tduotones: themeDuotones,\n\t\t\t} );\n\t\t}\n\n\t\tif (\n\t\t\tshouldDisplayDefaultDuotones &&\n\t\t\tdefaultDuotones &&\n\t\t\tdefaultDuotones.length\n\t\t) {\n\t\t\tresult.duotones.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Default',\n\t\t\t\t\t'Indicates these duotone filters come from WordPress.'\n\t\t\t\t),\n\t\t\t\tslug: 'default',\n\t\t\t\tduotones: defaultDuotones,\n\t\t\t} );\n\t\t}\n\t\tif ( customDuotones && customDuotones.length ) {\n\t\t\tresult.duotones.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Custom',\n\t\t\t\t\t'Indicates these doutone filters are created by the user.'\n\t\t\t\t),\n\t\t\t\tslug: 'custom',\n\t\t\t\tduotones: customDuotones,\n\t\t\t} );\n\t\t}\n\n\t\treturn result;\n\t}, [\n\t\tcolors,\n\t\tgradients,\n\t\tcustomDuotones,\n\t\tthemeDuotones,\n\t\tdefaultDuotones,\n\t\tshouldDisplayDefaultDuotones,\n\t] );\n\n\treturn palettes;\n}\n\n/**\n * Get deduped examples for single page stylebook.\n * @param {Array} examples Array of examples.\n * @return {Array} Deduped examples.\n */\nexport function getExamplesForSinglePageUse( examples ) {\n\tconst examplesForSinglePageUse = [];\n\tconst overviewCategoryExamples = getExamplesByCategory(\n\t\t{ slug: 'overview' },\n\t\texamples\n\t);\n\texamplesForSinglePageUse.push( ...overviewCategoryExamples.examples );\n\tconst otherExamples = examples.filter( ( example ) => {\n\t\treturn (\n\t\t\texample.category !== 'overview' &&\n\t\t\t! overviewCategoryExamples.examples.find(\n\t\t\t\t( overviewExample ) => overviewExample.name === example.name\n\t\t\t)\n\t\t);\n\t} );\n\texamplesForSinglePageUse.push( ...otherExamples );\n\n\treturn examplesForSinglePageUse;\n}\n\n/**\n * Applies a block variation to each example by updating its attributes.\n *\n * @param {Array} examples Array of examples\n * @param {string} variation Block variation name.\n * @return {Array} Updated examples with variation applied.\n */\nfunction applyBlockVariationsToExamples( examples, variation ) {\n\tif ( ! variation ) {\n\t\treturn examples;\n\t}\n\treturn examples.map( ( example ) => {\n\t\treturn {\n\t\t\t...example,\n\t\t\tvariation,\n\t\t\tblocks: Array.isArray( example.blocks )\n\t\t\t\t? example.blocks.map( ( block ) => ( {\n\t\t\t\t\t\t...block,\n\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t...block.attributes,\n\t\t\t\t\t\t\tstyle: undefined,\n\t\t\t\t\t\t\tclassName: `is-style-${ variation }`,\n\t\t\t\t\t\t},\n\t\t\t\t } ) )\n\t\t\t\t: {\n\t\t\t\t\t\t...example.blocks,\n\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t...example.blocks.attributes,\n\t\t\t\t\t\t\tstyle: undefined,\n\t\t\t\t\t\t\tclassName: `is-style-${ variation }`,\n\t\t\t\t\t\t},\n\t\t\t\t },\n\t\t};\n\t} );\n}\n\nfunction StyleBook(\n\t{\n\t\tisSelected,\n\t\tonClick,\n\t\tonSelect,\n\t\tshowTabs = true,\n\t\tuserConfig = {},\n\t\tpath = '',\n\t},\n\tref\n) {\n\tconst textColor = useStyle( 'color.text' );\n\tconst backgroundColor = useStyle( 'color.background' );\n\tconst colors = useMultiOriginPalettes();\n\tconst examples = useMemo( () => getExamples( colors ), [ colors ] );\n\tconst tabs = useMemo(\n\t\t() =>\n\t\t\tgetTopLevelStyleBookCategories().filter( ( category ) =>\n\t\t\t\texamples.some(\n\t\t\t\t\t( example ) => example.category === category.slug\n\t\t\t\t)\n\t\t\t),\n\t\t[ examples ]\n\t);\n\n\tconst examplesForSinglePageUse = getExamplesForSinglePageUse( examples );\n\n\tconst { base: baseConfig } = useGlobalStyles();\n\tconst goTo = getStyleBookNavigationFromPath( path );\n\n\tconst mergedConfig = useMemo( () => {\n\t\tif ( ! isObjectEmpty( userConfig ) && ! isObjectEmpty( baseConfig ) ) {\n\t\t\treturn mergeGlobalStyles( baseConfig, userConfig );\n\t\t}\n\t\treturn {};\n\t}, [ baseConfig, userConfig ] );\n\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\tconst [ globalStyles ] = useGlobalStylesOutputWithConfig( mergedConfig );\n\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\t...originalSettings,\n\t\t\tstyles:\n\t\t\t\t! isObjectEmpty( globalStyles ) && ! isObjectEmpty( userConfig )\n\t\t\t\t\t? globalStyles\n\t\t\t\t\t: originalSettings.styles,\n\t\t\tisPreviewMode: true,\n\t\t} ),\n\t\t[ globalStyles, originalSettings, userConfig ]\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tref={ ref }\n\t\t\tclassName={ clsx( 'editor-style-book', {\n\t\t\t\t'is-button': !! onClick,\n\t\t\t} ) }\n\t\t\tstyle={ {\n\t\t\t\tcolor: textColor,\n\t\t\t\tbackground: backgroundColor,\n\t\t\t} }\n\t\t>\n\t\t\t{ showTabs ? (\n\t\t\t\t<Tabs>\n\t\t\t\t\t<div className=\"editor-style-book__tablist-container\">\n\t\t\t\t\t\t<Tabs.TabList>\n\t\t\t\t\t\t\t{ tabs.map( ( tab ) => (\n\t\t\t\t\t\t\t\t<Tabs.Tab tabId={ tab.slug } key={ tab.slug }>\n\t\t\t\t\t\t\t\t\t{ tab.title }\n\t\t\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t</Tabs.TabList>\n\t\t\t\t\t</div>\n\t\t\t\t\t{ tabs.map( ( tab ) => {\n\t\t\t\t\t\tconst categoryDefinition = tab.slug\n\t\t\t\t\t\t\t? getTopLevelStyleBookCategories().find(\n\t\t\t\t\t\t\t\t\t( _category ) => _category.slug === tab.slug\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: null;\n\t\t\t\t\t\tconst filteredExamples = categoryDefinition\n\t\t\t\t\t\t\t? getExamplesByCategory(\n\t\t\t\t\t\t\t\t\tcategoryDefinition,\n\t\t\t\t\t\t\t\t\texamples\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: { examples };\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\t\t\t\tkey={ tab.slug }\n\t\t\t\t\t\t\t\ttabId={ tab.slug }\n\t\t\t\t\t\t\t\tfocusable={ false }\n\t\t\t\t\t\t\t\tclassName=\"editor-style-book__tabpanel\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<StyleBookBody\n\t\t\t\t\t\t\t\t\tcategory={ tab.slug }\n\t\t\t\t\t\t\t\t\texamples={ filteredExamples }\n\t\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\t\t\t\ttitle={ tab.title }\n\t\t\t\t\t\t\t\t\tgoTo={ goTo }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t\t\t);\n\t\t\t\t\t} ) }\n\t\t\t\t</Tabs>\n\t\t\t) : (\n\t\t\t\t<StyleBookBody\n\t\t\t\t\texamples={ { examples: examplesForSinglePageUse } }\n\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tgoTo={ goTo }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\n/**\n * Style Book Preview component renders the stylebook without the Editor dependency.\n *\n * @param {Object} props Component props.\n * @param {string} props.path Current path in global styles.\n * @param {Function} props.onPathChange Callback when the path changes.\n * @param {Object} props.userConfig User configuration.\n * @param {boolean} props.isStatic Whether the stylebook is static or clickable.\n * @return {Object} Style Book Preview component.\n */\nexport const StyleBookPreview = ( {\n\tuserConfig = {},\n\tisStatic = false,\n\tpath,\n\tonPathChange,\n} ) => {\n\tconst editorSettings = useSelect(\n\t\t( select ) => select( editorStore ).getEditorSettings(),\n\t\t[]\n\t);\n\n\tconst canUserUploadMedia = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'attachment',\n\t\t\t} ),\n\t\t[]\n\t);\n\n\t// Update block editor settings because useMultipleOriginColorsAndGradients fetch colours from there.\n\tuseEffect( () => {\n\t\tdispatch( blockEditorStore ).updateSettings( {\n\t\t\t...editorSettings,\n\t\t\tmediaUpload: canUserUploadMedia ? uploadMedia : undefined,\n\t\t} );\n\t}, [ editorSettings, canUserUploadMedia ] );\n\n\tconst [ internalPath, setInternalPath ] = useState( '/' );\n\tconst section = path ?? internalPath;\n\tconst onChangeSection = onPathChange ?? setInternalPath;\n\n\tconst isSelected = ( blockName ) => {\n\t\t// Match '/blocks/core%2Fbutton' and\n\t\t// '/blocks/core%2Fbutton/typography', but not\n\t\t// '/blocks/core%2Fbuttons'.\n\t\treturn (\n\t\t\tsection === `/blocks/${ encodeURIComponent( blockName ) }` ||\n\t\t\tsection.startsWith(\n\t\t\t\t`/blocks/${ encodeURIComponent( blockName ) }/`\n\t\t\t)\n\t\t);\n\t};\n\n\tconst onSelect = ( blockName, isBlockVariation = false ) => {\n\t\tif (\n\t\t\tSTYLE_BOOK_COLOR_GROUPS.find(\n\t\t\t\t( group ) => group.slug === blockName\n\t\t\t)\n\t\t) {\n\t\t\t// Go to color palettes Global Styles.\n\t\t\tonChangeSection( '/colors/palette' );\n\t\t\treturn;\n\t\t}\n\t\tif ( blockName === 'typography' ) {\n\t\t\t// Go to typography Global Styles.\n\t\t\tonChangeSection( '/typography' );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isBlockVariation ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Now go to the selected block.\n\t\tonChangeSection( `/blocks/${ encodeURIComponent( blockName ) }` );\n\t};\n\n\tconst colors = useMultiOriginPalettes();\n\tconst examples = getExamples( colors );\n\tconst examplesForSinglePageUse = getExamplesForSinglePageUse( examples );\n\n\tlet previewCategory = null;\n\tlet blockVariation = null;\n\tif ( section.includes( '/colors' ) ) {\n\t\tpreviewCategory = 'colors';\n\t} else if ( section.includes( '/typography' ) ) {\n\t\tpreviewCategory = 'text';\n\t} else if ( section.includes( '/blocks' ) ) {\n\t\tpreviewCategory = 'blocks';\n\t\tlet blockName = decodeURIComponent( section ).split( '/blocks/' )[ 1 ];\n\n\t\t// The blockName can contain variations, if so, extract the variation.\n\t\tif ( blockName?.includes( '/variations' ) ) {\n\t\t\t[ blockName, blockVariation ] = blockName.split( '/variations/' );\n\t\t}\n\n\t\tif (\n\t\t\tblockName &&\n\t\t\texamples.find( ( example ) => example.name === blockName )\n\t\t) {\n\t\t\tpreviewCategory = blockName;\n\t\t}\n\t} else if ( ! isStatic ) {\n\t\tpreviewCategory = 'overview';\n\t}\n\tconst categoryDefinition = STYLE_BOOK_PREVIEW_CATEGORIES.find(\n\t\t( category ) => category.slug === previewCategory\n\t);\n\n\tconst filteredExamples = useMemo( () => {\n\t\t// If there's no category definition there may be a single block.\n\t\tif ( ! categoryDefinition ) {\n\t\t\treturn {\n\t\t\t\texamples: [\n\t\t\t\t\texamples.find(\n\t\t\t\t\t\t( example ) => example.name === previewCategory\n\t\t\t\t\t),\n\t\t\t\t],\n\t\t\t};\n\t\t}\n\n\t\treturn getExamplesByCategory( categoryDefinition, examples );\n\t}, [ categoryDefinition, examples, previewCategory ] );\n\n\tconst displayedExamples = useMemo( () => {\n\t\t// If there's no preview category, show all examples.\n\t\tif ( ! previewCategory ) {\n\t\t\treturn { examples: examplesForSinglePageUse };\n\t\t}\n\n\t\tif ( blockVariation ) {\n\t\t\treturn {\n\t\t\t\texamples: applyBlockVariationsToExamples(\n\t\t\t\t\tfilteredExamples.examples,\n\t\t\t\t\tblockVariation\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\n\t\treturn filteredExamples;\n\t}, [\n\t\tpreviewCategory,\n\t\texamplesForSinglePageUse,\n\t\tblockVariation,\n\t\tfilteredExamples,\n\t] );\n\n\tconst { base: baseConfig } = useGlobalStyles();\n\tconst goTo = getStyleBookNavigationFromPath( section );\n\n\tconst mergedConfig = useMemo( () => {\n\t\tif ( ! isObjectEmpty( userConfig ) && ! isObjectEmpty( baseConfig ) ) {\n\t\t\treturn mergeGlobalStyles( baseConfig, userConfig );\n\t\t}\n\t\treturn {};\n\t}, [ baseConfig, userConfig ] );\n\n\tconst [ globalStyles ] = useGlobalStylesOutputWithConfig( mergedConfig );\n\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\t...editorSettings,\n\t\t\tstyles:\n\t\t\t\t! isObjectEmpty( globalStyles ) && ! isObjectEmpty( userConfig )\n\t\t\t\t\t? globalStyles\n\t\t\t\t\t: editorSettings.styles,\n\t\t\tisPreviewMode: true,\n\t\t} ),\n\t\t[ globalStyles, editorSettings, userConfig ]\n\t);\n\n\treturn (\n\t\t<div className=\"editor-style-book\">\n\t\t\t<BlockEditorProvider settings={ settings }>\n\t\t\t\t<GlobalStylesRenderer disableRootPadding />\n\t\t\t\t<StyleBookBody\n\t\t\t\t\texamples={ displayedExamples }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tgoTo={ goTo }\n\t\t\t\t\tisSelected={ ! isStatic ? isSelected : null }\n\t\t\t\t\tonSelect={ ! isStatic ? onSelect : null }\n\t\t\t\t/>\n\t\t\t</BlockEditorProvider>\n\t\t</div>\n\t);\n};\n\nexport const StyleBookBody = ( {\n\texamples,\n\tisSelected,\n\tonClick,\n\tonSelect,\n\tsettings,\n\ttitle,\n\tgoTo,\n} ) => {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst [ hasIframeLoaded, setHasIframeLoaded ] = useState( false );\n\tconst iframeRef = useRef( null );\n\t// The presence of an `onClick` prop indicates that the Style Book is being used as a button.\n\t// In this case, add additional props to the iframe to make it behave like a button.\n\tconst buttonModeProps = {\n\t\trole: 'button',\n\t\tonFocus: () => setIsFocused( true ),\n\t\tonBlur: () => setIsFocused( false ),\n\t\tonKeyDown: ( event ) => {\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { keyCode } = event;\n\t\t\tif ( onClick && ( keyCode === ENTER || keyCode === SPACE ) ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tonClick( event );\n\t\t\t}\n\t\t},\n\t\tonClick: ( event ) => {\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( onClick ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tonClick( event );\n\t\t\t}\n\t\t},\n\t\treadonly: true,\n\t};\n\n\tconst handleLoad = () => setHasIframeLoaded( true );\n\tuseLayoutEffect( () => {\n\t\tif ( hasIframeLoaded && iframeRef.current && goTo?.top ) {\n\t\t\tscrollToSection( 'top', iframeRef.current );\n\t\t}\n\t}, [ goTo?.top, hasIframeLoaded ] );\n\n\treturn (\n\t\t<Iframe\n\t\t\tonLoad={ handleLoad }\n\t\t\tref={ iframeRef }\n\t\t\tclassName={ clsx( 'editor-style-book__iframe', {\n\t\t\t\t'is-focused': isFocused && !! onClick,\n\t\t\t\t'is-button': !! onClick,\n\t\t\t} ) }\n\t\t\tname=\"style-book-canvas\"\n\t\t\ttabIndex={ 0 }\n\t\t\t{ ...( onClick ? buttonModeProps : {} ) }\n\t\t>\n\t\t\t<EditorStyles styles={ settings.styles } />\n\t\t\t<style>\n\t\t\t\t{ STYLE_BOOK_IFRAME_STYLES }\n\t\t\t\t{ !! onClick &&\n\t\t\t\t\t'body { cursor: pointer; } body * { pointer-events: none; }' }\n\t\t\t</style>\n\t\t\t<Examples\n\t\t\t\tclassName=\"editor-style-book__examples\"\n\t\t\t\tfilteredExamples={ examples }\n\t\t\t\tlabel={\n\t\t\t\t\ttitle\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Category of blocks, e.g. Text.\n\t\t\t\t\t\t\t\t__( 'Examples of blocks in the %s category' ),\n\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: __( 'Examples of blocks' )\n\t\t\t\t}\n\t\t\t\tisSelected={ isSelected }\n\t\t\t\tonSelect={ onSelect }\n\t\t\t\tkey={ title }\n\t\t\t/>\n\t\t</Iframe>\n\t);\n};\n\nconst Examples = memo(\n\t( { className, filteredExamples, label, isSelected, onSelect } ) => {\n\t\treturn (\n\t\t\t<Composite\n\t\t\t\torientation=\"vertical\"\n\t\t\t\tclassName={ className }\n\t\t\t\taria-label={ label }\n\t\t\t\trole=\"grid\"\n\t\t\t>\n\t\t\t\t{ !! filteredExamples?.examples?.length &&\n\t\t\t\t\tfilteredExamples.examples.map( ( example ) => (\n\t\t\t\t\t\t<Example\n\t\t\t\t\t\t\tkey={ example.name }\n\t\t\t\t\t\t\tid={ `example-${ example.name }` }\n\t\t\t\t\t\t\ttitle={ example.title }\n\t\t\t\t\t\t\tcontent={ example.content }\n\t\t\t\t\t\t\tblocks={ example.blocks }\n\t\t\t\t\t\t\tisSelected={ isSelected?.( example.name ) }\n\t\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\t\t!! onSelect\n\t\t\t\t\t\t\t\t\t? () =>\n\t\t\t\t\t\t\t\t\t\t\tonSelect(\n\t\t\t\t\t\t\t\t\t\t\t\texample.name,\n\t\t\t\t\t\t\t\t\t\t\t\t!! example.variation\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t{ !! filteredExamples?.subcategories?.length &&\n\t\t\t\t\tfilteredExamples.subcategories.map( ( subcategory ) => (\n\t\t\t\t\t\t<Composite.Group\n\t\t\t\t\t\t\tclassName=\"editor-style-book__subcategory\"\n\t\t\t\t\t\t\tkey={ `subcategory-${ subcategory.slug }` }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Composite.GroupLabel>\n\t\t\t\t\t\t\t\t<h2 className=\"editor-style-book__subcategory-title\">\n\t\t\t\t\t\t\t\t\t{ subcategory.title }\n\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t</Composite.GroupLabel>\n\t\t\t\t\t\t\t<Subcategory\n\t\t\t\t\t\t\t\texamples={ subcategory.examples }\n\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Composite.Group>\n\t\t\t\t\t) ) }\n\t\t\t</Composite>\n\t\t);\n\t}\n);\n\nconst Subcategory = ( { examples, isSelected, onSelect } ) => {\n\treturn (\n\t\t!! examples?.length &&\n\t\texamples.map( ( example ) => (\n\t\t\t<Example\n\t\t\t\tkey={ example.name }\n\t\t\t\tid={ `example-${ example.name }` }\n\t\t\t\ttitle={ example.title }\n\t\t\t\tcontent={ example.content }\n\t\t\t\tblocks={ example.blocks }\n\t\t\t\tisSelected={ isSelected?.( example.name ) }\n\t\t\t\tonClick={ !! onSelect ? () => onSelect( example.name ) : null }\n\t\t\t/>\n\t\t) )\n\t);\n};\n\nconst disabledExamples = [ 'example-duotones' ];\n\nconst Example = ( { id, title, blocks, isSelected, onClick, content } ) => {\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\t...originalSettings,\n\t\t\tfocusMode: false, // Disable \"Spotlight mode\".\n\t\t\tisPreviewMode: true,\n\t\t} ),\n\t\t[ originalSettings ]\n\t);\n\n\t// Cache the list of blocks to avoid additional processing when the component is re-rendered.\n\tconst renderedBlocks = useMemo(\n\t\t() => ( Array.isArray( blocks ) ? blocks : [ blocks ] ),\n\t\t[ blocks ]\n\t);\n\n\tconst disabledProps =\n\t\tdisabledExamples.includes( id ) || ! onClick\n\t\t\t? {\n\t\t\t\t\tdisabled: true,\n\t\t\t\t\taccessibleWhenDisabled: !! onClick,\n\t\t\t }\n\t\t\t: {};\n\n\treturn (\n\t\t<div role=\"row\">\n\t\t\t<div role=\"gridcell\">\n\t\t\t\t<Composite.Item\n\t\t\t\t\tclassName={ clsx( 'editor-style-book__example', {\n\t\t\t\t\t\t'is-selected': isSelected,\n\t\t\t\t\t\t'is-disabled-example': !! disabledProps?.disabled,\n\t\t\t\t\t} ) }\n\t\t\t\t\tid={ id }\n\t\t\t\t\taria-label={\n\t\t\t\t\t\t!! onClick\n\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t// translators: %s: Title of a block, e.g. Heading.\n\t\t\t\t\t\t\t\t\t__( 'Open %s styles in Styles panel' ),\n\t\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t\trender={ <div /> }\n\t\t\t\t\trole={ !! onClick ? 'button' : null }\n\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t{ ...disabledProps }\n\t\t\t\t>\n\t\t\t\t\t<span className=\"editor-style-book__example-title\">\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</span>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName=\"editor-style-book__example-preview\"\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t>\n\t\t\t\t\t\t<Disabled className=\"editor-style-book__example-preview__content\">\n\t\t\t\t\t\t\t{ content ? (\n\t\t\t\t\t\t\t\tcontent\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<ExperimentalBlockEditorProvider\n\t\t\t\t\t\t\t\t\tvalue={ renderedBlocks }\n\t\t\t\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<EditorStyles />\n\t\t\t\t\t\t\t\t\t<BlockList renderAppender={ false } />\n\t\t\t\t\t\t\t\t</ExperimentalBlockEditorProvider>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Disabled>\n\t\t\t\t\t</div>\n\t\t\t\t</Composite.Item>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default forwardRef( StyleBook );\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { StyleBookCategory, StyleBookColorGroup } from './types';\n\nexport const STYLE_BOOK_COLOR_GROUPS: StyleBookColorGroup[] = [\n\t{\n\t\tslug: 'theme-colors',\n\t\ttitle: __( 'Theme Colors' ),\n\t\torigin: 'theme',\n\t\ttype: 'colors',\n\t},\n\t{\n\t\tslug: 'theme-gradients',\n\t\ttitle: __( 'Theme Gradients' ),\n\t\torigin: 'theme',\n\t\ttype: 'gradients',\n\t},\n\t{\n\t\tslug: 'custom-colors',\n\t\ttitle: __( 'Custom Colors' ),\n\t\torigin: 'custom',\n\t\ttype: 'colors',\n\t},\n\t{\n\t\tslug: 'custom-gradients',\n\t\ttitle: __( 'Custom Gradients' ),\n\t\torigin: 'custom', // User.\n\t\ttype: 'gradients',\n\t},\n\t{\n\t\tslug: 'duotones',\n\t\ttitle: __( 'Duotones' ),\n\t\torigin: 'theme',\n\t\ttype: 'duotones',\n\t},\n\t{\n\t\tslug: 'default-colors',\n\t\ttitle: __( 'Default Colors' ),\n\t\torigin: 'default',\n\t\ttype: 'colors',\n\t},\n\t{\n\t\tslug: 'default-gradients',\n\t\ttitle: __( 'Default Gradients' ),\n\t\torigin: 'default',\n\t\ttype: 'gradients',\n\t},\n];\n\nexport const STYLE_BOOK_THEME_SUBCATEGORIES: Omit<\n\tStyleBookCategory,\n\t'subcategories'\n>[] = [\n\t{\n\t\tslug: 'site-identity',\n\t\ttitle: __( 'Site Identity' ),\n\t\tblocks: [ 'core/site-logo', 'core/site-title', 'core/site-tagline' ],\n\t},\n\t{\n\t\tslug: 'design',\n\t\ttitle: __( 'Design' ),\n\t\tblocks: [ 'core/navigation', 'core/avatar', 'core/post-time-to-read' ],\n\t\texclude: [ 'core/home-link', 'core/navigation-link' ],\n\t},\n\t{\n\t\tslug: 'posts',\n\t\ttitle: __( 'Posts' ),\n\t\tblocks: [\n\t\t\t'core/post-title',\n\t\t\t'core/post-excerpt',\n\t\t\t'core/post-author',\n\t\t\t'core/post-author-name',\n\t\t\t'core/post-author-biography',\n\t\t\t'core/post-date',\n\t\t\t'core/post-terms',\n\t\t\t'core/term-description',\n\t\t\t'core/query-title',\n\t\t\t'core/query-no-results',\n\t\t\t'core/query-pagination',\n\t\t\t'core/query-numbers',\n\t\t],\n\t},\n\t{\n\t\tslug: 'comments',\n\t\ttitle: __( 'Comments' ),\n\t\tblocks: [\n\t\t\t'core/comments-title',\n\t\t\t'core/comments-pagination',\n\t\t\t'core/comments-pagination-numbers',\n\t\t\t'core/comments',\n\t\t\t'core/comments-author-name',\n\t\t\t'core/comment-content',\n\t\t\t'core/comment-date',\n\t\t\t'core/comment-edit-link',\n\t\t\t'core/comment-reply-link',\n\t\t\t'core/comment-template',\n\t\t\t'core/post-comments-count',\n\t\t\t'core/post-comments-link',\n\t\t],\n\t},\n];\n\nexport const STYLE_BOOK_CATEGORIES: StyleBookCategory[] = [\n\t{\n\t\tslug: 'overview',\n\t\ttitle: __( 'Overview' ),\n\t\tblocks: [],\n\t},\n\t{\n\t\tslug: 'text',\n\t\ttitle: __( 'Text' ),\n\t\tblocks: [\n\t\t\t'core/post-content',\n\t\t\t'core/home-link',\n\t\t\t'core/navigation-link',\n\t\t],\n\t},\n\t{\n\t\tslug: 'colors',\n\t\ttitle: __( 'Colors' ),\n\t\tblocks: [],\n\t},\n\t{\n\t\tslug: 'theme',\n\t\ttitle: __( 'Theme' ),\n\t\tsubcategories: STYLE_BOOK_THEME_SUBCATEGORIES,\n\t},\n\t{\n\t\tslug: 'media',\n\t\ttitle: __( 'Media' ),\n\t\tblocks: [ 'core/post-featured-image' ],\n\t},\n\t{\n\t\tslug: 'widgets',\n\t\ttitle: __( 'Widgets' ),\n\t\tblocks: [],\n\t},\n\t{\n\t\tslug: 'embed',\n\t\ttitle: __( 'Embeds' ),\n\t\tinclude: [],\n\t},\n];\n\n// Style book preview subcategories for all blocks section.\nexport const STYLE_BOOK_ALL_BLOCKS_SUBCATEGORIES: StyleBookCategory[] = [\n\t...STYLE_BOOK_THEME_SUBCATEGORIES,\n\t{\n\t\tslug: 'media',\n\t\ttitle: __( 'Media' ),\n\t\tblocks: [ 'core/post-featured-image' ],\n\t},\n\t{\n\t\tslug: 'widgets',\n\t\ttitle: __( 'Widgets' ),\n\t\tblocks: [],\n\t},\n\t{\n\t\tslug: 'embed',\n\t\ttitle: __( 'Embeds' ),\n\t\tinclude: [],\n\t},\n];\n\n// Style book preview categories are organized slightly differently to the editor ones.\nexport const STYLE_BOOK_PREVIEW_CATEGORIES: StyleBookCategory[] = [\n\t{\n\t\tslug: 'overview',\n\t\ttitle: __( 'Overview' ),\n\t\tblocks: [],\n\t},\n\t{\n\t\tslug: 'text',\n\t\ttitle: __( 'Text' ),\n\t\tblocks: [\n\t\t\t'core/post-content',\n\t\t\t'core/home-link',\n\t\t\t'core/navigation-link',\n\t\t],\n\t},\n\t{\n\t\tslug: 'colors',\n\t\ttitle: __( 'Colors' ),\n\t\tblocks: [],\n\t},\n\t{\n\t\tslug: 'blocks',\n\t\ttitle: __( 'All Blocks' ),\n\t\tblocks: [],\n\t\tsubcategories: STYLE_BOOK_ALL_BLOCKS_SUBCATEGORIES,\n\t},\n];\n\n// Forming a \"block formatting context\" to prevent margin collapsing.\n// @see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context\nconst ROOT_CONTAINER = `\n\t.is-root-container {\n\t\tdisplay: flow-root;\n\t}\n`;\n// The content area of the Style Book is rendered within an iframe so that global styles\n// are applied to elements within the entire content area. To support elements that are\n// not part of the block previews, such as headings and layout for the block previews,\n// additional CSS rules need to be passed into the iframe. These are hard-coded below.\n// Note that button styles are unset, and then focus rules from the `Button` component are\n// applied to the `button` element, targeted via `.editor-style-book__example`.\n// This is to ensure that browser default styles for buttons are not applied to the previews.\nexport const STYLE_BOOK_IFRAME_STYLES = `\n\tbody {\n\t\tposition: relative;\n\t\tpadding: 32px !important;\n\t}\n\n\t${ ROOT_CONTAINER }\n\n\t.editor-style-book__examples {\n\t\tmax-width: 1200px;\n\t\tmargin: 0 auto;\n\t}\n\n\t.editor-style-book__example {\n\t max-width: 900px;\n\t\tborder-radius: 2px;\n\t\tcursor: pointer;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 40px;\n\t\tpadding: 16px;\n\t\twidth: 100%;\n\t\tbox-sizing: border-box;\n\t\tscroll-margin-top: 32px;\n\t\tscroll-margin-bottom: 32px;\n\t\tmargin: 0 auto 40px auto;\n\t}\n\n\t.editor-style-book__example.is-selected {\n\t\tbox-shadow: 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));\n\t}\n\n\t.editor-style-book__example.is-disabled-example {\n\t\tpointer-events: none;\n\t}\n\n\t.editor-style-book__example:focus:not(:disabled) {\n\t\tbox-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));\n\t\toutline: 3px solid transparent;\n\t}\n\n\t.editor-style-book__duotone-example > div:first-child {\n\t\tdisplay: flex;\n\t\taspect-ratio: 16 / 9;\n\t\tgrid-row: span 1;\n\t\tgrid-column: span 2;\n\t}\n\t.editor-style-book__duotone-example img {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-fit: cover;\n\t}\n\t.editor-style-book__duotone-example > div:not(:first-child) {\n\t\theight: 20px;\n\t\tborder: 1px solid color-mix( in srgb, currentColor 10%, transparent );\n\t}\n\n\t.editor-style-book__color-example {\n\t\tborder: 1px solid color-mix( in srgb, currentColor 10%, transparent );\n\t}\n\n\t.editor-style-book__subcategory-title,\n\t.editor-style-book__example-title {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif;\n\t\tfont-size: 13px;\n\t\tfont-weight: normal;\n\t\tline-height: normal;\n\t\tmargin: 0;\n\t\ttext-align: left;\n\t\tpadding-top: 8px;\n\t\tborder-top: 1px solid color-mix( in srgb, currentColor 10%, transparent );\n\t\tcolor: color-mix( in srgb, currentColor 60%, transparent );\n\t}\n\n\t.editor-style-book__subcategory-title {\n\t\tfont-size: 16px;\n\t\tmargin-bottom: 40px;\n \tpadding-bottom: 8px;\n\t}\n\n\t.editor-style-book__example-preview {\n\t\twidth: 100%;\n\t}\n\n\t.editor-style-book__example-preview .block-editor-block-list__insertion-point,\n\t.editor-style-book__example-preview .block-list-appender {\n\t\tdisplay: none;\n\t}\n\t:where(.is-root-container > .wp-block:first-child) {\n\t\tmargin-top: 0;\n\t}\n\t:where(.is-root-container > .wp-block:last-child) {\n\t\tmargin-bottom: 0;\n\t}\n`;\n", "/**\n * WordPress dependencies\n */\n// @wordpress/blocks imports are not typed.\n// @ts-expect-error\nimport { getCategories } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tBlockExample,\n\tStyleBookCategory,\n\tCategoryExamples,\n} from './types';\nimport {\n\tSTYLE_BOOK_CATEGORIES,\n\tSTYLE_BOOK_THEME_SUBCATEGORIES,\n} from './constants';\n\n/**\n * Returns category examples for a given category definition and list of examples.\n * @param {StyleBookCategory} categoryDefinition The category definition.\n * @param {BlockExample[]} examples An array of block examples.\n * @return {CategoryExamples|undefined} An object containing the category examples.\n */\nexport function getExamplesByCategory(\n\tcategoryDefinition: StyleBookCategory,\n\texamples: BlockExample[]\n): CategoryExamples | undefined {\n\tif ( ! categoryDefinition?.slug || ! examples?.length ) {\n\t\treturn;\n\t}\n\tconst categories: CategoryExamples[] =\n\t\tcategoryDefinition?.subcategories ?? [];\n\tif ( categories.length ) {\n\t\treturn categories.reduce(\n\t\t\t( acc, subcategoryDefinition ) => {\n\t\t\t\tconst subcategoryExamples = getExamplesByCategory(\n\t\t\t\t\tsubcategoryDefinition,\n\t\t\t\t\texamples\n\t\t\t\t);\n\t\t\t\tif ( subcategoryExamples ) {\n\t\t\t\t\tif ( ! acc.subcategories ) {\n\t\t\t\t\t\tacc.subcategories = [];\n\t\t\t\t\t}\n\t\t\t\t\tacc.subcategories = [\n\t\t\t\t\t\t...acc.subcategories,\n\t\t\t\t\t\tsubcategoryExamples,\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\treturn acc;\n\t\t\t},\n\t\t\t{\n\t\t\t\ttitle: categoryDefinition.title,\n\t\t\t\tslug: categoryDefinition.slug,\n\t\t\t}\n\t\t);\n\t}\n\n\tconst blocksToInclude = categoryDefinition?.blocks || [];\n\tconst blocksToExclude = categoryDefinition?.exclude || [];\n\tconst categoryExamples = examples.filter( ( example ) => {\n\t\treturn (\n\t\t\t! blocksToExclude.includes( example.name ) &&\n\t\t\t( example.category === categoryDefinition.slug ||\n\t\t\t\tblocksToInclude.includes( example.name ) )\n\t\t);\n\t} );\n\n\tif ( ! categoryExamples.length ) {\n\t\treturn;\n\t}\n\n\treturn {\n\t\ttitle: categoryDefinition.title,\n\t\tslug: categoryDefinition.slug,\n\t\texamples: categoryExamples,\n\t};\n}\n\n/**\n * Returns category examples for a given category definition and list of examples.\n *\n * @return {StyleBookCategory[]} An array of top-level category definitions.\n */\nexport function getTopLevelStyleBookCategories(): StyleBookCategory[] {\n\tconst reservedCategories = [\n\t\t...STYLE_BOOK_THEME_SUBCATEGORIES,\n\t\t...STYLE_BOOK_CATEGORIES,\n\t].map( ( { slug } ) => slug );\n\tconst extraCategories: StyleBookCategory[] = getCategories();\n\tconst extraCategoriesFiltered = extraCategories.filter(\n\t\t( { slug } ) => ! reservedCategories.includes( slug )\n\t);\n\treturn [ ...STYLE_BOOK_CATEGORIES, ...extraCategoriesFiltered ];\n}\n", "/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tgetBlockType,\n\tgetBlockTypes,\n\tgetBlockFromExample,\n\tcreateBlock,\n\t// @wordpress/blocks imports are not typed.\n\t// @ts-expect-error\n} from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tBlockExample,\n\tColorOrigin,\n\tMultiOriginPalettes,\n\tBlockType,\n} from './types';\nimport ColorExamples from './color-examples';\nimport DuotoneExamples from './duotone-examples';\nimport { STYLE_BOOK_COLOR_GROUPS } from './constants';\n\n/**\n * Returns examples color examples for each origin\n * e.g. Core (Default), Theme, and User.\n *\n * @param {MultiOriginPalettes} colors Global Styles color palettes per origin.\n * @return {BlockExample[]} An array of color block examples.\n */\nfunction getColorExamples( colors: MultiOriginPalettes ): BlockExample[] {\n\tif ( ! colors ) {\n\t\treturn [];\n\t}\n\n\tconst examples: BlockExample[] = [];\n\n\tSTYLE_BOOK_COLOR_GROUPS.forEach( ( group ) => {\n\t\tconst palette = colors[ group.type as keyof MultiOriginPalettes ];\n\t\tconst paletteFiltered = Array.isArray( palette )\n\t\t\t? palette.find(\n\t\t\t\t\t( origin: ColorOrigin ) => origin.slug === group.origin\n\t\t\t )\n\t\t\t: undefined;\n\n\t\tif ( paletteFiltered?.[ group.type ] ) {\n\t\t\tconst example: BlockExample = {\n\t\t\t\tname: group.slug,\n\t\t\t\ttitle: group.title,\n\t\t\t\tcategory: 'colors',\n\t\t\t};\n\t\t\tif ( group.type === 'duotones' ) {\n\t\t\t\texample.content = (\n\t\t\t\t\t<DuotoneExamples\n\t\t\t\t\t\tduotones={ paletteFiltered[ group.type ] }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t\texamples.push( example );\n\t\t\t} else {\n\t\t\t\texample.content = (\n\t\t\t\t\t<ColorExamples\n\t\t\t\t\t\tcolors={ paletteFiltered[ group.type ] }\n\t\t\t\t\t\ttype={ group.type }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t\texamples.push( example );\n\t\t\t}\n\t\t}\n\t} );\n\n\treturn examples;\n}\n\n/**\n * Returns examples for the overview page.\n *\n * @param {MultiOriginPalettes} colors Global Styles color palettes per origin.\n * @return {BlockExample[]} An array of block examples.\n */\nfunction getOverviewBlockExamples(\n\tcolors: MultiOriginPalettes\n): BlockExample[] {\n\tconst examples: BlockExample[] = [];\n\n\t// Get theme palette from colors if they exist.\n\tconst themePalette = Array.isArray( colors?.colors )\n\t\t? colors.colors.find(\n\t\t\t\t( origin: ColorOrigin ) => origin.slug === 'theme'\n\t\t )\n\t\t: undefined;\n\n\tif ( themePalette ) {\n\t\tconst themeColorexample: BlockExample = {\n\t\t\tname: 'theme-colors',\n\t\t\ttitle: __( 'Colors' ),\n\t\t\tcategory: 'overview',\n\t\t\tcontent: (\n\t\t\t\t<ColorExamples\n\t\t\t\t\tcolors={ themePalette.colors }\n\t\t\t\t\ttype=\"colors\"\n\t\t\t\t\ttemplateColumns=\"repeat(auto-fill, minmax( 200px, 1fr ))\"\n\t\t\t\t\titemHeight=\"32px\"\n\t\t\t\t/>\n\t\t\t),\n\t\t};\n\n\t\texamples.push( themeColorexample );\n\t}\n\n\t// Get examples for typography blocks.\n\tconst typographyBlockExamples: BlockType[] = [];\n\n\tif ( getBlockType( 'core/heading' ) ) {\n\t\tconst headingBlock = createBlock( 'core/heading', {\n\t\t\t// translators: Typography example. Your local alphabet, numbers and some common special characters.\n\t\t\tcontent: __(\n\t\t\t\t`AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789X{(\u2026)},.-<>?!*&:/A@HELFO\u2122\u00A9`\n\t\t\t),\n\t\t\tlevel: 1,\n\t\t} );\n\t\ttypographyBlockExamples.push( headingBlock );\n\t}\n\n\tif ( getBlockType( 'core/paragraph' ) ) {\n\t\tconst firstParagraphBlock = createBlock( 'core/paragraph', {\n\t\t\tcontent: __(\n\t\t\t\t`A paragraph in a website refers to a distinct block of text that is used to present and organize information. It is a fundamental unit of content in web design and is typically composed of a group of related sentences or thoughts focused on a particular topic or idea. Paragraphs play a crucial role in improving the readability and user experience of a website. They break down the text into smaller, manageable chunks, allowing readers to scan the content more easily.`\n\t\t\t),\n\t\t} );\n\t\tconst secondParagraphBlock = createBlock( 'core/paragraph', {\n\t\t\tcontent: __(\n\t\t\t\t`Additionally, paragraphs help structure the flow of information and provide logical breaks between different concepts or pieces of information. In terms of formatting, paragraphs in websites are commonly denoted by a vertical gap or indentation between each block of text. This visual separation helps visually distinguish one paragraph from another, creating a clear and organized layout that guides the reader through the content smoothly.`\n\t\t\t),\n\t\t} );\n\n\t\tif ( getBlockType( 'core/group' ) ) {\n\t\t\tconst groupBlock = createBlock(\n\t\t\t\t'core/group',\n\t\t\t\t{\n\t\t\t\t\tlayout: {\n\t\t\t\t\t\ttype: 'grid',\n\t\t\t\t\t\tcolumnCount: 2,\n\t\t\t\t\t\tminimumColumnWidth: '12rem',\n\t\t\t\t\t},\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tspacing: {\n\t\t\t\t\t\t\tblockGap: '1.5rem',\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t[ firstParagraphBlock, secondParagraphBlock ]\n\t\t\t);\n\t\t\ttypographyBlockExamples.push( groupBlock );\n\t\t} else {\n\t\t\ttypographyBlockExamples.push( firstParagraphBlock );\n\t\t}\n\t}\n\n\tif ( !! typographyBlockExamples.length ) {\n\t\texamples.push( {\n\t\t\tname: 'typography',\n\t\t\ttitle: __( 'Typography' ),\n\t\t\tcategory: 'overview',\n\t\t\tblocks: typographyBlockExamples,\n\t\t} );\n\t}\n\n\tconst otherBlockExamples = [\n\t\t'core/image',\n\t\t'core/separator',\n\t\t'core/buttons',\n\t\t'core/quote',\n\t\t'core/search',\n\t];\n\n\t// Get examples for other blocks and put them in order of above array.\n\totherBlockExamples.forEach( ( blockName ) => {\n\t\tconst blockType = getBlockType( blockName );\n\t\tif ( blockType && blockType.example ) {\n\t\t\tconst blockExample: BlockExample = {\n\t\t\t\tname: blockName,\n\t\t\t\ttitle: blockType.title,\n\t\t\t\tcategory: 'overview',\n\t\t\t\t/*\n\t\t\t\t * CSS generated from style attributes will take precedence over global styles CSS,\n\t\t\t\t * so remove the style attribute from the example to ensure the example\n\t\t\t\t * demonstrates changes to global styles.\n\t\t\t\t */\n\t\t\t\tblocks: getBlockFromExample( blockName, {\n\t\t\t\t\t...blockType.example,\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\t...blockType.example.attributes,\n\t\t\t\t\t\tstyle: undefined,\n\t\t\t\t\t},\n\t\t\t\t} ),\n\t\t\t};\n\t\t\texamples.push( blockExample );\n\t\t}\n\t} );\n\n\treturn examples;\n}\n\n/**\n * Returns a list of examples for registered block types.\n *\n * @param {MultiOriginPalettes} colors Global styles colors grouped by origin e.g. Core, Theme, and User.\n * @return {BlockExample[]} An array of block examples.\n */\nexport function getExamples( colors: MultiOriginPalettes ): BlockExample[] {\n\tconst nonHeadingBlockExamples = getBlockTypes()\n\t\t.filter( ( blockType: BlockType ) => {\n\t\t\tconst { name, example, supports } = blockType;\n\t\t\treturn (\n\t\t\t\tname !== 'core/heading' &&\n\t\t\t\t!! example &&\n\t\t\t\tsupports?.inserter !== false\n\t\t\t);\n\t\t} )\n\t\t.map( ( blockType: BlockType ) => ( {\n\t\t\tname: blockType.name,\n\t\t\ttitle: blockType.title,\n\t\t\tcategory: blockType.category,\n\t\t\t/*\n\t\t\t * CSS generated from style attributes will take precedence over global styles CSS,\n\t\t\t * so remove the style attribute from the example to ensure the example\n\t\t\t * demonstrates changes to global styles.\n\t\t\t */\n\t\t\tblocks: getBlockFromExample( blockType.name, {\n\t\t\t\t...blockType.example,\n\t\t\t\tattributes: {\n\t\t\t\t\t...blockType.example.attributes,\n\t\t\t\t\tstyle: undefined,\n\t\t\t\t},\n\t\t\t} ),\n\t\t} ) );\n\tconst isHeadingBlockRegistered = !! getBlockType( 'core/heading' );\n\n\tif ( ! isHeadingBlockRegistered ) {\n\t\treturn nonHeadingBlockExamples;\n\t}\n\n\t// Use our own example for the Heading block so that we can show multiple\n\t// heading levels.\n\tconst headingsExample = {\n\t\tname: 'core/heading',\n\t\ttitle: __( 'Headings' ),\n\t\tcategory: 'text',\n\t\tblocks: [ 1, 2, 3, 4, 5, 6 ].map( ( level ) => {\n\t\t\treturn createBlock( 'core/heading', {\n\t\t\t\tcontent: sprintf(\n\t\t\t\t\t// translators: %d: heading level e.g: \"1\", \"2\", \"3\"\n\t\t\t\t\t__( 'Heading %d' ),\n\t\t\t\t\tlevel\n\t\t\t\t),\n\t\t\t\tlevel,\n\t\t\t} );\n\t\t} ),\n\t};\n\tconst colorExamples = getColorExamples( colors );\n\n\tconst overviewBlockExamples = getOverviewBlockExamples( colors );\n\n\treturn [\n\t\theadingsExample,\n\t\t...colorExamples,\n\t\t...nonHeadingBlockExamples,\n\t\t...overviewBlockExamples,\n\t];\n}\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalGrid as Grid } from '@wordpress/components';\nimport {\n\tgetColorClassName,\n\t__experimentalGetGradientClass,\n\t// @wordpress/block-editor imports are not typed.\n\t// @ts-expect-error\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport type { Color, Gradient, ColorExampleProps } from './types';\n\nconst ColorExamples = ( {\n\tcolors,\n\ttype,\n\ttemplateColumns = '1fr 1fr',\n\titemHeight = '52px',\n}: ColorExampleProps ): JSX.Element | null => {\n\tif ( ! colors ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Grid templateColumns={ templateColumns } rowGap={ 8 } columnGap={ 16 }>\n\t\t\t{ colors.map( ( color: Color | Gradient ) => {\n\t\t\t\tconst className =\n\t\t\t\t\ttype === 'gradients'\n\t\t\t\t\t\t? __experimentalGetGradientClass( color.slug )\n\t\t\t\t\t\t: getColorClassName( 'background-color', color.slug );\n\t\t\t\tconst classes = clsx(\n\t\t\t\t\t'editor-style-book__color-example',\n\t\t\t\t\tclassName\n\t\t\t\t);\n\n\t\t\t\treturn (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={ color.slug }\n\t\t\t\t\t\tclassName={ classes }\n\t\t\t\t\t\tstyle={ { height: itemHeight } }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Grid>\n\t);\n};\n\nexport default ColorExamples;\n", "/**\n * WordPress dependencies\n */\nimport { __experimentalGrid as Grid } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport type { Duotone } from './types';\n\nconst DuotoneExamples = ( {\n\tduotones,\n}: {\n\tduotones: Duotone[];\n} ): JSX.Element | null => {\n\tif ( ! duotones ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Grid columns={ 2 } rowGap={ 16 } columnGap={ 16 }>\n\t\t\t{ duotones.map( ( duotone: Duotone ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<Grid\n\t\t\t\t\t\tkey={ duotone.slug }\n\t\t\t\t\t\tclassName=\"editor-style-book__duotone-example\"\n\t\t\t\t\t\tcolumns={ 2 }\n\t\t\t\t\t\trowGap={ 8 }\n\t\t\t\t\t\tcolumnGap={ 8 }\n\t\t\t\t\t>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\talt={ `Duotone example: ${ duotone.slug }` }\n\t\t\t\t\t\t\t\tsrc=\"https://s.w.org/images/core/5.3/MtBlanc1.jpg\"\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\tfilter: `url(#wp-duotone-${ duotone.slug })`,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{ duotone.colors.map( ( color ) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tkey={ color }\n\t\t\t\t\t\t\t\t\tclassName=\"editor-style-book__color-example\"\n\t\t\t\t\t\t\t\t\tstyle={ { backgroundColor: color } }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t</Grid>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Grid>\n\t);\n};\n\nexport default DuotoneExamples;\n", "/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { useGlobalStylesOutput } from '../../hooks/use-global-styles-output';\n\nfunction useGlobalStylesRenderer( disableRootPadding ) {\n\tconst [ styles, settings ] = useGlobalStylesOutput( disableRootPadding );\n\tconst { getEditorSettings } = useSelect( editorStore );\n\tconst { updateEditorSettings } = useDispatch( editorStore );\n\n\tuseEffect( () => {\n\t\tif ( ! styles || ! settings ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentStoreSettings = getEditorSettings();\n\t\tconst nonGlobalStyles = Object.values(\n\t\t\tcurrentStoreSettings.styles ?? []\n\t\t).filter( ( style ) => ! style.isGlobalStyles );\n\t\tupdateEditorSettings( {\n\t\t\t...currentStoreSettings,\n\t\t\tstyles: [ ...nonGlobalStyles, ...styles ],\n\t\t\t__experimentalFeatures: settings,\n\t\t} );\n\t}, [ styles, settings, updateEditorSettings, getEditorSettings ] );\n}\n\nexport function GlobalStylesRenderer( { disableRootPadding } ) {\n\tuseGlobalStylesRenderer( disableRootPadding );\n\n\treturn null;\n}\n", "/**\n * WordPress dependencies\n */\nimport { getBlockTypes, store as blocksStore } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { generateGlobalStyles } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../store';\nimport { useSetting, useGlobalStyles } from '../components/global-styles';\n\n/**\n * Returns the global styles output based on the provided global styles config.\n *\n * @param {Object} mergedConfig The merged global styles config.\n * @param {boolean} disableRootPadding Disable root padding styles.\n *\n * @return {Array} Array of stylesheets and settings.\n */\nexport function useGlobalStylesOutputWithConfig(\n\tmergedConfig = {},\n\tdisableRootPadding = false\n) {\n\tconst blockGap = useSetting( 'spacing.blockGap' );\n\tconst hasBlockGapSupport = blockGap !== null;\n\tconst hasFallbackGapSupport = ! hasBlockGapSupport;\n\n\tconst { disableLayoutStyles, getBlockStyles } = useSelect( ( select ) => {\n\t\tconst { getEditorSettings } = select( editorStore );\n\t\tconst { getBlockStyles: getBlockStylesSelector } =\n\t\t\tselect( blocksStore );\n\t\tconst settings = getEditorSettings();\n\t\treturn {\n\t\t\tdisableLayoutStyles: !! settings?.disableLayoutStyles,\n\t\t\tgetBlockStyles: getBlockStylesSelector,\n\t\t};\n\t}, [] );\n\n\treturn useMemo( () => {\n\t\tif ( ! mergedConfig?.styles || ! mergedConfig?.settings ) {\n\t\t\treturn [ [], {} ];\n\t\t}\n\n\t\tconst blockTypes = getBlockTypes();\n\n\t\treturn generateGlobalStyles( mergedConfig, blockTypes, {\n\t\t\thasBlockGapSupport,\n\t\t\thasFallbackGapSupport,\n\t\t\tdisableLayoutStyles,\n\t\t\tdisableRootPadding,\n\t\t\tgetBlockStyles,\n\t\t} );\n\t}, [\n\t\thasBlockGapSupport,\n\t\thasFallbackGapSupport,\n\t\tmergedConfig,\n\t\tdisableLayoutStyles,\n\t\tdisableRootPadding,\n\t\tgetBlockStyles,\n\t] );\n}\n\n/**\n * Returns the global styles output based on the current state of global styles config loaded in the editor context.\n *\n * @param {boolean} disableRootPadding Disable root padding styles.\n *\n * @return {Array} Array of stylesheets and settings.\n */\nexport function useGlobalStylesOutput( disableRootPadding = false ) {\n\tconst { merged: mergedConfig } = useGlobalStyles();\n\treturn useGlobalStylesOutputWithConfig( mergedConfig, disableRootPadding );\n}\n", "/**\n * WordPress dependencies\n */\nimport { Disabled } from '@wordpress/components';\nimport {\n\tBlockList,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n\t__unstableEditorStyles as EditorStyles,\n\t__unstableIframe as Iframe,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo, forwardRef } from '@wordpress/element';\nimport { useGlobalStylesRevisions } from '@wordpress/global-styles-ui';\nimport { mergeGlobalStyles } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport { useGlobalStyles } from '../global-styles/hooks';\nimport { useGlobalStylesOutputWithConfig } from '../../hooks/use-global-styles-output';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tExperimentalBlockEditorProvider,\n\t__unstableBlockStyleVariationOverridesWithConfig,\n} = unlock( blockEditorPrivateApis );\n\nfunction isObjectEmpty( object ) {\n\treturn ! object || Object.keys( object ).length === 0;\n}\n\n/**\n * Revisions content component for global styles.\n * Coordinates with ScreenRevisions through the path parameter to display\n * the currently selected revision.\n *\n * @param {Object} props Component props.\n * @param {string} props.path Current path in global styles.\n * @param {import('react').ForwardedRef} ref Ref to the Revisions component.\n * @return {JSX.Element|null} The Revisions component or null if loading.\n */\nfunction StylesCanvasRevisions( { path }, ref ) {\n\tconst blocks = useSelect( ( select ) => {\n\t\t// This is not ideal: it's like a loop (reading from block-editor to render it).\n\t\treturn select( blockEditorStore ).getBlocks();\n\t}, [] );\n\tconst { user: userConfig, base: baseConfig } = useGlobalStyles();\n\n\t// Fetch all revisions (includes unsaved, parent, and enriched with authors)\n\tconst { revisions, isLoading } = useGlobalStylesRevisions();\n\n\t// Parse revision ID from path (e.g., \"/revisions/123\" -> \"123\")\n\tconst revisionId = useMemo( () => {\n\t\tconst match = path?.match( /^\\/revisions\\/(.+)$/ );\n\t\treturn match ? match[ 1 ] : null;\n\t}, [ path ] );\n\n\t// Find the selected revision from the fetched list\n\tconst selectedRevision = useMemo( () => {\n\t\tif ( ! revisionId || ! revisions.length ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn revisions.find(\n\t\t\t( rev ) => String( rev.id ) === String( revisionId )\n\t\t);\n\t}, [ revisionId, revisions ] );\n\n\t// Use the selected revision's config if available, otherwise use current user config\n\tconst displayConfig = selectedRevision || userConfig;\n\n\t// Merge the display config with the base config\n\tconst mergedConfig = useMemo( () => {\n\t\tif (\n\t\t\t! isObjectEmpty( displayConfig ) &&\n\t\t\t! isObjectEmpty( baseConfig )\n\t\t) {\n\t\t\treturn mergeGlobalStyles( baseConfig, displayConfig );\n\t\t}\n\t\treturn {};\n\t}, [ baseConfig, displayConfig ] );\n\n\tconst renderedBlocksArray = useMemo(\n\t\t() => ( Array.isArray( blocks ) ? blocks : [ blocks ] ),\n\t\t[ blocks ]\n\t);\n\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\t...originalSettings,\n\t\t\tisPreviewMode: true,\n\t\t} ),\n\t\t[ originalSettings ]\n\t);\n\n\tconst [ globalStyles ] = useGlobalStylesOutputWithConfig( mergedConfig );\n\n\tconst editorStyles =\n\t\t! isObjectEmpty( globalStyles ) && ! isObjectEmpty( displayConfig )\n\t\t\t? globalStyles\n\t\t\t: settings.styles;\n\n\tif ( isLoading ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Iframe\n\t\t\tref={ ref }\n\t\t\tclassName=\"editor-revisions__iframe\"\n\t\t\tname=\"revisions\"\n\t\t\ttabIndex={ 0 }\n\t\t>\n\t\t\t<style>\n\t\t\t\t{\n\t\t\t\t\t// Forming a \"block formatting context\" to prevent margin collapsing.\n\t\t\t\t\t// @see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context\n\t\t\t\t\t`.is-root-container { display: flow-root; }`\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<Disabled className=\"editor-revisions__example-preview__content\">\n\t\t\t\t<ExperimentalBlockEditorProvider\n\t\t\t\t\tvalue={ renderedBlocksArray }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t>\n\t\t\t\t\t<BlockList renderAppender={ false } />\n\t\t\t\t\t{ /*\n\t\t\t\t\t * Styles are printed inside the block editor provider,\n\t\t\t\t\t * so they can access any registered style overrides.\n\t\t\t\t\t */ }\n\t\t\t\t\t<EditorStyles styles={ editorStyles } />\n\t\t\t\t\t<__unstableBlockStyleVariationOverridesWithConfig\n\t\t\t\t\t\tconfig={ mergedConfig }\n\t\t\t\t\t/>\n\t\t\t\t</ExperimentalBlockEditorProvider>\n\t\t\t</Disabled>\n\t\t</Iframe>\n\t);\n}\nexport default forwardRef( StylesCanvasRevisions );\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useRef, useCallback } from '@wordpress/element';\nimport { ResizableBox } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ResizeHandle from './resize-handle';\n\n// Removes the inline styles in the drag handles.\nconst HANDLE_STYLES_OVERRIDE = {\n\tposition: undefined,\n\tuserSelect: undefined,\n\tcursor: undefined,\n\twidth: undefined,\n\theight: undefined,\n\ttop: undefined,\n\tright: undefined,\n\tbottom: undefined,\n\tleft: undefined,\n};\n\nfunction ResizableEditor( { className, enableResizing, height, children } ) {\n\tconst [ width, setWidth ] = useState( '100%' );\n\tconst resizableRef = useRef();\n\tconst resizeWidthBy = useCallback( ( deltaPixels ) => {\n\t\tif ( resizableRef.current ) {\n\t\t\tsetWidth( resizableRef.current.offsetWidth + deltaPixels );\n\t\t}\n\t}, [] );\n\treturn (\n\t\t<ResizableBox\n\t\t\tclassName={ clsx( 'editor-resizable-editor', className, {\n\t\t\t\t'is-resizable': enableResizing,\n\t\t\t} ) }\n\t\t\tref={ ( api ) => {\n\t\t\t\tresizableRef.current = api?.resizable;\n\t\t\t} }\n\t\t\tsize={ {\n\t\t\t\twidth: enableResizing ? width : '100%',\n\t\t\t\theight: enableResizing && height ? height : '100%',\n\t\t\t} }\n\t\t\tonResizeStop={ ( event, direction, element ) => {\n\t\t\t\tsetWidth( element.style.width );\n\t\t\t} }\n\t\t\tminWidth={ 300 }\n\t\t\tmaxWidth=\"100%\"\n\t\t\tmaxHeight=\"100%\"\n\t\t\tenable={ {\n\t\t\t\tleft: enableResizing,\n\t\t\t\tright: enableResizing,\n\t\t\t} }\n\t\t\tshowHandle={ enableResizing }\n\t\t\t// The editor is centered horizontally, resizing it only\n\t\t\t// moves half the distance. Hence double the ratio to correctly\n\t\t\t// align the cursor to the resizer handle.\n\t\t\tresizeRatio={ 2 }\n\t\t\thandleComponent={ {\n\t\t\t\tleft: (\n\t\t\t\t\t<ResizeHandle\n\t\t\t\t\t\tdirection=\"left\"\n\t\t\t\t\t\tresizeWidthBy={ resizeWidthBy }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tright: (\n\t\t\t\t\t<ResizeHandle\n\t\t\t\t\t\tdirection=\"right\"\n\t\t\t\t\t\tresizeWidthBy={ resizeWidthBy }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t} }\n\t\t\thandleClasses={ undefined }\n\t\t\thandleStyles={ {\n\t\t\t\tleft: HANDLE_STYLES_OVERRIDE,\n\t\t\t\tright: HANDLE_STYLES_OVERRIDE,\n\t\t\t} }\n\t\t>\n\t\t\t{ children }\n\t\t</ResizableBox>\n\t);\n}\n\nexport default ResizableEditor;\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { LEFT, RIGHT } from '@wordpress/keycodes';\nimport {\n\tVisuallyHidden,\n\tTooltip,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\n\nconst DELTA_DISTANCE = 20; // The distance to resize per keydown in pixels.\n\nexport default function ResizeHandle( { direction, resizeWidthBy } ) {\n\tfunction handleKeyDown( event ) {\n\t\tconst { keyCode } = event;\n\n\t\tif ( keyCode !== LEFT && keyCode !== RIGHT ) {\n\t\t\treturn;\n\t\t}\n\t\tevent.preventDefault();\n\n\t\tif (\n\t\t\t( direction === 'left' && keyCode === LEFT ) ||\n\t\t\t( direction === 'right' && keyCode === RIGHT )\n\t\t) {\n\t\t\tresizeWidthBy( DELTA_DISTANCE );\n\t\t} else if (\n\t\t\t( direction === 'left' && keyCode === RIGHT ) ||\n\t\t\t( direction === 'right' && keyCode === LEFT )\n\t\t) {\n\t\t\tresizeWidthBy( -DELTA_DISTANCE );\n\t\t}\n\t}\n\n\tconst resizeHandleVariants = {\n\t\tactive: {\n\t\t\topacity: 1,\n\t\t\tscaleY: 1.3,\n\t\t},\n\t};\n\n\tconst resizableHandleHelpId = `resizable-editor__resize-help-${ direction }`;\n\n\treturn (\n\t\t<>\n\t\t\t<Tooltip text={ __( 'Drag to resize' ) }>\n\t\t\t\t<motion.button\n\t\t\t\t\tclassName={ `editor-resizable-editor__resize-handle is-${ direction }` }\n\t\t\t\t\taria-label={ __( 'Drag to resize' ) }\n\t\t\t\t\taria-describedby={ resizableHandleHelpId }\n\t\t\t\t\tonKeyDown={ handleKeyDown }\n\t\t\t\t\tvariants={ resizeHandleVariants }\n\t\t\t\t\twhileFocus=\"active\"\n\t\t\t\t\twhileHover=\"active\"\n\t\t\t\t\twhileTap=\"active\"\n\t\t\t\t\tkey=\"handle\"\n\t\t\t\t\trole=\"separator\"\n\t\t\t\t\taria-orientation=\"vertical\"\n\t\t\t\t/>\n\t\t\t</Tooltip>\n\t\t\t<VisuallyHidden id={ resizableHandleHelpId }>\n\t\t\t\t{ __( 'Use left and right arrow keys to resize the canvas.' ) }\n\t\t\t</VisuallyHidden>\n\t\t</>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\n/**\n * Hook to get details about the currently edited content-only section.\n * Only returns information when the content only pattern insertion experiment is enabled.\n *\n * @return {Object|null} Object with patternName, patternTitle, and type, or null if no section is being edited or experiment is disabled.\n */\nexport default function useEditedSectionDetails() {\n\treturn useSelect( ( select ) => {\n\t\t// Only run when the content only pattern insertion experiment is enabled\n\t\tif ( ! window?.__experimentalContentOnlyPatternInsertion ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst {\n\t\t\tgetBlockAttributes,\n\t\t\tgetBlockName,\n\t\t\t__experimentalGetParsedPattern,\n\t\t} = select( blockEditorStore );\n\t\tconst { getEditedEntityRecord, getCurrentTheme } = select( coreStore );\n\t\tconst { getEditedContentOnlySection } = unlock(\n\t\t\tselect( blockEditorStore )\n\t\t);\n\n\t\t// Get the clientId of the unlocked pattern/section\n\t\tconst editedSectionId = getEditedContentOnlySection();\n\t\tif ( ! editedSectionId ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst attributes = getBlockAttributes( editedSectionId );\n\n\t\t// Handle unsynced patterns (contentOnly patterns with patternName)\n\t\tconst patternName = attributes?.metadata?.patternName;\n\t\tif ( patternName ) {\n\t\t\t// Get pattern details if available\n\t\t\tconst pattern =\n\t\t\t\ttypeof __experimentalGetParsedPattern === 'function'\n\t\t\t\t\t? __experimentalGetParsedPattern( patternName )\n\t\t\t\t\t: null;\n\n\t\t\treturn {\n\t\t\t\tpatternName,\n\t\t\t\tpatternTitle: pattern?.title || attributes?.metadata?.name,\n\t\t\t\ttype: 'pattern',\n\t\t\t};\n\t\t}\n\n\t\tconst blockName = getBlockName( editedSectionId );\n\n\t\t// Handle synced patterns (core/block)\n\t\tif ( blockName === 'core/block' && !! attributes?.ref ) {\n\t\t\tconst entity = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'wp_block',\n\t\t\t\tattributes.ref\n\t\t\t);\n\t\t\tif ( entity?.title ) {\n\t\t\t\treturn {\n\t\t\t\t\tpatternName: attributes.ref,\n\t\t\t\t\tpatternTitle: decodeEntities( entity.title ),\n\t\t\t\t\ttype: 'synced-pattern',\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\t// Handle template parts (core/template-part)\n\t\tif ( blockName === 'core/template-part' && !! attributes?.slug ) {\n\t\t\tconst theme = attributes.theme || getCurrentTheme()?.stylesheet;\n\t\t\tconst templatePartId = theme\n\t\t\t\t? `${ theme }//${ attributes.slug }`\n\t\t\t\t: null;\n\t\t\tif ( templatePartId ) {\n\t\t\t\tconst entity = getEditedEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_template_part',\n\t\t\t\t\ttemplatePartId\n\t\t\t\t);\n\t\t\t\tif ( entity?.title ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tpatternName: attributes.slug,\n\t\t\t\t\t\tpatternTitle: decodeEntities( entity.title ),\n\t\t\t\t\t\ttype: 'template-part',\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}, [] );\n}\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useRef, useMemo } from '@wordpress/element';\nimport { create, getTextContent } from '@wordpress/rich-text';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { Path, SVG, Line, Rect } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport DocumentOutlineItem from './item';\nimport { store as editorStore } from '../../store';\n\n/**\n * Module constants\n */\nconst emptyHeadingContent = <em>{ __( '(Empty heading)' ) }</em>;\nconst incorrectLevelContent = [\n\t<br key=\"incorrect-break\" />,\n\t<em key=\"incorrect-message\">{ __( '(Incorrect heading level)' ) }</em>,\n];\nconst singleH1Headings = [\n\t<br key=\"incorrect-break-h1\" />,\n\t<em key=\"incorrect-message-h1\">\n\t\t{ __( '(Your theme may already use a H1 for the post title)' ) }\n\t</em>,\n];\nconst multipleH1Headings = [\n\t<br key=\"incorrect-break-multiple-h1\" />,\n\t<em key=\"incorrect-message-multiple-h1\">\n\t\t{ __( '(Multiple H1 headings are not recommended)' ) }\n\t</em>,\n];\nfunction EmptyOutlineIllustration() {\n\treturn (\n\t\t<SVG\n\t\t\twidth=\"138\"\n\t\t\theight=\"148\"\n\t\t\tviewBox=\"0 0 138 148\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t>\n\t\t\t<Rect width=\"138\" height=\"148\" rx=\"4\" fill=\"#F0F6FC\" />\n\t\t\t<Line x1=\"44\" y1=\"28\" x2=\"24\" y2=\"28\" stroke=\"#DDDDDD\" />\n\t\t\t<Rect x=\"48\" y=\"16\" width=\"27\" height=\"23\" rx=\"4\" fill=\"#DDDDDD\" />\n\t\t\t<Path\n\t\t\t\td=\"M54.7585 32V23.2727H56.6037V26.8736H60.3494V23.2727H62.1903V32H60.3494V28.3949H56.6037V32H54.7585ZM67.4574 23.2727V32H65.6122V25.0241H65.5611L63.5625 26.277V24.6406L65.723 23.2727H67.4574Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t\t<Line x1=\"55\" y1=\"59\" x2=\"24\" y2=\"59\" stroke=\"#DDDDDD\" />\n\t\t\t<Rect x=\"59\" y=\"47\" width=\"29\" height=\"23\" rx=\"4\" fill=\"#DDDDDD\" />\n\t\t\t<Path\n\t\t\t\td=\"M65.7585 63V54.2727H67.6037V57.8736H71.3494V54.2727H73.1903V63H71.3494V59.3949H67.6037V63H65.7585ZM74.6605 63V61.6705L77.767 58.794C78.0313 58.5384 78.2528 58.3082 78.4318 58.1037C78.6136 57.8991 78.7514 57.6989 78.8452 57.5028C78.9389 57.304 78.9858 57.0895 78.9858 56.8594C78.9858 56.6037 78.9276 56.3835 78.8111 56.1989C78.6946 56.0114 78.5355 55.8679 78.3338 55.7685C78.1321 55.6662 77.9034 55.6151 77.6477 55.6151C77.3807 55.6151 77.1477 55.669 76.9489 55.777C76.75 55.8849 76.5966 56.0398 76.4886 56.2415C76.3807 56.4432 76.3267 56.6832 76.3267 56.9616H74.5753C74.5753 56.3906 74.7045 55.8949 74.9631 55.4744C75.2216 55.054 75.5838 54.7287 76.0497 54.4986C76.5156 54.2685 77.0526 54.1534 77.6605 54.1534C78.2855 54.1534 78.8295 54.2642 79.2926 54.4858C79.7585 54.7045 80.1207 55.0085 80.3793 55.3977C80.6378 55.7869 80.767 56.233 80.767 56.7358C80.767 57.0653 80.7017 57.3906 80.571 57.7116C80.4432 58.0327 80.2145 58.3892 79.8849 58.7812C79.5554 59.1705 79.0909 59.6378 78.4915 60.1832L77.2173 61.4318V61.4915H80.8821V63H74.6605Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t\t<Line x1=\"80\" y1=\"90\" x2=\"24\" y2=\"90\" stroke=\"#DDDDDD\" />\n\t\t\t<Rect x=\"84\" y=\"78\" width=\"30\" height=\"23\" rx=\"4\" fill=\"#F0B849\" />\n\t\t\t<Path\n\t\t\t\td=\"M90.7585 94V85.2727H92.6037V88.8736H96.3494V85.2727H98.1903V94H96.3494V90.3949H92.6037V94H90.7585ZM99.5284 92.4659V91.0128L103.172 85.2727H104.425V87.2841H103.683L101.386 90.919V90.9872H106.564V92.4659H99.5284ZM103.717 94V92.0227L103.751 91.3793V85.2727H105.482V94H103.717Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t\t<Line x1=\"66\" y1=\"121\" x2=\"24\" y2=\"121\" stroke=\"#DDDDDD\" />\n\t\t\t<Rect x=\"70\" y=\"109\" width=\"29\" height=\"23\" rx=\"4\" fill=\"#DDDDDD\" />\n\t\t\t<Path\n\t\t\t\td=\"M76.7585 125V116.273H78.6037V119.874H82.3494V116.273H84.1903V125H82.3494V121.395H78.6037V125H76.7585ZM88.8864 125.119C88.25 125.119 87.6832 125.01 87.1861 124.791C86.6918 124.57 86.3011 124.266 86.0142 123.879C85.7301 123.49 85.5838 123.041 85.5753 122.533H87.4332C87.4446 122.746 87.5142 122.933 87.642 123.095C87.7727 123.254 87.946 123.378 88.1619 123.466C88.3778 123.554 88.6207 123.598 88.8906 123.598C89.1719 123.598 89.4205 123.548 89.6364 123.449C89.8523 123.349 90.0213 123.212 90.1435 123.036C90.2656 122.859 90.3267 122.656 90.3267 122.426C90.3267 122.193 90.2614 121.987 90.1307 121.808C90.0028 121.626 89.8182 121.484 89.5767 121.382C89.3381 121.28 89.054 121.229 88.7244 121.229H87.9105V119.874H88.7244C89.0028 119.874 89.2486 119.825 89.4616 119.729C89.6776 119.632 89.8452 119.499 89.9645 119.328C90.0838 119.155 90.1435 118.953 90.1435 118.723C90.1435 118.504 90.0909 118.312 89.9858 118.148C89.8835 117.98 89.7386 117.849 89.5511 117.756C89.3665 117.662 89.1506 117.615 88.9034 117.615C88.6534 117.615 88.4247 117.661 88.2173 117.751C88.0099 117.839 87.8438 117.966 87.7188 118.131C87.5938 118.295 87.527 118.489 87.5185 118.71H85.75C85.7585 118.207 85.902 117.764 86.1804 117.381C86.4588 116.997 86.8338 116.697 87.3054 116.482C87.7798 116.263 88.3153 116.153 88.9119 116.153C89.5142 116.153 90.0412 116.263 90.4929 116.482C90.9446 116.7 91.2955 116.996 91.5455 117.368C91.7983 117.737 91.9233 118.152 91.9205 118.612C91.9233 119.101 91.7713 119.509 91.4645 119.835C91.1605 120.162 90.7642 120.369 90.2756 120.457V120.526C90.9176 120.608 91.4063 120.831 91.7415 121.195C92.0795 121.555 92.2472 122.007 92.2443 122.55C92.2472 123.047 92.1037 123.489 91.8139 123.875C91.527 124.261 91.1307 124.565 90.625 124.787C90.1193 125.009 89.5398 125.119 88.8864 125.119Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t</SVG>\n\t);\n}\n\n/**\n * Returns an array of heading blocks enhanced with the following properties:\n * level - An integer with the heading level.\n * isEmpty - Flag indicating if the heading has no content.\n *\n * @param {?Array} blocks An array of blocks.\n *\n * @return {Array} An array of heading blocks enhanced with the properties described above.\n */\nconst computeOutlineHeadings = ( blocks = [] ) => {\n\treturn blocks\n\t\t.filter( ( block ) => block.name === 'core/heading' )\n\t\t.map( ( block ) => ( {\n\t\t\t...block,\n\t\t\tlevel: block.attributes.level,\n\t\t\tisEmpty: isEmptyHeading( block ),\n\t\t} ) );\n};\n\nconst isEmptyHeading = ( heading ) =>\n\t! heading.attributes.content ||\n\theading.attributes.content.trim().length === 0;\n\n/**\n * Renders a document outline component.\n *\n * @param {Object} props Props.\n * @param {Function} props.onSelect Function to be called when an outline item is selected\n * @param {boolean} props.hasOutlineItemsDisabled Indicates whether the outline items are disabled.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function DocumentOutline( {\n\tonSelect,\n\thasOutlineItemsDisabled,\n} ) {\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\tconst { title, isTitleSupported } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\t\tconst postType = getPostType( getEditedPostAttribute( 'type' ) );\n\t\treturn {\n\t\t\ttitle: getEditedPostAttribute( 'title' ),\n\t\t\tisTitleSupported: postType?.supports?.title ?? false,\n\t\t};\n\t} );\n\tconst blocks = useSelect( ( select ) => {\n\t\tconst { getClientIdsWithDescendants, getBlock } =\n\t\t\tselect( blockEditorStore );\n\t\tconst clientIds = getClientIdsWithDescendants();\n\t\t// Note: Don't modify data inside the `Array.map` callback,\n\t\t// all compulations should happen in `computeOutlineHeadings`.\n\t\treturn clientIds.map( ( id ) => getBlock( id ) );\n\t} );\n\tconst contentBlocks = useSelect( ( select ) => {\n\t\t// When rendering in `post-only` mode all blocks are considered content blocks.\n\t\tif ( select( editorStore ).getRenderingMode() === 'post-only' ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst { getBlocksByName, getClientIdsOfDescendants } =\n\t\t\tselect( blockEditorStore );\n\t\tconst [ postContentClientId ] = getBlocksByName( 'core/post-content' );\n\n\t\t// Do nothing if there's no post content block.\n\t\tif ( ! postContentClientId ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn getClientIdsOfDescendants( postContentClientId );\n\t}, [] );\n\n\tconst prevHeadingLevelRef = useRef( 1 );\n\n\tconst headings = useMemo(\n\t\t() => computeOutlineHeadings( blocks ),\n\t\t[ blocks ]\n\t);\n\n\tif ( headings.length < 1 ) {\n\t\treturn (\n\t\t\t<div className=\"editor-document-outline has-no-headings\">\n\t\t\t\t<EmptyOutlineIllustration />\n\t\t\t\t<p>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Navigate the structure of your document and address issues like empty or incorrect heading levels.'\n\t\t\t\t\t) }\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Not great but it's the simplest way to locate the title right now.\n\tconst titleNode = document.querySelector( '.editor-post-title__input' );\n\tconst hasTitle = isTitleSupported && title && titleNode;\n\tconst countByLevel = headings.reduce(\n\t\t( acc, heading ) => ( {\n\t\t\t...acc,\n\t\t\t[ heading.level ]: ( acc[ heading.level ] || 0 ) + 1,\n\t\t} ),\n\t\t{}\n\t);\n\tconst hasMultipleH1 = countByLevel[ 1 ] > 1;\n\n\tfunction isContentBlock( clientId ) {\n\t\treturn Array.isArray( contentBlocks )\n\t\t\t? contentBlocks.includes( clientId )\n\t\t\t: true;\n\t}\n\n\treturn (\n\t\t<div className=\"document-outline\">\n\t\t\t<ul>\n\t\t\t\t{ hasTitle && (\n\t\t\t\t\t<DocumentOutlineItem\n\t\t\t\t\t\tlevel={ __( 'Title' ) }\n\t\t\t\t\t\tisValid\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\thref={ `#${ titleNode.id }` }\n\t\t\t\t\t\tisDisabled={ hasOutlineItemsDisabled }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</DocumentOutlineItem>\n\t\t\t\t) }\n\t\t\t\t{ headings.map( ( item ) => {\n\t\t\t\t\t// Headings remain the same, go up by one, or down by any amount.\n\t\t\t\t\t// Otherwise there are missing levels.\n\t\t\t\t\tconst isIncorrectLevel =\n\t\t\t\t\t\titem.level > prevHeadingLevelRef.current + 1;\n\n\t\t\t\t\tconst isValid =\n\t\t\t\t\t\t! item.isEmpty &&\n\t\t\t\t\t\t! isIncorrectLevel &&\n\t\t\t\t\t\t!! item.level &&\n\t\t\t\t\t\t( item.level !== 1 ||\n\t\t\t\t\t\t\t( ! hasMultipleH1 && ! hasTitle ) );\n\t\t\t\t\tprevHeadingLevelRef.current = item.level;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<DocumentOutlineItem\n\t\t\t\t\t\t\tkey={ item.clientId }\n\t\t\t\t\t\t\tlevel={ `H${ item.level }` }\n\t\t\t\t\t\t\tisValid={ isValid }\n\t\t\t\t\t\t\tisDisabled={\n\t\t\t\t\t\t\t\thasOutlineItemsDisabled ||\n\t\t\t\t\t\t\t\t! isContentBlock( item.clientId )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thref={ `#block-${ item.clientId }` }\n\t\t\t\t\t\t\tonSelect={ () => {\n\t\t\t\t\t\t\t\tselectBlock( item.clientId );\n\t\t\t\t\t\t\t\tonSelect?.();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ item.isEmpty\n\t\t\t\t\t\t\t\t? emptyHeadingContent\n\t\t\t\t\t\t\t\t: getTextContent(\n\t\t\t\t\t\t\t\t\t\tcreate( {\n\t\t\t\t\t\t\t\t\t\t\thtml: item.attributes.content,\n\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t ) }\n\t\t\t\t\t\t\t{ isIncorrectLevel && incorrectLevelContent }\n\t\t\t\t\t\t\t{ item.level === 1 &&\n\t\t\t\t\t\t\t\thasMultipleH1 &&\n\t\t\t\t\t\t\t\tmultipleH1Headings }\n\t\t\t\t\t\t\t{ hasTitle &&\n\t\t\t\t\t\t\t\titem.level === 1 &&\n\t\t\t\t\t\t\t\t! hasMultipleH1 &&\n\t\t\t\t\t\t\t\tsingleH1Headings }\n\t\t\t\t\t\t</DocumentOutlineItem>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</ul>\n\t\t</div>\n\t);\n}\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\nconst TableOfContentsItem = ( {\n\tchildren,\n\tisValid,\n\tisDisabled,\n\tlevel,\n\thref,\n\tonSelect,\n} ) => {\n\tfunction handleClick( event ) {\n\t\tif ( isDisabled ) {\n\t\t\tevent.preventDefault();\n\t\t\treturn;\n\t\t}\n\t\tonSelect();\n\t}\n\n\treturn (\n\t\t<li\n\t\t\tclassName={ clsx(\n\t\t\t\t'document-outline__item',\n\t\t\t\t`is-${ level.toLowerCase() }`,\n\t\t\t\t{\n\t\t\t\t\t'is-invalid': ! isValid,\n\t\t\t\t\t'is-disabled': isDisabled,\n\t\t\t\t}\n\t\t\t) }\n\t\t>\n\t\t\t<a\n\t\t\t\thref={ href }\n\t\t\t\tclassName=\"document-outline__button\"\n\t\t\t\taria-disabled={ isDisabled }\n\t\t\t\tonClick={ handleClick }\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tclassName=\"document-outline__emdash\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t></span>\n\t\t\t\t<strong className=\"document-outline__level\">{ level }</strong>\n\t\t\t\t<span className=\"document-outline__item-content\">\n\t\t\t\t\t{ children }\n\t\t\t\t</span>\n\t\t\t</a>\n\t\t</li>\n\t);\n};\n\nexport default TableOfContentsItem;\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Component check if there are any headings (core/heading blocks) present in the document.\n *\n * @param {Object} props Props.\n * @param {React.ReactNode} props.children Children to be rendered.\n *\n * @return {React.ReactNode} The component to be rendered or null if there are headings.\n */\nexport default function DocumentOutlineCheck( { children } ) {\n\tconst hasHeadings = useSelect( ( select ) => {\n\t\tconst { getGlobalBlockCount } = select( blockEditorStore );\n\n\t\treturn getGlobalBlockCount( 'core/heading' ) > 0;\n\t} );\n\n\tif ( ! hasHeadings ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n", "/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { BlockEditorKeyboardShortcuts } from '@wordpress/block-editor';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { isAppleOS } from '@wordpress/keycodes';\n\n/**\n * Component for registering editor keyboard shortcuts.\n *\n * @return {Element} The component to be rendered.\n */\nfunction EditorKeyboardShortcutsRegister() {\n\t// Registering the shortcuts.\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/toggle-mode',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Switch between visual editor and code editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'secondary',\n\t\t\t\tcharacter: 'm',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/save',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Save your changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 's',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/undo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Undo your last changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/redo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Redo your last undo.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t\t// Disable on Apple OS because it conflicts with the browser's\n\t\t\t// history shortcut. It's a fine alias for both Windows and Linux.\n\t\t\t// Since there's no conflict for Ctrl+Shift+Z on both Windows and\n\t\t\t// Linux, we keep it as the default for consistency.\n\t\t\taliases: isAppleOS()\n\t\t\t\t? []\n\t\t\t\t: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmodifier: 'primary',\n\t\t\t\t\t\t\tcharacter: 'y',\n\t\t\t\t\t\t},\n\t\t\t\t ],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/toggle-list-view',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Show or hide the List View.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'o',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/toggle-distraction-free',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Enter or exit distraction free mode.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: '\\\\',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/toggle-sidebar',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Show or hide the Settings panel.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: ',',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/keyboard-shortcuts',\n\t\t\tcategory: 'main',\n\t\t\tdescription: __( 'Display these keyboard shortcuts.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'h',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/next-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the next part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrl',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'n',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/previous-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the previous part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'p',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\t\tcharacter: '~',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\treturn <BlockEditorKeyboardShortcuts.Register />;\n}\n\nexport default EditorKeyboardShortcutsRegister;\n", "/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { displayShortcut, isAppleOS } from '@wordpress/keycodes';\nimport { redo as redoIcon, undo as undoIcon } from '@wordpress/icons';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction EditorHistoryRedo( props, ref ) {\n\tconst shortcut = isAppleOS()\n\t\t? displayShortcut.primaryShift( 'z' )\n\t\t: displayShortcut.primary( 'y' );\n\n\tconst hasRedo = useSelect(\n\t\t( select ) => select( editorStore ).hasEditorRedo(),\n\t\t[]\n\t);\n\tconst { redo } = useDispatch( editorStore );\n\treturn (\n\t\t<Button\n\t\t\t__next40pxDefaultSize\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ticon={ ! isRTL() ? redoIcon : undoIcon }\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\tlabel={ __( 'Redo' ) }\n\t\t\tshortcut={ shortcut }\n\t\t\t// If there are no redo levels we don't want to actually disable this\n\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\taria-disabled={ ! hasRedo }\n\t\t\tonClick={ hasRedo ? redo : undefined }\n\t\t\tclassName=\"editor-history__redo\"\n\t\t/>\n\t);\n}\n\n/** @typedef {import('react').Ref<HTMLElement>} Ref */\n\n/**\n * Renders the redo button for the editor history.\n *\n * @param {Object} props - Props.\n * @param {Ref} ref - Forwarded ref.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default forwardRef( EditorHistoryRedo );\n", "/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { undo as undoIcon, redo as redoIcon } from '@wordpress/icons';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction EditorHistoryUndo( props, ref ) {\n\tconst hasUndo = useSelect(\n\t\t( select ) => select( editorStore ).hasEditorUndo(),\n\t\t[]\n\t);\n\tconst { undo } = useDispatch( editorStore );\n\treturn (\n\t\t<Button\n\t\t\t__next40pxDefaultSize\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ticon={ ! isRTL() ? undoIcon : redoIcon }\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\tlabel={ __( 'Undo' ) }\n\t\t\tshortcut={ displayShortcut.primary( 'z' ) }\n\t\t\t// If there are no undo levels we don't want to actually disable this\n\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\taria-disabled={ ! hasUndo }\n\t\t\tonClick={ hasUndo ? undo : undefined }\n\t\t\tclassName=\"editor-history__undo\"\n\t\t/>\n\t);\n}\n\n/** @typedef {import('react').Ref<HTMLElement>} Ref */\n\n/**\n * Renders the undo button for the editor history.\n *\n * @param {Object} props - Props.\n * @param {Ref} ref - Forwarded ref.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default forwardRef( EditorHistoryUndo );\n", "/**\n * WordPress dependencies\n */\nimport { NoticeList } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport TemplateValidationNotice from '../template-validation-notice';\n\n/**\n * This component renders the notices displayed in the editor. It displays pinned notices first, followed by dismissible\n *\n * @example\n * ```jsx\n * <EditorNotices />\n * ```\n *\n * @return {React.ReactNode} The rendered EditorNotices component.\n */\nexport function EditorNotices() {\n\tconst { notices } = useSelect(\n\t\t( select ) => ( {\n\t\t\tnotices: select( noticesStore ).getNotices(),\n\t\t} ),\n\t\t[]\n\t);\n\tconst { removeNotice } = useDispatch( noticesStore );\n\tconst dismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => isDismissible && type === 'default'\n\t);\n\tconst nonDismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => ! isDismissible && type === 'default'\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ nonDismissibleNotices }\n\t\t\t\tclassName=\"components-editor-notices__pinned\"\n\t\t\t/>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ dismissibleNotices }\n\t\t\t\tclassName=\"components-editor-notices__dismissible\"\n\t\t\t\tonRemove={ removeNotice }\n\t\t\t>\n\t\t\t\t<TemplateValidationNotice />\n\t\t\t</NoticeList>\n\t\t</>\n\t);\n}\n\nexport default EditorNotices;\n", "/**\n * WordPress dependencies\n */\nimport {\n\tNotice,\n\t__experimentalConfirmDialog as ConfirmDialog,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\nexport default function TemplateValidationNotice() {\n\tconst [ showConfirmDialog, setShowConfirmDialog ] = useState( false );\n\tconst isValid = useSelect( ( select ) => {\n\t\treturn select( blockEditorStore ).isValidTemplate();\n\t}, [] );\n\tconst { setTemplateValidity, synchronizeTemplate } =\n\t\tuseDispatch( blockEditorStore );\n\n\tif ( isValid ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<Notice\n\t\t\t\tclassName=\"editor-template-validation-notice\"\n\t\t\t\tisDismissible={ false }\n\t\t\t\tstatus=\"warning\"\n\t\t\t\tactions={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Keep it as is' ),\n\t\t\t\t\t\tonClick: () => setTemplateValidity( true ),\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Reset the template' ),\n\t\t\t\t\t\tonClick: () => setShowConfirmDialog( true ),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t>\n\t\t\t\t{ __(\n\t\t\t\t\t'The content of your post doesn\u2019t match the template assigned to your post type.'\n\t\t\t\t) }\n\t\t\t</Notice>\n\t\t\t<ConfirmDialog\n\t\t\t\tisOpen={ showConfirmDialog }\n\t\t\t\tconfirmButtonText={ __( 'Reset' ) }\n\t\t\t\tonConfirm={ () => {\n\t\t\t\t\tsetShowConfirmDialog( false );\n\t\t\t\t\tsynchronizeTemplate();\n\t\t\t\t} }\n\t\t\t\tonCancel={ () => setShowConfirmDialog( false ) }\n\t\t\t\tsize=\"medium\"\n\t\t\t>\n\t\t\t\t{ __(\n\t\t\t\t\t'Resetting the template may result in loss of content, do you want to continue?'\n\t\t\t\t) }\n\t\t\t</ConfirmDialog>\n\t\t</>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { SnackbarList } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\n\n// Last three notices. Slices from the tail end of the list.\nconst MAX_VISIBLE_NOTICES = -3;\n\n/**\n * Renders the editor snackbars component.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function EditorSnackbars() {\n\tconst notices = useSelect(\n\t\t( select ) => select( noticesStore ).getNotices(),\n\t\t[]\n\t);\n\tconst { removeNotice } = useDispatch( noticesStore );\n\tconst snackbarNotices = notices\n\t\t.filter( ( { type } ) => type === 'snackbar' )\n\t\t.slice( MAX_VISIBLE_NOTICES );\n\n\treturn (\n\t\t<SnackbarList\n\t\t\tnotices={ snackbarNotices }\n\t\t\tclassName=\"components-editor-notices__snackbar\"\n\t\t\tonRemove={ removeNotice }\n\t\t/>\n\t);\n}\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Button, Flex, FlexItem } from '@wordpress/components';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport {\n\tuseCallback,\n\tuseRef,\n\tcreateInterpolateElement,\n} from '@wordpress/element';\nimport {\n\t__experimentalUseDialog as useDialog,\n\tuseInstanceId,\n} from '@wordpress/compose';\nimport { useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport EntityTypeList from './entity-type-list';\nimport { useIsDirty } from './hooks/use-is-dirty';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nfunction identity( values ) {\n\treturn values;\n}\n\n/**\n * Renders the component for managing saved states of entities.\n *\n * @param {Object} props The component props.\n * @param {Function} props.close The function to close the dialog.\n * @param {boolean=} props.renderDialog Whether to render the component with modal dialog behavior.\n * @param {string} props.variant Changes the layout of the component. When an `inline` value is provided, the action buttons are rendered at the end of the component instead of at the start.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function EntitiesSavedStates( {\n\tclose,\n\trenderDialog,\n\tvariant,\n} ) {\n\tconst isDirtyProps = useIsDirty();\n\treturn (\n\t\t<EntitiesSavedStatesExtensible\n\t\t\tclose={ close }\n\t\t\trenderDialog={ renderDialog }\n\t\t\tvariant={ variant }\n\t\t\t{ ...isDirtyProps }\n\t\t/>\n\t);\n}\n\n/**\n * Renders a panel for saving entities with dirty records.\n *\n * @param {Object} props The component props.\n * @param {string} props.additionalPrompt Additional prompt to display.\n * @param {Function} props.close Function to close the panel.\n * @param {Function} props.onSave Function to call when saving entities.\n * @param {boolean} props.saveEnabled Flag indicating if save is enabled.\n * @param {string} props.saveLabel Label for the save button.\n * @param {boolean} props.renderDialog Whether to render the component with modal dialog behavior.\n * @param {Array} props.dirtyEntityRecords Array of dirty entity records.\n * @param {boolean} props.isDirty Flag indicating if there are dirty entities.\n * @param {Function} props.setUnselectedEntities Function to set unselected entities.\n * @param {Array} props.unselectedEntities Array of unselected entities.\n * @param {string} props.variant Changes the layout of the component. When an `inline` value is provided, the action buttons are rendered at the end of the component instead of at the start.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport function EntitiesSavedStatesExtensible( {\n\tadditionalPrompt = undefined,\n\tclose,\n\tonSave = identity,\n\tsaveEnabled: saveEnabledProp = undefined,\n\tsaveLabel = __( 'Save' ),\n\trenderDialog,\n\tdirtyEntityRecords,\n\tisDirty,\n\tsetUnselectedEntities,\n\tunselectedEntities,\n\tvariant = 'default',\n} ) {\n\tconst saveButtonRef = useRef();\n\tconst { saveDirtyEntities } = unlock( useDispatch( editorStore ) );\n\t// To group entities by type.\n\tconst partitionedSavables = dirtyEntityRecords.reduce( ( acc, record ) => {\n\t\tconst { name } = record;\n\t\tif ( ! acc[ name ] ) {\n\t\t\tacc[ name ] = [];\n\t\t}\n\t\tacc[ name ].push( record );\n\t\treturn acc;\n\t}, {} );\n\n\t// Sort entity groups.\n\tconst {\n\t\tsite: siteSavables,\n\t\twp_template: templateSavables,\n\t\twp_template_part: templatePartSavables,\n\t\t...contentSavables\n\t} = partitionedSavables;\n\tconst sortedPartitionedSavables = [\n\t\tsiteSavables,\n\t\ttemplateSavables,\n\t\ttemplatePartSavables,\n\t\t...Object.values( contentSavables ),\n\t].filter( Array.isArray );\n\n\tconst saveEnabled = saveEnabledProp ?? isDirty;\n\t// Explicitly define this with no argument passed. Using `close` on\n\t// its own will use the event object in place of the expected saved entities.\n\tconst dismissPanel = useCallback( () => close(), [ close ] );\n\n\tconst [ saveDialogRef, saveDialogProps ] = useDialog( {\n\t\tonClose: () => dismissPanel(),\n\t} );\n\tconst dialogLabelId = useInstanceId(\n\t\tEntitiesSavedStatesExtensible,\n\t\t'entities-saved-states__panel-label'\n\t);\n\tconst dialogDescriptionId = useInstanceId(\n\t\tEntitiesSavedStatesExtensible,\n\t\t'entities-saved-states__panel-description'\n\t);\n\n\tconst selectItemsToSaveDescription = !! dirtyEntityRecords.length\n\t\t? __( 'Select the items you want to save.' )\n\t\t: undefined;\n\n\tconst isInline = variant === 'inline';\n\n\tconst actionButtons = (\n\t\t<>\n\t\t\t<FlexItem\n\t\t\t\tisBlock={ isInline ? false : true }\n\t\t\t\tas={ Button }\n\t\t\t\tvariant={ isInline ? 'tertiary' : 'secondary' }\n\t\t\t\tsize={ isInline ? undefined : 'compact' }\n\t\t\t\tonClick={ dismissPanel }\n\t\t\t>\n\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t</FlexItem>\n\t\t\t<FlexItem\n\t\t\t\tisBlock={ isInline ? false : true }\n\t\t\t\tas={ Button }\n\t\t\t\tref={ saveButtonRef }\n\t\t\t\tvariant=\"primary\"\n\t\t\t\tsize={ isInline ? undefined : 'compact' }\n\t\t\t\tdisabled={ ! saveEnabled }\n\t\t\t\taccessibleWhenDisabled\n\t\t\t\tonClick={ () =>\n\t\t\t\t\tsaveDirtyEntities( {\n\t\t\t\t\t\tonSave,\n\t\t\t\t\t\tdirtyEntityRecords,\n\t\t\t\t\t\tentitiesToSkip: unselectedEntities,\n\t\t\t\t\t\tclose,\n\t\t\t\t\t} )\n\t\t\t\t}\n\t\t\t\tclassName=\"editor-entities-saved-states__save-button\"\n\t\t\t>\n\t\t\t\t{ saveLabel }\n\t\t\t</FlexItem>\n\t\t</>\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tref={ renderDialog ? saveDialogRef : undefined }\n\t\t\t{ ...( renderDialog && saveDialogProps ) }\n\t\t\tclassName={ clsx( 'entities-saved-states__panel', {\n\t\t\t\t'is-inline': isInline,\n\t\t\t} ) }\n\t\t\trole={ renderDialog ? 'dialog' : undefined }\n\t\t\taria-labelledby={ renderDialog ? dialogLabelId : undefined }\n\t\t\taria-describedby={ renderDialog ? dialogDescriptionId : undefined }\n\t\t>\n\t\t\t{ ! isInline && (\n\t\t\t\t<Flex className=\"entities-saved-states__panel-header\" gap={ 2 }>\n\t\t\t\t\t{ actionButtons }\n\t\t\t\t</Flex>\n\t\t\t) }\n\n\t\t\t<div className=\"entities-saved-states__text-prompt\">\n\t\t\t\t<div className=\"entities-saved-states__text-prompt--header-wrapper\">\n\t\t\t\t\t<strong\n\t\t\t\t\t\tid={ renderDialog ? dialogLabelId : undefined }\n\t\t\t\t\t\tclassName=\"entities-saved-states__text-prompt--header\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Are you ready to save?' ) }\n\t\t\t\t\t</strong>\n\t\t\t\t</div>\n\t\t\t\t<div id={ renderDialog ? dialogDescriptionId : undefined }>\n\t\t\t\t\t{ additionalPrompt }\n\t\t\t\t\t<p className=\"entities-saved-states__text-prompt--changes-count\">\n\t\t\t\t\t\t{ isDirty\n\t\t\t\t\t\t\t? createInterpolateElement(\n\t\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: %d: number of site changes waiting to be saved. */\n\t\t\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t\t\t'There is <strong>%d site change</strong> waiting to be saved.',\n\t\t\t\t\t\t\t\t\t\t\t'There are <strong>%d site changes</strong> waiting to be saved.',\n\t\t\t\t\t\t\t\t\t\t\tdirtyEntityRecords.length\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tdirtyEntityRecords.length\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{ strong: <strong /> }\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: selectItemsToSaveDescription }\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t{ sortedPartitionedSavables.map( ( list ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<EntityTypeList\n\t\t\t\t\t\tkey={ list[ 0 ].name }\n\t\t\t\t\t\tlist={ list }\n\t\t\t\t\t\tunselectedEntities={ unselectedEntities }\n\t\t\t\t\t\tsetUnselectedEntities={ setUnselectedEntities }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\n\t\t\t{ isInline && (\n\t\t\t\t<Flex\n\t\t\t\t\tdirection=\"row\"\n\t\t\t\t\tjustify=\"flex-end\"\n\t\t\t\t\tclassName=\"entities-saved-states__panel-footer\"\n\t\t\t\t>\n\t\t\t\t\t{ actionButtons }\n\t\t\t\t</Flex>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody, PanelRow } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { getGlobalStylesChanges } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport EntityRecordItem from './entity-record-item';\n\nfunction getEntityDescription( entity, count ) {\n\tswitch ( entity ) {\n\t\tcase 'site':\n\t\t\treturn 1 === count\n\t\t\t\t? __( 'This change will affect your whole site.' )\n\t\t\t\t: __( 'These changes will affect your whole site.' );\n\t\tcase 'wp_template':\n\t\t\treturn __(\n\t\t\t\t'This change will affect other parts of your site that use this template.'\n\t\t\t);\n\t\tcase 'page':\n\t\tcase 'post':\n\t\t\treturn __( 'The following has been modified.' );\n\t}\n}\n\nfunction GlobalStylesDescription( { record } ) {\n\tconst { editedRecord, savedRecord } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedEntityRecord, getEntityRecord } =\n\t\t\t\tselect( coreStore );\n\t\t\treturn {\n\t\t\t\teditedRecord: getEditedEntityRecord(\n\t\t\t\t\trecord.kind,\n\t\t\t\t\trecord.name,\n\t\t\t\t\trecord.key\n\t\t\t\t),\n\t\t\t\tsavedRecord: getEntityRecord(\n\t\t\t\t\trecord.kind,\n\t\t\t\t\trecord.name,\n\t\t\t\t\trecord.key\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ record.kind, record.name, record.key ]\n\t);\n\n\tconst globalStylesChanges = getGlobalStylesChanges(\n\t\teditedRecord,\n\t\tsavedRecord,\n\t\t{\n\t\t\tmaxResults: 10,\n\t\t}\n\t);\n\treturn globalStylesChanges.length ? (\n\t\t<ul className=\"entities-saved-states__changes\">\n\t\t\t{ globalStylesChanges.map( ( change ) => (\n\t\t\t\t<li key={ change }>{ change }</li>\n\t\t\t) ) }\n\t\t</ul>\n\t) : null;\n}\n\nfunction EntityDescription( { record, count } ) {\n\tif ( 'globalStyles' === record?.name ) {\n\t\treturn null;\n\t}\n\tconst description = getEntityDescription( record?.name, count );\n\treturn description ? <PanelRow>{ description }</PanelRow> : null;\n}\n\nexport default function EntityTypeList( {\n\tlist,\n\tunselectedEntities,\n\tsetUnselectedEntities,\n} ) {\n\tconst count = list.length;\n\tconst firstRecord = list[ 0 ];\n\tconst entityConfig = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityConfig(\n\t\t\t\tfirstRecord.kind,\n\t\t\t\tfirstRecord.name\n\t\t\t),\n\t\t[ firstRecord.kind, firstRecord.name ]\n\t);\n\n\tlet entityLabel = entityConfig.label;\n\tif ( firstRecord?.name === 'wp_template_part' ) {\n\t\tentityLabel =\n\t\t\t1 === count ? __( 'Template Part' ) : __( 'Template Parts' );\n\t}\n\n\treturn (\n\t\t<PanelBody\n\t\t\ttitle={ entityLabel }\n\t\t\tinitialOpen\n\t\t\tclassName=\"entities-saved-states__panel-body\"\n\t\t>\n\t\t\t<EntityDescription record={ firstRecord } count={ count } />\n\t\t\t{ list.map( ( record ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<EntityRecordItem\n\t\t\t\t\t\tkey={ record.key || record.property }\n\t\t\t\t\t\trecord={ record }\n\t\t\t\t\t\tchecked={\n\t\t\t\t\t\t\t! unselectedEntities.some(\n\t\t\t\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\t\t\t\telt.kind === record.kind &&\n\t\t\t\t\t\t\t\t\telt.name === record.name &&\n\t\t\t\t\t\t\t\t\telt.key === record.key &&\n\t\t\t\t\t\t\t\t\telt.property === record.property\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetUnselectedEntities( record, value )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t\t{ 'globalStyles' === firstRecord?.name && (\n\t\t\t\t<GlobalStylesDescription record={ firstRecord } />\n\t\t\t) }\n\t\t</PanelBody>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { CheckboxControl, PanelRow } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { getTemplateInfo } from '../../utils/get-template-info';\n\nexport default function EntityRecordItem( { record, checked, onChange } ) {\n\tconst { name, kind, title, key } = record;\n\n\t// Handle templates that might use default descriptive titles.\n\tconst { entityRecordTitle, hasPostMetaChanges } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( 'postType' !== kind || 'wp_template' !== name ) {\n\t\t\t\treturn {\n\t\t\t\t\tentityRecordTitle: title,\n\t\t\t\t\thasPostMetaChanges: unlock(\n\t\t\t\t\t\tselect( editorStore )\n\t\t\t\t\t).hasPostMetaChanges( name, key ),\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst template = select( coreStore ).getEditedEntityRecord(\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\tkey\n\t\t\t);\n\n\t\t\tconst { default_template_types: templateTypes = [] } =\n\t\t\t\tselect( coreStore ).getCurrentTheme() ?? {};\n\n\t\t\treturn {\n\t\t\t\tentityRecordTitle: getTemplateInfo( {\n\t\t\t\t\ttemplate,\n\t\t\t\t\ttemplateTypes,\n\t\t\t\t} ).title,\n\t\t\t\thasPostMetaChanges: unlock(\n\t\t\t\t\tselect( editorStore )\n\t\t\t\t).hasPostMetaChanges( name, key ),\n\t\t\t};\n\t\t},\n\t\t[ name, kind, title, key ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<PanelRow>\n\t\t\t\t<CheckboxControl\n\t\t\t\t\tlabel={\n\t\t\t\t\t\tdecodeEntities( entityRecordTitle ) || __( 'Untitled' )\n\t\t\t\t\t}\n\t\t\t\t\tchecked={ checked }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tclassName=\"entities-saved-states__change-control\"\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t{ hasPostMetaChanges && (\n\t\t\t\t<ul className=\"entities-saved-states__changes\">\n\t\t\t\t\t<li>{ __( 'Post Meta.' ) }</li>\n\t\t\t\t</ul>\n\t\t\t) }\n\t\t</>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useMemo, useState } from '@wordpress/element';\n\n/**\n * Custom hook that determines if any entities are dirty (edited) and provides a way to manage selected/unselected entities.\n *\n * @return {Object} An object containing the following properties:\n * - dirtyEntityRecords: An array of dirty entity records.\n * - isDirty: A boolean indicating if there are any dirty entity records.\n * - setUnselectedEntities: A function to set the unselected entities.\n * - unselectedEntities: An array of unselected entities.\n */\nexport const useIsDirty = () => {\n\tconst { editedEntities, siteEdits, siteEntityConfig } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\t__experimentalGetDirtyEntityRecords,\n\t\t\t\tgetEntityRecordEdits,\n\t\t\t\tgetEntityConfig,\n\t\t\t} = select( coreStore );\n\n\t\t\treturn {\n\t\t\t\teditedEntities: __experimentalGetDirtyEntityRecords(),\n\t\t\t\tsiteEdits: getEntityRecordEdits( 'root', 'site' ),\n\t\t\t\tsiteEntityConfig: getEntityConfig( 'root', 'site' ),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst dirtyEntityRecords = useMemo( () => {\n\t\t// Remove site object and decouple into its edited pieces.\n\t\tconst editedEntitiesWithoutSite = editedEntities.filter(\n\t\t\t( record ) => ! ( record.kind === 'root' && record.name === 'site' )\n\t\t);\n\n\t\tconst siteEntityLabels = siteEntityConfig?.meta?.labels ?? {};\n\t\tconst editedSiteEntities = [];\n\t\tfor ( const property in siteEdits ) {\n\t\t\teditedSiteEntities.push( {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'site',\n\t\t\t\ttitle: siteEntityLabels[ property ] || property,\n\t\t\t\tproperty,\n\t\t\t} );\n\t\t}\n\n\t\treturn [ ...editedEntitiesWithoutSite, ...editedSiteEntities ];\n\t}, [ editedEntities, siteEdits, siteEntityConfig ] );\n\n\t// Unchecked entities to be ignored by save function.\n\tconst [ unselectedEntities, _setUnselectedEntities ] = useState( [] );\n\n\tconst setUnselectedEntities = (\n\t\t{ kind, name, key, property },\n\t\tchecked\n\t) => {\n\t\tif ( checked ) {\n\t\t\t_setUnselectedEntities(\n\t\t\t\tunselectedEntities.filter(\n\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\telt.kind !== kind ||\n\t\t\t\t\t\telt.name !== name ||\n\t\t\t\t\t\telt.key !== key ||\n\t\t\t\t\t\telt.property !== property\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\t_setUnselectedEntities( [\n\t\t\t\t...unselectedEntities,\n\t\t\t\t{ kind, name, key, property },\n\t\t\t] );\n\t\t}\n\t};\n\n\tconst isDirty = dirtyEntityRecords.length - unselectedEntities.length > 0;\n\n\treturn {\n\t\tdirtyEntityRecords,\n\t\tisDirty,\n\t\tsetUnselectedEntities,\n\t\tunselectedEntities,\n\t};\n};\n", "/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tButton,\n\t__experimentalHStack as HStack,\n\t__experimentalText as Text,\n} from '@wordpress/components';\nimport { select } from '@wordpress/data';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { doAction } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction getContent() {\n\ttry {\n\t\t// While `select` in a component is generally discouraged, it is\n\t\t// used here because it (a) reduces the chance of data loss in the\n\t\t// case of additional errors by performing a direct retrieval and\n\t\t// (b) avoids the performance cost associated with unnecessary\n\t\t// content serialization throughout the lifetime of a non-erroring\n\t\t// application.\n\t\treturn select( editorStore ).getEditedPostContent();\n\t} catch ( error ) {}\n}\n\nfunction CopyButton( { text, children, variant = 'secondary' } ) {\n\tconst ref = useCopyToClipboard( text );\n\treturn (\n\t\t<Button __next40pxDefaultSize variant={ variant } ref={ ref }>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n\nclass ErrorBoundary extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\terror: null,\n\t\t};\n\t}\n\n\tcomponentDidCatch( error ) {\n\t\tdoAction( 'editor.ErrorBoundary.errorLogged', error );\n\t}\n\n\tstatic getDerivedStateFromError( error ) {\n\t\treturn { error };\n\t}\n\n\trender() {\n\t\tconst { error } = this.state;\n\t\tconst { canCopyContent = false } = this.props;\n\t\tif ( ! error ) {\n\t\t\treturn this.props.children;\n\t\t}\n\n\t\treturn (\n\t\t\t<HStack\n\t\t\t\tclassName=\"editor-error-boundary\"\n\t\t\t\talignment=\"baseline\"\n\t\t\t\tspacing={ 4 }\n\t\t\t\tjustify=\"space-between\"\n\t\t\t\texpanded={ false }\n\t\t\t\twrap\n\t\t\t>\n\t\t\t\t<Text as=\"p\">\n\t\t\t\t\t{ __( 'The editor has encountered an unexpected error.' ) }\n\t\t\t\t</Text>\n\t\t\t\t<HStack expanded={ false }>\n\t\t\t\t\t{ canCopyContent && (\n\t\t\t\t\t\t<CopyButton text={ getContent }>\n\t\t\t\t\t\t\t{ __( 'Copy contents' ) }\n\t\t\t\t\t\t</CopyButton>\n\t\t\t\t\t) }\n\t\t\t\t\t<CopyButton variant=\"primary\" text={ error?.stack }>\n\t\t\t\t\t\t{ __( 'Copy error' ) }\n\t\t\t\t\t</CopyButton>\n\t\t\t\t</HStack>\n\t\t\t</HStack>\n\t\t);\n\t}\n}\n\n/**\n * ErrorBoundary is used to catch JavaScript errors anywhere in a child component tree, log those errors, and display a fallback UI.\n *\n * It uses the lifecycle methods getDerivedStateFromError and componentDidCatch to catch errors in a child component tree.\n *\n * getDerivedStateFromError is used to render a fallback UI after an error has been thrown, and componentDidCatch is used to log error information.\n *\n * @class ErrorBoundary\n * @augments Component\n */\nexport default ErrorBoundary;\n", "/**\n * WordPress dependencies\n */\nimport { useCallback, useEffect, useRef } from '@wordpress/element';\nimport { ifCondition, usePrevious } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { parse } from '@wordpress/blocks';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport AutosaveMonitor from '../autosave-monitor';\nimport {\n\tlocalAutosaveGet,\n\tlocalAutosaveClear,\n} from '../../store/local-autosave';\nimport { store as editorStore } from '../../store';\n\nconst requestIdleCallback = window.requestIdleCallback\n\t? window.requestIdleCallback\n\t: window.requestAnimationFrame;\n\nlet hasStorageSupport;\n\n/**\n * Function which returns true if the current environment supports browser\n * sessionStorage, or false otherwise. The result of this function is cached and\n * reused in subsequent invocations.\n */\nconst hasSessionStorageSupport = () => {\n\tif ( hasStorageSupport !== undefined ) {\n\t\treturn hasStorageSupport;\n\t}\n\n\ttry {\n\t\t// Private Browsing in Safari 10 and earlier will throw an error when\n\t\t// attempting to set into sessionStorage. The test here is intentional in\n\t\t// causing a thrown error as condition bailing from local autosave.\n\t\twindow.sessionStorage.setItem( '__wpEditorTestSessionStorage', '' );\n\t\twindow.sessionStorage.removeItem( '__wpEditorTestSessionStorage' );\n\t\thasStorageSupport = true;\n\t} catch {\n\t\thasStorageSupport = false;\n\t}\n\n\treturn hasStorageSupport;\n};\n\n/**\n * Custom hook which manages the creation of a notice prompting the user to\n * restore a local autosave, if one exists.\n */\nfunction useAutosaveNotice() {\n\tconst { postId, isEditedPostNew, hasRemoteAutosave } = useSelect(\n\t\t( select ) => ( {\n\t\t\tpostId: select( editorStore ).getCurrentPostId(),\n\t\t\tisEditedPostNew: select( editorStore ).isEditedPostNew(),\n\t\t\thasRemoteAutosave:\n\t\t\t\t!! select( editorStore ).getEditorSettings().autosave,\n\t\t} ),\n\t\t[]\n\t);\n\tconst { getEditedPostAttribute } = useSelect( editorStore );\n\n\tconst { createWarningNotice, removeNotice } = useDispatch( noticesStore );\n\tconst { editPost, resetEditorBlocks } = useDispatch( editorStore );\n\n\tuseEffect( () => {\n\t\tlet localAutosave = localAutosaveGet( postId, isEditedPostNew );\n\t\tif ( ! localAutosave ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tlocalAutosave = JSON.parse( localAutosave );\n\t\t} catch {\n\t\t\t// Not usable if it can't be parsed.\n\t\t\treturn;\n\t\t}\n\n\t\tconst { post_title: title, content, excerpt } = localAutosave;\n\t\tconst edits = { title, content, excerpt };\n\n\t\t{\n\t\t\t// Only display a notice if there is a difference between what has been\n\t\t\t// saved and that which is stored in sessionStorage.\n\t\t\tconst hasDifference = Object.keys( edits ).some( ( key ) => {\n\t\t\t\treturn edits[ key ] !== getEditedPostAttribute( key );\n\t\t\t} );\n\n\t\t\tif ( ! hasDifference ) {\n\t\t\t\t// If there is no difference, it can be safely ejected from storage.\n\t\t\t\tlocalAutosaveClear( postId, isEditedPostNew );\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif ( hasRemoteAutosave ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst id = 'wpEditorAutosaveRestore';\n\n\t\tcreateWarningNotice(\n\t\t\t__(\n\t\t\t\t'The backup of this post in your browser is different from the version below.'\n\t\t\t),\n\t\t\t{\n\t\t\t\tid,\n\t\t\t\tactions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Restore the backup' ),\n\t\t\t\t\t\tonClick() {\n\t\t\t\t\t\t\tconst {\n\t\t\t\t\t\t\t\tcontent: editsContent,\n\t\t\t\t\t\t\t\t...editsWithoutContent\n\t\t\t\t\t\t\t} = edits;\n\t\t\t\t\t\t\teditPost( editsWithoutContent );\n\t\t\t\t\t\t\tresetEditorBlocks( parse( edits.content ) );\n\t\t\t\t\t\t\tremoveNotice( id );\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}\n\t\t);\n\t}, [ isEditedPostNew, postId ] );\n}\n\n/**\n * Custom hook which ejects a local autosave after a successful save occurs.\n */\nfunction useAutosavePurge() {\n\tconst { postId, isEditedPostNew, isDirty, isAutosaving, didError } =\n\t\tuseSelect(\n\t\t\t( select ) => ( {\n\t\t\t\tpostId: select( editorStore ).getCurrentPostId(),\n\t\t\t\tisEditedPostNew: select( editorStore ).isEditedPostNew(),\n\t\t\t\tisDirty: select( editorStore ).isEditedPostDirty(),\n\t\t\t\tisAutosaving: select( editorStore ).isAutosavingPost(),\n\t\t\t\tdidError: select( editorStore ).didPostSaveRequestFail(),\n\t\t\t} ),\n\t\t\t[]\n\t\t);\n\n\tconst lastIsDirtyRef = useRef( isDirty );\n\tconst lastIsAutosavingRef = useRef( isAutosaving );\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\t! didError &&\n\t\t\t( ( lastIsAutosavingRef.current && ! isAutosaving ) ||\n\t\t\t\t( lastIsDirtyRef.current && ! isDirty ) )\n\t\t) {\n\t\t\tlocalAutosaveClear( postId, isEditedPostNew );\n\t\t}\n\n\t\tlastIsDirtyRef.current = isDirty;\n\t\tlastIsAutosavingRef.current = isAutosaving;\n\t}, [ isDirty, isAutosaving, didError ] );\n\n\t// Once the isEditedPostNew changes from true to false, let's clear the auto-draft autosave.\n\tconst wasEditedPostNew = usePrevious( isEditedPostNew );\n\tconst prevPostId = usePrevious( postId );\n\tuseEffect( () => {\n\t\tif ( prevPostId === postId && wasEditedPostNew && ! isEditedPostNew ) {\n\t\t\tlocalAutosaveClear( postId, true );\n\t\t}\n\t}, [ isEditedPostNew, postId ] );\n}\n\nfunction LocalAutosaveMonitor() {\n\tconst { autosave } = useDispatch( editorStore );\n\tconst deferredAutosave = useCallback( () => {\n\t\trequestIdleCallback( () => autosave( { local: true } ) );\n\t}, [] );\n\tuseAutosaveNotice();\n\tuseAutosavePurge();\n\n\tconst localAutosaveInterval = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditorSettings().localAutosaveInterval,\n\t\t[]\n\t);\n\n\treturn (\n\t\t<AutosaveMonitor\n\t\t\tinterval={ localAutosaveInterval }\n\t\t\tautosave={ deferredAutosave }\n\t\t/>\n\t);\n}\n\n/**\n * Monitors local autosaves of a post in the editor.\n * It uses several hooks and functions to manage autosave behavior:\n * - `useAutosaveNotice` hook: Manages the creation of a notice prompting the user to restore a local autosave, if one exists.\n * - `useAutosavePurge` hook: Ejects a local autosave after a successful save occurs.\n * - `hasSessionStorageSupport` function: Checks if the current environment supports browser sessionStorage.\n * - `LocalAutosaveMonitor` component: Uses the `AutosaveMonitor` component to perform autosaves at a specified interval.\n *\n * The module also checks for sessionStorage support and conditionally exports the `LocalAutosaveMonitor` component based on that.\n *\n * @module LocalAutosaveMonitor\n */\nexport default ifCondition( hasSessionStorageSupport )( LocalAutosaveMonitor );\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Wrapper component that renders its children only if the post type supports page attributes.\n *\n * @param {Object} props - The component props.\n * @param {React.ReactNode} props.children - The child components to render.\n *\n * @return {React.ReactNode} The rendered child components or null if page attributes are not supported.\n */\nexport function PageAttributesCheck( { children } ) {\n\tconst supportsPageAttributes = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\t\tconst postType = getPostType( getEditedPostAttribute( 'type' ) );\n\n\t\treturn !! postType?.supports?.[ 'page-attributes' ];\n\t}, [] );\n\n\t// Only render fields if post type supports page attributes or available templates exist.\n\tif ( ! supportsPageAttributes ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default PageAttributesCheck;\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tFlex,\n\tFlexBlock,\n\t__experimentalNumberControl as NumberControl,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { store as editorStore } from '../../store';\n\nfunction PageAttributesOrder() {\n\tconst order = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditedPostAttribute( 'menu_order' ) ?? 0,\n\t\t[]\n\t);\n\tconst { editPost } = useDispatch( editorStore );\n\tconst [ orderInput, setOrderInput ] = useState( null );\n\n\tconst setUpdatedOrder = ( value ) => {\n\t\tsetOrderInput( value );\n\t\tconst newOrder = Number( value );\n\t\tif ( Number.isInteger( newOrder ) && value.trim?.() !== '' ) {\n\t\t\teditPost( { menu_order: newOrder } );\n\t\t}\n\t};\n\n\tconst value = orderInput ?? order;\n\n\treturn (\n\t\t<Flex>\n\t\t\t<FlexBlock>\n\t\t\t\t<NumberControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'Order' ) }\n\t\t\t\t\thelp={ __( 'Set the page order.' ) }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ setUpdatedOrder }\n\t\t\t\t\thideLabelFromVision\n\t\t\t\t\tonBlur={ () => {\n\t\t\t\t\t\tsetOrderInput( null );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</FlexBlock>\n\t\t</Flex>\n\t);\n}\n\n/**\n * Renders the Page Attributes Order component. A number input in an editor interface\n * for setting the order of a given page.\n * The component is now not used in core but was kept for backward compatibility.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PageAttributesOrderWithChecks() {\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"page-attributes\">\n\t\t\t<PageAttributesOrder />\n\t\t</PostTypeSupportCheck>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction checkSupport( supports = {}, key ) {\n\t// Check for top-level support keys.\n\tif ( supports[ key ] !== undefined ) {\n\t\treturn !! supports[ key ];\n\t}\n\n\tconst [ topKey, subKey ] = key.split( '.' );\n\t// Try to unwrap sub-properties from the superfluous array.\n\tconst [ subProperties ] = Array.isArray( supports[ topKey ] )\n\t\t? supports[ topKey ]\n\t\t: [];\n\n\treturn Array.isArray( subProperties )\n\t\t? subProperties.includes( subKey )\n\t\t: !! subProperties?.[ subKey ];\n}\n\n/**\n * A component which renders its own children only if the current editor post\n * type supports one of the given `supportKeys` prop.\n *\n * @param {Object} props Props.\n * @param {React.ReactNode} props.children Children to be rendered if post\n * type supports.\n * @param {(string|string[])} props.supportKeys String or string array of keys\n * to test.\n *\n * @return {React.ReactNode} The component to be rendered.\n */\nfunction PostTypeSupportCheck( { children, supportKeys } ) {\n\tconst postType = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\t\treturn getPostType( getEditedPostAttribute( 'type' ) );\n\t}, [] );\n\tlet isSupported = !! postType;\n\tif ( postType ) {\n\t\tisSupported = (\n\t\t\tArray.isArray( supportKeys ) ? supportKeys : [ supportKeys ]\n\t\t).some( ( key ) => checkSupport( postType.supports, key ) );\n\t}\n\n\tif ( ! isSupported ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default PostTypeSupportCheck;\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport PageAttributesCheck from './check';\nimport { ParentRow } from './parent';\n\nconst PANEL_NAME = 'page-attributes';\n\nfunction AttributesPanel() {\n\tconst { isEnabled, postType } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, isEditorPanelEnabled } =\n\t\t\tselect( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\t\treturn {\n\t\t\tisEnabled: isEditorPanelEnabled( PANEL_NAME ),\n\t\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\t};\n\t}, [] );\n\n\tif ( ! isEnabled || ! postType ) {\n\t\treturn null;\n\t}\n\n\treturn <ParentRow />;\n}\n\n/**\n * Renders the Page Attributes Panel component.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PageAttributesPanel() {\n\treturn (\n\t\t<PageAttributesCheck>\n\t\t\t<AttributesPanel />\n\t\t</PageAttributesCheck>\n\t);\n}\n", "/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tButton,\n\tDropdown,\n\tComboboxControl,\n\tExternalLink,\n} from '@wordpress/components';\nimport { debounce } from '@wordpress/compose';\nimport {\n\tcreateInterpolateElement,\n\tuseState,\n\tuseMemo,\n} from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\nimport { filterURLForDisplay } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport PostPanelRow from '../post-panel-row';\nimport { buildTermsTree } from '../../utils/terms';\nimport { store as editorStore } from '../../store';\n\nfunction getTitle( post ) {\n\treturn post?.title?.rendered\n\t\t? decodeEntities( post.title.rendered )\n\t\t: `#${ post.id } (${ __( 'no title' ) })`;\n}\n\nexport const getItemPriority = ( name, searchValue ) => {\n\tconst normalizedName = removeAccents( name || '' ).toLowerCase();\n\tconst normalizedSearch = removeAccents( searchValue || '' ).toLowerCase();\n\tif ( normalizedName === normalizedSearch ) {\n\t\treturn 0;\n\t}\n\n\tif ( normalizedName.startsWith( normalizedSearch ) ) {\n\t\treturn normalizedName.length;\n\t}\n\n\treturn Infinity;\n};\n\n/**\n * Renders the Page Attributes Parent component. A dropdown menu in an editor interface\n * for selecting the parent page of a given page.\n *\n * @return {React.ReactNode} The component to be rendered. Return null if post type is not hierarchical.\n */\nexport function PageAttributesParent() {\n\tconst { editPost } = useDispatch( editorStore );\n\tconst [ fieldValue, setFieldValue ] = useState( false );\n\tconst {\n\t\tisHierarchical,\n\t\tparentPostId,\n\t\tparentPostTitle,\n\t\tpageItems,\n\t\tisLoading,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetPostType,\n\t\t\t\tgetEntityRecords,\n\t\t\t\tgetEntityRecord,\n\t\t\t\tisResolving,\n\t\t\t} = select( coreStore );\n\t\t\tconst { getCurrentPostId, getEditedPostAttribute } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst postTypeSlug = getEditedPostAttribute( 'type' );\n\t\t\tconst pageId = getEditedPostAttribute( 'parent' );\n\t\t\tconst pType = getPostType( postTypeSlug );\n\t\t\tconst postId = getCurrentPostId();\n\t\t\tconst postIsHierarchical = pType?.hierarchical ?? false;\n\t\t\tconst query = {\n\t\t\t\tper_page: 100,\n\t\t\t\texclude: postId,\n\t\t\t\tparent_exclude: postId,\n\t\t\t\torderby: 'menu_order',\n\t\t\t\torder: 'asc',\n\t\t\t\t_fields: 'id,title,parent',\n\t\t\t};\n\n\t\t\t// Perform a search by relevance when the field is changed.\n\t\t\tif ( !! fieldValue ) {\n\t\t\t\tquery.search = fieldValue;\n\t\t\t\tquery.orderby = 'relevance';\n\t\t\t}\n\n\t\t\tconst parentPost = pageId\n\t\t\t\t? getEntityRecord( 'postType', postTypeSlug, pageId )\n\t\t\t\t: null;\n\n\t\t\treturn {\n\t\t\t\tisHierarchical: postIsHierarchical,\n\t\t\t\tparentPostId: pageId,\n\t\t\t\tparentPostTitle: parentPost ? getTitle( parentPost ) : '',\n\t\t\t\tpageItems: postIsHierarchical\n\t\t\t\t\t? getEntityRecords( 'postType', postTypeSlug, query )\n\t\t\t\t\t: null,\n\t\t\t\tisLoading: postIsHierarchical\n\t\t\t\t\t? isResolving( 'getEntityRecords', [\n\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\tpostTypeSlug,\n\t\t\t\t\t\t\tquery,\n\t\t\t\t\t ] )\n\t\t\t\t\t: false,\n\t\t\t};\n\t\t},\n\t\t[ fieldValue ]\n\t);\n\n\tconst parentOptions = useMemo( () => {\n\t\tconst getOptionsFromTree = ( tree, level = 0 ) => {\n\t\t\tconst mappedNodes = tree.map( ( treeNode ) => [\n\t\t\t\t{\n\t\t\t\t\tvalue: treeNode.id,\n\t\t\t\t\tlabel:\n\t\t\t\t\t\t'\u2014 '.repeat( level ) + decodeEntities( treeNode.name ),\n\t\t\t\t\trawName: treeNode.name,\n\t\t\t\t},\n\t\t\t\t...getOptionsFromTree( treeNode.children || [], level + 1 ),\n\t\t\t] );\n\n\t\t\tconst sortedNodes = mappedNodes.sort( ( [ a ], [ b ] ) => {\n\t\t\t\tconst priorityA = getItemPriority( a.rawName, fieldValue );\n\t\t\t\tconst priorityB = getItemPriority( b.rawName, fieldValue );\n\t\t\t\treturn priorityA >= priorityB ? 1 : -1;\n\t\t\t} );\n\n\t\t\treturn sortedNodes.flat();\n\t\t};\n\n\t\tif ( ! pageItems ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet tree = pageItems.map( ( item ) => ( {\n\t\t\tid: item.id,\n\t\t\tparent: item.parent,\n\t\t\tname: getTitle( item ),\n\t\t} ) );\n\n\t\t// Only build a hierarchical tree when not searching.\n\t\tif ( ! fieldValue ) {\n\t\t\ttree = buildTermsTree( tree );\n\t\t}\n\n\t\tconst opts = getOptionsFromTree( tree );\n\n\t\t// Ensure the current parent is in the options list.\n\t\tconst optsHasParent = opts.find(\n\t\t\t( item ) => item.value === parentPostId\n\t\t);\n\t\tif ( parentPostTitle && ! optsHasParent ) {\n\t\t\topts.unshift( {\n\t\t\t\tvalue: parentPostId,\n\t\t\t\tlabel: parentPostTitle,\n\t\t\t} );\n\t\t}\n\t\treturn opts;\n\t}, [ pageItems, fieldValue, parentPostTitle, parentPostId ] );\n\n\tif ( ! isHierarchical ) {\n\t\treturn null;\n\t}\n\t/**\n\t * Handle user input.\n\t *\n\t * @param {string} inputValue The current value of the input field.\n\t */\n\tconst handleKeydown = ( inputValue ) => {\n\t\tsetFieldValue( inputValue );\n\t};\n\n\t/**\n\t * Handle author selection.\n\t *\n\t * @param {Object} selectedPostId The selected Author.\n\t */\n\tconst handleChange = ( selectedPostId ) => {\n\t\teditPost( { parent: selectedPostId } );\n\t};\n\n\treturn (\n\t\t<ComboboxControl\n\t\t\t__next40pxDefaultSize\n\t\t\tclassName=\"editor-page-attributes__parent\"\n\t\t\tlabel={ __( 'Parent' ) }\n\t\t\thelp={ __( 'Choose a parent page.' ) }\n\t\t\tvalue={ parentPostId }\n\t\t\toptions={ parentOptions }\n\t\t\tonFilterValueChange={ debounce( handleKeydown, 300 ) }\n\t\t\tonChange={ handleChange }\n\t\t\thideLabelFromVision\n\t\t\tisLoading={ isLoading }\n\t\t/>\n\t);\n}\n\nfunction PostParentToggle( { isOpen, onClick } ) {\n\tconst parentPost = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst parentPostId = getEditedPostAttribute( 'parent' );\n\t\tif ( ! parentPostId ) {\n\t\t\treturn null;\n\t\t}\n\t\tconst { getEntityRecord } = select( coreStore );\n\t\tconst postTypeSlug = getEditedPostAttribute( 'type' );\n\t\treturn getEntityRecord( 'postType', postTypeSlug, parentPostId );\n\t}, [] );\n\tconst parentTitle = useMemo(\n\t\t() => ( ! parentPost ? __( 'None' ) : getTitle( parentPost ) ),\n\t\t[ parentPost ]\n\t);\n\treturn (\n\t\t<Button\n\t\t\tsize=\"compact\"\n\t\t\tclassName=\"editor-post-parent__panel-toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-expanded={ isOpen }\n\t\t\taria-label={\n\t\t\t\t// translators: %s: Current post parent.\n\t\t\t\tsprintf( __( 'Change parent: %s' ), parentTitle )\n\t\t\t}\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ parentTitle }\n\t\t</Button>\n\t);\n}\n\nexport function ParentRow() {\n\tconst homeUrl = useSelect( ( select ) => {\n\t\t// Site index.\n\t\treturn select( coreStore ).getEntityRecord( 'root', '__unstableBase' )\n\t\t\t?.home;\n\t}, [] );\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\treturn (\n\t\t<PostPanelRow label={ __( 'Parent' ) } ref={ setPopoverAnchor }>\n\t\t\t<Dropdown\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\tclassName=\"editor-post-parent__panel-dropdown\"\n\t\t\t\tcontentClassName=\"editor-post-parent__panel-dialog\"\n\t\t\t\tfocusOnMount\n\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t<PostParentToggle isOpen={ isOpen } onClick={ onToggle } />\n\t\t\t\t) }\n\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t<div className=\"editor-post-parent\">\n\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\ttitle={ __( 'Parent' ) }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %s: The home URL of the WordPress installation without the scheme. */\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'Child pages inherit characteristics from their parent, such as URL structure. For instance, if \"Pricing\" is a child of \"Services\", its URL would be %s<wbr />/services<wbr />/pricing.'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tfilterURLForDisplay( homeUrl ).replace(\n\t\t\t\t\t\t\t\t\t\t/([/.])/g,\n\t\t\t\t\t\t\t\t\t\t'<wbr />$1'\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\twbr: <wbr />,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'They also show up as sub-items in the default navigation menu. <a>Learn more.</a>'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ta: (\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<PageAttributesParent />\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t/>\n\t\t</PostPanelRow>\n\t);\n}\n\nexport default PageAttributesParent;\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack } from '@wordpress/components';\nimport { forwardRef } from '@wordpress/element';\n\nconst PostPanelRow = forwardRef( ( { className, label, children }, ref ) => {\n\treturn (\n\t\t<HStack\n\t\t\tclassName={ clsx( 'editor-post-panel__row', className ) }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ label && (\n\t\t\t\t<div className=\"editor-post-panel__row-label\">{ label }</div>\n\t\t\t) }\n\t\t\t<div className=\"editor-post-panel__row-control\">{ children }</div>\n\t\t</HStack>\n\t);\n} );\n\nexport default PostPanelRow;\n", "/**\n * WordPress dependencies\n */\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Returns terms in a tree form.\n *\n * @param {Array} flatTerms Array of terms in flat format.\n *\n * @return {Array} Array of terms in tree format.\n */\nexport function buildTermsTree( flatTerms ) {\n\tconst flatTermsWithParentAndChildren = flatTerms.map( ( term ) => {\n\t\treturn {\n\t\t\tchildren: [],\n\t\t\tparent: undefined,\n\t\t\t...term,\n\t\t};\n\t} );\n\n\t// All terms should have a `parent` because we're about to index them by it.\n\tif (\n\t\tflatTermsWithParentAndChildren.some(\n\t\t\t( { parent } ) => parent === undefined\n\t\t)\n\t) {\n\t\treturn flatTermsWithParentAndChildren;\n\t}\n\n\tconst termsByParent = flatTermsWithParentAndChildren.reduce(\n\t\t( acc, term ) => {\n\t\t\tconst { parent } = term;\n\t\t\tif ( ! acc[ parent ] ) {\n\t\t\t\tacc[ parent ] = [];\n\t\t\t}\n\t\t\tacc[ parent ].push( term );\n\t\t\treturn acc;\n\t\t},\n\t\t{}\n\t);\n\n\tconst fillWithChildren = ( terms ) => {\n\t\treturn terms.map( ( term ) => {\n\t\t\tconst children = termsByParent[ term.id ];\n\t\t\treturn {\n\t\t\t\t...term,\n\t\t\t\tchildren:\n\t\t\t\t\tchildren && children.length\n\t\t\t\t\t\t? fillWithChildren( children )\n\t\t\t\t\t\t: [],\n\t\t\t};\n\t\t} );\n\t};\n\n\treturn fillWithChildren( termsByParent[ '0' ] || [] );\n}\n\nexport const unescapeString = ( arg ) => {\n\treturn decodeEntities( arg );\n};\n\n/**\n * Returns a term object with name unescaped.\n *\n * @param {Object} term The term object to unescape.\n *\n * @return {Object} Term object with name property unescaped.\n */\nexport const unescapeTerm = ( term ) => {\n\treturn {\n\t\t...term,\n\t\tname: unescapeString( term.name ),\n\t};\n};\n\n/**\n * Returns an array of term objects with names unescaped.\n * The unescape of each term is performed using the unescapeTerm function.\n *\n * @param {Object[]} terms Array of term objects to unescape.\n *\n * @return {Object[]} Array of term objects unescaped.\n */\nexport const unescapeTerms = ( terms ) => {\n\treturn ( terms ?? [] ).map( unescapeTerm );\n};\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { SelectControl, Dropdown, Button, Notice } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\nimport { useState, useMemo } from '@wordpress/element';\nimport { addTemplate } from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport CreateNewTemplateModal from './create-new-template-modal';\nimport { useAllowSwitchingTemplates } from './hooks';\nimport PostPanelRow from '../post-panel-row';\n\nfunction PostTemplateToggle( { isOpen, onClick } ) {\n\tconst templateTitle = useSelect( ( select ) => {\n\t\tconst templateSlug =\n\t\t\tselect( editorStore ).getEditedPostAttribute( 'template' );\n\n\t\tconst { supportsTemplateMode, availableTemplates } =\n\t\t\tselect( editorStore ).getEditorSettings();\n\t\tif ( ! supportsTemplateMode && availableTemplates[ templateSlug ] ) {\n\t\t\treturn availableTemplates[ templateSlug ];\n\t\t}\n\t\tconst template =\n\t\t\tselect( coreStore ).canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} ) && select( editorStore ).getCurrentTemplateId();\n\t\treturn (\n\t\t\ttemplate?.title ||\n\t\t\ttemplate?.slug ||\n\t\t\tavailableTemplates?.[ templateSlug ]\n\t\t);\n\t}, [] );\n\n\treturn (\n\t\t<Button\n\t\t\t__next40pxDefaultSize\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-expanded={ isOpen }\n\t\t\taria-label={ __( 'Template options' ) }\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ templateTitle ?? __( 'Default template' ) }\n\t\t</Button>\n\t);\n}\n\n/**\n * Renders the dropdown content for selecting a post template.\n *\n * @param {Object} props The component props.\n * @param {Function} props.onClose The function to close the dropdown.\n *\n * @return {React.ReactNode} The rendered dropdown content.\n */\nfunction PostTemplateDropdownContent( { onClose } ) {\n\tconst allowSwitchingTemplate = useAllowSwitchingTemplates();\n\tconst {\n\t\tavailableTemplates,\n\t\tfetchedTemplates,\n\t\tselectedTemplateSlug,\n\t\tcanCreate,\n\t\tcanEdit,\n\t\tcurrentTemplateId,\n\t\tonNavigateToEntityRecord,\n\t\tgetEditorSettings,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst { canUser, getEntityRecords } = select( coreStore );\n\t\t\tconst editorSettings = select( editorStore ).getEditorSettings();\n\t\t\tconst canCreateTemplates = canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} );\n\t\t\tconst _currentTemplateId =\n\t\t\t\tselect( editorStore ).getCurrentTemplateId();\n\t\t\treturn {\n\t\t\t\tavailableTemplates: editorSettings.availableTemplates,\n\t\t\t\tfetchedTemplates: canCreateTemplates\n\t\t\t\t\t? getEntityRecords( 'postType', 'wp_template', {\n\t\t\t\t\t\t\tpost_type:\n\t\t\t\t\t\t\t\tselect( editorStore ).getCurrentPostType(),\n\t\t\t\t\t\t\tper_page: -1,\n\t\t\t\t\t } )\n\t\t\t\t\t: undefined,\n\t\t\t\tselectedTemplateSlug:\n\t\t\t\t\tselect( editorStore ).getEditedPostAttribute( 'template' ),\n\t\t\t\tcanCreate:\n\t\t\t\t\tallowSwitchingTemplate &&\n\t\t\t\t\tcanCreateTemplates &&\n\t\t\t\t\teditorSettings.supportsTemplateMode,\n\t\t\t\tcanEdit:\n\t\t\t\t\tallowSwitchingTemplate &&\n\t\t\t\t\tcanCreateTemplates &&\n\t\t\t\t\teditorSettings.supportsTemplateMode &&\n\t\t\t\t\t!! _currentTemplateId,\n\t\t\t\tcurrentTemplateId: _currentTemplateId,\n\t\t\t\tonNavigateToEntityRecord:\n\t\t\t\t\teditorSettings.onNavigateToEntityRecord,\n\t\t\t\tgetEditorSettings: select( editorStore ).getEditorSettings,\n\t\t\t};\n\t\t},\n\t\t[ allowSwitchingTemplate ]\n\t);\n\n\tconst options = useMemo(\n\t\t() =>\n\t\t\tObject.entries( {\n\t\t\t\t...availableTemplates,\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\t( fetchedTemplates ?? [] ).map( ( { slug, title } ) => [\n\t\t\t\t\t\tslug,\n\t\t\t\t\t\ttitle.rendered,\n\t\t\t\t\t] )\n\t\t\t\t),\n\t\t\t} ).map( ( [ slug, title ] ) => ( { value: slug, label: title } ) ),\n\t\t[ availableTemplates, fetchedTemplates ]\n\t);\n\n\tconst selectedOption =\n\t\toptions.find( ( option ) => option.value === selectedTemplateSlug ) ??\n\t\toptions.find( ( option ) => ! option.value ); // The default option has '' value.\n\n\tconst { editPost } = useDispatch( editorStore );\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\tconst [ isCreateModalOpen, setIsCreateModalOpen ] = useState( false );\n\n\treturn (\n\t\t<div className=\"editor-post-template__classic-theme-dropdown\">\n\t\t\t<InspectorPopoverHeader\n\t\t\t\ttitle={ __( 'Template' ) }\n\t\t\t\thelp={ __(\n\t\t\t\t\t'Templates define the way content is displayed when viewing your site.'\n\t\t\t\t) }\n\t\t\t\tactions={\n\t\t\t\t\tcanCreate\n\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ticon: addTemplate,\n\t\t\t\t\t\t\t\t\tlabel: __( 'Add template' ),\n\t\t\t\t\t\t\t\t\tonClick: () => setIsCreateModalOpen( true ),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t ]\n\t\t\t\t\t\t: []\n\t\t\t\t}\n\t\t\t\tonClose={ onClose }\n\t\t\t/>\n\t\t\t{ ! allowSwitchingTemplate ? (\n\t\t\t\t<Notice status=\"warning\" isDismissible={ false }>\n\t\t\t\t\t{ __( 'The posts page template cannot be changed.' ) }\n\t\t\t\t</Notice>\n\t\t\t) : (\n\t\t\t\t<SelectControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\thideLabelFromVision\n\t\t\t\t\tlabel={ __( 'Template' ) }\n\t\t\t\t\tvalue={ selectedOption?.value ?? '' }\n\t\t\t\t\toptions={ options }\n\t\t\t\t\tonChange={ ( slug ) =>\n\t\t\t\t\t\teditPost( { template: slug || '' } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ canEdit && onNavigateToEntityRecord && (\n\t\t\t\t<p>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tonNavigateToEntityRecord( {\n\t\t\t\t\t\t\t\tpostId: currentTemplateId,\n\t\t\t\t\t\t\t\tpostType: 'wp_template',\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\tcreateSuccessNotice(\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'Editing template. Changes made here affect all posts and pages that use the template.'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tlabel: __( 'Go back' ),\n\t\t\t\t\t\t\t\t\t\t\tonClick: () =>\n\t\t\t\t\t\t\t\t\t\t\t\tgetEditorSettings().onNavigateToPreviousEntityRecord(),\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Edit template' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</p>\n\t\t\t) }\n\t\t\t{ isCreateModalOpen && (\n\t\t\t\t<CreateNewTemplateModal\n\t\t\t\t\tonClose={ () => setIsCreateModalOpen( false ) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nfunction ClassicThemeControl() {\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tclassName: 'editor-post-template__dropdown',\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\treturn (\n\t\t<PostPanelRow label={ __( 'Template' ) } ref={ setPopoverAnchor }>\n\t\t\t<Dropdown\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\tfocusOnMount\n\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t<PostTemplateToggle\n\t\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t<PostTemplateDropdownContent onClose={ onClose } />\n\t\t\t\t) }\n\t\t\t/>\n\t\t</PostPanelRow>\n\t);\n}\n\n/**\n * Provides a dropdown menu for selecting and managing post templates.\n *\n * The dropdown menu includes a button for toggling the menu, a list of available templates, and options for creating and editing templates.\n *\n * @return {React.ReactNode} The rendered ClassicThemeControl component.\n */\nexport default ClassicThemeControl;\n", "/**\n * External dependencies\n */\nimport { paramCase as kebabCase } from 'change-case';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport { serialize, createBlock } from '@wordpress/blocks';\nimport {\n\tModal,\n\tTextControl,\n\tButton,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst DEFAULT_TITLE = __( 'Custom Template' );\n\nexport default function CreateNewTemplateModal( { onClose } ) {\n\tconst { defaultBlockTemplate, onNavigateToEntityRecord } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditorSettings, getCurrentTemplateId } =\n\t\t\t\tselect( editorStore );\n\t\t\treturn {\n\t\t\t\tdefaultBlockTemplate: getEditorSettings().defaultBlockTemplate,\n\t\t\t\tonNavigateToEntityRecord:\n\t\t\t\t\tgetEditorSettings().onNavigateToEntityRecord,\n\t\t\t\tgetTemplateId: getCurrentTemplateId,\n\t\t\t};\n\t\t}\n\t);\n\n\tconst { createTemplate } = unlock( useDispatch( editorStore ) );\n\n\tconst [ title, setTitle ] = useState( '' );\n\n\tconst [ isBusy, setIsBusy ] = useState( false );\n\n\tconst cancel = () => {\n\t\tsetTitle( '' );\n\t\tonClose();\n\t};\n\n\tconst submit = async ( event ) => {\n\t\tevent.preventDefault();\n\n\t\tif ( isBusy ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetIsBusy( true );\n\n\t\tconst newTemplateContent =\n\t\t\tdefaultBlockTemplate ??\n\t\t\tserialize( [\n\t\t\t\tcreateBlock(\n\t\t\t\t\t'core/group',\n\t\t\t\t\t{\n\t\t\t\t\t\ttagName: 'header',\n\t\t\t\t\t\tlayout: { inherit: true },\n\t\t\t\t\t},\n\t\t\t\t\t[\n\t\t\t\t\t\tcreateBlock( 'core/site-title' ),\n\t\t\t\t\t\tcreateBlock( 'core/site-tagline' ),\n\t\t\t\t\t]\n\t\t\t\t),\n\t\t\t\tcreateBlock( 'core/separator' ),\n\t\t\t\tcreateBlock(\n\t\t\t\t\t'core/group',\n\t\t\t\t\t{\n\t\t\t\t\t\ttagName: 'main',\n\t\t\t\t\t},\n\t\t\t\t\t[\n\t\t\t\t\t\tcreateBlock(\n\t\t\t\t\t\t\t'core/group',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlayout: { inherit: true },\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t[ createBlock( 'core/post-title' ) ]\n\t\t\t\t\t\t),\n\t\t\t\t\t\tcreateBlock( 'core/post-content', {\n\t\t\t\t\t\t\tlayout: { inherit: true },\n\t\t\t\t\t\t} ),\n\t\t\t\t\t]\n\t\t\t\t),\n\t\t\t] );\n\n\t\tconst newTemplate = await createTemplate( {\n\t\t\tslug: kebabCase( title || DEFAULT_TITLE ) || 'wp-custom-template',\n\t\t\tcontent: newTemplateContent,\n\t\t\ttitle: title || DEFAULT_TITLE,\n\t\t\tstatus: 'publish',\n\t\t} );\n\n\t\tsetIsBusy( false );\n\t\tonNavigateToEntityRecord( {\n\t\t\tpostId: newTemplate.id,\n\t\t\tpostType: 'wp_template',\n\t\t} );\n\t\tcancel();\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ __( 'Create custom template' ) }\n\t\t\tonRequestClose={ cancel }\n\t\t\tfocusOnMount=\"firstContentElement\"\n\t\t\tsize=\"small\"\n\t\t\toverlayClassName=\"editor-post-template__create-template-modal\"\n\t\t>\n\t\t\t<form\n\t\t\t\tclassName=\"editor-post-template__create-form\"\n\t\t\t\tonSubmit={ submit }\n\t\t\t>\n\t\t\t\t<VStack spacing=\"3\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\t\tvalue={ title }\n\t\t\t\t\t\tonChange={ setTitle }\n\t\t\t\t\t\tplaceholder={ DEFAULT_TITLE }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t// eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts\n\t\t\t\t\t\t\t'Describe the template, e.g. \"Post with sidebar\". A custom template can be manually applied to any post or page.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ cancel }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t</Button>\n\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\tisBusy={ isBusy }\n\t\t\t\t\t\t\taria-disabled={ isBusy }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Create' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</VStack>\n\t\t\t</form>\n\t\t</Modal>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport function useEditedPostContext() {\n\treturn useSelect( ( select ) => {\n\t\tconst { getCurrentPostId, getCurrentPostType } = select( editorStore );\n\t\treturn {\n\t\t\tpostId: getCurrentPostId(),\n\t\t\tpostType: getCurrentPostType(),\n\t\t};\n\t}, [] );\n}\nexport function useAllowSwitchingTemplates() {\n\tconst { postType, postId } = useEditedPostContext();\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst { canUser, getEntityRecord, getEntityRecords } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst siteSettings = canUser( 'read', {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'site',\n\t\t\t} )\n\t\t\t\t? getEntityRecord( 'root', 'site' )\n\t\t\t\t: undefined;\n\n\t\t\tconst isPostsPage = +postId === siteSettings?.page_for_posts;\n\t\t\tconst isFrontPage =\n\t\t\t\tpostType === 'page' && +postId === siteSettings?.page_on_front;\n\t\t\t// If current page is set front page or posts page, we also need\n\t\t\t// to check if the current theme has a template for it. If not\n\t\t\tconst templates = isFrontPage\n\t\t\t\t? getEntityRecords( 'postType', 'wp_template', {\n\t\t\t\t\t\tper_page: -1,\n\t\t\t\t } )\n\t\t\t\t: [];\n\t\t\tconst hasFrontPage =\n\t\t\t\tisFrontPage &&\n\t\t\t\t!! templates?.some( ( { slug } ) => slug === 'front-page' );\n\t\t\treturn ! isPostsPage && ! hasFrontPage;\n\t\t},\n\t\t[ postId, postType ]\n\t);\n}\n\nfunction useTemplates( postType ) {\n\treturn useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityRecords( 'postType', 'wp_template', {\n\t\t\t\tper_page: -1,\n\t\t\t\tpost_type: postType,\n\t\t\t\t// We look at the combined templates for now (old endpoint)\n\t\t\t\t// because posts only accept slugs for templates, not IDs.\n\t\t\t} ),\n\t\t[ postType ]\n\t);\n}\n\nexport function useAvailableTemplates( postType ) {\n\tconst currentTemplateSlug = useCurrentTemplateSlug();\n\tconst allowSwitchingTemplate = useAllowSwitchingTemplates();\n\tconst templates = useTemplates( postType );\n\treturn useMemo(\n\t\t() =>\n\t\t\tallowSwitchingTemplate &&\n\t\t\ttemplates?.filter(\n\t\t\t\t( template ) =>\n\t\t\t\t\ttemplate.is_custom &&\n\t\t\t\t\ttemplate.slug !== currentTemplateSlug &&\n\t\t\t\t\t!! template.content.raw // Skip empty templates.\n\t\t\t),\n\t\t[ templates, currentTemplateSlug, allowSwitchingTemplate ]\n\t);\n}\n\nexport function useCurrentTemplateSlug() {\n\tconst { postType, postId } = useEditedPostContext();\n\tconst templates = useTemplates( postType );\n\tconst entityTemplate = useSelect(\n\t\t( select ) => {\n\t\t\tconst post = select( coreStore ).getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t);\n\t\t\treturn post?.template;\n\t\t},\n\t\t[ postType, postId ]\n\t);\n\n\tif ( ! entityTemplate ) {\n\t\treturn;\n\t}\n\t// If a page has a `template` set and is not included in the list\n\t// of the theme's templates, do not return it, in order to resolve\n\t// to the current theme's default template.\n\treturn templates?.find( ( template ) => template.slug === entityTemplate )\n\t\t?.slug;\n}\n", "/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelBody } from '@wordpress/components';\nimport { usePluginContext } from '@wordpress/plugins';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport EnablePluginDocumentSettingPanelOption from '../preferences-modal/enable-plugin-document-setting-panel';\nimport { store as editorStore } from '../../store';\n\nconst { Fill, Slot } = createSlotFill( 'PluginDocumentSettingPanel' );\n\n/**\n * Renders items below the Status & Availability panel in the Document Sidebar.\n *\n * @param {Object} props Component properties.\n * @param {string} props.name Required. A machine-friendly name for the panel.\n * @param {string} [props.className] An optional class name added to the row.\n * @param {string} [props.title] The title of the panel\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n * @param {React.ReactNode} props.children Children to be rendered\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var el = React.createElement;\n * var __ = wp.i18n.__;\n * var registerPlugin = wp.plugins.registerPlugin;\n * var PluginDocumentSettingPanel = wp.editor.PluginDocumentSettingPanel;\n *\n * function MyDocumentSettingPlugin() {\n * \treturn el(\n * \t\tPluginDocumentSettingPanel,\n * \t\t{\n * \t\t\tclassName: 'my-document-setting-plugin',\n * \t\t\ttitle: 'My Panel',\n * \t\t\tname: 'my-panel',\n * \t\t},\n * \t\t__( 'My Document Setting Panel' )\n * \t);\n * }\n *\n * registerPlugin( 'my-document-setting-plugin', {\n * \t\trender: MyDocumentSettingPlugin\n * } );\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { registerPlugin } from '@wordpress/plugins';\n * import { PluginDocumentSettingPanel } from '@wordpress/editor';\n *\n * const MyDocumentSettingTest = () => (\n * \t\t<PluginDocumentSettingPanel className=\"my-document-setting-plugin\" title=\"My Panel\" name=\"my-panel\">\n *\t\t\t<p>My Document Setting Panel</p>\n *\t\t</PluginDocumentSettingPanel>\n *\t);\n *\n * registerPlugin( 'document-setting-test', { render: MyDocumentSettingTest } );\n * ```\n *\n * @return {React.ReactNode} The component to be rendered.\n */\nconst PluginDocumentSettingPanel = ( {\n\tname,\n\tclassName,\n\ttitle,\n\ticon,\n\tchildren,\n} ) => {\n\tconst { name: pluginName } = usePluginContext();\n\tconst panelName = `${ pluginName }/${ name }`;\n\tconst { opened, isEnabled } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isEditorPanelOpened, isEditorPanelEnabled } =\n\t\t\t\tselect( editorStore );\n\n\t\t\treturn {\n\t\t\t\topened: isEditorPanelOpened( panelName ),\n\t\t\t\tisEnabled: isEditorPanelEnabled( panelName ),\n\t\t\t};\n\t\t},\n\t\t[ panelName ]\n\t);\n\tconst { toggleEditorPanelOpened } = useDispatch( editorStore );\n\n\tif ( undefined === name ) {\n\t\twarning( 'PluginDocumentSettingPanel requires a name property.' );\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<EnablePluginDocumentSettingPanelOption\n\t\t\t\tlabel={ title }\n\t\t\t\tpanelName={ panelName }\n\t\t\t/>\n\t\t\t<Fill>\n\t\t\t\t{ isEnabled && (\n\t\t\t\t\t<PanelBody\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\topened={ opened }\n\t\t\t\t\t\tonToggle={ () => toggleEditorPanelOpened( panelName ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</PanelBody>\n\t\t\t\t) }\n\t\t\t</Fill>\n\t\t</>\n\t);\n};\n\nPluginDocumentSettingPanel.Slot = Slot;\n\nexport default PluginDocumentSettingPanel;\n", "/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport EnablePanelOption from './enable-panel';\n\nconst { Fill, Slot } = createSlotFill(\n\t'EnablePluginDocumentSettingPanelOption'\n);\n\nconst EnablePluginDocumentSettingPanelOption = ( { label, panelName } ) => (\n\t<Fill>\n\t\t<EnablePanelOption label={ label } panelName={ panelName } />\n\t</Fill>\n);\n\nEnablePluginDocumentSettingPanelOption.Slot = Slot;\n\nexport default EnablePluginDocumentSettingPanelOption;\n", "/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { privateApis as preferencesPrivateApis } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst { PreferenceBaseOption } = unlock( preferencesPrivateApis );\n\nexport default function EnablePanelOption( props ) {\n\tconst { toggleEditorPanelEnabled } = useDispatch( editorStore );\n\tconst { isChecked, isRemoved } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isEditorPanelEnabled, isEditorPanelRemoved } =\n\t\t\t\tselect( editorStore );\n\t\t\treturn {\n\t\t\t\tisChecked: isEditorPanelEnabled( props.panelName ),\n\t\t\t\tisRemoved: isEditorPanelRemoved( props.panelName ),\n\t\t\t};\n\t\t},\n\t\t[ props.panelName ]\n\t);\n\n\tif ( isRemoved ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PreferenceBaseOption\n\t\t\tisChecked={ isChecked }\n\t\t\tonChange={ () => toggleEditorPanelEnabled( props.panelName ) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { BlockSettingsMenuControls } from '@wordpress/block-editor';\nimport { MenuItem } from '@wordpress/components';\nimport { compose } from '@wordpress/compose';\n\nconst isEverySelectedBlockAllowed = ( selected, allowed ) =>\n\tselected.filter( ( id ) => ! allowed.includes( id ) ).length === 0;\n\n/**\n * Plugins may want to add an item to the menu either for every block\n * or only for the specific ones provided in the `allowedBlocks` component property.\n *\n * If there are multiple blocks selected the item will be rendered if every block\n * is of one allowed type (not necessarily the same).\n *\n * @param {string[]} selectedBlocks Array containing the names of the blocks selected\n * @param {string[]} allowedBlocks Array containing the names of the blocks allowed\n * @return {boolean} Whether the item will be rendered or not.\n */\nconst shouldRenderItem = ( selectedBlocks, allowedBlocks ) =>\n\t! Array.isArray( allowedBlocks ) ||\n\tisEverySelectedBlockAllowed( selectedBlocks, allowedBlocks );\n\n/**\n * Renders a new item in the block settings menu.\n *\n * @param {Object} props Component props.\n * @param {Array} [props.allowedBlocks] An array containing a list of block names for which the item should be shown. If not present, it'll be rendered for any block. If multiple blocks are selected, it'll be shown if and only if all of them are in the allowed list.\n * @param {WPBlockTypeIconRender} [props.icon] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element.\n * @param {string} props.label The menu item text.\n * @param {Function} props.onClick Callback function to be executed when the user click the menu item.\n * @param {boolean} [props.small] Whether to render the label or not.\n * @param {string} [props.role] The ARIA role for the menu item.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginBlockSettingsMenuItem = wp.editor.PluginBlockSettingsMenuItem;\n *\n * function doOnClick(){\n * \t// To be called when the user clicks the menu item.\n * }\n *\n * function MyPluginBlockSettingsMenuItem() {\n * \treturn React.createElement(\n * \t\tPluginBlockSettingsMenuItem,\n * \t\t{\n * \t\t\tallowedBlocks: [ 'core/paragraph' ],\n * \t\t\ticon: 'dashicon-name',\n * \t\t\tlabel: __( 'Menu item text' ),\n * \t\t\tonClick: doOnClick,\n * \t\t}\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginBlockSettingsMenuItem } from '@wordpress/editor';\n *\n * const doOnClick = ( ) => {\n * // To be called when the user clicks the menu item.\n * };\n *\n * const MyPluginBlockSettingsMenuItem = () => (\n * <PluginBlockSettingsMenuItem\n * \t\tallowedBlocks={ [ 'core/paragraph' ] }\n * \t\ticon='dashicon-name'\n * \t\tlabel={ __( 'Menu item text' ) }\n * \t\tonClick={ doOnClick } />\n * );\n * ```\n *\n * @return {React.ReactNode} The rendered component.\n */\nconst PluginBlockSettingsMenuItem = ( {\n\tallowedBlocks,\n\ticon,\n\tlabel,\n\tonClick,\n\tsmall,\n\trole,\n} ) => (\n\t<BlockSettingsMenuControls>\n\t\t{ ( { selectedBlocks, onClose } ) => {\n\t\t\tif ( ! shouldRenderItem( selectedBlocks, allowedBlocks ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t<MenuItem\n\t\t\t\t\tonClick={ compose( onClick, onClose ) }\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\tlabel={ small ? label : undefined }\n\t\t\t\t\trole={ role }\n\t\t\t\t>\n\t\t\t\t\t{ ! small && label }\n\t\t\t\t</MenuItem>\n\t\t\t);\n\t\t} }\n\t</BlockSettingsMenuControls>\n);\n\nexport default PluginBlockSettingsMenuItem;\n", "/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { usePluginContext } from '@wordpress/plugins';\nimport { ActionItem } from '@wordpress/interface';\n\n/**\n * Renders a menu item in `Plugins` group in `More Menu` drop down, and can be used to as a button or link depending on the props provided.\n * The text within the component appears as the menu item label.\n *\n * @param {Object} props Component properties.\n * @param {React.ReactNode} [props.children] Children to be rendered.\n * @param {string} [props.href] When `href` is provided then the menu item is represented as an anchor rather than button. It corresponds to the `href` attribute of the anchor.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.\n * @param {Function} [props.onClick=noop] The callback function to be executed when the user clicks the menu item.\n * @param {...*} [props.other] Any additional props are passed through to the underlying [Button](/packages/components/src/button/README.md) component.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginMoreMenuItem = wp.editor.PluginMoreMenuItem;\n * var moreIcon = wp.element.createElement( 'svg' ); //... svg element.\n *\n * function onButtonClick() {\n * \talert( 'Button clicked.' );\n * }\n *\n * function MyButtonMoreMenuItem() {\n * \treturn wp.element.createElement(\n * \t\tPluginMoreMenuItem,\n * \t\t{\n * \t\t\ticon: moreIcon,\n * \t\t\tonClick: onButtonClick,\n * \t\t},\n * \t\t__( 'My button title' )\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginMoreMenuItem } from '@wordpress/editor';\n * import { more } from '@wordpress/icons';\n *\n * function onButtonClick() {\n * \talert( 'Button clicked.' );\n * }\n *\n * const MyButtonMoreMenuItem = () => (\n * \t<PluginMoreMenuItem\n * \t\ticon={ more }\n * \t\tonClick={ onButtonClick }\n * \t>\n * \t\t{ __( 'My button title' ) }\n * \t</PluginMoreMenuItem>\n * );\n * ```\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PluginMoreMenuItem( props ) {\n\tconst context = usePluginContext();\n\treturn (\n\t\t<ActionItem\n\t\t\tname=\"core/plugin-more-menu\"\n\t\t\tas={ props.as ?? MenuItem }\n\t\t\ticon={ props.icon || context.icon }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { usePluginContext } from '@wordpress/plugins';\nimport { createSlotFill, PanelBody } from '@wordpress/components';\n\nconst { Fill, Slot } = createSlotFill( 'PluginPostPublishPanel' );\n\n/**\n * Renders provided content to the post-publish panel in the publish flow\n * (side panel that opens after a user publishes the post).\n *\n * @param {Object} props Component properties.\n * @param {string} [props.className] An optional class name added to the panel.\n * @param {string} [props.title] Title displayed at the top of the panel.\n * @param {boolean} [props.initialOpen=false] Whether to have the panel initially opened. When no title is provided it is always opened.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n * @param {React.ReactNode} props.children Children to be rendered\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginPostPublishPanel } from '@wordpress/editor';\n *\n * const MyPluginPostPublishPanel = () => (\n * \t<PluginPostPublishPanel\n * \t\tclassName=\"my-plugin-post-publish-panel\"\n * \t\ttitle={ __( 'My panel title' ) }\n * \t\tinitialOpen={ true }\n * \t>\n * { __( 'My panel content' ) }\n * \t</PluginPostPublishPanel>\n * );\n * ```\n *\n * @return {React.ReactNode} The rendered component.\n */\nconst PluginPostPublishPanel = ( {\n\tchildren,\n\tclassName,\n\ttitle,\n\tinitialOpen = false,\n\ticon,\n} ) => {\n\tconst { icon: pluginIcon } = usePluginContext();\n\n\treturn (\n\t\t<Fill>\n\t\t\t<PanelBody\n\t\t\t\tclassName={ className }\n\t\t\t\tinitialOpen={ initialOpen || ! title }\n\t\t\t\ttitle={ title }\n\t\t\t\ticon={ icon ?? pluginIcon }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</PanelBody>\n\t\t</Fill>\n\t);\n};\n\nPluginPostPublishPanel.Slot = Slot;\n\nexport default PluginPostPublishPanel;\n", "/**\n * Defines as extensibility slot for the Summary panel.\n */\n\n/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelRow } from '@wordpress/components';\n\nconst { Fill, Slot } = createSlotFill( 'PluginPostStatusInfo' );\n\n/**\n * Renders a row in the Summary panel of the Document sidebar.\n * It should be noted that this is named and implemented around the function it serves\n * and not its location, which may change in future iterations.\n *\n * @param {Object} props Component properties.\n * @param {string} [props.className] An optional class name added to the row.\n * @param {React.ReactNode} props.children Children to be rendered.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginPostStatusInfo = wp.editor.PluginPostStatusInfo;\n *\n * function MyPluginPostStatusInfo() {\n * \treturn React.createElement(\n * \t\tPluginPostStatusInfo,\n * \t\t{\n * \t\t\tclassName: 'my-plugin-post-status-info',\n * \t\t},\n * \t\t__( 'My post status info' )\n * \t)\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginPostStatusInfo } from '@wordpress/editor';\n *\n * const MyPluginPostStatusInfo = () => (\n * \t<PluginPostStatusInfo\n * \t\tclassName=\"my-plugin-post-status-info\"\n * \t>\n * \t\t{ __( 'My post status info' ) }\n * \t</PluginPostStatusInfo>\n * );\n * ```\n *\n * @return {React.ReactNode} The rendered component.\n */\nconst PluginPostStatusInfo = ( { children, className } ) => (\n\t<Fill>\n\t\t<PanelRow className={ className }>{ children }</PanelRow>\n\t</Fill>\n);\n\nPluginPostStatusInfo.Slot = Slot;\n\nexport default PluginPostStatusInfo;\n", "/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelBody } from '@wordpress/components';\nimport { usePluginContext } from '@wordpress/plugins';\n\nconst { Fill, Slot } = createSlotFill( 'PluginPrePublishPanel' );\n\n/**\n * Renders provided content to the pre-publish side panel in the publish flow\n * (side panel that opens when a user first pushes \"Publish\" from the main editor).\n *\n * @param {Object} props Component props.\n * @param {string} [props.className] An optional class name added to the panel.\n * @param {string} [props.title] Title displayed at the top of the panel.\n * @param {boolean} [props.initialOpen=false] Whether to have the panel initially opened.\n * When no title is provided it is always opened.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/)\n * icon slug string, or an SVG WP element, to be rendered when\n * the sidebar is pinned to toolbar. If `false` is passed, no icon will be rendered.\n * @param {React.ReactNode} props.children Children to be rendered\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginPrePublishPanel } from '@wordpress/editor';\n *\n * const MyPluginPrePublishPanel = () => (\n * \t<PluginPrePublishPanel\n * \t\tclassName=\"my-plugin-pre-publish-panel\"\n * \t\ttitle={ __( 'My panel title' ) }\n * \t\tinitialOpen={ true }\n * \t>\n * \t { __( 'My panel content' ) }\n * \t</PluginPrePublishPanel>\n * );\n * ```\n *\n * @return {React.ReactNode} The rendered component.\n */\nconst PluginPrePublishPanel = ( {\n\tchildren,\n\tclassName,\n\ttitle,\n\tinitialOpen = false,\n\ticon,\n} ) => {\n\tconst { icon: pluginIcon } = usePluginContext();\n\n\treturn (\n\t\t<Fill>\n\t\t\t<PanelBody\n\t\t\t\tclassName={ className }\n\t\t\t\tinitialOpen={ initialOpen || ! title }\n\t\t\t\ttitle={ title }\n\t\t\t\ticon={ icon ?? pluginIcon }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</PanelBody>\n\t\t</Fill>\n\t);\n};\n\nPluginPrePublishPanel.Slot = Slot;\n\nexport default PluginPrePublishPanel;\n", "/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { usePluginContext } from '@wordpress/plugins';\nimport { ActionItem } from '@wordpress/interface';\n\n/**\n * Renders a menu item in the Preview dropdown, which can be used as a button or link depending on the props provided.\n * The text within the component appears as the menu item label.\n *\n * @param {Object} props Component properties.\n * @param {React.ReactNode} [props.children] Children to be rendered.\n * @param {string} [props.href] When `href` is provided, the menu item is rendered as an anchor instead of a button. It corresponds to the `href` attribute of the anchor.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The icon to be rendered to the left of the menu item label. Can be a Dashicon slug or an SVG WP element.\n * @param {Function} [props.onClick] The callback function to be executed when the user clicks the menu item.\n * @param {...*} [props.other] Any additional props are passed through to the underlying MenuItem component.\n *\n * @example\n * ```jsx\n * import { __ } from '@wordpress/i18n';\n * import { PluginPreviewMenuItem } from '@wordpress/editor';\n * import { external } from '@wordpress/icons';\n *\n * function onPreviewClick() {\n * // Handle preview action\n * }\n *\n * const ExternalPreviewMenuItem = () => (\n * <PluginPreviewMenuItem\n * icon={ external }\n * onClick={ onPreviewClick }\n * >\n * { __( 'Preview in new tab' ) }\n * </PluginPreviewMenuItem>\n * );\n * registerPlugin( 'external-preview-menu-item', {\n * render: ExternalPreviewMenuItem,\n * } );\n * ```\n *\n * @return {React.ReactNode} The rendered menu item component.\n */\nexport default function PluginPreviewMenuItem( props ) {\n\tconst context = usePluginContext();\n\treturn (\n\t\t<ActionItem\n\t\t\tname=\"core/plugin-preview-menu\"\n\t\t\tas={ props.as ?? MenuItem }\n\t\t\ticon={ props.icon || context.icon }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { ComplementaryArea } from '@wordpress/interface';\n\n/**\n * Renders a sidebar when activated. The contents within the `PluginSidebar` will appear as content within the sidebar.\n * It also automatically renders a corresponding `PluginSidebarMenuItem` component when `isPinnable` flag is set to `true`.\n * If you wish to display the sidebar, you can with use the `PluginSidebarMoreMenuItem` component or the `wp.data.dispatch` API:\n *\n * ```js\n * wp.data.dispatch( 'core/edit-post' ).openGeneralSidebar( 'plugin-name/sidebar-name' );\n * ```\n *\n * @see PluginSidebarMoreMenuItem\n *\n * @param {Object} props Element props.\n * @param {string} props.name A string identifying the sidebar. Must be unique for every sidebar registered within the scope of your plugin.\n * @param {React.ReactNode} [props.children] Children to be rendered.\n * @param {string} [props.className] An optional class name added to the sidebar body.\n * @param {string} props.title Title displayed at the top of the sidebar.\n * @param {boolean} [props.isPinnable=true] Whether to allow to pin sidebar to the toolbar. When set to `true` it also automatically renders a corresponding menu item.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var el = React.createElement;\n * var PanelBody = wp.components.PanelBody;\n * var PluginSidebar = wp.editor.PluginSidebar;\n * var moreIcon = React.createElement( 'svg' ); //... svg element.\n *\n * function MyPluginSidebar() {\n * \treturn el(\n * \t\t\tPluginSidebar,\n * \t\t\t{\n * \t\t\t\tname: 'my-sidebar',\n * \t\t\t\ttitle: 'My sidebar title',\n * \t\t\t\ticon: moreIcon,\n * \t\t\t},\n * \t\t\tel(\n * \t\t\t\tPanelBody,\n * \t\t\t\t{},\n * \t\t\t\t__( 'My sidebar content' )\n * \t\t\t)\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PanelBody } from '@wordpress/components';\n * import { PluginSidebar } from '@wordpress/editor';\n * import { more } from '@wordpress/icons';\n *\n * const MyPluginSidebar = () => (\n * \t<PluginSidebar\n * \t\tname=\"my-sidebar\"\n * \t\ttitle=\"My sidebar title\"\n * \t\ticon={ more }\n * \t>\n * \t\t<PanelBody>\n * \t\t\t{ __( 'My sidebar content' ) }\n * \t\t</PanelBody>\n * \t</PluginSidebar>\n * );\n * ```\n */\nexport default function PluginSidebar( { className, ...props } ) {\n\treturn (\n\t\t<ComplementaryArea\n\t\t\tpanelClassName={ className }\n\t\t\tclassName=\"editor-sidebar\"\n\t\t\tscope=\"core\"\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { ComplementaryAreaMoreMenuItem } from '@wordpress/interface';\n\n/**\n * Renders a menu item in `Plugins` group in `More Menu` drop down,\n * and can be used to activate the corresponding `PluginSidebar` component.\n * The text within the component appears as the menu item label.\n *\n * @param {Object} props Component props.\n * @param {string} props.target A string identifying the target sidebar you wish to be activated by this menu item. Must be the same as the `name` prop you have given to that sidebar.\n * @param {React.ReactNode} [props.children] Children to be rendered.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginSidebarMoreMenuItem = wp.editor.PluginSidebarMoreMenuItem;\n * var moreIcon = React.createElement( 'svg' ); //... svg element.\n *\n * function MySidebarMoreMenuItem() {\n * \treturn React.createElement(\n * \t\tPluginSidebarMoreMenuItem,\n * \t\t{\n * \t\t\ttarget: 'my-sidebar',\n * \t\t\ticon: moreIcon,\n * \t\t},\n * \t\t__( 'My sidebar title' )\n * \t)\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginSidebarMoreMenuItem } from '@wordpress/editor';\n * import { more } from '@wordpress/icons';\n *\n * const MySidebarMoreMenuItem = () => (\n * \t<PluginSidebarMoreMenuItem\n * \t\ttarget=\"my-sidebar\"\n * \t\ticon={ more }\n * \t>\n * \t\t{ __( 'My sidebar title' ) }\n * \t</PluginSidebarMoreMenuItem>\n * );\n * ```\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PluginSidebarMoreMenuItem( props ) {\n\treturn (\n\t\t<ComplementaryAreaMoreMenuItem\n\t\t\t// Menu item is marked with unstable prop for backward compatibility.\n\t\t\t// @see https://github.com/WordPress/gutenberg/issues/14457\n\t\t\t__unstableExplicitMenuItem\n\t\t\tscope=\"core\"\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport ClassicThemeControl from './classic-theme';\nimport BlockThemeControl from './block-theme';\n\n/**\n * Displays the template controls based on the current editor settings and user permissions.\n *\n * @return {React.ReactNode} The rendered PostTemplatePanel component.\n */\nexport default function PostTemplatePanel() {\n\tconst { templateId, isBlockTheme } = useSelect( ( select ) => {\n\t\tconst { getCurrentTemplateId, getEditorSettings } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\ttemplateId: getCurrentTemplateId(),\n\t\t\tisBlockTheme: getEditorSettings().__unstableIsBlockBasedTheme,\n\t\t};\n\t}, [] );\n\n\tconst isVisible = useSelect( ( select ) => {\n\t\tconst postTypeSlug = select( editorStore ).getCurrentPostType();\n\t\tconst postType = select( coreStore ).getPostType( postTypeSlug );\n\t\tif ( ! postType?.viewable ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst settings = select( editorStore ).getEditorSettings();\n\t\tconst hasTemplates =\n\t\t\t!! settings.availableTemplates &&\n\t\t\tObject.keys( settings.availableTemplates ).length > 0;\n\t\tif ( hasTemplates ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( ! settings.supportsTemplateMode ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst canCreateTemplates =\n\t\t\tselect( coreStore ).canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} ) ?? false;\n\t\treturn canCreateTemplates;\n\t}, [] );\n\n\tconst canViewTemplates = useSelect(\n\t\t( select ) => {\n\t\t\treturn isVisible\n\t\t\t\t? select( coreStore ).canUser( 'read', {\n\t\t\t\t\t\tkind: 'postType',\n\t\t\t\t\t\tname: 'wp_template',\n\t\t\t\t } )\n\t\t\t\t: false;\n\t\t},\n\t\t[ isVisible ]\n\t);\n\n\tif ( ( ! isBlockTheme || ! canViewTemplates ) && isVisible ) {\n\t\treturn <ClassicThemeControl />;\n\t}\n\n\tif ( isBlockTheme && !! templateId ) {\n\t\treturn <BlockThemeControl id={ templateId } />;\n\t}\n\treturn null;\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components';\nimport { useState, useMemo } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { useEntityRecord, store as coreStore } from '@wordpress/core-data';\nimport { check } from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport PostPanelRow from '../post-panel-row';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport SwapTemplateButton from './swap-template-button';\nimport ResetDefaultTemplate from './reset-default-template';\nimport { unlock } from '../../lock-unlock';\nimport CreateNewTemplate from './create-new-template';\n\nexport default function BlockThemeControl( { id } ) {\n\tconst {\n\t\tisTemplateHidden,\n\t\tonNavigateToEntityRecord,\n\t\tgetEditorSettings,\n\t\thasGoBack,\n\t\thasSpecificTemplate,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetRenderingMode,\n\t\t\tgetEditorSettings: _getEditorSettings,\n\t\t\tgetCurrentPost,\n\t\t} = unlock( select( editorStore ) );\n\t\tconst editorSettings = _getEditorSettings();\n\t\tconst currentPost = getCurrentPost();\n\t\treturn {\n\t\t\tisTemplateHidden: getRenderingMode() === 'post-only',\n\t\t\tonNavigateToEntityRecord: editorSettings.onNavigateToEntityRecord,\n\t\t\tgetEditorSettings: _getEditorSettings,\n\t\t\thasGoBack: editorSettings.hasOwnProperty(\n\t\t\t\t'onNavigateToPreviousEntityRecord'\n\t\t\t),\n\t\t\thasSpecificTemplate: !! currentPost.template,\n\t\t};\n\t}, [] );\n\n\tconst { get: getPreference } = useSelect( preferencesStore );\n\n\tconst { editedRecord: template, hasResolved } = useEntityRecord(\n\t\t'postType',\n\t\t'wp_template',\n\t\tid\n\t);\n\tconst { getEntityRecord } = useSelect( coreStore );\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\tconst { setRenderingMode, setDefaultRenderingMode } = unlock(\n\t\tuseDispatch( editorStore )\n\t);\n\n\tconst canCreateTemplate = useSelect(\n\t\t( select ) =>\n\t\t\t!! select( coreStore ).canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} ),\n\t\t[]\n\t);\n\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tclassName: 'editor-post-template__dropdown',\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tif ( ! hasResolved ) {\n\t\treturn null;\n\t}\n\n\t// The site editor does not have a `onNavigateToPreviousEntityRecord` setting as it uses its own routing\n\t// and assigns its own backlink to focusMode pages.\n\tconst notificationAction = hasGoBack\n\t\t? [\n\t\t\t\t{\n\t\t\t\t\tlabel: __( 'Go back' ),\n\t\t\t\t\tonClick: () =>\n\t\t\t\t\t\tgetEditorSettings().onNavigateToPreviousEntityRecord(),\n\t\t\t\t},\n\t\t ]\n\t\t: undefined;\n\n\tconst mayShowTemplateEditNotice = () => {\n\t\tif ( ! getPreference( 'core/edit-site', 'welcomeGuideTemplate' ) ) {\n\t\t\tcreateSuccessNotice(\n\t\t\t\t__(\n\t\t\t\t\t'Editing template. Changes made here affect all posts and pages that use the template.'\n\t\t\t\t),\n\t\t\t\t{ type: 'snackbar', actions: notificationAction }\n\t\t\t);\n\t\t}\n\t};\n\treturn (\n\t\t<PostPanelRow label={ __( 'Template' ) } ref={ setPopoverAnchor }>\n\t\t\t<DropdownMenu\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\tfocusOnMount\n\t\t\t\ttoggleProps={ {\n\t\t\t\t\tsize: 'compact',\n\t\t\t\t\tvariant: 'tertiary',\n\t\t\t\t\ttooltipPosition: 'middle left',\n\t\t\t\t} }\n\t\t\t\tlabel={ __( 'Template options' ) }\n\t\t\t\ttext={ decodeEntities( template.title ) }\n\t\t\t\ticon={ null }\n\t\t\t>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t{ canCreateTemplate && (\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tonClick={ async () => {\n\t\t\t\t\t\t\t\t\t\tonNavigateToEntityRecord( {\n\t\t\t\t\t\t\t\t\t\t\tpostId: template.id,\n\t\t\t\t\t\t\t\t\t\t\tpostType: 'wp_template',\n\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t\t// When editing a global template,\n\t\t\t\t\t\t\t\t\t\t// activate the auto-draft. This is not\n\t\t\t\t\t\t\t\t\t\t// immediately live (we're not saving\n\t\t\t\t\t\t\t\t\t\t// site options), and when nothing is\n\t\t\t\t\t\t\t\t\t\t// saved, the setting will be ignored.\n\t\t\t\t\t\t\t\t\t\t// In the future, we should make the\n\t\t\t\t\t\t\t\t\t\t// duplication explicit, so there\n\t\t\t\t\t\t\t\t\t\t// wouldn't be an \"edit\" button for\n\t\t\t\t\t\t\t\t\t\t// static theme templates.\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t! hasSpecificTemplate &&\n\t\t\t\t\t\t\t\t\t\t\twindow?.__experimentalTemplateActivate\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\tconst activeTemplates =\n\t\t\t\t\t\t\t\t\t\t\t\tawait getEntityRecord(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'root',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'site'\n\t\t\t\t\t\t\t\t\t\t\t\t).active_templates;\n\t\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t\tactiveTemplates[\n\t\t\t\t\t\t\t\t\t\t\t\t\ttemplate.slug\n\t\t\t\t\t\t\t\t\t\t\t\t] !== template.id\n\t\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t\teditEntityRecord(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'root',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'site',\n\t\t\t\t\t\t\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tactive_templates: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t...activeTemplates,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[ template.slug ]:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttemplate.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t\tmayShowTemplateEditNotice();\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Edit template' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t\t<SwapTemplateButton onClick={ onClose } />\n\t\t\t\t\t\t\t<ResetDefaultTemplate onClick={ onClose } />\n\t\t\t\t\t\t\t{ canCreateTemplate && <CreateNewTemplate /> }\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\ticon={ ! isTemplateHidden ? check : undefined }\n\t\t\t\t\t\t\t\tisSelected={ ! isTemplateHidden }\n\t\t\t\t\t\t\t\trole=\"menuitemcheckbox\"\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tconst newRenderingMode = isTemplateHidden\n\t\t\t\t\t\t\t\t\t\t? 'template-locked'\n\t\t\t\t\t\t\t\t\t\t: 'post-only';\n\t\t\t\t\t\t\t\t\tsetRenderingMode( newRenderingMode );\n\t\t\t\t\t\t\t\t\tsetDefaultRenderingMode( newRenderingMode );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Show template' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</PostPanelRow>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useMemo, useState } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __experimentalBlockPatternsList as BlockPatternsList } from '@wordpress/block-editor';\nimport { MenuItem, Modal, SearchControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { parse } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { useAvailableTemplates, useEditedPostContext } from './hooks';\nimport { searchTemplates } from '../../utils/search-templates';\n\nexport default function SwapTemplateButton( { onClick } ) {\n\tconst [ showModal, setShowModal ] = useState( false );\n\tconst { postType, postId } = useEditedPostContext();\n\tconst availableTemplates = useAvailableTemplates( postType );\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\n\tconst onTemplateSelect = async ( template ) => {\n\t\teditEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId,\n\t\t\t{ template: template.name },\n\t\t\t{ undoIgnore: true }\n\t\t);\n\t\tsetShowModal( false ); // Close the template suggestions modal first.\n\t\tonClick();\n\t};\n\treturn (\n\t\t<>\n\t\t\t<MenuItem\n\t\t\t\tdisabled={ ! availableTemplates?.length }\n\t\t\t\taccessibleWhenDisabled\n\t\t\t\tonClick={ () => setShowModal( true ) }\n\t\t\t>\n\t\t\t\t{ __( 'Change template' ) }\n\t\t\t</MenuItem>\n\t\t\t{ showModal && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={ __( 'Choose a template' ) }\n\t\t\t\t\tonRequestClose={ () => setShowModal( false ) }\n\t\t\t\t\toverlayClassName=\"editor-post-template__swap-template-modal\"\n\t\t\t\t\tisFullScreen\n\t\t\t\t>\n\t\t\t\t\t<div className=\"editor-post-template__swap-template-modal-content\">\n\t\t\t\t\t\t<TemplatesList\n\t\t\t\t\t\t\tpostType={ postType }\n\t\t\t\t\t\t\tonSelect={ onTemplateSelect }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction TemplatesList( { postType, onSelect } ) {\n\tconst [ searchValue, setSearchValue ] = useState( '' );\n\tconst availableTemplates = useAvailableTemplates( postType );\n\tconst templatesAsPatterns = useMemo(\n\t\t() =>\n\t\t\tavailableTemplates.map( ( template ) => ( {\n\t\t\t\tname: template.slug,\n\t\t\t\tblocks: parse( template.content.raw ),\n\t\t\t\ttitle: decodeEntities( template.title.rendered ),\n\t\t\t\tid: template.id,\n\t\t\t} ) ),\n\t\t[ availableTemplates ]\n\t);\n\n\tconst filteredBlockTemplates = useMemo( () => {\n\t\treturn searchTemplates( templatesAsPatterns, searchValue );\n\t}, [ templatesAsPatterns, searchValue ] );\n\n\treturn (\n\t\t<>\n\t\t\t<SearchControl\n\t\t\t\tonChange={ setSearchValue }\n\t\t\t\tvalue={ searchValue }\n\t\t\t\tlabel={ __( 'Search' ) }\n\t\t\t\tplaceholder={ __( 'Search' ) }\n\t\t\t\tclassName=\"editor-post-template__swap-template-search\"\n\t\t\t/>\n\t\t\t<BlockPatternsList\n\t\t\t\tlabel={ __( 'Templates' ) }\n\t\t\t\tblockPatterns={ filteredBlockTemplates }\n\t\t\t\tonClickPattern={ onSelect }\n\t\t\t/>\n\t\t</>\n\t);\n}\n", "/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\n/**\n * Sanitizes the search input string.\n *\n * @param {string} input The search input to normalize.\n *\n * @return {string} The normalized search input.\n */\nfunction normalizeSearchInput( input = '' ) {\n\t// Disregard diacritics.\n\tinput = removeAccents( input );\n\n\t// Trim & Lowercase.\n\tinput = input.trim().toLowerCase();\n\n\treturn input;\n}\n\n/**\n * Get the search rank for a given template and a specific search term.\n *\n * @param {Object} template Template to rank\n * @param {string} searchValue Search term\n *\n * @return {number} A template search rank\n */\nfunction getTemplateSearchRank( template, searchValue ) {\n\tconst normalizedSearchValue = normalizeSearchInput( searchValue );\n\tconst normalizedTitle = normalizeSearchInput( template.title );\n\n\tlet rank = 0;\n\n\tif ( normalizedSearchValue === normalizedTitle ) {\n\t\trank += 30;\n\t} else if ( normalizedTitle.startsWith( normalizedSearchValue ) ) {\n\t\trank += 20;\n\t} else {\n\t\tconst searchTerms = normalizedSearchValue.split( ' ' );\n\t\tconst hasMatchedTerms = searchTerms.every( ( searchTerm ) =>\n\t\t\tnormalizedTitle.includes( searchTerm )\n\t\t);\n\n\t\t// Prefer template with every search word in the title.\n\t\tif ( hasMatchedTerms ) {\n\t\t\trank += 10;\n\t\t}\n\t}\n\n\treturn rank;\n}\n\n/**\n * Filters a template list given a search term.\n *\n * @param {Array} templates Item list\n * @param {string} searchValue Search input.\n *\n * @return {Array} Filtered template list.\n */\nexport function searchTemplates( templates = [], searchValue = '' ) {\n\tif ( ! searchValue ) {\n\t\treturn templates;\n\t}\n\n\tconst rankedTemplates = templates\n\t\t.map( ( template ) => {\n\t\t\treturn [ template, getTemplateSearchRank( template, searchValue ) ];\n\t\t} )\n\t\t.filter( ( [ , rank ] ) => rank > 0 );\n\n\trankedTemplates.sort( ( [ , rank1 ], [ , rank2 ] ) => rank2 - rank1 );\n\treturn rankedTemplates.map( ( [ template ] ) => template );\n}\n", "/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseAllowSwitchingTemplates,\n\tuseCurrentTemplateSlug,\n\tuseEditedPostContext,\n} from './hooks';\n\nexport default function ResetDefaultTemplate( { onClick } ) {\n\tconst currentTemplateSlug = useCurrentTemplateSlug();\n\tconst allowSwitchingTemplate = useAllowSwitchingTemplates();\n\tconst { postType, postId } = useEditedPostContext();\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\t// The default template in a post is indicated by an empty string.\n\tif ( ! currentTemplateSlug || ! allowSwitchingTemplate ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<MenuItem\n\t\t\tonClick={ () => {\n\t\t\t\teditEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId,\n\t\t\t\t\t{ template: '' },\n\t\t\t\t\t{ undoIgnore: true }\n\t\t\t\t);\n\t\t\t\tonClick();\n\t\t\t} }\n\t\t>\n\t\t\t{ __( 'Use default template' ) }\n\t\t</MenuItem>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport CreateNewTemplateModal from './create-new-template-modal';\nimport { useAllowSwitchingTemplates } from './hooks';\n\nexport default function CreateNewTemplate() {\n\tconst { canCreateTemplates } = useSelect( ( select ) => {\n\t\tconst { canUser } = select( coreStore );\n\t\treturn {\n\t\t\tcanCreateTemplates: canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} ),\n\t\t};\n\t}, [] );\n\tconst [ isCreateModalOpen, setIsCreateModalOpen ] = useState( false );\n\tconst allowSwitchingTemplate = useAllowSwitchingTemplates();\n\n\t// The default template in a post is indicated by an empty string.\n\tif ( ! canCreateTemplates || ! allowSwitchingTemplate ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<>\n\t\t\t<MenuItem\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetIsCreateModalOpen( true );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ __( 'Create new template' ) }\n\t\t\t</MenuItem>\n\n\t\t\t{ isCreateModalOpen && (\n\t\t\t\t<CreateNewTemplateModal\n\t\t\t\t\tonClose={ () => {\n\t\t\t\t\t\tsetIsCreateModalOpen( false );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostAuthorCombobox from './combobox';\nimport PostAuthorSelect from './select';\nimport { AUTHORS_QUERY } from './constants';\n\nconst minimumUsersForCombobox = 25;\n\n/**\n * Renders the component for selecting the post author.\n *\n * @return {React.ReactNode} The rendered component.\n */\nfunction PostAuthor() {\n\tconst showCombobox = useSelect( ( select ) => {\n\t\tconst authors = select( coreStore ).getUsers( AUTHORS_QUERY );\n\n\t\treturn authors?.length >= minimumUsersForCombobox;\n\t}, [] );\n\n\tif ( showCombobox ) {\n\t\treturn <PostAuthorCombobox />;\n\t}\n\treturn <PostAuthorSelect />;\n}\n\nexport default PostAuthor;\n", "/**\n * WordPress dependencies\n */\nimport { debounce } from '@wordpress/compose';\nimport { useState } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { ComboboxControl } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { useAuthorsQuery } from './hook';\n\nexport default function PostAuthorCombobox() {\n\tconst [ fieldValue, setFieldValue ] = useState();\n\n\tconst { editPost } = useDispatch( editorStore );\n\tconst { authorId, authorOptions, isLoading } =\n\t\tuseAuthorsQuery( fieldValue );\n\n\t/**\n\t * Handle author selection.\n\t *\n\t * @param {number} postAuthorId The selected Author.\n\t */\n\tconst handleSelect = ( postAuthorId ) => {\n\t\tif ( ! postAuthorId ) {\n\t\t\treturn;\n\t\t}\n\t\teditPost( { author: postAuthorId } );\n\t};\n\n\treturn (\n\t\t<ComboboxControl\n\t\t\t__next40pxDefaultSize\n\t\t\tlabel={ __( 'Author' ) }\n\t\t\toptions={ authorOptions }\n\t\t\tvalue={ authorId }\n\t\t\tonFilterValueChange={ debounce( setFieldValue, 300 ) }\n\t\t\tonChange={ handleSelect }\n\t\t\tallowReset={ false }\n\t\t\thideLabelFromVision\n\t\t\tisLoading={ isLoading }\n\t\t/>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { AUTHORS_QUERY, BASE_QUERY } from './constants';\n\nexport function useAuthorsQuery( search ) {\n\tconst { authorId, authors, postAuthor, isLoading } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getUser, getUsers, isResolving } = select( coreStore );\n\t\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\t\tconst _authorId = getEditedPostAttribute( 'author' );\n\t\t\tconst query = { ...AUTHORS_QUERY };\n\n\t\t\tif ( search ) {\n\t\t\t\tquery.search = search;\n\t\t\t\tquery.search_columns = [ 'name' ];\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tauthorId: _authorId,\n\t\t\t\tauthors: getUsers( query ),\n\t\t\t\tpostAuthor: getUser( _authorId, BASE_QUERY ),\n\t\t\t\tisLoading: isResolving( 'getUsers', [ query ] ),\n\t\t\t};\n\t\t},\n\t\t[ search ]\n\t);\n\n\tconst authorOptions = useMemo( () => {\n\t\tconst fetchedAuthors = ( authors ?? [] ).map( ( author ) => {\n\t\t\treturn {\n\t\t\t\tvalue: author.id,\n\t\t\t\tlabel: decodeEntities( author.name ),\n\t\t\t};\n\t\t} );\n\n\t\t// Ensure the current author is included in the dropdown list.\n\t\tconst foundAuthor = fetchedAuthors.findIndex(\n\t\t\t( { value } ) => postAuthor?.id === value\n\t\t);\n\n\t\tlet currentAuthor = [];\n\t\tif ( foundAuthor < 0 && postAuthor ) {\n\t\t\tcurrentAuthor = [\n\t\t\t\t{\n\t\t\t\t\tvalue: postAuthor.id,\n\t\t\t\t\tlabel: decodeEntities( postAuthor.name ),\n\t\t\t\t},\n\t\t\t];\n\t\t} else if ( foundAuthor < 0 && ! postAuthor ) {\n\t\t\tcurrentAuthor = [\n\t\t\t\t{\n\t\t\t\t\tvalue: 0,\n\t\t\t\t\tlabel: __( '(No author)' ),\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\treturn [ ...currentAuthor, ...fetchedAuthors ];\n\t}, [ authors, postAuthor ] );\n\n\treturn { authorId, authorOptions, postAuthor, isLoading };\n}\n", "export const BASE_QUERY = {\n\t_fields: 'id,name',\n\tcontext: 'view', // Allows non-admins to perform requests.\n};\n\nexport const AUTHORS_QUERY = {\n\twho: 'authors',\n\tper_page: 100,\n\t...BASE_QUERY,\n};\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { SelectControl } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { useAuthorsQuery } from './hook';\n\nexport default function PostAuthorSelect() {\n\tconst { editPost } = useDispatch( editorStore );\n\tconst { authorId, authorOptions } = useAuthorsQuery();\n\n\tconst setAuthorId = ( value ) => {\n\t\tconst author = Number( value );\n\t\teditPost( { author } );\n\t};\n\n\treturn (\n\t\t<SelectControl\n\t\t\t__next40pxDefaultSize\n\t\t\tclassName=\"post-author-selector\"\n\t\t\tlabel={ __( 'Author' ) }\n\t\t\toptions={ authorOptions }\n\t\t\tonChange={ setAuthorId }\n\t\t\tvalue={ authorId }\n\t\t\thideLabelFromVision\n\t\t/>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { store as editorStore } from '../../store';\n\n/**\n * Wrapper component that renders its children only if the post type supports the author.\n *\n * @param {Object} props The component props.\n * @param {React.ReactNode} props.children Children to be rendered.\n *\n * @return {React.ReactNode} The component to be rendered. Return `null` if the post type doesn't\n * supports the author or if there are no authors available.\n */\nexport default function PostAuthorCheck( { children } ) {\n\tconst { hasAssignAuthorAction } = useSelect( ( select ) => {\n\t\tconst post = select( editorStore ).getCurrentPost();\n\t\tconst canAssignAuthor = post?._links?.[ 'wp:action-assign-author' ]\n\t\t\t? true\n\t\t\t: false;\n\t\treturn {\n\t\t\thasAssignAuthorAction: canAssignAuthor,\n\t\t};\n\t}, [] );\n\n\tif ( ! hasAssignAuthorAction ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"author\">\n\t\t\t{ children }\n\t\t</PostTypeSupportCheck>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Button, Dropdown } from '@wordpress/components';\nimport { useState, useMemo } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostAuthorCheck from './check';\nimport PostAuthorForm from './index';\nimport PostPanelRow from '../post-panel-row';\nimport { BASE_QUERY } from './constants';\nimport { store as editorStore } from '../../store';\n\nfunction PostAuthorToggle( { isOpen, onClick } ) {\n\tconst { postAuthor } = useSelect( ( select ) => {\n\t\tconst id = select( editorStore ).getEditedPostAttribute( 'author' );\n\t\treturn {\n\t\t\tpostAuthor: select( coreStore ).getUser( id, BASE_QUERY ),\n\t\t};\n\t}, [] );\n\tconst authorName =\n\t\tdecodeEntities( postAuthor?.name ) || __( '(No author)' );\n\treturn (\n\t\t<Button\n\t\t\tsize=\"compact\"\n\t\t\tclassName=\"editor-post-author__panel-toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-expanded={ isOpen }\n\t\t\taria-label={\n\t\t\t\t// translators: %s: Author name.\n\t\t\t\tsprintf( __( 'Change author: %s' ), authorName )\n\t\t\t}\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ authorName }\n\t\t</Button>\n\t);\n}\n\n/**\n * Renders the Post Author Panel component.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport function PostAuthor() {\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\treturn (\n\t\t<PostAuthorCheck>\n\t\t\t<PostPanelRow label={ __( 'Author' ) } ref={ setPopoverAnchor }>\n\t\t\t\t<Dropdown\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tcontentClassName=\"editor-post-author__panel-dialog\"\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t<PostAuthorToggle\n\t\t\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t<div className=\"editor-post-author\">\n\t\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\t\ttitle={ __( 'Author' ) }\n\t\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PostAuthorForm onClose={ onClose } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PostPanelRow>\n\t\t</PostAuthorCheck>\n\t);\n}\n\nexport default PostAuthor;\n", "/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tRadioControl,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nconst COMMENT_OPTIONS = [\n\t{\n\t\tlabel: _x( 'Open', 'Adjective: e.g. \"Comments are open\"' ),\n\t\tvalue: 'open',\n\t\tdescription: __( 'Visitors can add new comments and replies.' ),\n\t},\n\t{\n\t\tlabel: __( 'Closed' ),\n\t\tvalue: 'closed',\n\t\tdescription: [\n\t\t\t__( 'Visitors cannot add new comments or replies.' ),\n\t\t\t__( 'Existing comments remain visible.' ),\n\t\t].join( ' ' ),\n\t},\n];\n\nfunction PostComments() {\n\tconst commentStatus = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditedPostAttribute( 'comment_status' ) ??\n\t\t\t'open',\n\t\t[]\n\t);\n\tconst { editPost } = useDispatch( editorStore );\n\tconst handleStatus = ( newCommentStatus ) =>\n\t\teditPost( {\n\t\t\tcomment_status: newCommentStatus,\n\t\t} );\n\n\treturn (\n\t\t<form>\n\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t<RadioControl\n\t\t\t\t\tclassName=\"editor-change-status__options\"\n\t\t\t\t\thideLabelFromVision\n\t\t\t\t\tlabel={ __( 'Comment status' ) }\n\t\t\t\t\toptions={ COMMENT_OPTIONS }\n\t\t\t\t\tonChange={ handleStatus }\n\t\t\t\t\tselected={ commentStatus }\n\t\t\t\t/>\n\t\t\t</VStack>\n\t\t</form>\n\t);\n}\n\n/**\n * A form for managing comment status.\n *\n * @return {React.ReactNode} The rendered PostComments component.\n */\nexport default PostComments;\n", "/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tDropdown,\n\tButton,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { useState, useMemo } from '@wordpress/element';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport PostComments from '../post-comments';\nimport PostPingbacks from '../post-pingbacks';\nimport PostPanelRow from '../post-panel-row';\n\nconst PANEL_NAME = 'discussion-panel';\n\nfunction ModalContents( { onClose } ) {\n\treturn (\n\t\t<div className=\"editor-post-discussion\">\n\t\t\t<InspectorPopoverHeader\n\t\t\t\ttitle={ __( 'Discussion' ) }\n\t\t\t\tonClose={ onClose }\n\t\t\t/>\n\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t<PostTypeSupportCheck supportKeys=\"comments\">\n\t\t\t\t\t<PostComments />\n\t\t\t\t</PostTypeSupportCheck>\n\t\t\t\t<PostTypeSupportCheck supportKeys=\"trackbacks\">\n\t\t\t\t\t<PostPingbacks />\n\t\t\t\t</PostTypeSupportCheck>\n\t\t\t</VStack>\n\t\t</div>\n\t);\n}\n\nfunction PostDiscussionToggle( { isOpen, onClick } ) {\n\tconst {\n\t\tcommentStatus,\n\t\tpingStatus,\n\t\tcommentsSupported,\n\t\ttrackbacksSupported,\n\t} = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\t\tconst postType = getPostType( getEditedPostAttribute( 'type' ) );\n\t\treturn {\n\t\t\tcommentStatus: getEditedPostAttribute( 'comment_status' ) ?? 'open',\n\t\t\tpingStatus: getEditedPostAttribute( 'ping_status' ) ?? 'open',\n\t\t\tcommentsSupported: !! postType.supports.comments,\n\t\t\ttrackbacksSupported: !! postType.supports.trackbacks,\n\t\t};\n\t}, [] );\n\tlet label;\n\tif ( commentStatus === 'open' ) {\n\t\tif ( pingStatus === 'open' ) {\n\t\t\tlabel = _x( 'Open', 'Adjective: e.g. \"Comments are open\"' );\n\t\t} else {\n\t\t\tlabel = trackbacksSupported\n\t\t\t\t? __( 'Comments only' )\n\t\t\t\t: _x( 'Open', 'Adjective: e.g. \"Comments are open\"' );\n\t\t}\n\t} else if ( pingStatus === 'open' ) {\n\t\tlabel = commentsSupported ? __( 'Pings only' ) : __( 'Pings enabled' );\n\t} else {\n\t\tlabel = __( 'Closed' );\n\t}\n\treturn (\n\t\t<Button\n\t\t\tsize=\"compact\"\n\t\t\tclassName=\"editor-post-discussion__panel-toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-label={ __( 'Change discussion options' ) }\n\t\t\taria-expanded={ isOpen }\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ label }\n\t\t</Button>\n\t);\n}\n\n/**\n * This component allows to update comment and pingback\n * settings for the current post. Internally there are\n * checks whether the current post has support for the\n * above and if the `discussion-panel` panel is enabled.\n *\n * @return {React.ReactNode} The rendered PostDiscussionPanel component.\n */\nexport default function PostDiscussionPanel() {\n\tconst { isEnabled } = useSelect( ( select ) => {\n\t\tconst { isEditorPanelEnabled } = select( editorStore );\n\t\treturn {\n\t\t\tisEnabled: isEditorPanelEnabled( PANEL_NAME ),\n\t\t};\n\t}, [] );\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys={ [ 'comments', 'trackbacks' ] }>\n\t\t\t<PostPanelRow label={ __( 'Discussion' ) } ref={ setPopoverAnchor }>\n\t\t\t\t<Dropdown\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tclassName=\"editor-post-discussion__panel-dropdown\"\n\t\t\t\t\tcontentClassName=\"editor-post-discussion__panel-dialog\"\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t<PostDiscussionToggle\n\t\t\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t<ModalContents onClose={ onClose } />\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PostPanelRow>\n\t\t</PostTypeSupportCheck>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { CheckboxControl, ExternalLink } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction PostPingbacks() {\n\tconst pingStatus = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditedPostAttribute( 'ping_status' ) ??\n\t\t\t'open',\n\t\t[]\n\t);\n\tconst { editPost } = useDispatch( editorStore );\n\tconst onTogglePingback = () =>\n\t\teditPost( {\n\t\t\tping_status: pingStatus === 'open' ? 'closed' : 'open',\n\t\t} );\n\n\treturn (\n\t\t<CheckboxControl\n\t\t\tlabel={ __( 'Enable pingbacks & trackbacks' ) }\n\t\t\tchecked={ pingStatus === 'open' }\n\t\t\tonChange={ onTogglePingback }\n\t\t\thelp={\n\t\t\t\t<ExternalLink\n\t\t\t\t\thref={ __(\n\t\t\t\t\t\t'https://wordpress.org/documentation/article/trackbacks-and-pingbacks/'\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Learn more about pingbacks & trackbacks' ) }\n\t\t\t\t</ExternalLink>\n\t\t\t}\n\t\t/>\n\t);\n}\n\n/**\n * Renders a control for enabling or disabling pingbacks and trackbacks\n * in a WordPress post.\n *\n * @module PostPingbacks\n */\nexport default PostPingbacks;\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { ExternalLink, TextareaControl } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders an editable textarea for the post excerpt.\n * Templates, template parts and patterns use the `excerpt` field as a description semantically.\n * Additionally templates and template parts override the `excerpt` field as `description` in\n * REST API. So this component handles proper labeling and updating the edited entity.\n *\n * @param {Object} props - Component props.\n * @param {boolean} [props.hideLabelFromVision=false] - Whether to visually hide the textarea's label.\n * @param {boolean} [props.updateOnBlur=false] - Whether to update the post on change or use local state and update on blur.\n */\nexport default function PostExcerpt( {\n\thideLabelFromVision = false,\n\tupdateOnBlur = false,\n} ) {\n\tconst { excerpt, shouldUseDescriptionLabel, usedAttribute } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCurrentPostType, getEditedPostAttribute } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst postType = getCurrentPostType();\n\t\t\t// This special case is unfortunate, but the REST API of wp_template and wp_template_part\n\t\t\t// support the excerpt field through the \"description\" field rather than \"excerpt\".\n\t\t\tconst _usedAttribute = [\n\t\t\t\t'wp_template',\n\t\t\t\t'wp_template_part',\n\t\t\t].includes( postType )\n\t\t\t\t? 'description'\n\t\t\t\t: 'excerpt';\n\t\t\treturn {\n\t\t\t\texcerpt: getEditedPostAttribute( _usedAttribute ),\n\t\t\t\t// There are special cases where we want to label the excerpt as a description.\n\t\t\t\tshouldUseDescriptionLabel: [\n\t\t\t\t\t'wp_template',\n\t\t\t\t\t'wp_template_part',\n\t\t\t\t\t'wp_block',\n\t\t\t\t].includes( postType ),\n\t\t\t\tusedAttribute: _usedAttribute,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst { editPost } = useDispatch( editorStore );\n\tconst [ localExcerpt, setLocalExcerpt ] = useState(\n\t\tdecodeEntities( excerpt )\n\t);\n\tconst updatePost = ( value ) => {\n\t\teditPost( { [ usedAttribute ]: value } );\n\t};\n\tconst label = shouldUseDescriptionLabel\n\t\t? __( 'Write a description (optional)' )\n\t\t: __( 'Write an excerpt (optional)' );\n\n\treturn (\n\t\t<div className=\"editor-post-excerpt\">\n\t\t\t<TextareaControl\n\t\t\t\tlabel={ label }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\tclassName=\"editor-post-excerpt__textarea\"\n\t\t\t\tonChange={ updateOnBlur ? setLocalExcerpt : updatePost }\n\t\t\t\tonBlur={\n\t\t\t\t\tupdateOnBlur ? () => updatePost( localExcerpt ) : undefined\n\t\t\t\t}\n\t\t\t\tvalue={ updateOnBlur ? localExcerpt : excerpt }\n\t\t\t\thelp={\n\t\t\t\t\t! shouldUseDescriptionLabel ? (\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Learn more about manual excerpts' ) }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t__( 'Write a description' )\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n", "/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\n\n/**\n * Component for checking if the post type supports the excerpt field.\n *\n * @param {Object} props Props.\n * @param {React.ReactNode} props.children Children to be rendered.\n *\n * @return {React.ReactNode} The rendered component.\n */\nfunction PostExcerptCheck( { children } ) {\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"excerpt\">\n\t\t\t{ children }\n\t\t</PostTypeSupportCheck>\n\t);\n}\n\nexport default PostExcerptCheck;\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tPanelBody,\n\t__experimentalText as Text,\n\tDropdown,\n\tButton,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useMemo, useState } from '@wordpress/element';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport PostExcerptForm from './index';\nimport PostExcerptCheck from './check';\nimport PluginPostExcerpt from './plugin';\nimport { TEMPLATE_ORIGINS } from '../../store/constants';\nimport { store as editorStore } from '../../store';\nimport { getTemplateInfo } from '../../utils/get-template-info';\n\n/**\n * Module Constants\n */\nconst PANEL_NAME = 'post-excerpt';\n\nfunction ExcerptPanel() {\n\tconst { isOpened, isEnabled, postType } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tisEditorPanelOpened,\n\t\t\tisEditorPanelEnabled,\n\t\t\tgetCurrentPostType,\n\t\t} = select( editorStore );\n\n\t\treturn {\n\t\t\tisOpened: isEditorPanelOpened( PANEL_NAME ),\n\t\t\tisEnabled: isEditorPanelEnabled( PANEL_NAME ),\n\t\t\tpostType: getCurrentPostType(),\n\t\t};\n\t}, [] );\n\n\tconst { toggleEditorPanelOpened } = useDispatch( editorStore );\n\tconst toggleExcerptPanel = () => toggleEditorPanelOpened( PANEL_NAME );\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\t// There are special cases where we want to label the excerpt as a description.\n\tconst shouldUseDescriptionLabel = [\n\t\t'wp_template',\n\t\t'wp_template_part',\n\t\t'wp_block',\n\t].includes( postType );\n\n\treturn (\n\t\t<PanelBody\n\t\t\ttitle={\n\t\t\t\tshouldUseDescriptionLabel\n\t\t\t\t\t? __( 'Description' )\n\t\t\t\t\t: __( 'Excerpt' )\n\t\t\t}\n\t\t\topened={ isOpened }\n\t\t\tonToggle={ toggleExcerptPanel }\n\t\t>\n\t\t\t<PluginPostExcerpt.Slot>\n\t\t\t\t{ ( fills ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<PostExcerptForm />\n\t\t\t\t\t\t{ fills }\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</PluginPostExcerpt.Slot>\n\t\t</PanelBody>\n\t);\n}\n\n/**\n * Is rendered if the post type supports excerpts and allows editing the excerpt.\n *\n * @return {React.ReactNode} The rendered PostExcerptPanel component.\n */\nexport default function PostExcerptPanel() {\n\treturn (\n\t\t<PostExcerptCheck>\n\t\t\t<ExcerptPanel />\n\t\t</PostExcerptCheck>\n\t);\n}\n\nexport function PrivatePostExcerptPanel() {\n\treturn (\n\t\t<PostExcerptCheck>\n\t\t\t<PrivateExcerpt />\n\t\t</PostExcerptCheck>\n\t);\n}\n\nfunction PrivateExcerpt() {\n\tconst { shouldRender, excerpt, shouldBeUsedAsDescription, allowEditing } =\n\t\tuseSelect( ( select ) => {\n\t\t\tconst {\n\t\t\t\tgetCurrentPostType,\n\t\t\t\tgetCurrentPostId,\n\t\t\t\tgetEditedPostAttribute,\n\t\t\t\tisEditorPanelEnabled,\n\t\t\t} = select( editorStore );\n\t\t\tconst postType = getCurrentPostType();\n\t\t\tconst isTemplateOrTemplatePart = [\n\t\t\t\t'wp_template',\n\t\t\t\t'wp_template_part',\n\t\t\t].includes( postType );\n\t\t\tconst isPattern = postType === 'wp_block';\n\t\t\t// These post types use the `excerpt` field as a description semantically, so we need to\n\t\t\t// handle proper labeling and some flows where we should always render them as text.\n\t\t\tconst _shouldBeUsedAsDescription =\n\t\t\t\tisTemplateOrTemplatePart || isPattern;\n\t\t\tconst _usedAttribute = isTemplateOrTemplatePart\n\t\t\t\t? 'description'\n\t\t\t\t: 'excerpt';\n\t\t\tconst _excerpt = getEditedPostAttribute( _usedAttribute );\n\t\t\t// We need to fetch the entity in this case to check if we'll allow editing.\n\t\t\tconst template =\n\t\t\t\tisTemplateOrTemplatePart &&\n\t\t\t\tselect( coreStore ).getEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tgetCurrentPostId()\n\t\t\t\t);\n\t\t\tconst fallback =\n\t\t\t\t! _excerpt && isTemplateOrTemplatePart\n\t\t\t\t\t? getTemplateInfo( {\n\t\t\t\t\t\t\ttemplate,\n\t\t\t\t\t\t\ttemplateTypes:\n\t\t\t\t\t\t\t\tselect( coreStore ).getCurrentTheme()\n\t\t\t\t\t\t\t\t\t?.default_template_types,\n\t\t\t\t\t } )?.description\n\t\t\t\t\t: undefined;\n\t\t\t// For post types that use excerpt as description, we do not abide\n\t\t\t// by the `isEnabled` panel flag in order to render them as text.\n\t\t\tconst _shouldRender =\n\t\t\t\tisEditorPanelEnabled( PANEL_NAME ) ||\n\t\t\t\t_shouldBeUsedAsDescription;\n\t\t\treturn {\n\t\t\t\texcerpt: _excerpt ?? fallback,\n\t\t\t\tshouldRender: _shouldRender,\n\t\t\t\tshouldBeUsedAsDescription: _shouldBeUsedAsDescription,\n\t\t\t\t// If we should render, allow editing for all post types that are not used as description.\n\t\t\t\t// For the rest allow editing only for user generated entities.\n\t\t\t\tallowEditing:\n\t\t\t\t\t_shouldRender &&\n\t\t\t\t\t( ! _shouldBeUsedAsDescription ||\n\t\t\t\t\t\tisPattern ||\n\t\t\t\t\t\t( template &&\n\t\t\t\t\t\t\ttemplate.source === TEMPLATE_ORIGINS.custom &&\n\t\t\t\t\t\t\t! template.has_theme_file &&\n\t\t\t\t\t\t\ttemplate.is_custom ) ),\n\t\t\t};\n\t\t}, [] );\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\tconst label = shouldBeUsedAsDescription\n\t\t? __( 'Description' )\n\t\t: __( 'Excerpt' );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\t'aria-label': label,\n\t\t\theaderTitle: label,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor, label ]\n\t);\n\tif ( ! shouldRender ) {\n\t\treturn false;\n\t}\n\tconst excerptText = !! excerpt && (\n\t\t<Text align=\"left\" numberOfLines={ 4 } truncate={ allowEditing }>\n\t\t\t{ decodeEntities( excerpt ) }\n\t\t</Text>\n\t);\n\tif ( ! allowEditing ) {\n\t\treturn excerptText;\n\t}\n\tconst excerptPlaceholder = shouldBeUsedAsDescription\n\t\t? __( 'Add a description\u2026' )\n\t\t: __( 'Add an excerpt\u2026' );\n\tconst triggerEditLabel = shouldBeUsedAsDescription\n\t\t? __( 'Edit description' )\n\t\t: __( 'Edit excerpt' );\n\treturn (\n\t\t<VStack>\n\t\t\t{ excerptText }\n\t\t\t<Dropdown\n\t\t\t\tclassName=\"editor-post-excerpt__dropdown\"\n\t\t\t\tcontentClassName=\"editor-post-excerpt__dropdown__content\"\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\tfocusOnMount\n\t\t\t\tref={ setPopoverAnchor }\n\t\t\t\trenderToggle={ ( { onToggle } ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ excerptText ? triggerEditLabel : excerptPlaceholder }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\ttitle={ label }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t\t\t<PluginPostExcerpt.Slot>\n\t\t\t\t\t\t\t\t{ ( fills ) => (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<PostExcerptForm\n\t\t\t\t\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\t\t\t\t\tupdateOnBlur\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t{ fills }\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</PluginPostExcerpt.Slot>\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t/>\n\t\t</VStack>\n\t);\n}\n", "/**\n * Defines as extensibility slot for the Excerpt panel.\n */\n\n/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelRow } from '@wordpress/components';\n\nconst { Fill, Slot } = createSlotFill( 'PluginPostExcerpt' );\n\n/**\n * Renders a post excerpt panel in the post sidebar.\n *\n * @param {Object} props Component properties.\n * @param {string} [props.className] An optional class name added to the row.\n * @param {React.ReactNode} props.children Children to be rendered.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginPostExcerpt = wp.editPost.__experimentalPluginPostExcerpt;\n *\n * function MyPluginPostExcerpt() {\n * \treturn React.createElement(\n * \t\tPluginPostExcerpt,\n * \t\t{\n * \t\t\tclassName: 'my-plugin-post-excerpt',\n * \t\t},\n * \t\t__( 'Post excerpt custom content' )\n * \t)\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { __experimentalPluginPostExcerpt as PluginPostExcerpt } from '@wordpress/edit-post';\n *\n * const MyPluginPostExcerpt = () => (\n * \t<PluginPostExcerpt className=\"my-plugin-post-excerpt\">\n * \t\t{ __( 'Post excerpt custom content' ) }\n * \t</PluginPostExcerpt>\n * );\n * ```\n *\n * @return {React.ReactNode} The rendered component.\n */\nconst PluginPostExcerpt = ( { children, className } ) => {\n\treturn (\n\t\t<Fill>\n\t\t\t<PanelRow className={ className }>{ children }</PanelRow>\n\t\t</Fill>\n\t);\n};\n\nPluginPostExcerpt.Slot = Slot;\n\nexport default PluginPostExcerpt;\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { applyFilters } from '@wordpress/hooks';\nimport {\n\tDropZone,\n\tButton,\n\tSpinner,\n\twithNotices,\n\twithFilters,\n\t__experimentalHStack as HStack,\n\tNotice,\n} from '@wordpress/components';\nimport { isBlobURL } from '@wordpress/blob';\nimport { useState, useRef } from '@wordpress/element';\nimport { compose } from '@wordpress/compose';\nimport { useSelect, withDispatch, withSelect } from '@wordpress/data';\nimport {\n\tMediaUpload,\n\tMediaUploadCheck,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostFeaturedImageCheck from './check';\nimport { store as editorStore } from '../../store';\n\nconst ALLOWED_MEDIA_TYPES = [ 'image' ];\n\n// Used when labels from post type were not yet loaded or when they are not present.\nconst DEFAULT_FEATURE_IMAGE_LABEL = __( 'Featured image' );\nconst DEFAULT_SET_FEATURE_IMAGE_LABEL = __( 'Add a featured image' );\n\nconst instructions = (\n\t<p>\n\t\t{ __(\n\t\t\t'To edit the featured image, you need permission to upload media.'\n\t\t) }\n\t</p>\n);\n\nfunction getMediaDetails( media, postId ) {\n\tif ( ! media ) {\n\t\treturn {};\n\t}\n\n\tconst defaultSize = applyFilters(\n\t\t'editor.PostFeaturedImage.imageSize',\n\t\t'large',\n\t\tmedia.id,\n\t\tpostId\n\t);\n\tif ( defaultSize in ( media?.media_details?.sizes ?? {} ) ) {\n\t\treturn {\n\t\t\tmediaWidth: media.media_details.sizes[ defaultSize ].width,\n\t\t\tmediaHeight: media.media_details.sizes[ defaultSize ].height,\n\t\t\tmediaSourceUrl: media.media_details.sizes[ defaultSize ].source_url,\n\t\t};\n\t}\n\n\t// Use fallbackSize when defaultSize is not available.\n\tconst fallbackSize = applyFilters(\n\t\t'editor.PostFeaturedImage.imageSize',\n\t\t'thumbnail',\n\t\tmedia.id,\n\t\tpostId\n\t);\n\tif ( fallbackSize in ( media?.media_details?.sizes ?? {} ) ) {\n\t\treturn {\n\t\t\tmediaWidth: media.media_details.sizes[ fallbackSize ].width,\n\t\t\tmediaHeight: media.media_details.sizes[ fallbackSize ].height,\n\t\t\tmediaSourceUrl:\n\t\t\t\tmedia.media_details.sizes[ fallbackSize ].source_url,\n\t\t};\n\t}\n\n\t// Use full image size when fallbackSize and defaultSize are not available.\n\treturn {\n\t\tmediaWidth: media.media_details.width,\n\t\tmediaHeight: media.media_details.height,\n\t\tmediaSourceUrl: media.source_url,\n\t};\n}\n\nfunction PostFeaturedImage( {\n\tcurrentPostId,\n\tfeaturedImageId,\n\tonUpdateImage,\n\tonRemoveImage,\n\tmedia,\n\tpostType,\n\tnoticeUI,\n\tnoticeOperations,\n\tisRequestingFeaturedImageMedia,\n} ) {\n\tconst returnsFocusRef = useRef( false );\n\tconst [ isLoading, setIsLoading ] = useState( false );\n\tconst { getSettings } = useSelect( blockEditorStore );\n\tconst { mediaSourceUrl } = getMediaDetails( media, currentPostId );\n\n\tfunction onDropFiles( filesList ) {\n\t\tgetSettings().mediaUpload( {\n\t\t\tallowedTypes: ALLOWED_MEDIA_TYPES,\n\t\t\tfilesList,\n\t\t\tonFileChange( [ image ] ) {\n\t\t\t\tif ( isBlobURL( image?.url ) ) {\n\t\t\t\t\tsetIsLoading( true );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( image ) {\n\t\t\t\t\tonUpdateImage( image );\n\t\t\t\t}\n\t\t\t\tsetIsLoading( false );\n\t\t\t},\n\t\t\tonError( message ) {\n\t\t\t\tnoticeOperations.removeAllNotices();\n\t\t\t\tnoticeOperations.createErrorNotice( message );\n\t\t\t},\n\t\t\tmultiple: false,\n\t\t} );\n\t}\n\n\t/**\n\t * Generates the featured image alt text for this editing context.\n\t *\n\t * @param {Object} imageMedia The image media object.\n\t * @param {string} imageMedia.alt_text The alternative text of the image.\n\t * @param {Object} imageMedia.media_details The media details of the image.\n\t * @param {Object} imageMedia.media_details.sizes The sizes of the image.\n\t * @param {Object} imageMedia.media_details.sizes.full The full size details of the image.\n\t * @param {string} imageMedia.media_details.sizes.full.file The file name of the full size image.\n\t * @param {string} imageMedia.slug The slug of the image.\n\t * @return {string} The featured image alt text.\n\t */\n\tfunction getImageDescription( imageMedia ) {\n\t\tif ( imageMedia.alt_text ) {\n\t\t\treturn sprintf(\n\t\t\t\t// Translators: %s: The selected image alt text.\n\t\t\t\t__( 'Current image: %s' ),\n\t\t\t\timageMedia.alt_text\n\t\t\t);\n\t\t}\n\t\treturn sprintf(\n\t\t\t// Translators: %s: The selected image filename.\n\t\t\t__(\n\t\t\t\t'The current image has no alternative text. The file name is: %s'\n\t\t\t),\n\t\t\timageMedia.media_details.sizes?.full?.file || imageMedia.slug\n\t\t);\n\t}\n\n\tfunction returnFocus( node ) {\n\t\tif ( returnsFocusRef.current && node ) {\n\t\t\tnode.focus();\n\t\t\treturnsFocusRef.current = false;\n\t\t}\n\t}\n\n\tconst isMissingMedia =\n\t\t! isRequestingFeaturedImageMedia && !! featuredImageId && ! media;\n\n\treturn (\n\t\t<PostFeaturedImageCheck>\n\t\t\t{ noticeUI }\n\t\t\t<div className=\"editor-post-featured-image\">\n\t\t\t\t{ media && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tid={ `editor-post-featured-image-${ featuredImageId }-describedby` }\n\t\t\t\t\t\tclassName=\"hidden\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ getImageDescription( media ) }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t\t<MediaUploadCheck fallback={ instructions }>\n\t\t\t\t\t<MediaUpload\n\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\tpostType?.labels?.featured_image ||\n\t\t\t\t\t\t\tDEFAULT_FEATURE_IMAGE_LABEL\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonSelect={ onUpdateImage }\n\t\t\t\t\t\tunstableFeaturedImageFlow\n\t\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\t\tmodalClass=\"editor-post-featured-image__media-modal\"\n\t\t\t\t\t\trender={ ( { open } ) => (\n\t\t\t\t\t\t\t<div className=\"editor-post-featured-image__container\">\n\t\t\t\t\t\t\t\t{ isMissingMedia ? (\n\t\t\t\t\t\t\t\t\t<Notice\n\t\t\t\t\t\t\t\t\t\tstatus=\"warning\"\n\t\t\t\t\t\t\t\t\t\tisDismissible={ false }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t'Could not retrieve the featured image data.'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</Notice>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\tref={ returnFocus }\n\t\t\t\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\t\t\t\t! featuredImageId\n\t\t\t\t\t\t\t\t\t\t\t\t? 'editor-post-featured-image__toggle'\n\t\t\t\t\t\t\t\t\t\t\t\t: 'editor-post-featured-image__preview'\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonClick={ open }\n\t\t\t\t\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\t\t\t\t\t! featuredImageId\n\t\t\t\t\t\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Edit or replace the featured image'\n\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\t\t\t\t\t! featuredImageId\n\t\t\t\t\t\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t\t\t\t\t\t: `editor-post-featured-image-${ featuredImageId }-describedby`\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\t\t\t\t\t\tdisabled={ isLoading }\n\t\t\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ !! featuredImageId && media && (\n\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"editor-post-featured-image__preview-image\"\n\t\t\t\t\t\t\t\t\t\t\t\tsrc={ mediaSourceUrl }\n\t\t\t\t\t\t\t\t\t\t\t\talt={ getImageDescription(\n\t\t\t\t\t\t\t\t\t\t\t\t\tmedia\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t{ ( isLoading ||\n\t\t\t\t\t\t\t\t\t\t\tisRequestingFeaturedImageMedia ) && (\n\t\t\t\t\t\t\t\t\t\t\t<Spinner />\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t{ ! featuredImageId &&\n\t\t\t\t\t\t\t\t\t\t\t! isLoading &&\n\t\t\t\t\t\t\t\t\t\t\t( postType?.labels\n\t\t\t\t\t\t\t\t\t\t\t\t?.set_featured_image ||\n\t\t\t\t\t\t\t\t\t\t\t\tDEFAULT_SET_FEATURE_IMAGE_LABEL ) }\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ !! featuredImageId && (\n\t\t\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\t\t\t'editor-post-featured-image__actions',\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t'editor-post-featured-image__actions-missing-image':\n\t\t\t\t\t\t\t\t\t\t\t\t\tisMissingMedia,\n\t\t\t\t\t\t\t\t\t\t\t\t'editor-post-featured-image__actions-is-requesting-image':\n\t\t\t\t\t\t\t\t\t\t\t\t\tisRequestingFeaturedImageMedia,\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"editor-post-featured-image__action\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={ open }\n\t\t\t\t\t\t\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\t\tisMissingMedia\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 'secondary'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Replace' ) }\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"editor-post-featured-image__action\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\t\tonRemoveImage();\n\t\t\t\t\t\t\t\t\t\t\t\t// Signal that the toggle button should be focused,\n\t\t\t\t\t\t\t\t\t\t\t\t// when it is rendered. Can't focus it directly here\n\t\t\t\t\t\t\t\t\t\t\t\t// because it's rendered conditionally.\n\t\t\t\t\t\t\t\t\t\t\t\treturnsFocusRef.current = true;\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\t\tisMissingMedia\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 'secondary'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tisDestructive={ isMissingMedia }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Remove' ) }\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<DropZone onFilesDrop={ onDropFiles } />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tvalue={ featuredImageId }\n\t\t\t\t\t/>\n\t\t\t\t</MediaUploadCheck>\n\t\t\t</div>\n\t\t</PostFeaturedImageCheck>\n\t);\n}\n\nconst applyWithSelect = withSelect( ( select ) => {\n\tconst { getEntityRecord, getPostType, hasFinishedResolution } =\n\t\tselect( coreStore );\n\tconst { getCurrentPostId, getEditedPostAttribute } = select( editorStore );\n\tconst featuredImageId = getEditedPostAttribute( 'featured_media' );\n\n\treturn {\n\t\tmedia: featuredImageId\n\t\t\t? getEntityRecord( 'postType', 'attachment', featuredImageId, {\n\t\t\t\t\tcontext: 'view',\n\t\t\t } )\n\t\t\t: null,\n\t\tcurrentPostId: getCurrentPostId(),\n\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\tfeaturedImageId,\n\t\tisRequestingFeaturedImageMedia:\n\t\t\t!! featuredImageId &&\n\t\t\t! hasFinishedResolution( 'getEntityRecord', [\n\t\t\t\t'postType',\n\t\t\t\t'attachment',\n\t\t\t\tfeaturedImageId,\n\t\t\t\t{ context: 'view' },\n\t\t\t] ),\n\t};\n} );\n\nconst applyWithDispatch = withDispatch(\n\t( dispatch, { noticeOperations }, { select } ) => {\n\t\tconst { editPost } = dispatch( editorStore );\n\t\treturn {\n\t\t\tonUpdateImage( image ) {\n\t\t\t\teditPost( { featured_media: image.id } );\n\t\t\t},\n\t\t\tonDropImage( filesList ) {\n\t\t\t\tselect( blockEditorStore )\n\t\t\t\t\t.getSettings()\n\t\t\t\t\t.mediaUpload( {\n\t\t\t\t\t\tallowedTypes: [ 'image' ],\n\t\t\t\t\t\tfilesList,\n\t\t\t\t\t\tonFileChange( [ image ] ) {\n\t\t\t\t\t\t\teditPost( { featured_media: image.id } );\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonError( message ) {\n\t\t\t\t\t\t\tnoticeOperations.removeAllNotices();\n\t\t\t\t\t\t\tnoticeOperations.createErrorNotice( message );\n\t\t\t\t\t\t},\n\t\t\t\t\t\tmultiple: false,\n\t\t\t\t\t} );\n\t\t\t},\n\t\t\tonRemoveImage() {\n\t\t\t\teditPost( { featured_media: 0 } );\n\t\t\t},\n\t\t};\n\t}\n);\n\n/**\n * Renders the component for managing the featured image of a post.\n *\n * @param {Object} props Props.\n * @param {number} props.currentPostId ID of the current post.\n * @param {number} props.featuredImageId ID of the featured image.\n * @param {Function} props.onUpdateImage Function to call when the image is updated.\n * @param {Function} props.onRemoveImage Function to call when the image is removed.\n * @param {Object} props.media The media object representing the featured image.\n * @param {string} props.postType Post type.\n * @param {Element} props.noticeUI UI for displaying notices.\n * @param {Object} props.noticeOperations Operations for managing notices.\n *\n * @return {Element} Component to be rendered .\n */\nexport default compose(\n\twithNotices,\n\tapplyWithSelect,\n\tapplyWithDispatch,\n\twithFilters( 'editor.PostFeaturedImage' )\n)( PostFeaturedImage );\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Checks if the current theme supports specific features and renders the children if supported.\n *\n * @param {Object} props The component props.\n * @param {React.ReactNode} props.children The children to render if the theme supports the specified features.\n * @param {string|string[]} props.supportKeys The key(s) of the theme support(s) to check.\n *\n * @return {React.ReactNode} The rendered children if the theme supports the specified features, otherwise null.\n */\nexport default function ThemeSupportCheck( { children, supportKeys } ) {\n\tconst { postType, themeSupports } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tpostType: select( editorStore ).getEditedPostAttribute( 'type' ),\n\t\t\tthemeSupports: select( coreStore ).getThemeSupports(),\n\t\t};\n\t}, [] );\n\n\tconst isSupported = (\n\t\tArray.isArray( supportKeys ) ? supportKeys : [ supportKeys ]\n\t).some( ( key ) => {\n\t\tconst supported = themeSupports?.[ key ] ?? false;\n\t\t// 'post-thumbnails' can be boolean or an array of post types.\n\t\t// In the latter case, we need to verify `postType` exists\n\t\t// within `supported`. If `postType` isn't passed, then the check\n\t\t// should fail.\n\t\tif ( 'post-thumbnails' === key && Array.isArray( supported ) ) {\n\t\t\treturn supported.includes( postType );\n\t\t}\n\t\treturn supported;\n\t} );\n\n\tif ( ! isSupported ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n", "/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport ThemeSupportCheck from '../theme-support-check';\n\n/**\n * Wrapper component that renders its children only if the post type supports a featured image\n * and the theme supports post thumbnails.\n *\n * @param {Object} props Props.\n * @param {React.ReactNode} props.children Children to be rendered.\n *\n * @return {React.ReactNode} The rendered component.\n */\nfunction PostFeaturedImageCheck( { children } ) {\n\treturn (\n\t\t<ThemeSupportCheck supportKeys=\"post-thumbnails\">\n\t\t\t<PostTypeSupportCheck supportKeys=\"thumbnail\">\n\t\t\t\t{ children }\n\t\t\t</PostTypeSupportCheck>\n\t\t</ThemeSupportCheck>\n\t);\n}\n\nexport default PostFeaturedImageCheck;\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { PanelBody } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport PostFeaturedImage from './index';\nimport PostFeaturedImageCheck from './check';\n\nconst PANEL_NAME = 'featured-image';\n\n/**\n * Renders the panel for the post featured image.\n *\n * @param {Object} props Props.\n * @param {boolean} props.withPanelBody Whether to include the panel body. Default true.\n *\n * @return {React.ReactNode} The component to be rendered.\n * Return Null if the editor panel is disabled for featured image.\n */\nexport default function PostFeaturedImagePanel( { withPanelBody = true } ) {\n\tconst { postType, isEnabled, isOpened } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEditedPostAttribute,\n\t\t\tisEditorPanelEnabled,\n\t\t\tisEditorPanelOpened,\n\t\t} = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\n\t\treturn {\n\t\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\t\tisEnabled: isEditorPanelEnabled( PANEL_NAME ),\n\t\t\tisOpened: isEditorPanelOpened( PANEL_NAME ),\n\t\t};\n\t}, [] );\n\n\tconst { toggleEditorPanelOpened } = useDispatch( editorStore );\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\tif ( ! withPanelBody ) {\n\t\treturn (\n\t\t\t<PostFeaturedImageCheck>\n\t\t\t\t<PostFeaturedImage />\n\t\t\t</PostFeaturedImageCheck>\n\t\t);\n\t}\n\n\treturn (\n\t\t<PostFeaturedImageCheck>\n\t\t\t<PanelBody\n\t\t\t\ttitle={\n\t\t\t\t\tpostType?.labels?.featured_image ?? __( 'Featured image' )\n\t\t\t\t}\n\t\t\t\topened={ isOpened }\n\t\t\t\tonToggle={ () => toggleEditorPanelOpened( PANEL_NAME ) }\n\t\t\t>\n\t\t\t\t<PostFeaturedImage />\n\t\t\t</PanelBody>\n\t\t</PostFeaturedImageCheck>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Button, RadioControl } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useInstanceId } from '@wordpress/compose';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostFormatCheck from './check';\nimport { store as editorStore } from '../../store';\n\n// All WP post formats, sorted alphabetically by translated name.\nexport const POST_FORMATS = [\n\t{ id: 'aside', caption: __( 'Aside' ) },\n\t{ id: 'audio', caption: __( 'Audio' ) },\n\t{ id: 'chat', caption: __( 'Chat' ) },\n\t{ id: 'gallery', caption: __( 'Gallery' ) },\n\t{ id: 'image', caption: __( 'Image' ) },\n\t{ id: 'link', caption: __( 'Link' ) },\n\t{ id: 'quote', caption: __( 'Quote' ) },\n\t{ id: 'standard', caption: __( 'Standard' ) },\n\t{ id: 'status', caption: __( 'Status' ) },\n\t{ id: 'video', caption: __( 'Video' ) },\n].sort( ( a, b ) => {\n\tconst normalizedA = a.caption.toUpperCase();\n\tconst normalizedB = b.caption.toUpperCase();\n\n\tif ( normalizedA < normalizedB ) {\n\t\treturn -1;\n\t}\n\tif ( normalizedA > normalizedB ) {\n\t\treturn 1;\n\t}\n\treturn 0;\n} );\n\n/**\n * `PostFormat` a component that allows changing the post format while also providing a suggestion for the current post.\n *\n * @example\n * ```jsx\n * <PostFormat />\n * ```\n *\n * @return {React.ReactNode} The rendered PostFormat component.\n */\nexport default function PostFormat() {\n\tconst instanceId = useInstanceId( PostFormat );\n\tconst postFormatSelectorId = `post-format-selector-${ instanceId }`;\n\n\tconst { postFormat, suggestedFormat, supportedFormats } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedPostAttribute, getSuggestedPostFormat } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst _postFormat = getEditedPostAttribute( 'format' );\n\t\t\tconst themeSupports = select( coreStore ).getThemeSupports();\n\t\t\treturn {\n\t\t\t\tpostFormat: _postFormat ?? 'standard',\n\t\t\t\tsuggestedFormat: getSuggestedPostFormat(),\n\t\t\t\tsupportedFormats: themeSupports.formats,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst formats = POST_FORMATS.filter( ( format ) => {\n\t\t// Ensure current format is always in the set.\n\t\t// The current format may not be a format supported by the theme.\n\t\treturn (\n\t\t\tsupportedFormats?.includes( format.id ) || postFormat === format.id\n\t\t);\n\t} );\n\tconst suggestion = formats.find(\n\t\t( format ) => format.id === suggestedFormat\n\t);\n\n\tconst { editPost } = useDispatch( editorStore );\n\n\tconst onUpdatePostFormat = ( format ) => editPost( { format } );\n\n\treturn (\n\t\t<PostFormatCheck>\n\t\t\t<div className=\"editor-post-format\">\n\t\t\t\t<RadioControl\n\t\t\t\t\tclassName=\"editor-post-format__options\"\n\t\t\t\t\tlabel={ __( 'Post Format' ) }\n\t\t\t\t\tselected={ postFormat }\n\t\t\t\t\tonChange={ ( format ) => onUpdatePostFormat( format ) }\n\t\t\t\t\tid={ postFormatSelectorId }\n\t\t\t\t\toptions={ formats.map( ( format ) => ( {\n\t\t\t\t\t\tlabel: format.caption,\n\t\t\t\t\t\tvalue: format.id,\n\t\t\t\t\t} ) ) }\n\t\t\t\t\thideLabelFromVision\n\t\t\t\t/>\n\t\t\t\t{ suggestion && suggestion.id !== postFormat && (\n\t\t\t\t\t<p className=\"editor-post-format__suggestion\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\tonUpdatePostFormat( suggestion.id )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: post format */\n\t\t\t\t\t\t\t\t__( 'Apply suggested format: %s' ),\n\t\t\t\t\t\t\t\tsuggestion.caption\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</p>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</PostFormatCheck>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { store as editorStore } from '../../store';\n\n/**\n * Component check if there are any post formats.\n *\n * @param {Object} props The component props.\n * @param {React.ReactNode} props.children The child elements to render.\n *\n * @return {React.ReactNode} The rendered component or null if post formats are disabled.\n */\nexport default function PostFormatCheck( { children } ) {\n\tconst disablePostFormats = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditorSettings().disablePostFormats,\n\t\t[]\n\t);\n\n\tif ( disablePostFormats ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"post-formats\">\n\t\t\t{ children }\n\t\t</PostTypeSupportCheck>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { sprintf, __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { backup } from '@wordpress/icons';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport PostLastRevisionCheck from './check';\nimport PostPanelRow from '../post-panel-row';\nimport { store as editorStore } from '../../store';\n\nfunction usePostLastRevisionInfo() {\n\treturn useSelect( ( select ) => {\n\t\tconst { getCurrentPostLastRevisionId, getCurrentPostRevisionsCount } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tlastRevisionId: getCurrentPostLastRevisionId(),\n\t\t\trevisionsCount: getCurrentPostRevisionsCount(),\n\t\t};\n\t}, [] );\n}\n\n/**\n * Renders the component for displaying the last revision of a post.\n *\n * @return {React.ReactNode} The rendered component.\n */\nfunction PostLastRevision() {\n\tconst { lastRevisionId, revisionsCount } = usePostLastRevisionInfo();\n\n\treturn (\n\t\t<PostLastRevisionCheck>\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\thref={ addQueryArgs( 'revision.php', {\n\t\t\t\t\trevision: lastRevisionId,\n\t\t\t\t} ) }\n\t\t\t\tclassName=\"editor-post-last-revision__title\"\n\t\t\t\ticon={ backup }\n\t\t\t\ticonPosition=\"right\"\n\t\t\t\ttext={ sprintf(\n\t\t\t\t\t/* translators: %s: number of revisions. */\n\t\t\t\t\t__( 'Revisions (%s)' ),\n\t\t\t\t\trevisionsCount\n\t\t\t\t) }\n\t\t\t/>\n\t\t</PostLastRevisionCheck>\n\t);\n}\n\nexport function PrivatePostLastRevision() {\n\tconst { lastRevisionId, revisionsCount } = usePostLastRevisionInfo();\n\treturn (\n\t\t<PostLastRevisionCheck>\n\t\t\t<PostPanelRow label={ __( 'Revisions' ) }>\n\t\t\t\t<Button\n\t\t\t\t\thref={ addQueryArgs( 'revision.php', {\n\t\t\t\t\t\trevision: lastRevisionId,\n\t\t\t\t\t} ) }\n\t\t\t\t\tclassName=\"editor-private-post-last-revision__button\"\n\t\t\t\t\ttext={ revisionsCount }\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t</PostPanelRow>\n\t\t</PostLastRevisionCheck>\n\t);\n}\n\nexport default PostLastRevision;\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { store as editorStore } from '../../store';\n\n/**\n * Wrapper component that renders its children if the post has more than one revision.\n *\n * @param {Object} props Props.\n * @param {React.ReactNode} props.children Children to be rendered.\n *\n * @return {React.ReactNode} Rendered child components if post has more than one revision, otherwise null.\n */\nfunction PostLastRevisionCheck( { children } ) {\n\tconst { lastRevisionId, revisionsCount } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostLastRevisionId, getCurrentPostRevisionsCount } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tlastRevisionId: getCurrentPostLastRevisionId(),\n\t\t\trevisionsCount: getCurrentPostRevisionsCount(),\n\t\t};\n\t}, [] );\n\n\tif ( ! lastRevisionId || revisionsCount < 2 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"revisions\">\n\t\t\t{ children }\n\t\t</PostTypeSupportCheck>\n\t);\n}\n\nexport default PostLastRevisionCheck;\n", "/**\n * WordPress dependencies\n */\nimport { PanelBody } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport PostLastRevision from './';\nimport PostLastRevisionCheck from './check';\n\n/**\n * Renders the panel for displaying the last revision of a post.\n *\n * @return {React.ReactNode} The rendered component.\n */\nfunction PostLastRevisionPanel() {\n\treturn (\n\t\t<PostLastRevisionCheck>\n\t\t\t<PanelBody className=\"editor-post-last-revision__panel\">\n\t\t\t\t<PostLastRevision />\n\t\t\t</PanelBody>\n\t\t</PostLastRevisionCheck>\n\t);\n}\n\nexport default PostLastRevisionPanel;\n", "/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tModal,\n\tButton,\n\tExternalLink,\n\t__experimentalHStack as HStack,\n\twithFilters,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { addQueryArgs } from '@wordpress/url';\nimport { useEffect, createInterpolateElement } from '@wordpress/element';\nimport { addAction, removeAction } from '@wordpress/hooks';\nimport { useInstanceId } from '@wordpress/compose';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction PostLockedModal() {\n\tconst instanceId = useInstanceId( PostLockedModal );\n\tconst hookName = 'core/editor/post-locked-modal-' + instanceId;\n\tconst { autosave, updatePostLock } = useDispatch( editorStore );\n\tconst {\n\t\tisLocked,\n\t\tisTakeover,\n\t\tuser,\n\t\tpostId,\n\t\tpostLockUtils,\n\t\tactivePostLock,\n\t\tpostType,\n\t\tpreviewLink,\n\t\tsupportsSync,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tisPostLocked,\n\t\t\tisPostLockTakeover,\n\t\t\tgetPostLockUser,\n\t\t\tgetCurrentPostId,\n\t\t\tgetCurrentPostType,\n\t\t\tgetActivePostLock,\n\t\t\tgetEditedPostAttribute,\n\t\t\tgetEditedPostPreviewLink,\n\t\t\tgetEditorSettings,\n\t\t} = select( editorStore );\n\t\tconst { getPostType, getEntityConfig } = select( coreStore );\n\t\tconst currentPostType = getCurrentPostType();\n\t\treturn {\n\t\t\tisLocked: isPostLocked(),\n\t\t\tisTakeover: isPostLockTakeover(),\n\t\t\tuser: getPostLockUser(),\n\t\t\tpostId: getCurrentPostId(),\n\t\t\tpostLockUtils: getEditorSettings().postLockUtils,\n\t\t\tactivePostLock: getActivePostLock(),\n\t\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\t\tpreviewLink: getEditedPostPreviewLink(),\n\t\t\tsupportsSync: Boolean(\n\t\t\t\tgetEntityConfig( 'postType', currentPostType )?.syncConfig\n\t\t\t),\n\t\t};\n\t}, [] );\n\n\tuseEffect( () => {\n\t\t/**\n\t\t * Keep the lock refreshed.\n\t\t *\n\t\t * When the user does not send a heartbeat in a heartbeat-tick\n\t\t * the user is no longer editing and another user can start editing.\n\t\t *\n\t\t * @param {Object} data Data to send in the heartbeat request.\n\t\t */\n\t\tfunction sendPostLock( data ) {\n\t\t\tif ( isLocked ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdata[ 'wp-refresh-post-lock' ] = {\n\t\t\t\tlock: activePostLock,\n\t\t\t\tpost_id: postId,\n\t\t\t};\n\t\t}\n\n\t\t/**\n\t\t * Refresh post locks: update the lock string or show the dialog if somebody has taken over editing.\n\t\t *\n\t\t * @param {Object} data Data received in the heartbeat request\n\t\t */\n\t\tfunction receivePostLock( data ) {\n\t\t\tif ( ! data[ 'wp-refresh-post-lock' ] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst received = data[ 'wp-refresh-post-lock' ];\n\t\t\tif ( received.lock_error ) {\n\t\t\t\t// Auto save and display the takeover modal.\n\t\t\t\tautosave();\n\t\t\t\tupdatePostLock( {\n\t\t\t\t\tisLocked: true,\n\t\t\t\t\tisTakeover: true,\n\t\t\t\t\tuser: {\n\t\t\t\t\t\tname: received.lock_error.name,\n\t\t\t\t\t\tavatar: received.lock_error.avatar_src_2x,\n\t\t\t\t\t},\n\t\t\t\t} );\n\t\t\t} else if ( received.new_lock ) {\n\t\t\t\tupdatePostLock( {\n\t\t\t\t\tisLocked: false,\n\t\t\t\t\tactivePostLock: received.new_lock,\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Unlock the post before the window is exited.\n\t\t */\n\t\tfunction releasePostLock() {\n\t\t\tif ( isLocked || ! activePostLock ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst data = new window.FormData();\n\t\t\tdata.append( 'action', 'wp-remove-post-lock' );\n\t\t\tdata.append( '_wpnonce', postLockUtils.unlockNonce );\n\t\t\tdata.append( 'post_ID', postId );\n\t\t\tdata.append( 'active_post_lock', activePostLock );\n\n\t\t\tif ( window.navigator.sendBeacon ) {\n\t\t\t\twindow.navigator.sendBeacon( postLockUtils.ajaxUrl, data );\n\t\t\t} else {\n\t\t\t\tconst xhr = new window.XMLHttpRequest();\n\t\t\t\txhr.open( 'POST', postLockUtils.ajaxUrl, false );\n\t\t\t\txhr.send( data );\n\t\t\t}\n\t\t}\n\n\t\t// Details on these events on the Heartbeat API docs\n\t\t// https://developer.wordpress.org/plugins/javascript/heartbeat-api/\n\t\taddAction( 'heartbeat.send', hookName, sendPostLock );\n\t\taddAction( 'heartbeat.tick', hookName, receivePostLock );\n\t\twindow.addEventListener( 'beforeunload', releasePostLock );\n\n\t\treturn () => {\n\t\t\tremoveAction( 'heartbeat.send', hookName );\n\t\t\tremoveAction( 'heartbeat.tick', hookName );\n\t\t\twindow.removeEventListener( 'beforeunload', releasePostLock );\n\t\t};\n\t}, [] );\n\n\tif ( ! isLocked ) {\n\t\treturn null;\n\t}\n\n\t// Avoid sending the modal if sync is supported, but retain functionality around locks etc.\n\tif ( supportsSync ) {\n\t\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t\treturn null;\n\t\t}\n\t}\n\n\tconst userDisplayName = user.name;\n\tconst userAvatar = user.avatar;\n\n\tconst unlockUrl = addQueryArgs( 'post.php', {\n\t\t'get-post-lock': '1',\n\t\tlockKey: true,\n\t\tpost: postId,\n\t\taction: 'edit',\n\t\t_wpnonce: postLockUtils.nonce,\n\t} );\n\tconst allPostsUrl = addQueryArgs( 'edit.php', {\n\t\tpost_type: postType?.slug,\n\t} );\n\tconst allPostsLabel = __( 'Exit editor' );\n\treturn (\n\t\t<Modal\n\t\t\ttitle={\n\t\t\t\tisTakeover\n\t\t\t\t\t? __( 'Someone else has taken over this post' )\n\t\t\t\t\t: __( 'This post is already being edited' )\n\t\t\t}\n\t\t\tfocusOnMount\n\t\t\tshouldCloseOnClickOutside={ false }\n\t\t\tshouldCloseOnEsc={ false }\n\t\t\tisDismissible={ false }\n\t\t\t// Do not remove this class, as this class is used by third party plugins.\n\t\t\tclassName=\"editor-post-locked-modal\"\n\t\t\tsize=\"medium\"\n\t\t>\n\t\t\t<HStack alignment=\"top\" spacing={ 6 }>\n\t\t\t\t{ !! userAvatar && (\n\t\t\t\t\t<img\n\t\t\t\t\t\tsrc={ userAvatar }\n\t\t\t\t\t\talt={ __( 'Avatar' ) }\n\t\t\t\t\t\tclassName=\"editor-post-locked-modal__avatar\"\n\t\t\t\t\t\twidth={ 64 }\n\t\t\t\t\t\theight={ 64 }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<div>\n\t\t\t\t\t{ !! isTakeover && (\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\tuserDisplayName\n\t\t\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: user's display name */\n\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t'<strong>%s</strong> now has editing control of this post (<PreviewLink />). Don\u2019t worry, your changes up to this moment have been saved.'\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tuserDisplayName\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t'Another user now has editing control of this post (<PreviewLink />). Don\u2019t worry, your changes up to this moment have been saved.'\n\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tstrong: <strong />,\n\t\t\t\t\t\t\t\t\tPreviewLink: (\n\t\t\t\t\t\t\t\t\t\t<ExternalLink href={ previewLink }>\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'preview' ) }\n\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! isTakeover && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\tuserDisplayName\n\t\t\t\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: user's display name */\n\t\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'<strong>%s</strong> is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over.'\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tuserDisplayName\n\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Another user is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over.'\n\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tstrong: <strong />,\n\t\t\t\t\t\t\t\t\t\tPreviewLink: (\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink href={ previewLink }>\n\t\t\t\t\t\t\t\t\t\t\t\t{ __( 'preview' ) }\n\t\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'If you take over, the other user will lose editing control to the post, but their changes will be saved.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\n\t\t\t\t\t<HStack\n\t\t\t\t\t\tclassName=\"editor-post-locked-modal__buttons\"\n\t\t\t\t\t\tjustify=\"flex-end\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! isTakeover && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\thref={ unlockUrl }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Take over' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\thref={ allPostsUrl }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ allPostsLabel }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</div>\n\t\t\t</HStack>\n\t\t</Modal>\n\t);\n}\n\n/**\n * A modal component that is displayed when a post is locked for editing by another user.\n * The modal provides information about the lock status and options to take over or exit the editor.\n *\n * @return {React.ReactNode} The rendered PostLockedModal component.\n */\nexport default globalThis.IS_GUTENBERG_PLUGIN\n\t? withFilters( 'editor.PostLockedModal' )( PostLockedModal )\n\t: PostLockedModal;\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { CheckboxControl } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostPendingStatusCheck from './check';\nimport { store as editorStore } from '../../store';\n\n/**\n * A component for displaying and toggling the pending status of a post.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport function PostPendingStatus() {\n\tconst status = useSelect(\n\t\t( select ) => select( editorStore ).getEditedPostAttribute( 'status' ),\n\t\t[]\n\t);\n\tconst { editPost } = useDispatch( editorStore );\n\tconst togglePendingStatus = () => {\n\t\tconst updatedStatus = status === 'pending' ? 'draft' : 'pending';\n\t\teditPost( { status: updatedStatus } );\n\t};\n\n\treturn (\n\t\t<PostPendingStatusCheck>\n\t\t\t<CheckboxControl\n\t\t\t\tlabel={ __( 'Pending review' ) }\n\t\t\t\tchecked={ status === 'pending' }\n\t\t\t\tonChange={ togglePendingStatus }\n\t\t\t/>\n\t\t</PostPendingStatusCheck>\n\t);\n}\n\nexport default PostPendingStatus;\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * This component checks the publishing status of the current post.\n * If the post is already published or the user doesn't have the\n * capability to publish, it returns null.\n *\n * @param {Object} props Component properties.\n * @param {React.ReactNode} props.children Children to be rendered.\n *\n * @return {React.ReactNode} The rendered child elements or null if the post is already published or the user doesn't have the capability to publish.\n */\nexport function PostPendingStatusCheck( { children } ) {\n\tconst { hasPublishAction, isPublished } = useSelect( ( select ) => {\n\t\tconst { isCurrentPostPublished, getCurrentPost } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\thasPublishAction:\n\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t};\n\t}, [] );\n\n\tif ( isPublished || ! hasPublishAction ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default PostPendingStatusCheck;\n", "/**\n * WordPress dependencies\n */\nimport { renderToString } from '@wordpress/element';\nimport { Button, Path, SVG, VisuallyHidden } from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { applyFilters } from '@wordpress/hooks';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction writeInterstitialMessage( targetDocument ) {\n\tlet markup = renderToString(\n\t\t<div className=\"editor-post-preview-button__interstitial-message\">\n\t\t\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 96 96\">\n\t\t\t\t<Path\n\t\t\t\t\tclassName=\"outer\"\n\t\t\t\t\td=\"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t/>\n\t\t\t\t<Path\n\t\t\t\t\tclassName=\"inner\"\n\t\t\t\t\td=\"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t/>\n\t\t\t</SVG>\n\t\t\t<p>{ __( 'Generating preview\u2026' ) }</p>\n\t\t</div>\n\t);\n\n\tmarkup += `\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\twidth: 100vw;\n\t\t\t}\n\t\t\t@-webkit-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-moz-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-o-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg {\n\t\t\t\twidth: 192px;\n\t\t\t\theight: 192px;\n\t\t\t\tstroke: #555d66;\n\t\t\t\tstroke-width: 0.75;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg .outer,\n\t\t\t.editor-post-preview-button__interstitial-message svg .inner {\n\t\t\t\tstroke-dasharray: 280;\n\t\t\t\tstroke-dashoffset: 280;\n\t\t\t\t-webkit-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-moz-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-o-animation: paint 1.5s ease infinite alternate;\n\t\t\t\tanimation: paint 1.5s ease infinite alternate;\n\t\t\t}\n\t\t\tp {\n\t\t\t\ttext-align: center;\n\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif;\n\t\t\t}\n\t\t</style>\n\t`;\n\n\t/**\n\t * Filters the interstitial message shown when generating previews.\n\t *\n\t * @param {string} markup The preview interstitial markup.\n\t */\n\tmarkup = applyFilters( 'editor.PostPreview.interstitialMarkup', markup );\n\n\ttargetDocument.write( markup );\n\ttargetDocument.title = __( 'Generating preview\u2026' );\n\ttargetDocument.close();\n}\n\n/**\n * Renders a button that opens a new window or tab for the preview,\n * writes the interstitial message to this window, and then navigates\n * to the actual preview link. The button is not rendered if the post\n * is not viewable and disabled if the post is not saveable.\n *\n * @param {Object} props The component props.\n * @param {string} props.className The class name for the button.\n * @param {string} props.textContent The text content for the button.\n * @param {boolean} props.forceIsAutosaveable Whether to force autosave.\n * @param {string} props.role The role attribute for the button.\n * @param {Function} props.onPreview The callback function for preview event.\n *\n * @return {React.ReactNode} The rendered button component.\n */\nexport default function PostPreviewButton( {\n\tclassName,\n\ttextContent,\n\tforceIsAutosaveable,\n\trole,\n\tonPreview,\n} ) {\n\tconst { postId, currentPostLink, previewLink, isSaveable, isViewable } =\n\t\tuseSelect( ( select ) => {\n\t\t\tconst editor = select( editorStore );\n\t\t\tconst core = select( coreStore );\n\n\t\t\tconst postType = core.getPostType(\n\t\t\t\teditor.getCurrentPostType( 'type' )\n\t\t\t);\n\t\t\tconst canView = postType?.viewable ?? false;\n\t\t\tif ( ! canView ) {\n\t\t\t\treturn { isViewable: canView };\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tpostId: editor.getCurrentPostId(),\n\t\t\t\tcurrentPostLink: editor.getCurrentPostAttribute( 'link' ),\n\t\t\t\tpreviewLink: editor.getEditedPostPreviewLink(),\n\t\t\t\tisSaveable: editor.isEditedPostSaveable(),\n\t\t\t\tisViewable: canView,\n\t\t\t};\n\t\t}, [] );\n\n\tconst { __unstableSaveForPreview } = useDispatch( editorStore );\n\n\tif ( ! isViewable ) {\n\t\treturn null;\n\t}\n\n\tconst targetId = `wp-preview-${ postId }`;\n\n\tconst openPreviewWindow = async ( event ) => {\n\t\t// Our Preview button has its 'href' and 'target' set correctly for a11y\n\t\t// purposes. Unfortunately, though, we can't rely on the default 'click'\n\t\t// handler since sometimes it incorrectly opens a new tab instead of reusing\n\t\t// the existing one.\n\t\t// https://github.com/WordPress/gutenberg/pull/8330\n\t\tevent.preventDefault();\n\n\t\t// Open up a Preview tab if needed. This is where we'll show the preview.\n\t\tconst previewWindow = window.open( '', targetId );\n\n\t\t// Focus the Preview tab. This might not do anything, depending on the browser's\n\t\t// and user's preferences.\n\t\t// https://html.spec.whatwg.org/multipage/interaction.html#dom-window-focus\n\t\tpreviewWindow.focus();\n\n\t\twriteInterstitialMessage( previewWindow.document );\n\n\t\tconst link = await __unstableSaveForPreview( { forceIsAutosaveable } );\n\n\t\tpreviewWindow.location = link;\n\n\t\tonPreview?.();\n\t};\n\n\t// Link to the `?preview=true` URL if we have it, since this lets us see\n\t// changes that were autosaved since the post was last published. Otherwise,\n\t// just link to the post's URL.\n\tconst href = previewLink || currentPostLink;\n\n\treturn (\n\t\t<Button\n\t\t\tvariant={ ! className ? 'tertiary' : undefined }\n\t\t\tclassName={ className || 'editor-post-preview' }\n\t\t\thref={ href }\n\t\t\ttarget={ targetId }\n\t\t\taccessibleWhenDisabled\n\t\t\tdisabled={ ! isSaveable }\n\t\t\tonClick={ openPreviewWindow }\n\t\t\trole={ role }\n\t\t\tsize=\"compact\"\n\t\t>\n\t\t\t{ textContent || (\n\t\t\t\t<>\n\t\t\t\t\t{ _x( 'Preview', 'imperative verb' ) }\n\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t}\n\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</Button>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { Component } from '@wordpress/element';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport PublishButtonLabel from './label';\nimport { store as editorStore } from '../../store';\n\nconst noop = () => {};\n\nexport class PostPublishButton extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\n\t\tthis.createOnClick = this.createOnClick.bind( this );\n\t\tthis.closeEntitiesSavedStates =\n\t\t\tthis.closeEntitiesSavedStates.bind( this );\n\n\t\tthis.state = {\n\t\t\tentitiesSavedStatesCallback: false,\n\t\t};\n\t}\n\n\tcreateOnClick( callback ) {\n\t\treturn ( ...args ) => {\n\t\t\tconst { hasNonPostEntityChanges, setEntitiesSavedStatesCallback } =\n\t\t\t\tthis.props;\n\t\t\t// If a post with non-post entities is published, but the user\n\t\t\t// elects to not save changes to the non-post entities, those\n\t\t\t// entities will still be dirty when the Publish button is clicked.\n\t\t\t// We also need to check that the `setEntitiesSavedStatesCallback`\n\t\t\t// prop was passed. See https://github.com/WordPress/gutenberg/pull/37383\n\t\t\tif ( hasNonPostEntityChanges && setEntitiesSavedStatesCallback ) {\n\t\t\t\t// The modal for multiple entity saving will open,\n\t\t\t\t// hold the callback for saving/publishing the post\n\t\t\t\t// so that we can call it if the post entity is checked.\n\t\t\t\tthis.setState( {\n\t\t\t\t\tentitiesSavedStatesCallback: () => callback( ...args ),\n\t\t\t\t} );\n\n\t\t\t\t// Open the save panel by setting its callback.\n\t\t\t\t// To set a function on the useState hook, we must set it\n\t\t\t\t// with another function (() => myFunction). Passing the\n\t\t\t\t// function on its own will cause an error when called.\n\t\t\t\tsetEntitiesSavedStatesCallback(\n\t\t\t\t\t() => this.closeEntitiesSavedStates\n\t\t\t\t);\n\t\t\t\treturn noop;\n\t\t\t}\n\n\t\t\treturn callback( ...args );\n\t\t};\n\t}\n\n\tcloseEntitiesSavedStates( savedEntities ) {\n\t\tconst { postType, postId } = this.props;\n\t\tconst { entitiesSavedStatesCallback } = this.state;\n\t\tthis.setState( { entitiesSavedStatesCallback: false }, () => {\n\t\t\tif (\n\t\t\t\tsavedEntities &&\n\t\t\t\tsavedEntities.some(\n\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\telt.kind === 'postType' &&\n\t\t\t\t\t\telt.name === postType &&\n\t\t\t\t\t\telt.key === postId\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// The post entity was checked, call the held callback from `createOnClick`.\n\t\t\t\tentitiesSavedStatesCallback();\n\t\t\t}\n\t\t} );\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tforceIsDirty,\n\t\t\thasPublishAction,\n\t\t\tisBeingScheduled,\n\t\t\tisOpen,\n\t\t\tisPostSavingLocked,\n\t\t\tisPublishable,\n\t\t\tisPublished,\n\t\t\tisSaveable,\n\t\t\tisSaving,\n\t\t\tisAutoSaving,\n\t\t\tisToggle,\n\t\t\tsavePostStatus,\n\t\t\tonSubmit = noop,\n\t\t\tonToggle,\n\t\t\tvisibility,\n\t\t\thasNonPostEntityChanges,\n\t\t\tisSavingNonPostEntityChanges,\n\t\t\tpostStatus,\n\t\t\tpostStatusHasChanged,\n\t\t} = this.props;\n\n\t\tconst isButtonDisabled =\n\t\t\t( isSaving ||\n\t\t\t\t! isSaveable ||\n\t\t\t\tisPostSavingLocked ||\n\t\t\t\t( ! isPublishable && ! forceIsDirty ) ) &&\n\t\t\t( ! hasNonPostEntityChanges || isSavingNonPostEntityChanges );\n\n\t\tconst isToggleDisabled =\n\t\t\t( isPublished ||\n\t\t\t\tisSaving ||\n\t\t\t\t! isSaveable ||\n\t\t\t\t( ! isPublishable && ! forceIsDirty ) ) &&\n\t\t\t( ! hasNonPostEntityChanges || isSavingNonPostEntityChanges );\n\n\t\t// If the new status has not changed explicitly, we derive it from\n\t\t// other factors, like having a publish action, etc.. We need to preserve\n\t\t// this because it affects when to show the pre and post publish panels.\n\t\t// If it has changed though explicitly, we need to respect that.\n\t\tlet publishStatus = 'publish';\n\t\tif ( postStatusHasChanged ) {\n\t\t\tpublishStatus = postStatus;\n\t\t} else if ( ! hasPublishAction ) {\n\t\t\tpublishStatus = 'pending';\n\t\t} else if ( visibility === 'private' ) {\n\t\t\tpublishStatus = 'private';\n\t\t} else if ( isBeingScheduled ) {\n\t\t\tpublishStatus = 'future';\n\t\t}\n\n\t\tconst onClickButton = () => {\n\t\t\tif ( isButtonDisabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tonSubmit();\n\t\t\tsavePostStatus( publishStatus );\n\t\t};\n\n\t\t// Callback to open the publish panel.\n\t\tconst onClickToggle = () => {\n\t\t\tif ( isToggleDisabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tonToggle();\n\t\t};\n\n\t\tconst buttonProps = {\n\t\t\t'aria-disabled': isButtonDisabled,\n\t\t\tclassName: 'editor-post-publish-button',\n\t\t\tisBusy: ! isAutoSaving && isSaving,\n\t\t\tvariant: 'primary',\n\t\t\tonClick: this.createOnClick( onClickButton ),\n\t\t\t'aria-haspopup': hasNonPostEntityChanges ? 'dialog' : undefined,\n\t\t};\n\n\t\tconst toggleProps = {\n\t\t\t'aria-disabled': isToggleDisabled,\n\t\t\t'aria-expanded': isOpen,\n\t\t\tclassName: 'editor-post-publish-panel__toggle',\n\t\t\tisBusy: isSaving && isPublished,\n\t\t\tvariant: 'primary',\n\t\t\tsize: 'compact',\n\t\t\tonClick: this.createOnClick( onClickToggle ),\n\t\t\t'aria-haspopup': hasNonPostEntityChanges ? 'dialog' : undefined,\n\t\t};\n\t\tconst componentProps = isToggle ? toggleProps : buttonProps;\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<Button\n\t\t\t\t\t{ ...componentProps }\n\t\t\t\t\tclassName={ `${ componentProps.className } editor-post-publish-button__button` }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t>\n\t\t\t\t\t<PublishButtonLabel />\n\t\t\t\t</Button>\n\t\t\t</>\n\t\t);\n\t}\n}\n\n/**\n * Renders the publish button.\n */\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\tisSavingPost,\n\t\t\tisAutosavingPost,\n\t\t\tisEditedPostBeingScheduled,\n\t\t\tgetEditedPostVisibility,\n\t\t\tisCurrentPostPublished,\n\t\t\tisEditedPostSaveable,\n\t\t\tisEditedPostPublishable,\n\t\t\tisPostSavingLocked,\n\t\t\tgetCurrentPost,\n\t\t\tgetCurrentPostType,\n\t\t\tgetCurrentPostId,\n\t\t\thasNonPostEntityChanges,\n\t\t\tisSavingNonPostEntityChanges,\n\t\t\tgetEditedPostAttribute,\n\t\t\tgetPostEdits,\n\t\t} = select( editorStore );\n\t\treturn {\n\t\t\tisSaving: isSavingPost(),\n\t\t\tisAutoSaving: isAutosavingPost(),\n\t\t\tisBeingScheduled: isEditedPostBeingScheduled(),\n\t\t\tvisibility: getEditedPostVisibility(),\n\t\t\tisSaveable: isEditedPostSaveable(),\n\t\t\tisPostSavingLocked: isPostSavingLocked(),\n\t\t\tisPublishable: isEditedPostPublishable(),\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\thasPublishAction:\n\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\tpostType: getCurrentPostType(),\n\t\t\tpostId: getCurrentPostId(),\n\t\t\tpostStatus: getEditedPostAttribute( 'status' ),\n\t\t\tpostStatusHasChanged: getPostEdits()?.status,\n\t\t\thasNonPostEntityChanges: hasNonPostEntityChanges(),\n\t\t\tisSavingNonPostEntityChanges: isSavingNonPostEntityChanges(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { editPost, savePost } = dispatch( editorStore );\n\t\treturn {\n\t\t\tsavePostStatus: ( status ) => {\n\t\t\t\teditPost( { status }, { undoIgnore: true } );\n\t\t\t\tsavePost();\n\t\t\t},\n\t\t};\n\t} ),\n] )( PostPublishButton );\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { useViewportMatch } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the label for the publish button.\n *\n * @return {string} The label for the publish button.\n */\nexport default function PublishButtonLabel() {\n\tconst isSmallerThanMediumViewport = useViewportMatch( 'medium', '<' );\n\tconst {\n\t\tisPublished,\n\t\tisBeingScheduled,\n\t\tisSaving,\n\t\tisPublishing,\n\t\thasPublishAction,\n\t\tisAutosaving,\n\t\thasNonPostEntityChanges,\n\t\tpostStatusHasChanged,\n\t\tpostStatus,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tisCurrentPostPublished,\n\t\t\tisEditedPostBeingScheduled,\n\t\t\tisSavingPost,\n\t\t\tisPublishingPost,\n\t\t\tgetCurrentPost,\n\t\t\tgetCurrentPostType,\n\t\t\tisAutosavingPost,\n\t\t\tgetPostEdits,\n\t\t\tgetEditedPostAttribute,\n\t\t} = select( editorStore );\n\t\treturn {\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\tisBeingScheduled: isEditedPostBeingScheduled(),\n\t\t\tisSaving: isSavingPost(),\n\t\t\tisPublishing: isPublishingPost(),\n\t\t\thasPublishAction:\n\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\tpostType: getCurrentPostType(),\n\t\t\tisAutosaving: isAutosavingPost(),\n\t\t\thasNonPostEntityChanges:\n\t\t\t\tselect( editorStore ).hasNonPostEntityChanges(),\n\t\t\tpostStatusHasChanged: !! getPostEdits()?.status,\n\t\t\tpostStatus: getEditedPostAttribute( 'status' ),\n\t\t};\n\t}, [] );\n\tif ( isPublishing ) {\n\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\treturn __( 'Publishing\u2026' );\n\t} else if (\n\t\t( isPublished || isBeingScheduled ) &&\n\t\tisSaving &&\n\t\t! isAutosaving\n\t) {\n\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\treturn __( 'Saving\u2026' );\n\t}\n\tif ( ! hasPublishAction ) {\n\t\t// TODO: this is because \"Submit for review\" string is too long in some languages.\n\t\t// @see https://github.com/WordPress/gutenberg/issues/10475\n\t\treturn isSmallerThanMediumViewport\n\t\t\t? __( 'Publish' )\n\t\t\t: __( 'Submit for Review' );\n\t}\n\tif (\n\t\thasNonPostEntityChanges ||\n\t\tisPublished ||\n\t\t( postStatusHasChanged &&\n\t\t\t! [ 'future', 'publish' ].includes( postStatus ) ) ||\n\t\t( ! postStatusHasChanged && postStatus === 'future' )\n\t) {\n\t\treturn __( 'Save' );\n\t}\n\tif ( isBeingScheduled ) {\n\t\treturn __( 'Schedule' );\n\t}\n\treturn __( 'Publish' );\n}\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Component, createRef } from '@wordpress/element';\nimport {\n\tButton,\n\tSpinner,\n\tCheckboxControl,\n\twithFocusReturn,\n\twithConstrainedTabbing,\n} from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport { closeSmall } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostPublishButton from '../post-publish-button';\nimport PostPublishPanelPrepublish from './prepublish';\nimport PostPublishPanelPostpublish from './postpublish';\nimport { store as editorStore } from '../../store';\n\nexport class PostPublishPanel extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.onSubmit = this.onSubmit.bind( this );\n\t\tthis.cancelButtonNode = createRef();\n\t}\n\n\tcomponentDidMount() {\n\t\t// This timeout is necessary to make sure the `useEffect` hook of\n\t\t// `useFocusReturn` gets the correct element (the button that opens the\n\t\t// PostPublishPanel) otherwise it will get this button.\n\t\tthis.timeoutID = setTimeout( () => {\n\t\t\tthis.cancelButtonNode.current.focus();\n\t\t}, 0 );\n\t}\n\n\tcomponentWillUnmount() {\n\t\tclearTimeout( this.timeoutID );\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\t// Automatically collapse the publish sidebar when a post\n\t\t// is published and the user makes an edit.\n\t\tif (\n\t\t\t( prevProps.isPublished &&\n\t\t\t\t! this.props.isSaving &&\n\t\t\t\tthis.props.isDirty ) ||\n\t\t\tthis.props.currentPostId !== prevProps.currentPostId\n\t\t) {\n\t\t\tthis.props.onClose();\n\t\t}\n\t}\n\n\tonSubmit() {\n\t\tconst { onClose, hasPublishAction, isPostTypeViewable } = this.props;\n\t\tif ( ! hasPublishAction || ! isPostTypeViewable ) {\n\t\t\tonClose();\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tforceIsDirty,\n\t\t\tisBeingScheduled,\n\t\t\tisPublished,\n\t\t\tisPublishSidebarEnabled,\n\t\t\tisScheduled,\n\t\t\tisSaving,\n\t\t\tisSavingNonPostEntityChanges,\n\t\t\tonClose,\n\t\t\tonTogglePublishSidebar,\n\t\t\tPostPublishExtension,\n\t\t\tPrePublishExtension,\n\t\t\tcurrentPostId,\n\t\t\t...additionalProps\n\t\t} = this.props;\n\t\tconst {\n\t\t\thasPublishAction,\n\t\t\tisDirty,\n\t\t\tisPostTypeViewable,\n\t\t\t...propsForPanel\n\t\t} = additionalProps;\n\t\tconst isPublishedOrScheduled =\n\t\t\tisPublished || ( isScheduled && isBeingScheduled );\n\t\tconst isPrePublish = ! isPublishedOrScheduled && ! isSaving;\n\t\tconst isPostPublish = isPublishedOrScheduled && ! isSaving;\n\t\treturn (\n\t\t\t<div className=\"editor-post-publish-panel\" { ...propsForPanel }>\n\t\t\t\t<div className=\"editor-post-publish-panel__header\">\n\t\t\t\t\t{ isPostPublish ? (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\t\tlabel={ __( 'Close panel' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div className=\"editor-post-publish-panel__header-cancel-button\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tref={ this.cancelButtonNode }\n\t\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\t\tdisabled={ isSavingNonPostEntityChanges }\n\t\t\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"editor-post-publish-panel__header-publish-button\">\n\t\t\t\t\t\t\t\t<PostPublishButton\n\t\t\t\t\t\t\t\t\tonSubmit={ this.onSubmit }\n\t\t\t\t\t\t\t\t\tforceIsDirty={ forceIsDirty }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t\t<div className=\"editor-post-publish-panel__content\">\n\t\t\t\t\t{ isPrePublish && (\n\t\t\t\t\t\t<PostPublishPanelPrepublish>\n\t\t\t\t\t\t\t{ PrePublishExtension && <PrePublishExtension /> }\n\t\t\t\t\t\t</PostPublishPanelPrepublish>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isPostPublish && (\n\t\t\t\t\t\t<PostPublishPanelPostpublish focusOnMount>\n\t\t\t\t\t\t\t{ PostPublishExtension && <PostPublishExtension /> }\n\t\t\t\t\t\t</PostPublishPanelPostpublish>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isSaving && <Spinner /> }\n\t\t\t\t</div>\n\t\t\t\t<div className=\"editor-post-publish-panel__footer\">\n\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\tlabel={ __( 'Always show pre-publish checks.' ) }\n\t\t\t\t\t\tchecked={ isPublishSidebarEnabled }\n\t\t\t\t\t\tonChange={ onTogglePublishSidebar }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\n/**\n * Renders a panel for publishing a post.\n */\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { getPostType } = select( coreStore );\n\t\tconst {\n\t\t\tgetCurrentPost,\n\t\t\tgetCurrentPostId,\n\t\t\tgetEditedPostAttribute,\n\t\t\tisCurrentPostPublished,\n\t\t\tisCurrentPostScheduled,\n\t\t\tisEditedPostBeingScheduled,\n\t\t\tisEditedPostDirty,\n\t\t\tisAutosavingPost,\n\t\t\tisSavingPost,\n\t\t\tisSavingNonPostEntityChanges,\n\t\t} = select( editorStore );\n\t\tconst { isPublishSidebarEnabled } = select( editorStore );\n\t\tconst postType = getPostType( getEditedPostAttribute( 'type' ) );\n\n\t\treturn {\n\t\t\thasPublishAction:\n\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\tisPostTypeViewable: postType?.viewable,\n\t\t\tisBeingScheduled: isEditedPostBeingScheduled(),\n\t\t\tisDirty: isEditedPostDirty(),\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\tisPublishSidebarEnabled: isPublishSidebarEnabled(),\n\t\t\tisSaving: isSavingPost() && ! isAutosavingPost(),\n\t\t\tisSavingNonPostEntityChanges: isSavingNonPostEntityChanges(),\n\t\t\tisScheduled: isCurrentPostScheduled(),\n\t\t\tcurrentPostId: getCurrentPostId(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, { isPublishSidebarEnabled } ) => {\n\t\tconst { disablePublishSidebar, enablePublishSidebar } =\n\t\t\tdispatch( editorStore );\n\t\treturn {\n\t\t\tonTogglePublishSidebar: () => {\n\t\t\t\tif ( isPublishSidebarEnabled ) {\n\t\t\t\t\tdisablePublishSidebar();\n\t\t\t\t} else {\n\t\t\t\t\tenablePublishSidebar();\n\t\t\t\t}\n\t\t\t},\n\t\t};\n\t} ),\n\twithFocusReturn,\n\twithConstrainedTabbing,\n] )( PostPublishPanel );\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Icon, PanelBody } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { wordpress } from '@wordpress/icons';\nimport { filterURLForDisplay } from '@wordpress/url';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport PostVisibility from '../post-visibility';\nimport PostVisibilityLabel from '../post-visibility/label';\nimport PostSchedule from '../post-schedule';\nimport PostScheduleLabel from '../post-schedule/label';\nimport MaybeTagsPanel from './maybe-tags-panel';\nimport MaybePostFormatPanel from './maybe-post-format-panel';\nimport { store as editorStore } from '../../store';\nimport MaybeCategoryPanel from './maybe-category-panel';\nimport MaybeUploadMedia from './maybe-upload-media';\n\nfunction PostPublishPanelPrepublish( { children } ) {\n\tconst {\n\t\tisBeingScheduled,\n\t\tisRequestingSiteIcon,\n\t\thasPublishAction,\n\t\tsiteIconUrl,\n\t\tsiteTitle,\n\t\tsiteHome,\n\t} = useSelect( ( select ) => {\n\t\tconst { getCurrentPost, isEditedPostBeingScheduled } =\n\t\t\tselect( editorStore );\n\t\tconst { getEntityRecord, isResolving } = select( coreStore );\n\t\tconst siteData =\n\t\t\tgetEntityRecord( 'root', '__unstableBase', undefined ) || {};\n\n\t\treturn {\n\t\t\thasPublishAction:\n\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\tisBeingScheduled: isEditedPostBeingScheduled(),\n\t\t\tisRequestingSiteIcon: isResolving( 'getEntityRecord', [\n\t\t\t\t'root',\n\t\t\t\t'__unstableBase',\n\t\t\t\tundefined,\n\t\t\t] ),\n\t\t\tsiteIconUrl: siteData.site_icon_url,\n\t\t\tsiteTitle: siteData.name,\n\t\t\tsiteHome: siteData.home && filterURLForDisplay( siteData.home ),\n\t\t};\n\t}, [] );\n\n\tlet siteIcon = (\n\t\t<Icon className=\"components-site-icon\" size=\"36px\" icon={ wordpress } />\n\t);\n\n\tif ( siteIconUrl ) {\n\t\tsiteIcon = (\n\t\t\t<img\n\t\t\t\talt={ __( 'Site Icon' ) }\n\t\t\t\tclassName=\"components-site-icon\"\n\t\t\t\tsrc={ siteIconUrl }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( isRequestingSiteIcon ) {\n\t\tsiteIcon = null;\n\t}\n\n\tlet prePublishTitle, prePublishBodyText;\n\n\tif ( ! hasPublishAction ) {\n\t\tprePublishTitle = __( 'Are you ready to submit for review?' );\n\t\tprePublishBodyText = __(\n\t\t\t'Your work will be reviewed and then approved.'\n\t\t);\n\t} else if ( isBeingScheduled ) {\n\t\tprePublishTitle = __( 'Are you ready to schedule?' );\n\t\tprePublishBodyText = __(\n\t\t\t'Your work will be published at the specified date and time.'\n\t\t);\n\t} else {\n\t\tprePublishTitle = __( 'Are you ready to publish?' );\n\t\tprePublishBodyText = __(\n\t\t\t'Double-check your settings before publishing.'\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className=\"editor-post-publish-panel__prepublish\">\n\t\t\t<div>\n\t\t\t\t<strong>{ prePublishTitle }</strong>\n\t\t\t</div>\n\t\t\t<p>{ prePublishBodyText }</p>\n\t\t\t<div className=\"components-site-card\">\n\t\t\t\t{ siteIcon }\n\t\t\t\t<div className=\"components-site-info\">\n\t\t\t\t\t<span className=\"components-site-name\">\n\t\t\t\t\t\t{ decodeEntities( siteTitle ) || __( '(Untitled)' ) }\n\t\t\t\t\t</span>\n\t\t\t\t\t<span className=\"components-site-home\">{ siteHome }</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<MaybeUploadMedia />\n\t\t\t{ hasPublishAction && (\n\t\t\t\t<>\n\t\t\t\t\t<PanelBody\n\t\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t\t\ttitle={ [\n\t\t\t\t\t\t\t__( 'Visibility:' ),\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName=\"editor-post-publish-panel__link\"\n\t\t\t\t\t\t\t\tkey=\"label\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PostVisibilityLabel />\n\t\t\t\t\t\t\t</span>,\n\t\t\t\t\t\t] }\n\t\t\t\t\t>\n\t\t\t\t\t\t<PostVisibility />\n\t\t\t\t\t</PanelBody>\n\t\t\t\t\t<PanelBody\n\t\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t\t\ttitle={ [\n\t\t\t\t\t\t\t__( 'Publish:' ),\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName=\"editor-post-publish-panel__link\"\n\t\t\t\t\t\t\t\tkey=\"label\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PostScheduleLabel />\n\t\t\t\t\t\t\t</span>,\n\t\t\t\t\t\t] }\n\t\t\t\t\t>\n\t\t\t\t\t\t<PostSchedule />\n\t\t\t\t\t</PanelBody>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t<MaybePostFormatPanel />\n\t\t\t<MaybeTagsPanel />\n\t\t\t<MaybeCategoryPanel />\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default PostPublishPanelPrepublish;\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport {\n\tTextControl,\n\tRadioControl,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { VISIBILITY_OPTIONS } from './utils';\nimport { store as editorStore } from '../../store';\n\n/**\n * Allows users to set the visibility of a post.\n *\n * @param {Object} props The component props.\n * @param {Function} props.onClose Function to call when the popover is closed.\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PostVisibility( { onClose } ) {\n\tconst instanceId = useInstanceId( PostVisibility );\n\n\tconst { status, visibility, password } = useSelect( ( select ) => ( {\n\t\tstatus: select( editorStore ).getEditedPostAttribute( 'status' ),\n\t\tvisibility: select( editorStore ).getEditedPostVisibility(),\n\t\tpassword: select( editorStore ).getEditedPostAttribute( 'password' ),\n\t} ) );\n\n\tconst { editPost } = useDispatch( editorStore );\n\n\tconst [ hasPassword, setHasPassword ] = useState( !! password );\n\n\tfunction updateVisibility( value ) {\n\t\tconst nextValues = {\n\t\t\tpublic: {\n\t\t\t\tstatus: visibility === 'private' ? 'draft' : status,\n\t\t\t\tpassword: '',\n\t\t\t},\n\t\t\tprivate: { status: 'private', password: '' },\n\t\t\tpassword: {\n\t\t\t\tstatus: visibility === 'private' ? 'draft' : status,\n\t\t\t\tpassword: password || '',\n\t\t\t},\n\t\t};\n\n\t\teditPost( nextValues[ value ] );\n\t\tsetHasPassword( value === 'password' );\n\t}\n\n\tconst updatePassword = ( value ) => {\n\t\teditPost( { password: value } );\n\t};\n\n\treturn (\n\t\t<div className=\"editor-post-visibility\">\n\t\t\t<InspectorPopoverHeader\n\t\t\t\ttitle={ __( 'Visibility' ) }\n\t\t\t\thelp={ __( 'Control how this post is viewed.' ) }\n\t\t\t\tonClose={ onClose }\n\t\t\t/>\n\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t<RadioControl\n\t\t\t\t\tlabel={ __( 'Visibility' ) }\n\t\t\t\t\thideLabelFromVision\n\t\t\t\t\toptions={ VISIBILITY_OPTIONS }\n\t\t\t\t\tselected={ hasPassword ? 'password' : visibility }\n\t\t\t\t\tonChange={ updateVisibility }\n\t\t\t\t/>\n\t\t\t\t{ hasPassword && (\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\tlabel={ __( 'Password' ) }\n\t\t\t\t\t\tonChange={ updatePassword }\n\t\t\t\t\t\tvalue={ password }\n\t\t\t\t\t\tplaceholder={ __( 'Use a secure password' ) }\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tid={ `editor-post-visibility__password-input-${ instanceId }` }\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tmaxLength={ 255 }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</VStack>\n\t\t</div>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nexport const VISIBILITY_OPTIONS = [\n\t{\n\t\tlabel: __( 'Public' ),\n\t\tvalue: 'public',\n\t\tdescription: __( 'Visible to everyone.' ),\n\t},\n\t{\n\t\tlabel: __( 'Private' ),\n\t\tvalue: 'private',\n\t\tdescription: __( 'Only visible to site admins and editors.' ),\n\t},\n\t{\n\t\tlabel: __( 'Password protected' ),\n\t\tvalue: 'password',\n\t\tdescription: __( 'Only visible to those who know the password.' ),\n\t},\n];\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { VISIBILITY_OPTIONS } from './utils';\nimport { store as editorStore } from '../../store';\n\n/**\n * Returns the label for the current post visibility setting.\n *\n * @return {string} Post visibility label.\n */\nexport default function PostVisibilityLabel() {\n\treturn usePostVisibilityLabel();\n}\n\n/**\n * Get the label for the current post visibility setting.\n *\n * @return {string} Post visibility label.\n */\nexport function usePostVisibilityLabel() {\n\tconst visibility = useSelect(\n\t\t( select ) => select( editorStore ).getEditedPostVisibility(),\n\t\t[]\n\t);\n\n\treturn VISIBILITY_OPTIONS.find( ( option ) => option.value === visibility )\n\t\t?.label;\n}\n", "/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument) {\n const argStr = Object.prototype.toString.call(argument);\n\n // Clone the date\n if (\n argument instanceof Date ||\n (typeof argument === \"object\" && argStr === \"[object Date]\")\n ) {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new argument.constructor(+argument);\n } else if (\n typeof argument === \"number\" ||\n argStr === \"[object Number]\" ||\n typeof argument === \"string\" ||\n argStr === \"[object String]\"\n ) {\n // TODO: Can we get rid of as?\n return new Date(argument);\n } else {\n // TODO: Can we get rid of as?\n return new Date(NaN);\n }\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n", "/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n * return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n", "import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date) {\n const _date = toDate(date);\n const month = _date.getMonth();\n _date.setFullYear(_date.getFullYear(), month + 1, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n", "import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The start of a month\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfMonth(date) {\n const _date = toDate(date);\n _date.setDate(1);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfMonth;\n", "import { millisecondsInHour, millisecondsInMinute } from \"./constants.mjs\";\n\n/**\n * The {@link parseISO} function options.\n */\n\n/**\n * @name parseISO\n * @category Common Helpers\n * @summary Parse ISO string\n *\n * @description\n * Parse the given string in ISO 8601 format and return an instance of Date.\n *\n * Function accepts complete ISO 8601 formats as well as partial implementations.\n * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601\n *\n * If the argument isn't a string, the function cannot parse the string or\n * the values are invalid, it returns Invalid Date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param argument - The value to convert\n * @param options - An object with options\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Convert string '2014-02-11T11:30:30' to date:\n * const result = parseISO('2014-02-11T11:30:30')\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert string '+02014101' to date,\n * // if the additional number of digits in the extended year format is 1:\n * const result = parseISO('+02014101', { additionalDigits: 1 })\n * //=> Fri Apr 11 2014 00:00:00\n */\nexport function parseISO(argument, options) {\n const additionalDigits = options?.additionalDigits ?? 2;\n const dateStrings = splitDateString(argument);\n\n let date;\n if (dateStrings.date) {\n const parseYearResult = parseYear(dateStrings.date, additionalDigits);\n date = parseDate(parseYearResult.restDateString, parseYearResult.year);\n }\n\n if (!date || isNaN(date.getTime())) {\n return new Date(NaN);\n }\n\n const timestamp = date.getTime();\n let time = 0;\n let offset;\n\n if (dateStrings.time) {\n time = parseTime(dateStrings.time);\n if (isNaN(time)) {\n return new Date(NaN);\n }\n }\n\n if (dateStrings.timezone) {\n offset = parseTimezone(dateStrings.timezone);\n if (isNaN(offset)) {\n return new Date(NaN);\n }\n } else {\n const dirtyDate = new Date(timestamp + time);\n // JS parsed string assuming it's in UTC timezone\n // but we need it to be parsed in our timezone\n // so we use utc values to build date in our timezone.\n // Year values from 0 to 99 map to the years 1900 to 1999\n // so set year explicitly with setFullYear.\n const result = new Date(0);\n result.setFullYear(\n dirtyDate.getUTCFullYear(),\n dirtyDate.getUTCMonth(),\n dirtyDate.getUTCDate(),\n );\n result.setHours(\n dirtyDate.getUTCHours(),\n dirtyDate.getUTCMinutes(),\n dirtyDate.getUTCSeconds(),\n dirtyDate.getUTCMilliseconds(),\n );\n return result;\n }\n\n return new Date(timestamp + time + offset);\n}\n\nconst patterns = {\n dateTimeDelimiter: /[T ]/,\n timeZoneDelimiter: /[Z ]/i,\n timezone: /([Z+-].*)$/,\n};\n\nconst dateRegex =\n /^-?(?:(\\d{3})|(\\d{2})(?:-?(\\d{2}))?|W(\\d{2})(?:-?(\\d{1}))?|)$/;\nconst timeRegex =\n /^(\\d{2}(?:[.,]\\d*)?)(?::?(\\d{2}(?:[.,]\\d*)?))?(?::?(\\d{2}(?:[.,]\\d*)?))?$/;\nconst timezoneRegex = /^([+-])(\\d{2})(?::?(\\d{2}))?$/;\n\nfunction splitDateString(dateString) {\n const dateStrings = {};\n const array = dateString.split(patterns.dateTimeDelimiter);\n let timeString;\n\n // The regex match should only return at maximum two array elements.\n // [date], [time], or [date, time].\n if (array.length > 2) {\n return dateStrings;\n }\n\n if (/:/.test(array[0])) {\n timeString = array[0];\n } else {\n dateStrings.date = array[0];\n timeString = array[1];\n if (patterns.timeZoneDelimiter.test(dateStrings.date)) {\n dateStrings.date = dateString.split(patterns.timeZoneDelimiter)[0];\n timeString = dateString.substr(\n dateStrings.date.length,\n dateString.length,\n );\n }\n }\n\n if (timeString) {\n const token = patterns.timezone.exec(timeString);\n if (token) {\n dateStrings.time = timeString.replace(token[1], \"\");\n dateStrings.timezone = token[1];\n } else {\n dateStrings.time = timeString;\n }\n }\n\n return dateStrings;\n}\n\nfunction parseYear(dateString, additionalDigits) {\n const regex = new RegExp(\n \"^(?:(\\\\d{4}|[+-]\\\\d{\" +\n (4 + additionalDigits) +\n \"})|(\\\\d{2}|[+-]\\\\d{\" +\n (2 + additionalDigits) +\n \"})$)\",\n );\n\n const captures = dateString.match(regex);\n // Invalid ISO-formatted year\n if (!captures) return { year: NaN, restDateString: \"\" };\n\n const year = captures[1] ? parseInt(captures[1]) : null;\n const century = captures[2] ? parseInt(captures[2]) : null;\n\n // either year or century is null, not both\n return {\n year: century === null ? year : century * 100,\n restDateString: dateString.slice((captures[1] || captures[2]).length),\n };\n}\n\nfunction parseDate(dateString, year) {\n // Invalid ISO-formatted year\n if (year === null) return new Date(NaN);\n\n const captures = dateString.match(dateRegex);\n // Invalid ISO-formatted string\n if (!captures) return new Date(NaN);\n\n const isWeekDate = !!captures[4];\n const dayOfYear = parseDateUnit(captures[1]);\n const month = parseDateUnit(captures[2]) - 1;\n const day = parseDateUnit(captures[3]);\n const week = parseDateUnit(captures[4]);\n const dayOfWeek = parseDateUnit(captures[5]) - 1;\n\n if (isWeekDate) {\n if (!validateWeekDate(year, week, dayOfWeek)) {\n return new Date(NaN);\n }\n return dayOfISOWeekYear(year, week, dayOfWeek);\n } else {\n const date = new Date(0);\n if (\n !validateDate(year, month, day) ||\n !validateDayOfYearDate(year, dayOfYear)\n ) {\n return new Date(NaN);\n }\n date.setUTCFullYear(year, month, Math.max(dayOfYear, day));\n return date;\n }\n}\n\nfunction parseDateUnit(value) {\n return value ? parseInt(value) : 1;\n}\n\nfunction parseTime(timeString) {\n const captures = timeString.match(timeRegex);\n if (!captures) return NaN; // Invalid ISO-formatted time\n\n const hours = parseTimeUnit(captures[1]);\n const minutes = parseTimeUnit(captures[2]);\n const seconds = parseTimeUnit(captures[3]);\n\n if (!validateTime(hours, minutes, seconds)) {\n return NaN;\n }\n\n return (\n hours * millisecondsInHour + minutes * millisecondsInMinute + seconds * 1000\n );\n}\n\nfunction parseTimeUnit(value) {\n return (value && parseFloat(value.replace(\",\", \".\"))) || 0;\n}\n\nfunction parseTimezone(timezoneString) {\n if (timezoneString === \"Z\") return 0;\n\n const captures = timezoneString.match(timezoneRegex);\n if (!captures) return 0;\n\n const sign = captures[1] === \"+\" ? -1 : 1;\n const hours = parseInt(captures[2]);\n const minutes = (captures[3] && parseInt(captures[3])) || 0;\n\n if (!validateTimezone(hours, minutes)) {\n return NaN;\n }\n\n return sign * (hours * millisecondsInHour + minutes * millisecondsInMinute);\n}\n\nfunction dayOfISOWeekYear(isoWeekYear, week, day) {\n const date = new Date(0);\n date.setUTCFullYear(isoWeekYear, 0, 4);\n const fourthOfJanuaryDay = date.getUTCDay() || 7;\n const diff = (week - 1) * 7 + day + 1 - fourthOfJanuaryDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date;\n}\n\n// Validation functions\n\n// February is null to handle the leap year (using ||)\nconst daysInMonths = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\nfunction isLeapYearIndex(year) {\n return year % 400 === 0 || (year % 4 === 0 && year % 100 !== 0);\n}\n\nfunction validateDate(year, month, date) {\n return (\n month >= 0 &&\n month <= 11 &&\n date >= 1 &&\n date <= (daysInMonths[month] || (isLeapYearIndex(year) ? 29 : 28))\n );\n}\n\nfunction validateDayOfYearDate(year, dayOfYear) {\n return dayOfYear >= 1 && dayOfYear <= (isLeapYearIndex(year) ? 366 : 365);\n}\n\nfunction validateWeekDate(_year, week, day) {\n return week >= 1 && week <= 53 && day >= 0 && day <= 6;\n}\n\nfunction validateTime(hours, minutes, seconds) {\n if (hours === 24) {\n return minutes === 0 && seconds === 0;\n }\n\n return (\n seconds >= 0 &&\n seconds < 60 &&\n minutes >= 0 &&\n minutes < 60 &&\n hours >= 0 &&\n hours < 25\n );\n}\n\nfunction validateTimezone(_hours, minutes) {\n return minutes >= 0 && minutes <= 59;\n}\n\n// Fallback for modularized imports:\nexport default parseISO;\n", "/**\n * External dependencies\n */\nimport { parseISO, endOfMonth, startOfMonth } from 'date-fns';\n\n/**\n * WordPress dependencies\n */\nimport { getSettings } from '@wordpress/date';\nimport { _x } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useState, useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { PrivatePublishDateTimePicker } = unlock( blockEditorPrivateApis );\n\n/**\n * Renders the PostSchedule component. It allows the user to schedule a post.\n *\n * @param {Object} props Props.\n * @param {Function} props.onClose Function to close the component.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PostSchedule( props ) {\n\treturn (\n\t\t<PrivatePostSchedule\n\t\t\t{ ...props }\n\t\t\tshowPopoverHeaderActions\n\t\t\tisCompact={ false }\n\t\t/>\n\t);\n}\n\nexport function PrivatePostSchedule( {\n\tonClose,\n\tshowPopoverHeaderActions,\n\tisCompact,\n} ) {\n\tconst { postDate, postType } = useSelect(\n\t\t( select ) => ( {\n\t\t\tpostDate: select( editorStore ).getEditedPostAttribute( 'date' ),\n\t\t\tpostType: select( editorStore ).getCurrentPostType(),\n\t\t} ),\n\t\t[]\n\t);\n\n\tconst { editPost } = useDispatch( editorStore );\n\tconst onUpdateDate = ( date ) => editPost( { date } );\n\n\tconst [ previewedMonth, setPreviewedMonth ] = useState(\n\t\tstartOfMonth( new Date( postDate ) )\n\t);\n\n\t// Pick up published and scheduled site posts.\n\tconst eventsByPostType = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityRecords( 'postType', postType, {\n\t\t\t\tstatus: 'publish,future',\n\t\t\t\tafter: startOfMonth( previewedMonth ).toISOString(),\n\t\t\t\tbefore: endOfMonth( previewedMonth ).toISOString(),\n\t\t\t\texclude: [ select( editorStore ).getCurrentPostId() ],\n\t\t\t\tper_page: 100,\n\t\t\t\t_fields: 'id,date',\n\t\t\t} ),\n\t\t[ previewedMonth, postType ]\n\t);\n\n\tconst events = useMemo(\n\t\t() =>\n\t\t\t( eventsByPostType || [] ).map( ( { date: eventDate } ) => ( {\n\t\t\t\tdate: new Date( eventDate ),\n\t\t\t} ) ),\n\t\t[ eventsByPostType ]\n\t);\n\n\tconst settings = getSettings();\n\n\t// To know if the current timezone is a 12 hour time with look for \"a\" in the time format\n\t// We also make sure this a is not escaped by a \"/\"\n\tconst is12HourTime = /a(?!\\\\)/i.test(\n\t\tsettings.formats.time\n\t\t\t.toLowerCase() // Test only the lower case a.\n\t\t\t.replace( /\\\\\\\\/g, '' ) // Replace \"//\" with empty strings.\n\t\t\t.split( '' )\n\t\t\t.reverse()\n\t\t\t.join( '' ) // Reverse the string and test for \"a\" not followed by a slash.\n\t);\n\n\treturn (\n\t\t<PrivatePublishDateTimePicker\n\t\t\tcurrentDate={ postDate }\n\t\t\tonChange={ onUpdateDate }\n\t\t\tis12Hour={ is12HourTime }\n\t\t\tdateOrder={\n\t\t\t\t/* translators: Order of day, month, and year. Available formats are 'dmy', 'mdy', and 'ymd'. */\n\t\t\t\t_x( 'dmy', 'date order' )\n\t\t\t}\n\t\t\tevents={ events }\n\t\t\tonMonthPreviewed={ ( date ) =>\n\t\t\t\tsetPreviewedMonth( parseISO( date ) )\n\t\t\t}\n\t\t\tonClose={ onClose }\n\t\t\tisCompact={ isCompact }\n\t\t\tshowPopoverHeaderActions={ showPopoverHeaderActions }\n\t\t/>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf, isRTL } from '@wordpress/i18n';\nimport { getSettings, getDate, dateI18n } from '@wordpress/date';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the PostScheduleLabel component.\n *\n * @param {Object} props Props.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PostScheduleLabel( props ) {\n\treturn usePostScheduleLabel( props );\n}\n\n/**\n * Custom hook to get the label for post schedule.\n *\n * @param {Object} options Options for the hook.\n * @param {boolean} options.full Whether to get the full label or not. Default is false.\n *\n * @return {string} The label for post schedule.\n */\nexport function usePostScheduleLabel( { full = false } = {} ) {\n\tconst { date, isFloating } = useSelect(\n\t\t( select ) => ( {\n\t\t\tdate: select( editorStore ).getEditedPostAttribute( 'date' ),\n\t\t\tisFloating: select( editorStore ).isEditedPostDateFloating(),\n\t\t} ),\n\t\t[]\n\t);\n\n\treturn full\n\t\t? getFullPostScheduleLabel( date )\n\t\t: getPostScheduleLabel( date, { isFloating } );\n}\n\nexport function getFullPostScheduleLabel( dateAttribute ) {\n\tconst date = getDate( dateAttribute );\n\n\tconst timezoneAbbreviation = getTimezoneAbbreviation();\n\tconst formattedDate = dateI18n(\n\t\t// translators: Use a non-breaking space between 'g:i' and 'a' if appropriate.\n\t\t_x( 'F j, Y g:i\\xa0a', 'post schedule full date format' ),\n\t\tdate\n\t);\n\treturn isRTL()\n\t\t? `${ timezoneAbbreviation } ${ formattedDate }`\n\t\t: `${ formattedDate } ${ timezoneAbbreviation }`;\n}\n\nexport function getPostScheduleLabel(\n\tdateAttribute,\n\t{ isFloating = false, now = new Date() } = {}\n) {\n\tif ( ! dateAttribute || isFloating ) {\n\t\treturn __( 'Immediately' );\n\t}\n\n\t// If the user timezone does not equal the site timezone then using words\n\t// like 'tomorrow' is confusing, so show the full date.\n\tif ( ! isTimezoneSameAsSiteTimezone( now ) ) {\n\t\treturn getFullPostScheduleLabel( dateAttribute );\n\t}\n\n\tconst date = getDate( dateAttribute );\n\n\tif ( isSameDay( date, now ) ) {\n\t\treturn sprintf(\n\t\t\t// translators: %s: Time of day the post is scheduled for.\n\t\t\t__( 'Today at %s' ),\n\t\t\t// translators: If using a space between 'g:i' and 'a', use a non-breaking space.\n\t\t\tdateI18n( _x( 'g:i\\xa0a', 'post schedule time format' ), date )\n\t\t);\n\t}\n\n\tconst tomorrow = new Date( now );\n\ttomorrow.setDate( tomorrow.getDate() + 1 );\n\n\tif ( isSameDay( date, tomorrow ) ) {\n\t\treturn sprintf(\n\t\t\t// translators: %s: Time of day the post is scheduled for.\n\t\t\t__( 'Tomorrow at %s' ),\n\t\t\t// translators: If using a space between 'g:i' and 'a', use a non-breaking space.\n\t\t\tdateI18n( _x( 'g:i\\xa0a', 'post schedule time format' ), date )\n\t\t);\n\t}\n\n\tif ( date.getFullYear() === now.getFullYear() ) {\n\t\treturn dateI18n(\n\t\t\t// translators: If using a space between 'g:i' and 'a', use a non-breaking space.\n\t\t\t_x( 'F j g:i\\xa0a', 'post schedule date format without year' ),\n\t\t\tdate\n\t\t);\n\t}\n\n\treturn dateI18n(\n\t\t// translators: Use a non-breaking space between 'g:i' and 'a' if appropriate.\n\t\t_x( 'F j, Y g:i\\xa0a', 'post schedule full date format' ),\n\t\tdate\n\t);\n}\n\nfunction getTimezoneAbbreviation() {\n\tconst { timezone } = getSettings();\n\n\tif ( timezone.abbr && isNaN( Number( timezone.abbr ) ) ) {\n\t\treturn timezone.abbr;\n\t}\n\n\tconst symbol = timezone.offset < 0 ? '' : '+';\n\treturn `UTC${ symbol }${ timezone.offsetFormatted }`;\n}\n\nfunction isTimezoneSameAsSiteTimezone( date ) {\n\tconst { timezone } = getSettings();\n\n\tconst siteOffset = Number( timezone.offset );\n\tconst dateOffset = -1 * ( date.getTimezoneOffset() / 60 );\n\treturn siteOffset === dateOffset;\n}\n\nfunction isSameDay( left, right ) {\n\treturn (\n\t\tleft.getDate() === right.getDate() &&\n\t\tleft.getMonth() === right.getMonth() &&\n\t\tleft.getFullYear() === right.getFullYear()\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport FlatTermSelector from '../post-taxonomies/flat-term-selector';\nimport { store as editorStore } from '../../store';\n\nconst TagsPanel = () => {\n\tconst tagLabels = useSelect( ( select ) => {\n\t\tconst taxonomy = select( coreStore ).getTaxonomy( 'post_tag' );\n\t\treturn taxonomy?.labels;\n\t}, [] );\n\n\tconst addNewItem = tagLabels?.add_new_item ?? __( 'Add tag' );\n\tconst tagLabel = tagLabels?.name ?? __( 'Tags' );\n\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ addNewItem }\n\t\t</span>,\n\t];\n\n\treturn (\n\t\t<PanelBody initialOpen={ false } title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ sprintf(\n\t\t\t\t\t// translators: %s is the taxonomy name (e.g., \"Tags\").\n\t\t\t\t\t__(\n\t\t\t\t\t\t'%s help users and search engines navigate your site and find your content. Add a few keywords to describe your post.'\n\t\t\t\t\t),\n\t\t\t\t\ttagLabel\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<FlatTermSelector slug=\"post_tag\" />\n\t\t</PanelBody>\n\t);\n};\n\nconst MaybeTagsPanel = () => {\n\tconst { postHasTags, siteHasTags, isPostTypeSupported } = useSelect(\n\t\t( select ) => {\n\t\t\tconst postType = select( editorStore ).getCurrentPostType();\n\t\t\tconst tagsTaxonomy = select( coreStore ).getEntityRecord(\n\t\t\t\t'root',\n\t\t\t\t'taxonomy',\n\t\t\t\t'post_tag'\n\t\t\t);\n\t\t\tconst _isPostTypeSupported =\n\t\t\t\ttagsTaxonomy?.types?.includes( postType );\n\t\t\tconst areTagsFetched = tagsTaxonomy !== undefined;\n\t\t\tconst tags =\n\t\t\t\ttagsTaxonomy &&\n\t\t\t\tselect( editorStore ).getEditedPostAttribute(\n\t\t\t\t\ttagsTaxonomy.rest_base\n\t\t\t\t);\n\t\t\tconst siteTags = _isPostTypeSupported\n\t\t\t\t? !! select( coreStore ).getEntityRecords(\n\t\t\t\t\t\t'taxonomy',\n\t\t\t\t\t\t'post_tag',\n\t\t\t\t\t\t{ per_page: 1 }\n\t\t\t\t )?.length\n\t\t\t\t: false;\n\n\t\t\treturn {\n\t\t\t\tpostHasTags: !! tags?.length,\n\t\t\t\tsiteHasTags: siteTags,\n\t\t\t\tisPostTypeSupported: areTagsFetched && _isPostTypeSupported,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst [ hadTagsWhenOpeningThePanel ] = useState( postHasTags );\n\n\t/**\n\t * We only want to show the tag panel if the post type supports\n\t * tags and the site has tags.\n\t */\n\tif ( ! isPostTypeSupported || ! siteHasTags ) {\n\t\treturn null;\n\t}\n\n\t/*\n\t * We only want to show the tag panel if the post didn't have\n\t * any tags when the user hit the Publish button.\n\t *\n\t * We can't use the prop.postHasTags because it'll change to true\n\t * if the user adds a new tag within the pre-publish panel.\n\t * This would force a re-render and a new prop.postHasTags check,\n\t * hiding this panel and keeping the user from adding\n\t * more than one tag.\n\t */\n\tif ( ! hadTagsWhenOpeningThePanel ) {\n\t\treturn <TagsPanel />;\n\t}\n\n\treturn null;\n};\n\nexport default MaybeTagsPanel;\n", "/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { useEffect, useMemo, useState } from '@wordpress/element';\nimport {\n\tFormTokenField,\n\twithFilters,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useDebounce } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unescapeString, unescapeTerm } from '../../utils/terms';\nimport MostUsedTerms from './most-used-terms';\n\n/**\n * Shared reference to an empty array for cases where it is important to avoid\n * returning a new array reference on every invocation.\n *\n * @type {Array<any>}\n */\nconst EMPTY_ARRAY = [];\n\n/**\n * How the max suggestions limit was chosen:\n * - Matches the `per_page` range set by the REST API.\n * - Can't use \"unbound\" query. The `FormTokenField` needs a fixed number.\n * - Matches default for `FormTokenField`.\n */\nconst MAX_TERMS_SUGGESTIONS = 100;\nconst DEFAULT_QUERY = {\n\tper_page: MAX_TERMS_SUGGESTIONS,\n\t_fields: 'id,name',\n\tcontext: 'view',\n};\n\nconst isSameTermName = ( termA, termB ) =>\n\tunescapeString( termA ).toLowerCase() ===\n\tunescapeString( termB ).toLowerCase();\n\nconst termNamesToIds = ( names, terms ) => {\n\treturn names\n\t\t.map(\n\t\t\t( termName ) =>\n\t\t\t\tterms.find( ( term ) => isSameTermName( term.name, termName ) )\n\t\t\t\t\t?.id\n\t\t)\n\t\t.filter( ( id ) => id !== undefined );\n};\n\n/**\n * Renders a flat term selector component.\n *\n * @param {Object} props The component props.\n * @param {string} props.slug The slug of the taxonomy.\n *\n * @return {React.ReactNode} The rendered flat term selector component.\n */\nexport function FlatTermSelector( { slug } ) {\n\tconst [ values, setValues ] = useState( [] );\n\tconst [ search, setSearch ] = useState( '' );\n\tconst debouncedSearch = useDebounce( setSearch, 500 );\n\n\tconst {\n\t\tterms,\n\t\ttermIds,\n\t\ttaxonomy,\n\t\thasAssignAction,\n\t\thasCreateAction,\n\t\thasResolvedTerms,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCurrentPost, getEditedPostAttribute } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst { getEntityRecords, getEntityRecord, hasFinishedResolution } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst post = getCurrentPost();\n\t\t\tconst _taxonomy = getEntityRecord( 'root', 'taxonomy', slug );\n\t\t\tconst _termIds = _taxonomy\n\t\t\t\t? getEditedPostAttribute( _taxonomy.rest_base )\n\t\t\t\t: EMPTY_ARRAY;\n\n\t\t\tconst query = {\n\t\t\t\t...DEFAULT_QUERY,\n\t\t\t\tinclude: _termIds?.join( ',' ),\n\t\t\t\tper_page: -1,\n\t\t\t};\n\n\t\t\treturn {\n\t\t\t\thasCreateAction: _taxonomy\n\t\t\t\t\t? post._links?.[\n\t\t\t\t\t\t\t'wp:action-create-' + _taxonomy.rest_base\n\t\t\t\t\t ] ?? false\n\t\t\t\t\t: false,\n\t\t\t\thasAssignAction: _taxonomy\n\t\t\t\t\t? post._links?.[\n\t\t\t\t\t\t\t'wp:action-assign-' + _taxonomy.rest_base\n\t\t\t\t\t ] ?? false\n\t\t\t\t\t: false,\n\t\t\t\ttaxonomy: _taxonomy,\n\t\t\t\ttermIds: _termIds,\n\t\t\t\tterms: _termIds?.length\n\t\t\t\t\t? getEntityRecords( 'taxonomy', slug, query )\n\t\t\t\t\t: EMPTY_ARRAY,\n\t\t\t\thasResolvedTerms: hasFinishedResolution( 'getEntityRecords', [\n\t\t\t\t\t'taxonomy',\n\t\t\t\t\tslug,\n\t\t\t\t\tquery,\n\t\t\t\t] ),\n\t\t\t};\n\t\t},\n\t\t[ slug ]\n\t);\n\n\tconst { searchResults } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecords } = select( coreStore );\n\n\t\t\treturn {\n\t\t\t\tsearchResults: !! search\n\t\t\t\t\t? getEntityRecords( 'taxonomy', slug, {\n\t\t\t\t\t\t\t...DEFAULT_QUERY,\n\t\t\t\t\t\t\tsearch,\n\t\t\t\t\t } )\n\t\t\t\t\t: EMPTY_ARRAY,\n\t\t\t};\n\t\t},\n\t\t[ search, slug ]\n\t);\n\n\t// Update terms state only after the selectors are resolved.\n\t// We're using this to avoid terms temporarily disappearing on slow networks\n\t// while core data makes REST API requests.\n\tuseEffect( () => {\n\t\tif ( hasResolvedTerms ) {\n\t\t\tconst newValues = ( terms ?? [] ).map( ( term ) =>\n\t\t\t\tunescapeString( term.name )\n\t\t\t);\n\n\t\t\tsetValues( newValues );\n\t\t}\n\t}, [ terms, hasResolvedTerms ] );\n\n\tconst suggestions = useMemo( () => {\n\t\treturn ( searchResults ?? [] ).map( ( term ) =>\n\t\t\tunescapeString( term.name )\n\t\t);\n\t}, [ searchResults ] );\n\n\tconst { editPost } = useDispatch( editorStore );\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\n\tif ( ! hasAssignAction ) {\n\t\treturn null;\n\t}\n\n\tasync function findOrCreateTerm( term ) {\n\t\ttry {\n\t\t\tconst newTerm = await saveEntityRecord( 'taxonomy', slug, term, {\n\t\t\t\tthrowOnError: true,\n\t\t\t} );\n\t\t\treturn unescapeTerm( newTerm );\n\t\t} catch ( error ) {\n\t\t\tif ( error.code !== 'term_exists' ) {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tid: error.data.term_id,\n\t\t\t\tname: term.name,\n\t\t\t};\n\t\t}\n\t}\n\n\tfunction onUpdateTerms( newTermIds ) {\n\t\teditPost( { [ taxonomy.rest_base ]: newTermIds } );\n\t}\n\n\tfunction onChange( termNames ) {\n\t\tconst availableTerms = [\n\t\t\t...( terms ?? [] ),\n\t\t\t...( searchResults ?? [] ),\n\t\t];\n\t\tconst uniqueTerms = termNames.reduce( ( acc, name ) => {\n\t\t\tif (\n\t\t\t\t! acc.some( ( n ) => n.toLowerCase() === name.toLowerCase() )\n\t\t\t) {\n\t\t\t\tacc.push( name );\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, [] );\n\n\t\tconst newTermNames = uniqueTerms.filter(\n\t\t\t( termName ) =>\n\t\t\t\t! availableTerms.find( ( term ) =>\n\t\t\t\t\tisSameTermName( term.name, termName )\n\t\t\t\t)\n\t\t);\n\n\t\t// Optimistically update term values.\n\t\t// The selector will always re-fetch terms later.\n\t\tsetValues( uniqueTerms );\n\n\t\tif ( newTermNames.length === 0 ) {\n\t\t\tonUpdateTerms( termNamesToIds( uniqueTerms, availableTerms ) );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! hasCreateAction ) {\n\t\t\treturn;\n\t\t}\n\n\t\tPromise.all(\n\t\t\tnewTermNames.map( ( termName ) =>\n\t\t\t\tfindOrCreateTerm( { name: termName } )\n\t\t\t)\n\t\t)\n\t\t\t.then( ( newTerms ) => {\n\t\t\t\tconst newAvailableTerms = availableTerms.concat( newTerms );\n\t\t\t\tonUpdateTerms(\n\t\t\t\t\ttermNamesToIds( uniqueTerms, newAvailableTerms )\n\t\t\t\t);\n\t\t\t} )\n\t\t\t.catch( ( error ) => {\n\t\t\t\tcreateErrorNotice( error.message, {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t} );\n\t\t\t\t// In case of a failure, try assigning available terms.\n\t\t\t\t// This will invalidate the optimistic update.\n\t\t\t\tonUpdateTerms( termNamesToIds( uniqueTerms, availableTerms ) );\n\t\t\t} );\n\t}\n\n\tfunction appendTerm( newTerm ) {\n\t\tif ( termIds.includes( newTerm.id ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst newTermIds = [ ...termIds, newTerm.id ];\n\t\tconst defaultName = slug === 'post_tag' ? __( 'Tag' ) : __( 'Term' );\n\t\tconst termAddedMessage = sprintf(\n\t\t\t/* translators: %s: term name. */\n\t\t\t_x( '%s added', 'term' ),\n\t\t\ttaxonomy?.labels?.singular_name ?? defaultName\n\t\t);\n\n\t\tspeak( termAddedMessage, 'assertive' );\n\t\tonUpdateTerms( newTermIds );\n\t}\n\n\tconst newTermLabel =\n\t\ttaxonomy?.labels?.add_new_item ??\n\t\t( slug === 'post_tag' ? __( 'Add Tag' ) : __( 'Add Term' ) );\n\tconst singularName =\n\t\ttaxonomy?.labels?.singular_name ??\n\t\t( slug === 'post_tag' ? __( 'Tag' ) : __( 'Term' ) );\n\tconst termAddedLabel = sprintf(\n\t\t/* translators: %s: term name. */\n\t\t_x( '%s added', 'term' ),\n\t\tsingularName\n\t);\n\tconst termRemovedLabel = sprintf(\n\t\t/* translators: %s: term name. */\n\t\t_x( '%s removed', 'term' ),\n\t\tsingularName\n\t);\n\tconst removeTermLabel = sprintf(\n\t\t/* translators: %s: term name. */\n\t\t_x( 'Remove %s', 'term' ),\n\t\tsingularName\n\t);\n\n\treturn (\n\t\t<VStack spacing={ 4 }>\n\t\t\t<FormTokenField\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tvalue={ values }\n\t\t\t\tsuggestions={ suggestions }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tonInputChange={ debouncedSearch }\n\t\t\t\tmaxSuggestions={ MAX_TERMS_SUGGESTIONS }\n\t\t\t\tlabel={ newTermLabel }\n\t\t\t\tmessages={ {\n\t\t\t\t\tadded: termAddedLabel,\n\t\t\t\t\tremoved: termRemovedLabel,\n\t\t\t\t\tremove: removeTermLabel,\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<MostUsedTerms taxonomy={ taxonomy } onSelect={ appendTerm } />\n\t\t</VStack>\n\t);\n}\n\nexport default withFilters( 'editor.PostTaxonomyType' )( FlatTermSelector );\n", "/**\n * WordPress dependencies\n */\nimport { BaseControl, Button } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unescapeTerms } from '../../utils/terms';\n\nconst MIN_MOST_USED_TERMS = 3;\nconst DEFAULT_QUERY = {\n\tper_page: 10,\n\torderby: 'count',\n\torder: 'desc',\n\thide_empty: true,\n\t_fields: 'id,name,count',\n\tcontext: 'view',\n};\n\nexport default function MostUsedTerms( { onSelect, taxonomy } ) {\n\tconst { _terms, showTerms } = useSelect(\n\t\t( select ) => {\n\t\t\tconst mostUsedTerms = select( coreStore ).getEntityRecords(\n\t\t\t\t'taxonomy',\n\t\t\t\ttaxonomy.slug,\n\t\t\t\tDEFAULT_QUERY\n\t\t\t);\n\t\t\treturn {\n\t\t\t\t_terms: mostUsedTerms,\n\t\t\t\tshowTerms: mostUsedTerms?.length >= MIN_MOST_USED_TERMS,\n\t\t\t};\n\t\t},\n\t\t[ taxonomy.slug ]\n\t);\n\n\tif ( ! showTerms ) {\n\t\treturn null;\n\t}\n\n\tconst terms = unescapeTerms( _terms );\n\n\treturn (\n\t\t<div className=\"editor-post-taxonomies__flat-term-most-used\">\n\t\t\t<BaseControl.VisualLabel\n\t\t\t\tas=\"h3\"\n\t\t\t\tclassName=\"editor-post-taxonomies__flat-term-most-used-label\"\n\t\t\t>\n\t\t\t\t{ taxonomy.labels.most_used }\n\t\t\t</BaseControl.VisualLabel>\n\t\t\t{ /*\n\t\t\t * Disable reason: The `list` ARIA role is redundant but\n\t\t\t * Safari+VoiceOver won't announce the list otherwise.\n\t\t\t */\n\t\t\t/* eslint-disable jsx-a11y/no-redundant-roles */ }\n\t\t\t<ul\n\t\t\t\trole=\"list\"\n\t\t\t\tclassName=\"editor-post-taxonomies__flat-term-most-used-list\"\n\t\t\t>\n\t\t\t\t{ terms.map( ( term ) => (\n\t\t\t\t\t<li key={ term.id }>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\tonClick={ () => onSelect( term ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ term.name }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</li>\n\t\t\t\t) ) }\n\t\t\t</ul>\n\t\t\t{ /* eslint-enable jsx-a11y/no-redundant-roles */ }\n\t\t</div>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { Button, PanelBody } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { POST_FORMATS } from '../post-format';\nimport { store as editorStore } from '../../store';\n\nconst getSuggestion = ( supportedFormats, suggestedPostFormat ) => {\n\tconst formats = POST_FORMATS.filter( ( format ) =>\n\t\tsupportedFormats?.includes( format.id )\n\t);\n\treturn formats.find( ( format ) => format.id === suggestedPostFormat );\n};\n\nconst PostFormatSuggestion = ( {\n\tsuggestedPostFormat,\n\tsuggestionText,\n\tonUpdatePostFormat,\n} ) => (\n\t<Button\n\t\t__next40pxDefaultSize\n\t\tvariant=\"link\"\n\t\tonClick={ () => onUpdatePostFormat( suggestedPostFormat ) }\n\t>\n\t\t{ suggestionText }\n\t</Button>\n);\n\nexport default function PostFormatPanel() {\n\tconst { currentPostFormat, suggestion } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, getSuggestedPostFormat } =\n\t\t\tselect( editorStore );\n\t\tconst supportedFormats =\n\t\t\tselect( coreStore ).getThemeSupports().formats ?? [];\n\t\treturn {\n\t\t\tcurrentPostFormat: getEditedPostAttribute( 'format' ),\n\t\t\tsuggestion: getSuggestion(\n\t\t\t\tsupportedFormats,\n\t\t\t\tgetSuggestedPostFormat()\n\t\t\t),\n\t\t};\n\t}, [] );\n\n\tconst { editPost } = useDispatch( editorStore );\n\n\tconst onUpdatePostFormat = ( format ) => editPost( { format } );\n\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'Use a post format' ) }\n\t\t</span>,\n\t];\n\n\tif ( ! suggestion || suggestion.id === currentPostFormat ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody initialOpen={ false } title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<PostFormatSuggestion\n\t\t\t\t\tonUpdatePostFormat={ onUpdatePostFormat }\n\t\t\t\t\tsuggestedPostFormat={ suggestion.id }\n\t\t\t\t\tsuggestionText={ sprintf(\n\t\t\t\t\t\t/* translators: %1s: post format */\n\t\t\t\t\t\t__( 'Apply the \"%1$s\" format.' ),\n\t\t\t\t\t\tsuggestion.caption\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</p>\n\t\t</PanelBody>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useState, useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport HierarchicalTermSelector from '../post-taxonomies/hierarchical-term-selector';\nimport { store as editorStore } from '../../store';\n\nfunction MaybeCategoryPanel() {\n\tconst { hasNoCategory, hasSiteCategories } = useSelect( ( select ) => {\n\t\tconst postType = select( editorStore ).getCurrentPostType();\n\t\tconst { canUser, getEntityRecord } = select( coreStore );\n\t\tconst categoriesTaxonomy = getEntityRecord(\n\t\t\t'root',\n\t\t\t'taxonomy',\n\t\t\t'category'\n\t\t);\n\t\tconst defaultCategoryId = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? getEntityRecord( 'root', 'site' )?.default_category\n\t\t\t: undefined;\n\t\tconst defaultCategory = defaultCategoryId\n\t\t\t? getEntityRecord( 'taxonomy', 'category', defaultCategoryId )\n\t\t\t: undefined;\n\t\tconst postTypeSupportsCategories =\n\t\t\tcategoriesTaxonomy &&\n\t\t\tcategoriesTaxonomy.types.some( ( type ) => type === postType );\n\t\tconst categories =\n\t\t\tcategoriesTaxonomy &&\n\t\t\tselect( editorStore ).getEditedPostAttribute(\n\t\t\t\tcategoriesTaxonomy.rest_base\n\t\t\t);\n\t\tconst siteCategories = postTypeSupportsCategories\n\t\t\t? !! select( coreStore ).getEntityRecords( 'taxonomy', 'category', {\n\t\t\t\t\texclude: [ defaultCategoryId ],\n\t\t\t\t\tper_page: 1,\n\t\t\t } )?.length\n\t\t\t: false;\n\n\t\t// This boolean should return true if everything is loaded\n\t\t// ( categoriesTaxonomy, defaultCategory )\n\t\t// and the post has not been assigned a category different than \"uncategorized\".\n\t\tconst noCategory =\n\t\t\t!! categoriesTaxonomy &&\n\t\t\t!! defaultCategory &&\n\t\t\tpostTypeSupportsCategories &&\n\t\t\t( categories?.length === 0 ||\n\t\t\t\t( categories?.length === 1 &&\n\t\t\t\t\tdefaultCategory?.id === categories[ 0 ] ) );\n\n\t\treturn {\n\t\t\thasNoCategory: noCategory,\n\t\t\thasSiteCategories: siteCategories,\n\t\t};\n\t}, [] );\n\n\tconst [ shouldShowPanel, setShouldShowPanel ] = useState( false );\n\tuseEffect( () => {\n\t\t// We use state to avoid hiding the panel if the user edits the categories\n\t\t// and adds one within the panel itself (while visible).\n\t\tif ( hasNoCategory ) {\n\t\t\tsetShouldShowPanel( true );\n\t\t}\n\t}, [ hasNoCategory ] );\n\n\t// We only want to show the category panel:\n\t// if the post type supports categories,\n\t// if the site has categories other than the default category,\n\t// and if the post has no other categories than the default category.\n\tif ( ! shouldShowPanel || ! hasSiteCategories ) {\n\t\treturn null;\n\t}\n\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'Assign a category' ) }\n\t\t</span>,\n\t];\n\n\treturn (\n\t\t<PanelBody initialOpen={ false } title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<HierarchicalTermSelector slug=\"category\" />\n\t\t</PanelBody>\n\t);\n}\n\nexport default MaybeCategoryPanel;\n", "/**\n * WordPress dependencies\n */\nimport { __, _n, _x, sprintf } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\nimport { store as noticesStore } from '@wordpress/notices';\nimport {\n\tButton,\n\tCheckboxControl,\n\tTextControl,\n\tTreeSelect,\n\twithFilters,\n\tFlex,\n\tFlexItem,\n\tSearchControl,\n\tSpinner,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useDebounce } from '@wordpress/compose';\nimport {\n\tstore as coreStore,\n\tprivateApis as coreDataPrivateApis,\n} from '@wordpress/core-data';\nimport { speak } from '@wordpress/a11y';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { buildTermsTree } from '../../utils/terms';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { normalizeTextString } = unlock( componentsPrivateApis );\nconst { RECEIVE_INTERMEDIATE_RESULTS } = unlock( coreDataPrivateApis );\n\n/**\n * Module Constants\n */\nconst DEFAULT_QUERY = {\n\tper_page: -1,\n\torderby: 'name',\n\torder: 'asc',\n\t_fields: 'id,name,parent',\n\tcontext: 'view',\n\t[ RECEIVE_INTERMEDIATE_RESULTS ]: true,\n};\nconst MIN_TERMS_COUNT_FOR_FILTER = 8;\nconst EMPTY_ARRAY = [];\n\n/**\n * Sort Terms by Selected.\n *\n * @param {Object[]} termsTree Array of terms in tree format.\n * @param {number[]} terms Selected terms.\n *\n * @return {Object[]} Sorted array of terms.\n */\nexport function sortBySelected( termsTree, terms ) {\n\tconst treeHasSelection = ( termTree ) => {\n\t\tif ( terms.indexOf( termTree.id ) !== -1 ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( undefined === termTree.children ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn (\n\t\t\ttermTree.children\n\t\t\t\t.map( treeHasSelection )\n\t\t\t\t.filter( ( child ) => child ).length > 0\n\t\t);\n\t};\n\tconst termOrChildIsSelected = ( termA, termB ) => {\n\t\tconst termASelected = treeHasSelection( termA );\n\t\tconst termBSelected = treeHasSelection( termB );\n\n\t\tif ( termASelected === termBSelected ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tif ( termASelected && ! termBSelected ) {\n\t\t\treturn -1;\n\t\t}\n\n\t\tif ( ! termASelected && termBSelected ) {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn 0;\n\t};\n\tconst newTermTree = [ ...termsTree ];\n\tnewTermTree.sort( termOrChildIsSelected );\n\treturn newTermTree;\n}\n\n/**\n * Find term by parent id or name.\n *\n * @param {Object[]} terms Array of Terms.\n * @param {number|string} parent id.\n * @param {string} name Term name.\n * @return {Object} Term object.\n */\nexport function findTerm( terms, parent, name ) {\n\treturn terms.find( ( term ) => {\n\t\treturn (\n\t\t\t( ( ! term.parent && ! parent ) ||\n\t\t\t\tparseInt( term.parent ) === parseInt( parent ) ) &&\n\t\t\tterm.name.toLowerCase() === name.toLowerCase()\n\t\t);\n\t} );\n}\n\n/**\n * Get filter matcher function.\n *\n * @param {string} filterValue Filter value.\n * @return {(function(Object): (Object|boolean))} Matcher function.\n */\nexport function getFilterMatcher( filterValue ) {\n\tconst matchTermsForFilter = ( originalTerm ) => {\n\t\tif ( '' === filterValue ) {\n\t\t\treturn originalTerm;\n\t\t}\n\n\t\t// Shallow clone, because we'll be filtering the term's children and\n\t\t// don't want to modify the original term.\n\t\tconst term = { ...originalTerm };\n\n\t\t// Map and filter the children, recursive so we deal with grandchildren\n\t\t// and any deeper levels.\n\t\tif ( term.children.length > 0 ) {\n\t\t\tterm.children = term.children\n\t\t\t\t.map( matchTermsForFilter )\n\t\t\t\t.filter( ( child ) => child );\n\t\t}\n\n\t\t// If the term's name contains the filterValue, or it has children\n\t\t// (i.e. some child matched at some point in the tree) then return it.\n\t\tif (\n\t\t\t-1 !==\n\t\t\t\tnormalizeTextString( term.name ).indexOf(\n\t\t\t\t\tnormalizeTextString( filterValue )\n\t\t\t\t) ||\n\t\t\tterm.children.length > 0\n\t\t) {\n\t\t\treturn term;\n\t\t}\n\n\t\t// Otherwise, return false. After mapping, the list of terms will need\n\t\t// to have false values filtered out.\n\t\treturn false;\n\t};\n\treturn matchTermsForFilter;\n}\n\n/**\n * Hierarchical term selector.\n *\n * @param {Object} props Component props.\n * @param {string} props.slug Taxonomy slug.\n * @return {Element} Hierarchical term selector component.\n */\nexport function HierarchicalTermSelector( { slug } ) {\n\tconst [ adding, setAdding ] = useState( false );\n\tconst [ formName, setFormName ] = useState( '' );\n\t/**\n\t * @type {[number|'', Function]}\n\t */\n\tconst [ formParent, setFormParent ] = useState( '' );\n\tconst [ showForm, setShowForm ] = useState( false );\n\tconst [ filterValue, setFilterValue ] = useState( '' );\n\tconst [ filteredTermsTree, setFilteredTermsTree ] = useState( [] );\n\tconst debouncedSpeak = useDebounce( speak, 500 );\n\n\tconst {\n\t\thasCreateAction,\n\t\thasAssignAction,\n\t\tterms,\n\t\tloading,\n\t\tavailableTerms,\n\t\ttaxonomy,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCurrentPost, getEditedPostAttribute } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst { getEntityRecord, getEntityRecords, isResolving } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst _taxonomy = getEntityRecord( 'root', 'taxonomy', slug );\n\t\t\tconst post = getCurrentPost();\n\n\t\t\treturn {\n\t\t\t\thasCreateAction: _taxonomy\n\t\t\t\t\t? !! post._links?.[\n\t\t\t\t\t\t\t'wp:action-create-' + _taxonomy.rest_base\n\t\t\t\t\t ]\n\t\t\t\t\t: false,\n\t\t\t\thasAssignAction: _taxonomy\n\t\t\t\t\t? !! post._links?.[\n\t\t\t\t\t\t\t'wp:action-assign-' + _taxonomy.rest_base\n\t\t\t\t\t ]\n\t\t\t\t\t: false,\n\t\t\t\tterms: _taxonomy\n\t\t\t\t\t? getEditedPostAttribute( _taxonomy.rest_base )\n\t\t\t\t\t: EMPTY_ARRAY,\n\t\t\t\tloading: isResolving( 'getEntityRecords', [\n\t\t\t\t\t'taxonomy',\n\t\t\t\t\tslug,\n\t\t\t\t\tDEFAULT_QUERY,\n\t\t\t\t] ),\n\t\t\t\tavailableTerms:\n\t\t\t\t\tgetEntityRecords( 'taxonomy', slug, DEFAULT_QUERY ) ||\n\t\t\t\t\tEMPTY_ARRAY,\n\t\t\t\ttaxonomy: _taxonomy,\n\t\t\t};\n\t\t},\n\t\t[ slug ]\n\t);\n\n\tconst { editPost } = useDispatch( editorStore );\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\n\tconst availableTermsTree = useMemo(\n\t\t() => sortBySelected( buildTermsTree( availableTerms ), terms ),\n\t\t// Remove `terms` from the dependency list to avoid reordering every time\n\t\t// checking or unchecking a term.\n\t\t[ availableTerms ]\n\t);\n\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\n\tif ( ! hasAssignAction ) {\n\t\treturn null;\n\t}\n\n\t/**\n\t * Append new term.\n\t *\n\t * @param {Object} term Term object.\n\t * @return {Promise} A promise that resolves to save term object.\n\t */\n\tconst addTerm = ( term ) => {\n\t\treturn saveEntityRecord( 'taxonomy', slug, term, {\n\t\t\tthrowOnError: true,\n\t\t} );\n\t};\n\n\t/**\n\t * Update terms for post.\n\t *\n\t * @param {number[]} termIds Term ids.\n\t */\n\tconst onUpdateTerms = ( termIds ) => {\n\t\teditPost( { [ taxonomy.rest_base ]: termIds } );\n\t};\n\n\t/**\n\t * Handler for checking term.\n\t *\n\t * @param {number} termId\n\t */\n\tconst onChange = ( termId ) => {\n\t\tconst hasTerm = terms.includes( termId );\n\t\tconst newTerms = hasTerm\n\t\t\t? terms.filter( ( id ) => id !== termId )\n\t\t\t: [ ...terms, termId ];\n\t\tonUpdateTerms( newTerms );\n\t};\n\n\tconst onChangeFormName = ( value ) => {\n\t\tsetFormName( value );\n\t};\n\n\t/**\n\t * Handler for changing form parent.\n\t *\n\t * @param {number|''} parentId Parent post id.\n\t */\n\tconst onChangeFormParent = ( parentId ) => {\n\t\tsetFormParent( parentId );\n\t};\n\n\tconst onToggleForm = () => {\n\t\tsetShowForm( ! showForm );\n\t};\n\n\tconst onAddTerm = async ( event ) => {\n\t\tevent.preventDefault();\n\t\tif ( formName === '' || adding ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Check if the term we are adding already exists.\n\t\tconst existingTerm = findTerm( availableTerms, formParent, formName );\n\t\tif ( existingTerm ) {\n\t\t\t// If the term we are adding exists but is not selected select it.\n\t\t\tif ( ! terms.some( ( term ) => term === existingTerm.id ) ) {\n\t\t\t\tonUpdateTerms( [ ...terms, existingTerm.id ] );\n\t\t\t}\n\n\t\t\tsetFormName( '' );\n\t\t\tsetFormParent( '' );\n\n\t\t\treturn;\n\t\t}\n\t\tsetAdding( true );\n\t\tlet newTerm;\n\t\ttry {\n\t\t\tnewTerm = await addTerm( {\n\t\t\t\tname: formName,\n\t\t\t\tparent: formParent ? formParent : undefined,\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\tcreateErrorNotice( error.message, {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t\treturn;\n\t\t}\n\t\tconst defaultName =\n\t\t\tslug === 'category' ? __( 'Category' ) : __( 'Term' );\n\t\tconst termAddedMessage = sprintf(\n\t\t\t/* translators: %s: term name. */\n\t\t\t_x( '%s added', 'term' ),\n\t\t\ttaxonomy?.labels?.singular_name ?? defaultName\n\t\t);\n\t\tspeak( termAddedMessage, 'assertive' );\n\t\tsetAdding( false );\n\t\tsetFormName( '' );\n\t\tsetFormParent( '' );\n\t\tonUpdateTerms( [ ...terms, newTerm.id ] );\n\t};\n\n\tconst setFilter = ( value ) => {\n\t\tconst newFilteredTermsTree = availableTermsTree\n\t\t\t.map( getFilterMatcher( value ) )\n\t\t\t.filter( ( term ) => term );\n\t\tconst getResultCount = ( termsTree ) => {\n\t\t\tlet count = 0;\n\t\t\tfor ( let i = 0; i < termsTree.length; i++ ) {\n\t\t\t\tcount++;\n\t\t\t\tif ( undefined !== termsTree[ i ].children ) {\n\t\t\t\t\tcount += getResultCount( termsTree[ i ].children );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn count;\n\t\t};\n\n\t\tsetFilterValue( value );\n\t\tsetFilteredTermsTree( newFilteredTermsTree );\n\n\t\tconst resultCount = getResultCount( newFilteredTermsTree );\n\t\tconst resultsFoundMessage = sprintf(\n\t\t\t/* translators: %d: number of results. */\n\t\t\t_n( '%d result found.', '%d results found.', resultCount ),\n\t\t\tresultCount\n\t\t);\n\n\t\tdebouncedSpeak( resultsFoundMessage, 'assertive' );\n\t};\n\n\tconst renderTerms = ( renderedTerms ) => {\n\t\treturn renderedTerms.map( ( term ) => {\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tkey={ term.id }\n\t\t\t\t\tclassName=\"editor-post-taxonomies__hierarchical-terms-choice\"\n\t\t\t\t>\n\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\tchecked={ terms.indexOf( term.id ) !== -1 }\n\t\t\t\t\t\tonChange={ () => {\n\t\t\t\t\t\t\tconst termId = parseInt( term.id, 10 );\n\t\t\t\t\t\t\tonChange( termId );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tlabel={ decodeEntities( term.name ) }\n\t\t\t\t\t/>\n\t\t\t\t\t{ !! term.children.length && (\n\t\t\t\t\t\t<div className=\"editor-post-taxonomies__hierarchical-terms-subchoices\">\n\t\t\t\t\t\t\t{ renderTerms( term.children ) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t);\n\t\t} );\n\t};\n\n\tconst labelWithFallback = (\n\t\tlabelProperty,\n\t\tfallbackIsCategory,\n\t\tfallbackIsNotCategory\n\t) =>\n\t\ttaxonomy?.labels?.[ labelProperty ] ??\n\t\t( slug === 'category' ? fallbackIsCategory : fallbackIsNotCategory );\n\n\tconst newTermButtonLabel = labelWithFallback(\n\t\t'add_new_item',\n\t\t__( 'Add Category' ),\n\t\t__( 'Add Term' )\n\t);\n\tconst newTermLabel = labelWithFallback(\n\t\t'new_item_name',\n\t\t__( 'Add Category' ),\n\t\t__( 'Add Term' )\n\t);\n\tconst parentSelectLabel = labelWithFallback(\n\t\t'parent_item',\n\t\t__( 'Parent Category' ),\n\t\t__( 'Parent Term' )\n\t);\n\tconst noParentOption = `\u2014 ${ parentSelectLabel } \u2014`;\n\tconst newTermSubmitLabel = newTermButtonLabel;\n\tconst filterLabel = taxonomy?.labels?.search_items ?? __( 'Search Terms' );\n\tconst groupLabel = taxonomy?.name ?? __( 'Terms' );\n\tconst showFilter = availableTerms.length >= MIN_TERMS_COUNT_FOR_FILTER;\n\n\treturn (\n\t\t<Flex direction=\"column\" gap=\"4\">\n\t\t\t{ showFilter && ! loading && (\n\t\t\t\t<SearchControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ filterLabel }\n\t\t\t\t\tplaceholder={ filterLabel }\n\t\t\t\t\tvalue={ filterValue }\n\t\t\t\t\tonChange={ setFilter }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ loading && (\n\t\t\t\t<Flex\n\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t// Match SearchControl height to prevent layout shift.\n\t\t\t\t\t\theight: '40px',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<Spinner />\n\t\t\t\t</Flex>\n\t\t\t) }\n\t\t\t<div\n\t\t\t\tclassName=\"editor-post-taxonomies__hierarchical-terms-list\"\n\t\t\t\ttabIndex=\"0\"\n\t\t\t\trole=\"group\"\n\t\t\t\taria-label={ groupLabel }\n\t\t\t>\n\t\t\t\t{ renderTerms(\n\t\t\t\t\t'' !== filterValue ? filteredTermsTree : availableTermsTree\n\t\t\t\t) }\n\t\t\t</div>\n\t\t\t{ ! loading && hasCreateAction && (\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tonClick={ onToggleForm }\n\t\t\t\t\t\tclassName=\"editor-post-taxonomies__hierarchical-terms-add\"\n\t\t\t\t\t\taria-expanded={ showForm }\n\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ newTermButtonLabel }\n\t\t\t\t\t</Button>\n\t\t\t\t</FlexItem>\n\t\t\t) }\n\t\t\t{ showForm && (\n\t\t\t\t<form onSubmit={ onAddTerm }>\n\t\t\t\t\t<Flex direction=\"column\" gap=\"4\">\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tclassName=\"editor-post-taxonomies__hierarchical-terms-input\"\n\t\t\t\t\t\t\tlabel={ newTermLabel }\n\t\t\t\t\t\t\tvalue={ formName }\n\t\t\t\t\t\t\tonChange={ onChangeFormName }\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ !! availableTerms.length && (\n\t\t\t\t\t\t\t<TreeSelect\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tlabel={ parentSelectLabel }\n\t\t\t\t\t\t\t\tnoOptionLabel={ noParentOption }\n\t\t\t\t\t\t\t\tonChange={ onChangeFormParent }\n\t\t\t\t\t\t\t\tselectedId={ formParent }\n\t\t\t\t\t\t\t\ttree={ availableTermsTree }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\tclassName=\"editor-post-taxonomies__hierarchical-terms-submit\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ newTermSubmitLabel }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t</Flex>\n\t\t\t\t</form>\n\t\t\t) }\n\t\t</Flex>\n\t);\n}\n\nexport default withFilters( 'editor.PostTaxonomyType' )(\n\tHierarchicalTermSelector\n);\n", "/**\n * WordPress dependencies\n */\nimport {\n\tPanelBody,\n\tButton,\n\tSpinner,\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useState } from '@wordpress/element';\nimport { isBlobURL } from '@wordpress/blob';\n\n/**\n * Internal dependencies\n */\nimport { fetchMedia } from './media-util';\n\nfunction flattenBlocks( blocks ) {\n\tconst result = [];\n\n\tblocks.forEach( ( block ) => {\n\t\tresult.push( block );\n\t\tresult.push( ...flattenBlocks( block.innerBlocks ) );\n\t} );\n\n\treturn result;\n}\n\n/**\n * Determine whether a block has external media.\n *\n * Different blocks use different attribute names (and potentially\n * different logic as well) in determining whether the media is\n * present, and whether it's external.\n *\n * @param {{name: string, attributes: Object}} block The block.\n * @return {boolean?} Whether the block has external media\n */\nfunction hasExternalMedia( block ) {\n\tif ( block.name === 'core/image' || block.name === 'core/cover' ) {\n\t\treturn block.attributes.url && ! block.attributes.id;\n\t}\n\n\tif ( block.name === 'core/media-text' ) {\n\t\treturn block.attributes.mediaUrl && ! block.attributes.mediaId;\n\t}\n\n\treturn undefined;\n}\n\n/**\n * Retrieve media info from a block.\n *\n * Different blocks use different attribute names, so we need this\n * function to normalize things into a consistent naming scheme.\n *\n * @param {{name: string, attributes: Object}} block The block.\n * @return {{url: ?string, alt: ?string, id: ?number}} The media info for the block.\n */\nfunction getMediaInfo( block ) {\n\tif ( block.name === 'core/image' || block.name === 'core/cover' ) {\n\t\tconst { url, alt, id } = block.attributes;\n\t\treturn { url, alt, id };\n\t}\n\n\tif ( block.name === 'core/media-text' ) {\n\t\tconst { mediaUrl: url, mediaAlt: alt, mediaId: id } = block.attributes;\n\t\treturn { url, alt, id };\n\t}\n\n\treturn {};\n}\n\n// Image component to represent a single image in the upload dialog.\nfunction Image( { clientId, alt, url } ) {\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\treturn (\n\t\t<motion.img\n\t\t\ttabIndex={ 0 }\n\t\t\trole=\"button\"\n\t\t\taria-label={ __( 'Select image block.' ) }\n\t\t\tonClick={ () => {\n\t\t\t\tselectBlock( clientId );\n\t\t\t} }\n\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\tif ( event.key === 'Enter' || event.key === ' ' ) {\n\t\t\t\t\tselectBlock( clientId );\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t} }\n\t\t\tkey={ clientId }\n\t\t\talt={ alt }\n\t\t\tsrc={ url }\n\t\t\tanimate={ { opacity: 1 } }\n\t\t\texit={ { opacity: 0, scale: 0 } }\n\t\t\tstyle={ {\n\t\t\t\twidth: '32px',\n\t\t\t\theight: '32px',\n\t\t\t\tobjectFit: 'cover',\n\t\t\t\tborderRadius: '2px',\n\t\t\t\tcursor: 'pointer',\n\t\t\t} }\n\t\t\twhileHover={ { scale: 1.08 } }\n\t\t/>\n\t);\n}\n\nexport default function MaybeUploadMediaPanel() {\n\tconst [ isUploading, setIsUploading ] = useState( false );\n\tconst [ isAnimating, setIsAnimating ] = useState( false );\n\tconst [ hadUploadError, setHadUploadError ] = useState( false );\n\tconst { editorBlocks, mediaUpload } = useSelect(\n\t\t( select ) => ( {\n\t\t\teditorBlocks: select( blockEditorStore ).getBlocks(),\n\t\t\tmediaUpload: select( blockEditorStore ).getSettings().mediaUpload,\n\t\t} ),\n\t\t[]\n\t);\n\n\t// Get a list of blocks with external media.\n\tconst blocksWithExternalMedia = flattenBlocks( editorBlocks ).filter(\n\t\t( block ) => hasExternalMedia( block )\n\t);\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\n\tif ( ! mediaUpload || ! blocksWithExternalMedia.length ) {\n\t\treturn null;\n\t}\n\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'External media' ) }\n\t\t</span>,\n\t];\n\n\t/**\n\t * Update an individual block to point to newly-added library media.\n\t *\n\t * Different blocks use different attribute names, so we need this\n\t * function to ensure we modify the correct attributes for each type.\n\t *\n\t * @param {{name: string, attributes: Object}} block The block.\n\t * @param {{id: number, url: string}} media Media library file info.\n\t */\n\tfunction updateBlockWithUploadedMedia( block, media ) {\n\t\tif ( block.name === 'core/image' || block.name === 'core/cover' ) {\n\t\t\tupdateBlockAttributes( block.clientId, {\n\t\t\t\tid: media.id,\n\t\t\t\turl: media.url,\n\t\t\t} );\n\t\t}\n\n\t\tif ( block.name === 'core/media-text' ) {\n\t\t\tupdateBlockAttributes( block.clientId, {\n\t\t\t\tmediaId: media.id,\n\t\t\t\tmediaUrl: media.url,\n\t\t\t} );\n\t\t}\n\t}\n\n\t// Handle fetching and uploading all external media in the post.\n\tfunction uploadImages() {\n\t\tsetIsUploading( true );\n\t\tsetHadUploadError( false );\n\n\t\t// Multiple blocks can be using the same URL, so we\n\t\t// should ensure we only fetch and upload each of them once.\n\t\tconst mediaUrls = new Set(\n\t\t\tblocksWithExternalMedia.map( ( block ) => {\n\t\t\t\tconst { url } = getMediaInfo( block );\n\t\t\t\treturn url;\n\t\t\t} )\n\t\t);\n\n\t\t// Create an upload promise for each URL, that we can wait for in all\n\t\t// blocks that make use of that media.\n\t\tconst uploadPromises = Object.fromEntries(\n\t\t\tObject.entries( fetchMedia( [ ...mediaUrls ] ) ).map(\n\t\t\t\t( [ url, filePromise ] ) => {\n\t\t\t\t\tconst uploadPromise = filePromise.then(\n\t\t\t\t\t\t( blob ) =>\n\t\t\t\t\t\t\tnew Promise( ( resolve, reject ) => {\n\t\t\t\t\t\t\t\tmediaUpload( {\n\t\t\t\t\t\t\t\t\tfilesList: [ blob ],\n\t\t\t\t\t\t\t\t\tonFileChange: ( [ media ] ) => {\n\t\t\t\t\t\t\t\t\t\tif ( isBlobURL( media.url ) ) {\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tresolve( media );\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tonError() {\n\t\t\t\t\t\t\t\t\t\treject();\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t);\n\n\t\t\t\t\treturn [ url, uploadPromise ];\n\t\t\t\t}\n\t\t\t)\n\t\t);\n\n\t\t// Wait for all blocks to be updated with library media.\n\t\tPromise.allSettled(\n\t\t\tblocksWithExternalMedia.map( ( block ) => {\n\t\t\t\tconst { url } = getMediaInfo( block );\n\n\t\t\t\treturn uploadPromises[ url ]\n\t\t\t\t\t.then( ( media ) =>\n\t\t\t\t\t\tupdateBlockWithUploadedMedia( block, media )\n\t\t\t\t\t)\n\t\t\t\t\t.then( () => setIsAnimating( true ) )\n\t\t\t\t\t.catch( () => setHadUploadError( true ) );\n\t\t\t} )\n\t\t).finally( () => {\n\t\t\tsetIsUploading( false );\n\t\t} );\n\t}\n\n\treturn (\n\t\t<PanelBody initialOpen title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<div\n\t\t\t\tstyle={ {\n\t\t\t\t\tdisplay: 'inline-flex',\n\t\t\t\t\tflexWrap: 'wrap',\n\t\t\t\t\tgap: '8px',\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<AnimatePresence\n\t\t\t\t\tonExitComplete={ () => setIsAnimating( false ) }\n\t\t\t\t>\n\t\t\t\t\t{ blocksWithExternalMedia.map( ( block ) => {\n\t\t\t\t\t\tconst { url, alt } = getMediaInfo( block );\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Image\n\t\t\t\t\t\t\t\tkey={ block.clientId }\n\t\t\t\t\t\t\t\tclientId={ block.clientId }\n\t\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\t\talt={ alt }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t);\n\t\t\t\t\t} ) }\n\t\t\t\t</AnimatePresence>\n\t\t\t\t{ isUploading || isAnimating ? (\n\t\t\t\t\t<Spinner />\n\t\t\t\t) : (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ uploadImages }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ _x( 'Upload', 'verb' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t\t{ hadUploadError && <p>{ __( 'Upload failed, try again.' ) }</p> }\n\t\t</PanelBody>\n\t);\n}\n", "/**\n * External dependencies\n */\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport { getFilename } from '@wordpress/url';\n\n/**\n * Generate a list of unique basenames given a list of URLs.\n *\n * We want all basenames to be unique, since sometimes the extension\n * doesn't reflect the mime type, and may end up getting changed by\n * the server, on upload.\n *\n * @param {string[]} urls The list of URLs\n * @return {Record< string, string >} A URL => basename record.\n */\nexport function generateUniqueBasenames( urls ) {\n\tconst basenames = new Set();\n\n\treturn Object.fromEntries(\n\t\turls.map( ( url ) => {\n\t\t\t// We prefer to match the remote filename, if possible.\n\t\t\tconst filename = getFilename( url );\n\t\t\tlet basename = '';\n\n\t\t\tif ( filename ) {\n\t\t\t\tconst parts = filename.split( '.' );\n\t\t\t\tif ( parts.length > 1 ) {\n\t\t\t\t\t// Assume the last part is the extension.\n\t\t\t\t\tparts.pop();\n\t\t\t\t}\n\t\t\t\tbasename = parts.join( '.' );\n\t\t\t}\n\n\t\t\tif ( ! basename ) {\n\t\t\t\t// It looks like we don't have a basename, so let's use a UUID.\n\t\t\t\tbasename = uuid();\n\t\t\t}\n\n\t\t\tif ( basenames.has( basename ) ) {\n\t\t\t\t// Append a UUID to deduplicate the basename.\n\t\t\t\t// The server will try to deduplicate on its own if we don't do this,\n\t\t\t\t// but it may run into a race condition\n\t\t\t\t// (see https://github.com/WordPress/gutenberg/issues/64899).\n\t\t\t\t// Deduplicating the filenames before uploading is safer.\n\t\t\t\tbasename = `${ basename }-${ uuid() }`;\n\t\t\t}\n\n\t\t\tbasenames.add( basename );\n\n\t\t\treturn [ url, basename ];\n\t\t} )\n\t);\n}\n\n/**\n * Fetch a list of URLs, turning those into promises for files with\n * unique filenames.\n *\n * @param {string[]} urls The list of URLs\n * @return {Record< string, Promise< File > >} A URL => File promise record.\n */\nexport function fetchMedia( urls ) {\n\treturn Object.fromEntries(\n\t\tObject.entries( generateUniqueBasenames( urls ) ).map(\n\t\t\t( [ url, basename ] ) => {\n\t\t\t\tconst filePromise = window\n\t\t\t\t\t.fetch( url.includes( '?' ) ? url : url + '?' )\n\t\t\t\t\t.then( ( response ) => response.blob() )\n\t\t\t\t\t.then( ( blob ) => {\n\t\t\t\t\t\t// The server will reject the upload if it doesn't have an extension,\n\t\t\t\t\t\t// even though it'll rewrite the file name to match the mime type.\n\t\t\t\t\t\t// Here we provide it with a safe extension to get it past that check.\n\t\t\t\t\t\treturn new File( [ blob ], `${ basename }.png`, {\n\t\t\t\t\t\t\ttype: blob.type,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} );\n\n\t\t\t\treturn [ url, filePromise ];\n\t\t\t}\n\t\t)\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport {\n\tPanelBody,\n\tButton,\n\tTextControl,\n\tExternalLink,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useEffect, useState, useRef } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { addQueryArgs, safeDecodeURIComponent } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { external } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport PostScheduleLabel from '../post-schedule/label';\nimport { store as editorStore } from '../../store';\n\nconst POSTNAME = '%postname%';\nconst PAGENAME = '%pagename%';\n\n/**\n * Returns URL for a future post.\n *\n * @param {Object} post Post object.\n *\n * @return {string} PostPublish URL.\n */\n\nconst getFuturePostUrl = ( post ) => {\n\tconst { slug } = post;\n\n\tif ( post.permalink_template.includes( POSTNAME ) ) {\n\t\treturn post.permalink_template.replace( POSTNAME, slug );\n\t}\n\n\tif ( post.permalink_template.includes( PAGENAME ) ) {\n\t\treturn post.permalink_template.replace( PAGENAME, slug );\n\t}\n\n\treturn post.permalink_template;\n};\n\nfunction CopyButton( { text } ) {\n\tconst [ showCopyConfirmation, setShowCopyConfirmation ] = useState( false );\n\tconst timeoutIdRef = useRef();\n\tconst ref = useCopyToClipboard( text, () => {\n\t\tsetShowCopyConfirmation( true );\n\t\tif ( timeoutIdRef.current ) {\n\t\t\tclearTimeout( timeoutIdRef.current );\n\t\t}\n\t\ttimeoutIdRef.current = setTimeout( () => {\n\t\t\tsetShowCopyConfirmation( false );\n\t\t}, 4000 );\n\t} );\n\n\tuseEffect( () => {\n\t\treturn () => {\n\t\t\tif ( timeoutIdRef.current ) {\n\t\t\t\tclearTimeout( timeoutIdRef.current );\n\t\t\t}\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Button __next40pxDefaultSize variant=\"secondary\" ref={ ref }>\n\t\t\t{ showCopyConfirmation ? __( 'Copied!' ) : __( 'Copy' ) }\n\t\t</Button>\n\t);\n}\n\nexport default function PostPublishPanelPostpublish( {\n\tfocusOnMount,\n\tchildren,\n} ) {\n\tconst { post, postType, isScheduled } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEditedPostAttribute,\n\t\t\tgetCurrentPost,\n\t\t\tisCurrentPostScheduled,\n\t\t} = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\n\t\treturn {\n\t\t\tpost: getCurrentPost(),\n\t\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\t\tisScheduled: isCurrentPostScheduled(),\n\t\t};\n\t}, [] );\n\n\tconst postLabel = postType?.labels?.singular_name;\n\tconst viewPostLabel = postType?.labels?.view_item;\n\tconst addNewPostLabel = postType?.labels?.add_new_item;\n\tconst link =\n\t\tpost.status === 'future' ? getFuturePostUrl( post ) : post.link;\n\tconst addLink = addQueryArgs( 'post-new.php', {\n\t\tpost_type: post.type,\n\t} );\n\n\tconst postLinkRef = useCallback(\n\t\t( node ) => {\n\t\t\tif ( focusOnMount && node ) {\n\t\t\t\tnode.focus();\n\t\t\t}\n\t\t},\n\t\t[ focusOnMount ]\n\t);\n\n\tconst postPublishNonLinkHeader = isScheduled ? (\n\t\t<>\n\t\t\t{ __( 'is now scheduled. It will go live on' ) }{ ' ' }\n\t\t\t<PostScheduleLabel />.\n\t\t</>\n\t) : (\n\t\t__( 'is now live.' )\n\t);\n\n\treturn (\n\t\t<div className=\"post-publish-panel__postpublish\">\n\t\t\t<PanelBody className=\"post-publish-panel__postpublish-header\">\n\t\t\t\t<ExternalLink ref={ postLinkRef } href={ link }>\n\t\t\t\t\t{ decodeEntities( post.title ) || __( '(no title)' ) }\n\t\t\t\t</ExternalLink>{ ' ' }\n\t\t\t\t{ postPublishNonLinkHeader }\n\t\t\t</PanelBody>\n\t\t\t<PanelBody>\n\t\t\t\t<p className=\"post-publish-panel__postpublish-subheader\">\n\t\t\t\t\t<strong>{ __( 'What\u2019s next?' ) }</strong>\n\t\t\t\t</p>\n\t\t\t\t<div className=\"post-publish-panel__postpublish-post-address-container\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tclassName=\"post-publish-panel__postpublish-post-address\"\n\t\t\t\t\t\treadOnly\n\t\t\t\t\t\tlabel={ sprintf(\n\t\t\t\t\t\t\t/* translators: %s: post type singular name */\n\t\t\t\t\t\t\t__( '%s address' ),\n\t\t\t\t\t\t\tpostLabel\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tvalue={ safeDecodeURIComponent( link ) }\n\t\t\t\t\t\tonFocus={ ( event ) => event.target.select() }\n\t\t\t\t\t/>\n\n\t\t\t\t\t<div className=\"post-publish-panel__postpublish-post-address__copy-button-wrap\">\n\t\t\t\t\t\t<CopyButton text={ link } />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"post-publish-panel__postpublish-buttons\">\n\t\t\t\t\t{ ! isScheduled && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\thref={ link }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\ticonPosition=\"right\"\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ viewPostLabel }\n\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant={ isScheduled ? 'primary' : 'secondary' }\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\thref={ addLink }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ addNewPostLabel }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</PanelBody>\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__unstableGetAnimateClassName as getAnimateClassName,\n\tButton,\n} from '@wordpress/components';\nimport { usePrevious, useViewportMatch } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useEffect, useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Icon, check, cloud, cloudUpload } from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { STATUS_OPTIONS } from '../../components/post-status';\nimport { store as editorStore } from '../../store';\n\n/**\n * Component showing whether the post is saved or not and providing save\n * buttons.\n *\n * @param {Object} props Component props.\n * @param {?boolean} props.forceIsDirty Whether to force the post to be marked\n * as dirty.\n * @return {import('react').ComponentType} The component.\n */\nexport default function PostSavedState( { forceIsDirty } ) {\n\tconst [ forceSavedMessage, setForceSavedMessage ] = useState( false );\n\tconst isLargeViewport = useViewportMatch( 'small' );\n\n\tconst {\n\t\tisAutosaving,\n\t\tisDirty,\n\t\tisNew,\n\t\tisPublished,\n\t\tisSaveable,\n\t\tisSaving,\n\t\tisScheduled,\n\t\thasPublishAction,\n\t\tshowIconLabels,\n\t\tpostStatus,\n\t\tpostStatusHasChanged,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tisEditedPostNew,\n\t\t\t\tisCurrentPostPublished,\n\t\t\t\tisCurrentPostScheduled,\n\t\t\t\tisEditedPostDirty,\n\t\t\t\tisSavingPost,\n\t\t\t\tisEditedPostSaveable,\n\t\t\t\tgetCurrentPost,\n\t\t\t\tisAutosavingPost,\n\t\t\t\tgetEditedPostAttribute,\n\t\t\t\tgetPostEdits,\n\t\t\t} = select( editorStore );\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\treturn {\n\t\t\t\tisAutosaving: isAutosavingPost(),\n\t\t\t\tisDirty: forceIsDirty || isEditedPostDirty(),\n\t\t\t\tisNew: isEditedPostNew(),\n\t\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\t\tisSaving: isSavingPost(),\n\t\t\t\tisSaveable: isEditedPostSaveable(),\n\t\t\t\tisScheduled: isCurrentPostScheduled(),\n\t\t\t\thasPublishAction:\n\t\t\t\t\tgetCurrentPost()?._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\t\tpostStatus: getEditedPostAttribute( 'status' ),\n\t\t\t\tpostStatusHasChanged: !! getPostEdits()?.status,\n\t\t\t};\n\t\t},\n\t\t[ forceIsDirty ]\n\t);\n\tconst isPending = postStatus === 'pending';\n\tconst { savePost } = useDispatch( editorStore );\n\n\tconst wasSaving = usePrevious( isSaving );\n\n\tuseEffect( () => {\n\t\tlet timeoutId;\n\n\t\tif ( wasSaving && ! isSaving ) {\n\t\t\tsetForceSavedMessage( true );\n\t\t\ttimeoutId = setTimeout( () => {\n\t\t\t\tsetForceSavedMessage( false );\n\t\t\t}, 1000 );\n\t\t}\n\n\t\treturn () => clearTimeout( timeoutId );\n\t}, [ isSaving ] );\n\n\t// Once the post has been submitted for review this button\n\t// is not needed for the contributor role.\n\tif ( ! hasPublishAction && isPending ) {\n\t\treturn null;\n\t}\n\n\t// We shouldn't render the button if the post has not one of the following statuses: pending, draft, auto-draft.\n\t// The reason for this is that this button handles the `save as pending` and `save draft` actions.\n\t// An exception for this is when the post has a custom status and there should be a way to save changes without\n\t// having to publish. This should be handled better in the future when custom statuses have better support.\n\t// @see https://github.com/WordPress/gutenberg/issues/3144.\n\tconst isIneligibleStatus =\n\t\t! [ 'pending', 'draft', 'auto-draft' ].includes( postStatus ) &&\n\t\tSTATUS_OPTIONS.map( ( { value } ) => value ).includes( postStatus );\n\n\tif (\n\t\tisPublished ||\n\t\tisScheduled ||\n\t\tisIneligibleStatus ||\n\t\t( postStatusHasChanged &&\n\t\t\t[ 'pending', 'draft' ].includes( postStatus ) )\n\t) {\n\t\treturn null;\n\t}\n\n\t/* translators: button label text should, if possible, be under 16 characters. */\n\tconst label = isPending ? __( 'Save as pending' ) : __( 'Save draft' );\n\n\t/* translators: button label text should, if possible, be under 16 characters. */\n\tconst shortLabel = __( 'Save' );\n\n\tconst isSaved = forceSavedMessage || ( ! isNew && ! isDirty );\n\tconst isSavedState = isSaving || isSaved;\n\tconst isDisabled = isSaving || isSaved || ! isSaveable;\n\tlet text;\n\n\tif ( isSaving ) {\n\t\ttext = isAutosaving ? __( 'Autosaving' ) : __( 'Saving' );\n\t} else if ( isSaved ) {\n\t\ttext = __( 'Saved' );\n\t} else if ( isLargeViewport ) {\n\t\ttext = label;\n\t} else if ( showIconLabels ) {\n\t\ttext = shortLabel;\n\t}\n\n\t// Use common Button instance for all saved states so that focus is not\n\t// lost.\n\treturn (\n\t\t<Button\n\t\t\tclassName={\n\t\t\t\tisSaveable || isSaving\n\t\t\t\t\t? clsx( {\n\t\t\t\t\t\t\t'editor-post-save-draft': ! isSavedState,\n\t\t\t\t\t\t\t'editor-post-saved-state': isSavedState,\n\t\t\t\t\t\t\t'is-saving': isSaving,\n\t\t\t\t\t\t\t'is-autosaving': isAutosaving,\n\t\t\t\t\t\t\t'is-saved': isSaved,\n\t\t\t\t\t\t\t[ getAnimateClassName( {\n\t\t\t\t\t\t\t\ttype: 'loading',\n\t\t\t\t\t\t\t} ) ]: isSaving,\n\t\t\t\t\t } )\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\tonClick={ isDisabled ? undefined : () => savePost() }\n\t\t\t/*\n\t\t\t * We want the tooltip to show the keyboard shortcut only when the\n\t\t\t * button does something, i.e. when it's not disabled.\n\t\t\t */\n\t\t\tshortcut={ isDisabled ? undefined : displayShortcut.primary( 's' ) }\n\t\t\tvariant=\"tertiary\"\n\t\t\tsize=\"compact\"\n\t\t\ticon={ isLargeViewport ? undefined : cloudUpload }\n\t\t\tlabel={ text || label }\n\t\t\taria-disabled={ isDisabled }\n\t\t>\n\t\t\t{ isSavedState && <Icon icon={ isSaved ? check : cloud } /> }\n\t\t\t{ text }\n\t\t</Button>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tCheckboxControl,\n\tDropdown,\n\t__experimentalVStack as VStack,\n\tTextControl,\n\tRadioControl,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useState, useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\nimport { useInstanceId } from '@wordpress/compose';\nimport {\n\tdrafts,\n\tpublished,\n\tscheduled,\n\tpending,\n\tnotAllowed,\n} from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { DESIGN_POST_TYPES } from '../../store/constants';\nimport PostPanelRow from '../post-panel-row';\nimport PostSticky from '../post-sticky';\nimport { PrivatePostSchedule } from '../post-schedule';\nimport { store as editorStore } from '../../store';\n\nconst postStatusesInfo = {\n\t'auto-draft': { label: __( 'Draft' ), icon: drafts },\n\tdraft: { label: __( 'Draft' ), icon: drafts },\n\tpending: { label: __( 'Pending' ), icon: pending },\n\tprivate: { label: __( 'Private' ), icon: notAllowed },\n\tfuture: { label: __( 'Scheduled' ), icon: scheduled },\n\tpublish: { label: __( 'Published' ), icon: published },\n};\n\nexport const STATUS_OPTIONS = [\n\t{\n\t\tlabel: __( 'Draft' ),\n\t\tvalue: 'draft',\n\t\tdescription: __( 'Not ready to publish.' ),\n\t},\n\t{\n\t\tlabel: __( 'Pending' ),\n\t\tvalue: 'pending',\n\t\tdescription: __( 'Waiting for review before publishing.' ),\n\t},\n\t{\n\t\tlabel: __( 'Private' ),\n\t\tvalue: 'private',\n\t\tdescription: __( 'Only visible to site admins and editors.' ),\n\t},\n\t{\n\t\tlabel: __( 'Scheduled' ),\n\t\tvalue: 'future',\n\t\tdescription: __( 'Publish automatically on a chosen date.' ),\n\t},\n\t{\n\t\tlabel: __( 'Published' ),\n\t\tvalue: 'publish',\n\t\tdescription: __( 'Visible to everyone.' ),\n\t},\n];\n\nexport default function PostStatus() {\n\tconst { status, date, password, postId, postType, canEdit } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEditedPostAttribute,\n\t\t\t\tgetCurrentPostId,\n\t\t\t\tgetCurrentPostType,\n\t\t\t\tgetCurrentPost,\n\t\t\t} = select( editorStore );\n\t\t\treturn {\n\t\t\t\tstatus: getEditedPostAttribute( 'status' ),\n\t\t\t\tdate: getEditedPostAttribute( 'date' ),\n\t\t\t\tpassword: getEditedPostAttribute( 'password' ),\n\t\t\t\tpostId: getCurrentPostId(),\n\t\t\t\tpostType: getCurrentPostType(),\n\t\t\t\tcanEdit:\n\t\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst [ showPassword, setShowPassword ] = useState( !! password );\n\tconst passwordInputId = useInstanceId(\n\t\tPostStatus,\n\t\t'editor-change-status__password-input'\n\t);\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\t'aria-label': __( 'Status & visibility' ),\n\t\t\theaderTitle: __( 'Status & visibility' ),\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tif ( DESIGN_POST_TYPES.includes( postType ) ) {\n\t\treturn null;\n\t}\n\n\tconst updatePost = ( {\n\t\tstatus: newStatus = status,\n\t\tpassword: newPassword = password,\n\t\tdate: newDate = date,\n\t} ) => {\n\t\teditEntityRecord( 'postType', postType, postId, {\n\t\t\tstatus: newStatus,\n\t\t\tdate: newDate,\n\t\t\tpassword: newPassword,\n\t\t} );\n\t};\n\n\tconst handleTogglePassword = ( value ) => {\n\t\tsetShowPassword( value );\n\t\tif ( ! value ) {\n\t\t\tupdatePost( { password: '' } );\n\t\t}\n\t};\n\n\tconst handleStatus = ( value ) => {\n\t\tlet newDate = date;\n\t\tlet newPassword = password;\n\t\tif ( status === 'future' && new Date( date ) > new Date() ) {\n\t\t\tnewDate = null;\n\t\t}\n\t\tif ( value === 'private' && password ) {\n\t\t\tnewPassword = '';\n\t\t}\n\t\tupdatePost( {\n\t\t\tstatus: value,\n\t\t\tdate: newDate,\n\t\t\tpassword: newPassword,\n\t\t} );\n\t};\n\n\treturn (\n\t\t<PostPanelRow label={ __( 'Status' ) } ref={ setPopoverAnchor }>\n\t\t\t{ canEdit ? (\n\t\t\t\t<Dropdown\n\t\t\t\t\tclassName=\"editor-post-status\"\n\t\t\t\t\tcontentClassName=\"editor-change-status__content\"\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\trenderToggle={ ( { onToggle, isOpen } ) => (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"editor-post-status__toggle\"\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\ticon={ postStatusesInfo[ status ]?.icon }\n\t\t\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Current post status.\n\t\t\t\t\t\t\t\t__( 'Change status: %s' ),\n\t\t\t\t\t\t\t\tpostStatusesInfo[ status ]?.label\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ postStatusesInfo[ status ]?.label }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\t\ttitle={ __( 'Status & visibility' ) }\n\t\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t\t\t\t\t<RadioControl\n\t\t\t\t\t\t\t\t\t\tclassName=\"editor-change-status__options\"\n\t\t\t\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Status' ) }\n\t\t\t\t\t\t\t\t\t\toptions={ STATUS_OPTIONS }\n\t\t\t\t\t\t\t\t\t\tonChange={ handleStatus }\n\t\t\t\t\t\t\t\t\t\tselected={\n\t\t\t\t\t\t\t\t\t\t\tstatus === 'auto-draft'\n\t\t\t\t\t\t\t\t\t\t\t\t? 'draft'\n\t\t\t\t\t\t\t\t\t\t\t\t: status\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t{ status === 'future' && (\n\t\t\t\t\t\t\t\t\t\t<div className=\"editor-change-status__publish-date-wrapper\">\n\t\t\t\t\t\t\t\t\t\t\t<PrivatePostSchedule\n\t\t\t\t\t\t\t\t\t\t\t\tshowPopoverHeaderActions={\n\t\t\t\t\t\t\t\t\t\t\t\t\tfalse\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tisCompact\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ status !== 'private' && (\n\t\t\t\t\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\t\t\t\t\tas=\"fieldset\"\n\t\t\t\t\t\t\t\t\t\t\tspacing={ 4 }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"editor-change-status__password-fieldset\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Password protected'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Only visible to those who know the password.'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\tchecked={ showPassword }\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={\n\t\t\t\t\t\t\t\t\t\t\t\t\thandleTogglePassword\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t{ showPassword && (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"editor-change-status__password-input\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Password'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupdatePost( {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpassword: value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={ password }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Use a secure password'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tid={ passwordInputId }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaxLength={ 255 }\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t<PostSticky />\n\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<div className=\"editor-post-status is-read-only\">\n\t\t\t\t\t{ postStatusesInfo[ status ]?.label }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</PostPanelRow>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { CheckboxControl } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostStickyCheck from './check';\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the PostSticky component. It provides a checkbox control for the sticky post feature.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PostSticky() {\n\tconst postSticky = useSelect( ( select ) => {\n\t\treturn (\n\t\t\tselect( editorStore ).getEditedPostAttribute( 'sticky' ) ?? false\n\t\t);\n\t}, [] );\n\tconst { editPost } = useDispatch( editorStore );\n\n\treturn (\n\t\t<PostStickyCheck>\n\t\t\t<CheckboxControl\n\t\t\t\tclassName=\"editor-post-sticky__checkbox-control\"\n\t\t\t\tlabel={ __( 'Sticky' ) }\n\t\t\t\thelp={ __( 'Pin this post to the top of the blog.' ) }\n\t\t\t\tchecked={ postSticky }\n\t\t\t\tonChange={ () => editPost( { sticky: ! postSticky } ) }\n\t\t\t/>\n\t\t</PostStickyCheck>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Wrapper component that renders its children only if post has a sticky action.\n *\n * @param {Object} props Props.\n * @param {React.ReactNode} props.children Children to be rendered.\n *\n * @return {React.ReactNode} The component to be rendered or null if post type is not 'post' or hasStickyAction is false.\n */\nexport default function PostStickyCheck( { children } ) {\n\tconst { hasStickyAction, postType } = useSelect( ( select ) => {\n\t\tconst post = select( editorStore ).getCurrentPost();\n\t\treturn {\n\t\t\thasStickyAction: post._links?.[ 'wp:action-sticky' ] ?? false,\n\t\t\tpostType: select( editorStore ).getCurrentPostType(),\n\t\t};\n\t}, [] );\n\n\tif ( postType !== 'post' || ! hasStickyAction ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Wrapper component that renders its children only if post has a publish action.\n *\n * @param {Object} props Props.\n * @param {React.ReactNode} props.children Children to be rendered.\n *\n * @return {React.ReactNode} - The component to be rendered or null if there is no publish action.\n */\nexport default function PostScheduleCheck( { children } ) {\n\tconst hasPublishAction = useSelect( ( select ) => {\n\t\treturn (\n\t\t\tselect( editorStore ).getCurrentPost()._links?.[\n\t\t\t\t'wp:action-publish'\n\t\t\t] ?? false\n\t\t);\n\t}, [] );\n\n\tif ( ! hasPublishAction ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n", "/**\n * WordPress dependencies\n */\nimport { Button, Dropdown } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useState, useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostScheduleCheck from './check';\nimport PostScheduleForm from './index';\nimport { usePostScheduleLabel } from './label';\nimport PostPanelRow from '../post-panel-row';\nimport { store as editorStore } from '../../store';\nimport { DESIGN_POST_TYPES } from '../../store/constants';\n\n/**\n * Renders the Post Schedule Panel component.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PostSchedulePanel() {\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\tconst postType = useSelect(\n\t\t( select ) => select( editorStore ).getCurrentPostType(),\n\t\t[]\n\t);\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\t'aria-label': __( 'Change publish date' ),\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tconst label = usePostScheduleLabel();\n\tconst fullLabel = usePostScheduleLabel( { full: true } );\n\tif ( DESIGN_POST_TYPES.includes( postType ) ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostScheduleCheck>\n\t\t\t<PostPanelRow label={ __( 'Publish' ) } ref={ setPopoverAnchor }>\n\t\t\t\t<Dropdown\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\tclassName=\"editor-post-schedule__panel-dropdown\"\n\t\t\t\t\tcontentClassName=\"editor-post-schedule__dialog\"\n\t\t\t\t\trenderToggle={ ( { onToggle, isOpen } ) => (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\tclassName=\"editor-post-schedule__dialog-toggle\"\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\ttooltipPosition=\"middle left\"\n\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Current post date.\n\t\t\t\t\t\t\t\t__( 'Change date: %s' ),\n\t\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tlabel={ fullLabel }\n\t\t\t\t\t\t\tshowTooltip={ label !== fullLabel }\n\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t<PostScheduleForm onClose={ onClose } />\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PostPanelRow>\n\t\t</PostScheduleCheck>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\t__experimentalConfirmDialog as ConfirmDialog,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders a button component that allows the user to switch a post to draft status.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PostSwitchToDraftButton() {\n\tdeprecated( 'wp.editor.PostSwitchToDraftButton', {\n\t\tsince: '6.7',\n\t\tversion: '6.9',\n\t} );\n\tconst [ showConfirmDialog, setShowConfirmDialog ] = useState( false );\n\n\tconst { editPost, savePost } = useDispatch( editorStore );\n\tconst { isSaving, isPublished, isScheduled } = useSelect( ( select ) => {\n\t\tconst { isSavingPost, isCurrentPostPublished, isCurrentPostScheduled } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tisSaving: isSavingPost(),\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\tisScheduled: isCurrentPostScheduled(),\n\t\t};\n\t}, [] );\n\n\tconst isDisabled = isSaving || ( ! isPublished && ! isScheduled );\n\n\tlet alertMessage;\n\tlet confirmButtonText;\n\tif ( isPublished ) {\n\t\talertMessage = __( 'Are you sure you want to unpublish this post?' );\n\t\tconfirmButtonText = __( 'Unpublish' );\n\t} else if ( isScheduled ) {\n\t\talertMessage = __( 'Are you sure you want to unschedule this post?' );\n\t\tconfirmButtonText = __( 'Unschedule' );\n\t}\n\n\tconst handleConfirm = () => {\n\t\tsetShowConfirmDialog( false );\n\t\teditPost( { status: 'draft' } );\n\t\tsavePost();\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tclassName=\"editor-post-switch-to-draft\"\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tif ( ! isDisabled ) {\n\t\t\t\t\t\tsetShowConfirmDialog( true );\n\t\t\t\t\t}\n\t\t\t\t} }\n\t\t\t\taria-disabled={ isDisabled }\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tstyle={ { flexGrow: '1', justifyContent: 'center' } }\n\t\t\t>\n\t\t\t\t{ __( 'Switch to draft' ) }\n\t\t\t</Button>\n\t\t\t<ConfirmDialog\n\t\t\t\tisOpen={ showConfirmDialog }\n\t\t\t\tonConfirm={ handleConfirm }\n\t\t\t\tonCancel={ () => setShowConfirmDialog( false ) }\n\t\t\t\tconfirmButtonText={ confirmButtonText }\n\t\t\t>\n\t\t\t\t{ alertMessage }\n\t\t\t</ConfirmDialog>\n\t\t</>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport PostPanelRow from '../post-panel-row';\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the sync status of a post.\n *\n * @return {React.ReactNode} The rendered sync status component.\n */\nexport default function PostSyncStatus() {\n\tconst { syncStatus, postType } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst meta = getEditedPostAttribute( 'meta' );\n\n\t\t// When the post is first created, the top level wp_pattern_sync_status is not set so get meta value instead.\n\t\tconst currentSyncStatus =\n\t\t\tmeta?.wp_pattern_sync_status === 'unsynced'\n\t\t\t\t? 'unsynced'\n\t\t\t\t: getEditedPostAttribute( 'wp_pattern_sync_status' );\n\n\t\treturn {\n\t\t\tsyncStatus: currentSyncStatus,\n\t\t\tpostType: getEditedPostAttribute( 'type' ),\n\t\t};\n\t} );\n\n\tif ( postType !== 'wp_block' ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostPanelRow label={ __( 'Sync status' ) }>\n\t\t\t<div className=\"editor-post-sync-status__value\">\n\t\t\t\t{ syncStatus === 'unsynced'\n\t\t\t\t\t? _x( 'Not synced', 'pattern (singular)' )\n\t\t\t\t\t: _x( 'Synced', 'pattern (singular)' ) }\n\t\t\t</div>\n\t\t</PostPanelRow>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport HierarchicalTermSelector from './hierarchical-term-selector';\nimport FlatTermSelector from './flat-term-selector';\nimport { store as editorStore } from '../../store';\n\nconst identity = ( x ) => x;\n\nexport function PostTaxonomies( { taxonomyWrapper = identity } ) {\n\tconst { postType, taxonomies } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tpostType: select( editorStore ).getCurrentPostType(),\n\t\t\ttaxonomies: select( coreStore ).getEntityRecords(\n\t\t\t\t'root',\n\t\t\t\t'taxonomy',\n\t\t\t\t{ per_page: -1 }\n\t\t\t),\n\t\t};\n\t}, [] );\n\tconst visibleTaxonomies = ( taxonomies ?? [] ).filter(\n\t\t( taxonomy ) =>\n\t\t\t// In some circumstances .visibility can end up as undefined so optional chaining operator required.\n\t\t\t// https://github.com/WordPress/gutenberg/issues/40326\n\t\t\ttaxonomy.types.includes( postType ) && taxonomy.visibility?.show_ui\n\t);\n\n\treturn visibleTaxonomies.map( ( taxonomy ) => {\n\t\tconst TaxonomyComponent = taxonomy.hierarchical\n\t\t\t? HierarchicalTermSelector\n\t\t\t: FlatTermSelector;\n\n\t\treturn (\n\t\t\t<Fragment key={ `taxonomy-${ taxonomy.slug }` }>\n\t\t\t\t{ taxonomyWrapper(\n\t\t\t\t\t<TaxonomyComponent slug={ taxonomy.slug } />,\n\t\t\t\t\ttaxonomy\n\t\t\t\t) }\n\t\t\t</Fragment>\n\t\t);\n\t} );\n}\n\n/**\n * Renders the taxonomies associated with a post.\n *\n * @param {Object} props The component props.\n * @param {Function} props.taxonomyWrapper The wrapper function for each taxonomy component.\n *\n * @return {Array} An array of JSX elements representing the visible taxonomies.\n */\nexport default PostTaxonomies;\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the children components only if the current post type has taxonomies.\n *\n * @param {Object} props The component props.\n * @param {React.ReactNode} props.children The children components to render.\n *\n * @return {React.ReactNode} The rendered children components or null if the current post type has no taxonomies.\n */\nexport default function PostTaxonomiesCheck( { children } ) {\n\tconst hasTaxonomies = useSelect( ( select ) => {\n\t\tconst postType = select( editorStore ).getCurrentPostType();\n\t\tconst taxonomies = select( coreStore ).getEntityRecords(\n\t\t\t'root',\n\t\t\t'taxonomy',\n\t\t\t{ per_page: -1 }\n\t\t);\n\t\treturn taxonomies?.some( ( taxonomy ) =>\n\t\t\ttaxonomy.types.includes( postType )\n\t\t);\n\t}, [] );\n\tif ( ! hasTaxonomies ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n", "/**\n * WordPress dependencies\n */\nimport { PanelBody } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport PostTaxonomiesForm from './index';\nimport PostTaxonomiesCheck from './check';\n\n/**\n * Renders a panel for a specific taxonomy.\n *\n * @param {Object} props The component props.\n * @param {Object} props.taxonomy The taxonomy object.\n * @param {React.ReactNode} props.children The child components.\n *\n * @return {React.ReactNode} The rendered taxonomy panel.\n */\nfunction TaxonomyPanel( { taxonomy, children } ) {\n\tconst slug = taxonomy?.slug;\n\tconst panelName = slug ? `taxonomy-panel-${ slug }` : '';\n\tconst { isEnabled, isOpened } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isEditorPanelEnabled, isEditorPanelOpened } =\n\t\t\t\tselect( editorStore );\n\t\t\treturn {\n\t\t\t\tisEnabled: slug ? isEditorPanelEnabled( panelName ) : false,\n\t\t\t\tisOpened: slug ? isEditorPanelOpened( panelName ) : false,\n\t\t\t};\n\t\t},\n\t\t[ panelName, slug ]\n\t);\n\tconst { toggleEditorPanelOpened } = useDispatch( editorStore );\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\tconst taxonomyMenuName = taxonomy?.labels?.menu_name;\n\tif ( ! taxonomyMenuName ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody\n\t\t\ttitle={ taxonomyMenuName }\n\t\t\topened={ isOpened }\n\t\t\tonToggle={ () => toggleEditorPanelOpened( panelName ) }\n\t\t>\n\t\t\t{ children }\n\t\t</PanelBody>\n\t);\n}\n\n/**\n * Component that renders the post taxonomies panel.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PostTaxonomies() {\n\treturn (\n\t\t<PostTaxonomiesCheck>\n\t\t\t<PostTaxonomiesForm\n\t\t\t\ttaxonomyWrapper={ ( content, taxonomy ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<TaxonomyPanel taxonomy={ taxonomy }>\n\t\t\t\t\t\t\t{ content }\n\t\t\t\t\t\t</TaxonomyPanel>\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t/>\n\t\t</PostTaxonomiesCheck>\n\t);\n}\n", "/**\n * External dependencies\n */\nimport Textarea from 'react-autosize-textarea';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useMemo } from '@wordpress/element';\nimport { __unstableSerializeAndClean } from '@wordpress/blocks';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useInstanceId } from '@wordpress/compose';\nimport { VisuallyHidden } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Displays the Post Text Editor along with content in Visual and Text mode.\n *\n * @return {React.ReactNode} The rendered PostTextEditor component.\n */\nexport default function PostTextEditor() {\n\tconst instanceId = useInstanceId( PostTextEditor );\n\tconst { content, blocks, type, id } = useSelect( ( select ) => {\n\t\tconst { getEditedEntityRecord } = select( coreStore );\n\t\tconst { getCurrentPostType, getCurrentPostId } = select( editorStore );\n\t\tconst _type = getCurrentPostType();\n\t\tconst _id = getCurrentPostId();\n\t\tconst editedRecord = getEditedEntityRecord( 'postType', _type, _id );\n\n\t\treturn {\n\t\t\tcontent: editedRecord?.content,\n\t\t\tblocks: editedRecord?.blocks,\n\t\t\ttype: _type,\n\t\t\tid: _id,\n\t\t};\n\t}, [] );\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\t// Replicates the logic found in getEditedPostContent().\n\tconst value = useMemo( () => {\n\t\tif ( content instanceof Function ) {\n\t\t\treturn content( { blocks } );\n\t\t} else if ( blocks ) {\n\t\t\t// If we have parsed blocks already, they should be our source of truth.\n\t\t\t// Parsing applies block deprecations and legacy block conversions that\n\t\t\t// unparsed content will not have.\n\t\t\treturn __unstableSerializeAndClean( blocks );\n\t\t}\n\t\treturn content;\n\t}, [ content, blocks ] );\n\n\treturn (\n\t\t<>\n\t\t\t<VisuallyHidden\n\t\t\t\tas=\"label\"\n\t\t\t\thtmlFor={ `post-content-${ instanceId }` }\n\t\t\t>\n\t\t\t\t{ __( 'Type text or HTML' ) }\n\t\t\t</VisuallyHidden>\n\t\t\t<Textarea\n\t\t\t\tautoComplete=\"off\"\n\t\t\t\tdir=\"auto\"\n\t\t\t\tvalue={ value }\n\t\t\t\tonChange={ ( event ) => {\n\t\t\t\t\teditEntityRecord( 'postType', type, id, {\n\t\t\t\t\t\tcontent: event.target.value,\n\t\t\t\t\t\tblocks: undefined,\n\t\t\t\t\t\tselection: undefined,\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t\tclassName=\"editor-post-text-editor\"\n\t\t\t\tid={ `post-content-${ instanceId }` }\n\t\t\t\tplaceholder={ __( 'Start writing with text or HTML' ) }\n\t\t\t/>\n\t\t</>\n\t);\n}\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { forwardRef, useState } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { ENTER } from '@wordpress/keycodes';\nimport { pasteHandler } from '@wordpress/blocks';\nimport {\n\t__unstableUseRichText as useRichText,\n\tcreate,\n\tinsert,\n} from '@wordpress/rich-text';\nimport { useMergeRefs } from '@wordpress/compose';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport { DEFAULT_CLASSNAMES, REGEXP_NEWLINES } from './constants';\nimport usePostTitleFocus from './use-post-title-focus';\nimport usePostTitle from './use-post-title';\nimport PostTypeSupportCheck from '../post-type-support-check';\n\nimport { unlock } from '../../lock-unlock';\n\nconst PostTitle = forwardRef( ( _, forwardedRef ) => {\n\tconst { placeholder, isEditingContentOnlySection } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSettings, getEditedContentOnlySection } = unlock(\n\t\t\t\tselect( blockEditorStore )\n\t\t\t);\n\t\t\tconst { titlePlaceholder } = getSettings();\n\n\t\t\treturn {\n\t\t\t\tplaceholder: titlePlaceholder,\n\t\t\t\tisEditingContentOnlySection: !! getEditedContentOnlySection(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst [ isSelected, setIsSelected ] = useState( false );\n\n\tconst { ref: focusRef } = usePostTitleFocus( forwardedRef );\n\n\tconst { title, setTitle: onUpdate } = usePostTitle();\n\n\tconst [ selection, setSelection ] = useState( {} );\n\n\tconst { clearSelectedBlock, insertBlocks, insertDefaultBlock } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst decodedPlaceholder =\n\t\tdecodeEntities( placeholder ) || __( 'Add title' );\n\n\tconst {\n\t\tvalue,\n\t\tonChange,\n\t\tref: richTextRef,\n\t} = useRichText( {\n\t\tvalue: title,\n\t\tonChange( newValue ) {\n\t\t\tonUpdate( newValue.replace( REGEXP_NEWLINES, ' ' ) );\n\t\t},\n\t\tplaceholder: decodedPlaceholder,\n\t\tselectionStart: selection.start,\n\t\tselectionEnd: selection.end,\n\t\tonSelectionChange( newStart, newEnd ) {\n\t\t\tsetSelection( ( sel ) => {\n\t\t\t\tconst { start, end } = sel;\n\t\t\t\tif ( start === newStart && end === newEnd ) {\n\t\t\t\t\treturn sel;\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tstart: newStart,\n\t\t\t\t\tend: newEnd,\n\t\t\t\t};\n\t\t\t} );\n\t\t},\n\t\t__unstableDisableFormats: false,\n\t} );\n\n\tfunction onInsertBlockAfter( blocks ) {\n\t\tinsertBlocks( blocks, 0 );\n\t}\n\n\tfunction onSelect() {\n\t\tsetIsSelected( true );\n\t\tclearSelectedBlock();\n\t}\n\n\tfunction onUnselect() {\n\t\tsetIsSelected( false );\n\t\tsetSelection( {} );\n\t}\n\n\tfunction onEnterPress() {\n\t\tinsertDefaultBlock( undefined, undefined, 0 );\n\t}\n\n\tfunction onKeyDown( event ) {\n\t\tif ( event.keyCode === ENTER ) {\n\t\t\tevent.preventDefault();\n\t\t\tonEnterPress();\n\t\t}\n\t}\n\n\tfunction onPaste( event ) {\n\t\tconst clipboardData = event.clipboardData;\n\n\t\tlet plainText = '';\n\t\tlet html = '';\n\n\t\ttry {\n\t\t\tplainText = clipboardData.getData( 'text/plain' );\n\t\t\thtml = clipboardData.getData( 'text/html' );\n\t\t} catch ( error ) {\n\t\t\t// Some browsers like UC Browser paste plain text by default and\n\t\t\t// don't support clipboardData at all, so allow default\n\t\t\t// behaviour.\n\t\t\treturn;\n\t\t}\n\n\t\t// Allows us to ask for this information when we get a report.\n\t\twindow.console.log( 'Received HTML:\\n\\n', html );\n\t\twindow.console.log( 'Received plain text:\\n\\n', plainText );\n\n\t\tconst content = pasteHandler( {\n\t\t\tHTML: html,\n\t\t\tplainText,\n\t\t} );\n\n\t\tevent.preventDefault();\n\n\t\tif ( ! content.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( typeof content !== 'string' ) {\n\t\t\tconst [ firstBlock ] = content;\n\n\t\t\tif (\n\t\t\t\t! title &&\n\t\t\t\t( firstBlock.name === 'core/heading' ||\n\t\t\t\t\tfirstBlock.name === 'core/paragraph' )\n\t\t\t) {\n\t\t\t\t// Strip HTML to avoid unwanted HTML being added to the title.\n\t\t\t\t// In the majority of cases it is assumed that HTML in the title\n\t\t\t\t// is undesirable.\n\t\t\t\tconst contentNoHTML = stripHTML(\n\t\t\t\t\tfirstBlock.attributes.content\n\t\t\t\t);\n\t\t\t\tonUpdate( contentNoHTML );\n\t\t\t\tonInsertBlockAfter( content.slice( 1 ) );\n\t\t\t} else {\n\t\t\t\tonInsertBlockAfter( content );\n\t\t\t}\n\t\t} else {\n\t\t\t// Strip HTML to avoid unwanted HTML being added to the title.\n\t\t\t// In the majority of cases it is assumed that HTML in the title\n\t\t\t// is undesirable.\n\t\t\tconst contentNoHTML = stripHTML( content );\n\t\t\tonChange( insert( value, create( { html: contentNoHTML } ) ) );\n\t\t}\n\t}\n\n\t// The wp-block className is important for editor styles.\n\t// This same block is used in both the visual and the code editor.\n\tconst className = clsx( DEFAULT_CLASSNAMES, {\n\t\t'is-selected': isSelected,\n\t} );\n\n\t// Because the title is within the editor iframe, we can't use scss styles.\n\t// Instead use an inline style to dim the block when it's disabled.\n\tconst style = isEditingContentOnlySection ? { opacity: 0.2 } : undefined;\n\n\treturn (\n\t\t/* eslint-disable jsx-a11y/heading-has-content, jsx-a11y/no-noninteractive-element-to-interactive-role */\n\t\t<h1\n\t\t\tref={ useMergeRefs( [ richTextRef, focusRef ] ) }\n\t\t\tcontentEditable={ ! isEditingContentOnlySection }\n\t\t\tclassName={ className }\n\t\t\taria-label={ decodedPlaceholder }\n\t\t\trole=\"textbox\"\n\t\t\taria-multiline=\"true\"\n\t\t\tonFocus={ onSelect }\n\t\t\tonBlur={ onUnselect }\n\t\t\tonKeyDown={ onKeyDown }\n\t\t\tonPaste={ onPaste }\n\t\t\tstyle={ style }\n\t\t/>\n\t\t/* eslint-enable jsx-a11y/heading-has-content, jsx-a11y/no-noninteractive-element-to-interactive-role */\n\t);\n} );\n\n/**\n * Renders the `PostTitle` component.\n *\n * @param {Object} _ Unused parameter.\n * @param {Element} forwardedRef Forwarded ref for the component.\n *\n * @return {React.ReactNode} The rendered PostTitle component.\n */\nexport default forwardRef( ( _, forwardedRef ) => (\n\t<PostTypeSupportCheck supportKeys=\"title\">\n\t\t<PostTitle ref={ forwardedRef } />\n\t</PostTypeSupportCheck>\n) );\n", "export const DEFAULT_CLASSNAMES =\n\t'wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text';\n\nexport const REGEXP_NEWLINES = /[\\r\\n]+/g;\n", "/**\n * WordPress dependencies\n */\nimport { useEffect, useImperativeHandle, useRef } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Custom hook that manages the focus behavior of the post title input field.\n *\n * @param {Element} forwardedRef - The forwarded ref for the input field.\n *\n * @return {Object} - The ref object.\n */\nexport default function usePostTitleFocus( forwardedRef ) {\n\tconst ref = useRef();\n\n\tconst { isCleanNewPost } = useSelect( ( select ) => {\n\t\tconst { isCleanNewPost: _isCleanNewPost } = select( editorStore );\n\n\t\treturn {\n\t\t\tisCleanNewPost: _isCleanNewPost(),\n\t\t};\n\t}, [] );\n\n\tuseImperativeHandle( forwardedRef, () => ( {\n\t\tfocus: () => {\n\t\t\tref?.current?.focus();\n\t\t},\n\t} ) );\n\n\tuseEffect( () => {\n\t\tif ( ! ref.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { defaultView } = ref.current.ownerDocument;\n\t\tconst { name, parent } = defaultView;\n\t\tconst ownerDocument =\n\t\t\tname === 'editor-canvas' ? parent.document : defaultView.document;\n\t\tconst { activeElement, body } = ownerDocument;\n\n\t\t// Only autofocus the title when the post is entirely empty. This should\n\t\t// only happen for a new post, which means we focus the title on new\n\t\t// post so the author can start typing right away, without needing to\n\t\t// click anything.\n\t\tif ( isCleanNewPost && ( ! activeElement || body === activeElement ) ) {\n\t\t\tref.current.focus();\n\t\t}\n\t}, [ isCleanNewPost ] );\n\n\treturn { ref };\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Custom hook for managing the post title in the editor.\n *\n * @return {Object} An object containing the current title and a function to update the title.\n */\nexport default function usePostTitle() {\n\tconst { editPost } = useDispatch( editorStore );\n\tconst { title } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\n\t\treturn {\n\t\t\ttitle: getEditedPostAttribute( 'title' ),\n\t\t};\n\t}, [] );\n\n\tfunction updateTitle( newTitle ) {\n\t\teditPost( { title: newTitle } );\n\t}\n\n\treturn { title, setTitle: updateTitle };\n}\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { TextareaControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useState, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { DEFAULT_CLASSNAMES, REGEXP_NEWLINES } from './constants';\nimport usePostTitleFocus from './use-post-title-focus';\nimport usePostTitle from './use-post-title';\n\n/**\n * Renders a raw post title input field.\n *\n * @param {Object} _ Unused parameter.\n * @param {Element} forwardedRef Reference to the component's DOM node.\n *\n * @return {React.ReactNode} The rendered component.\n */\nfunction PostTitleRaw( _, forwardedRef ) {\n\tconst { placeholder } = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst { titlePlaceholder } = getSettings();\n\n\t\treturn {\n\t\t\tplaceholder: titlePlaceholder,\n\t\t};\n\t}, [] );\n\n\tconst [ isSelected, setIsSelected ] = useState( false );\n\n\tconst { title, setTitle: onUpdate } = usePostTitle();\n\tconst { ref: focusRef } = usePostTitleFocus( forwardedRef );\n\n\tfunction onChange( value ) {\n\t\tonUpdate( value.replace( REGEXP_NEWLINES, ' ' ) );\n\t}\n\n\tfunction onSelect() {\n\t\tsetIsSelected( true );\n\t}\n\n\tfunction onUnselect() {\n\t\tsetIsSelected( false );\n\t}\n\n\t// The wp-block className is important for editor styles.\n\t// This same block is used in both the visual and the code editor.\n\tconst className = clsx( DEFAULT_CLASSNAMES, {\n\t\t'is-selected': isSelected,\n\t\t'is-raw-text': true,\n\t} );\n\n\tconst decodedPlaceholder =\n\t\tdecodeEntities( placeholder ) || __( 'Add title' );\n\n\treturn (\n\t\t<TextareaControl\n\t\t\tref={ focusRef }\n\t\t\tvalue={ title }\n\t\t\tonChange={ onChange }\n\t\t\tonFocus={ onSelect }\n\t\t\tonBlur={ onUnselect }\n\t\t\tlabel={ placeholder }\n\t\t\tclassName={ className }\n\t\t\tplaceholder={ decodedPlaceholder }\n\t\t\thideLabelFromVision\n\t\t\tautoComplete=\"off\"\n\t\t\tdir=\"auto\"\n\t\t\trows={ 1 }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( PostTitleRaw );\n", "/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tButton,\n\t__experimentalConfirmDialog as ConfirmDialog,\n} from '@wordpress/components';\nimport { useSelect, useDispatch, useRegistry } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport PostTrashCheck from './check';\n\n/**\n * Displays the Post Trash Button and Confirm Dialog in the Editor.\n *\n * @param {?{onActionPerformed: Object}} An object containing the onActionPerformed function.\n * @return {React.ReactNode} The rendered PostTrash component.\n */\nexport default function PostTrash( { onActionPerformed } ) {\n\tconst registry = useRegistry();\n\tconst { isNew, isDeleting, postId, title } = useSelect( ( select ) => {\n\t\tconst store = select( editorStore );\n\t\treturn {\n\t\t\tisNew: store.isEditedPostNew(),\n\t\t\tisDeleting: store.isDeletingPost(),\n\t\t\tpostId: store.getCurrentPostId(),\n\t\t\ttitle: store.getCurrentPostAttribute( 'title' ),\n\t\t};\n\t}, [] );\n\tconst { trashPost } = useDispatch( editorStore );\n\tconst [ showConfirmDialog, setShowConfirmDialog ] = useState( false );\n\n\tif ( isNew || ! postId ) {\n\t\treturn null;\n\t}\n\n\tconst handleConfirm = async () => {\n\t\tsetShowConfirmDialog( false );\n\t\tawait trashPost();\n\t\tconst item = await registry\n\t\t\t.resolveSelect( editorStore )\n\t\t\t.getCurrentPost();\n\t\t// After the post is trashed, we want to trigger the onActionPerformed callback, so the user is redirect\n\t\t// to the post view depending on if the user is on post editor or site editor.\n\t\tonActionPerformed?.( 'move-to-trash', [ item ] );\n\t};\n\treturn (\n\t\t<PostTrashCheck>\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tclassName=\"editor-post-trash\"\n\t\t\t\tisDestructive\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tisBusy={ isDeleting }\n\t\t\t\taria-disabled={ isDeleting }\n\t\t\t\tonClick={\n\t\t\t\t\tisDeleting ? undefined : () => setShowConfirmDialog( true )\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{ __( 'Move to trash' ) }\n\t\t\t</Button>\n\t\t\t<ConfirmDialog\n\t\t\t\tisOpen={ showConfirmDialog }\n\t\t\t\tonConfirm={ handleConfirm }\n\t\t\t\tonCancel={ () => setShowConfirmDialog( false ) }\n\t\t\t\tconfirmButtonText={ __( 'Move to trash' ) }\n\t\t\t\tsize=\"small\"\n\t\t\t>\n\t\t\t\t{ sprintf(\n\t\t\t\t\t// translators: %s: The item's title.\n\t\t\t\t\t__( 'Are you sure you want to move \"%s\" to the trash?' ),\n\t\t\t\t\ttitle\n\t\t\t\t) }\n\t\t\t</ConfirmDialog>\n\t\t</PostTrashCheck>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { GLOBAL_POST_TYPES } from '../../store/constants';\n\n/**\n * Wrapper component that renders its children only if the post can be trashed.\n *\n * @param {Object} props The component props.\n * @param {React.ReactNode} props.children The child components.\n *\n * @return {React.ReactNode} The rendered child components or null if the post can't be trashed.\n */\nexport default function PostTrashCheck( { children } ) {\n\tconst { canTrashPost } = useSelect( ( select ) => {\n\t\tconst { isEditedPostNew, getCurrentPostId, getCurrentPostType } =\n\t\t\tselect( editorStore );\n\t\tconst { canUser } = select( coreStore );\n\t\tconst postType = getCurrentPostType();\n\t\tconst postId = getCurrentPostId();\n\t\tconst isNew = isEditedPostNew();\n\t\tconst canUserDelete = !! postId\n\t\t\t? canUser( 'delete', {\n\t\t\t\t\tkind: 'postType',\n\t\t\t\t\tname: postType,\n\t\t\t\t\tid: postId,\n\t\t\t } )\n\t\t\t: false;\n\n\t\treturn {\n\t\t\tcanTrashPost:\n\t\t\t\t( ! isNew || postId ) &&\n\t\t\t\tcanUserDelete &&\n\t\t\t\t! GLOBAL_POST_TYPES.includes( postType ),\n\t\t};\n\t}, [] );\n\tif ( ! canTrashPost ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { safeDecodeURIComponent, cleanForSlug } from '@wordpress/url';\nimport { useState, createInterpolateElement } from '@wordpress/element';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tExternalLink,\n\tButton,\n\t__experimentalInputControl as InputControl,\n\t__experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,\n\t__experimentalInputControlSuffixWrapper as InputControlSuffixWrapper,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { copySmall } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useCopyToClipboard, useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the `PostURL` component.\n *\n * @example\n * ```jsx\n * <PostURL />\n * ```\n *\n * @param {{ onClose: () => void }} props The props for the component.\n * @param {() => void} props.onClose Callback function to be executed when the popover is closed.\n *\n * @return {React.ReactNode} The rendered PostURL component.\n */\nexport default function PostURL( { onClose } ) {\n\tconst {\n\t\tisEditable,\n\t\tpostSlug,\n\t\tpostLink,\n\t\tpermalinkPrefix,\n\t\tpermalinkSuffix,\n\t\tpermalink,\n\t} = useSelect( ( select ) => {\n\t\tconst post = select( editorStore ).getCurrentPost();\n\t\tconst postTypeSlug = select( editorStore ).getCurrentPostType();\n\t\tconst postType = select( coreStore ).getPostType( postTypeSlug );\n\t\tconst permalinkParts = select( editorStore ).getPermalinkParts();\n\t\tconst hasPublishAction = post?._links?.[ 'wp:action-publish' ] ?? false;\n\n\t\treturn {\n\t\t\tisEditable:\n\t\t\t\tselect( editorStore ).isPermalinkEditable() && hasPublishAction,\n\t\t\tpostSlug: safeDecodeURIComponent(\n\t\t\t\tselect( editorStore ).getEditedPostSlug()\n\t\t\t),\n\t\t\tviewPostLabel: postType?.labels.view_item,\n\t\t\tpostLink: post.link,\n\t\t\tpermalinkPrefix: permalinkParts?.prefix,\n\t\t\tpermalinkSuffix: permalinkParts?.suffix,\n\t\t\tpermalink: safeDecodeURIComponent(\n\t\t\t\tselect( editorStore ).getPermalink()\n\t\t\t),\n\t\t};\n\t}, [] );\n\tconst { editPost } = useDispatch( editorStore );\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst [ forceEmptyField, setForceEmptyField ] = useState( false );\n\tconst copyButtonRef = useCopyToClipboard( permalink, () => {\n\t\tcreateNotice( 'info', __( 'Copied Permalink to clipboard.' ), {\n\t\t\tisDismissible: true,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t} );\n\tconst postUrlSlugDescriptionId =\n\t\t'editor-post-url__slug-description-' + useInstanceId( PostURL );\n\n\treturn (\n\t\t<div className=\"editor-post-url\">\n\t\t\t<InspectorPopoverHeader\n\t\t\t\ttitle={ __( 'Slug' ) }\n\t\t\t\tonClose={ onClose }\n\t\t\t/>\n\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t{ isEditable && (\n\t\t\t\t\t<p className=\"editor-post-url__intro\">\n\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'<span>Customize the last part of the Permalink.</span> <a>Learn more.</a>'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tspan: <span id={ postUrlSlugDescriptionId } />,\n\t\t\t\t\t\t\t\ta: (\n\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t) }\n\t\t\t\t<div>\n\t\t\t\t\t{ isEditable && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<InputControl\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tprefix={\n\t\t\t\t\t\t\t\t\t<InputControlPrefixWrapper>\n\t\t\t\t\t\t\t\t\t\t/\n\t\t\t\t\t\t\t\t\t</InputControlPrefixWrapper>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tsuffix={\n\t\t\t\t\t\t\t\t\t<InputControlSuffixWrapper variant=\"control\">\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\ticon={ copySmall }\n\t\t\t\t\t\t\t\t\t\t\tref={ copyButtonRef }\n\t\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Copy\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</InputControlSuffixWrapper>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tlabel={ __( 'Slug' ) }\n\t\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\t\tvalue={ forceEmptyField ? '' : postSlug }\n\t\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\t\tspellCheck=\"false\"\n\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\tclassName=\"editor-post-url__input\"\n\t\t\t\t\t\t\t\tonChange={ ( newValue ) => {\n\t\t\t\t\t\t\t\t\teditPost( { slug: newValue } );\n\t\t\t\t\t\t\t\t\t// When we delete the field the permalink gets\n\t\t\t\t\t\t\t\t\t// reverted to the original value.\n\t\t\t\t\t\t\t\t\t// The forceEmptyField logic allows the user to have\n\t\t\t\t\t\t\t\t\t// the field temporarily empty while typing.\n\t\t\t\t\t\t\t\t\tif ( ! newValue ) {\n\t\t\t\t\t\t\t\t\t\tif ( ! forceEmptyField ) {\n\t\t\t\t\t\t\t\t\t\t\tsetForceEmptyField( true );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( forceEmptyField ) {\n\t\t\t\t\t\t\t\t\t\tsetForceEmptyField( false );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tonBlur={ ( event ) => {\n\t\t\t\t\t\t\t\t\teditPost( {\n\t\t\t\t\t\t\t\t\t\tslug: cleanForSlug(\n\t\t\t\t\t\t\t\t\t\t\tevent.target.value\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\tif ( forceEmptyField ) {\n\t\t\t\t\t\t\t\t\t\tsetForceEmptyField( false );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\taria-describedby={ postUrlSlugDescriptionId }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<p className=\"editor-post-url__permalink\">\n\t\t\t\t\t\t\t\t<span className=\"editor-post-url__permalink-visual-label\">\n\t\t\t\t\t\t\t\t\t{ __( 'Permalink:' ) }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\tclassName=\"editor-post-url__link\"\n\t\t\t\t\t\t\t\t\thref={ postLink }\n\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<span className=\"editor-post-url__link-prefix\">\n\t\t\t\t\t\t\t\t\t\t{ permalinkPrefix }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<span className=\"editor-post-url__link-slug\">\n\t\t\t\t\t\t\t\t\t\t{ postSlug }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<span className=\"editor-post-url__link-suffix\">\n\t\t\t\t\t\t\t\t\t\t{ permalinkSuffix }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! isEditable && (\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\tclassName=\"editor-post-url__link\"\n\t\t\t\t\t\t\thref={ postLink }\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ postLink }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</VStack>\n\t\t</div>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Check if the post URL is valid and visible.\n *\n * @param {Object} props The component props.\n * @param {React.ReactNode} props.children The child components.\n *\n * @return {React.ReactNode} The child components if the post URL is valid and visible, otherwise null.\n */\nexport default function PostURLCheck( { children } ) {\n\tconst isVisible = useSelect( ( select ) => {\n\t\tconst postTypeSlug = select( editorStore ).getCurrentPostType();\n\t\tconst postType = select( coreStore ).getPostType( postTypeSlug );\n\t\tif ( ! postType?.viewable ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst post = select( editorStore ).getCurrentPost();\n\t\tif ( ! post.link ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst permalinkParts = select( editorStore ).getPermalinkParts();\n\t\tif ( ! permalinkParts ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}, [] );\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { filterURLForDisplay, safeDecodeURIComponent } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Represents a label component for a post URL.\n *\n * @return {React.ReactNode} The PostURLLabel component.\n */\nexport default function PostURLLabel() {\n\treturn usePostURLLabel();\n}\n\n/**\n * Custom hook to get the label for the post URL.\n *\n * @return {string} The filtered and decoded post URL label.\n */\nexport function usePostURLLabel() {\n\tconst postLink = useSelect(\n\t\t( select ) => select( editorStore ).getPermalink(),\n\t\t[]\n\t);\n\treturn filterURLForDisplay( safeDecodeURIComponent( postLink ) );\n}\n", "/**\n * WordPress dependencies\n */\nimport { useMemo, useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { Dropdown, Button, ExternalLink } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { safeDecodeURIComponent } from '@wordpress/url';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostURLCheck from './check';\nimport PostURL from './index';\nimport PostPanelRow from '../post-panel-row';\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the `PostURLPanel` component.\n *\n * @return {React.ReactNode} The rendered PostURLPanel component.\n */\nexport default function PostURLPanel() {\n\tconst { isFrontPage } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostId } = select( editorStore );\n\t\tconst { getEditedEntityRecord, canUser } = select( coreStore );\n\t\tconst siteSettings = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? getEditedEntityRecord( 'root', 'site' )\n\t\t\t: undefined;\n\t\tconst _id = getCurrentPostId();\n\t\treturn {\n\t\t\tisFrontPage: siteSettings?.page_on_front === _id,\n\t\t};\n\t}, [] );\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tconst label = isFrontPage ? __( 'Link' ) : __( 'Slug' );\n\n\treturn (\n\t\t<PostURLCheck>\n\t\t\t<PostPanelRow label={ label } ref={ setPopoverAnchor }>\n\t\t\t\t{ ! isFrontPage && (\n\t\t\t\t\t<Dropdown\n\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t\tclassName=\"editor-post-url__panel-dropdown\"\n\t\t\t\t\t\tcontentClassName=\"editor-post-url__panel-dialog\"\n\t\t\t\t\t\tfocusOnMount\n\t\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t\t<PostURLToggle\n\t\t\t\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t\t<PostURL onClose={ onClose } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ isFrontPage && <FrontPageLink /> }\n\t\t\t</PostPanelRow>\n\t\t</PostURLCheck>\n\t);\n}\n\nfunction PostURLToggle( { isOpen, onClick } ) {\n\tconst { slug } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tslug: select( editorStore ).getEditedPostSlug(),\n\t\t};\n\t}, [] );\n\tconst decodedSlug = safeDecodeURIComponent( slug );\n\treturn (\n\t\t<Button\n\t\t\tsize=\"compact\"\n\t\t\tclassName=\"editor-post-url__panel-toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-expanded={ isOpen }\n\t\t\taria-label={\n\t\t\t\t// translators: %s: Current post link.\n\t\t\t\tsprintf( __( 'Change link: %s' ), decodedSlug )\n\t\t\t}\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t<>{ decodedSlug }</>\n\t\t</Button>\n\t);\n}\n\nfunction FrontPageLink() {\n\tconst { postLink } = useSelect( ( select ) => {\n\t\tconst { getCurrentPost } = select( editorStore );\n\t\treturn {\n\t\t\tpostLink: getCurrentPost()?.link,\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<ExternalLink\n\t\t\tclassName=\"editor-post-url__front-page-link\"\n\t\t\thref={ postLink }\n\t\t\ttarget=\"_blank\"\n\t\t>\n\t\t\t{ postLink }\n\t\t</ExternalLink>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Determines if the current post can be edited (published)\n * and passes this information to the provided render function.\n *\n * @param {Object} props The component props.\n * @param {Function} props.render Function to render the component.\n * Receives an object with a `canEdit` property.\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PostVisibilityCheck( { render } ) {\n\tconst canEdit = useSelect( ( select ) => {\n\t\treturn (\n\t\t\tselect( editorStore ).getCurrentPost()._links?.[\n\t\t\t\t'wp:action-publish'\n\t\t\t] ?? false\n\t\t);\n\t} );\n\n\treturn render( { canEdit } );\n}\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Dropdown, Button } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { info } from '@wordpress/icons';\nimport { forwardRef } from '@wordpress/element';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport TableOfContentsPanel from './panel';\n\nfunction TableOfContents(\n\t{ hasOutlineItemsDisabled, repositionDropdown, ...props },\n\tref\n) {\n\tconst hasBlocks = useSelect(\n\t\t( select ) => !! select( blockEditorStore ).getBlockCount(),\n\t\t[]\n\t);\n\treturn (\n\t\t<Dropdown\n\t\t\tpopoverProps={ {\n\t\t\t\tplacement: repositionDropdown ? 'right' : 'bottom',\n\t\t\t} }\n\t\t\tclassName=\"table-of-contents\"\n\t\t\tcontentClassName=\"table-of-contents__popover\"\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t{ ...props }\n\t\t\t\t\tref={ ref }\n\t\t\t\t\tonClick={ hasBlocks ? onToggle : undefined }\n\t\t\t\t\ticon={ info }\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\tlabel={ __( 'Details' ) }\n\t\t\t\t\ttooltipPosition=\"bottom\"\n\t\t\t\t\taria-disabled={ ! hasBlocks }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t<TableOfContentsPanel\n\t\t\t\t\tonRequestClose={ onClose }\n\t\t\t\t\thasOutlineItemsDisabled={ hasOutlineItemsDisabled }\n\t\t\t\t/>\n\t\t\t) }\n\t\t/>\n\t);\n}\n\n/**\n * Renders a table of contents component.\n *\n * @param {Object} props The component props.\n * @param {boolean} props.hasOutlineItemsDisabled Whether outline items are disabled.\n * @param {boolean} props.repositionDropdown Whether to reposition the dropdown.\n * @param {Element.ref} ref The component's ref.\n *\n * @return {React.ReactNode} The rendered table of contents component.\n */\nexport default forwardRef( TableOfContents );\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport WordCount from '../word-count';\nimport TimeToRead from '../time-to-read';\nimport DocumentOutline from '../document-outline';\nimport CharacterCount from '../character-count';\n\nfunction TableOfContentsPanel( { hasOutlineItemsDisabled, onRequestClose } ) {\n\tconst { headingCount, paragraphCount, numberOfBlocks } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getGlobalBlockCount } = select( blockEditorStore );\n\t\t\treturn {\n\t\t\t\theadingCount: getGlobalBlockCount( 'core/heading' ),\n\t\t\t\tparagraphCount: getGlobalBlockCount( 'core/paragraph' ),\n\t\t\t\tnumberOfBlocks: getGlobalBlockCount(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\treturn (\n\t\t/*\n\t\t * Disable reason: The `list` ARIA role is redundant but\n\t\t * Safari+VoiceOver won't announce the list otherwise.\n\t\t */\n\t\t/* eslint-disable jsx-a11y/no-redundant-roles */\n\t\t<>\n\t\t\t<div\n\t\t\t\tclassName=\"table-of-contents__wrapper\"\n\t\t\t\trole=\"note\"\n\t\t\t\taria-label={ __( 'Document Statistics' ) }\n\t\t\t\ttabIndex=\"0\"\n\t\t\t>\n\t\t\t\t<ul role=\"list\" className=\"table-of-contents__counts\">\n\t\t\t\t\t<li className=\"table-of-contents__count\">\n\t\t\t\t\t\t{ __( 'Words' ) }\n\t\t\t\t\t\t<WordCount />\n\t\t\t\t\t</li>\n\t\t\t\t\t<li className=\"table-of-contents__count\">\n\t\t\t\t\t\t{ __( 'Characters' ) }\n\t\t\t\t\t\t<span className=\"table-of-contents__number\">\n\t\t\t\t\t\t\t<CharacterCount />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li className=\"table-of-contents__count\">\n\t\t\t\t\t\t{ __( 'Time to read' ) }\n\t\t\t\t\t\t<TimeToRead />\n\t\t\t\t\t</li>\n\t\t\t\t\t<li className=\"table-of-contents__count\">\n\t\t\t\t\t\t{ __( 'Headings' ) }\n\t\t\t\t\t\t<span className=\"table-of-contents__number\">\n\t\t\t\t\t\t\t{ headingCount }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li className=\"table-of-contents__count\">\n\t\t\t\t\t\t{ __( 'Paragraphs' ) }\n\t\t\t\t\t\t<span className=\"table-of-contents__number\">\n\t\t\t\t\t\t\t{ paragraphCount }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li className=\"table-of-contents__count\">\n\t\t\t\t\t\t{ __( 'Blocks' ) }\n\t\t\t\t\t\t<span className=\"table-of-contents__number\">\n\t\t\t\t\t\t\t{ numberOfBlocks }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t{ headingCount > 0 && (\n\t\t\t\t<>\n\t\t\t\t\t<hr />\n\t\t\t\t\t<h2 className=\"table-of-contents__title\">\n\t\t\t\t\t\t{ __( 'Document Outline' ) }\n\t\t\t\t\t</h2>\n\t\t\t\t\t<DocumentOutline\n\t\t\t\t\t\tonSelect={ onRequestClose }\n\t\t\t\t\t\thasOutlineItemsDisabled={ hasOutlineItemsDisabled }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</>\n\t\t/* eslint-enable jsx-a11y/no-redundant-roles */\n\t);\n}\n\nexport default TableOfContentsPanel;\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { _x } from '@wordpress/i18n';\nimport { count as wordCount } from '@wordpress/wordcount';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the word count of the post content.\n *\n * @return {React.ReactNode} The rendered WordCount component.\n */\nexport default function WordCount() {\n\tconst content = useSelect(\n\t\t( select ) => select( editorStore ).getEditedPostAttribute( 'content' ),\n\t\t[]\n\t);\n\n\t/*\n\t * translators: If your word count is based on single characters (e.g. East Asian characters),\n\t * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.\n\t * Do not translate into your own language.\n\t */\n\tconst wordCountType = _x( 'words', 'Word count type. Do not translate!' );\n\n\treturn (\n\t\t<span className=\"word-count\">\n\t\t\t{ wordCount( content, wordCountType ) }\n\t\t</span>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { _x, _n, __, sprintf } from '@wordpress/i18n';\nimport { count as wordCount } from '@wordpress/wordcount';\nimport { createInterpolateElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Average reading rate - based on average taken from\n * https://irisreading.com/average-reading-speed-in-various-languages/\n * (Characters/minute used for Chinese rather than words).\n *\n * @type {number} A rough estimate of the average reading rate across multiple languages.\n */\nconst AVERAGE_READING_RATE = 189;\n\n/**\n * Component for showing Time To Read in Content.\n *\n * @return {React.ReactNode} The rendered TimeToRead component.\n */\nexport default function TimeToRead() {\n\tconst content = useSelect(\n\t\t( select ) => select( editorStore ).getEditedPostAttribute( 'content' ),\n\t\t[]\n\t);\n\n\t/*\n\t * translators: If your word count is based on single characters (e.g. East Asian characters),\n\t * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.\n\t * Do not translate into your own language.\n\t */\n\tconst wordCountType = _x( 'words', 'Word count type. Do not translate!' );\n\tconst minutesToRead = Math.round(\n\t\twordCount( content, wordCountType ) / AVERAGE_READING_RATE\n\t);\n\tconst minutesToReadString =\n\t\tminutesToRead === 0\n\t\t\t? createInterpolateElement( __( '<span>< 1</span> minute' ), {\n\t\t\t\t\tspan: <span />,\n\t\t\t } )\n\t\t\t: createInterpolateElement(\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\t/* translators: %s: the number of minutes to read the post. */\n\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t'<span>%s</span> minute',\n\t\t\t\t\t\t\t'<span>%s</span> minutes',\n\t\t\t\t\t\t\tminutesToRead\n\t\t\t\t\t\t),\n\t\t\t\t\t\tminutesToRead\n\t\t\t\t\t),\n\t\t\t\t\t{\n\t\t\t\t\t\tspan: <span />,\n\t\t\t\t\t}\n\t\t\t );\n\n\treturn <span className=\"time-to-read\">{ minutesToReadString }</span>;\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { count as characterCount } from '@wordpress/wordcount';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the character count of the post content.\n *\n * @return {number} The character count.\n */\nexport default function CharacterCount() {\n\tconst content = useSelect(\n\t\t( select ) => select( editorStore ).getEditedPostAttribute( 'content' ),\n\t\t[]\n\t);\n\n\treturn characterCount( content, 'characters_including_spaces' );\n}\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Warns the user if there are unsaved changes before leaving the editor.\n * Compatible with Post Editor and Site Editor.\n *\n * @return {React.ReactNode} The component.\n */\nexport default function UnsavedChangesWarning() {\n\tconst { __experimentalGetDirtyEntityRecords } = useSelect( coreStore );\n\n\tuseEffect( () => {\n\t\t/**\n\t\t * Warns the user if there are unsaved changes before leaving the editor.\n\t\t *\n\t\t * @param {Event} event `beforeunload` event.\n\t\t *\n\t\t * @return {string | undefined} Warning prompt message, if unsaved changes exist.\n\t\t */\n\t\tconst warnIfUnsavedChanges = ( event ) => {\n\t\t\t// We need to call the selector directly in the listener to avoid race\n\t\t\t// conditions with `BrowserURL` where `componentDidUpdate` gets the\n\t\t\t// new value of `isEditedPostDirty` before this component does,\n\t\t\t// causing this component to incorrectly think a trashed post is still dirty.\n\t\t\tconst dirtyEntityRecords = __experimentalGetDirtyEntityRecords();\n\t\t\tif ( dirtyEntityRecords.length > 0 ) {\n\t\t\t\tevent.returnValue = __(\n\t\t\t\t\t'You have unsaved changes. If you proceed, they will be lost.'\n\t\t\t\t);\n\t\t\t\treturn event.returnValue;\n\t\t\t}\n\t\t};\n\n\t\twindow.addEventListener( 'beforeunload', warnIfUnsavedChanges );\n\n\t\treturn () => {\n\t\t\twindow.removeEventListener( 'beforeunload', warnIfUnsavedChanges );\n\t\t};\n\t}, [ __experimentalGetDirtyEntityRecords ] );\n\n\treturn null;\n}\n", "// Block Creation Components.\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\nimport {\n\tAutocomplete as RootAutocomplete,\n\tAlignmentToolbar as RootAlignmentToolbar,\n\tBlockAlignmentToolbar as RootBlockAlignmentToolbar,\n\tBlockControls as RootBlockControls,\n\tBlockEdit as RootBlockEdit,\n\tBlockEditorKeyboardShortcuts as RootBlockEditorKeyboardShortcuts,\n\tBlockFormatControls as RootBlockFormatControls,\n\tBlockIcon as RootBlockIcon,\n\tBlockInspector as RootBlockInspector,\n\tBlockList as RootBlockList,\n\tBlockMover as RootBlockMover,\n\tBlockNavigationDropdown as RootBlockNavigationDropdown,\n\tBlockSelectionClearer as RootBlockSelectionClearer,\n\tBlockSettingsMenu as RootBlockSettingsMenu,\n\tBlockTitle as RootBlockTitle,\n\tBlockToolbar as RootBlockToolbar,\n\tColorPalette as RootColorPalette,\n\tContrastChecker as RootContrastChecker,\n\tCopyHandler as RootCopyHandler,\n\tcreateCustomColorsHOC as rootCreateCustomColorsHOC,\n\tDefaultBlockAppender as RootDefaultBlockAppender,\n\tFontSizePicker as RootFontSizePicker,\n\tgetColorClassName as rootGetColorClassName,\n\tgetColorObjectByAttributeValues as rootGetColorObjectByAttributeValues,\n\tgetColorObjectByColorValue as rootGetColorObjectByColorValue,\n\tgetFontSize as rootGetFontSize,\n\tgetFontSizeClass as rootGetFontSizeClass,\n\tInserter as RootInserter,\n\tInnerBlocks as RootInnerBlocks,\n\tInspectorAdvancedControls as RootInspectorAdvancedControls,\n\tInspectorControls as RootInspectorControls,\n\tPanelColorSettings as RootPanelColorSettings,\n\tPlainText as RootPlainText,\n\tRichText as RootRichText,\n\tRichTextShortcut as RootRichTextShortcut,\n\tRichTextToolbarButton as RootRichTextToolbarButton,\n\t__unstableRichTextInputEvent as __unstableRootRichTextInputEvent,\n\tMediaPlaceholder as RootMediaPlaceholder,\n\tMediaUpload as RootMediaUpload,\n\tMediaUploadCheck as RootMediaUploadCheck,\n\tMultiSelectScrollIntoView as RootMultiSelectScrollIntoView,\n\tNavigableToolbar as RootNavigableToolbar,\n\tObserveTyping as RootObserveTyping,\n\tSkipToSelectedBlock as RootSkipToSelectedBlock,\n\tURLInput as RootURLInput,\n\tURLInputButton as RootURLInputButton,\n\tURLPopover as RootURLPopover,\n\tWarning as RootWarning,\n\tWritingFlow as RootWritingFlow,\n\twithColorContext as rootWithColorContext,\n\twithColors as rootWithColors,\n\twithFontSizes as rootWithFontSizes,\n} from '@wordpress/block-editor';\n\nexport { default as ServerSideRender } from '@wordpress/server-side-render';\n\nfunction deprecateComponent( name, Wrapped, staticsToHoist = [] ) {\n\tconst Component = forwardRef( ( props, ref ) => {\n\t\tdeprecated( 'wp.editor.' + name, {\n\t\t\tsince: '5.3',\n\t\t\talternative: 'wp.blockEditor.' + name,\n\t\t\tversion: '6.2',\n\t\t} );\n\n\t\treturn <Wrapped ref={ ref } { ...props } />;\n\t} );\n\n\tstaticsToHoist.forEach( ( staticName ) => {\n\t\tComponent[ staticName ] = deprecateComponent(\n\t\t\tname + '.' + staticName,\n\t\t\tWrapped[ staticName ]\n\t\t);\n\t} );\n\n\treturn Component;\n}\n\nfunction deprecateFunction( name, func ) {\n\treturn ( ...args ) => {\n\t\tdeprecated( 'wp.editor.' + name, {\n\t\t\tsince: '5.3',\n\t\t\talternative: 'wp.blockEditor.' + name,\n\t\t\tversion: '6.2',\n\t\t} );\n\n\t\treturn func( ...args );\n\t};\n}\n\n/**\n * @deprecated since 5.3, use `wp.blockEditor.RichText` instead.\n */\nconst RichText = deprecateComponent( 'RichText', RootRichText, [ 'Content' ] );\nRichText.isEmpty = deprecateFunction(\n\t'RichText.isEmpty',\n\tRootRichText.isEmpty\n);\n\nexport { RichText };\n\n/**\n * @deprecated since 5.3, use `wp.blockEditor.Autocomplete` instead.\n */\nexport const Autocomplete = deprecateComponent(\n\t'Autocomplete',\n\tRootAutocomplete\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.AlignmentToolbar` instead.\n */\nexport const AlignmentToolbar = deprecateComponent(\n\t'AlignmentToolbar',\n\tRootAlignmentToolbar\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockAlignmentToolbar` instead.\n */\nexport const BlockAlignmentToolbar = deprecateComponent(\n\t'BlockAlignmentToolbar',\n\tRootBlockAlignmentToolbar\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockControls` instead.\n */\nexport const BlockControls = deprecateComponent(\n\t'BlockControls',\n\tRootBlockControls,\n\t[ 'Slot' ]\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockEdit` instead.\n */\nexport const BlockEdit = deprecateComponent( 'BlockEdit', RootBlockEdit );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockEditorKeyboardShortcuts` instead.\n */\nexport const BlockEditorKeyboardShortcuts = deprecateComponent(\n\t'BlockEditorKeyboardShortcuts',\n\tRootBlockEditorKeyboardShortcuts\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockFormatControls` instead.\n */\nexport const BlockFormatControls = deprecateComponent(\n\t'BlockFormatControls',\n\tRootBlockFormatControls,\n\t[ 'Slot' ]\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockIcon` instead.\n */\nexport const BlockIcon = deprecateComponent( 'BlockIcon', RootBlockIcon );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockInspector` instead.\n */\nexport const BlockInspector = deprecateComponent(\n\t'BlockInspector',\n\tRootBlockInspector\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockList` instead.\n */\nexport const BlockList = deprecateComponent( 'BlockList', RootBlockList );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockMover` instead.\n */\nexport const BlockMover = deprecateComponent( 'BlockMover', RootBlockMover );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockNavigationDropdown` instead.\n */\nexport const BlockNavigationDropdown = deprecateComponent(\n\t'BlockNavigationDropdown',\n\tRootBlockNavigationDropdown\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockSelectionClearer` instead.\n */\nexport const BlockSelectionClearer = deprecateComponent(\n\t'BlockSelectionClearer',\n\tRootBlockSelectionClearer\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockSettingsMenu` instead.\n */\nexport const BlockSettingsMenu = deprecateComponent(\n\t'BlockSettingsMenu',\n\tRootBlockSettingsMenu\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockTitle` instead.\n */\nexport const BlockTitle = deprecateComponent( 'BlockTitle', RootBlockTitle );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockToolbar` instead.\n */\nexport const BlockToolbar = deprecateComponent(\n\t'BlockToolbar',\n\tRootBlockToolbar\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.ColorPalette` instead.\n */\nexport const ColorPalette = deprecateComponent(\n\t'ColorPalette',\n\tRootColorPalette\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.ContrastChecker` instead.\n */\nexport const ContrastChecker = deprecateComponent(\n\t'ContrastChecker',\n\tRootContrastChecker\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.CopyHandler` instead.\n */\nexport const CopyHandler = deprecateComponent( 'CopyHandler', RootCopyHandler );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.DefaultBlockAppender` instead.\n */\nexport const DefaultBlockAppender = deprecateComponent(\n\t'DefaultBlockAppender',\n\tRootDefaultBlockAppender\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.FontSizePicker` instead.\n */\nexport const FontSizePicker = deprecateComponent(\n\t'FontSizePicker',\n\tRootFontSizePicker\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.Inserter` instead.\n */\nexport const Inserter = deprecateComponent( 'Inserter', RootInserter );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.InnerBlocks` instead.\n */\nexport const InnerBlocks = deprecateComponent( 'InnerBlocks', RootInnerBlocks, [\n\t'ButtonBlockAppender',\n\t'DefaultBlockAppender',\n\t'Content',\n] );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.InspectorAdvancedControls` instead.\n */\nexport const InspectorAdvancedControls = deprecateComponent(\n\t'InspectorAdvancedControls',\n\tRootInspectorAdvancedControls,\n\t[ 'Slot' ]\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.InspectorControls` instead.\n */\nexport const InspectorControls = deprecateComponent(\n\t'InspectorControls',\n\tRootInspectorControls,\n\t[ 'Slot' ]\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.PanelColorSettings` instead.\n */\nexport const PanelColorSettings = deprecateComponent(\n\t'PanelColorSettings',\n\tRootPanelColorSettings\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.PlainText` instead.\n */\nexport const PlainText = deprecateComponent( 'PlainText', RootPlainText );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.RichTextShortcut` instead.\n */\nexport const RichTextShortcut = deprecateComponent(\n\t'RichTextShortcut',\n\tRootRichTextShortcut\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.RichTextToolbarButton` instead.\n */\nexport const RichTextToolbarButton = deprecateComponent(\n\t'RichTextToolbarButton',\n\tRootRichTextToolbarButton\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.__unstableRichTextInputEvent` instead.\n */\nexport const __unstableRichTextInputEvent = deprecateComponent(\n\t'__unstableRichTextInputEvent',\n\t__unstableRootRichTextInputEvent\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.MediaPlaceholder` instead.\n */\nexport const MediaPlaceholder = deprecateComponent(\n\t'MediaPlaceholder',\n\tRootMediaPlaceholder\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.MediaUpload` instead.\n */\nexport const MediaUpload = deprecateComponent( 'MediaUpload', RootMediaUpload );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.MediaUploadCheck` instead.\n */\nexport const MediaUploadCheck = deprecateComponent(\n\t'MediaUploadCheck',\n\tRootMediaUploadCheck\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.MultiSelectScrollIntoView` instead.\n */\nexport const MultiSelectScrollIntoView = deprecateComponent(\n\t'MultiSelectScrollIntoView',\n\tRootMultiSelectScrollIntoView\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.NavigableToolbar` instead.\n */\nexport const NavigableToolbar = deprecateComponent(\n\t'NavigableToolbar',\n\tRootNavigableToolbar\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.ObserveTyping` instead.\n */\nexport const ObserveTyping = deprecateComponent(\n\t'ObserveTyping',\n\tRootObserveTyping\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.SkipToSelectedBlock` instead.\n */\nexport const SkipToSelectedBlock = deprecateComponent(\n\t'SkipToSelectedBlock',\n\tRootSkipToSelectedBlock\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.URLInput` instead.\n */\nexport const URLInput = deprecateComponent( 'URLInput', RootURLInput );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.URLInputButton` instead.\n */\nexport const URLInputButton = deprecateComponent(\n\t'URLInputButton',\n\tRootURLInputButton\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.URLPopover` instead.\n */\nexport const URLPopover = deprecateComponent( 'URLPopover', RootURLPopover );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.Warning` instead.\n */\nexport const Warning = deprecateComponent( 'Warning', RootWarning );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.WritingFlow` instead.\n */\nexport const WritingFlow = deprecateComponent( 'WritingFlow', RootWritingFlow );\n\n/**\n * @deprecated since 5.3, use `wp.blockEditor.createCustomColorsHOC` instead.\n */\nexport const createCustomColorsHOC = deprecateFunction(\n\t'createCustomColorsHOC',\n\trootCreateCustomColorsHOC\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getColorClassName` instead.\n */\nexport const getColorClassName = deprecateFunction(\n\t'getColorClassName',\n\trootGetColorClassName\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getColorObjectByAttributeValues` instead.\n */\nexport const getColorObjectByAttributeValues = deprecateFunction(\n\t'getColorObjectByAttributeValues',\n\trootGetColorObjectByAttributeValues\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getColorObjectByColorValue` instead.\n */\nexport const getColorObjectByColorValue = deprecateFunction(\n\t'getColorObjectByColorValue',\n\trootGetColorObjectByColorValue\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getFontSize` instead.\n */\nexport const getFontSize = deprecateFunction( 'getFontSize', rootGetFontSize );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getFontSizeClass` instead.\n */\nexport const getFontSizeClass = deprecateFunction(\n\t'getFontSizeClass',\n\trootGetFontSizeClass\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.createCustomColorsHOC` instead.\n */\nexport const withColorContext = deprecateFunction(\n\t'withColorContext',\n\trootWithColorContext\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.withColors` instead.\n */\nexport const withColors = deprecateFunction( 'withColors', rootWithColors );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.withFontSizes` instead.\n */\nexport const withFontSizes = deprecateFunction(\n\t'withFontSizes',\n\trootWithFontSizes\n);\n", "/**\n * Internal dependencies\n */\nimport EditorKeyboardShortcuts from './global-keyboard-shortcuts';\n\n// Block Creation Components.\nexport * from './autocompleters';\n\n// Post Related Components.\nexport { default as AutosaveMonitor } from './autosave-monitor';\nexport { default as DocumentBar } from './document-bar';\nexport { default as DocumentOutline } from './document-outline';\nexport { default as DocumentOutlineCheck } from './document-outline/check';\nexport { EditorKeyboardShortcuts };\nexport { default as EditorKeyboardShortcutsRegister } from './global-keyboard-shortcuts/register-shortcuts';\nexport { default as EditorHistoryRedo } from './editor-history/redo';\nexport { default as EditorHistoryUndo } from './editor-history/undo';\nexport { default as EditorNotices } from './editor-notices';\nexport { default as EditorSnackbars } from './editor-snackbars';\nexport { default as EntitiesSavedStates } from './entities-saved-states';\nexport { useIsDirty as useEntitiesSavedStatesIsDirty } from './entities-saved-states/hooks/use-is-dirty';\nexport { default as ErrorBoundary } from './error-boundary';\nexport { default as LocalAutosaveMonitor } from './local-autosave-monitor';\nexport { default as PageAttributesCheck } from './page-attributes/check';\nexport { default as PageAttributesOrder } from './page-attributes/order';\nexport { default as PageAttributesPanel } from './page-attributes/panel';\nexport { default as PageAttributesParent } from './page-attributes/parent';\nexport { default as PageTemplate } from './post-template/classic-theme';\nexport { default as PluginDocumentSettingPanel } from './plugin-document-setting-panel';\nexport { default as PluginBlockSettingsMenuItem } from './block-settings-menu/plugin-block-settings-menu-item';\nexport { default as PluginMoreMenuItem } from './plugin-more-menu-item';\nexport { default as PluginPostPublishPanel } from './plugin-post-publish-panel';\nexport { default as PluginPostStatusInfo } from './plugin-post-status-info';\nexport { default as PluginPrePublishPanel } from './plugin-pre-publish-panel';\nexport { default as PluginPreviewMenuItem } from './plugin-preview-menu-item';\nexport { default as PluginSidebar } from './plugin-sidebar';\nexport { default as PluginSidebarMoreMenuItem } from './plugin-sidebar-more-menu-item';\nexport { default as PostTemplatePanel } from './post-template/panel';\nexport { default as PostAuthor } from './post-author';\nexport { default as PostAuthorCheck } from './post-author/check';\nexport { default as PostAuthorPanel } from './post-author/panel';\nexport { default as PostComments } from './post-comments';\nexport { default as PostDiscussionPanel } from './post-discussion/panel';\nexport { default as PostExcerpt } from './post-excerpt';\nexport { default as PostExcerptCheck } from './post-excerpt/check';\nexport { default as PostExcerptPanel } from './post-excerpt/panel';\nexport { default as PostFeaturedImage } from './post-featured-image';\nexport { default as PostFeaturedImageCheck } from './post-featured-image/check';\nexport { default as PostFeaturedImagePanel } from './post-featured-image/panel';\nexport { default as PostFormat } from './post-format';\nexport { default as PostFormatCheck } from './post-format/check';\nexport { default as PostLastRevision } from './post-last-revision';\nexport { default as PostLastRevisionCheck } from './post-last-revision/check';\nexport { default as PostLastRevisionPanel } from './post-last-revision/panel';\nexport { default as PostLockedModal } from './post-locked-modal';\nexport { default as PostPendingStatus } from './post-pending-status';\nexport { default as PostPendingStatusCheck } from './post-pending-status/check';\nexport { default as PostPingbacks } from './post-pingbacks';\nexport { default as PostPreviewButton } from './post-preview-button';\nexport { default as PostPublishButton } from './post-publish-button';\nexport { default as PostPublishButtonLabel } from './post-publish-button/label';\nexport { default as PostPublishPanel } from './post-publish-panel';\nexport { default as PostSavedState } from './post-saved-state';\nexport { default as PostSchedule } from './post-schedule';\nexport { default as PostScheduleCheck } from './post-schedule/check';\nexport {\n\tdefault as PostScheduleLabel,\n\tusePostScheduleLabel,\n} from './post-schedule/label';\nexport { default as PostSchedulePanel } from './post-schedule/panel';\nexport { default as PostSticky } from './post-sticky';\nexport { default as PostStickyCheck } from './post-sticky/check';\nexport { default as PostSwitchToDraftButton } from './post-switch-to-draft-button';\nexport { default as PostSyncStatus } from './post-sync-status';\nexport { default as PostTaxonomies } from './post-taxonomies';\nexport { FlatTermSelector as PostTaxonomiesFlatTermSelector } from './post-taxonomies/flat-term-selector';\nexport { HierarchicalTermSelector as PostTaxonomiesHierarchicalTermSelector } from './post-taxonomies/hierarchical-term-selector';\nexport { default as PostTaxonomiesCheck } from './post-taxonomies/check';\nexport { default as PostTaxonomiesPanel } from './post-taxonomies/panel';\nexport { default as PostTextEditor } from './post-text-editor';\nexport { default as PostTitle } from './post-title';\nexport { default as PostTitleRaw } from './post-title/post-title-raw';\nexport { default as PostTrash } from './post-trash';\nexport { default as PostTrashCheck } from './post-trash/check';\nexport { default as PostTypeSupportCheck } from './post-type-support-check';\nexport { default as PostURL } from './post-url';\nexport { default as PostURLCheck } from './post-url/check';\nexport { default as PostURLLabel, usePostURLLabel } from './post-url/label';\nexport { default as PostURLPanel } from './post-url/panel';\nexport { default as PostVisibility } from './post-visibility';\nexport {\n\tdefault as PostVisibilityLabel,\n\tusePostVisibilityLabel,\n} from './post-visibility/label';\nexport { default as PostVisibilityCheck } from './post-visibility/check';\nexport { default as TableOfContents } from './table-of-contents';\nexport { default as ThemeSupportCheck } from './theme-support-check';\nexport { default as UnsavedChangesWarning } from './unsaved-changes-warning';\nexport { default as WordCount } from './word-count';\nexport { default as TimeToRead } from './time-to-read';\nexport { default as CharacterCount } from './character-count';\n\n// State Related Components.\nexport { default as EditorProvider } from './provider';\n\nexport * from './deprecated';\n\n/**\n * Handles the keyboard shortcuts for the editor.\n *\n * It provides functionality for various keyboard shortcuts such as toggling editor mode,\n * toggling distraction-free mode, undo/redo, saving the post, toggling list view,\n * and toggling the sidebar.\n */\nexport const VisualEditorGlobalKeyboardShortcuts = EditorKeyboardShortcuts;\n\n/**\n * Handles the keyboard shortcuts for the editor.\n *\n * It provides functionality for various keyboard shortcuts such as toggling editor mode,\n * toggling distraction-free mode, undo/redo, saving the post, toggling list view,\n * and toggling the sidebar.\n */\nexport const TextEditorGlobalKeyboardShortcuts = EditorKeyboardShortcuts;\n", "/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { addFilter } from '@wordpress/hooks';\nimport deprecated from '@wordpress/deprecated';\nimport {\n\tMediaUpload,\n\tprivateApis as mediaUtilsPrivateApis,\n} from '@wordpress/media-utils';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\n\nconst { MediaUploadModal: MediaUploadModalComponent } = unlock(\n\tmediaUtilsPrivateApis\n);\n\n/**\n * Class component wrapper for MediaUploadModal to maintain compatibility\n * with the stable MediaUpload component API (render prop pattern).\n */\nclass MediaUploadModalWrapper extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.state = {\n\t\t\tisOpen: false,\n\t\t};\n\t\tthis.openModal = this.openModal.bind( this );\n\t\tthis.closeModal = this.closeModal.bind( this );\n\t}\n\n\topenModal() {\n\t\tthis.setState( { isOpen: true } );\n\t}\n\n\tcloseModal() {\n\t\tthis.setState( { isOpen: false } );\n\t\tthis.props.onClose?.();\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tallowedTypes,\n\t\t\tmultiple,\n\t\t\tvalue,\n\t\t\tonSelect,\n\t\t\ttitle,\n\t\t\tmodalClass,\n\t\t\trender,\n\t\t} = this.props;\n\t\tconst { isOpen } = this.state;\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ render( { open: this.openModal } ) }\n\t\t\t\t<MediaUploadModalComponent\n\t\t\t\t\tallowedTypes={ allowedTypes }\n\t\t\t\t\tmultiple={ multiple }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonSelect={ ( media ) => {\n\t\t\t\t\t\tonSelect( media );\n\t\t\t\t\t\tthis.closeModal();\n\t\t\t\t\t} }\n\t\t\t\t\tonClose={ this.closeModal }\n\t\t\t\t\ttitle={ title }\n\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\tmodalClass={ modalClass }\n\t\t\t\t/>\n\t\t\t</>\n\t\t);\n\t}\n}\n\nif ( window.__experimentalDataViewsMediaModal ) {\n\t// Use the wrapper component for editor.MediaUpload when the experimental flag is enabled\n\taddFilter(\n\t\t'editor.MediaUpload',\n\t\t'core/editor/components/media-upload',\n\t\t() => {\n\t\t\tdeprecated( 'Extending MediaUpload as a class component', {\n\t\t\t\tsince: '7.0',\n\t\t\t\tversion: '7.2',\n\t\t\t\thint: 'MediaUpload will become a function component in WordPress 7.2 Please update any custom implementations to use function components instead.',\n\t\t\t} );\n\t\t\treturn MediaUploadModalWrapper;\n\t\t}\n\t);\n} else {\n\taddFilter(\n\t\t'editor.MediaUpload',\n\t\t'core/editor/components/media-upload',\n\t\t() => {\n\t\t\treturn MediaUpload;\n\t\t}\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport {\n\tstore as blockEditorStore,\n\tuseBlockEditingMode,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { getBlockBindingsSource } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../store';\nimport { unlock } from '../lock-unlock';\n\n/** @typedef {import('@wordpress/blocks').WPBlockSettings} WPBlockSettings */\n\nconst {\n\tPatternOverridesControls,\n\tResetOverridesControl,\n\tPATTERN_TYPES,\n\tPATTERN_SYNC_TYPES,\n} = unlock( patternsPrivateApis );\n\n/**\n * Override the default edit UI to include a new block inspector control for\n * assigning a partial syncing controls to supported blocks in the pattern editor.\n *\n * @param {Component} BlockEdit Original component.\n *\n * @return {Component} Wrapped component.\n */\nconst withPatternOverrideControls = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst isSupportedBlock = useSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst { __experimentalBlockBindingsSupportedAttributes } =\n\t\t\t\t\tselect( blockEditorStore ).getSettings();\n\t\t\t\treturn !! __experimentalBlockBindingsSupportedAttributes?.[\n\t\t\t\t\tprops.name\n\t\t\t\t];\n\t\t\t},\n\t\t\t[ props.name ]\n\t\t);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockEdit key=\"edit\" { ...props } />\n\t\t\t\t{ props.isSelected && isSupportedBlock && (\n\t\t\t\t\t<ControlsWithStoreSubscription { ...props } />\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t},\n\t'withPatternOverrideControls'\n);\n\n// Split into a separate component to avoid a store subscription\n// on every block.\nfunction ControlsWithStoreSubscription( props ) {\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst { hasPatternOverridesSource, isEditingSyncedPattern } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCurrentPostType, getEditedPostAttribute } =\n\t\t\t\tselect( editorStore );\n\n\t\t\treturn {\n\t\t\t\t// For editing link to the site editor if the theme and user permissions support it.\n\t\t\t\thasPatternOverridesSource: !! getBlockBindingsSource(\n\t\t\t\t\t'core/pattern-overrides'\n\t\t\t\t),\n\t\t\t\tisEditingSyncedPattern:\n\t\t\t\t\tgetCurrentPostType() === PATTERN_TYPES.user &&\n\t\t\t\t\tgetEditedPostAttribute( 'meta' )?.wp_pattern_sync_status !==\n\t\t\t\t\t\tPATTERN_SYNC_TYPES.unsynced &&\n\t\t\t\t\tgetEditedPostAttribute( 'wp_pattern_sync_status' ) !==\n\t\t\t\t\t\tPATTERN_SYNC_TYPES.unsynced,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst bindings = props.attributes.metadata?.bindings;\n\tconst hasPatternBindings =\n\t\t!! bindings &&\n\t\tObject.values( bindings ).some(\n\t\t\t( binding ) => binding.source === 'core/pattern-overrides'\n\t\t);\n\n\tconst shouldShowPatternOverridesControls =\n\t\tisEditingSyncedPattern && blockEditingMode === 'default';\n\tconst shouldShowResetOverridesControl =\n\t\t! isEditingSyncedPattern &&\n\t\t!! props.attributes.metadata?.name &&\n\t\tblockEditingMode !== 'disabled' &&\n\t\thasPatternBindings;\n\n\tif ( ! hasPatternOverridesSource ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ shouldShowPatternOverridesControls && (\n\t\t\t\t<PatternOverridesControls { ...props } />\n\t\t\t) }\n\t\t\t{ shouldShowResetOverridesControl && (\n\t\t\t\t<ResetOverridesControl { ...props } />\n\t\t\t) }\n\t\t</>\n\t);\n}\n\naddFilter(\n\t'editor.BlockEdit',\n\t'core/editor/with-pattern-override-controls',\n\twithPatternOverrideControls\n);\n", "/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { useCallback } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__unstableBlockToolbarLastItem as BlockToolbarLastItem,\n\tstore as blockEditorStore,\n\tuseBlockEditingMode,\n} from '@wordpress/block-editor';\nimport { ToolbarButton, ToolbarGroup } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n// Target blocks that should have the View button.\nconst SUPPORTED_BLOCKS = [ 'core/navigation-link', 'core/navigation-submenu' ];\n\n/**\n * Component that renders the View button for navigation blocks.\n *\n * @param {Object} props Component props.\n * @param {Object} props.attributes Block attributes.\n * @return {JSX.Element|null} The View button component or null if not applicable.\n */\nfunction NavigationViewButton( { attributes } ) {\n\tconst { kind, id, type } = attributes;\n\tconst blockEditingMode = useBlockEditingMode();\n\n\tconst onNavigateToEntityRecord = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blockEditorStore ).getSettings().onNavigateToEntityRecord,\n\t\t[]\n\t);\n\n\tconst onViewPage = useCallback( () => {\n\t\tif (\n\t\t\tkind === 'post-type' &&\n\t\t\ttype === 'page' &&\n\t\t\tid &&\n\t\t\tonNavigateToEntityRecord\n\t\t) {\n\t\t\tonNavigateToEntityRecord( {\n\t\t\t\tpostId: id,\n\t\t\t\tpostType: type,\n\t\t\t} );\n\t\t}\n\t}, [ kind, id, type, onNavigateToEntityRecord ] );\n\n\t// Only show for page-type links, when navigation is available, and when in contentOnly mode.\n\tif (\n\t\tkind !== 'post-type' ||\n\t\ttype !== 'page' ||\n\t\t! id ||\n\t\t! onNavigateToEntityRecord ||\n\t\tblockEditingMode !== 'contentOnly'\n\t) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockToolbarLastItem>\n\t\t\t<ToolbarGroup>\n\t\t\t\t<ToolbarButton\n\t\t\t\t\tname=\"view\"\n\t\t\t\t\ttitle={ __( 'View' ) }\n\t\t\t\t\tonClick={ onViewPage }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'View' ) }\n\t\t\t\t</ToolbarButton>\n\t\t\t</ToolbarGroup>\n\t\t</BlockToolbarLastItem>\n\t);\n}\n\n/**\n * Higher-order component that adds the View button to navigation blocks.\n */\nconst withNavigationViewButton = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst isSupportedBlock = SUPPORTED_BLOCKS.includes( props.name );\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockEdit key=\"edit\" { ...props } />\n\t\t\t\t{ props.isSelected && isSupportedBlock && (\n\t\t\t\t\t<NavigationViewButton { ...props } />\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t},\n\t'withNavigationViewButton'\n);\n\n// Register the filter.\naddFilter(\n\t'editor.BlockEdit',\n\t'core/editor/with-navigation-view-button',\n\twithNavigationViewButton\n);\n", "/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { useCallback } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__unstableBlockToolbarLastItem as BlockToolbarLastItem,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { ToolbarButton, ToolbarGroup } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n// Block name constants\nconst NAVIGATION_BLOCK_NAME = 'core/navigation';\nconst TEMPLATE_PART_BLOCK_NAME = 'core/template-part';\n\n// Complementary area identifier for the block inspector\nconst BLOCK_INSPECTOR_AREA = 'edit-post/block';\n\n/**\n * Component that renders the \"Edit navigation\" button for template parts\n * that contain navigation blocks.\n *\n * @param {Object} props Component props.\n * @param {string} props.clientId The template part block client ID.\n * @return {JSX.Element|null} The Edit navigation button component or null if not applicable.\n */\nfunction TemplatePartNavigationEditButton( { clientId } ) {\n\tconst { selectBlock, flashBlock } = useDispatch( blockEditorStore );\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\n\tconst {\n\t\thasNavigationBlocks,\n\t\tfirstNavigationBlockId,\n\t\tisNavigationEditable,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetClientIdsOfDescendants,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockEditingMode,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst descendants = getClientIdsOfDescendants( clientId );\n\t\t\tconst navigationBlocksInTemplatePart = descendants.filter(\n\t\t\t\t( blockId ) => getBlockName( blockId ) === NAVIGATION_BLOCK_NAME\n\t\t\t);\n\n\t\t\tconst _hasNavigationBlocks =\n\t\t\t\tnavigationBlocksInTemplatePart.length > 0;\n\t\t\tconst _firstNavigationBlockId = _hasNavigationBlocks\n\t\t\t\t? navigationBlocksInTemplatePart[ 0 ]\n\t\t\t\t: null;\n\n\t\t\treturn {\n\t\t\t\thasNavigationBlocks: _hasNavigationBlocks,\n\t\t\t\tfirstNavigationBlockId: _firstNavigationBlockId,\n\t\t\t\t// We can't use the useBlockEditingMode hook here because the current\n\t\t\t\t// context is the template part, not the navigation block.\n\t\t\t\tisNavigationEditable:\n\t\t\t\t\tgetBlockEditingMode( _firstNavigationBlockId ) !==\n\t\t\t\t\t'disabled',\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst onEditNavigation = useCallback( () => {\n\t\tif ( firstNavigationBlockId ) {\n\t\t\t// Select the first Navigation block\n\t\t\tselectBlock( firstNavigationBlockId );\n\n\t\t\t// Flash the block for 500ms to make it obvious\n\t\t\tflashBlock( firstNavigationBlockId, 500 );\n\n\t\t\t// Enable the complementary area (inspector)\n\t\t\tenableComplementaryArea( 'core', BLOCK_INSPECTOR_AREA );\n\t\t}\n\t}, [\n\t\tfirstNavigationBlockId,\n\t\tselectBlock,\n\t\tflashBlock,\n\t\tenableComplementaryArea,\n\t] );\n\n\t// Only show if template part contains navigation blocks and they are editable\n\tif ( ! hasNavigationBlocks || ! isNavigationEditable ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockToolbarLastItem>\n\t\t\t<ToolbarGroup>\n\t\t\t\t<ToolbarButton\n\t\t\t\t\tlabel={ __( 'Edit navigation' ) }\n\t\t\t\t\tonClick={ onEditNavigation }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Edit navigation' ) }\n\t\t\t\t</ToolbarButton>\n\t\t\t</ToolbarGroup>\n\t\t</BlockToolbarLastItem>\n\t);\n}\n\n/**\n * Higher-order component that adds the Edit navigation button to template part blocks.\n */\nconst withTemplatePartNavigationEditButton = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst isTemplatePart = props.name === TEMPLATE_PART_BLOCK_NAME;\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockEdit key=\"edit\" { ...props } />\n\t\t\t\t{ props.isSelected && isTemplatePart && (\n\t\t\t\t\t<TemplatePartNavigationEditButton\n\t\t\t\t\t\tclientId={ props.clientId }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t},\n\t'withTemplatePartNavigationEditButton'\n);\n\n// Register the filter.\naddFilter(\n\t'editor.BlockEdit',\n\t'core/editor/with-template-part-navigation-edit-button',\n\twithTemplatePartNavigationEditButton\n);\n", "/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport {\n\tInspectorAdvancedControls,\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n\tuseBlockEditingMode,\n} from '@wordpress/block-editor';\nimport { BaseControl, Button } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\t__EXPERIMENTAL_STYLE_PROPERTY,\n\tgetBlockType,\n\thasBlockSupport,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { useMemo, useCallback } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport setNestedValue from '../../utils/set-nested-value';\nimport { useGlobalStyles } from '../../components/global-styles/hooks';\n\nconst { cleanEmptyObject } = unlock( blockEditorPrivateApis );\n\n// Block Gap is a special case and isn't defined within the blocks\n// style properties config. We'll add it here to allow it to be pushed\n// to global styles as well.\nconst STYLE_PROPERTY = {\n\t...__EXPERIMENTAL_STYLE_PROPERTY,\n\tblockGap: { value: [ 'spacing', 'blockGap' ] },\n};\n\n// TODO: Temporary duplication of constant in @wordpress/block-editor. Can be\n// removed by moving PushChangesToGlobalStylesControl to\n// @wordpress/block-editor.\nconst STYLE_PATH_TO_CSS_VAR_INFIX = {\n\t'border.color': 'color',\n\t'color.background': 'color',\n\t'color.text': 'color',\n\t'elements.link.color.text': 'color',\n\t'elements.link.:hover.color.text': 'color',\n\t'elements.link.typography.fontFamily': 'font-family',\n\t'elements.link.typography.fontSize': 'font-size',\n\t'elements.button.color.text': 'color',\n\t'elements.button.color.background': 'color',\n\t'elements.button.typography.fontFamily': 'font-family',\n\t'elements.button.typography.fontSize': 'font-size',\n\t'elements.caption.color.text': 'color',\n\t'elements.heading.color': 'color',\n\t'elements.heading.color.background': 'color',\n\t'elements.heading.typography.fontFamily': 'font-family',\n\t'elements.heading.gradient': 'gradient',\n\t'elements.heading.color.gradient': 'gradient',\n\t'elements.h1.color': 'color',\n\t'elements.h1.color.background': 'color',\n\t'elements.h1.typography.fontFamily': 'font-family',\n\t'elements.h1.color.gradient': 'gradient',\n\t'elements.h2.color': 'color',\n\t'elements.h2.color.background': 'color',\n\t'elements.h2.typography.fontFamily': 'font-family',\n\t'elements.h2.color.gradient': 'gradient',\n\t'elements.h3.color': 'color',\n\t'elements.h3.color.background': 'color',\n\t'elements.h3.typography.fontFamily': 'font-family',\n\t'elements.h3.color.gradient': 'gradient',\n\t'elements.h4.color': 'color',\n\t'elements.h4.color.background': 'color',\n\t'elements.h4.typography.fontFamily': 'font-family',\n\t'elements.h4.color.gradient': 'gradient',\n\t'elements.h5.color': 'color',\n\t'elements.h5.color.background': 'color',\n\t'elements.h5.typography.fontFamily': 'font-family',\n\t'elements.h5.color.gradient': 'gradient',\n\t'elements.h6.color': 'color',\n\t'elements.h6.color.background': 'color',\n\t'elements.h6.typography.fontFamily': 'font-family',\n\t'elements.h6.color.gradient': 'gradient',\n\t'color.gradient': 'gradient',\n\tblockGap: 'spacing',\n\t'typography.fontSize': 'font-size',\n\t'typography.fontFamily': 'font-family',\n};\n\n// TODO: Temporary duplication of constant in @wordpress/block-editor. Can be\n// removed by moving PushChangesToGlobalStylesControl to\n// @wordpress/block-editor.\nconst STYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE = {\n\t'border.color': 'borderColor',\n\t'color.background': 'backgroundColor',\n\t'color.text': 'textColor',\n\t'color.gradient': 'gradient',\n\t'typography.fontSize': 'fontSize',\n\t'typography.fontFamily': 'fontFamily',\n};\n\nconst SUPPORTED_STYLES = [ 'border', 'color', 'spacing', 'typography' ];\n\nconst getValueFromObjectPath = ( object, path ) => {\n\tlet value = object;\n\tpath.forEach( ( fieldName ) => {\n\t\tvalue = value?.[ fieldName ];\n\t} );\n\treturn value;\n};\n\nconst flatBorderProperties = [ 'borderColor', 'borderWidth', 'borderStyle' ];\nconst sides = [ 'top', 'right', 'bottom', 'left' ];\n\nfunction getBorderStyleChanges( border, presetColor, userStyle ) {\n\tif ( ! border && ! presetColor ) {\n\t\treturn [];\n\t}\n\n\tconst changes = [\n\t\t...getFallbackBorderStyleChange( 'top', border, userStyle ),\n\t\t...getFallbackBorderStyleChange( 'right', border, userStyle ),\n\t\t...getFallbackBorderStyleChange( 'bottom', border, userStyle ),\n\t\t...getFallbackBorderStyleChange( 'left', border, userStyle ),\n\t];\n\n\t// Handle a flat border i.e. all sides the same, CSS shorthand.\n\tconst { color: customColor, style, width } = border || {};\n\tconst hasColorOrWidth = presetColor || customColor || width;\n\n\tif ( hasColorOrWidth && ! style ) {\n\t\t// Global Styles need individual side configurations to overcome\n\t\t// theme.json configurations which are per side as well.\n\t\tsides.forEach( ( side ) => {\n\t\t\t// Only add fallback border-style if global styles don't already\n\t\t\t// have something set.\n\t\t\tif ( ! userStyle?.[ side ]?.style ) {\n\t\t\t\tchanges.push( {\n\t\t\t\t\tpath: [ 'border', side, 'style' ],\n\t\t\t\t\tvalue: 'solid',\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t}\n\n\treturn changes;\n}\n\nfunction getFallbackBorderStyleChange( side, border, globalBorderStyle ) {\n\tif ( ! border?.[ side ] || globalBorderStyle?.[ side ]?.style ) {\n\t\treturn [];\n\t}\n\n\tconst { color, style, width } = border[ side ];\n\tconst hasColorOrWidth = color || width;\n\n\tif ( ! hasColorOrWidth || style ) {\n\t\treturn [];\n\t}\n\n\treturn [ { path: [ 'border', side, 'style' ], value: 'solid' } ];\n}\n\nfunction useChangesToPush( name, attributes, userConfig ) {\n\tconst supports = useSelect(\n\t\t( select ) => {\n\t\t\treturn unlock( select( blocksStore ) ).getSupportedStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\tconst blockUserConfig = userConfig?.styles?.blocks?.[ name ];\n\n\treturn useMemo( () => {\n\t\tconst changes = supports.flatMap( ( key ) => {\n\t\t\tif ( ! STYLE_PROPERTY[ key ] ) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\tconst { value: path } = STYLE_PROPERTY[ key ];\n\t\t\tconst presetAttributeKey = path.join( '.' );\n\t\t\tconst presetAttributeValue =\n\t\t\t\tattributes[\n\t\t\t\t\tSTYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE[ presetAttributeKey ]\n\t\t\t\t];\n\t\t\tconst value = presetAttributeValue\n\t\t\t\t? `var:preset|${ STYLE_PATH_TO_CSS_VAR_INFIX[ presetAttributeKey ] }|${ presetAttributeValue }`\n\t\t\t\t: getValueFromObjectPath( attributes.style, path );\n\n\t\t\t// Links only have a single support entry but have two element\n\t\t\t// style properties, color and hover color. The following check\n\t\t\t// will add the hover color to the changes if required.\n\t\t\tif ( key === 'linkColor' ) {\n\t\t\t\tconst linkChanges = value ? [ { path, value } ] : [];\n\t\t\t\tconst hoverPath = [\n\t\t\t\t\t'elements',\n\t\t\t\t\t'link',\n\t\t\t\t\t':hover',\n\t\t\t\t\t'color',\n\t\t\t\t\t'text',\n\t\t\t\t];\n\t\t\t\tconst hoverValue = getValueFromObjectPath(\n\t\t\t\t\tattributes.style,\n\t\t\t\t\thoverPath\n\t\t\t\t);\n\n\t\t\t\tif ( hoverValue ) {\n\t\t\t\t\tlinkChanges.push( { path: hoverPath, value: hoverValue } );\n\t\t\t\t}\n\n\t\t\t\treturn linkChanges;\n\t\t\t}\n\n\t\t\t// The shorthand border styles can't be mapped directly as global\n\t\t\t// styles requires longhand config.\n\t\t\tif ( flatBorderProperties.includes( key ) && value ) {\n\t\t\t\t// The shorthand config path is included to clear the block attribute.\n\t\t\t\tconst borderChanges = [ { path, value } ];\n\t\t\t\tsides.forEach( ( side ) => {\n\t\t\t\t\tconst currentPath = [ ...path ];\n\t\t\t\t\tcurrentPath.splice( -1, 0, side );\n\t\t\t\t\tborderChanges.push( { path: currentPath, value } );\n\t\t\t\t} );\n\t\t\t\treturn borderChanges;\n\t\t\t}\n\n\t\t\treturn value ? [ { path, value } ] : [];\n\t\t} );\n\n\t\t// To ensure display of a visible border, global styles require a\n\t\t// default border style if a border color or width is present.\n\t\tgetBorderStyleChanges(\n\t\t\tattributes.style?.border,\n\t\t\tattributes.borderColor,\n\t\t\tblockUserConfig?.border\n\t\t).forEach( ( change ) => changes.push( change ) );\n\n\t\treturn changes;\n\t}, [ supports, attributes, blockUserConfig ] );\n}\n\nfunction PushChangesToGlobalStylesControl( {\n\tname,\n\tattributes,\n\tsetAttributes,\n} ) {\n\tconst { user: userConfig, setUser: setUserConfig } = useGlobalStyles();\n\n\tconst changes = useChangesToPush( name, attributes, userConfig );\n\n\tconst { __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\n\tconst pushChanges = useCallback( () => {\n\t\tif ( changes.length === 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( changes.length > 0 ) {\n\t\t\tconst { style: blockStyles } = attributes;\n\n\t\t\tconst newBlockStyles = structuredClone( blockStyles );\n\t\t\tconst newUserConfig = structuredClone( userConfig );\n\n\t\t\tfor ( const { path, value } of changes ) {\n\t\t\t\tsetNestedValue( newBlockStyles, path, undefined );\n\t\t\t\tsetNestedValue(\n\t\t\t\t\tnewUserConfig,\n\t\t\t\t\t[ 'styles', 'blocks', name, ...path ],\n\t\t\t\t\tvalue\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst newBlockAttributes = {\n\t\t\t\tborderColor: undefined,\n\t\t\t\tbackgroundColor: undefined,\n\t\t\t\ttextColor: undefined,\n\t\t\t\tgradient: undefined,\n\t\t\t\tfontSize: undefined,\n\t\t\t\tfontFamily: undefined,\n\t\t\t\tstyle: cleanEmptyObject( newBlockStyles ),\n\t\t\t};\n\n\t\t\t// @wordpress/core-data doesn't support editing multiple entity types in\n\t\t\t// a single undo level. So for now, we disable @wordpress/core-data undo\n\t\t\t// tracking and implement our own Undo button in the snackbar\n\t\t\t// notification.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tsetAttributes( newBlockAttributes );\n\t\t\tsetUserConfig( newUserConfig, { undoIgnore: true } );\n\t\t\tcreateSuccessNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t// translators: %s: Title of the block e.g. 'Heading'.\n\t\t\t\t\t__( '%s styles applied.' ),\n\t\t\t\t\tgetBlockType( name ).title\n\t\t\t\t),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\tonClick() {\n\t\t\t\t\t\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\t\t\t\t\t\tsetAttributes( attributes );\n\t\t\t\t\t\t\t\tsetUserConfig( userConfig, {\n\t\t\t\t\t\t\t\t\tundoIgnore: true,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}, [\n\t\t__unstableMarkNextChangeAsNotPersistent,\n\t\tattributes,\n\t\tchanges,\n\t\tcreateSuccessNotice,\n\t\tname,\n\t\tsetAttributes,\n\t\tsetUserConfig,\n\t\tuserConfig,\n\t] );\n\n\treturn (\n\t\t<BaseControl\n\t\t\tclassName=\"editor-push-changes-to-global-styles-control\"\n\t\t\thelp={ sprintf(\n\t\t\t\t// translators: %s: Title of the block e.g. 'Heading'.\n\t\t\t\t__(\n\t\t\t\t\t'Apply this block\u2019s typography, spacing, dimensions, and color styles to all %s blocks.'\n\t\t\t\t),\n\t\t\t\tgetBlockType( name ).title\n\t\t\t) }\n\t\t>\n\t\t\t<BaseControl.VisualLabel>\n\t\t\t\t{ __( 'Styles' ) }\n\t\t\t</BaseControl.VisualLabel>\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\taccessibleWhenDisabled\n\t\t\t\tdisabled={ changes.length === 0 }\n\t\t\t\tonClick={ pushChanges }\n\t\t\t>\n\t\t\t\t{ __( 'Apply globally' ) }\n\t\t\t</Button>\n\t\t</BaseControl>\n\t);\n}\n\nfunction PushChangesToGlobalStyles( props ) {\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst isBlockBasedTheme = useSelect(\n\t\t( select ) => select( coreStore ).getCurrentTheme()?.is_block_theme,\n\t\t[]\n\t);\n\tconst supportsStyles = SUPPORTED_STYLES.some( ( feature ) =>\n\t\thasBlockSupport( props.name, feature )\n\t);\n\tconst isDisplayed =\n\t\tblockEditingMode === 'default' && supportsStyles && isBlockBasedTheme;\n\n\tif ( ! isDisplayed ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<InspectorAdvancedControls>\n\t\t\t<PushChangesToGlobalStylesControl { ...props } />\n\t\t</InspectorAdvancedControls>\n\t);\n}\n\nconst withPushChangesToGlobalStyles = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => (\n\t\t<>\n\t\t\t<BlockEdit key=\"edit\" { ...props } />\n\t\t\t{ props.isSelected && <PushChangesToGlobalStyles { ...props } /> }\n\t\t</>\n\t)\n);\n\naddFilter(\n\t'editor.BlockEdit',\n\t'core/editor/push-changes-to-global-styles',\n\twithPushChangesToGlobalStyles\n);\n", "/**\n * Sets the value at path of object.\n * If a portion of path doesn\u2019t exist, it\u2019s created.\n * Arrays are created for missing index properties while objects are created\n * for all other missing properties.\n *\n * This function intentionally mutates the input object.\n *\n * Inspired by _.set().\n *\n * @see https://lodash.com/docs/4.17.15#set\n *\n * @todo Needs to be deduplicated with its copy in `@wordpress/core-data`.\n *\n * @param {Object} object Object to modify\n * @param {Array} path Path of the property to set.\n * @param {*} value Value to set.\n */\nexport default function setNestedValue( object, path, value ) {\n\tif ( ! object || typeof object !== 'object' ) {\n\t\treturn object;\n\t}\n\n\tpath.reduce( ( acc, key, idx ) => {\n\t\tif ( acc[ key ] === undefined ) {\n\t\t\tif ( Number.isInteger( path[ idx + 1 ] ) ) {\n\t\t\t\tacc[ key ] = [];\n\t\t\t} else {\n\t\t\t\tacc[ key ] = {};\n\t\t\t}\n\t\t}\n\t\tif ( idx === path.length - 1 ) {\n\t\t\tacc[ key ] = value;\n\t\t}\n\t\treturn acc[ key ];\n\t}, object );\n\n\treturn object;\n}\n", "/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalUseSlotFills as useSlotFills,\n\tcreateSlotFill,\n} from '@wordpress/components';\n\n// Keeping an old name for backward compatibility.\nconst slotName = '__experimentalMainDashboardButton';\n\nexport const useHasBackButton = () => {\n\tconst fills = useSlotFills( slotName );\n\treturn Boolean( fills && fills.length );\n};\n\nconst { Fill, Slot } = createSlotFill( slotName );\n\nconst BackButton = Fill;\nconst BackButtonSlot = () => {\n\tconst fills = useSlotFills( slotName );\n\n\treturn (\n\t\t<Slot\n\t\t\tbubblesVirtually\n\t\t\tfillProps={ { length: ! fills ? 0 : fills.length } }\n\t\t/>\n\t);\n};\nBackButton.Slot = BackButtonSlot;\n\nexport default BackButton;\n", "/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { Notice } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\nimport { useRestoreBlockFromPath } from '../../utils/block-selection-path';\nimport EditorInterface from '../editor-interface';\nimport { ExperimentalEditorProvider } from '../provider';\nimport Sidebar from '../sidebar';\nimport NotesSidebar from '../collab-sidebar';\nimport GlobalStylesSidebar from '../global-styles-sidebar';\nimport { GlobalStylesRenderer } from '../global-styles-renderer';\n\nfunction Editor( {\n\tpostType,\n\tpostId,\n\ttemplateId,\n\tsettings,\n\tchildren,\n\tinitialEdits,\n\tinitialSelection,\n\n\t// This could be part of the settings.\n\tonActionPerformed,\n\n\t// The following abstractions are not ideal but necessary\n\t// to account for site editor and post editor differences for now.\n\textraContent,\n\textraSidebarPanels,\n\t...props\n} ) {\n\tconst {\n\t\tpost,\n\t\ttemplate,\n\t\thasLoadedPost,\n\t\terror,\n\t\tisBlockTheme,\n\t\tshowGlobalStyles,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEntityRecord,\n\t\t\t\tgetResolutionError,\n\t\t\t\thasFinishedResolution,\n\t\t\t\tgetCurrentTheme,\n\t\t\t\t__experimentalGetCurrentGlobalStylesId,\n\t\t\t\tcanUser,\n\t\t\t} = select( coreStore );\n\t\t\tconst { getRenderingMode, getCurrentPostType } =\n\t\t\t\tselect( editorStore );\n\n\t\t\tconst postArgs = [ 'postType', postType, postId ];\n\t\t\tconst renderingMode = getRenderingMode();\n\t\t\tconst currentPostType = getCurrentPostType();\n\t\t\tconst _isBlockTheme = getCurrentTheme()?.is_block_theme;\n\t\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\t\tconst userCanEditGlobalStyles = globalStylesId\n\t\t\t\t? canUser( 'update', {\n\t\t\t\t\t\tkind: 'root',\n\t\t\t\t\t\tname: 'globalStyles',\n\t\t\t\t\t\tid: globalStylesId,\n\t\t\t\t } )\n\t\t\t\t: false;\n\n\t\t\treturn {\n\t\t\t\tpost: getEntityRecord( ...postArgs ),\n\t\t\t\ttemplate: templateId\n\t\t\t\t\t? getEntityRecord(\n\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\t\t\ttemplateId\n\t\t\t\t\t )\n\t\t\t\t\t: undefined,\n\t\t\t\thasLoadedPost: hasFinishedResolution(\n\t\t\t\t\t'getEntityRecord',\n\t\t\t\t\tpostArgs\n\t\t\t\t),\n\t\t\t\terror: getResolutionError( 'getEntityRecord', postArgs )\n\t\t\t\t\t?.message,\n\t\t\t\tisBlockTheme: _isBlockTheme,\n\t\t\t\tshowGlobalStyles:\n\t\t\t\t\t_isBlockTheme &&\n\t\t\t\t\tuserCanEditGlobalStyles &&\n\t\t\t\t\t( currentPostType === 'wp_template' ||\n\t\t\t\t\t\trenderingMode === 'template-locked' ),\n\t\t\t};\n\t\t},\n\t\t[ postType, postId, templateId ]\n\t);\n\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\tconst restoreBlockFromPath = useRestoreBlockFromPath();\n\n\t// Restore initial block selection if provided (e.g., from navigation)\n\tuseEffect( () => {\n\t\tif ( ! initialSelection || ! hasLoadedPost || ! post ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Use setTimeout to ensure blocks are fully rendered before selecting\n\t\tconst timeoutId = setTimeout( () => {\n\t\t\tconst clientId = restoreBlockFromPath( initialSelection );\n\t\t\tif ( clientId ) {\n\t\t\t\tselectBlock( clientId );\n\t\t\t}\n\t\t}, 0 );\n\n\t\treturn () => clearTimeout( timeoutId );\n\t}, [\n\t\tinitialSelection,\n\t\thasLoadedPost,\n\t\tpost,\n\t\tselectBlock,\n\t\trestoreBlockFromPath,\n\t] );\n\n\treturn (\n\t\t<>\n\t\t\t{ hasLoadedPost && ! post && (\n\t\t\t\t<Notice\n\t\t\t\t\tstatus={ !! error ? 'error' : 'warning' }\n\t\t\t\t\tisDismissible={ false }\n\t\t\t\t>\n\t\t\t\t\t{ ! error\n\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\"You attempted to edit an item that doesn't exist. Perhaps it was deleted?\"\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: error }\n\t\t\t\t</Notice>\n\t\t\t) }\n\t\t\t{ !! post && (\n\t\t\t\t<ExperimentalEditorProvider\n\t\t\t\t\tpost={ post }\n\t\t\t\t\t__unstableTemplate={ template }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t>\n\t\t\t\t\t<EditorInterface { ...props }>\n\t\t\t\t\t\t{ extraContent }\n\t\t\t\t\t</EditorInterface>\n\t\t\t\t\t{ children }\n\t\t\t\t\t<Sidebar\n\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\textraPanels={ extraSidebarPanels }\n\t\t\t\t\t/>\n\t\t\t\t\t<NotesSidebar />\n\t\t\t\t\t{ isBlockTheme && <GlobalStylesRenderer /> }\n\t\t\t\t\t{ showGlobalStyles && <GlobalStylesSidebar /> }\n\t\t\t\t</ExperimentalEditorProvider>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default Editor;\n", "/**\n * WordPress dependencies\n */\nimport { useRegistry } from '@wordpress/data';\nimport { useCallback } from '@wordpress/element';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Hook that returns a function to generate a block path for a given block clientId.\n * The path is an array of steps from root to the target block,\n * where each step contains the block name and index within its parent.\n *\n * @return {Function} Function that takes a clientId and returns the block path or null.\n */\nexport function useGenerateBlockPath() {\n\tconst registry = useRegistry();\n\n\treturn useCallback(\n\t\t( clientId ) => {\n\t\t\tconst { getBlock, getBlockParents, getBlockOrder } =\n\t\t\t\tregistry.select( blockEditorStore );\n\n\t\t\tconst block = getBlock( clientId );\n\t\t\tif ( ! block ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst parents = getBlockParents( clientId );\n\t\t\tconst path = [];\n\n\t\t\t// Build the path from root to target\n\t\t\tconst hierarchy = [ ...parents, clientId ];\n\n\t\t\tfor ( let i = 0; i < hierarchy.length; i++ ) {\n\t\t\t\tconst currentClientId = hierarchy[ i ];\n\t\t\t\tconst currentBlock = getBlock( currentClientId );\n\n\t\t\t\tif ( ! currentBlock ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Get the parent's clientId (or null for root-level blocks)\n\t\t\t\tconst parentClientId = i > 0 ? hierarchy[ i - 1 ] : '';\n\n\t\t\t\t// Get siblings to determine index\n\t\t\t\tconst siblings = getBlockOrder( parentClientId );\n\t\t\t\tconst index = siblings.indexOf( currentClientId );\n\n\t\t\t\tif ( index === -1 ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tpath.push( {\n\t\t\t\t\tblockName: currentBlock.name,\n\t\t\t\t\tindex,\n\t\t\t\t\t// Store a simple content hash for verification (first 100 chars of serialized content)\n\t\t\t\t\tcontentHash: JSON.stringify(\n\t\t\t\t\t\tcurrentBlock.attributes\n\t\t\t\t\t).slice( 0, 100 ),\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn path;\n\t\t},\n\t\t[ registry ]\n\t);\n}\n\n/**\n * Hook that returns a function to restore a block selection using a previously generated block path.\n * Walks the path from root to target, matching block name and index at each level.\n *\n * @return {Function} Function that takes a path and returns the clientId or null.\n */\nexport function useRestoreBlockFromPath() {\n\tconst registry = useRegistry();\n\n\treturn useCallback(\n\t\t( path ) => {\n\t\t\tif ( ! path || ! Array.isArray( path ) || path.length === 0 ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst { getBlock, getBlockOrder } =\n\t\t\t\tregistry.select( blockEditorStore );\n\n\t\t\tlet currentParentId = ''; // Start at root\n\n\t\t\t// Walk through each step in the path\n\t\t\tfor ( let i = 0; i < path.length; i++ ) {\n\t\t\t\tconst step = path[ i ];\n\t\t\t\tconst siblings = getBlockOrder( currentParentId );\n\n\t\t\t\t// Check if the index is valid\n\t\t\t\tif ( step.index >= siblings.length ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tconst candidateClientId = siblings[ step.index ];\n\t\t\t\tconst candidateBlock = getBlock( candidateClientId );\n\n\t\t\t\tif ( ! candidateBlock ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Verify the block name matches\n\t\t\t\tif ( candidateBlock.name !== step.blockName ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Optional: verify content hash for additional confidence\n\t\t\t\t// (Skipping this for now as attributes might change slightly)\n\n\t\t\t\t// If this is the last step, we found our block\n\t\t\t\tif ( i === path.length - 1 ) {\n\t\t\t\t\treturn candidateClientId;\n\t\t\t\t}\n\n\t\t\t\t// Otherwise, continue to the next level\n\t\t\t\tcurrentParentId = candidateClientId;\n\t\t\t}\n\n\t\t\treturn null;\n\t\t},\n\t\t[ registry ]\n\t);\n}\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { InterfaceSkeleton, ComplementaryArea } from '@wordpress/interface';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { BlockBreadcrumb, BlockToolbar } from '@wordpress/block-editor';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useState, useCallback } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport EditorNotices from '../editor-notices';\nimport Header from '../header';\nimport InserterSidebar from '../inserter-sidebar';\nimport ListViewSidebar from '../list-view-sidebar';\nimport SavePublishPanels from '../save-publish-panels';\nimport TextEditor from '../text-editor';\nimport VisualEditor from '../visual-editor';\nimport StylesCanvas from '../styles-canvas';\n\nconst interfaceLabels = {\n\t/* translators: accessibility text for the editor top bar landmark region. */\n\theader: __( 'Editor top bar' ),\n\t/* translators: accessibility text for the editor content landmark region. */\n\tbody: __( 'Editor content' ),\n\t/* translators: accessibility text for the editor settings landmark region. */\n\tsidebar: __( 'Editor settings' ),\n\t/* translators: accessibility text for the editor publish landmark region. */\n\tactions: __( 'Editor publish' ),\n\t/* translators: accessibility text for the editor footer landmark region. */\n\tfooter: __( 'Editor footer' ),\n};\n\nexport default function EditorInterface( {\n\tclassName,\n\tchildren,\n\tforceIsDirty,\n\tcontentRef,\n\tdisableIframe,\n\tautoFocus,\n\tcustomSaveButton,\n\tcustomSavePanel,\n\tforceDisableBlockTools,\n\tiframeProps,\n} ) {\n\tconst {\n\t\tmode,\n\t\tisInserterOpened,\n\t\tisListViewOpened,\n\t\tisDistractionFree,\n\t\tisPreviewMode,\n\t\tshowBlockBreadcrumbs,\n\t\tpostTypeLabel,\n\t\tstylesPath,\n\t\tshowStylebook,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getEditorSettings, getPostTypeLabel } = select( editorStore );\n\t\tconst { getStylesPath, getShowStylebook } = unlock(\n\t\t\tselect( editorStore )\n\t\t);\n\t\tconst editorSettings = getEditorSettings();\n\n\t\tlet _mode = select( editorStore ).getEditorMode();\n\t\tif ( ! editorSettings.richEditingEnabled && _mode === 'visual' ) {\n\t\t\t_mode = 'text';\n\t\t}\n\t\tif ( ! editorSettings.codeEditingEnabled && _mode === 'text' ) {\n\t\t\t_mode = 'visual';\n\t\t}\n\n\t\treturn {\n\t\t\tmode: _mode,\n\t\t\tisInserterOpened: select( editorStore ).isInserterOpened(),\n\t\t\tisListViewOpened: select( editorStore ).isListViewOpened(),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tisPreviewMode: editorSettings.isPreviewMode,\n\t\t\tshowBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\n\t\t\tpostTypeLabel: getPostTypeLabel(),\n\t\t\tstylesPath: getStylesPath(),\n\t\t\tshowStylebook: getShowStylebook(),\n\t\t};\n\t}, [] );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst secondarySidebarLabel = isListViewOpened\n\t\t? __( 'Document Overview' )\n\t\t: __( 'Block Library' );\n\tconst shouldShowStylesCanvas =\n\t\tshowStylebook || stylesPath?.startsWith( '/revisions' );\n\n\t// Local state for save panel.\n\t// Note 'truthy' callback implies an open panel.\n\tconst [ entitiesSavedStatesCallback, setEntitiesSavedStatesCallback ] =\n\t\tuseState( false );\n\tconst closeEntitiesSavedStates = useCallback(\n\t\t( arg ) => {\n\t\t\tif ( typeof entitiesSavedStatesCallback === 'function' ) {\n\t\t\t\tentitiesSavedStatesCallback( arg );\n\t\t\t}\n\t\t\tsetEntitiesSavedStatesCallback( false );\n\t\t},\n\t\t[ entitiesSavedStatesCallback ]\n\t);\n\n\treturn (\n\t\t<InterfaceSkeleton\n\t\t\tisDistractionFree={ isDistractionFree }\n\t\t\tclassName={ clsx( 'editor-editor-interface', className, {\n\t\t\t\t'is-entity-save-view-open': !! entitiesSavedStatesCallback,\n\t\t\t\t'is-distraction-free': isDistractionFree && ! isPreviewMode,\n\t\t\t} ) }\n\t\t\tlabels={ {\n\t\t\t\t...interfaceLabels,\n\t\t\t\tsecondarySidebar: secondarySidebarLabel,\n\t\t\t} }\n\t\t\theader={\n\t\t\t\t! isPreviewMode && (\n\t\t\t\t\t<Header\n\t\t\t\t\t\tforceIsDirty={ forceIsDirty }\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcustomSaveButton={ customSaveButton }\n\t\t\t\t\t\tforceDisableBlockTools={ forceDisableBlockTools }\n\t\t\t\t\t/>\n\t\t\t\t)\n\t\t\t}\n\t\t\teditorNotices={ <EditorNotices /> }\n\t\t\tsecondarySidebar={\n\t\t\t\t! isPreviewMode &&\n\t\t\t\tmode === 'visual' &&\n\t\t\t\t( ( isInserterOpened && <InserterSidebar /> ) ||\n\t\t\t\t\t( isListViewOpened && <ListViewSidebar /> ) )\n\t\t\t}\n\t\t\tsidebar={\n\t\t\t\t! isPreviewMode &&\n\t\t\t\t! isDistractionFree && <ComplementaryArea.Slot scope=\"core\" />\n\t\t\t}\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t{ ! isDistractionFree && ! isPreviewMode && (\n\t\t\t\t\t\t<EditorNotices />\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ shouldShowStylesCanvas ? (\n\t\t\t\t\t\t<StylesCanvas />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ ! isPreviewMode && mode === 'text' && (\n\t\t\t\t\t\t\t\t<TextEditor\n\t\t\t\t\t\t\t\t\t// We should auto-focus the canvas (title) on load.\n\t\t\t\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\t\t\t\t\t\tautoFocus={ autoFocus }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ ! isPreviewMode &&\n\t\t\t\t\t\t\t\t! isLargeViewport &&\n\t\t\t\t\t\t\t\tmode === 'visual' && (\n\t\t\t\t\t\t\t\t\t<BlockToolbar hideDragHandle />\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ ( isPreviewMode || mode === 'visual' ) && (\n\t\t\t\t\t\t\t\t<VisualEditor\n\t\t\t\t\t\t\t\t\tcontentRef={ contentRef }\n\t\t\t\t\t\t\t\t\tdisableIframe={ disableIframe }\n\t\t\t\t\t\t\t\t\t// We should auto-focus the canvas (title) on load.\n\t\t\t\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\t\t\t\t\t\tautoFocus={ autoFocus }\n\t\t\t\t\t\t\t\t\tiframeProps={ iframeProps }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\t! isPreviewMode &&\n\t\t\t\t! isDistractionFree &&\n\t\t\t\tisLargeViewport &&\n\t\t\t\tshowBlockBreadcrumbs &&\n\t\t\t\tmode === 'visual' && (\n\t\t\t\t\t<BlockBreadcrumb\n\t\t\t\t\t\trootLabelText={\n\t\t\t\t\t\t\tpostTypeLabel\n\t\t\t\t\t\t\t\t? decodeEntities( postTypeLabel )\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t)\n\t\t\t}\n\t\t\tactions={\n\t\t\t\t! isPreviewMode\n\t\t\t\t\t? customSavePanel || (\n\t\t\t\t\t\t\t<SavePublishPanels\n\t\t\t\t\t\t\t\tcloseEntitiesSavedStates={\n\t\t\t\t\t\t\t\t\tcloseEntitiesSavedStates\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tisEntitiesSavedStatesOpen={\n\t\t\t\t\t\t\t\t\tentitiesSavedStatesCallback\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tforceIsDirtyPublishPanel={ forceIsDirty }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t )\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t/>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { useMediaQuery, useViewportMatch } from '@wordpress/compose';\nimport { __unstableMotion as motion } from '@wordpress/components';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { useState } from '@wordpress/element';\nimport { PinnedItems } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport BackButton, { useHasBackButton } from './back-button';\nimport CollapsibleBlockToolbar from '../collapsible-block-toolbar';\nimport DocumentBar from '../document-bar';\nimport DocumentTools from '../document-tools';\nimport MoreMenu from '../more-menu';\nimport PostPreviewButton from '../post-preview-button';\nimport PostPublishButtonOrToggle from '../post-publish-button/post-publish-button-or-toggle';\nimport PostSavedState from '../post-saved-state';\nimport PostViewLink from '../post-view-link';\nimport PreviewDropdown from '../preview-dropdown';\nimport ZoomOutToggle from '../zoom-out-toggle';\nimport { store as editorStore } from '../../store';\nimport {\n\tTEMPLATE_PART_POST_TYPE,\n\tPATTERN_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n} from '../../store/constants';\nimport { unlock } from '../../lock-unlock';\n\nconst toolbarVariations = {\n\tdistractionFreeDisabled: { y: '-50px' },\n\tdistractionFreeHover: { y: 0 },\n\tdistractionFreeHidden: { y: '-50px' },\n\tvisible: { y: 0 },\n\thidden: { y: 0 },\n};\n\nconst backButtonVariations = {\n\tdistractionFreeDisabled: { x: '-100%' },\n\tdistractionFreeHover: { x: 0 },\n\tdistractionFreeHidden: { x: '-100%' },\n\tvisible: { x: 0 },\n\thidden: { x: 0 },\n};\n\nfunction Header( {\n\tcustomSaveButton,\n\tforceIsDirty,\n\tsetEntitiesSavedStatesCallback,\n} ) {\n\tconst isWideViewport = useViewportMatch( 'large' );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst isTooNarrowForDocumentBar = useMediaQuery( '(max-width: 403px)' );\n\tconst {\n\t\tpostType,\n\t\tisTextEditor,\n\t\tisPublishSidebarOpened,\n\t\tshowIconLabels,\n\t\thasFixedToolbar,\n\t\thasBlockSelection,\n\t\thasSectionRootClientId,\n\t\tisStylesCanvasActive,\n\t} = useSelect( ( select ) => {\n\t\tconst { get: getPreference } = select( preferencesStore );\n\t\tconst {\n\t\t\tgetEditorMode,\n\t\t\tgetCurrentPostType,\n\t\t\tisPublishSidebarOpened: _isPublishSidebarOpened,\n\t\t} = select( editorStore );\n\t\tconst { getStylesPath, getShowStylebook } = unlock(\n\t\t\tselect( editorStore )\n\t\t);\n\t\tconst { getBlockSelectionStart, getSectionRootClientId } = unlock(\n\t\t\tselect( blockEditorStore )\n\t\t);\n\n\t\treturn {\n\t\t\tpostType: getCurrentPostType(),\n\t\t\tisTextEditor: getEditorMode() === 'text',\n\t\t\tisPublishSidebarOpened: _isPublishSidebarOpened(),\n\t\t\tshowIconLabels: getPreference( 'core', 'showIconLabels' ),\n\t\t\thasFixedToolbar: getPreference( 'core', 'fixedToolbar' ),\n\t\t\thasBlockSelection: !! getBlockSelectionStart(),\n\t\t\thasSectionRootClientId: !! getSectionRootClientId(),\n\t\t\tisStylesCanvasActive:\n\t\t\t\t!! getStylesPath()?.startsWith( '/revisions' ) ||\n\t\t\t\tgetShowStylebook(),\n\t\t};\n\t}, [] );\n\n\tconst canBeZoomedOut =\n\t\t[ 'post', 'page', 'wp_template' ].includes( postType ) &&\n\t\thasSectionRootClientId;\n\n\tconst disablePreviewOption =\n\t\t[\n\t\t\tNAVIGATION_POST_TYPE,\n\t\t\tTEMPLATE_PART_POST_TYPE,\n\t\t\tPATTERN_POST_TYPE,\n\t\t].includes( postType ) || isStylesCanvasActive;\n\n\tconst [ isBlockToolsCollapsed, setIsBlockToolsCollapsed ] =\n\t\tuseState( true );\n\n\tconst hasCenter =\n\t\t! isTooNarrowForDocumentBar &&\n\t\t( ! hasFixedToolbar ||\n\t\t\t( hasFixedToolbar &&\n\t\t\t\t( ! hasBlockSelection || isBlockToolsCollapsed ) ) );\n\tconst hasBackButton = useHasBackButton();\n\n\t/*\n\t * The edit-post-header classname is only kept for backward compatibility\n\t * as some plugins might be relying on its presence.\n\t */\n\treturn (\n\t\t<div className=\"editor-header edit-post-header\">\n\t\t\t{ hasBackButton && (\n\t\t\t\t<motion.div\n\t\t\t\t\tclassName=\"editor-header__back-button\"\n\t\t\t\t\tvariants={ backButtonVariations }\n\t\t\t\t\ttransition={ { type: 'tween' } }\n\t\t\t\t>\n\t\t\t\t\t<BackButton.Slot />\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t\t<motion.div\n\t\t\t\tvariants={ toolbarVariations }\n\t\t\t\tclassName=\"editor-header__toolbar\"\n\t\t\t\ttransition={ { type: 'tween' } }\n\t\t\t>\n\t\t\t\t<DocumentTools\n\t\t\t\t\tdisableBlockTools={ isStylesCanvasActive || isTextEditor }\n\t\t\t\t/>\n\t\t\t\t{ hasFixedToolbar && isLargeViewport && (\n\t\t\t\t\t<CollapsibleBlockToolbar\n\t\t\t\t\t\tisCollapsed={ isBlockToolsCollapsed }\n\t\t\t\t\t\tonToggle={ setIsBlockToolsCollapsed }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</motion.div>\n\t\t\t{ hasCenter && (\n\t\t\t\t<motion.div\n\t\t\t\t\tclassName=\"editor-header__center\"\n\t\t\t\t\tvariants={ toolbarVariations }\n\t\t\t\t\ttransition={ { type: 'tween' } }\n\t\t\t\t>\n\t\t\t\t\t<DocumentBar />\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t\t<motion.div\n\t\t\t\tvariants={ toolbarVariations }\n\t\t\t\ttransition={ { type: 'tween' } }\n\t\t\t\tclassName=\"editor-header__settings\"\n\t\t\t>\n\t\t\t\t{ ! customSaveButton && ! isPublishSidebarOpened && (\n\t\t\t\t\t/*\n\t\t\t\t\t * This button isn't completely hidden by the publish sidebar.\n\t\t\t\t\t * We can't hide the whole toolbar when the publish sidebar is open because\n\t\t\t\t\t * we want to prevent mounting/unmounting the PostPublishButtonOrToggle DOM node.\n\t\t\t\t\t * We track that DOM node to return focus to the PostPublishButtonOrToggle\n\t\t\t\t\t * when the publish sidebar has been closed.\n\t\t\t\t\t */\n\t\t\t\t\t<PostSavedState forceIsDirty={ forceIsDirty } />\n\t\t\t\t) }\n\n\t\t\t\t<PostViewLink />\n\n\t\t\t\t<PreviewDropdown\n\t\t\t\t\tforceIsAutosaveable={ forceIsDirty }\n\t\t\t\t\tdisabled={ disablePreviewOption }\n\t\t\t\t/>\n\n\t\t\t\t<PostPreviewButton\n\t\t\t\t\tclassName=\"editor-header__post-preview-button\"\n\t\t\t\t\tforceIsAutosaveable={ forceIsDirty }\n\t\t\t\t/>\n\n\t\t\t\t{ isWideViewport && canBeZoomedOut && (\n\t\t\t\t\t<ZoomOutToggle disabled={ isStylesCanvasActive } />\n\t\t\t\t) }\n\n\t\t\t\t{ ( isWideViewport || ! showIconLabels ) && (\n\t\t\t\t\t<PinnedItems.Slot scope=\"core\" />\n\t\t\t\t) }\n\n\t\t\t\t{ ! customSaveButton && (\n\t\t\t\t\t<PostPublishButtonOrToggle\n\t\t\t\t\t\tforceIsDirty={ forceIsDirty }\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ customSaveButton }\n\t\t\t\t<MoreMenu />\n\t\t\t</motion.div>\n\t\t</div>\n\t);\n}\n\nexport default Header;\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tBlockToolbar,\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { useEffect } from '@wordpress/element';\nimport { Button, Popover } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { next, previous } from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useHasBlockToolbar } = unlock( blockEditorPrivateApis );\n\nexport default function CollapsibleBlockToolbar( { isCollapsed, onToggle } ) {\n\tconst { blockSelectionStart } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tblockSelectionStart:\n\t\t\t\tselect( blockEditorStore ).getBlockSelectionStart(),\n\t\t};\n\t}, [] );\n\tconst hasBlockToolbar = useHasBlockToolbar();\n\n\tconst hasBlockSelection = !! blockSelectionStart;\n\n\tuseEffect( () => {\n\t\t// If we have a new block selection, show the block tools\n\t\tif ( blockSelectionStart ) {\n\t\t\tonToggle( false );\n\t\t}\n\t}, [ blockSelectionStart, onToggle ] );\n\n\tif ( ! hasBlockToolbar ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<div\n\t\t\t\tclassName={ clsx( 'editor-collapsible-block-toolbar', {\n\t\t\t\t\t'is-collapsed': isCollapsed || ! hasBlockSelection,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<BlockToolbar hideDragHandle />\n\t\t\t</div>\n\t\t\t<Popover.Slot name=\"block-toolbar\" />\n\n\t\t\t<Button\n\t\t\t\tclassName=\"editor-collapsible-block-toolbar__toggle\"\n\t\t\t\ticon={ isCollapsed ? next : previous }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tonToggle( ! isCollapsed );\n\t\t\t\t} }\n\t\t\t\tlabel={\n\t\t\t\t\tisCollapsed\n\t\t\t\t\t\t? __( 'Show block tools' )\n\t\t\t\t\t\t: __( 'Hide block tools' )\n\t\t\t\t}\n\t\t\t\tsize=\"compact\"\n\t\t\t/>\n\t\t</>\n\t);\n}\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\nimport { NavigableToolbar } from '@wordpress/block-editor';\nimport { ToolbarButton, ToolbarItem } from '@wordpress/components';\nimport { listView, plus } from '@wordpress/icons';\nimport { useCallback } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\nimport EditorHistoryRedo from '../editor-history/redo';\nimport EditorHistoryUndo from '../editor-history/undo';\n\nfunction DocumentTools( { className, disableBlockTools = false } ) {\n\tconst { setIsInserterOpened, setIsListViewOpened } =\n\t\tuseDispatch( editorStore );\n\tconst {\n\t\tisDistractionFree,\n\t\tisInserterOpened,\n\t\tisListViewOpen,\n\t\tlistViewShortcut,\n\t\tinserterSidebarToggleRef,\n\t\tlistViewToggleRef,\n\t\tshowIconLabels,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst {\n\t\t\tisListViewOpened,\n\t\t\tgetEditorMode,\n\t\t\tgetInserterSidebarToggleRef,\n\t\t\tgetListViewToggleRef,\n\t\t} = unlock( select( editorStore ) );\n\t\tconst { getShortcutRepresentation } = select( keyboardShortcutsStore );\n\n\t\treturn {\n\t\t\tisInserterOpened: select( editorStore ).isInserterOpened(),\n\t\t\tisListViewOpen: isListViewOpened(),\n\t\t\tlistViewShortcut: getShortcutRepresentation(\n\t\t\t\t'core/editor/toggle-list-view'\n\t\t\t),\n\t\t\tinserterSidebarToggleRef: getInserterSidebarToggleRef(),\n\t\t\tlistViewToggleRef: getListViewToggleRef(),\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tisVisualMode: getEditorMode() === 'visual',\n\t\t};\n\t}, [] );\n\n\tconst preventDefault = ( event ) => {\n\t\t// Because the inserter behaves like a dialog,\n\t\t// if the inserter is opened already then when we click on the toggle button\n\t\t// then the initial click event will close the inserter and then be propagated\n\t\t// to the inserter toggle and it will open it again.\n\t\t// To prevent this we need to stop the propagation of the event.\n\t\t// This won't be necessary when the inserter no longer behaves like a dialog.\n\n\t\tif ( isInserterOpened ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t};\n\n\tconst isWideViewport = useViewportMatch( 'wide' );\n\n\t/* translators: accessibility text for the editor toolbar */\n\tconst toolbarAriaLabel = __( 'Document tools' );\n\n\tconst toggleListView = useCallback(\n\t\t() => setIsListViewOpened( ! isListViewOpen ),\n\t\t[ setIsListViewOpened, isListViewOpen ]\n\t);\n\n\tconst toggleInserter = useCallback(\n\t\t() => setIsInserterOpened( ! isInserterOpened ),\n\t\t[ isInserterOpened, setIsInserterOpened ]\n\t);\n\n\t/* translators: button label text should, if possible, be under 16 characters. */\n\tconst longLabel = _x(\n\t\t'Block Inserter',\n\t\t'Generic label for block inserter button'\n\t);\n\tconst shortLabel = ! isInserterOpened ? __( 'Add' ) : __( 'Close' );\n\n\treturn (\n\t\t// Some plugins expect and use the `edit-post-header-toolbar` CSS class to\n\t\t// find the toolbar and inject UI elements into it. This is not officially\n\t\t// supported, but we're keeping it in the list of class names for backwards\n\t\t// compatibility.\n\t\t<NavigableToolbar\n\t\t\tclassName={ clsx(\n\t\t\t\t'editor-document-tools',\n\t\t\t\t'edit-post-header-toolbar',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\taria-label={ toolbarAriaLabel }\n\t\t\tvariant=\"unstyled\"\n\t\t>\n\t\t\t<div className=\"editor-document-tools__left\">\n\t\t\t\t{ ! isDistractionFree && (\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tref={ inserterSidebarToggleRef }\n\t\t\t\t\t\tclassName=\"editor-document-tools__inserter-toggle\"\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tisPressed={ isInserterOpened }\n\t\t\t\t\t\tonMouseDown={ preventDefault }\n\t\t\t\t\t\tonClick={ toggleInserter }\n\t\t\t\t\t\tdisabled={ disableBlockTools }\n\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\tlabel={ showIconLabels ? shortLabel : longLabel }\n\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\taria-expanded={ isInserterOpened }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ ( isWideViewport || ! showIconLabels ) && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\tas={ EditorHistoryUndo }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\tas={ EditorHistoryRedo }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ ! isDistractionFree && (\n\t\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\t\tclassName=\"editor-document-tools__document-overview-toggle\"\n\t\t\t\t\t\t\t\ticon={ listView }\n\t\t\t\t\t\t\t\tdisabled={ disableBlockTools }\n\t\t\t\t\t\t\t\tisPressed={ isListViewOpen }\n\t\t\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\t\t\tlabel={ __( 'Document Overview' ) }\n\t\t\t\t\t\t\t\tonClick={ toggleListView }\n\t\t\t\t\t\t\t\tshortcut={ listViewShortcut }\n\t\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\tshowIconLabels ? 'tertiary' : undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\taria-expanded={ isListViewOpen }\n\t\t\t\t\t\t\t\tref={ listViewToggleRef }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</NavigableToolbar>\n\t);\n}\n\nexport default DocumentTools;\n", "/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { external, moreVertical } from '@wordpress/icons';\nimport {\n\tMenuGroup,\n\tMenuItem,\n\tVisuallyHidden,\n\tDropdownMenu,\n} from '@wordpress/components';\nimport {\n\tPreferenceToggleMenuItem,\n\tstore as preferencesStore,\n} from '@wordpress/preferences';\nimport { store as interfaceStore, ActionItem } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport CopyContentMenuItem from './copy-content-menu-item';\nimport ModeSwitcher from '../mode-switcher';\nimport ToolsMoreMenuGroup from './tools-more-menu-group';\nimport ViewMoreMenuGroup from './view-more-menu-group';\nimport { store as editorStore } from '../../store';\n\nexport default function MoreMenu() {\n\tconst { openModal } = useDispatch( interfaceStore );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\tconst { toggleDistractionFree } = useDispatch( editorStore );\n\tconst showIconLabels = useSelect(\n\t\t( select ) =>\n\t\t\tselect( preferencesStore ).get( 'core', 'showIconLabels' ),\n\t\t[]\n\t);\n\n\tconst turnOffDistractionFree = () => {\n\t\tsetPreference( 'core', 'distractionFree', false );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<DropdownMenu\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tlabel={ __( 'Options' ) }\n\t\t\t\tpopoverProps={ {\n\t\t\t\t\tplacement: 'bottom-end',\n\t\t\t\t\tclassName: 'more-menu-dropdown__content',\n\t\t\t\t} }\n\t\t\t\ttoggleProps={ {\n\t\t\t\t\tshowTooltip: ! showIconLabels,\n\t\t\t\t\t...( showIconLabels && { variant: 'tertiary' } ),\n\t\t\t\t\ttooltipPosition: 'bottom',\n\t\t\t\t\tsize: 'compact',\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup label={ _x( 'View', 'noun' ) }>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tname=\"fixedToolbar\"\n\t\t\t\t\t\t\t\tonToggle={ turnOffDistractionFree }\n\t\t\t\t\t\t\t\tlabel={ __( 'Top toolbar' ) }\n\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t'Access all block and document tools in a single place'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Top toolbar activated.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Top toolbar deactivated.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tname=\"distractionFree\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Distraction free' ) }\n\t\t\t\t\t\t\t\tinfo={ __( 'Write with calmness' ) }\n\t\t\t\t\t\t\t\thandleToggling={ false }\n\t\t\t\t\t\t\t\tonToggle={ () =>\n\t\t\t\t\t\t\t\t\ttoggleDistractionFree( {\n\t\t\t\t\t\t\t\t\t\tcreateNotice: false,\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Distraction free mode activated.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Distraction free mode deactivated.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.primaryShift(\n\t\t\t\t\t\t\t\t\t'\\\\'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tname=\"focusMode\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Spotlight mode' ) }\n\t\t\t\t\t\t\t\tinfo={ __( 'Focus on one block at a time' ) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Spotlight mode activated.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Spotlight mode deactivated.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<ViewMoreMenuGroup.Slot fillProps={ { onClose } } />\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<ModeSwitcher />\n\t\t\t\t\t\t<ActionItem.Slot\n\t\t\t\t\t\t\tname=\"core/plugin-more-menu\"\n\t\t\t\t\t\t\tlabel={ __( 'Panels' ) }\n\t\t\t\t\t\t\tfillProps={ { onClick: onClose } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<MenuGroup label={ __( 'Tools' ) }>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\topenModal( 'editor/keyboard-shortcut-help' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.access( 'h' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Keyboard shortcuts' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<CopyContentMenuItem />\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/wordpress-block-editor/'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Help' ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<ToolsMoreMenuGroup.Slot\n\t\t\t\t\t\t\t\tfillProps={ { onClose } }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\topenModal( 'editor/preferences' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Preferences' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __unstableSerializeAndClean } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function CopyContentMenuItem() {\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst { getCurrentPostId, getCurrentPostType } = useSelect( editorStore );\n\tconst { getEditedEntityRecord } = useSelect( coreStore );\n\n\tfunction getText() {\n\t\tconst record = getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\tgetCurrentPostType(),\n\t\t\tgetCurrentPostId()\n\t\t);\n\t\tif ( ! record ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif ( typeof record.content === 'function' ) {\n\t\t\treturn record.content( record );\n\t\t} else if ( record.blocks ) {\n\t\t\treturn __unstableSerializeAndClean( record.blocks );\n\t\t} else if ( record.content ) {\n\t\t\treturn record.content;\n\t\t}\n\t}\n\n\tfunction onSuccess() {\n\t\tcreateNotice( 'info', __( 'All content copied.' ), {\n\t\t\tisDismissible: true,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t}\n\n\tconst ref = useCopyToClipboard( getText, onSuccess );\n\n\treturn <MenuItem ref={ ref }>{ __( 'Copy all blocks' ) }</MenuItem>;\n}\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { MenuItemsChoice, MenuGroup } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Set of available mode options.\n *\n * @type {Array}\n */\nconst MODES = [\n\t{\n\t\tvalue: 'visual',\n\t\tlabel: __( 'Visual editor' ),\n\t},\n\t{\n\t\tvalue: 'text',\n\t\tlabel: __( 'Code editor' ),\n\t},\n];\n\nfunction ModeSwitcher() {\n\tconst { shortcut, isRichEditingEnabled, isCodeEditingEnabled, mode } =\n\t\tuseSelect(\n\t\t\t( select ) => ( {\n\t\t\t\tshortcut: select(\n\t\t\t\t\tkeyboardShortcutsStore\n\t\t\t\t).getShortcutRepresentation( 'core/editor/toggle-mode' ),\n\t\t\t\tisRichEditingEnabled:\n\t\t\t\t\tselect( editorStore ).getEditorSettings()\n\t\t\t\t\t\t.richEditingEnabled,\n\t\t\t\tisCodeEditingEnabled:\n\t\t\t\t\tselect( editorStore ).getEditorSettings()\n\t\t\t\t\t\t.codeEditingEnabled,\n\t\t\t\tmode: select( editorStore ).getEditorMode(),\n\t\t\t} ),\n\t\t\t[]\n\t\t);\n\tconst { switchEditorMode } = useDispatch( editorStore );\n\n\tlet selectedMode = mode;\n\tif ( ! isRichEditingEnabled && mode === 'visual' ) {\n\t\tselectedMode = 'text';\n\t}\n\tif ( ! isCodeEditingEnabled && mode === 'text' ) {\n\t\tselectedMode = 'visual';\n\t}\n\n\tconst choices = MODES.map( ( choice ) => {\n\t\tif ( ! isCodeEditingEnabled && choice.value === 'text' ) {\n\t\t\tchoice = {\n\t\t\t\t...choice,\n\t\t\t\tdisabled: true,\n\t\t\t};\n\t\t}\n\t\tif ( ! isRichEditingEnabled && choice.value === 'visual' ) {\n\t\t\tchoice = {\n\t\t\t\t...choice,\n\t\t\t\tdisabled: true,\n\t\t\t\tinfo: __(\n\t\t\t\t\t'You can enable the visual editor in your profile settings.'\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\t\tif ( choice.value !== selectedMode && ! choice.disabled ) {\n\t\t\treturn { ...choice, shortcut };\n\t\t}\n\t\treturn choice;\n\t} );\n\n\treturn (\n\t\t<MenuGroup label={ __( 'Editor' ) }>\n\t\t\t<MenuItemsChoice\n\t\t\t\tchoices={ choices }\n\t\t\t\tvalue={ selectedMode }\n\t\t\t\tonSelect={ switchEditorMode }\n\t\t\t/>\n\t\t</MenuGroup>\n\t);\n}\n\nexport default ModeSwitcher;\n", "/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\nconst { Fill: ToolsMoreMenuGroup, Slot } =\n\tcreateSlotFill( 'ToolsMoreMenuGroup' );\n\nToolsMoreMenuGroup.Slot = ( { fillProps } ) => <Slot fillProps={ fillProps } />;\n\nexport default ToolsMoreMenuGroup;\n", "/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\nimport { Platform } from '@wordpress/element';\n\nconst { Fill: ViewMoreMenuGroup, Slot } = createSlotFill(\n\tPlatform.OS === 'web' ? Symbol( 'ViewMoreMenuGroup' ) : 'ViewMoreMenuGroup'\n);\n\nViewMoreMenuGroup.Slot = ( { fillProps } ) => <Slot fillProps={ fillProps } />;\n\nexport default ViewMoreMenuGroup;\n", "/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostPublishButton from './index';\nimport { store as editorStore } from '../../store';\n\nconst IS_TOGGLE = 'toggle';\nconst IS_BUTTON = 'button';\n\nexport default function PostPublishButtonOrToggle( {\n\tforceIsDirty,\n\tsetEntitiesSavedStatesCallback,\n} ) {\n\tlet component;\n\tconst isSmallerThanMediumViewport = useViewportMatch( 'medium', '<' );\n\tconst { togglePublishSidebar } = useDispatch( editorStore );\n\tconst {\n\t\thasPublishAction,\n\t\tisBeingScheduled,\n\t\tisPending,\n\t\tisPublished,\n\t\tisPublishSidebarEnabled,\n\t\tisPublishSidebarOpened,\n\t\tisScheduled,\n\t\tpostStatus,\n\t\tpostStatusHasChanged,\n\t} = useSelect( ( select ) => {\n\t\treturn {\n\t\t\thasPublishAction:\n\t\t\t\t!! select( editorStore ).getCurrentPost()?._links?.[\n\t\t\t\t\t'wp:action-publish'\n\t\t\t\t],\n\t\t\tisBeingScheduled:\n\t\t\t\tselect( editorStore ).isEditedPostBeingScheduled(),\n\t\t\tisPending: select( editorStore ).isCurrentPostPending(),\n\t\t\tisPublished: select( editorStore ).isCurrentPostPublished(),\n\t\t\tisPublishSidebarEnabled:\n\t\t\t\tselect( editorStore ).isPublishSidebarEnabled(),\n\t\t\tisPublishSidebarOpened:\n\t\t\t\tselect( editorStore ).isPublishSidebarOpened(),\n\t\t\tisScheduled: select( editorStore ).isCurrentPostScheduled(),\n\t\t\tpostStatus:\n\t\t\t\tselect( editorStore ).getEditedPostAttribute( 'status' ),\n\t\t\tpostStatusHasChanged: select( editorStore ).getPostEdits()?.status,\n\t\t};\n\t}, [] );\n\n\t/**\n\t * Conditions to show a BUTTON (publish directly) or a TOGGLE (open publish sidebar):\n\t *\n\t * 1) We want to show a BUTTON when the post status is at the _final stage_\n\t * for a particular role (see https://wordpress.org/documentation/article/post-status/):\n\t *\n\t * - is published\n\t * - post status has changed explicitly to something different than 'future' or 'publish'\n\t * - is scheduled to be published\n\t * - is pending and can't be published (but only for viewports >= medium).\n\t * \t Originally, we considered showing a button for pending posts that couldn't be published\n\t * \t (for example, for an author with the contributor role). Some languages can have\n\t * \t long translations for \"Submit for review\", so given the lack of UI real estate available\n\t * \t we decided to take into account the viewport in that case.\n\t * \t See: https://github.com/WordPress/gutenberg/issues/10475\n\t *\n\t * 2) Then, in small viewports, we'll show a TOGGLE.\n\t *\n\t * 3) Finally, we'll use the publish sidebar status to decide:\n\t *\n\t * - if it is enabled, we show a TOGGLE\n\t * - if it is disabled, we show a BUTTON\n\t */\n\tif (\n\t\tisPublished ||\n\t\t( postStatusHasChanged &&\n\t\t\t! [ 'future', 'publish' ].includes( postStatus ) ) ||\n\t\t( isScheduled && isBeingScheduled ) ||\n\t\t( isPending && ! hasPublishAction && ! isSmallerThanMediumViewport )\n\t) {\n\t\tcomponent = IS_BUTTON;\n\t} else if ( isSmallerThanMediumViewport || isPublishSidebarEnabled ) {\n\t\tcomponent = IS_TOGGLE;\n\t} else {\n\t\tcomponent = IS_BUTTON;\n\t}\n\n\treturn (\n\t\t<PostPublishButton\n\t\t\tforceIsDirty={ forceIsDirty }\n\t\t\tisOpen={ isPublishSidebarOpened }\n\t\t\tisToggle={ component === IS_TOGGLE }\n\t\t\tonToggle={ togglePublishSidebar }\n\t\t\tsetEntitiesSavedStatesCallback={ setEntitiesSavedStatesCallback }\n\t\t/>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { external } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function PostViewLink() {\n\tconst { hasLoaded, permalink, isPublished, label, showIconLabels } =\n\t\tuseSelect( ( select ) => {\n\t\t\t// Grab post type to retrieve the view_item label.\n\t\t\tconst postTypeSlug = select( editorStore ).getCurrentPostType();\n\t\t\tconst postType = select( coreStore ).getPostType( postTypeSlug );\n\t\t\tconst { get } = select( preferencesStore );\n\n\t\t\treturn {\n\t\t\t\tpermalink: select( editorStore ).getPermalink(),\n\t\t\t\tisPublished: select( editorStore ).isCurrentPostPublished(),\n\t\t\t\tlabel: postType?.labels.view_item,\n\t\t\t\thasLoaded: !! postType,\n\t\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\t};\n\t\t}, [] );\n\n\t// Only render the view button if the post is published and has a permalink.\n\tif ( ! isPublished || ! permalink || ! hasLoaded ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Button\n\t\t\ticon={ external }\n\t\t\tlabel={ label || __( 'View post' ) }\n\t\t\thref={ permalink }\n\t\t\ttarget=\"_blank\"\n\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\tsize=\"compact\"\n\t\t/>\n\t);\n}\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n\tMenuItemsChoice,\n\tVisuallyHidden,\n\tIcon,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { desktop, mobile, tablet, external, check } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { ActionItem } from '@wordpress/interface';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport PostPreviewButton from '../post-preview-button';\nimport { unlock } from '../../lock-unlock';\n\nexport default function PreviewDropdown( { forceIsAutosaveable, disabled } ) {\n\tconst {\n\t\tdeviceType,\n\t\thomeUrl,\n\t\tisTemplate,\n\t\tisViewable,\n\t\tshowIconLabels,\n\t\tisTemplateHidden,\n\t\ttemplateId,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetDeviceType,\n\t\t\tgetCurrentPostType,\n\t\t\tgetCurrentTemplateId,\n\t\t\tgetRenderingMode,\n\t\t} = select( editorStore );\n\t\tconst { getEntityRecord, getPostType } = select( coreStore );\n\t\tconst { get } = select( preferencesStore );\n\t\tconst _currentPostType = getCurrentPostType();\n\t\treturn {\n\t\t\tdeviceType: getDeviceType(),\n\t\t\thomeUrl: getEntityRecord( 'root', '__unstableBase' )?.home,\n\t\t\tisTemplate: _currentPostType === 'wp_template',\n\t\t\tisViewable: getPostType( _currentPostType )?.viewable ?? false,\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tisTemplateHidden: getRenderingMode() === 'post-only',\n\t\t\ttemplateId: getCurrentTemplateId(),\n\t\t};\n\t}, [] );\n\tconst { setDeviceType, setRenderingMode, setDefaultRenderingMode } = unlock(\n\t\tuseDispatch( editorStore )\n\t);\n\tconst { resetZoomLevel } = unlock( useDispatch( blockEditorStore ) );\n\n\tconst handleDevicePreviewChange = ( newDeviceType ) => {\n\t\tsetDeviceType( newDeviceType );\n\t\tresetZoomLevel();\n\t};\n\n\tconst isMobile = useViewportMatch( 'medium', '<' );\n\tif ( isMobile ) {\n\t\treturn null;\n\t}\n\n\tconst popoverProps = {\n\t\tplacement: 'bottom-end',\n\t};\n\tconst toggleProps = {\n\t\tclassName: 'editor-preview-dropdown__toggle',\n\t\ticonPosition: 'right',\n\t\tsize: 'compact',\n\t\tshowTooltip: ! showIconLabels,\n\t\tdisabled,\n\t\taccessibleWhenDisabled: disabled,\n\t};\n\tconst menuProps = {\n\t\t'aria-label': __( 'View options' ),\n\t};\n\n\tconst deviceIcons = {\n\t\tdesktop,\n\t\tmobile,\n\t\ttablet,\n\t};\n\n\t/**\n\t * The choices for the device type.\n\t *\n\t * @type {Array}\n\t */\n\tconst choices = [\n\t\t{\n\t\t\tvalue: 'Desktop',\n\t\t\tlabel: __( 'Desktop' ),\n\t\t\ticon: desktop,\n\t\t},\n\t\t{\n\t\t\tvalue: 'Tablet',\n\t\t\tlabel: __( 'Tablet' ),\n\t\t\ticon: tablet,\n\t\t},\n\t\t{\n\t\t\tvalue: 'Mobile',\n\t\t\tlabel: __( 'Mobile' ),\n\t\t\ticon: mobile,\n\t\t},\n\t];\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\tclassName={ clsx(\n\t\t\t\t'editor-preview-dropdown',\n\t\t\t\t`editor-preview-dropdown--${ deviceType.toLowerCase() }`\n\t\t\t) }\n\t\t\tpopoverProps={ popoverProps }\n\t\t\ttoggleProps={ toggleProps }\n\t\t\tmenuProps={ menuProps }\n\t\t\ticon={ deviceIcons[ deviceType.toLowerCase() ] }\n\t\t\tlabel={ __( 'View' ) }\n\t\t\tdisableOpenOnArrowDown={ disabled }\n\t\t>\n\t\t\t{ ( { onClose } ) => (\n\t\t\t\t<>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItemsChoice\n\t\t\t\t\t\t\tchoices={ choices }\n\t\t\t\t\t\t\tvalue={ deviceType }\n\t\t\t\t\t\t\tonSelect={ handleDevicePreviewChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t{ isTemplate && (\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\thref={ homeUrl }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'View site' ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! isTemplate && !! templateId && (\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\ticon={ ! isTemplateHidden ? check : undefined }\n\t\t\t\t\t\t\t\tisSelected={ ! isTemplateHidden }\n\t\t\t\t\t\t\t\trole=\"menuitemcheckbox\"\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tconst newRenderingMode = isTemplateHidden\n\t\t\t\t\t\t\t\t\t\t? 'template-locked'\n\t\t\t\t\t\t\t\t\t\t: 'post-only';\n\t\t\t\t\t\t\t\t\tsetRenderingMode( newRenderingMode );\n\t\t\t\t\t\t\t\t\tsetDefaultRenderingMode( newRenderingMode );\n\t\t\t\t\t\t\t\t\tresetZoomLevel();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Show template' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isViewable && (\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<PostPreviewButton\n\t\t\t\t\t\t\t\tclassName=\"editor-preview-dropdown__button-external\"\n\t\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\t\tforceIsAutosaveable={ forceIsAutosaveable }\n\t\t\t\t\t\t\t\taria-label={ __( 'Preview in new tab' ) }\n\t\t\t\t\t\t\t\ttextContent={\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Preview in new tab' ) }\n\t\t\t\t\t\t\t\t\t\t<Icon icon={ external } />\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonPreview={ onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t) }\n\t\t\t\t\t<ActionItem.Slot\n\t\t\t\t\t\tname=\"core/plugin-preview-menu\"\n\t\t\t\t\t\tfillProps={ { onClick: onClose } }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { square as zoomOutIcon } from '@wordpress/icons';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { isAppleOS } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst ZoomOutToggle = ( { disabled } ) => {\n\tconst { isZoomOut, showIconLabels, isDistractionFree } = useSelect(\n\t\t( select ) => ( {\n\t\t\tisZoomOut: unlock( select( blockEditorStore ) ).isZoomOut(),\n\t\t\tshowIconLabels: select( preferencesStore ).get(\n\t\t\t\t'core',\n\t\t\t\t'showIconLabels'\n\t\t\t),\n\t\t\tisDistractionFree: select( preferencesStore ).get(\n\t\t\t\t'core',\n\t\t\t\t'distractionFree'\n\t\t\t),\n\t\t} )\n\t);\n\n\tconst { resetZoomLevel, setZoomLevel } = unlock(\n\t\tuseDispatch( blockEditorStore )\n\t);\n\tconst { registerShortcut, unregisterShortcut } = useDispatch(\n\t\tkeyboardShortcutsStore\n\t);\n\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/zoom',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Enter or exit zoom out.' ),\n\t\t\tkeyCombination: {\n\t\t\t\t// `primaryShift+0` (`ctrl+shift+0`) is the shortcut for switching\n\t\t\t\t// to input mode in Windows, so apply a different key combination.\n\t\t\t\tmodifier: isAppleOS() ? 'primaryShift' : 'secondary',\n\t\t\t\tcharacter: '0',\n\t\t\t},\n\t\t} );\n\t\treturn () => {\n\t\t\tunregisterShortcut( 'core/editor/zoom' );\n\t\t};\n\t}, [ registerShortcut, unregisterShortcut ] );\n\n\tuseShortcut(\n\t\t'core/editor/zoom',\n\t\t() => {\n\t\t\tif ( isZoomOut ) {\n\t\t\t\tresetZoomLevel();\n\t\t\t} else {\n\t\t\t\tsetZoomLevel( 'auto-scaled' );\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\tisDisabled: isDistractionFree,\n\t\t}\n\t);\n\n\tconst handleZoomOut = () => {\n\t\tif ( isZoomOut ) {\n\t\t\tresetZoomLevel();\n\t\t} else {\n\t\t\tsetZoomLevel( 'auto-scaled' );\n\t\t}\n\t};\n\n\treturn (\n\t\t<Button\n\t\t\taccessibleWhenDisabled\n\t\t\tdisabled={ disabled }\n\t\t\tonClick={ handleZoomOut }\n\t\t\ticon={ zoomOutIcon }\n\t\t\tlabel={ __( 'Zoom Out' ) }\n\t\t\tisPressed={ isZoomOut }\n\t\t\tsize=\"compact\"\n\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\tclassName=\"editor-zoom-out-toggle\"\n\t\t/>\n\t);\n};\n\nexport default ZoomOutToggle;\n", "/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useCallback, useRef } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { ESCAPE } from '@wordpress/keycodes';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst { PrivateInserterLibrary } = unlock( blockEditorPrivateApis );\n\nexport default function InserterSidebar() {\n\tconst {\n\t\tblockSectionRootClientId,\n\t\tinserterSidebarToggleRef,\n\t\tinserter,\n\t\tshowMostUsedBlocks,\n\t\tsidebarIsOpened,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetInserterSidebarToggleRef,\n\t\t\tgetInserter,\n\t\t\tisPublishSidebarOpened,\n\t\t} = unlock( select( editorStore ) );\n\t\tconst { getBlockRootClientId, isZoomOut, getSectionRootClientId } =\n\t\t\tunlock( select( blockEditorStore ) );\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getActiveComplementaryArea } = select( interfaceStore );\n\t\tconst getBlockSectionRootClientId = () => {\n\t\t\tif ( isZoomOut() ) {\n\t\t\t\tconst sectionRootClientId = getSectionRootClientId();\n\n\t\t\t\tif ( sectionRootClientId ) {\n\t\t\t\t\treturn sectionRootClientId;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn getBlockRootClientId();\n\t\t};\n\t\treturn {\n\t\t\tinserterSidebarToggleRef: getInserterSidebarToggleRef(),\n\t\t\tinserter: getInserter(),\n\t\t\tshowMostUsedBlocks: get( 'core', 'mostUsedBlocks' ),\n\t\t\tblockSectionRootClientId: getBlockSectionRootClientId(),\n\t\t\tsidebarIsOpened: !! (\n\t\t\t\tgetActiveComplementaryArea( 'core' ) || isPublishSidebarOpened()\n\t\t\t),\n\t\t};\n\t}, [] );\n\tconst { setIsInserterOpened } = useDispatch( editorStore );\n\tconst { disableComplementaryArea } = useDispatch( interfaceStore );\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst libraryRef = useRef();\n\n\t// When closing the inserter, focus should return to the toggle button.\n\tconst closeInserterSidebar = useCallback( () => {\n\t\tsetIsInserterOpened( false );\n\t\tinserterSidebarToggleRef.current?.focus();\n\t}, [ inserterSidebarToggleRef, setIsInserterOpened ] );\n\n\tconst closeOnEscape = useCallback(\n\t\t( event ) => {\n\t\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tcloseInserterSidebar();\n\t\t\t}\n\t\t},\n\t\t[ closeInserterSidebar ]\n\t);\n\n\tconst inserterContents = (\n\t\t<div className=\"editor-inserter-sidebar__content\">\n\t\t\t<PrivateInserterLibrary\n\t\t\t\tshowMostUsedBlocks={ showMostUsedBlocks }\n\t\t\t\tshowInserterHelpPanel\n\t\t\t\tshouldFocusBlock={ isMobileViewport }\n\t\t\t\trootClientId={ blockSectionRootClientId }\n\t\t\t\tonSelect={ inserter.onSelect }\n\t\t\t\t__experimentalInitialTab={ inserter.tab }\n\t\t\t\t__experimentalInitialCategory={ inserter.category }\n\t\t\t\t__experimentalFilterValue={ inserter.filterValue }\n\t\t\t\tonPatternCategorySelection={\n\t\t\t\t\tsidebarIsOpened\n\t\t\t\t\t\t? () => disableComplementaryArea( 'core' )\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\tref={ libraryRef }\n\t\t\t\tonClose={ closeInserterSidebar }\n\t\t\t/>\n\t\t</div>\n\t);\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div onKeyDown={ closeOnEscape } className=\"editor-inserter-sidebar\">\n\t\t\t{ inserterContents }\n\t\t</div>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalListView as ListView,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { useFocusOnMount, useMergeRefs } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { focus } from '@wordpress/dom';\nimport { useCallback, useRef, useState } from '@wordpress/element';\nimport { __, _x } from '@wordpress/i18n';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { ESCAPE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport ListViewOutline from './list-view-outline';\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst { TabbedSidebar } = unlock( blockEditorPrivateApis );\n\nexport default function ListViewSidebar() {\n\tconst { setIsListViewOpened } = useDispatch( editorStore );\n\tconst { getListViewToggleRef } = unlock( useSelect( editorStore ) );\n\n\t// This hook handles focus when the sidebar first renders.\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\n\t// When closing the list view, focus should return to the toggle button.\n\tconst closeListView = useCallback( () => {\n\t\tsetIsListViewOpened( false );\n\t\tgetListViewToggleRef().current?.focus();\n\t}, [ getListViewToggleRef, setIsListViewOpened ] );\n\n\tconst closeOnEscape = useCallback(\n\t\t( event ) => {\n\t\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tcloseListView();\n\t\t\t}\n\t\t},\n\t\t[ closeListView ]\n\t);\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the dropZoneElement updates.\n\tconst [ dropZoneElement, setDropZoneElement ] = useState( null );\n\t// Tracks our current tab.\n\tconst [ tab, setTab ] = useState( 'list-view' );\n\n\t// This ref refers to the sidebar as a whole.\n\tconst sidebarRef = useRef();\n\t// This ref refers to the tab panel.\n\tconst tabsRef = useRef();\n\t// This ref refers to the list view application area.\n\tconst listViewRef = useRef();\n\n\t// Must merge the refs together so focus can be handled properly in the next function.\n\tconst listViewContainerRef = useMergeRefs( [\n\t\tfocusOnMountRef,\n\t\tlistViewRef,\n\t\tsetDropZoneElement,\n\t] );\n\n\t/*\n\t * Callback function to handle list view or outline focus.\n\t *\n\t * @param {string} currentTab The current tab. Either list view or outline.\n\t *\n\t * @return void\n\t */\n\tfunction handleSidebarFocus( currentTab ) {\n\t\t// Tab panel focus.\n\t\tconst tabPanelFocus = focus.tabbable.find( tabsRef.current )[ 0 ];\n\t\t// List view tab is selected.\n\t\tif ( currentTab === 'list-view' ) {\n\t\t\t// Either focus the list view or the tab panel. Must have a fallback because the list view does not render when there are no blocks.\n\t\t\tconst listViewApplicationFocus = focus.tabbable.find(\n\t\t\t\tlistViewRef.current\n\t\t\t)[ 0 ];\n\t\t\tconst listViewFocusArea = sidebarRef.current.contains(\n\t\t\t\tlistViewApplicationFocus\n\t\t\t)\n\t\t\t\t? listViewApplicationFocus\n\t\t\t\t: tabPanelFocus;\n\t\t\tlistViewFocusArea.focus();\n\t\t\t// Outline tab is selected.\n\t\t} else {\n\t\t\ttabPanelFocus.focus();\n\t\t}\n\t}\n\n\tconst handleToggleListViewShortcut = useCallback( () => {\n\t\t// If the sidebar has focus, it is safe to close.\n\t\tif (\n\t\t\tsidebarRef.current.contains(\n\t\t\t\tsidebarRef.current.ownerDocument.activeElement\n\t\t\t)\n\t\t) {\n\t\t\tcloseListView();\n\t\t} else {\n\t\t\t// If the list view or outline does not have focus, focus should be moved to it.\n\t\t\thandleSidebarFocus( tab );\n\t\t}\n\t}, [ closeListView, tab ] );\n\n\t// This only fires when the sidebar is open because of the conditional rendering.\n\t// It is the same shortcut to open but that is defined as a global shortcut and only fires when the sidebar is closed.\n\tuseShortcut( 'core/editor/toggle-list-view', handleToggleListViewShortcut );\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tclassName=\"editor-list-view-sidebar\"\n\t\t\tonKeyDown={ closeOnEscape }\n\t\t\tref={ sidebarRef }\n\t\t>\n\t\t\t<TabbedSidebar\n\t\t\t\ttabs={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'list-view',\n\t\t\t\t\t\ttitle: _x( 'List View', 'Post overview' ),\n\t\t\t\t\t\tpanel: (\n\t\t\t\t\t\t\t<div className=\"editor-list-view-sidebar__list-view-container\">\n\t\t\t\t\t\t\t\t<div className=\"editor-list-view-sidebar__list-view-panel-content\">\n\t\t\t\t\t\t\t\t\t<ListView\n\t\t\t\t\t\t\t\t\t\tdropZoneElement={ dropZoneElement }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tpanelRef: listViewContainerRef,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'outline',\n\t\t\t\t\t\ttitle: _x( 'Outline', 'Post overview' ),\n\t\t\t\t\t\tpanel: (\n\t\t\t\t\t\t\t<div className=\"editor-list-view-sidebar__list-view-container\">\n\t\t\t\t\t\t\t\t<ListViewOutline />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t\tonClose={ closeListView }\n\t\t\t\tonSelect={ ( tabName ) => setTab( tabName ) }\n\t\t\t\tdefaultTabId=\"list-view\"\n\t\t\t\tref={ tabsRef }\n\t\t\t\tcloseButtonLabel={ __( 'Close' ) }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport CharacterCount from '../character-count';\nimport WordCount from '../word-count';\nimport TimeToRead from '../time-to-read';\nimport DocumentOutline from '../document-outline';\n\nexport default function ListViewOutline() {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"editor-list-view-sidebar__outline\">\n\t\t\t\t<div>\n\t\t\t\t\t<Text>{ __( 'Characters:' ) }</Text>\n\t\t\t\t\t<Text>\n\t\t\t\t\t\t<CharacterCount />\n\t\t\t\t\t</Text>\n\t\t\t\t</div>\n\t\t\t\t<div>\n\t\t\t\t\t<Text>{ __( 'Words:' ) }</Text>\n\t\t\t\t\t<WordCount />\n\t\t\t\t</div>\n\t\t\t\t<div>\n\t\t\t\t\t<Text>{ __( 'Time to read:' ) }</Text>\n\t\t\t\t\t<TimeToRead />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<DocumentOutline />\n\t\t</>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { Button, createSlotFill } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport EntitiesSavedStates from '../entities-saved-states';\nimport PostPublishPanel from '../post-publish-panel';\nimport PluginPrePublishPanel from '../plugin-pre-publish-panel';\nimport PluginPostPublishPanel from '../plugin-post-publish-panel';\nimport { store as editorStore } from '../../store';\n\nconst { Fill, Slot } = createSlotFill( 'ActionsPanel' );\n\nexport const ActionsPanelFill = Fill;\n\nexport default function SavePublishPanels( {\n\tsetEntitiesSavedStatesCallback,\n\tcloseEntitiesSavedStates,\n\tisEntitiesSavedStatesOpen,\n\tforceIsDirtyPublishPanel,\n} ) {\n\tconst { closePublishSidebar, togglePublishSidebar } =\n\t\tuseDispatch( editorStore );\n\tconst {\n\t\tpublishSidebarOpened,\n\t\tisPublishable,\n\t\tisDirty,\n\t\thasOtherEntitiesChanges,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tisPublishSidebarOpened,\n\t\t\tisEditedPostPublishable,\n\t\t\tisCurrentPostPublished,\n\t\t\tisEditedPostDirty,\n\t\t\thasNonPostEntityChanges,\n\t\t} = select( editorStore );\n\t\tconst _hasOtherEntitiesChanges = hasNonPostEntityChanges();\n\t\treturn {\n\t\t\tpublishSidebarOpened: isPublishSidebarOpened(),\n\t\t\tisPublishable:\n\t\t\t\t! isCurrentPostPublished() && isEditedPostPublishable(),\n\t\t\tisDirty: _hasOtherEntitiesChanges || isEditedPostDirty(),\n\t\t\thasOtherEntitiesChanges: _hasOtherEntitiesChanges,\n\t\t};\n\t}, [] );\n\n\tconst openEntitiesSavedStates = useCallback(\n\t\t() => setEntitiesSavedStatesCallback( true ),\n\t\t[]\n\t);\n\n\t// It is ok for these components to be unmounted when not in visual use.\n\t// We don't want more than one present at a time, decide which to render.\n\tlet unmountableContent;\n\tif ( publishSidebarOpened ) {\n\t\tunmountableContent = (\n\t\t\t<PostPublishPanel\n\t\t\t\tonClose={ closePublishSidebar }\n\t\t\t\tforceIsDirty={ forceIsDirtyPublishPanel }\n\t\t\t\tPrePublishExtension={ PluginPrePublishPanel.Slot }\n\t\t\t\tPostPublishExtension={ PluginPostPublishPanel.Slot }\n\t\t\t/>\n\t\t);\n\t} else if ( isPublishable && ! hasOtherEntitiesChanges ) {\n\t\tunmountableContent = (\n\t\t\t<div className=\"editor-layout__toggle-publish-panel\">\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tonClick={ togglePublishSidebar }\n\t\t\t\t\taria-expanded={ false }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Open publish panel' ) }\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t);\n\t} else {\n\t\tunmountableContent = (\n\t\t\t<div className=\"editor-layout__toggle-entities-saved-states-panel\">\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tonClick={ openEntitiesSavedStates }\n\t\t\t\t\taria-expanded={ false }\n\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\tdisabled={ ! isDirty }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Open save panel' ) }\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Since EntitiesSavedStates controls its own panel, we can keep it\n\t// always mounted to retain its own component state (such as checkboxes).\n\treturn (\n\t\t<>\n\t\t\t{ isEntitiesSavedStatesOpen && (\n\t\t\t\t<EntitiesSavedStates\n\t\t\t\t\tclose={ closeEntitiesSavedStates }\n\t\t\t\t\trenderDialog\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<Slot bubblesVirtually />\n\t\t\t{ ! isEntitiesSavedStatesOpen && unmountableContent }\n\t\t</>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { useEffect, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport PostTextEditor from '../post-text-editor';\nimport PostTitleRaw from '../post-title/post-title-raw';\n\nexport default function TextEditor( { autoFocus = false } ) {\n\tconst { switchEditorMode } = useDispatch( editorStore );\n\tconst { shortcut, isRichEditingEnabled } = useSelect( ( select ) => {\n\t\tconst { getEditorSettings } = select( editorStore );\n\t\tconst { getShortcutRepresentation } = select( keyboardShortcutsStore );\n\n\t\treturn {\n\t\t\tshortcut: getShortcutRepresentation( 'core/editor/toggle-mode' ),\n\t\t\tisRichEditingEnabled: getEditorSettings().richEditingEnabled,\n\t\t};\n\t}, [] );\n\n\tconst titleRef = useRef();\n\tuseEffect( () => {\n\t\tif ( autoFocus ) {\n\t\t\treturn;\n\t\t}\n\t\ttitleRef?.current?.focus();\n\t}, [ autoFocus ] );\n\n\treturn (\n\t\t<div className=\"editor-text-editor\">\n\t\t\t{ isRichEditingEnabled && (\n\t\t\t\t<div className=\"editor-text-editor__toolbar\">\n\t\t\t\t\t<h2>{ __( 'Editing code' ) }</h2>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => switchEditorMode( 'visual' ) }\n\t\t\t\t\t\tshortcut={ shortcut }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Exit code editor' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"editor-text-editor__body\">\n\t\t\t\t<PostTitleRaw ref={ titleRef } />\n\t\t\t\t<PostTextEditor />\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tBlockList,\n\tstore as blockEditorStore,\n\t__unstableUseTypewriter as useTypewriter,\n\t__unstableUseTypingObserver as useTypingObserver,\n\tuseSettings,\n\tRecursionProvider,\n\tprivateApis as blockEditorPrivateApis,\n\t__experimentalUseResizeCanvas as useResizeCanvas,\n} from '@wordpress/block-editor';\nimport { useEffect, useRef, useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { parse } from '@wordpress/blocks';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useMergeRefs, useViewportMatch } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport PostTitle from '../post-title';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport EditTemplateBlocksNotification from './edit-template-blocks-notification';\nimport ResizableEditor from '../resizable-editor';\nimport useSelectNearestEditableBlock from './use-select-nearest-editable-block';\nimport {\n\tNAVIGATION_POST_TYPE,\n\tPATTERN_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tTEMPLATE_POST_TYPE,\n\tDESIGN_POST_TYPES,\n} from '../../store/constants';\nimport { useZoomOutModeExit } from './use-zoom-out-mode-exit';\nimport { usePaddingAppender } from './use-padding-appender';\nimport { useEditContentOnlySectionExit } from './use-edit-content-only-section-exit';\n\nconst {\n\tLayoutStyle,\n\tuseLayoutClasses,\n\tuseLayoutStyles,\n\tExperimentalBlockCanvas: BlockCanvas,\n\tuseFlashEditableBlocks,\n} = unlock( blockEditorPrivateApis );\n\n/**\n * These post types have a special editor where they don't allow you to fill the title\n * and they don't apply the layout styles.\n */\n\n/**\n * Given an array of nested blocks, find the first Post Content\n * block inside it, recursing through any nesting levels,\n * and return its attributes.\n *\n * @param {Array} blocks A list of blocks.\n *\n * @return {Object | undefined} The Post Content block.\n */\nfunction getPostContentAttributes( blocks ) {\n\tfor ( let i = 0; i < blocks.length; i++ ) {\n\t\tif ( blocks[ i ].name === 'core/post-content' ) {\n\t\t\treturn blocks[ i ].attributes;\n\t\t}\n\t\tif ( blocks[ i ].innerBlocks.length ) {\n\t\t\tconst nestedPostContent = getPostContentAttributes(\n\t\t\t\tblocks[ i ].innerBlocks\n\t\t\t);\n\n\t\t\tif ( nestedPostContent ) {\n\t\t\t\treturn nestedPostContent;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction checkForPostContentAtRootLevel( blocks ) {\n\tfor ( let i = 0; i < blocks.length; i++ ) {\n\t\tif ( blocks[ i ].name === 'core/post-content' ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction VisualEditor( {\n\t// Ideally as we unify post and site editors, we won't need these props.\n\tautoFocus,\n\tdisableIframe = false,\n\tiframeProps,\n\tcontentRef,\n\tclassName,\n} ) {\n\tconst isMobileViewport = useViewportMatch( 'small', '<' );\n\tconst {\n\t\trenderingMode,\n\t\tpostContentAttributes,\n\t\teditedPostTemplate = {},\n\t\twrapperBlockName,\n\t\twrapperUniqueId,\n\t\tdeviceType,\n\t\tisFocusedEntity,\n\t\tisDesignPostType,\n\t\tpostType,\n\t\tisPreview,\n\t\tstyles,\n\t\tcanvasMinHeight,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetCurrentPostId,\n\t\t\tgetCurrentPostType,\n\t\t\tgetCurrentTemplateId,\n\t\t\tgetEditorSettings,\n\t\t\tgetRenderingMode,\n\t\t\tgetDeviceType,\n\t\t\tgetCanvasMinHeight,\n\t\t} = unlock( select( editorStore ) );\n\t\tconst { getPostType, getEditedEntityRecord } = select( coreStore );\n\t\tconst postTypeSlug = getCurrentPostType();\n\t\tconst _renderingMode = getRenderingMode();\n\t\tlet _wrapperBlockName;\n\n\t\tif ( postTypeSlug === PATTERN_POST_TYPE ) {\n\t\t\t_wrapperBlockName = 'core/block';\n\t\t} else if ( _renderingMode === 'post-only' ) {\n\t\t\t_wrapperBlockName = 'core/post-content';\n\t\t}\n\n\t\tconst editorSettings = getEditorSettings();\n\t\tconst supportsTemplateMode = editorSettings.supportsTemplateMode;\n\t\tconst postTypeObject = getPostType( postTypeSlug );\n\t\tconst currentTemplateId = getCurrentTemplateId();\n\t\tconst template = currentTemplateId\n\t\t\t? getEditedEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\tcurrentTemplateId\n\t\t\t )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\trenderingMode: _renderingMode,\n\t\t\tpostContentAttributes: editorSettings.postContentAttributes,\n\t\t\tisDesignPostType: DESIGN_POST_TYPES.includes( postTypeSlug ),\n\t\t\t// Post template fetch returns a 404 on classic themes, which\n\t\t\t// messes with e2e tests, so check it's a block theme first.\n\t\t\teditedPostTemplate:\n\t\t\t\tpostTypeObject?.viewable && supportsTemplateMode\n\t\t\t\t\t? template\n\t\t\t\t\t: undefined,\n\t\t\twrapperBlockName: _wrapperBlockName,\n\t\t\twrapperUniqueId: getCurrentPostId(),\n\t\t\tdeviceType: getDeviceType(),\n\t\t\tisFocusedEntity: !! editorSettings.onNavigateToPreviousEntityRecord,\n\t\t\tpostType: postTypeSlug,\n\t\t\tisPreview: editorSettings.isPreviewMode,\n\t\t\tstyles: editorSettings.styles,\n\t\t\tcanvasMinHeight: getCanvasMinHeight(),\n\t\t};\n\t}, [] );\n\tconst { isCleanNewPost } = useSelect( editorStore );\n\tconst {\n\t\thasRootPaddingAwareAlignments,\n\t\tthemeHasDisabledLayoutStyles,\n\t\tthemeSupportsLayout,\n\t\tisZoomedOut,\n\t} = useSelect( ( select ) => {\n\t\tconst { getSettings, isZoomOut: _isZoomOut } = unlock(\n\t\t\tselect( blockEditorStore )\n\t\t);\n\n\t\tconst _settings = getSettings();\n\t\treturn {\n\t\t\tthemeHasDisabledLayoutStyles: _settings.disableLayoutStyles,\n\t\t\tthemeSupportsLayout: _settings.supportsLayout,\n\t\t\thasRootPaddingAwareAlignments:\n\t\t\t\t_settings.__experimentalFeatures?.useRootPaddingAwareAlignments,\n\t\t\tisZoomedOut: _isZoomOut(),\n\t\t};\n\t}, [] );\n\n\tconst localRef = useRef();\n\tconst deviceStyles = useResizeCanvas( deviceType );\n\tconst [ globalLayoutSettings ] = useSettings( 'layout' );\n\n\t// fallbackLayout is used if there is no Post Content,\n\t// and for Post Title.\n\tconst fallbackLayout = useMemo( () => {\n\t\tif ( renderingMode !== 'post-only' || isDesignPostType ) {\n\t\t\treturn { type: 'default' };\n\t\t}\n\n\t\tif ( themeSupportsLayout ) {\n\t\t\t// We need to ensure support for wide and full alignments,\n\t\t\t// so we add the constrained type.\n\t\t\treturn { ...globalLayoutSettings, type: 'constrained' };\n\t\t}\n\t\t// Set default layout for classic themes so all alignments are supported.\n\t\treturn { type: 'default' };\n\t}, [\n\t\trenderingMode,\n\t\tthemeSupportsLayout,\n\t\tglobalLayoutSettings,\n\t\tisDesignPostType,\n\t] );\n\n\tconst newestPostContentAttributes = useMemo( () => {\n\t\tif (\n\t\t\t! editedPostTemplate?.content &&\n\t\t\t! editedPostTemplate?.blocks &&\n\t\t\tpostContentAttributes\n\t\t) {\n\t\t\treturn postContentAttributes;\n\t\t}\n\t\t// When in template editing mode, we can access the blocks directly.\n\t\tif ( editedPostTemplate?.blocks ) {\n\t\t\treturn getPostContentAttributes( editedPostTemplate?.blocks );\n\t\t}\n\t\t// If there are no blocks, we have to parse the content string.\n\t\t// Best double-check it's a string otherwise the parse function gets unhappy.\n\t\tconst parseableContent =\n\t\t\ttypeof editedPostTemplate?.content === 'string'\n\t\t\t\t? editedPostTemplate?.content\n\t\t\t\t: '';\n\n\t\treturn getPostContentAttributes( parse( parseableContent ) ) || {};\n\t}, [\n\t\teditedPostTemplate?.content,\n\t\teditedPostTemplate?.blocks,\n\t\tpostContentAttributes,\n\t] );\n\n\tconst hasPostContentAtRootLevel = useMemo( () => {\n\t\tif ( ! editedPostTemplate?.content && ! editedPostTemplate?.blocks ) {\n\t\t\treturn false;\n\t\t}\n\t\t// When in template editing mode, we can access the blocks directly.\n\t\tif ( editedPostTemplate?.blocks ) {\n\t\t\treturn checkForPostContentAtRootLevel( editedPostTemplate?.blocks );\n\t\t}\n\t\t// If there are no blocks, we have to parse the content string.\n\t\t// Best double-check it's a string otherwise the parse function gets unhappy.\n\t\tconst parseableContent =\n\t\t\ttypeof editedPostTemplate?.content === 'string'\n\t\t\t\t? editedPostTemplate?.content\n\t\t\t\t: '';\n\n\t\treturn (\n\t\t\tcheckForPostContentAtRootLevel( parse( parseableContent ) ) || false\n\t\t);\n\t}, [ editedPostTemplate?.content, editedPostTemplate?.blocks ] );\n\n\tconst { layout = {}, align = '' } = newestPostContentAttributes || {};\n\n\tconst postContentLayoutClasses = useLayoutClasses(\n\t\tnewestPostContentAttributes,\n\t\t'core/post-content'\n\t);\n\n\tconst blockListLayoutClass = clsx(\n\t\t{\n\t\t\t'is-layout-flow': ! themeSupportsLayout,\n\t\t},\n\t\tthemeSupportsLayout && postContentLayoutClasses,\n\t\talign && `align${ align }`\n\t);\n\n\tconst postContentLayoutStyles = useLayoutStyles(\n\t\tnewestPostContentAttributes,\n\t\t'core/post-content',\n\t\t'.block-editor-block-list__layout.is-root-container'\n\t);\n\n\t// Update type for blocks using legacy layouts.\n\tconst postContentLayout = useMemo( () => {\n\t\treturn layout &&\n\t\t\t( layout?.type === 'constrained' ||\n\t\t\t\tlayout?.inherit ||\n\t\t\t\tlayout?.contentSize ||\n\t\t\t\tlayout?.wideSize )\n\t\t\t? { ...globalLayoutSettings, ...layout, type: 'constrained' }\n\t\t\t: { ...globalLayoutSettings, ...layout, type: 'default' };\n\t}, [\n\t\tlayout?.type,\n\t\tlayout?.inherit,\n\t\tlayout?.contentSize,\n\t\tlayout?.wideSize,\n\t\tglobalLayoutSettings,\n\t] );\n\n\t// If there is a Post Content block we use its layout for the block list;\n\t// if not, this must be a classic theme, in which case we use the fallback layout.\n\tconst blockListLayout = postContentAttributes\n\t\t? postContentLayout\n\t\t: fallbackLayout;\n\n\tconst postEditorLayout =\n\t\tblockListLayout?.type === 'default' && ! hasPostContentAtRootLevel\n\t\t\t? fallbackLayout\n\t\t\t: blockListLayout;\n\tconst observeTypingRef = useTypingObserver();\n\tconst titleRef = useRef();\n\tuseEffect( () => {\n\t\tif ( ! autoFocus || ! isCleanNewPost() ) {\n\t\t\treturn;\n\t\t}\n\t\ttitleRef?.current?.focus();\n\t}, [ autoFocus, isCleanNewPost ] );\n\n\t// Add some styles for alignwide/alignfull Post Content and its children.\n\tconst alignCSS = `.is-root-container.alignwide { max-width: var(--wp--style--global--wide-size); margin-left: auto; margin-right: auto;}\n\t\t.is-root-container.alignwide:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: var(--wp--style--global--wide-size);}\n\t\t.is-root-container.alignfull { max-width: none; margin-left: auto; margin-right: auto;}\n\t\t.is-root-container.alignfull:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: none;}`;\n\n\tconst enableResizing =\n\t\t[\n\t\t\tNAVIGATION_POST_TYPE,\n\t\t\tTEMPLATE_PART_POST_TYPE,\n\t\t\tPATTERN_POST_TYPE,\n\t\t].includes( postType ) &&\n\t\t// Disable in previews / view mode.\n\t\t! isPreview &&\n\t\t// Disable resizing in mobile viewport.\n\t\t! isMobileViewport &&\n\t\t// Disable resizing in zoomed-out mode.\n\t\t! isZoomedOut;\n\n\t// Calculate the minimum height including scroll offset to fit all notes.\n\tconst calculatedMinHeight = useMemo( () => {\n\t\tif ( ! localRef.current ) {\n\t\t\treturn canvasMinHeight;\n\t\t}\n\n\t\tconst { ownerDocument } = localRef.current;\n\t\tconst scrollTop =\n\t\t\townerDocument.documentElement.scrollTop ||\n\t\t\townerDocument.body.scrollTop;\n\n\t\treturn canvasMinHeight + scrollTop;\n\t}, [ canvasMinHeight ] );\n\n\tconst [ paddingAppenderRef, paddingStyle ] = usePaddingAppender(\n\t\t! isPreview && renderingMode === 'post-only' && ! isDesignPostType\n\t);\n\n\tconst iframeStyles = useMemo( () => {\n\t\treturn [\n\t\t\t...( styles ?? [] ),\n\t\t\t{\n\t\t\t\t// Ensures margins of children are contained so that the body background paints behind them.\n\t\t\t\t// Otherwise, the background of html (when zoomed out) would show there and appear broken. It's\n\t\t\t\t// important mostly for post-only views yet conceivably an issue in templated views too.\n\t\t\t\tcss: `:where(.block-editor-iframe__body){display:flow-root;${\n\t\t\t\t\tcalculatedMinHeight\n\t\t\t\t\t\t? `min-height:${ calculatedMinHeight }px;`\n\t\t\t\t\t\t: ''\n\t\t\t\t}}.is-root-container{display:flow-root;${\n\t\t\t\t\t// Some themes will have `min-height: 100vh` for the root container,\n\t\t\t\t\t// which isn't a requirement in auto resize mode.\n\t\t\t\t\tenableResizing ? 'min-height:0!important;' : ''\n\t\t\t\t}}\n\t\t\t\t${ paddingStyle ? paddingStyle : '' }\n\t\t\t\t${\n\t\t\t\t\tenableResizing\n\t\t\t\t\t\t? `.block-editor-iframe__html{background:var(--wp-editor-canvas-background);display:flex;align-items:center;justify-content:center;min-height:100vh;}.block-editor-iframe__body{width:100%;}`\n\t\t\t\t\t\t: ''\n\t\t\t\t}`,\n\t\t\t\t// The CSS above centers the body content vertically when resizing is enabled and applies a background\n\t\t\t\t// color to the iframe HTML element to match the background color of the editor canvas.\n\t\t\t},\n\t\t];\n\t}, [ styles, enableResizing, calculatedMinHeight, paddingStyle ] );\n\n\tconst typewriterRef = useTypewriter();\n\tcontentRef = useMergeRefs( [\n\t\tlocalRef,\n\t\tcontentRef,\n\t\trenderingMode === 'post-only' ? typewriterRef : null,\n\t\tuseFlashEditableBlocks( {\n\t\t\tisEnabled: renderingMode === 'template-locked',\n\t\t} ),\n\t\tuseSelectNearestEditableBlock( {\n\t\t\tisEnabled: renderingMode === 'template-locked',\n\t\t} ),\n\t\tuseZoomOutModeExit(),\n\t\tpaddingAppenderRef,\n\t\tuseEditContentOnlySectionExit(),\n\t] );\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx(\n\t\t\t\t'editor-visual-editor',\n\t\t\t\t// this class is here for backward compatibility reasons.\n\t\t\t\t'edit-post-visual-editor',\n\t\t\t\tclassName,\n\t\t\t\t{\n\t\t\t\t\t'has-padding': isFocusedEntity || enableResizing,\n\t\t\t\t\t'is-resizable': enableResizing,\n\t\t\t\t\t'is-iframed': ! disableIframe,\n\t\t\t\t}\n\t\t\t) }\n\t\t>\n\t\t\t<ResizableEditor enableResizing={ enableResizing } height=\"100%\">\n\t\t\t\t<BlockCanvas\n\t\t\t\t\tshouldIframe={ ! disableIframe }\n\t\t\t\t\tcontentRef={ contentRef }\n\t\t\t\t\tstyles={ iframeStyles }\n\t\t\t\t\theight=\"100%\"\n\t\t\t\t\tiframeProps={ {\n\t\t\t\t\t\t...iframeProps,\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t...iframeProps?.style,\n\t\t\t\t\t\t\t...deviceStyles,\n\t\t\t\t\t\t},\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ themeSupportsLayout &&\n\t\t\t\t\t\t! themeHasDisabledLayoutStyles &&\n\t\t\t\t\t\trenderingMode === 'post-only' &&\n\t\t\t\t\t\t! isDesignPostType && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<LayoutStyle\n\t\t\t\t\t\t\t\t\tselector=\".editor-visual-editor__post-title-wrapper\"\n\t\t\t\t\t\t\t\t\tlayout={ fallbackLayout }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<LayoutStyle\n\t\t\t\t\t\t\t\t\tselector=\".block-editor-block-list__layout.is-root-container\"\n\t\t\t\t\t\t\t\t\tlayout={ postEditorLayout }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t{ align && <LayoutStyle css={ alignCSS } /> }\n\t\t\t\t\t\t\t\t{ postContentLayoutStyles && (\n\t\t\t\t\t\t\t\t\t<LayoutStyle\n\t\t\t\t\t\t\t\t\t\tlayout={ postContentLayout }\n\t\t\t\t\t\t\t\t\t\tcss={ postContentLayoutStyles }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) }\n\t\t\t\t\t{ renderingMode === 'post-only' && ! isDesignPostType && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t'editor-visual-editor__post-title-wrapper',\n\t\t\t\t\t\t\t\t// The following class is only here for backward compatibility\n\t\t\t\t\t\t\t\t// some themes might be using it to style the post title.\n\t\t\t\t\t\t\t\t'edit-post-visual-editor__post-title-wrapper',\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'has-global-padding':\n\t\t\t\t\t\t\t\t\t\thasRootPaddingAwareAlignments,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tcontentEditable={ false }\n\t\t\t\t\t\t\tref={ observeTypingRef }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t// This is using inline styles\n\t\t\t\t\t\t\t\t// so it's applied for both iframed and non iframed editors.\n\t\t\t\t\t\t\t\tmarginTop: '4rem',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PostTitle ref={ titleRef } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t\t<RecursionProvider\n\t\t\t\t\t\tblockName={ wrapperBlockName }\n\t\t\t\t\t\tuniqueId={ wrapperUniqueId }\n\t\t\t\t\t>\n\t\t\t\t\t\t<BlockList\n\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t'is-' + deviceType.toLowerCase() + '-preview',\n\t\t\t\t\t\t\t\trenderingMode !== 'post-only' ||\n\t\t\t\t\t\t\t\t\tisDesignPostType\n\t\t\t\t\t\t\t\t\t? 'wp-site-blocks'\n\t\t\t\t\t\t\t\t\t: `${ blockListLayoutClass } wp-block-post-content`, // Ensure root level blocks receive default/flow blockGap styling rules.\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'has-global-padding':\n\t\t\t\t\t\t\t\t\t\trenderingMode === 'post-only' &&\n\t\t\t\t\t\t\t\t\t\t! isDesignPostType &&\n\t\t\t\t\t\t\t\t\t\thasRootPaddingAwareAlignments,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tlayout={ blockListLayout }\n\t\t\t\t\t\t\tdropZoneElement={\n\t\t\t\t\t\t\t\t// When iframed, pass in the html element of the iframe to\n\t\t\t\t\t\t\t\t// ensure the drop zone extends to the edges of the iframe.\n\t\t\t\t\t\t\t\tdisableIframe\n\t\t\t\t\t\t\t\t\t? localRef.current\n\t\t\t\t\t\t\t\t\t: localRef.current?.parentNode\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t__unstableDisableDropZone={\n\t\t\t\t\t\t\t\t// In template preview mode, disable drop zones at the root of the template.\n\t\t\t\t\t\t\t\trenderingMode === 'template-locked'\n\t\t\t\t\t\t\t\t\t? true\n\t\t\t\t\t\t\t\t\t: false\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ renderingMode === 'template-locked' && (\n\t\t\t\t\t\t\t<EditTemplateBlocksNotification\n\t\t\t\t\t\t\t\tcontentRef={ localRef }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</RecursionProvider>\n\t\t\t\t</BlockCanvas>\n\t\t\t</ResizableEditor>\n\t\t</div>\n\t);\n}\n\nexport default VisualEditor;\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useEffect, useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Component that:\n *\n * - Displays a 'Edit your template to edit this block' notification when the\n * user is focusing on editing page content and clicks on a disabled template\n * block.\n * - Displays a 'Edit your template to edit this block' dialog when the user\n * is focusing on editing page content and double clicks on a disabled\n * template block.\n *\n * @param {Object} props\n * @param {import('react').RefObject<HTMLElement>} props.contentRef Ref to the block\n * editor iframe canvas.\n */\nexport default function EditTemplateBlocksNotification( { contentRef } ) {\n\tconst { onNavigateToEntityRecord, templateId } = useSelect( ( select ) => {\n\t\tconst { getEditorSettings, getCurrentTemplateId } =\n\t\t\tselect( editorStore );\n\n\t\treturn {\n\t\t\tonNavigateToEntityRecord:\n\t\t\t\tgetEditorSettings().onNavigateToEntityRecord,\n\t\t\ttemplateId: getCurrentTemplateId(),\n\t\t};\n\t}, [] );\n\n\tconst canEditTemplate = useSelect(\n\t\t( select ) =>\n\t\t\t!! select( coreStore ).canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} ),\n\t\t[]\n\t);\n\n\tconst [ isDialogOpen, setIsDialogOpen ] = useState( false );\n\n\tuseEffect( () => {\n\t\tconst handleDblClick = ( event ) => {\n\t\t\tif ( ! canEditTemplate ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t! event.target.classList.contains( 'is-root-container' ) ||\n\t\t\t\tevent.target.dataset?.type === 'core/template-part'\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( ! event.defaultPrevented ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tsetIsDialogOpen( true );\n\t\t\t}\n\t\t};\n\n\t\tconst canvas = contentRef.current;\n\t\tcanvas?.addEventListener( 'dblclick', handleDblClick );\n\t\treturn () => {\n\t\t\tcanvas?.removeEventListener( 'dblclick', handleDblClick );\n\t\t};\n\t}, [ contentRef, canEditTemplate ] );\n\n\tif ( ! canEditTemplate ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<ConfirmDialog\n\t\t\tisOpen={ isDialogOpen }\n\t\t\tconfirmButtonText={ __( 'Edit template' ) }\n\t\t\tonConfirm={ () => {\n\t\t\t\tsetIsDialogOpen( false );\n\t\t\t\tonNavigateToEntityRecord( {\n\t\t\t\t\tpostId: templateId,\n\t\t\t\t\tpostType: 'wp_template',\n\t\t\t\t} );\n\t\t\t} }\n\t\t\tonCancel={ () => setIsDialogOpen( false ) }\n\t\t\tsize=\"medium\"\n\t\t>\n\t\t\t{ __(\n\t\t\t\t'You\u2019ve tried to select a block that is part of a template that may be used elsewhere on your site. Would you like to edit the template?'\n\t\t\t) }\n\t\t</ConfirmDialog>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst DISTANCE_THRESHOLD = 500;\n\nfunction clamp( value, min, max ) {\n\treturn Math.min( Math.max( value, min ), max );\n}\n\nfunction distanceFromRect( x, y, rect ) {\n\tconst dx = x - clamp( x, rect.left, rect.right );\n\tconst dy = y - clamp( y, rect.top, rect.bottom );\n\treturn Math.sqrt( dx * dx + dy * dy );\n}\n\nexport default function useSelectNearestEditableBlock( {\n\tisEnabled = true,\n} = {} ) {\n\tconst { getEnabledClientIdsTree, getBlockName, getBlockOrder } = unlock(\n\t\tuseSelect( blockEditorStore )\n\t);\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\n\treturn useRefEffect(\n\t\t( element ) => {\n\t\t\tif ( ! isEnabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst selectNearestEditableBlock = ( x, y ) => {\n\t\t\t\tconst editableBlockClientIds =\n\t\t\t\t\tgetEnabledClientIdsTree().flatMap( ( { clientId } ) => {\n\t\t\t\t\t\tconst blockName = getBlockName( clientId );\n\t\t\t\t\t\tif ( blockName === 'core/template-part' ) {\n\t\t\t\t\t\t\treturn [];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( blockName === 'core/post-content' ) {\n\t\t\t\t\t\t\tconst innerBlocks = getBlockOrder( clientId );\n\t\t\t\t\t\t\tif ( innerBlocks.length ) {\n\t\t\t\t\t\t\t\treturn innerBlocks;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn [ clientId ];\n\t\t\t\t\t} );\n\n\t\t\t\tlet nearestDistance = Infinity,\n\t\t\t\t\tnearestClientId = null;\n\n\t\t\t\tfor ( const clientId of editableBlockClientIds ) {\n\t\t\t\t\tconst block = element.querySelector(\n\t\t\t\t\t\t`[data-block=\"${ clientId }\"]`\n\t\t\t\t\t);\n\t\t\t\t\tif ( ! block ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tconst rect = block.getBoundingClientRect();\n\t\t\t\t\tconst distance = distanceFromRect( x, y, rect );\n\t\t\t\t\tif (\n\t\t\t\t\t\tdistance < nearestDistance &&\n\t\t\t\t\t\tdistance < DISTANCE_THRESHOLD\n\t\t\t\t\t) {\n\t\t\t\t\t\tnearestDistance = distance;\n\t\t\t\t\t\tnearestClientId = clientId;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( nearestClientId ) {\n\t\t\t\t\tselectBlock( nearestClientId );\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tconst handleClick = ( event ) => {\n\t\t\t\tconst shouldSelect =\n\t\t\t\t\tevent.target === element ||\n\t\t\t\t\tevent.target.classList.contains( 'is-root-container' );\n\t\t\t\tif ( shouldSelect ) {\n\t\t\t\t\tselectNearestEditableBlock( event.clientX, event.clientY );\n\t\t\t\t}\n\t\t\t};\n\n\t\t\telement.addEventListener( 'click', handleClick );\n\t\t\treturn () => element.removeEventListener( 'click', handleClick );\n\t\t},\n\t\t[ isEnabled ]\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\n/**\n * Allows Zoom Out mode to be exited by double clicking in the selected block.\n */\nexport function useZoomOutModeExit() {\n\tconst { getSettings, isZoomOut } = unlock( useSelect( blockEditorStore ) );\n\tconst { resetZoomLevel } = unlock( useDispatch( blockEditorStore ) );\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tfunction onDoubleClick( event ) {\n\t\t\t\tif ( ! isZoomOut() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( ! event.defaultPrevented ) {\n\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\tconst { __experimentalSetIsInserterOpened } = getSettings();\n\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof __experimentalSetIsInserterOpened === 'function'\n\t\t\t\t\t) {\n\t\t\t\t\t\t__experimentalSetIsInserterOpened( false );\n\t\t\t\t\t}\n\t\t\t\t\tresetZoomLevel();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'dblclick', onDoubleClick );\n\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'dblclick', onDoubleClick );\n\t\t\t};\n\t\t},\n\t\t[ getSettings, isZoomOut, resetZoomLevel ]\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useRegistry } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { isUnmodifiedDefaultBlock } from '@wordpress/blocks';\n\n// Ruleset to add space for the typewriter effect. When typing in the last\n// block, there needs to be room to scroll up.\nconst CSS =\n\t':root :where(.editor-styles-wrapper)::after {content: \"\"; display: block; height: 40vh;}';\n\nexport function usePaddingAppender( enabled ) {\n\tconst registry = useRegistry();\n\tconst effect = useRefEffect(\n\t\t( node ) => {\n\t\t\tfunction onMouseDown( event ) {\n\t\t\t\tif (\n\t\t\t\t\tevent.target !== node &&\n\t\t\t\t\t// Tests for the parent element because in the iframed editor if the click is\n\t\t\t\t\t// below the padding the target will be the parent element (html) and should\n\t\t\t\t\t// still be treated as intent to append.\n\t\t\t\t\tevent.target !== node.parentElement\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Only handle clicks under the last child.\n\t\t\t\tconst lastChild = node.lastElementChild;\n\t\t\t\tif ( ! lastChild ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst lastChildRect = lastChild.getBoundingClientRect();\n\t\t\t\tif ( event.clientY < lastChildRect.bottom ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\tconst blockOrder = registry\n\t\t\t\t\t.select( blockEditorStore )\n\t\t\t\t\t.getBlockOrder( '' );\n\t\t\t\tconst lastBlockClientId = blockOrder[ blockOrder.length - 1 ];\n\n\t\t\t\tconst lastBlock = registry\n\t\t\t\t\t.select( blockEditorStore )\n\t\t\t\t\t.getBlock( lastBlockClientId );\n\t\t\t\tconst { selectBlock, insertDefaultBlock } =\n\t\t\t\t\tregistry.dispatch( blockEditorStore );\n\n\t\t\t\tif ( lastBlock && isUnmodifiedDefaultBlock( lastBlock ) ) {\n\t\t\t\t\tselectBlock( lastBlockClientId );\n\t\t\t\t} else {\n\t\t\t\t\tinsertDefaultBlock();\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst { ownerDocument } = node;\n\t\t\t// Adds the listener on the document so that in the iframed editor clicks below the\n\t\t\t// padding can be handled as they too should be treated as intent to append.\n\t\t\townerDocument.addEventListener( 'pointerdown', onMouseDown );\n\t\t\treturn () => {\n\t\t\t\townerDocument.removeEventListener( 'pointerdown', onMouseDown );\n\t\t\t};\n\t\t},\n\t\t[ registry ]\n\t);\n\treturn enabled ? [ effect, CSS ] : [];\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\n/**\n * Allows content only section editing to be exited by clicking outside of the\n * edited blocks.\n */\nexport function useEditContentOnlySectionExit() {\n\tconst { getEditedContentOnlySection } = unlock(\n\t\tuseSelect( blockEditorStore )\n\t);\n\tconst { stopEditingContentOnlySection } = unlock(\n\t\tuseDispatch( blockEditorStore )\n\t);\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tfunction onClick( event ) {\n\t\t\t\tconst editedContentOnlySection = getEditedContentOnlySection();\n\t\t\t\tif ( ! editedContentOnlySection ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Check if the click is outside the edited block first.\n\t\t\t\tconst isClickOutside = ! event.target.closest(\n\t\t\t\t\t`[data-block=\"${ editedContentOnlySection }\"]`\n\t\t\t\t);\n\n\t\t\t\t// Only prevent default and stop editing if clicking outside.\n\t\t\t\t// This allows default behavior (e.g., file dialogs) to work when clicking inside.\n\t\t\t\tif ( isClickOutside && ! event.defaultPrevented ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tstopEditingContentOnlySection();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'click', onClick );\n\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'click', onClick );\n\t\t\t};\n\t\t},\n\t\t[ getEditedContentOnlySection, stopEditingContentOnlySection ]\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport {\n\tBlockInspector,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tPlatform,\n\tuseCallback,\n\tuseContext,\n\tuseEffect,\n\tuseRef,\n} from '@wordpress/element';\nimport { isRTL, __, _x } from '@wordpress/i18n';\nimport { drawerLeft, drawerRight } from '@wordpress/icons';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport PatternOverridesPanel from '../pattern-overrides-panel';\nimport PluginDocumentSettingPanel from '../plugin-document-setting-panel';\nimport PluginSidebar from '../plugin-sidebar';\nimport PostSummary from './post-summary';\nimport PostTaxonomiesPanel from '../post-taxonomies/panel';\nimport PostTransformPanel from '../post-transform-panel';\nimport SidebarHeader from './header';\nimport TemplateContentPanel from '../template-content-panel';\nimport TemplatePartContentPanel from '../template-part-content-panel';\nimport useAutoSwitchEditorSidebars from '../provider/use-auto-switch-editor-sidebars';\nimport { sidebars } from './constants';\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\nimport {\n\tNAVIGATION_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tTEMPLATE_POST_TYPE,\n} from '../../store/constants';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nconst SIDEBAR_ACTIVE_BY_DEFAULT = Platform.select( {\n\tweb: true,\n\tnative: false,\n} );\n\nconst SidebarContent = ( {\n\ttabName,\n\tkeyboardShortcut,\n\tonActionPerformed,\n\textraPanels,\n} ) => {\n\tconst tabListRef = useRef( null );\n\t// Because `PluginSidebar` renders a `ComplementaryArea`, we\n\t// need to forward the `Tabs` context so it can be passed through the\n\t// underlying slot/fill.\n\tconst tabsContextValue = useContext( Tabs.Context );\n\n\t// This effect addresses a race condition caused by tabbing from the last\n\t// block in the editor into the settings sidebar. Without this effect, the\n\t// selected tab and browser focus can become separated in an unexpected way\n\t// (e.g the \"block\" tab is focused, but the \"post\" tab is selected).\n\tuseEffect( () => {\n\t\tconst tabsElements = Array.from(\n\t\t\ttabListRef.current?.querySelectorAll( '[role=\"tab\"]' ) || []\n\t\t);\n\t\tconst selectedTabElement = tabsElements.find(\n\t\t\t// We are purposefully using a custom `data-tab-id` attribute here\n\t\t\t// because we don't want rely on any assumptions about `Tabs`\n\t\t\t// component internals.\n\t\t\t( element ) => element.getAttribute( 'data-tab-id' ) === tabName\n\t\t);\n\t\tconst activeElement = selectedTabElement?.ownerDocument.activeElement;\n\t\tconst tabsHasFocus = tabsElements.some( ( element ) => {\n\t\t\treturn activeElement && activeElement.id === element.id;\n\t\t} );\n\t\tif (\n\t\t\ttabsHasFocus &&\n\t\t\tselectedTabElement &&\n\t\t\tselectedTabElement.id !== activeElement?.id\n\t\t) {\n\t\t\tselectedTabElement?.focus();\n\t\t}\n\t}, [ tabName ] );\n\n\treturn (\n\t\t<PluginSidebar\n\t\t\tidentifier={ tabName }\n\t\t\theader={\n\t\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t\t<SidebarHeader ref={ tabListRef } />\n\t\t\t\t</Tabs.Context.Provider>\n\t\t\t}\n\t\t\tcloseLabel={ __( 'Close Settings' ) }\n\t\t\t// This classname is added so we can apply a corrective negative\n\t\t\t// margin to the panel.\n\t\t\t// see https://github.com/WordPress/gutenberg/pull/55360#pullrequestreview-1737671049\n\t\t\tclassName=\"editor-sidebar__panel\"\n\t\t\theaderClassName=\"editor-sidebar__panel-tabs\"\n\t\t\ttitle={\n\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t_x( 'Settings', 'panel button label' )\n\t\t\t}\n\t\t\ttoggleShortcut={ keyboardShortcut }\n\t\t\ticon={ isRTL() ? drawerLeft : drawerRight }\n\t\t\tisActiveByDefault={ SIDEBAR_ACTIVE_BY_DEFAULT }\n\t\t>\n\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t<Tabs.TabPanel tabId={ sidebars.document } focusable={ false }>\n\t\t\t\t\t<PostSummary onActionPerformed={ onActionPerformed } />\n\t\t\t\t\t<PluginDocumentSettingPanel.Slot />\n\t\t\t\t\t<TemplateContentPanel />\n\t\t\t\t\t<TemplatePartContentPanel />\n\t\t\t\t\t<PostTransformPanel />\n\t\t\t\t\t<PostTaxonomiesPanel />\n\t\t\t\t\t<PatternOverridesPanel />\n\t\t\t\t\t{ extraPanels }\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel tabId={ sidebars.block } focusable={ false }>\n\t\t\t\t\t<BlockInspector />\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t</Tabs.Context.Provider>\n\t\t</PluginSidebar>\n\t);\n};\n\nconst Sidebar = ( { extraPanels, onActionPerformed } ) => {\n\tuseAutoSwitchEditorSidebars();\n\tconst { tabName, keyboardShortcut, showSummary } = useSelect(\n\t\t( select ) => {\n\t\t\tconst shortcut = select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getShortcutRepresentation( 'core/editor/toggle-sidebar' );\n\n\t\t\tconst sidebar =\n\t\t\t\tselect( interfaceStore ).getActiveComplementaryArea( 'core' );\n\t\t\tconst _isEditorSidebarOpened = [\n\t\t\t\tsidebars.block,\n\t\t\t\tsidebars.document,\n\t\t\t].includes( sidebar );\n\t\t\tlet _tabName = sidebar;\n\t\t\tif ( ! _isEditorSidebarOpened ) {\n\t\t\t\t_tabName = !! select(\n\t\t\t\t\tblockEditorStore\n\t\t\t\t).getBlockSelectionStart()\n\t\t\t\t\t? sidebars.block\n\t\t\t\t\t: sidebars.document;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\ttabName: _tabName,\n\t\t\t\tkeyboardShortcut: shortcut,\n\t\t\t\tshowSummary: ! [\n\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\tTEMPLATE_PART_POST_TYPE,\n\t\t\t\t\tNAVIGATION_POST_TYPE,\n\t\t\t\t].includes( select( editorStore ).getCurrentPostType() ),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\n\tconst onTabSelect = useCallback(\n\t\t( newSelectedTabId ) => {\n\t\t\tif ( !! newSelectedTabId ) {\n\t\t\t\tenableComplementaryArea( 'core', newSelectedTabId );\n\t\t\t}\n\t\t},\n\t\t[ enableComplementaryArea ]\n\t);\n\n\treturn (\n\t\t<Tabs\n\t\t\tselectedTabId={ tabName }\n\t\t\tonSelect={ onTabSelect }\n\t\t\tselectOnMove={ false }\n\t\t>\n\t\t\t<SidebarContent\n\t\t\t\ttabName={ tabName }\n\t\t\t\tkeyboardShortcut={ keyboardShortcut }\n\t\t\t\tshowSummary={ showSummary }\n\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\textraPanels={ extraPanels }\n\t\t\t/>\n\t\t</Tabs>\n\t);\n};\n\nexport default Sidebar;\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { OverridesPanel } = unlock( patternsPrivateApis );\n\nexport default function PatternOverridesPanel() {\n\tconst supportsPatternOverridesPanel = useSelect(\n\t\t( select ) => select( editorStore ).getCurrentPostType() === 'wp_block',\n\t\t[]\n\t);\n\n\tif ( ! supportsPatternOverridesPanel ) {\n\t\treturn null;\n\t}\n\n\treturn <OverridesPanel />;\n}\n", "/**\n * WordPress dependencies\n */\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PluginPostStatusInfo from '../plugin-post-status-info';\nimport PostAuthorPanel from '../post-author/panel';\nimport PostCardPanel from '../post-card-panel';\nimport PostContentInformation from '../post-content-information';\nimport PageAttributesPanel from '../page-attributes/panel';\nimport PostDiscussionPanel from '../post-discussion/panel';\nimport { PrivatePostExcerptPanel as PostExcerptPanel } from '../post-excerpt/panel';\nimport PostFeaturedImagePanel from '../post-featured-image/panel';\nimport PostFormatPanel from '../post-format/panel';\nimport PostLastEditedPanel from '../post-last-edited-panel';\nimport PostPanelSection from '../post-panel-section';\nimport PostSchedulePanel from '../post-schedule/panel';\nimport PostStatusPanel from '../post-status';\nimport PostSyncStatus from '../post-sync-status';\nimport PostTemplatePanel from '../post-template/panel';\nimport PostURLPanel from '../post-url/panel';\nimport BlogTitle from '../blog-title';\nimport PostsPerPage from '../posts-per-page';\nimport SiteDiscussion from '../site-discussion';\nimport { store as editorStore } from '../../store';\nimport { PrivatePostLastRevision } from '../post-last-revision';\nimport PostTrash from '../post-trash';\n\n/**\n * Module Constants\n */\nconst PANEL_NAME = 'post-status';\n\nexport default function PostSummary( { onActionPerformed } ) {\n\tconst { isRemovedPostStatusPanel, postType, postId } = useSelect(\n\t\t( select ) => {\n\t\t\t// We use isEditorPanelRemoved to hide the panel if it was programmatically removed. We do\n\t\t\t// not use isEditorPanelEnabled since this panel should not be disabled through the UI.\n\t\t\tconst {\n\t\t\t\tisEditorPanelRemoved,\n\t\t\t\tgetCurrentPostType,\n\t\t\t\tgetCurrentPostId,\n\t\t\t} = select( editorStore );\n\t\t\treturn {\n\t\t\t\tisRemovedPostStatusPanel: isEditorPanelRemoved( PANEL_NAME ),\n\t\t\t\tpostType: getCurrentPostType(),\n\t\t\t\tpostId: getCurrentPostId(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\treturn (\n\t\t<PostPanelSection className=\"editor-post-summary\">\n\t\t\t<PluginPostStatusInfo.Slot>\n\t\t\t\t{ ( fills ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t\t\t<PostCardPanel\n\t\t\t\t\t\t\t\tpostType={ postType }\n\t\t\t\t\t\t\t\tpostId={ postId }\n\t\t\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PostFeaturedImagePanel withPanelBody={ false } />\n\t\t\t\t\t\t\t<PostExcerptPanel />\n\t\t\t\t\t\t\t<VStack spacing={ 1 }>\n\t\t\t\t\t\t\t\t<PostContentInformation />\n\t\t\t\t\t\t\t\t<PostLastEditedPanel />\n\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t{ ! isRemovedPostStatusPanel && (\n\t\t\t\t\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t\t\t\t\t<VStack spacing={ 1 }>\n\t\t\t\t\t\t\t\t\t\t<PostStatusPanel />\n\t\t\t\t\t\t\t\t\t\t<PostSchedulePanel />\n\t\t\t\t\t\t\t\t\t\t<PostURLPanel />\n\t\t\t\t\t\t\t\t\t\t<PostAuthorPanel />\n\t\t\t\t\t\t\t\t\t\t<PostTemplatePanel />\n\t\t\t\t\t\t\t\t\t\t<PostDiscussionPanel />\n\t\t\t\t\t\t\t\t\t\t<PrivatePostLastRevision />\n\t\t\t\t\t\t\t\t\t\t<PageAttributesPanel />\n\t\t\t\t\t\t\t\t\t\t<PostSyncStatus />\n\t\t\t\t\t\t\t\t\t\t<BlogTitle />\n\t\t\t\t\t\t\t\t\t\t<PostsPerPage />\n\t\t\t\t\t\t\t\t\t\t<SiteDiscussion />\n\t\t\t\t\t\t\t\t\t\t<PostFormatPanel />\n\t\t\t\t\t\t\t\t\t\t{ fills }\n\t\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t\t\t<PostTrash\n\t\t\t\t\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</PluginPostStatusInfo.Slot>\n\t\t</PostPanelSection>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport {\n\tIcon,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalText as Text,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n} from '../../store/constants';\nimport { unlock } from '../../lock-unlock';\nimport PostActions from '../post-actions';\nimport usePageTypeBadge from '../../utils/pageTypeBadge';\nimport { getTemplateInfo } from '../../utils/get-template-info';\nconst { Badge } = unlock( componentsPrivateApis );\n\n/**\n * Renders a title of the post type and the available quick actions available within a 3-dot dropdown.\n *\n * @param {Object} props - Component props.\n * @param {string} [props.postType] - The post type string.\n * @param {string|string[]} [props.postId] - The post id or list of post ids.\n * @param {Function} [props.onActionPerformed] - A callback function for when a quick action is performed.\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PostCardPanel( {\n\tpostType,\n\tpostId,\n\tonActionPerformed,\n} ) {\n\tconst postIds = useMemo(\n\t\t() => ( Array.isArray( postId ) ? postId : [ postId ] ),\n\t\t[ postId ]\n\t);\n\tconst { postTitle, icon, labels } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedEntityRecord, getCurrentTheme, getPostType } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst { getPostIcon } = unlock( select( editorStore ) );\n\t\t\tlet _title = '';\n\t\t\tconst _record = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostIds[ 0 ]\n\t\t\t);\n\t\t\tif ( postIds.length === 1 ) {\n\t\t\t\tconst { default_template_types: templateTypes = [] } =\n\t\t\t\t\tgetCurrentTheme() ?? {};\n\n\t\t\t\tconst _templateInfo = [\n\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\tTEMPLATE_PART_POST_TYPE,\n\t\t\t\t].includes( postType )\n\t\t\t\t\t? getTemplateInfo( {\n\t\t\t\t\t\t\ttemplate: _record,\n\t\t\t\t\t\t\ttemplateTypes,\n\t\t\t\t\t } )\n\t\t\t\t\t: {};\n\t\t\t\t_title = _templateInfo?.title || _record?.title;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tpostTitle: _title,\n\t\t\t\ticon: getPostIcon( postType, {\n\t\t\t\t\tarea: _record?.area,\n\t\t\t\t} ),\n\t\t\t\tlabels: getPostType( postType )?.labels,\n\t\t\t};\n\t\t},\n\t\t[ postIds, postType ]\n\t);\n\n\tconst pageTypeBadge = usePageTypeBadge( postId );\n\tlet title = __( 'No title' );\n\tif ( labels?.name && postIds.length > 1 ) {\n\t\ttitle = sprintf(\n\t\t\t// translators: %1$d number of selected items %2$s: Name of the plural post type e.g: \"Posts\".\n\t\t\t__( '%1$d %2$s' ),\n\t\t\tpostIds.length,\n\t\t\tlabels?.name\n\t\t);\n\t} else if ( postTitle ) {\n\t\ttitle = stripHTML( postTitle );\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 1 } className=\"editor-post-card-panel\">\n\t\t\t<HStack\n\t\t\t\tspacing={ 2 }\n\t\t\t\tclassName=\"editor-post-card-panel__header\"\n\t\t\t\talignment=\"flex-start\"\n\t\t\t>\n\t\t\t\t<Icon className=\"editor-post-card-panel__icon\" icon={ icon } />\n\t\t\t\t<Text\n\t\t\t\t\tnumberOfLines={ 2 }\n\t\t\t\t\ttruncate\n\t\t\t\t\tclassName=\"editor-post-card-panel__title\"\n\t\t\t\t\tas=\"h2\"\n\t\t\t\t>\n\t\t\t\t\t<span className=\"editor-post-card-panel__title-name\">\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</span>\n\t\t\t\t\t{ pageTypeBadge && postIds.length === 1 && (\n\t\t\t\t\t\t<Badge>{ pageTypeBadge }</Badge>\n\t\t\t\t\t) }\n\t\t\t\t</Text>\n\t\t\t\t{ postIds.length === 1 && (\n\t\t\t\t\t<PostActions\n\t\t\t\t\t\tpostType={ postType }\n\t\t\t\t\t\tpostId={ postIds[ 0 ] }\n\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t\t{ postIds.length > 1 && (\n\t\t\t\t<Text className=\"editor-post-card-panel__description\">\n\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t// translators: %s: Name of the plural post type e.g: \"Posts\".\n\t\t\t\t\t\t__( 'Changes will be applied to all selected %s.' ),\n\t\t\t\t\t\tlabels?.name.toLowerCase()\n\t\t\t\t\t) }\n\t\t\t\t</Text>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useRegistry, useSelect } from '@wordpress/data';\nimport { useState, useMemo } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tprivateApis as componentsPrivateApis,\n\tButton,\n\tModal,\n} from '@wordpress/components';\nimport { moreVertical } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { usePostActions } from './actions';\n\nconst { Menu, kebabCase } = unlock( componentsPrivateApis );\n\nexport default function PostActions( { postType, postId, onActionPerformed } ) {\n\tconst [ activeModalAction, setActiveModalAction ] = useState( null );\n\n\tconst { item, permissions } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedEntityRecord, getEntityRecordPermissions } =\n\t\t\t\tunlock( select( coreStore ) );\n\t\t\treturn {\n\t\t\t\titem: getEditedEntityRecord( 'postType', postType, postId ),\n\t\t\t\tpermissions: getEntityRecordPermissions(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ postId, postType ]\n\t);\n\tconst itemWithPermissions = useMemo( () => {\n\t\treturn {\n\t\t\t...item,\n\t\t\tpermissions,\n\t\t};\n\t}, [ item, permissions ] );\n\tconst allActions = usePostActions( { postType, onActionPerformed } );\n\n\tconst actions = useMemo( () => {\n\t\treturn allActions.filter( ( action ) => {\n\t\t\treturn (\n\t\t\t\t! action.isEligible || action.isEligible( itemWithPermissions )\n\t\t\t);\n\t\t} );\n\t}, [ allActions, itemWithPermissions ] );\n\n\treturn (\n\t\t<>\n\t\t\t<Menu placement=\"bottom-end\">\n\t\t\t\t<Menu.TriggerButton\n\t\t\t\t\trender={\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\tlabel={ __( 'Actions' ) }\n\t\t\t\t\t\t\tdisabled={ ! actions.length }\n\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\tclassName=\"editor-all-actions-button\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<Menu.Popover>\n\t\t\t\t\t<ActionsDropdownMenuGroup\n\t\t\t\t\t\tactions={ actions }\n\t\t\t\t\t\titems={ [ itemWithPermissions ] }\n\t\t\t\t\t\tsetActiveModalAction={ setActiveModalAction }\n\t\t\t\t\t/>\n\t\t\t\t</Menu.Popover>\n\t\t\t</Menu>\n\t\t\t{ !! activeModalAction && (\n\t\t\t\t<ActionModal\n\t\t\t\t\taction={ activeModalAction }\n\t\t\t\t\titems={ [ itemWithPermissions ] }\n\t\t\t\t\tcloseModal={ () => setActiveModalAction( null ) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\n// From now on all the functions on this file are copied as from the dataviews packages,\n// The editor packages should not be using the dataviews packages directly,\n// and the dataviews package should not be using the editor packages directly,\n// so duplicating the code here seems like the least bad option.\n\nfunction DropdownMenuItemTrigger( { action, onClick, items } ) {\n\tconst label =\n\t\ttypeof action.label === 'string' ? action.label : action.label( items );\n\treturn (\n\t\t<Menu.Item onClick={ onClick }>\n\t\t\t<Menu.ItemLabel>{ label }</Menu.ItemLabel>\n\t\t</Menu.Item>\n\t);\n}\n\nexport function ActionModal( { action, items, closeModal } ) {\n\tconst label =\n\t\ttypeof action.label === 'string' ? action.label : action.label( items );\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ action.modalHeader || label }\n\t\t\t__experimentalHideHeader={ !! action.hideModalHeader }\n\t\t\tonRequestClose={ closeModal ?? ( () => {} ) }\n\t\t\tfocusOnMount=\"firstContentElement\"\n\t\t\tsize=\"medium\"\n\t\t\toverlayClassName={ `editor-action-modal editor-action-modal__${ kebabCase(\n\t\t\t\taction.id\n\t\t\t) }` }\n\t\t>\n\t\t\t<action.RenderModal items={ items } closeModal={ closeModal } />\n\t\t</Modal>\n\t);\n}\n\nfunction ActionsDropdownMenuGroup( { actions, items, setActiveModalAction } ) {\n\tconst registry = useRegistry();\n\treturn (\n\t\t<Menu.Group>\n\t\t\t{ actions.map( ( action ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<DropdownMenuItemTrigger\n\t\t\t\t\t\tkey={ action.id }\n\t\t\t\t\t\taction={ action }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tif ( 'RenderModal' in action ) {\n\t\t\t\t\t\t\t\tsetActiveModalAction( action );\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taction.callback( items, { registry } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\titems={ items }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Menu.Group>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useMemo, useEffect } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { useSetAsHomepageAction } from './set-as-homepage';\nimport { useSetAsPostsPageAction } from './set-as-posts-page';\n\nexport function usePostActions( { postType, onActionPerformed, context } ) {\n\tconst { defaultActions } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityActions } = unlock( select( editorStore ) );\n\t\t\treturn {\n\t\t\t\tdefaultActions: getEntityActions( 'postType', postType ),\n\t\t\t};\n\t\t},\n\t\t[ postType ]\n\t);\n\n\tconst shouldShowHomepageActions = useSelect(\n\t\t( select ) => {\n\t\t\tif ( postType !== 'page' ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tconst { getDefaultTemplateId, getEntityRecord, canUser } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst canUpdateSettings = canUser( 'update', {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'site',\n\t\t\t} );\n\n\t\t\tif ( ! canUpdateSettings ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Note that resolved template for `front-page` is not necessarily a\n\t\t\t// `front-page` template.\n\t\t\tconst frontPageTemplateId = getDefaultTemplateId( {\n\t\t\t\tslug: 'front-page',\n\t\t\t} );\n\n\t\t\tif ( ! frontPageTemplateId ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// This won't trigger a second network request, getDefaultTemplateId\n\t\t\t// will have received the whole template from the REST API.\n\t\t\tconst frontPageTemplate = getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'wp_template',\n\t\t\t\tfrontPageTemplateId\n\t\t\t);\n\n\t\t\tif ( ! frontPageTemplate ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// When there is a front page template, the front page cannot be\n\t\t\t// changed. See\n\t\t\t// https://developer.wordpress.org/themes/basics/template-hierarchy/\n\t\t\treturn frontPageTemplate.slug !== 'front-page';\n\t\t},\n\t\t[ postType ]\n\t);\n\n\tconst setAsHomepageAction = useSetAsHomepageAction();\n\tconst setAsPostsPageAction = useSetAsPostsPageAction();\n\n\tconst { registerPostTypeSchema } = unlock( useDispatch( editorStore ) );\n\tuseEffect( () => {\n\t\tregisterPostTypeSchema( postType );\n\t}, [ registerPostTypeSchema, postType ] );\n\n\treturn useMemo( () => {\n\t\tlet actions = [ ...defaultActions ];\n\t\tif ( shouldShowHomepageActions ) {\n\t\t\tactions.push( setAsHomepageAction, setAsPostsPageAction );\n\t\t}\n\n\t\t// Ensure \"Move to trash\" is always the last action.\n\t\tactions = actions.sort( ( a, b ) =>\n\t\t\tb.id === 'move-to-trash' ? -1 : 0\n\t\t);\n\n\t\t// Filter actions based on provided context. If not provided\n\t\t// all actions are returned. We'll have a single entry for getting the actions\n\t\t// and the consumer should provide the context to filter the actions, if needed.\n\t\t// Actions should also provide the `context` they support, if it's specific, to\n\t\t// compare with the provided context to get all the actions.\n\t\t// Right now the only supported context is `list`.\n\t\tactions = actions.filter( ( action ) => {\n\t\t\tif ( ! action.context ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn action.context === context;\n\t\t} );\n\n\t\tif ( onActionPerformed ) {\n\t\t\tfor ( let i = 0; i < actions.length; ++i ) {\n\t\t\t\tif ( actions[ i ].callback ) {\n\t\t\t\t\tconst existingCallback = actions[ i ].callback;\n\t\t\t\t\tactions[ i ] = {\n\t\t\t\t\t\t...actions[ i ],\n\t\t\t\t\t\tcallback: ( items, argsObject ) => {\n\t\t\t\t\t\t\texistingCallback( items, {\n\t\t\t\t\t\t\t\t...argsObject,\n\t\t\t\t\t\t\t\tonActionPerformed: ( _items ) => {\n\t\t\t\t\t\t\t\t\tif ( argsObject?.onActionPerformed ) {\n\t\t\t\t\t\t\t\t\t\targsObject.onActionPerformed( _items );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonActionPerformed(\n\t\t\t\t\t\t\t\t\t\tactions[ i ].id,\n\t\t\t\t\t\t\t\t\t\t_items\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tif ( actions[ i ].RenderModal ) {\n\t\t\t\t\tconst ExistingRenderModal = actions[ i ].RenderModal;\n\t\t\t\t\tactions[ i ] = {\n\t\t\t\t\t\t...actions[ i ],\n\t\t\t\t\t\tRenderModal: ( props ) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<ExistingRenderModal\n\t\t\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t\t\t\tonActionPerformed={ ( _items ) => {\n\t\t\t\t\t\t\t\t\t\tif ( props.onActionPerformed ) {\n\t\t\t\t\t\t\t\t\t\t\tprops.onActionPerformed( _items );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonActionPerformed(\n\t\t\t\t\t\t\t\t\t\t\tactions[ i ].id,\n\t\t\t\t\t\t\t\t\t\t\t_items\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn actions;\n\t}, [\n\t\tcontext,\n\t\tdefaultActions,\n\t\tonActionPerformed,\n\t\tsetAsHomepageAction,\n\t\tsetAsPostsPageAction,\n\t\tshouldShowHomepageActions,\n\t] );\n}\n", "/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useMemo } from '@wordpress/element';\nimport {\n\tButton,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { getItemTitle } from '../../utils/get-item-title';\n\nconst SetAsHomepageModal = ( { items, closeModal } ) => {\n\tconst [ item ] = items;\n\tconst pageTitle = getItemTitle( item );\n\tconst { showOnFront, currentHomePage, isSaving } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord, isSavingEntityRecord } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst siteSettings = getEntityRecord( 'root', 'site' );\n\t\t\tconst currentHomePageItem = getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'page',\n\t\t\t\tsiteSettings?.page_on_front\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tshowOnFront: siteSettings?.show_on_front,\n\t\t\t\tcurrentHomePage: currentHomePageItem,\n\t\t\t\tisSaving: isSavingEntityRecord( 'root', 'site' ),\n\t\t\t};\n\t\t}\n\t);\n\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tasync function onSetPageAsHomepage( event ) {\n\t\tevent.preventDefault();\n\n\t\ttry {\n\t\t\tawait saveEntityRecord( 'root', 'site', {\n\t\t\t\tpage_on_front: item.id,\n\t\t\t\tshow_on_front: 'page',\n\t\t\t} );\n\n\t\t\tcreateSuccessNotice( __( 'Homepage updated.' ), {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __( 'An error occurred while setting the homepage.' );\n\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t} finally {\n\t\t\tcloseModal?.();\n\t\t}\n\t}\n\n\tlet modalWarning = '';\n\tif ( 'posts' === showOnFront ) {\n\t\tmodalWarning = __(\n\t\t\t'This will replace the current homepage which is set to display latest posts.'\n\t\t);\n\t} else if ( currentHomePage ) {\n\t\tmodalWarning = sprintf(\n\t\t\t// translators: %s: title of the current home page.\n\t\t\t__( 'This will replace the current homepage: \"%s\"' ),\n\t\t\tgetItemTitle( currentHomePage )\n\t\t);\n\t}\n\n\tconst modalText = sprintf(\n\t\t// translators: %1$s: title of the page to be set as the homepage, %2$s: homepage replacement warning message.\n\t\t__( 'Set \"%1$s\" as the site homepage? %2$s' ),\n\t\tpageTitle,\n\t\tmodalWarning\n\t).trim();\n\n\t// translators: Button label to confirm setting the specified page as the homepage.\n\tconst modalButtonLabel = __( 'Set homepage' );\n\n\treturn (\n\t\t<form onSubmit={ onSetPageAsHomepage }>\n\t\t\t<VStack spacing=\"5\">\n\t\t\t\t<Text>{ modalText }</Text>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tcloseModal?.();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tdisabled={ isSaving }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\tdisabled={ isSaving }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ modalButtonLabel }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t</form>\n\t);\n};\n\nexport const useSetAsHomepageAction = () => {\n\tconst { pageOnFront, pageForPosts } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, canUser } = select( coreStore );\n\t\tconst siteSettings = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? getEntityRecord( 'root', 'site' )\n\t\t\t: undefined;\n\t\treturn {\n\t\t\tpageOnFront: siteSettings?.page_on_front,\n\t\t\tpageForPosts: siteSettings?.page_for_posts,\n\t\t};\n\t} );\n\n\treturn useMemo(\n\t\t() => ( {\n\t\t\tid: 'set-as-homepage',\n\t\t\tlabel: __( 'Set as homepage' ),\n\t\t\tisEligible( post ) {\n\t\t\t\tif ( post.status !== 'publish' ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif ( post.type !== 'page' ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Don't show the action if the page is already set as the homepage.\n\t\t\t\tif ( pageOnFront === post.id ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Don't show the action if the page is already set as the page for posts.\n\t\t\t\tif ( pageForPosts === post.id ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\tmodalFocusOnMount: 'firstContentElement',\n\t\t\tRenderModal: SetAsHomepageModal,\n\t\t} ),\n\t\t[ pageForPosts, pageOnFront ]\n\t);\n};\n", "/**\n * WordPress dependencies\n */\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Helper function to get the title of a post item.\n * This is duplicated from the `@wordpress/fields` package.\n * `packages/fields/src/actions/utils.ts`\n *\n * @param {Object} item The post item.\n * @return {string} The title of the item, or an empty string if the title is not found.\n */\nexport function getItemTitle( item ) {\n\tif ( typeof item.title === 'string' ) {\n\t\treturn decodeEntities( item.title );\n\t}\n\tif ( item.title && 'rendered' in item.title ) {\n\t\treturn decodeEntities( item.title.rendered );\n\t}\n\tif ( item.title && 'raw' in item.title ) {\n\t\treturn decodeEntities( item.title.raw );\n\t}\n\treturn '';\n}\n", "/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useMemo } from '@wordpress/element';\nimport {\n\tButton,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { getItemTitle } from '../../utils/get-item-title';\n\nconst SetAsPostsPageModal = ( { items, closeModal } ) => {\n\tconst [ item ] = items;\n\tconst pageTitle = getItemTitle( item );\n\tconst { currentPostsPage, isPageForPostsSet, isSaving } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord, isSavingEntityRecord } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst siteSettings = getEntityRecord( 'root', 'site' );\n\t\t\tconst currentPostsPageItem = getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'page',\n\t\t\t\tsiteSettings?.page_for_posts\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tcurrentPostsPage: currentPostsPageItem,\n\t\t\t\tisPageForPostsSet: siteSettings?.page_for_posts !== 0,\n\t\t\t\tisSaving: isSavingEntityRecord( 'root', 'site' ),\n\t\t\t};\n\t\t}\n\t);\n\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tasync function onSetPageAsPostsPage( event ) {\n\t\tevent.preventDefault();\n\n\t\ttry {\n\t\t\tawait saveEntityRecord( 'root', 'site', {\n\t\t\t\tpage_for_posts: item.id,\n\t\t\t\tshow_on_front: 'page',\n\t\t\t} );\n\n\t\t\tcreateSuccessNotice( __( 'Posts page updated.' ), {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __( 'An error occurred while setting the posts page.' );\n\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t} finally {\n\t\t\tcloseModal?.();\n\t\t}\n\t}\n\n\tconst modalWarning =\n\t\tisPageForPostsSet && currentPostsPage\n\t\t\t? sprintf(\n\t\t\t\t\t// translators: %s: title of the current posts page.\n\t\t\t\t\t__( 'This will replace the current posts page: \"%s\"' ),\n\t\t\t\t\tgetItemTitle( currentPostsPage )\n\t\t\t )\n\t\t\t: __( 'This page will show the latest posts.' );\n\n\tconst modalText = sprintf(\n\t\t// translators: %1$s: title of the page to be set as the posts page, %2$s: posts page replacement warning message.\n\t\t__( 'Set \"%1$s\" as the posts page? %2$s' ),\n\t\tpageTitle,\n\t\tmodalWarning\n\t);\n\n\t// translators: Button label to confirm setting the specified page as the posts page.\n\tconst modalButtonLabel = __( 'Set posts page' );\n\n\treturn (\n\t\t<form onSubmit={ onSetPageAsPostsPage }>\n\t\t\t<VStack spacing=\"5\">\n\t\t\t\t<Text>{ modalText }</Text>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tcloseModal?.();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tdisabled={ isSaving }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\tdisabled={ isSaving }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ modalButtonLabel }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t</form>\n\t);\n};\n\nexport const useSetAsPostsPageAction = () => {\n\tconst { pageOnFront, pageForPosts } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, canUser } = select( coreStore );\n\t\tconst siteSettings = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? getEntityRecord( 'root', 'site' )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tpageOnFront: siteSettings?.page_on_front,\n\t\t\tpageForPosts: siteSettings?.page_for_posts,\n\t\t};\n\t} );\n\n\treturn useMemo(\n\t\t() => ( {\n\t\t\tid: 'set-as-posts-page',\n\t\t\tlabel: __( 'Set as posts page' ),\n\t\t\tisEligible( post ) {\n\t\t\t\tif ( post.status !== 'publish' ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif ( post.type !== 'page' ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Don't show the action if the page is already set as the homepage.\n\t\t\t\tif ( pageOnFront === post.id ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Don't show the action if the page is already set as the page for posts.\n\t\t\t\tif ( pageForPosts === post.id ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\tmodalFocusOnMount: 'firstContentElement',\n\t\t\tRenderModal: SetAsPostsPageModal,\n\t\t} ),\n\t\t[ pageForPosts, pageOnFront ]\n\t);\n};\n", "/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { __, _x, _n, sprintf } from '@wordpress/i18n';\nimport { count as wordCount } from '@wordpress/wordcount';\nimport { useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n} from '../../store/constants';\n\n// Taken from packages/editor/src/components/time-to-read/index.js.\nconst AVERAGE_READING_RATE = 189;\n\n// This component renders the wordcount and reading time for the post.\nexport default function PostContentInformation() {\n\tconst { postContent } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, getCurrentPostType, getCurrentPostId } =\n\t\t\tselect( editorStore );\n\t\tconst { canUser } = select( coreStore );\n\t\tconst { getEntityRecord } = select( coreStore );\n\t\tconst siteSettings = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? getEntityRecord( 'root', 'site' )\n\t\t\t: undefined;\n\t\tconst postType = getCurrentPostType();\n\t\tconst _id = getCurrentPostId();\n\t\tconst isPostsPage = +_id === siteSettings?.page_for_posts;\n\t\tconst showPostContentInfo =\n\t\t\t! isPostsPage &&\n\t\t\t! [ TEMPLATE_POST_TYPE, TEMPLATE_PART_POST_TYPE ].includes(\n\t\t\t\tpostType\n\t\t\t);\n\t\treturn {\n\t\t\tpostContent:\n\t\t\t\tshowPostContentInfo && getEditedPostAttribute( 'content' ),\n\t\t};\n\t}, [] );\n\n\t/*\n\t * translators: If your word count is based on single characters (e.g. East Asian characters),\n\t * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.\n\t * Do not translate into your own language.\n\t */\n\tconst wordCountType = _x( 'words', 'Word count type. Do not translate!' );\n\tconst wordsCounted = useMemo(\n\t\t() => ( postContent ? wordCount( postContent, wordCountType ) : 0 ),\n\t\t[ postContent, wordCountType ]\n\t);\n\tif ( ! wordsCounted ) {\n\t\treturn null;\n\t}\n\tconst readingTime = Math.round( wordsCounted / AVERAGE_READING_RATE );\n\tconst wordsCountText = sprintf(\n\t\t// translators: %s: the number of words in the post.\n\t\t_n( '%s word', '%s words', wordsCounted ),\n\t\twordsCounted.toLocaleString()\n\t);\n\tconst minutesText =\n\t\treadingTime <= 1\n\t\t\t? __( '1 minute' )\n\t\t\t: sprintf(\n\t\t\t\t\t/* translators: %s: the number of minutes to read the post. */\n\t\t\t\t\t_n( '%s minute', '%s minutes', readingTime ),\n\t\t\t\t\treadingTime.toLocaleString()\n\t\t\t );\n\treturn (\n\t\t<div className=\"editor-post-content-information\">\n\t\t\t<Text>\n\t\t\t\t{ sprintf(\n\t\t\t\t\t/* translators: 1: How many words a post has. 2: the number of minutes to read the post (e.g. 130 words, 2 minutes read time.) */\n\t\t\t\t\t__( '%1$s, %2$s read time.' ),\n\t\t\t\t\twordsCountText,\n\t\t\t\t\tminutesText\n\t\t\t\t) }\n\t\t\t</Text>\n\t\t</div>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { Button, Dropdown } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { useState, useMemo } from '@wordpress/element';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { default as PostFormatForm, POST_FORMATS } from './';\nimport PostFormatCheck from './check';\nimport PostPanelRow from '../post-panel-row';\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the Post Author Panel component.\n *\n * @return {React.ReactNode} The rendered component.\n */\nfunction PostFormat() {\n\tconst { postFormat } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst _postFormat = getEditedPostAttribute( 'format' );\n\t\treturn {\n\t\t\tpostFormat: _postFormat ?? 'standard',\n\t\t};\n\t}, [] );\n\tconst activeFormat = POST_FORMATS.find(\n\t\t( format ) => format.id === postFormat\n\t);\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\treturn (\n\t\t<PostFormatCheck>\n\t\t\t<PostPanelRow label={ __( 'Format' ) } ref={ setPopoverAnchor }>\n\t\t\t\t<Dropdown\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tcontentClassName=\"editor-post-format__dialog\"\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Current post format.\n\t\t\t\t\t\t\t\t__( 'Change format: %s' ),\n\t\t\t\t\t\t\t\tactiveFormat?.caption\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ activeFormat?.caption }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t<div className=\"editor-post-format__dialog-content\">\n\t\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\t\ttitle={ __( 'Format' ) }\n\t\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PostFormatForm />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PostPanelRow>\n\t\t</PostFormatCheck>\n\t);\n}\n\nexport default PostFormat;\n", "/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { humanTimeDiff } from '@wordpress/date';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function PostLastEditedPanel() {\n\tconst modified = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditedPostAttribute( 'modified' ),\n\t\t[]\n\t);\n\tconst lastEditedText =\n\t\tmodified &&\n\t\tsprintf(\n\t\t\t// translators: %s: Human-readable time difference, e.g. \"2 days ago\".\n\t\t\t__( 'Last edited %s.' ),\n\t\t\thumanTimeDiff( modified )\n\t\t);\n\tif ( ! lastEditedText ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<div className=\"editor-post-last-edited-panel\">\n\t\t\t<Text>{ lastEditedText }</Text>\n\t\t</div>\n\t);\n}\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalVStack as VStack } from '@wordpress/components';\n\nfunction PostPanelSection( { className, children } ) {\n\treturn (\n\t\t<VStack className={ clsx( 'editor-post-panel__section', className ) }>\n\t\t\t{ children }\n\t\t</VStack>\n\t);\n}\n\nexport default PostPanelSection;\n", "/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { debounce } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport {\n\tButton,\n\tDropdown,\n\t__experimentalInputControl as InputControl,\n} from '@wordpress/components';\nimport { useState, useMemo } from '@wordpress/element';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\nimport PostPanelRow from '../post-panel-row';\nimport { store as editorStore } from '../../store';\n\nconst EMPTY_OBJECT = {};\n\nexport default function BlogTitle() {\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst { postsPageTitle, postsPageId, isTemplate, postSlug } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord, getEditedEntityRecord, canUser } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst siteSettings = canUser( 'read', {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'site',\n\t\t\t} )\n\t\t\t\t? getEntityRecord( 'root', 'site' )\n\t\t\t\t: undefined;\n\t\t\tconst _postsPageRecord = siteSettings?.page_for_posts\n\t\t\t\t? getEditedEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t'page',\n\t\t\t\t\t\tsiteSettings?.page_for_posts\n\t\t\t\t )\n\t\t\t\t: EMPTY_OBJECT;\n\t\t\tconst { getEditedPostAttribute, getCurrentPostType } =\n\t\t\t\tselect( editorStore );\n\t\t\treturn {\n\t\t\t\tpostsPageId: _postsPageRecord?.id,\n\t\t\t\tpostsPageTitle: _postsPageRecord?.title,\n\t\t\t\tisTemplate: getCurrentPostType() === TEMPLATE_POST_TYPE,\n\t\t\t\tpostSlug: getEditedPostAttribute( 'slug' ),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tif (\n\t\t! isTemplate ||\n\t\t! [ 'home', 'index' ].includes( postSlug ) ||\n\t\t! postsPageId\n\t) {\n\t\treturn null;\n\t}\n\n\tconst setPostsPageTitle = ( newValue ) => {\n\t\teditEntityRecord( 'postType', 'page', postsPageId, {\n\t\t\ttitle: newValue,\n\t\t} );\n\t};\n\tconst decodedTitle = decodeEntities( postsPageTitle );\n\treturn (\n\t\t<PostPanelRow label={ __( 'Blog title' ) } ref={ setPopoverAnchor }>\n\t\t\t<Dropdown\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\tcontentClassName=\"editor-blog-title-dropdown__content\"\n\t\t\t\tfocusOnMount\n\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t\t// translators: %s: Current post link.\n\t\t\t\t\t\t\t__( 'Change blog title: %s' ),\n\t\t\t\t\t\t\tdecodedTitle\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ decodedTitle }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\ttitle={ __( 'Blog title' ) }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<InputControl\n\t\t\t\t\t\t\tplaceholder={ __( 'No title' ) }\n\t\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t\tvalue={ postsPageTitle }\n\t\t\t\t\t\t\tonChange={ debounce( setPostsPageTitle, 300 ) }\n\t\t\t\t\t\t\tlabel={ __( 'Blog title' ) }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'Set the Posts Page title. Appears in search results, and when the page is shared on social media.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t/>\n\t\t</PostPanelRow>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tButton,\n\tDropdown,\n\t__experimentalNumberControl as NumberControl,\n} from '@wordpress/components';\nimport { useState, useMemo } from '@wordpress/element';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\nimport { store as editorStore } from '../../store';\nimport PostPanelRow from '../post-panel-row';\n\nexport default function PostsPerPage() {\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst { postsPerPage, isTemplate, postSlug } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, getCurrentPostType } =\n\t\t\tselect( editorStore );\n\t\tconst { getEditedEntityRecord, canUser } = select( coreStore );\n\t\tconst siteSettings = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? getEditedEntityRecord( 'root', 'site' )\n\t\t\t: undefined;\n\t\treturn {\n\t\t\tisTemplate: getCurrentPostType() === TEMPLATE_POST_TYPE,\n\t\t\tpostSlug: getEditedPostAttribute( 'slug' ),\n\t\t\tpostsPerPage: siteSettings?.posts_per_page || 1,\n\t\t};\n\t}, [] );\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tif ( ! isTemplate || ! [ 'home', 'index' ].includes( postSlug ) ) {\n\t\treturn null;\n\t}\n\tconst setPostsPerPage = ( newValue ) => {\n\t\teditEntityRecord( 'root', 'site', undefined, {\n\t\t\tposts_per_page: newValue,\n\t\t} );\n\t};\n\treturn (\n\t\t<PostPanelRow label={ __( 'Posts per page' ) } ref={ setPopoverAnchor }>\n\t\t\t<Dropdown\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\tcontentClassName=\"editor-posts-per-page-dropdown__content\"\n\t\t\t\tfocusOnMount\n\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\taria-label={ __( 'Change posts per page' ) }\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ postsPerPage }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\ttitle={ __( 'Posts per page' ) }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<NumberControl\n\t\t\t\t\t\t\tplaceholder={ 0 }\n\t\t\t\t\t\t\tvalue={ postsPerPage }\n\t\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t\tspinControls=\"custom\"\n\t\t\t\t\t\t\tstep=\"1\"\n\t\t\t\t\t\t\tmin=\"1\"\n\t\t\t\t\t\t\tonChange={ setPostsPerPage }\n\t\t\t\t\t\t\tlabel={ __( 'Posts per page' ) }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t/>\n\t\t</PostPanelRow>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tButton,\n\tDropdown,\n\tRadioControl,\n\t__experimentalVStack as VStack,\n\t__experimentalText as Text,\n} from '@wordpress/components';\nimport { useState, useMemo } from '@wordpress/element';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\nimport PostPanelRow from '../post-panel-row';\nimport { store as editorStore } from '../../store';\n\nconst COMMENT_OPTIONS = [\n\t{\n\t\tlabel: _x( 'Open', 'Adjective: e.g. \"Comments are open\"' ),\n\t\tvalue: 'open',\n\t\tdescription: __( 'Visitors can add new comments and replies.' ),\n\t},\n\t{\n\t\tlabel: __( 'Closed' ),\n\t\tvalue: '',\n\t\tdescription: [\n\t\t\t__( 'Visitors cannot add new comments or replies.' ),\n\t\t\t__( 'Existing comments remain visible.' ),\n\t\t].join( ' ' ),\n\t},\n];\n\nexport default function SiteDiscussion() {\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst { allowCommentsOnNewPosts, isTemplate, postSlug } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedPostAttribute, getCurrentPostType } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst { getEditedEntityRecord, canUser } = select( coreStore );\n\t\t\tconst siteSettings = canUser( 'read', {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'site',\n\t\t\t} )\n\t\t\t\t? getEditedEntityRecord( 'root', 'site' )\n\t\t\t\t: undefined;\n\t\t\treturn {\n\t\t\t\tisTemplate: getCurrentPostType() === TEMPLATE_POST_TYPE,\n\t\t\t\tpostSlug: getEditedPostAttribute( 'slug' ),\n\t\t\t\tallowCommentsOnNewPosts:\n\t\t\t\t\tsiteSettings?.default_comment_status || '',\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tif ( ! isTemplate || ! [ 'home', 'index' ].includes( postSlug ) ) {\n\t\treturn null;\n\t}\n\tconst setAllowCommentsOnNewPosts = ( newValue ) => {\n\t\teditEntityRecord( 'root', 'site', undefined, {\n\t\t\tdefault_comment_status: newValue ? 'open' : null,\n\t\t} );\n\t};\n\treturn (\n\t\t<PostPanelRow label={ __( 'Discussion' ) } ref={ setPopoverAnchor }>\n\t\t\t<Dropdown\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\tcontentClassName=\"editor-site-discussion-dropdown__content\"\n\t\t\t\tfocusOnMount\n\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\taria-label={ __( 'Change discussion settings' ) }\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ allowCommentsOnNewPosts\n\t\t\t\t\t\t\t? __( 'Comments open' )\n\t\t\t\t\t\t\t: __( 'Comments closed' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\ttitle={ __( 'Discussion' ) }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t\t\t<Text>\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Changes will apply to new posts only. Individual posts may override these settings.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t<RadioControl\n\t\t\t\t\t\t\t\tclassName=\"editor-site-discussion__options\"\n\t\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\t\tlabel={ __( 'Comment status' ) }\n\t\t\t\t\t\t\t\toptions={ COMMENT_OPTIONS }\n\t\t\t\t\t\t\t\tonChange={ setAllowCommentsOnNewPosts }\n\t\t\t\t\t\t\t\tselected={ allowCommentsOnNewPosts }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t/>\n\t\t</PostPanelRow>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { PanelBody } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalBlockPatternsList as BlockPatternsList } from '@wordpress/block-editor';\nimport { serialize } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { useAvailablePatterns } from './hooks';\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n} from '../../store/constants';\n\nfunction TemplatesList( { availableTemplates, onSelect } ) {\n\tif ( ! availableTemplates || availableTemplates?.length === 0 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockPatternsList\n\t\t\tlabel={ __( 'Templates' ) }\n\t\t\tblockPatterns={ availableTemplates }\n\t\t\tonClickPattern={ onSelect }\n\t\t\tshowTitlesAsTooltip\n\t\t/>\n\t);\n}\n\nfunction PostTransform() {\n\tconst { area, name, slug, postType, postId } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostType, getCurrentPostId } = select( editorStore );\n\t\tconst { getEditedEntityRecord } = select( coreStore );\n\t\tconst type = getCurrentPostType();\n\t\tconst id = getCurrentPostId();\n\t\tconst record = getEditedEntityRecord( 'postType', type, id );\n\n\t\treturn {\n\t\t\tarea: record?.area,\n\t\t\tname: record?.name,\n\t\t\tslug: record?.slug,\n\t\t\tpostType: type,\n\t\t\tpostId: id,\n\t\t};\n\t}, [] );\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst availablePatterns = useAvailablePatterns( { area, name, slug } );\n\tconst onTemplateSelect = async ( selectedTemplate ) => {\n\t\tawait editEntityRecord( 'postType', postType, postId, {\n\t\t\tblocks: selectedTemplate.blocks,\n\t\t\tcontent: serialize( selectedTemplate.blocks ),\n\t\t} );\n\t};\n\tif ( ! availablePatterns?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody\n\t\t\ttitle={ __( 'Design' ) }\n\t\t\tinitialOpen={ postType === TEMPLATE_PART_POST_TYPE }\n\t\t>\n\t\t\t<TemplatesList\n\t\t\t\tavailableTemplates={ availablePatterns }\n\t\t\t\tonSelect={ onTemplateSelect }\n\t\t\t/>\n\t\t</PanelBody>\n\t);\n}\n\nexport default function PostTransformPanel() {\n\tconst { postType } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostType } = select( editorStore );\n\t\treturn {\n\t\t\tpostType: getCurrentPostType(),\n\t\t};\n\t}, [] );\n\n\tif (\n\t\t! [ TEMPLATE_PART_POST_TYPE, TEMPLATE_POST_TYPE ].includes( postType )\n\t) {\n\t\treturn null;\n\t}\n\n\treturn <PostTransform />;\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { parse } from '@wordpress/blocks';\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst { EXCLUDED_PATTERN_SOURCES, PATTERN_TYPES } =\n\tunlock( patternsPrivateApis );\n\nfunction injectThemeAttributeInBlockTemplateContent(\n\tblock,\n\tcurrentThemeStylesheet\n) {\n\tblock.innerBlocks = block.innerBlocks.map( ( innerBlock ) => {\n\t\treturn injectThemeAttributeInBlockTemplateContent(\n\t\t\tinnerBlock,\n\t\t\tcurrentThemeStylesheet\n\t\t);\n\t} );\n\n\tif (\n\t\tblock.name === 'core/template-part' &&\n\t\tblock.attributes.theme === undefined\n\t) {\n\t\tblock.attributes.theme = currentThemeStylesheet;\n\t}\n\treturn block;\n}\n\n/**\n * Filter all patterns and return only the ones that are compatible with the current template.\n *\n * @param {Array} patterns An array of patterns.\n * @param {Object} template The current template. Required values are `area`, `name`, and `slug`.\n * @return {Array} Array of patterns that are compatible with the current template.\n */\nfunction filterPatterns( patterns, template ) {\n\t// Filter out duplicates.\n\tconst filterOutDuplicatesByName = ( currentItem, index, items ) =>\n\t\tindex === items.findIndex( ( item ) => currentItem.name === item.name );\n\n\t// Filter out core/directory patterns not included in theme.json.\n\tconst filterOutExcludedPatternSources = ( pattern ) =>\n\t\t! EXCLUDED_PATTERN_SOURCES.includes( pattern.source );\n\n\t// Looks for patterns that have the same template type as the current template,\n\t// or have a block type that matches the current template area.\n\tconst filterCompatiblePatterns = ( pattern ) =>\n\t\tpattern.templateTypes?.includes( template.slug ) ||\n\t\tpattern.blockTypes?.includes( 'core/template-part/' + template.area );\n\n\treturn patterns.filter( ( pattern, index, items ) => {\n\t\treturn (\n\t\t\tfilterOutDuplicatesByName( pattern, index, items ) &&\n\t\t\tfilterOutExcludedPatternSources( pattern ) &&\n\t\t\tfilterCompatiblePatterns( pattern )\n\t\t);\n\t} );\n}\n\nfunction preparePatterns( patterns, currentThemeStylesheet ) {\n\treturn patterns.map( ( pattern ) => ( {\n\t\t...pattern,\n\t\tkeywords: pattern.keywords || [],\n\t\ttype: PATTERN_TYPES.theme,\n\t\tblocks: parse( pattern.content, {\n\t\t\t__unstableSkipMigrationLogs: true,\n\t\t} ).map( ( block ) =>\n\t\t\tinjectThemeAttributeInBlockTemplateContent(\n\t\t\t\tblock,\n\t\t\t\tcurrentThemeStylesheet\n\t\t\t)\n\t\t),\n\t} ) );\n}\n\nexport function useAvailablePatterns( { area, name, slug } ) {\n\tconst { blockPatterns, restBlockPatterns, currentThemeStylesheet } =\n\t\tuseSelect( ( select ) => {\n\t\t\tconst { getEditorSettings } = select( editorStore );\n\t\t\tconst settings = getEditorSettings();\n\n\t\t\treturn {\n\t\t\t\tblockPatterns:\n\t\t\t\t\tsettings.__experimentalAdditionalBlockPatterns ??\n\t\t\t\t\tsettings.__experimentalBlockPatterns,\n\t\t\t\trestBlockPatterns: select( coreStore ).getBlockPatterns(),\n\t\t\t\tcurrentThemeStylesheet:\n\t\t\t\t\tselect( coreStore ).getCurrentTheme().stylesheet,\n\t\t\t};\n\t\t}, [] );\n\n\treturn useMemo( () => {\n\t\tconst mergedPatterns = [\n\t\t\t...( blockPatterns || [] ),\n\t\t\t...( restBlockPatterns || [] ),\n\t\t];\n\t\tconst filteredPatterns = filterPatterns( mergedPatterns, {\n\t\t\tarea,\n\t\t\tname,\n\t\t\tslug,\n\t\t} );\n\t\treturn preparePatterns( filteredPatterns, currentThemeStylesheet );\n\t}, [\n\t\tarea,\n\t\tname,\n\t\tslug,\n\t\tblockPatterns,\n\t\trestBlockPatterns,\n\t\tcurrentThemeStylesheet,\n\t] );\n}\n", "/**\n * WordPress dependencies\n */\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { forwardRef } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { sidebars } from './constants';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nconst SidebarHeader = ( _, ref ) => {\n\tconst postTypeLabel = useSelect(\n\t\t( select ) => select( editorStore ).getPostTypeLabel(),\n\t\t[]\n\t);\n\n\tconst documentLabel = postTypeLabel\n\t\t? decodeEntities( postTypeLabel )\n\t\t: // translators: Default label for the Document sidebar tab, not selected.\n\t\t _x( 'Document', 'noun, panel' );\n\n\treturn (\n\t\t<Tabs.TabList ref={ ref }>\n\t\t\t<Tabs.Tab\n\t\t\t\ttabId={ sidebars.document }\n\t\t\t\t// Used for focus management in the SettingsSidebar component.\n\t\t\t\tdata-tab-id={ sidebars.document }\n\t\t\t>\n\t\t\t\t{ documentLabel }\n\t\t\t</Tabs.Tab>\n\t\t\t<Tabs.Tab\n\t\t\t\ttabId={ sidebars.block }\n\t\t\t\t// Used for focus management in the SettingsSidebar component.\n\t\t\t\tdata-tab-id={ sidebars.block }\n\t\t\t>\n\t\t\t\t{ /* translators: Text label for the Block Settings Sidebar tab. */ }\n\t\t\t\t{ __( 'Block' ) }\n\t\t\t</Tabs.Tab>\n\t\t</Tabs.TabList>\n\t);\n};\n\nexport default forwardRef( SidebarHeader );\n", "export const sidebars = {\n\tdocument: 'edit-post/document',\n\tblock: 'edit-post/block',\n};\n", "/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { PanelBody } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { applyFilters } from '@wordpress/hooks';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\nimport { store as editorStore } from '../../store';\n\nconst { BlockQuickNavigation } = unlock( blockEditorPrivateApis );\n\nconst POST_CONTENT_BLOCK_TYPES = [\n\t'core/post-title',\n\t'core/post-featured-image',\n\t'core/post-content',\n];\n\nconst TEMPLATE_PART_BLOCK = 'core/template-part';\n\nexport default function TemplateContentPanel() {\n\tconst postContentBlockTypes = useMemo(\n\t\t() =>\n\t\t\tapplyFilters(\n\t\t\t\t'editor.postContentBlockTypes',\n\t\t\t\tPOST_CONTENT_BLOCK_TYPES\n\t\t\t),\n\t\t[]\n\t);\n\n\tconst { clientIds, postType, renderingMode } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetCurrentPostType,\n\t\t\t\tgetPostBlocksByName,\n\t\t\t\tgetRenderingMode,\n\t\t\t} = unlock( select( editorStore ) );\n\t\t\tconst _postType = getCurrentPostType();\n\t\t\treturn {\n\t\t\t\tpostType: _postType,\n\t\t\t\tclientIds: getPostBlocksByName(\n\t\t\t\t\tTEMPLATE_POST_TYPE === _postType\n\t\t\t\t\t\t? TEMPLATE_PART_BLOCK\n\t\t\t\t\t\t: postContentBlockTypes\n\t\t\t\t),\n\t\t\t\trenderingMode: getRenderingMode(),\n\t\t\t};\n\t\t},\n\t\t[ postContentBlockTypes ]\n\t);\n\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\n\tif (\n\t\t( renderingMode === 'post-only' && postType !== TEMPLATE_POST_TYPE ) ||\n\t\tclientIds.length === 0\n\t) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody title={ __( 'Content' ) }>\n\t\t\t<BlockQuickNavigation\n\t\t\t\tclientIds={ clientIds }\n\t\t\t\tonSelect={ () => {\n\t\t\t\t\tenableComplementaryArea( 'core', 'edit-post/document' );\n\t\t\t\t} }\n\t\t\t/>\n\t\t</PanelBody>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { PanelBody } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { TEMPLATE_PART_POST_TYPE } from '../../store/constants';\nimport { store as editorStore } from '../../store';\n\nconst { BlockQuickNavigation } = unlock( blockEditorPrivateApis );\n\nfunction TemplatePartContentPanelInner() {\n\tconst blockTypes = useSelect( ( select ) => {\n\t\tconst { getBlockTypes } = select( blocksStore );\n\t\treturn getBlockTypes();\n\t}, [] );\n\tconst themeBlockNames = useMemo( () => {\n\t\treturn blockTypes\n\t\t\t.filter( ( blockType ) => {\n\t\t\t\treturn blockType.category === 'theme';\n\t\t\t} )\n\t\t\t.map( ( { name } ) => name );\n\t}, [ blockTypes ] );\n\tconst themeBlocks = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlocksByName } = select( blockEditorStore );\n\t\t\treturn getBlocksByName( themeBlockNames );\n\t\t},\n\t\t[ themeBlockNames ]\n\t);\n\tif ( themeBlocks.length === 0 ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<PanelBody title={ __( 'Content' ) }>\n\t\t\t<BlockQuickNavigation clientIds={ themeBlocks } />\n\t\t</PanelBody>\n\t);\n}\n\nexport default function TemplatePartContentPanel() {\n\tconst postType = useSelect( ( select ) => {\n\t\tconst { getCurrentPostType } = select( editorStore );\n\t\treturn getCurrentPostType();\n\t}, [] );\n\tif ( postType !== TEMPLATE_PART_POST_TYPE ) {\n\t\treturn null;\n\t}\n\n\treturn <TemplatePartContentPanelInner />;\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * This listener hook monitors for block selection and triggers the appropriate\n * sidebar state.\n */\nfunction useAutoSwitchEditorSidebars() {\n\tconst { hasBlockSelection } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\thasBlockSelection:\n\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t};\n\t}, [] );\n\n\tconst { getActiveComplementaryArea } = useSelect( interfaceStore );\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\tconst { get: getPreference } = useSelect( preferencesStore );\n\n\tuseEffect( () => {\n\t\tconst activeGeneralSidebar = getActiveComplementaryArea( 'core' );\n\t\tconst isEditorSidebarOpened = [\n\t\t\t'edit-post/document',\n\t\t\t'edit-post/block',\n\t\t].includes( activeGeneralSidebar );\n\t\tconst isDistractionFree = getPreference( 'core', 'distractionFree' );\n\t\tif ( ! isEditorSidebarOpened || isDistractionFree ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( hasBlockSelection ) {\n\t\t\tenableComplementaryArea( 'core', 'edit-post/block' );\n\t\t} else {\n\t\t\tenableComplementaryArea( 'core', 'edit-post/document' );\n\t\t}\n\t}, [\n\t\thasBlockSelection,\n\t\tgetActiveComplementaryArea,\n\t\tenableComplementaryArea,\n\t\tgetPreference,\n\t] );\n}\n\nexport default useAutoSwitchEditorSidebars;\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { useState, useRef } from '@wordpress/element';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { comment as commentIcon } from '@wordpress/icons';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport PluginSidebar from '../plugin-sidebar';\nimport {\n\tcollabHistorySidebarName,\n\tcollabSidebarName,\n\tSIDEBARS,\n} from './constants';\nimport { Comments } from './comments';\nimport { store as editorStore } from '../../store';\nimport AddCommentMenuItem from './comment-menu-item';\nimport CommentAvatarIndicator from './comment-indicator-toolbar';\nimport { useGlobalStylesContext } from '../global-styles-provider';\nimport {\n\tuseBlockComments,\n\tuseBlockCommentsActions,\n\tuseEnableFloatingSidebar,\n} from './hooks';\nimport { focusCommentThread } from './utils';\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { unlock } from '../../lock-unlock';\n\nfunction NotesSidebarContent( {\n\tnewNoteFormState,\n\tsetNewNoteFormState,\n\tstyles,\n\tcomments,\n\tcommentSidebarRef,\n\treflowComments,\n\tcommentLastUpdated,\n\tisFloating = false,\n} ) {\n\tconst { onCreate, onEdit, onDelete } =\n\t\tuseBlockCommentsActions( reflowComments );\n\n\treturn (\n\t\t<VStack\n\t\t\tclassName=\"editor-collab-sidebar-panel\"\n\t\t\tstyle={ styles }\n\t\t\trole=\"tree\"\n\t\t\tspacing=\"3\"\n\t\t\tjustify=\"flex-start\"\n\t\t\tref={ ( node ) => {\n\t\t\t\t// Sometimes previous sidebar unmounts after the new one mounts.\n\t\t\t\t// This ensures we always have the latest reference.\n\t\t\t\tif ( node ) {\n\t\t\t\t\tcommentSidebarRef.current = node;\n\t\t\t\t}\n\t\t\t} }\n\t\t\taria-label={\n\t\t\t\tisFloating ? __( 'Unresolved notes' ) : __( 'All notes' )\n\t\t\t}\n\t\t>\n\t\t\t<Comments\n\t\t\t\tthreads={ comments }\n\t\t\t\tonEditComment={ onEdit }\n\t\t\t\tonAddReply={ onCreate }\n\t\t\t\tonCommentDelete={ onDelete }\n\t\t\t\tnewNoteFormState={ newNoteFormState }\n\t\t\t\tsetNewNoteFormState={ setNewNoteFormState }\n\t\t\t\tcommentSidebarRef={ commentSidebarRef }\n\t\t\t\treflowComments={ reflowComments }\n\t\t\t\tcommentLastUpdated={ commentLastUpdated }\n\t\t\t\tisFloating={ isFloating }\n\t\t\t/>\n\t\t</VStack>\n\t);\n}\n\nfunction NotesSidebar( { postId } ) {\n\t// Enum: 'closed' | 'creating' | 'open'\n\tconst [ newNoteFormState, setNewNoteFormState ] = useState( 'closed' );\n\tconst { getActiveComplementaryArea } = useSelect( interfaceStore );\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\tconst { toggleBlockSpotlight } = unlock( useDispatch( blockEditorStore ) );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst commentSidebarRef = useRef( null );\n\n\tconst showFloatingSidebar = isLargeViewport;\n\n\tconst { clientId, blockCommentId, isDistractionFree } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockAttributes,\n\t\t\t\tgetSelectedBlockClientId,\n\t\t\t\tgetSettings,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst _clientId = getSelectedBlockClientId();\n\t\t\treturn {\n\t\t\t\tclientId: _clientId,\n\t\t\t\tblockCommentId: _clientId\n\t\t\t\t\t? getBlockAttributes( _clientId )?.metadata?.noteId\n\t\t\t\t\t: null,\n\t\t\t\tisDistractionFree: getSettings().isDistractionFree,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst {\n\t\tresultComments,\n\t\tunresolvedSortedThreads,\n\t\treflowComments,\n\t\tcommentLastUpdated,\n\t} = useBlockComments( postId );\n\tuseEnableFloatingSidebar(\n\t\tshowFloatingSidebar &&\n\t\t\t( unresolvedSortedThreads.length > 0 ||\n\t\t\t\tnewNoteFormState !== 'closed' )\n\t);\n\n\t// Get the global styles to set the background color of the sidebar.\n\tconst { merged: GlobalStyles } = useGlobalStylesContext();\n\tconst backgroundColor = GlobalStyles?.styles?.color?.background;\n\n\t// Find the current thread for the selected block.\n\tconst currentThread = blockCommentId\n\t\t? resultComments.find( ( thread ) => thread.id === blockCommentId )\n\t\t: null;\n\tconst showAllNotesSidebar = resultComments.length > 0;\n\n\tasync function openTheSidebar() {\n\t\tconst prevArea = await getActiveComplementaryArea( 'core' );\n\t\tconst activeNotesArea = SIDEBARS.find( ( name ) => name === prevArea );\n\n\t\tif ( currentThread?.status === 'approved' ) {\n\t\t\tenableComplementaryArea( 'core', collabHistorySidebarName );\n\t\t} else if ( ! activeNotesArea || ! showAllNotesSidebar ) {\n\t\t\tenableComplementaryArea(\n\t\t\t\t'core',\n\t\t\t\tshowFloatingSidebar\n\t\t\t\t\t? collabSidebarName\n\t\t\t\t\t: collabHistorySidebarName\n\t\t\t);\n\t\t}\n\n\t\tconst currentArea = await getActiveComplementaryArea( 'core' );\n\t\t// Bail out if the current active area is not one of note sidebars.\n\t\tif ( ! SIDEBARS.includes( currentArea ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetNewNoteFormState( ! currentThread ? 'open' : 'closed' );\n\t\tfocusCommentThread(\n\t\t\tcurrentThread?.id,\n\t\t\tcommentSidebarRef.current,\n\t\t\t// Focus a comment thread when there's a selected block with a comment.\n\t\t\t! currentThread ? 'textarea' : undefined\n\t\t);\n\t\ttoggleBlockSpotlight( clientId, true );\n\t}\n\n\tif ( isDistractionFree ) {\n\t\treturn <AddCommentMenuItem isDistractionFree />;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ !! currentThread && (\n\t\t\t\t<CommentAvatarIndicator\n\t\t\t\t\tthread={ currentThread }\n\t\t\t\t\tonClick={ openTheSidebar }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<AddCommentMenuItem onClick={ openTheSidebar } />\n\t\t\t{ showAllNotesSidebar && (\n\t\t\t\t<PluginSidebar\n\t\t\t\t\tidentifier={ collabHistorySidebarName }\n\t\t\t\t\tname={ collabHistorySidebarName }\n\t\t\t\t\ttitle={ __( 'All notes' ) }\n\t\t\t\t\theader={\n\t\t\t\t\t\t<h2 className=\"interface-complementary-area-header__title\">\n\t\t\t\t\t\t\t{ __( 'All notes' ) }\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t}\n\t\t\t\t\ticon={ commentIcon }\n\t\t\t\t\tcloseLabel={ __( 'Close Notes' ) }\n\t\t\t\t>\n\t\t\t\t\t<NotesSidebarContent\n\t\t\t\t\t\tcomments={ resultComments }\n\t\t\t\t\t\tnewNoteFormState={ newNoteFormState }\n\t\t\t\t\t\tsetNewNoteFormState={ setNewNoteFormState }\n\t\t\t\t\t\tcommentSidebarRef={ commentSidebarRef }\n\t\t\t\t\t\treflowComments={ reflowComments }\n\t\t\t\t\t\tcommentLastUpdated={ commentLastUpdated }\n\t\t\t\t\t/>\n\t\t\t\t</PluginSidebar>\n\t\t\t) }\n\t\t\t{ isLargeViewport && (\n\t\t\t\t<PluginSidebar\n\t\t\t\t\tisPinnable={ false }\n\t\t\t\t\theader={ false }\n\t\t\t\t\tidentifier={ collabSidebarName }\n\t\t\t\t\tclassName=\"editor-collab-sidebar\"\n\t\t\t\t\theaderClassName=\"editor-collab-sidebar__header\"\n\t\t\t\t\tbackgroundColor={ backgroundColor }\n\t\t\t\t>\n\t\t\t\t\t<NotesSidebarContent\n\t\t\t\t\t\tcomments={ unresolvedSortedThreads }\n\t\t\t\t\t\tnewNoteFormState={ newNoteFormState }\n\t\t\t\t\t\tsetNewNoteFormState={ setNewNoteFormState }\n\t\t\t\t\t\tcommentSidebarRef={ commentSidebarRef }\n\t\t\t\t\t\treflowComments={ reflowComments }\n\t\t\t\t\t\tcommentLastUpdated={ commentLastUpdated }\n\t\t\t\t\t\tstyles={ {\n\t\t\t\t\t\t\tbackgroundColor,\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisFloating\n\t\t\t\t\t/>\n\t\t\t\t</PluginSidebar>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default function NotesSidebarContainer() {\n\tconst { postId, editorMode } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostId, getEditorMode } = select( editorStore );\n\t\treturn {\n\t\t\tpostId: getCurrentPostId(),\n\t\t\teditorMode: getEditorMode(),\n\t\t};\n\t}, [] );\n\n\tif ( ! postId || typeof postId !== 'number' ) {\n\t\treturn null;\n\t}\n\n\t// Hide Notes sidebar in Code Editor mode since block-level commenting.\n\tif ( editorMode === 'text' ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"editor.notes\">\n\t\t\t<NotesSidebar postId={ postId } />\n\t\t</PostTypeSupportCheck>\n\t);\n}\n", "export const collabHistorySidebarName = 'edit-post/collab-history-sidebar';\nexport const collabSidebarName = 'edit-post/collab-sidebar';\nexport const SIDEBARS = [ collabHistorySidebarName, collabSidebarName ];\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseState,\n\tRawHTML,\n\tuseEffect,\n\tuseCallback,\n\tuseMemo,\n\tuseRef,\n} from '@wordpress/element';\nimport {\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalConfirmDialog as ConfirmDialog,\n\tButton,\n\tFlexItem,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { useDebounce } from '@wordpress/compose';\n\nimport { published, moreVertical } from '@wordpress/icons';\nimport { __, _x, sprintf, _n } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\nimport {\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport CommentAuthorInfo from './comment-author-info';\nimport CommentForm from './comment-form';\nimport { focusCommentThread, getCommentExcerpt } from './utils';\nimport { useFloatingThread } from './hooks';\nimport { AddComment } from './add-comment';\nimport { store as editorStore } from '../../store';\n\nconst { useBlockElement } = unlock( blockEditorPrivateApis );\nconst { Menu } = unlock( componentsPrivateApis );\n\nexport function Comments( {\n\tthreads: noteThreads,\n\tonEditComment,\n\tonAddReply,\n\tonCommentDelete,\n\tnewNoteFormState,\n\tsetNewNoteFormState,\n\tcommentSidebarRef,\n\treflowComments,\n\tisFloating = false,\n\tcommentLastUpdated,\n} ) {\n\tconst [ heights, setHeights ] = useState( {} );\n\tconst [ selectedThread, setSelectedThread ] = useState( null );\n\tconst [ boardOffsets, setBoardOffsets ] = useState( {} );\n\tconst [ blockRefs, setBlockRefs ] = useState( {} );\n\n\tconst { setCanvasMinHeight } = unlock( useDispatch( editorStore ) );\n\tconst { selectBlock, toggleBlockSpotlight } = unlock(\n\t\tuseDispatch( blockEditorStore )\n\t);\n\n\tconst { blockCommentId, selectedBlockClientId, orderedBlockIds } =\n\t\tuseSelect( ( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockAttributes,\n\t\t\t\tgetSelectedBlockClientId,\n\t\t\t\tgetClientIdsWithDescendants,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\treturn {\n\t\t\t\tblockCommentId: clientId\n\t\t\t\t\t? getBlockAttributes( clientId )?.metadata?.noteId\n\t\t\t\t\t: null,\n\t\t\t\tselectedBlockClientId: clientId,\n\t\t\t\torderedBlockIds: getClientIdsWithDescendants(),\n\t\t\t};\n\t\t}, [] );\n\n\tconst relatedBlockElement = useBlockElement( selectedBlockClientId );\n\n\tconst threads = useMemo( () => {\n\t\tconst t = [ ...noteThreads ];\n\t\tconst orderedThreads = [];\n\t\t// In floating mode, when the note board is shown, and as long\n\t\t// as the selected block doesn't have an existing note attached -\n\t\t// add a \"new note\" entry to the threads. This special thread type\n\t\t// gets sorted and floated like regular threads, but shows an AddComment\n\t\t// component instead of a regular comment thread.\n\t\tif ( isFloating && newNoteFormState === 'open' ) {\n\t\t\t// Insert the new note entry at the correct location for its blockId.\n\t\t\tconst newNoteThread = {\n\t\t\t\tid: 'new-note-thread',\n\t\t\t\tblockClientId: selectedBlockClientId,\n\t\t\t\tcontent: { rendered: '' },\n\t\t\t};\n\t\t\t// Insert the new comment block at the right order within the threads.\n\t\t\torderedBlockIds.forEach( ( blockId ) => {\n\t\t\t\tif ( blockId === selectedBlockClientId ) {\n\t\t\t\t\torderedThreads.push( newNoteThread );\n\t\t\t\t} else {\n\t\t\t\t\tconst threadForBlock = t.find(\n\t\t\t\t\t\t( thread ) => thread.blockClientId === blockId\n\t\t\t\t\t);\n\t\t\t\t\tif ( threadForBlock ) {\n\t\t\t\t\t\torderedThreads.push( threadForBlock );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn orderedThreads;\n\t\t}\n\t\treturn t;\n\t}, [\n\t\tnoteThreads,\n\t\tisFloating,\n\t\tnewNoteFormState,\n\t\tselectedBlockClientId,\n\t\torderedBlockIds,\n\t] );\n\n\tconst handleDelete = async ( comment ) => {\n\t\tconst currentIndex = threads.findIndex( ( t ) => t.id === comment.id );\n\t\tconst nextThread = threads[ currentIndex + 1 ];\n\t\tconst prevThread = threads[ currentIndex - 1 ];\n\n\t\tawait onCommentDelete( comment );\n\n\t\tif ( comment.parent !== 0 ) {\n\t\t\t// Move focus to the parent thread when a reply was deleted.\n\t\t\tsetSelectedThread( comment.parent );\n\t\t\tfocusCommentThread( comment.parent, commentSidebarRef.current );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nextThread ) {\n\t\t\tsetSelectedThread( nextThread.id );\n\t\t\tfocusCommentThread( nextThread.id, commentSidebarRef.current );\n\t\t} else if ( prevThread ) {\n\t\t\tsetSelectedThread( prevThread.id );\n\t\t\tfocusCommentThread( prevThread.id, commentSidebarRef.current );\n\t\t} else {\n\t\t\tsetSelectedThread( null );\n\t\t\tsetNewNoteFormState( 'closed' );\n\t\t\t// Move focus to the related block.\n\t\t\trelatedBlockElement?.focus();\n\t\t}\n\t};\n\n\t// Auto-select the related comment thread when a block is selected.\n\tuseEffect( () => {\n\t\t// Fallback to 'new-note-thread' when showing the comment board for a new note.\n\t\tsetSelectedThread(\n\t\t\tnewNoteFormState === 'open' ? 'new-note-thread' : blockCommentId\n\t\t);\n\t}, [ blockCommentId, newNoteFormState ] );\n\n\tconst setBlockRef = useCallback( ( id, blockRef ) => {\n\t\tsetBlockRefs( ( prev ) => ( { ...prev, [ id ]: blockRef } ) );\n\t}, [] );\n\n\t// Recalculate floating comment thread offsets whenever the heights change.\n\tuseEffect( () => {\n\t\t/**\n\t\t * Calculate the y offsets for all comment threads. Account for potentially\n\t\t * overlapping threads and adjust their positions accordingly.\n\t\t */\n\t\tconst calculateAllOffsets = () => {\n\t\t\tconst offsets = {};\n\n\t\t\tif ( ! isFloating ) {\n\t\t\t\treturn { offsets, minHeight: 0 };\n\t\t\t}\n\n\t\t\t// Find the index of the selected thread.\n\t\t\tconst selectedThreadIndex = threads.findIndex(\n\t\t\t\t( t ) => t.id === selectedThread\n\t\t\t);\n\n\t\t\tconst breakIndex =\n\t\t\t\tselectedThreadIndex === -1 ? 0 : selectedThreadIndex;\n\n\t\t\t// If there is a selected thread, push threads above up and threads below down.\n\t\t\tconst selectedThreadData = threads[ breakIndex ];\n\n\t\t\tif (\n\t\t\t\t! selectedThreadData ||\n\t\t\t\t! blockRefs[ selectedThreadData.id ]\n\t\t\t) {\n\t\t\t\treturn { offsets, minHeight: 0 };\n\t\t\t}\n\n\t\t\tlet blockElement = blockRefs[ selectedThreadData.id ];\n\t\t\tlet blockRect = blockElement?.getBoundingClientRect();\n\t\t\tconst selectedThreadTop = blockRect?.top || 0;\n\t\t\tconst selectedThreadHeight = heights[ selectedThreadData.id ] || 0;\n\n\t\t\toffsets[ selectedThreadData.id ] = -16;\n\n\t\t\tlet previousThreadData = {\n\t\t\t\tthreadTop: selectedThreadTop - 16,\n\t\t\t\tthreadHeight: selectedThreadHeight,\n\t\t\t};\n\n\t\t\t// Process threads after the selected thread, offsetting any overlapping\n\t\t\t// threads downward.\n\t\t\tfor ( let i = breakIndex + 1; i < threads.length; i++ ) {\n\t\t\t\tconst thread = threads[ i ];\n\t\t\t\tif ( ! blockRefs[ thread.id ] ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tblockElement = blockRefs[ thread.id ];\n\t\t\t\tblockRect = blockElement?.getBoundingClientRect();\n\t\t\t\tconst threadTop = blockRect?.top || 0;\n\t\t\t\tconst threadHeight = heights[ thread.id ] || 0;\n\n\t\t\t\tlet additionalOffset = -16;\n\n\t\t\t\t// Check if the thread overlaps with the previous one.\n\t\t\t\tconst previousBottom =\n\t\t\t\t\tpreviousThreadData.threadTop +\n\t\t\t\t\tpreviousThreadData.threadHeight;\n\t\t\t\tif ( threadTop < previousBottom + 16 ) {\n\t\t\t\t\t// Shift down by the difference plus a margin to avoid overlap.\n\t\t\t\t\tadditionalOffset = previousBottom - threadTop + 20;\n\t\t\t\t}\n\n\t\t\t\toffsets[ thread.id ] = additionalOffset;\n\n\t\t\t\t// Update for next iteration.\n\t\t\t\tpreviousThreadData = {\n\t\t\t\t\tthreadTop: threadTop + additionalOffset,\n\t\t\t\t\tthreadHeight,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Process threads before the selected thread, offsetting any overlapping\n\t\t\t// threads upward.\n\t\t\tlet nextThreadData = {\n\t\t\t\tthreadTop: selectedThreadTop - 16,\n\t\t\t};\n\n\t\t\tfor ( let i = selectedThreadIndex - 1; i >= 0; i-- ) {\n\t\t\t\tconst thread = threads[ i ];\n\t\t\t\tif ( ! blockRefs[ thread.id ] ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tblockElement = blockRefs[ thread.id ];\n\t\t\t\tblockRect = blockElement?.getBoundingClientRect();\n\t\t\t\tconst threadTop = blockRect?.top || 0;\n\t\t\t\tconst threadHeight = heights[ thread.id ] || 0;\n\n\t\t\t\tlet additionalOffset = -16;\n\n\t\t\t\t// Calculate the bottom position of this thread with default offset.\n\t\t\t\tconst threadBottom = threadTop + threadHeight;\n\n\t\t\t\t// Check if this thread's bottom would overlap with the next thread's top.\n\t\t\t\tif ( threadBottom > nextThreadData.threadTop ) {\n\t\t\t\t\t// Shift up by the difference plus a margin to avoid overlap.\n\t\t\t\t\tadditionalOffset =\n\t\t\t\t\t\tnextThreadData.threadTop -\n\t\t\t\t\t\tthreadTop -\n\t\t\t\t\t\tthreadHeight -\n\t\t\t\t\t\t20;\n\t\t\t\t}\n\n\t\t\t\toffsets[ thread.id ] = additionalOffset;\n\n\t\t\t\t// Update for next iteration (going upward).\n\t\t\t\tnextThreadData = {\n\t\t\t\t\tthreadTop: threadTop + additionalOffset,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tlet editorMinHeight = 0;\n\t\t\t// Take the calculated top of the final note plus its height as the editor min height.\n\t\t\tconst lastThread = threads[ threads.length - 1 ];\n\t\t\tif ( blockRefs[ lastThread.id ] ) {\n\t\t\t\tconst lastBlockElement = blockRefs[ lastThread.id ];\n\t\t\t\tconst lastBlockRect = lastBlockElement?.getBoundingClientRect();\n\t\t\t\tconst lastThreadTop = lastBlockRect?.top || 0;\n\t\t\t\tconst lastThreadHeight = heights[ lastThread.id ] || 0;\n\t\t\t\tconst lastThreadOffset = offsets[ lastThread.id ] || 0;\n\t\t\t\teditorMinHeight =\n\t\t\t\t\tlastThreadTop + lastThreadHeight + lastThreadOffset + 32;\n\t\t\t}\n\n\t\t\treturn { offsets, minHeight: editorMinHeight };\n\t\t};\n\t\tconst { offsets: newOffsets, minHeight } = calculateAllOffsets();\n\t\tif ( Object.keys( newOffsets ).length > 0 ) {\n\t\t\tsetBoardOffsets( newOffsets );\n\t\t}\n\t\t// Ensure the editor has enough height to scroll to all notes.\n\t\tsetCanvasMinHeight( minHeight );\n\t}, [\n\t\theights,\n\t\tblockRefs,\n\t\tisFloating,\n\t\tthreads,\n\t\tselectedThread,\n\t\tsetCanvasMinHeight,\n\t] );\n\n\tconst handleThreadNavigation = ( event, thread, isSelected ) => {\n\t\tif ( event.defaultPrevented ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentIndex = threads.findIndex( ( t ) => t.id === thread.id );\n\n\t\tif (\n\t\t\t( event.key === 'Enter' || event.key === 'ArrowRight' ) &&\n\t\t\tevent.currentTarget === event.target &&\n\t\t\t! isSelected\n\t\t) {\n\t\t\t// Expand thread.\n\t\t\tsetNewNoteFormState( 'closed' );\n\t\t\tsetSelectedThread( thread.id );\n\t\t\tif ( !! thread.blockClientId ) {\n\t\t\t\t// Pass `null` as the second parameter to prevent focusing the block.\n\t\t\t\tselectBlock( thread.blockClientId, null );\n\t\t\t\ttoggleBlockSpotlight( thread.blockClientId, true );\n\t\t\t}\n\t\t} else if (\n\t\t\t( ( event.key === 'Enter' || event.key === 'ArrowLeft' ) &&\n\t\t\t\tevent.currentTarget === event.target &&\n\t\t\t\tisSelected ) ||\n\t\t\tevent.key === 'Escape'\n\t\t) {\n\t\t\t// Collapse thread.\n\t\t\tsetSelectedThread( null );\n\t\t\tsetNewNoteFormState( 'closed' );\n\t\t\tif ( thread.blockClientId ) {\n\t\t\t\ttoggleBlockSpotlight( thread.blockClientId, false );\n\t\t\t}\n\t\t\tfocusCommentThread( thread.id, commentSidebarRef.current );\n\t\t} else if (\n\t\t\tevent.key === 'ArrowDown' &&\n\t\t\tcurrentIndex < threads.length - 1 &&\n\t\t\tevent.currentTarget === event.target\n\t\t) {\n\t\t\t// Move to the next thread.\n\t\t\tconst nextThread = threads[ currentIndex + 1 ];\n\t\t\tfocusCommentThread( nextThread.id, commentSidebarRef.current );\n\t\t} else if (\n\t\t\tevent.key === 'ArrowUp' &&\n\t\t\tcurrentIndex > 0 &&\n\t\t\tevent.currentTarget === event.target\n\t\t) {\n\t\t\t// Move to the previous thread.\n\t\t\tconst prevThread = threads[ currentIndex - 1 ];\n\t\t\tfocusCommentThread( prevThread.id, commentSidebarRef.current );\n\t\t} else if (\n\t\t\tevent.key === 'Home' &&\n\t\t\tevent.currentTarget === event.target\n\t\t) {\n\t\t\t// Move to the first thread.\n\t\t\tfocusCommentThread( threads[ 0 ].id, commentSidebarRef.current );\n\t\t} else if (\n\t\t\tevent.key === 'End' &&\n\t\t\tevent.currentTarget === event.target\n\t\t) {\n\t\t\t// Move to the last thread.\n\t\t\tfocusCommentThread(\n\t\t\t\tthreads[ threads.length - 1 ].id,\n\t\t\t\tcommentSidebarRef.current\n\t\t\t);\n\t\t}\n\t};\n\n\tconst hasThreads = Array.isArray( threads ) && threads.length > 0;\n\t// A special case for `template-locked` mode - https://github.com/WordPress/gutenberg/pull/72646.\n\tif ( ! hasThreads && ! isFloating ) {\n\t\treturn (\n\t\t\t<AddComment\n\t\t\t\tonSubmit={ onAddReply }\n\t\t\t\tnewNoteFormState={ newNoteFormState }\n\t\t\t\tsetNewNoteFormState={ setNewNoteFormState }\n\t\t\t\tcommentSidebarRef={ commentSidebarRef }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ ! isFloating && newNoteFormState === 'open' && (\n\t\t\t\t<AddComment\n\t\t\t\t\tonSubmit={ onAddReply }\n\t\t\t\t\tnewNoteFormState={ newNoteFormState }\n\t\t\t\t\tsetNewNoteFormState={ setNewNoteFormState }\n\t\t\t\t\tcommentSidebarRef={ commentSidebarRef }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ threads.map( ( thread ) => (\n\t\t\t\t<Thread\n\t\t\t\t\tkey={ thread.id }\n\t\t\t\t\tthread={ thread }\n\t\t\t\t\tonAddReply={ onAddReply }\n\t\t\t\t\tonCommentDelete={ handleDelete }\n\t\t\t\t\tonEditComment={ onEditComment }\n\t\t\t\t\tisSelected={ selectedThread === thread.id }\n\t\t\t\t\tsetSelectedThread={ setSelectedThread }\n\t\t\t\t\tsetNewNoteFormState={ setNewNoteFormState }\n\t\t\t\t\tcommentSidebarRef={ commentSidebarRef }\n\t\t\t\t\treflowComments={ reflowComments }\n\t\t\t\t\tisFloating={ isFloating }\n\t\t\t\t\tcalculatedOffset={ boardOffsets[ thread.id ] ?? 0 }\n\t\t\t\t\tsetHeights={ setHeights }\n\t\t\t\t\tsetBlockRef={ setBlockRef }\n\t\t\t\t\tselectedThread={ selectedThread }\n\t\t\t\t\tcommentLastUpdated={ commentLastUpdated }\n\t\t\t\t\tnewNoteFormState={ newNoteFormState }\n\t\t\t\t\tonKeyDown={ ( event ) =>\n\t\t\t\t\t\thandleThreadNavigation(\n\t\t\t\t\t\t\tevent,\n\t\t\t\t\t\t\tthread,\n\t\t\t\t\t\t\tselectedThread === thread.id\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</>\n\t);\n}\n\nfunction Thread( {\n\tthread,\n\tonEditComment,\n\tonAddReply,\n\tonCommentDelete,\n\tisSelected,\n\tsetNewNoteFormState,\n\tcommentSidebarRef,\n\treflowComments,\n\tisFloating,\n\tcalculatedOffset,\n\tsetHeights,\n\tsetBlockRef,\n\tsetSelectedThread,\n\tselectedThread,\n\tcommentLastUpdated,\n\tnewNoteFormState,\n\tonKeyDown,\n} ) {\n\tconst { toggleBlockHighlight, selectBlock, toggleBlockSpotlight } = unlock(\n\t\tuseDispatch( blockEditorStore )\n\t);\n\tconst relatedBlockElement = useBlockElement( thread.blockClientId );\n\tconst debouncedToggleBlockHighlight = useDebounce(\n\t\ttoggleBlockHighlight,\n\t\t50\n\t);\n\tconst { y, refs } = useFloatingThread( {\n\t\tthread,\n\t\tcalculatedOffset,\n\t\tsetHeights,\n\t\tsetBlockRef,\n\t\tselectedThread,\n\t\tcommentLastUpdated,\n\t} );\n\tconst isKeyboardTabbingRef = useRef( false );\n\n\tconst onMouseEnter = () => {\n\t\tdebouncedToggleBlockHighlight( thread.blockClientId, true );\n\t};\n\n\tconst onMouseLeave = () => {\n\t\tdebouncedToggleBlockHighlight( thread.blockClientId, false );\n\t};\n\n\tconst onFocus = () => {\n\t\ttoggleBlockHighlight( thread.blockClientId, true );\n\t};\n\n\tconst onBlur = ( event ) => {\n\t\tconst isNoteFocused = event.relatedTarget?.closest(\n\t\t\t'.editor-collab-sidebar-panel__thread'\n\t\t);\n\t\tconst isDialogFocused =\n\t\t\tevent.relatedTarget?.closest( '[role=\"dialog\"]' );\n\t\tconst isTabbing = isKeyboardTabbingRef.current;\n\n\t\t// When another note is clicked, do nothing because the current note is automatically closed.\n\t\tif ( isNoteFocused && ! isTabbing ) {\n\t\t\treturn;\n\t\t}\n\t\t// When deleting a note, a dialog appears, but the note should not be collapsed.\n\t\tif ( isDialogFocused ) {\n\t\t\treturn;\n\t\t}\n\t\t// When tabbing, do nothing if the focus is within the current note.\n\t\tif (\n\t\t\tisTabbing &&\n\t\t\tevent.currentTarget.contains( event.relatedTarget )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Closes a note that has lost focus when any of the following conditions are met:\n\t\t// - An element other than a note is clicked.\n\t\t// - Focus was lost by tabbing.\n\t\ttoggleBlockHighlight( thread.blockClientId, false );\n\t\tunselectThread();\n\t};\n\n\tconst handleCommentSelect = () => {\n\t\tsetNewNoteFormState( 'closed' );\n\t\tsetSelectedThread( thread.id );\n\t\ttoggleBlockSpotlight( thread.blockClientId, true );\n\t\tif ( !! thread.blockClientId ) {\n\t\t\t// Pass `null` as the second parameter to prevent focusing the block.\n\t\t\tselectBlock( thread.blockClientId, null );\n\t\t}\n\t};\n\n\tconst unselectThread = () => {\n\t\tsetSelectedThread( null );\n\t\tsetNewNoteFormState( 'closed' );\n\t\ttoggleBlockSpotlight( thread.blockClientId, false );\n\t};\n\n\tconst allReplies = thread?.reply || [];\n\n\tconst lastReply =\n\t\tallReplies.length > 0 ? allReplies[ allReplies.length - 1 ] : undefined;\n\tconst restReplies = allReplies.length > 0 ? allReplies.slice( 0, -1 ) : [];\n\n\tconst commentExcerpt = getCommentExcerpt(\n\t\tstripHTML( thread.content?.rendered ),\n\t\t10\n\t);\n\tconst ariaLabel = !! thread.blockClientId\n\t\t? sprintf(\n\t\t\t\t// translators: %s: note excerpt\n\t\t\t\t__( 'Note: %s' ),\n\t\t\t\tcommentExcerpt\n\t\t )\n\t\t: sprintf(\n\t\t\t\t// translators: %s: note excerpt\n\t\t\t\t__( 'Original block deleted. Note: %s' ),\n\t\t\t\tcommentExcerpt\n\t\t );\n\n\tif (\n\t\tthread.id === 'new-note-thread' &&\n\t\tnewNoteFormState === 'open' &&\n\t\tisFloating\n\t) {\n\t\treturn (\n\t\t\t<AddComment\n\t\t\t\tonSubmit={ onAddReply }\n\t\t\t\tnewNoteFormState={ newNoteFormState }\n\t\t\t\tsetNewNoteFormState={ setNewNoteFormState }\n\t\t\t\tcommentSidebarRef={ commentSidebarRef }\n\t\t\t\treflowComments={ reflowComments }\n\t\t\t\tisFloating={ isFloating }\n\t\t\t\ty={ y }\n\t\t\t\trefs={ refs }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<VStack\n\t\t\tclassName={ clsx( 'editor-collab-sidebar-panel__thread', {\n\t\t\t\t'is-selected': isSelected,\n\t\t\t\t'is-floating': isFloating,\n\t\t\t} ) }\n\t\t\tid={ `comment-thread-${ thread.id }` }\n\t\t\tspacing=\"3\"\n\t\t\tonClick={ handleCommentSelect }\n\t\t\tonMouseEnter={ onMouseEnter }\n\t\t\tonMouseLeave={ onMouseLeave }\n\t\t\tonFocus={ onFocus }\n\t\t\tonBlur={ onBlur }\n\t\t\tonKeyUp={ ( event ) => {\n\t\t\t\tif ( event.key === 'Tab' ) {\n\t\t\t\t\tisKeyboardTabbingRef.current = false;\n\t\t\t\t}\n\t\t\t} }\n\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\tif ( event.key === 'Tab' ) {\n\t\t\t\t\tisKeyboardTabbingRef.current = true;\n\t\t\t\t} else {\n\t\t\t\t\tonKeyDown( event );\n\t\t\t\t}\n\t\t\t} }\n\t\t\ttabIndex={ 0 }\n\t\t\trole=\"treeitem\"\n\t\t\taria-label={ ariaLabel }\n\t\t\taria-expanded={ isSelected }\n\t\t\tref={ isFloating ? refs.setFloating : undefined }\n\t\t\tstyle={ isFloating ? { top: y } : undefined }\n\t\t>\n\t\t\t<Button\n\t\t\t\tclassName=\"editor-collab-sidebar-panel__skip-to-comment\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tsize=\"compact\"\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tfocusCommentThread(\n\t\t\t\t\t\tthread.id,\n\t\t\t\t\t\tcommentSidebarRef.current,\n\t\t\t\t\t\t'textarea'\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ __( 'Add new reply' ) }\n\t\t\t</Button>\n\t\t\t{ ! thread.blockClientId && (\n\t\t\t\t<Text as=\"p\" weight={ 500 } variant=\"muted\">\n\t\t\t\t\t{ __( 'Original block deleted.' ) }\n\t\t\t\t</Text>\n\t\t\t) }\n\t\t\t<CommentBoard\n\t\t\t\tthread={ thread }\n\t\t\t\tisExpanded={ isSelected }\n\t\t\t\tonEdit={ ( params = {} ) => {\n\t\t\t\t\tonEditComment( params );\n\t\t\t\t\tif ( params.status === 'approved' ) {\n\t\t\t\t\t\tunselectThread();\n\t\t\t\t\t\tif ( isFloating ) {\n\t\t\t\t\t\t\trelatedBlockElement?.focus();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfocusCommentThread(\n\t\t\t\t\t\t\t\tthread.id,\n\t\t\t\t\t\t\t\tcommentSidebarRef.current\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} }\n\t\t\t\tonDelete={ onCommentDelete }\n\t\t\t\treflowComments={ reflowComments }\n\t\t\t/>\n\t\t\t{ isSelected &&\n\t\t\t\tallReplies.map( ( reply ) => (\n\t\t\t\t\t<CommentBoard\n\t\t\t\t\t\tkey={ reply.id }\n\t\t\t\t\t\tthread={ reply }\n\t\t\t\t\t\tparent={ thread }\n\t\t\t\t\t\tisExpanded={ isSelected }\n\t\t\t\t\t\tonEdit={ onEditComment }\n\t\t\t\t\t\tonDelete={ onCommentDelete }\n\t\t\t\t\t\treflowComments={ reflowComments }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t{ ! isSelected && restReplies.length > 0 && (\n\t\t\t\t<HStack className=\"editor-collab-sidebar-panel__more-reply-separator\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__more-reply-button\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetSelectedThread( thread.id );\n\t\t\t\t\t\t\tfocusCommentThread(\n\t\t\t\t\t\t\t\tthread.id,\n\t\t\t\t\t\t\t\tcommentSidebarRef.current\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: %s: number of replies.\n\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t'%s more reply',\n\t\t\t\t\t\t\t\t'%s more replies',\n\t\t\t\t\t\t\t\trestReplies.length\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\trestReplies.length\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t) }\n\t\t\t{ ! isSelected && lastReply && (\n\t\t\t\t<CommentBoard\n\t\t\t\t\tthread={ lastReply }\n\t\t\t\t\tparent={ thread }\n\t\t\t\t\tisExpanded={ isSelected }\n\t\t\t\t\tonEdit={ onEditComment }\n\t\t\t\t\tonDelete={ onCommentDelete }\n\t\t\t\t\treflowComments={ reflowComments }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ isSelected && (\n\t\t\t\t<VStack spacing=\"2\" role=\"treeitem\">\n\t\t\t\t\t<HStack alignment=\"left\" spacing=\"3\" justify=\"flex-start\">\n\t\t\t\t\t\t<CommentAuthorInfo />\n\t\t\t\t\t</HStack>\n\t\t\t\t\t<VStack spacing=\"2\">\n\t\t\t\t\t\t<CommentForm\n\t\t\t\t\t\t\tonSubmit={ ( inputComment ) => {\n\t\t\t\t\t\t\t\tif ( 'approved' === thread.status ) {\n\t\t\t\t\t\t\t\t\t// For reopening, include the content in the reopen action.\n\t\t\t\t\t\t\t\t\tonEditComment( {\n\t\t\t\t\t\t\t\t\t\tid: thread.id,\n\t\t\t\t\t\t\t\t\t\tstatus: 'hold',\n\t\t\t\t\t\t\t\t\t\tcontent: inputComment,\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// For regular replies, add as separate comment.\n\t\t\t\t\t\t\t\t\tonAddReply( {\n\t\t\t\t\t\t\t\t\t\tcontent: inputComment,\n\t\t\t\t\t\t\t\t\t\tparent: thread.id,\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonCancel={ ( event ) => {\n\t\t\t\t\t\t\t\t// Prevent the parent onClick from being triggered.\n\t\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\t\tunselectThread();\n\t\t\t\t\t\t\t\tfocusCommentThread(\n\t\t\t\t\t\t\t\t\tthread.id,\n\t\t\t\t\t\t\t\t\tcommentSidebarRef.current\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tsubmitButtonText={\n\t\t\t\t\t\t\t\t'approved' === thread.status\n\t\t\t\t\t\t\t\t\t? __( 'Reopen & Reply' )\n\t\t\t\t\t\t\t\t\t: __( 'Reply' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\trows={ 'approved' === thread.status ? 2 : 4 }\n\t\t\t\t\t\t\tlabelText={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %1$s: note identifier, %2$s: author name\n\t\t\t\t\t\t\t\t__( 'Reply to note %1$s by %2$s' ),\n\t\t\t\t\t\t\t\tthread.id,\n\t\t\t\t\t\t\t\tthread.author_name\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\treflowComments={ reflowComments }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</VStack>\n\t\t\t\t</VStack>\n\t\t\t) }\n\t\t\t{ !! thread.blockClientId && (\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__skip-to-block\"\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\trelatedBlockElement?.focus();\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Back to block' ) }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\nconst CommentBoard = ( {\n\tthread,\n\tparent,\n\tisExpanded,\n\tonEdit,\n\tonDelete,\n\treflowComments,\n} ) => {\n\tconst [ actionState, setActionState ] = useState( false );\n\tconst [ showConfirmDialog, setShowConfirmDialog ] = useState( false );\n\tconst actionButtonRef = useRef( null );\n\tconst handleConfirmDelete = () => {\n\t\tonDelete( thread );\n\t\tsetActionState( false );\n\t\tsetShowConfirmDialog( false );\n\t};\n\n\tconst handleCancel = () => {\n\t\tsetActionState( false );\n\t\tsetShowConfirmDialog( false );\n\t\tactionButtonRef.current?.focus();\n\t};\n\n\t// Check if this is a resolution comment by checking metadata.\n\tconst isResolutionComment =\n\t\tthread.type === 'note' &&\n\t\tthread.meta &&\n\t\t( thread.meta._wp_note_status === 'resolved' ||\n\t\t\tthread.meta._wp_note_status === 'reopen' );\n\n\tconst actions = [\n\t\t{\n\t\t\tid: 'edit',\n\t\t\ttitle: __( 'Edit' ),\n\t\t\tisEligible: ( { status } ) => status !== 'approved',\n\t\t\tonClick: () => {\n\t\t\t\tsetActionState( 'edit' );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tid: 'reopen',\n\t\t\ttitle: _x( 'Reopen', 'Reopen note' ),\n\t\t\tisEligible: ( { status } ) => status === 'approved',\n\t\t\tonClick: () => {\n\t\t\t\tonEdit( { id: thread.id, status: 'hold' } );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tid: 'delete',\n\t\t\ttitle: __( 'Delete' ),\n\t\t\tisEligible: () => true,\n\t\t\tonClick: () => {\n\t\t\t\tsetActionState( 'delete' );\n\t\t\t\tsetShowConfirmDialog( true );\n\t\t\t},\n\t\t},\n\t];\n\n\tconst canResolve = thread.parent === 0;\n\tconst moreActions =\n\t\tparent?.status !== 'approved'\n\t\t\t? actions.filter( ( item ) => item.isEligible( thread ) )\n\t\t\t: [];\n\n\tconst deleteConfirmMessage =\n\t\t// When deleting a top level note, descendants will also be deleted.\n\t\tthread.parent === 0\n\t\t\t? __(\n\t\t\t\t\t\"Are you sure you want to delete this note? This will also delete all of this note's replies.\"\n\t\t\t )\n\t\t\t: __( 'Are you sure you want to delete this reply?' );\n\n\treturn (\n\t\t<VStack\n\t\t\tspacing=\"2\"\n\t\t\trole={ thread.parent !== 0 ? 'treeitem' : undefined }\n\t\t>\n\t\t\t<HStack alignment=\"left\" spacing=\"3\" justify=\"flex-start\">\n\t\t\t\t<CommentAuthorInfo\n\t\t\t\t\tavatar={ thread?.author_avatar_urls?.[ 48 ] }\n\t\t\t\t\tname={ thread?.author_name }\n\t\t\t\t\tdate={ thread?.date }\n\t\t\t\t\tuserId={ thread?.author }\n\t\t\t\t/>\n\t\t\t\t{ isExpanded && (\n\t\t\t\t\t<FlexItem\n\t\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__comment-status\"\n\t\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\t\t// Prevent the thread from being selected.\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<HStack spacing=\"0\">\n\t\t\t\t\t\t\t{ canResolve && (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tlabel={ _x(\n\t\t\t\t\t\t\t\t\t\t'Resolve',\n\t\t\t\t\t\t\t\t\t\t'Mark note as resolved'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\ticon={ published }\n\t\t\t\t\t\t\t\t\tdisabled={ thread.status === 'approved' }\n\t\t\t\t\t\t\t\t\taccessibleWhenDisabled={\n\t\t\t\t\t\t\t\t\t\tthread.status === 'approved'\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tonEdit( {\n\t\t\t\t\t\t\t\t\t\t\tid: thread.id,\n\t\t\t\t\t\t\t\t\t\t\tstatus: 'approved',\n\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<Menu placement=\"bottom-end\">\n\t\t\t\t\t\t\t\t<Menu.TriggerButton\n\t\t\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tref={ actionButtonRef }\n\t\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Actions' ) }\n\t\t\t\t\t\t\t\t\t\t\tdisabled={ ! moreActions.length }\n\t\t\t\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Menu.Popover\n\t\t\t\t\t\t\t\t\t// The menu popover is rendered in a portal, which causes focus to be\n\t\t\t\t\t\t\t\t\t// lost and the note to be collapsed unintentionally. To prevent this,\n\t\t\t\t\t\t\t\t\t// the popover should be rendered as an inline.\n\t\t\t\t\t\t\t\t\tmodal={ false }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ moreActions.map( ( action ) => (\n\t\t\t\t\t\t\t\t\t\t<Menu.Item\n\t\t\t\t\t\t\t\t\t\t\tkey={ action.id }\n\t\t\t\t\t\t\t\t\t\t\tonClick={ () => action.onClick() }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Menu.ItemLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t{ action.title }\n\t\t\t\t\t\t\t\t\t\t\t</Menu.ItemLabel>\n\t\t\t\t\t\t\t\t\t\t</Menu.Item>\n\t\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t\t</Menu.Popover>\n\t\t\t\t\t\t\t</Menu>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t\t{ 'edit' === actionState ? (\n\t\t\t\t<CommentForm\n\t\t\t\t\tonSubmit={ ( value ) => {\n\t\t\t\t\t\tonEdit( {\n\t\t\t\t\t\t\tid: thread.id,\n\t\t\t\t\t\t\tcontent: value,\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tsetActionState( false );\n\t\t\t\t\t\tactionButtonRef.current?.focus();\n\t\t\t\t\t} }\n\t\t\t\t\tonCancel={ () => handleCancel() }\n\t\t\t\t\tthread={ thread }\n\t\t\t\t\tsubmitButtonText={ _x( 'Update', 'verb' ) }\n\t\t\t\t\tlabelText={ sprintf(\n\t\t\t\t\t\t// translators: %1$s: note identifier, %2$s: author name.\n\t\t\t\t\t\t__( 'Edit note %1$s by %2$s' ),\n\t\t\t\t\t\tthread.id,\n\t\t\t\t\t\tthread.author_name\n\t\t\t\t\t) }\n\t\t\t\t\treflowComments={ reflowComments }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<RawHTML\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'editor-collab-sidebar-panel__user-comment',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'editor-collab-sidebar-panel__resolution-text':\n\t\t\t\t\t\t\t\tisResolutionComment,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ isResolutionComment\n\t\t\t\t\t\t? ( () => {\n\t\t\t\t\t\t\t\tconst actionText =\n\t\t\t\t\t\t\t\t\tthread.meta._wp_note_status === 'resolved'\n\t\t\t\t\t\t\t\t\t\t? __( 'Marked as resolved' )\n\t\t\t\t\t\t\t\t\t\t: __( 'Reopened' );\n\t\t\t\t\t\t\t\tconst content = thread?.content?.raw;\n\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tcontent &&\n\t\t\t\t\t\t\t\t\ttypeof content === 'string' &&\n\t\t\t\t\t\t\t\t\tcontent.trim() !== ''\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\treturn sprintf(\n\t\t\t\t\t\t\t\t\t\t// translators: %1$s: action label (\"Marked as resolved\" or \"Reopened\"); %2$s: note text.\n\t\t\t\t\t\t\t\t\t\t__( '%1$s: %2$s' ),\n\t\t\t\t\t\t\t\t\t\tactionText,\n\t\t\t\t\t\t\t\t\t\tcontent\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// If no content, just show the action.\n\t\t\t\t\t\t\t\treturn actionText;\n\t\t\t\t\t\t } )()\n\t\t\t\t\t\t: thread?.content?.rendered }\n\t\t\t\t</RawHTML>\n\t\t\t) }\n\t\t\t{ 'delete' === actionState && (\n\t\t\t\t<ConfirmDialog\n\t\t\t\t\tisOpen={ showConfirmDialog }\n\t\t\t\t\tonConfirm={ handleConfirmDelete }\n\t\t\t\t\tonCancel={ handleCancel }\n\t\t\t\t\tconfirmButtonText={ __( 'Delete' ) }\n\t\t\t\t>\n\t\t\t\t\t{ deleteConfirmMessage }\n\t\t\t\t</ConfirmDialog>\n\t\t\t) }\n\t\t</VStack>\n\t);\n};\n\nexport default Comments;\n", "/**\n * WordPress dependencies\n */\nimport { Tooltip, __experimentalVStack as VStack } from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tdateI18n,\n\tgetSettings as getDateSettings,\n\thumanTimeDiff,\n\tgetDate,\n} from '@wordpress/date';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { getAvatarBorderColor } from './utils';\n\nfunction CommentAuthorInfo( { avatar, name, date, userId } ) {\n\tconst hasAvatar = !! avatar;\n\tconst dateSettings = getDateSettings();\n\tconst {\n\t\tcurrentUserAvatar,\n\t\tcurrentUserName,\n\t\tcurrentUserId,\n\t\tdateFormat = dateSettings.formats.date,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst { canUser, getCurrentUser, getEntityRecord } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst siteSettings = canUser( 'read', {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'site',\n\t\t\t} )\n\t\t\t\t? getEntityRecord( 'root', 'site' )\n\t\t\t\t: undefined;\n\n\t\t\tif ( hasAvatar ) {\n\t\t\t\treturn {\n\t\t\t\t\tdateFormat: siteSettings?.date_format,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst { getSettings } = select( blockEditorStore );\n\t\t\tconst { __experimentalDiscussionSettings } = getSettings();\n\t\t\tconst defaultAvatar = __experimentalDiscussionSettings?.avatarURL;\n\t\t\tconst userData = getCurrentUser();\n\t\t\treturn {\n\t\t\t\tcurrentUserAvatar:\n\t\t\t\t\tuserData?.avatar_urls?.[ 48 ] ?? defaultAvatar,\n\t\t\t\tcurrentUserName: userData?.name,\n\t\t\t\tcurrentUserId: userData?.id,\n\t\t\t\tdateFormat: siteSettings?.date_format,\n\t\t\t};\n\t\t},\n\t\t[ hasAvatar ]\n\t);\n\n\tconst commentDate = getDate( date );\n\tconst commentDateTime = dateI18n( 'c', commentDate );\n\tconst shouldShowHumanTimeDiff =\n\t\tMath.floor( ( new Date() - commentDate ) / ( 1000 * 60 * 60 * 24 ) ) <\n\t\t30;\n\n\tconst commentDateText = shouldShowHumanTimeDiff\n\t\t? humanTimeDiff( commentDate )\n\t\t: dateI18n( dateFormat, commentDate );\n\n\tconst tooltipText = dateI18n(\n\t\t// translators: Use a non-breaking space between 'g:i' and 'a' if appropriate.\n\t\t_x( 'F j, Y g:i\\xa0a', 'Note date full date format' ),\n\t\tdate\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<img\n\t\t\t\tsrc={ avatar || currentUserAvatar }\n\t\t\t\tclassName=\"editor-collab-sidebar-panel__user-avatar\"\n\t\t\t\t// translators: alt text for user avatar image\n\t\t\t\talt={ __( 'User avatar' ) }\n\t\t\t\twidth={ 32 }\n\t\t\t\theight={ 32 }\n\t\t\t\tstyle={ {\n\t\t\t\t\tborderColor: getAvatarBorderColor(\n\t\t\t\t\t\tuserId ?? currentUserId\n\t\t\t\t\t),\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<VStack spacing=\"0\">\n\t\t\t\t<span className=\"editor-collab-sidebar-panel__user-name\">\n\t\t\t\t\t{ name ?? currentUserName }\n\t\t\t\t</span>\n\t\t\t\t{ date && (\n\t\t\t\t\t<Tooltip text={ tooltipText }>\n\t\t\t\t\t\t<time\n\t\t\t\t\t\t\tdateTime={ commentDateTime }\n\t\t\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__user-time\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ commentDateText }\n\t\t\t\t\t\t</time>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t) }\n\t\t\t</VStack>\n\t\t</>\n\t);\n}\n\nexport default CommentAuthorInfo;\n", "/**\n * WordPress dependencies\n */\nimport { _x } from '@wordpress/i18n';\n\n/**\n * Sanitizes a comment string by removing non-printable ASCII characters.\n *\n * @param {string} str - The comment string to sanitize.\n * @return {string} - The sanitized comment string.\n */\nexport function sanitizeCommentString( str ) {\n\treturn str.trim();\n}\n\n/**\n * A no-operation function that does nothing.\n */\nexport function noop() {}\n\n/**\n * These colors are picked from the WordPress.org design library.\n * @see https://www.figma.com/design/HOJTpCFfa3tR0EccUlu0CM/WordPress.org-Design-Library?node-id=1-2193&t=M6WdRvTpt0mh8n6T-1\n */\nconst AVATAR_BORDER_COLORS = [\n\t'#3858E9', // Blueberry\n\t'#9fB1FF', // Blueberry 2\n\t'#1D35B4', // Dark Blueberry\n\t'#1A1919', // Charcoal 0\n\t'#E26F56', // Pomegranate\n\t'#33F078', // Acid Green\n\t'#FFF972', // Lemon\n\t'#7A00DF', // Purple\n];\n\n/**\n * Gets the border color for an avatar based on the user ID.\n *\n * @param {number} userId - The user ID.\n * @return {string} - The border color.\n */\nexport function getAvatarBorderColor( userId ) {\n\treturn AVATAR_BORDER_COLORS[ userId % AVATAR_BORDER_COLORS.length ];\n}\n\n/**\n * Generates a comment excerpt from text based on word count type and length.\n *\n * @param {string} text - The comment text to generate excerpt from.\n * @param {number} excerptLength - The maximum length for the commentexcerpt.\n * @return {string} - The generated comment excerpt.\n */\nexport function getCommentExcerpt( text, excerptLength = 10 ) {\n\tif ( ! text ) {\n\t\treturn '';\n\t}\n\n\t/*\n\t * translators: If your word count is based on single characters (e.g. East Asian characters),\n\t * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.\n\t * Do not translate into your own language.\n\t */\n\tconst wordCountType = _x( 'words', 'Word count type. Do not translate!' );\n\n\tconst rawText = text.trim();\n\tlet trimmedExcerpt = '';\n\n\tif ( wordCountType === 'words' ) {\n\t\ttrimmedExcerpt = rawText.split( ' ', excerptLength ).join( ' ' );\n\t} else if ( wordCountType === 'characters_excluding_spaces' ) {\n\t\t/*\n\t\t * 1. Split the text at the character limit,\n\t\t * then join the substrings back into one string.\n\t\t * 2. Count the number of spaces in the text\n\t\t * by comparing the lengths of the string with and without spaces.\n\t\t * 3. Add the number to the length of the visible excerpt,\n\t\t * so that the spaces are excluded from the word count.\n\t\t */\n\t\tconst textWithSpaces = rawText.split( '', excerptLength ).join( '' );\n\n\t\tconst numberOfSpaces =\n\t\t\ttextWithSpaces.length - textWithSpaces.replaceAll( ' ', '' ).length;\n\n\t\ttrimmedExcerpt = rawText\n\t\t\t.split( '', excerptLength + numberOfSpaces )\n\t\t\t.join( '' );\n\t} else if ( wordCountType === 'characters_including_spaces' ) {\n\t\ttrimmedExcerpt = rawText.split( '', excerptLength ).join( '' );\n\t}\n\n\tconst isTrimmed = trimmedExcerpt !== rawText;\n\treturn isTrimmed ? trimmedExcerpt + '\u2026' : trimmedExcerpt;\n}\n\n/**\n * Shift focus to the comment thread associated with a particular comment ID.\n * If an additional selector is provided, the focus will be shifted to the element matching the selector.\n *\n * @typedef {import('@wordpress/element').RefObject} RefObject\n *\n * @param {string} commentId The ID of the comment thread to focus.\n * @param {?HTMLElement} container The container element to search within.\n * @param {string} additionalSelector The additional selector to focus on.\n */\nexport function focusCommentThread( commentId, container, additionalSelector ) {\n\tif ( ! container ) {\n\t\treturn;\n\t}\n\n\t// A thread without a commentId is a new comment thread.\n\tconst threadSelector = commentId\n\t\t? `[role=treeitem][id=\"comment-thread-${ commentId }\"]`\n\t\t: '[role=treeitem]:not([id])';\n\tconst selector = additionalSelector\n\t\t? `${ threadSelector } ${ additionalSelector }`\n\t\t: threadSelector;\n\n\treturn new Promise( ( resolve ) => {\n\t\tif ( container.querySelector( selector ) ) {\n\t\t\treturn resolve( container.querySelector( selector ) );\n\t\t}\n\n\t\tlet timer = null;\n\t\t// Wait for the element to be added to the DOM.\n\t\tconst observer = new window.MutationObserver( () => {\n\t\t\tif ( container.querySelector( selector ) ) {\n\t\t\t\tclearTimeout( timer );\n\t\t\t\tobserver.disconnect();\n\t\t\t\tresolve( container.querySelector( selector ) );\n\t\t\t}\n\t\t} );\n\n\t\tobserver.observe( container, {\n\t\t\tchildList: true,\n\t\t\tsubtree: true,\n\t\t} );\n\n\t\t// Stop trying after 3 seconds.\n\t\ttimer = setTimeout( () => {\n\t\t\tobserver.disconnect();\n\t\t\tresolve( null );\n\t\t}, 3000 );\n\t} ).then( ( element ) => element?.focus() );\n}\n", "/**\n * External dependencies\n */\nimport TextareaAutosize from 'react-autosize-textarea';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\t__experimentalTruncate as Truncate,\n\tButton,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useInstanceId, useDebounce } from '@wordpress/compose';\nimport { isKeyboardEvent } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { sanitizeCommentString, noop } from './utils';\n\nfunction CommentForm( {\n\tonSubmit,\n\tonCancel,\n\tthread,\n\tsubmitButtonText,\n\tlabelText,\n\treflowComments = noop,\n} ) {\n\tconst [ inputComment, setInputComment ] = useState(\n\t\tthread?.content?.raw ?? ''\n\t);\n\n\t// Regularly trigger a reflow as the user types since the textarea may grow or shrink.\n\tconst debouncedCommentUpdated = useDebounce( reflowComments, 100 );\n\n\tconst updateComment = ( value ) => {\n\t\tsetInputComment( value );\n\t};\n\n\tconst inputId = useInstanceId( CommentForm, 'comment-input' );\n\tconst isDisabled =\n\t\tinputComment === thread?.content?.raw ||\n\t\t! sanitizeCommentString( inputComment ).length;\n\n\treturn (\n\t\t<VStack\n\t\t\tclassName=\"editor-collab-sidebar-panel__comment-form\"\n\t\t\tspacing=\"4\"\n\t\t\tas=\"form\"\n\t\t\tonSubmit={ ( event ) => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tonSubmit( inputComment );\n\t\t\t\tsetInputComment( '' );\n\t\t\t} }\n\t\t>\n\t\t\t<VisuallyHidden as=\"label\" htmlFor={ inputId }>\n\t\t\t\t{ labelText ?? __( 'Note' ) }\n\t\t\t</VisuallyHidden>\n\t\t\t<TextareaAutosize\n\t\t\t\tid={ inputId }\n\t\t\t\tvalue={ inputComment ?? '' }\n\t\t\t\tonChange={ ( comment ) => {\n\t\t\t\t\tupdateComment( comment.target.value );\n\t\t\t\t\tdebouncedCommentUpdated();\n\t\t\t\t} }\n\t\t\t\trows={ 1 }\n\t\t\t\tmaxRows={ 20 }\n\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\tisKeyboardEvent.primary( event, 'Enter' ) &&\n\t\t\t\t\t\t! isDisabled\n\t\t\t\t\t) {\n\t\t\t\t\t\tevent.target.parentNode.requestSubmit();\n\t\t\t\t\t}\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<HStack spacing=\"2\" justify=\"flex-end\" wrap>\n\t\t\t\t<Button size=\"compact\" variant=\"tertiary\" onClick={ onCancel }>\n\t\t\t\t\t<Truncate>{ __( 'Cancel' ) }</Truncate>\n\t\t\t\t</Button>\n\t\t\t\t<Button\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\tdisabled={ isDisabled }\n\t\t\t\t>\n\t\t\t\t\t<Truncate>{ submitButtonText }</Truncate>\n\t\t\t\t</Button>\n\t\t\t</HStack>\n\t\t</VStack>\n\t);\n}\n\nexport default CommentForm;\n", "/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nconst yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);\nfunction getSideAxis(placement) {\n return yAxisSides.has(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nconst lrPlacement = ['left', 'right'];\nconst rlPlacement = ['right', 'left'];\nconst tbPlacement = ['top', 'bottom'];\nconst btPlacement = ['bottom', 'top'];\nfunction getSideList(side, isStart, rtl) {\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rlPlacement : lrPlacement;\n return isStart ? lrPlacement : rlPlacement;\n case 'left':\n case 'right':\n return isStart ? tbPlacement : btPlacement;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n", "import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const validMiddleware = middleware.filter(Boolean);\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let middlewareData = {};\n let resetCount = 0;\n for (let i = 0; i < validMiddleware.length; i++) {\n const {\n name,\n fn\n } = validMiddleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = {\n ...middlewareData,\n [name]: {\n ...middlewareData[name],\n ...data\n }\n };\n if (reset && resetCount <= 50) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n x,\n y,\n width: rects.floating.width,\n height: rects.floating.height\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const initialSideAxis = getSideAxis(initialPlacement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;\n if (!ignoreCrossAxisOverflow ||\n // We leave the current main axis only if every placement on that axis\n // overflows the main axis.\n overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$filter2;\n const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n if (hasFallbackAxisSideDirection) {\n const currentSideAxis = getSideAxis(d.placement);\n return currentSideAxis === initialSideAxis ||\n // Create a bias to the `y` side axis due to horizontal\n // reading directions favoring greater width.\n currentSideAxis === 'y';\n }\n return true;\n }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\nconst originSides = /*#__PURE__*/new Set(['left', 'top']);\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = originSides.has(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n\n // eslint-disable-next-line prefer-const\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: rawValue.mainAxis || 0,\n crossAxis: rawValue.crossAxis || 0,\n alignmentAxis: rawValue.alignmentAxis\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y,\n enabled: {\n [mainAxis]: checkMainAxis,\n [crossAxis]: checkCrossAxis\n }\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = originSides.has(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element \u2014\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n var _state$middlewareData, _state$middlewareData2;\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n const maximumClippingWidth = width - overflow.left - overflow.right;\n const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {\n availableWidth = maximumClippingWidth;\n }\n if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {\n availableHeight = maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n", "function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nconst invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);\n}\nconst tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);\nfunction isTableElement(element) {\n return tableElements.has(getNodeName(element));\n}\nconst topLayerSelectors = [':popover-open', ':modal'];\nfunction isTopLayer(element) {\n return topLayerSelectors.some(selector => {\n try {\n return element.matches(selector);\n } catch (_e) {\n return false;\n }\n });\n}\nconst transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];\nconst willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];\nconst containValues = ['paint', 'layout', 'strict', 'content'];\nfunction isContainingBlock(elementOrCss) {\n const webkit = isWebKit();\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nconst lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);\nfunction isLastTraversableNode(node) {\n return lastTraversableNodeNames.has(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n", "import { rectToClientRect, arrow as arrow$1, autoPlacement as autoPlacement$1, detectOverflow as detectOverflow$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle as getComputedStyle$1, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle$1(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = getFrameElement(currentWin);\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle$1(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = getFrameElement(currentWin);\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\n// If <html> has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n const leftScroll = getNodeScroll(element).scrollLeft;\n if (!rect) {\n return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n }\n return rect.left + leftScroll;\n}\n\nfunction getHTMLOffset(documentElement, scroll) {\n const htmlRect = documentElement.getBoundingClientRect();\n const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);\n const y = htmlRect.top + scroll.scrollTop;\n return {\n x,\n y\n };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle$1(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Safety check: ensure the scrollbar space is reasonable in case this\n// calculation is affected by unusual styles.\n// Most scrollbars leave 15-18px of space.\nconst SCROLLBAR_MAX = 25;\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n const windowScrollbarX = getWindowScrollBarX(html);\n // <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the\n // visual width of the <html> but this is not considered in the size\n // of `html.clientWidth`.\n if (windowScrollbarX <= 0) {\n const doc = html.ownerDocument;\n const body = doc.body;\n const bodyStyles = getComputedStyle(body);\n const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;\n const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);\n if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {\n width -= clippingStableScrollbarWidth;\n }\n } else if (windowScrollbarX <= SCROLLBAR_MAX) {\n // If the <body> scrollbar is on the left, the width needs to be extended\n // by the scrollbar amount so there isn't extra space on the right.\n width += windowScrollbarX;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nconst absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y,\n width: clippingAncestor.width,\n height: clippingAncestor.height\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle$1(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle$1(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n\n // If the <body> scrollbar appears on the left (e.g. RTL systems). Use\n // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n function setLeftRTLScrollbarOffset() {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n setLeftRTLScrollbarOffset();\n }\n }\n if (isFixed && !isOffsetParentAnElement && documentElement) {\n setLeftRTLScrollbarOffset();\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction isStaticPositioned(element) {\n return getComputedStyle$1(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n let rawOffsetParent = element.offsetParent;\n\n // Firefox returns the <html> element as the offsetParent if it's non-static,\n // while Chrome and Safari return the <body> element. The <body> element must\n // be used to perform the correct calculations even if the <html> element is\n // non-static.\n if (getDocumentElement(element) === rawOffsetParent) {\n rawOffsetParent = rawOffsetParent.ownerDocument.body;\n }\n return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const win = getWindow(element);\n if (isTopLayer(element)) {\n return win;\n }\n if (!isHTMLElement(element)) {\n let svgOffsetParent = getParentNode(element);\n while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n return svgOffsetParent;\n }\n svgOffsetParent = getParentNode(svgOffsetParent);\n }\n return win;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n return win;\n }\n return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n const floatingDimensions = await getDimensionsFn(data.floating);\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n width: floatingDimensions.width,\n height: floatingDimensions.height\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle$1(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\nfunction rectsAreEqual(a, b) {\n return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n}\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const elementRectForRootMargin = element.getBoundingClientRect();\n const {\n left,\n top,\n width,\n height\n } = elementRectForRootMargin;\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n // If the reference is clipped, the ratio is 0. Throttle the refresh\n // to prevent an infinite loop of updates.\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {\n // It's possible that even though the ratio is reported as 1, the\n // element is not actually fully within the IntersectionObserver's root\n // area anymore. This can happen under performance constraints. This may\n // be a bug in the browser's IntersectionObserver implementation. To\n // work around this, we compare the element's bounding rect now with\n // what it was at the time we created the IntersectionObserver. If they\n // are not equal then the element moved, so we refresh.\n refresh();\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle <iframe>s\n root: root.ownerDocument\n });\n } catch (_e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n refresh(true);\n return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update, {\n passive: true\n });\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n resizeObserver.observe(floating);\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nconst detectOverflow = detectOverflow$1;\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = offset$1;\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element \u2014\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = {\n platform,\n ...options\n };\n const platformWithCache = {\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, platform, shift, size };\n", "import { arrow as arrow$1, computePosition } from '@floating-ui/dom';\nexport { autoPlacement, autoUpdate, computePosition, detectOverflow, flip, getOverflowAncestors, hide, inline, limitShift, offset, platform, shift, size } from '@floating-ui/dom';\nimport * as React from 'react';\nimport { useLayoutEffect, useEffect } from 'react';\nimport * as ReactDOM from 'react-dom';\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => {\n function isRef(value) {\n return {}.hasOwnProperty.call(value, 'current');\n }\n return {\n name: 'arrow',\n options,\n fn(state) {\n const {\n element,\n padding\n } = typeof options === 'function' ? options(state) : options;\n if (element && isRef(element)) {\n if (element.current != null) {\n return arrow$1({\n element: element.current,\n padding\n }).fn(state);\n }\n return {};\n }\n if (element) {\n return arrow$1({\n element,\n padding\n }).fn(state);\n }\n return {};\n }\n };\n};\n\nvar index = typeof document !== 'undefined' ? useLayoutEffect : useEffect;\n\n// Fork of `fast-deep-equal` that only does the comparisons we need and compares\n// functions\nfunction deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (typeof a !== typeof b) {\n return false;\n }\n if (typeof a === 'function' && a.toString() === b.toString()) {\n return true;\n }\n let length;\n let i;\n let keys;\n if (a && b && typeof a === 'object') {\n if (Array.isArray(a)) {\n length = a.length;\n if (length !== b.length) return false;\n for (i = length; i-- !== 0;) {\n if (!deepEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) {\n return false;\n }\n for (i = length; i-- !== 0;) {\n if (!{}.hasOwnProperty.call(b, keys[i])) {\n return false;\n }\n }\n for (i = length; i-- !== 0;) {\n const key = keys[i];\n if (key === '_owner' && a.$$typeof) {\n continue;\n }\n if (!deepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n\n // biome-ignore lint/suspicious/noSelfCompare: in source\n return a !== a && b !== b;\n}\n\nfunction getDPR(element) {\n if (typeof window === 'undefined') {\n return 1;\n }\n const win = element.ownerDocument.defaultView || window;\n return win.devicePixelRatio || 1;\n}\n\nfunction roundByDPR(element, value) {\n const dpr = getDPR(element);\n return Math.round(value * dpr) / dpr;\n}\n\nfunction useLatestRef(value) {\n const ref = React.useRef(value);\n index(() => {\n ref.current = value;\n });\n return ref;\n}\n\n/**\n * Provides data to position a floating element.\n * @see https://floating-ui.com/docs/useFloating\n */\nfunction useFloating(options) {\n if (options === void 0) {\n options = {};\n }\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform,\n elements: {\n reference: externalReference,\n floating: externalFloating\n } = {},\n transform = true,\n whileElementsMounted,\n open\n } = options;\n const [data, setData] = React.useState({\n x: 0,\n y: 0,\n strategy,\n placement,\n middlewareData: {},\n isPositioned: false\n });\n const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);\n if (!deepEqual(latestMiddleware, middleware)) {\n setLatestMiddleware(middleware);\n }\n const [_reference, _setReference] = React.useState(null);\n const [_floating, _setFloating] = React.useState(null);\n const setReference = React.useCallback(node => {\n if (node !== referenceRef.current) {\n referenceRef.current = node;\n _setReference(node);\n }\n }, []);\n const setFloating = React.useCallback(node => {\n if (node !== floatingRef.current) {\n floatingRef.current = node;\n _setFloating(node);\n }\n }, []);\n const referenceEl = externalReference || _reference;\n const floatingEl = externalFloating || _floating;\n const referenceRef = React.useRef(null);\n const floatingRef = React.useRef(null);\n const dataRef = React.useRef(data);\n const hasWhileElementsMounted = whileElementsMounted != null;\n const whileElementsMountedRef = useLatestRef(whileElementsMounted);\n const platformRef = useLatestRef(platform);\n const update = React.useCallback(() => {\n if (!referenceRef.current || !floatingRef.current) {\n return;\n }\n const config = {\n placement,\n strategy,\n middleware: latestMiddleware\n };\n if (platformRef.current) {\n config.platform = platformRef.current;\n }\n computePosition(referenceRef.current, floatingRef.current, config).then(data => {\n const fullData = {\n ...data,\n isPositioned: true\n };\n if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {\n dataRef.current = fullData;\n ReactDOM.flushSync(() => {\n setData(fullData);\n });\n }\n });\n }, [latestMiddleware, placement, strategy, platformRef]);\n index(() => {\n if (open === false && dataRef.current.isPositioned) {\n dataRef.current.isPositioned = false;\n setData(data => ({\n ...data,\n isPositioned: false\n }));\n }\n }, [open]);\n const isMountedRef = React.useRef(false);\n index(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: `hasWhileElementsMounted` is intentionally included.\n index(() => {\n if (referenceEl) referenceRef.current = referenceEl;\n if (floatingEl) floatingRef.current = floatingEl;\n if (referenceEl && floatingEl) {\n if (whileElementsMountedRef.current) {\n return whileElementsMountedRef.current(referenceEl, floatingEl, update);\n }\n update();\n }\n }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);\n const refs = React.useMemo(() => ({\n reference: referenceRef,\n floating: floatingRef,\n setReference,\n setFloating\n }), [setReference, setFloating]);\n const elements = React.useMemo(() => ({\n reference: referenceEl,\n floating: floatingEl\n }), [referenceEl, floatingEl]);\n const floatingStyles = React.useMemo(() => {\n const initialStyles = {\n position: strategy,\n left: 0,\n top: 0\n };\n if (!elements.floating) {\n return initialStyles;\n }\n const x = roundByDPR(elements.floating, data.x);\n const y = roundByDPR(elements.floating, data.y);\n if (transform) {\n return {\n ...initialStyles,\n transform: \"translate(\" + x + \"px, \" + y + \"px)\",\n ...(getDPR(elements.floating) >= 1.5 && {\n willChange: 'transform'\n })\n };\n }\n return {\n position: strategy,\n left: x,\n top: y\n };\n }, [strategy, transform, elements.floating, data.x, data.y]);\n return React.useMemo(() => ({\n ...data,\n update,\n refs,\n elements,\n floatingStyles\n }), [data, update, refs, elements, floatingStyles]);\n}\n\nexport { arrow, useFloating };\n", "/**\n * External dependencies\n */\nimport {\n\tuseFloating,\n\toffset as offsetMiddleware,\n\tautoUpdate,\n} from '@floating-ui/react-dom';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseEffect,\n\tuseMemo,\n\tuseCallback,\n\tuseReducer,\n} from '@wordpress/element';\nimport { useEntityRecords, store as coreStore } from '@wordpress/core-data';\nimport { useDispatch, useRegistry, useSelect } from '@wordpress/data';\nimport {\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { collabSidebarName } from './constants';\nimport { unlock } from '../../lock-unlock';\nimport { noop } from './utils';\n\nconst { useBlockElement, cleanEmptyObject } = unlock( blockEditorPrivateApis );\n\nexport function useBlockComments( postId ) {\n\tconst [ commentLastUpdated, reflowComments ] = useReducer(\n\t\t() => Date.now(),\n\t\t0\n\t);\n\n\tconst queryArgs = {\n\t\tpost: postId,\n\t\ttype: 'note',\n\t\tstatus: 'all',\n\t\tper_page: -1,\n\t};\n\n\tconst { records: threads } = useEntityRecords(\n\t\t'root',\n\t\t'comment',\n\t\tqueryArgs,\n\t\t{ enabled: !! postId && typeof postId === 'number' }\n\t);\n\n\tconst { getBlockAttributes } = useSelect( blockEditorStore );\n\tconst { clientIds } = useSelect( ( select ) => {\n\t\tconst { getClientIdsWithDescendants } = select( blockEditorStore );\n\t\treturn {\n\t\t\tclientIds: getClientIdsWithDescendants(),\n\t\t};\n\t}, [] );\n\n\t// Process comments to build the tree structure.\n\tconst { resultComments, unresolvedSortedThreads } = useMemo( () => {\n\t\tif ( ! threads || threads.length === 0 ) {\n\t\t\treturn { resultComments: [], unresolvedSortedThreads: [] };\n\t\t}\n\n\t\tconst blocksWithComments = clientIds.reduce( ( results, clientId ) => {\n\t\t\tconst commentId = getBlockAttributes( clientId )?.metadata?.noteId;\n\t\t\tif ( commentId ) {\n\t\t\t\tresults[ clientId ] = commentId;\n\t\t\t}\n\t\t\treturn results;\n\t\t}, {} );\n\n\t\t// Create a compare to store the references to all objects by id.\n\t\tconst compare = {};\n\t\tconst result = [];\n\n\t\t// Create a reverse map for faster lookup.\n\t\tconst commentIdToBlockClientId = Object.keys(\n\t\t\tblocksWithComments\n\t\t).reduce( ( mapping, clientId ) => {\n\t\t\tmapping[ blocksWithComments[ clientId ] ] = clientId;\n\t\t\treturn mapping;\n\t\t}, {} );\n\n\t\t// Initialize each object with an empty `reply` array and map blockClientId.\n\t\tthreads.forEach( ( item ) => {\n\t\t\tconst itemBlock = commentIdToBlockClientId[ item.id ];\n\n\t\t\tcompare[ item.id ] = {\n\t\t\t\t...item,\n\t\t\t\treply: [],\n\t\t\t\tblockClientId: item.parent === 0 ? itemBlock : null,\n\t\t\t};\n\t\t} );\n\n\t\t// Iterate over the data to build the tree structure.\n\t\tthreads.forEach( ( item ) => {\n\t\t\tif ( item.parent === 0 ) {\n\t\t\t\t// If parent is 0, it's a root item, push it to the result array.\n\t\t\t\tresult.push( compare[ item.id ] );\n\t\t\t} else if ( compare[ item.parent ] ) {\n\t\t\t\t// Otherwise, find its parent and push it to the parent's `reply` array.\n\t\t\t\tcompare[ item.parent ].reply.push( compare[ item.id ] );\n\t\t\t}\n\t\t} );\n\n\t\tif ( 0 === result?.length ) {\n\t\t\treturn { resultComments: [], unresolvedSortedThreads: [] };\n\t\t}\n\n\t\tconst updatedResult = result.map( ( item ) => ( {\n\t\t\t...item,\n\t\t\treply: [ ...item.reply ].reverse(),\n\t\t} ) );\n\n\t\tconst threadIdMap = new Map(\n\t\t\tupdatedResult.map( ( thread ) => [ String( thread.id ), thread ] )\n\t\t);\n\n\t\t// Prepare sets to determine which threads are linked to existing blocks.\n\t\tconst mappedIds = new Set(\n\t\t\tObject.values( blocksWithComments ).map( ( id ) => String( id ) )\n\t\t);\n\n\t\t// Get comments by block order, first unresolved, then resolved.\n\t\tconst unresolvedSortedComments = Object.values( blocksWithComments )\n\t\t\t.map( ( commentId ) => threadIdMap.get( String( commentId ) ) )\n\t\t\t.filter(\n\t\t\t\t( thread ) => thread !== undefined && thread.status === 'hold'\n\t\t\t);\n\n\t\tconst resolvedSortedComments = Object.values( blocksWithComments )\n\t\t\t.map( ( commentId ) => threadIdMap.get( String( commentId ) ) )\n\t\t\t.filter(\n\t\t\t\t( thread ) =>\n\t\t\t\t\tthread !== undefined && thread.status === 'approved'\n\t\t\t);\n\n\t\t// Append orphaned notes (whose related block was deleted or missing).\n\t\tconst orphanedComments = updatedResult.filter(\n\t\t\t( thread ) => ! mappedIds.has( String( thread.id ) )\n\t\t);\n\n\t\tconst allSortedComments = [\n\t\t\t...unresolvedSortedComments,\n\t\t\t...resolvedSortedComments,\n\t\t\t...orphanedComments,\n\t\t];\n\n\t\treturn {\n\t\t\tresultComments: allSortedComments,\n\t\t\tunresolvedSortedThreads: unresolvedSortedComments,\n\t\t};\n\t}, [ clientIds, threads, getBlockAttributes ] );\n\n\treturn {\n\t\tresultComments,\n\t\tunresolvedSortedThreads,\n\t\treflowComments,\n\t\tcommentLastUpdated,\n\t};\n}\n\nexport function useBlockCommentsActions( reflowComments = noop ) {\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst { saveEntityRecord, deleteEntityRecord } = useDispatch( coreStore );\n\tconst { getCurrentPostId } = useSelect( editorStore );\n\tconst { getBlockAttributes, getSelectedBlockClientId } =\n\t\tuseSelect( blockEditorStore );\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\n\tconst onError = ( error ) => {\n\t\tconst errorMessage =\n\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t? decodeEntities( error.message )\n\t\t\t\t: __( 'An error occurred while performing an update.' );\n\t\tcreateNotice( 'error', errorMessage, {\n\t\t\ttype: 'snackbar',\n\t\t\tisDismissible: true,\n\t\t} );\n\t};\n\n\tconst onCreate = async ( { content, parent } ) => {\n\t\ttry {\n\t\t\tconst savedRecord = await saveEntityRecord(\n\t\t\t\t'root',\n\t\t\t\t'comment',\n\t\t\t\t{\n\t\t\t\t\tpost: getCurrentPostId(),\n\t\t\t\t\tcontent,\n\t\t\t\t\tstatus: 'hold',\n\t\t\t\t\ttype: 'note',\n\t\t\t\t\tparent: parent || 0,\n\t\t\t\t},\n\t\t\t\t{ throwOnError: true }\n\t\t\t);\n\n\t\t\t// If it's a main comment, update the block attributes with the comment id.\n\t\t\tif ( ! parent && savedRecord?.id ) {\n\t\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\t\tconst metadata = getBlockAttributes( clientId )?.metadata;\n\t\t\t\tupdateBlockAttributes( clientId, {\n\t\t\t\t\tmetadata: {\n\t\t\t\t\t\t...metadata,\n\t\t\t\t\t\tnoteId: savedRecord.id,\n\t\t\t\t\t},\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tcreateNotice(\n\t\t\t\t'snackbar',\n\t\t\t\tparent ? __( 'Reply added.' ) : __( 'Note added.' ),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tisDismissible: true,\n\t\t\t\t}\n\t\t\t);\n\t\t\tsetTimeout( reflowComments, 300 );\n\t\t\treturn savedRecord;\n\t\t} catch ( error ) {\n\t\t\treflowComments();\n\t\t\tonError( error );\n\t\t}\n\t};\n\n\tconst onEdit = async ( { id, content, status } ) => {\n\t\tconst messageType = status ? status : 'updated';\n\t\tconst messages = {\n\t\t\tapproved: __( 'Note marked as resolved.' ),\n\t\t\thold: __( 'Note reopened.' ),\n\t\t\tupdated: __( 'Note updated.' ),\n\t\t};\n\n\t\ttry {\n\t\t\t// For resolution or reopen actions, create a new note with metadata.\n\t\t\tif ( status === 'approved' || status === 'hold' ) {\n\t\t\t\t// First, update the thread status.\n\t\t\t\tawait saveEntityRecord(\n\t\t\t\t\t'root',\n\t\t\t\t\t'comment',\n\t\t\t\t\t{\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tstatus,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tthrowOnError: true,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\t// Then create a new comment with the metadata.\n\t\t\t\tconst newCommentData = {\n\t\t\t\t\tpost: getCurrentPostId(),\n\t\t\t\t\tcontent: content || '', // Empty content for resolve, content for reopen.\n\t\t\t\t\ttype: 'note',\n\t\t\t\t\tstatus,\n\t\t\t\t\tparent: id,\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\t_wp_note_status:\n\t\t\t\t\t\t\tstatus === 'approved' ? 'resolved' : 'reopen',\n\t\t\t\t\t},\n\t\t\t\t};\n\n\t\t\t\tawait saveEntityRecord( 'root', 'comment', newCommentData, {\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tconst updateData = {\n\t\t\t\t\tid,\n\t\t\t\t\tcontent,\n\t\t\t\t\tstatus,\n\t\t\t\t};\n\n\t\t\t\tawait saveEntityRecord( 'root', 'comment', updateData, {\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tcreateNotice(\n\t\t\t\t'snackbar',\n\t\t\t\tmessages[ messageType ] ?? __( 'Note updated.' ),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tisDismissible: true,\n\t\t\t\t}\n\t\t\t);\n\t\t\treflowComments();\n\t\t} catch ( error ) {\n\t\t\treflowComments();\n\t\t\tonError( error );\n\t\t}\n\t};\n\n\tconst onDelete = async ( comment ) => {\n\t\ttry {\n\t\t\tawait deleteEntityRecord(\n\t\t\t\t'root',\n\t\t\t\t'comment',\n\t\t\t\tcomment.id,\n\t\t\t\tundefined,\n\t\t\t\t{\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( ! comment.parent ) {\n\t\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\t\tconst metadata = getBlockAttributes( clientId )?.metadata;\n\t\t\t\tupdateBlockAttributes( clientId, {\n\t\t\t\t\tmetadata: cleanEmptyObject( {\n\t\t\t\t\t\t...metadata,\n\t\t\t\t\t\tnoteId: undefined,\n\t\t\t\t\t} ),\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tcreateNotice( 'snackbar', __( 'Note deleted.' ), {\n\t\t\t\ttype: 'snackbar',\n\t\t\t\tisDismissible: true,\n\t\t\t} );\n\t\t\treflowComments();\n\t\t} catch ( error ) {\n\t\t\treflowComments();\n\t\t\tonError( error );\n\t\t}\n\t};\n\n\treturn { onCreate, onEdit, onDelete };\n}\n\nexport function useEnableFloatingSidebar( enabled = false ) {\n\tconst registry = useRegistry();\n\tuseEffect( () => {\n\t\tif ( ! enabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { getActiveComplementaryArea } =\n\t\t\tregistry.select( interfaceStore );\n\t\tconst { disableComplementaryArea, enableComplementaryArea } =\n\t\t\tregistry.dispatch( interfaceStore );\n\n\t\tconst unsubscribe = registry.subscribe( () => {\n\t\t\t// Return `null` to indicate the user hid the complementary area.\n\t\t\tif ( getActiveComplementaryArea( 'core' ) === null ) {\n\t\t\t\tenableComplementaryArea( 'core', collabSidebarName );\n\t\t\t}\n\t\t} );\n\n\t\treturn () => {\n\t\t\tunsubscribe();\n\t\t\tif ( getActiveComplementaryArea( 'core' ) === collabSidebarName ) {\n\t\t\t\tdisableComplementaryArea( 'core', collabSidebarName );\n\t\t\t}\n\t\t};\n\t}, [ enabled, registry ] );\n}\n\nexport function useFloatingThread( {\n\tthread,\n\tcalculatedOffset,\n\tsetHeights,\n\tselectedThread,\n\tsetBlockRef,\n\tcommentLastUpdated,\n} ) {\n\tconst blockElement = useBlockElement( thread.blockClientId );\n\tconst updateHeight = useCallback(\n\t\t( id, newHeight ) => {\n\t\t\tsetHeights( ( prev ) => {\n\t\t\t\tif ( prev[ id ] !== newHeight ) {\n\t\t\t\t\treturn { ...prev, [ id ]: newHeight };\n\t\t\t\t}\n\t\t\t\treturn prev;\n\t\t\t} );\n\t\t},\n\t\t[ setHeights ]\n\t);\n\n\t// Use floating-ui to track the block element's position with the calculated offset.\n\tconst { y, refs } = useFloating( {\n\t\tplacement: 'right-start',\n\t\tmiddleware: [\n\t\t\toffsetMiddleware( {\n\t\t\t\tcrossAxis: calculatedOffset || -16,\n\t\t\t} ),\n\t\t],\n\t\twhileElementsMounted: autoUpdate,\n\t} );\n\n\t// Store the block reference for each thread.\n\tuseEffect( () => {\n\t\tif ( blockElement ) {\n\t\t\trefs.setReference( blockElement );\n\t\t}\n\t}, [ blockElement, refs, commentLastUpdated ] );\n\n\t// Track thread heights.\n\tuseEffect( () => {\n\t\tif ( refs.floating?.current ) {\n\t\t\tsetBlockRef( thread.id, blockElement );\n\t\t}\n\t}, [ blockElement, thread.id, refs.floating, setBlockRef ] );\n\n\t// When the selected thread changes, update heights, triggering offset recalculation.\n\tuseEffect( () => {\n\t\tif ( refs.floating?.current ) {\n\t\t\tconst newHeight = refs.floating.current.scrollHeight;\n\t\t\tupdateHeight( thread.id, newHeight );\n\t\t}\n\t}, [\n\t\tthread.id,\n\t\tupdateHeight,\n\t\trefs.floating,\n\t\tselectedThread,\n\t\tcommentLastUpdated,\n\t] );\n\n\treturn {\n\t\ty,\n\t\trefs,\n\t};\n}\n", "/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport {\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport CommentAuthorInfo from './comment-author-info';\nimport CommentForm from './comment-form';\nimport { focusCommentThread, noop } from './utils';\n\nconst { useBlockElement } = unlock( blockEditorPrivateApis );\n\nexport function AddComment( {\n\tonSubmit,\n\tnewNoteFormState,\n\tsetNewNoteFormState,\n\tcommentSidebarRef,\n\treflowComments = noop,\n\tisFloating = false,\n\ty,\n\trefs,\n} ) {\n\tconst { clientId } = useSelect( ( select ) => {\n\t\tconst { getSelectedBlockClientId } = select( blockEditorStore );\n\t\treturn {\n\t\t\tclientId: getSelectedBlockClientId(),\n\t\t};\n\t}, [] );\n\tconst blockElement = useBlockElement( clientId );\n\tconst { toggleBlockSpotlight } = unlock( useDispatch( blockEditorStore ) );\n\n\tconst unselectThread = () => {\n\t\tsetNewNoteFormState( 'closed' );\n\t\tblockElement?.focus();\n\t\ttoggleBlockSpotlight( clientId, false );\n\t};\n\n\tif ( newNoteFormState !== 'open' || ! clientId ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack\n\t\t\tclassName={ clsx(\n\t\t\t\t'editor-collab-sidebar-panel__thread is-selected',\n\t\t\t\t{\n\t\t\t\t\t'is-floating': isFloating,\n\t\t\t\t}\n\t\t\t) }\n\t\t\tspacing=\"3\"\n\t\t\ttabIndex={ 0 }\n\t\t\taria-label={ __( 'New note' ) }\n\t\t\trole=\"treeitem\"\n\t\t\tref={ isFloating ? refs.setFloating : undefined }\n\t\t\tstyle={\n\t\t\t\tisFloating\n\t\t\t\t\t? // Delay showing the floating note box until a Y position is known to prevent blink.\n\t\t\t\t\t { top: y, opacity: ! y ? 0 : undefined }\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\tonBlur={ ( event ) => {\n\t\t\t\tif ( event.currentTarget.contains( event.relatedTarget ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ttoggleBlockSpotlight( clientId, false );\n\t\t\t\tsetNewNoteFormState( 'closed' );\n\t\t\t} }\n\t\t>\n\t\t\t<HStack alignment=\"left\" spacing=\"3\">\n\t\t\t\t<CommentAuthorInfo />\n\t\t\t</HStack>\n\t\t\t<CommentForm\n\t\t\t\tonSubmit={ async ( inputComment ) => {\n\t\t\t\t\tconst { id } = await onSubmit( { content: inputComment } );\n\t\t\t\t\tfocusCommentThread( id, commentSidebarRef.current );\n\t\t\t\t\tsetNewNoteFormState( 'creating' );\n\t\t\t\t} }\n\t\t\t\tonCancel={ unselectThread }\n\t\t\t\treflowComments={ reflowComments }\n\t\t\t\tsubmitButtonText={ __( 'Add note' ) }\n\t\t\t\tlabelText={ __( 'New note' ) }\n\t\t\t/>\n\t\t</VStack>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { comment as commentIcon } from '@wordpress/icons';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { getUnregisteredTypeHandlerName } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { CommentIconSlotFill } = unlock( blockEditorPrivateApis );\n\nconst AddCommentMenuItem = ( { clientId, onClick, isDistractionFree } ) => {\n\tconst block = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( blockEditorStore ).getBlock( clientId );\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tif (\n\t\t! block?.isValid ||\n\t\tblock?.name === getUnregisteredTypeHandlerName()\n\t) {\n\t\treturn null;\n\t}\n\n\tconst isDisabled = isDistractionFree || block?.name === 'core/freeform';\n\n\tlet infoText;\n\n\tif ( isDistractionFree ) {\n\t\tinfoText = __( 'Notes are disabled in distraction free mode.' );\n\t} else if ( block?.name === 'core/freeform' ) {\n\t\tinfoText = __( 'Convert to blocks to add notes.' );\n\t}\n\n\treturn (\n\t\t<MenuItem\n\t\t\ticon={ commentIcon }\n\t\t\tonClick={ onClick }\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdisabled={ isDisabled }\n\t\t\tinfo={ infoText }\n\t\t>\n\t\t\t{ __( 'Add note' ) }\n\t\t</MenuItem>\n\t);\n};\n\nconst AddCommentMenuItemFill = ( { onClick, isDistractionFree } ) => {\n\treturn (\n\t\t<CommentIconSlotFill.Fill>\n\t\t\t{ ( { clientId, onClose } ) => (\n\t\t\t\t<AddCommentMenuItem\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tisDistractionFree={ isDistractionFree }\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tonClick();\n\t\t\t\t\t\tonClose();\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</CommentIconSlotFill.Fill>\n\t);\n};\n\nexport default AddCommentMenuItemFill;\n", "/**\n * WordPress dependencies\n */\nimport {\n\tToolbarButton,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useMemo } from '@wordpress/element';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { getAvatarBorderColor } from './utils';\n\nconst { CommentIconToolbarSlotFill } = unlock( blockEditorPrivateApis );\n\nconst CommentAvatarIndicator = ( { onClick, thread } ) => {\n\tconst threadParticipants = useMemo( () => {\n\t\tif ( ! thread ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst participantsMap = new Map();\n\t\tconst allComments = [ thread, ...thread.reply ];\n\n\t\t// Sort by date to show participants in chronological order.\n\t\tallComments.sort( ( a, b ) => new Date( a.date ) - new Date( b.date ) );\n\n\t\tallComments.forEach( ( comment ) => {\n\t\t\t// Track thread participants (original commenter + repliers).\n\t\t\tif ( comment.author_name && comment.author_avatar_urls ) {\n\t\t\t\tif ( ! participantsMap.has( comment.author ) ) {\n\t\t\t\t\tparticipantsMap.set( comment.author, {\n\t\t\t\t\t\tname: comment.author_name,\n\t\t\t\t\t\tavatar:\n\t\t\t\t\t\t\tcomment.author_avatar_urls?.[ '48' ] ||\n\t\t\t\t\t\t\tcomment.author_avatar_urls?.[ '96' ],\n\t\t\t\t\t\tid: comment.author,\n\t\t\t\t\t\tdate: comment.date,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\treturn Array.from( participantsMap.values() );\n\t}, [ thread ] );\n\n\tif ( ! threadParticipants.length ) {\n\t\treturn null;\n\t}\n\n\t// If there are more than 3 participants, show 2 avatars and a \"+n\" number.\n\tconst maxAvatars = 3;\n\tconst isOverflow = threadParticipants.length > maxAvatars;\n\tconst visibleParticipants = isOverflow\n\t\t? threadParticipants.slice( 0, maxAvatars - 1 )\n\t\t: threadParticipants;\n\tconst overflowCount = Math.max(\n\t\t0,\n\t\tthreadParticipants.length - visibleParticipants.length\n\t);\n\tconst threadHasMoreParticipants = threadParticipants.length > 100;\n\n\t// If we hit the comment limit, show \"100+\" instead of exact overflow count.\n\tconst overflowText =\n\t\tthreadHasMoreParticipants && overflowCount > 0\n\t\t\t? __( '100+' )\n\t\t\t: sprintf(\n\t\t\t\t\t// translators: %s: Number of participants.\n\t\t\t\t\t__( '+%s' ),\n\t\t\t\t\toverflowCount\n\t\t\t );\n\n\treturn (\n\t\t<CommentIconToolbarSlotFill.Fill>\n\t\t\t<ToolbarButton\n\t\t\t\tclassName=\"comment-avatar-indicator\"\n\t\t\t\tlabel={ __( 'View notes' ) }\n\t\t\t\tonClick={ onClick }\n\t\t\t\tshowTooltip\n\t\t\t>\n\t\t\t\t<HStack spacing=\"1\">\n\t\t\t\t\t{ visibleParticipants.map( ( participant ) => (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tkey={ participant.id }\n\t\t\t\t\t\t\tsrc={ participant.avatar }\n\t\t\t\t\t\t\talt={ participant.name }\n\t\t\t\t\t\t\tclassName=\"comment-avatar\"\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\tborderColor: getAvatarBorderColor(\n\t\t\t\t\t\t\t\t\tparticipant.id\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t\t{ overflowCount > 0 && (\n\t\t\t\t\t\t<Text weight={ 500 }>{ overflowText }</Text>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\n\t\t\t</ToolbarButton>\n\t\t</CommentIconToolbarSlotFill.Fill>\n\t);\n};\n\nexport default CommentAvatarIndicator;\n", "/**\n * WordPress dependencies\n */\nimport { FlexItem, Flex, Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { styles, seen, backup } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { useViewportMatch, usePrevious } from '@wordpress/compose';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport GlobalStylesUI from '../global-styles';\nimport { GlobalStylesActionMenu } from '../global-styles/menu';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport DefaultSidebar from './default-sidebar';\nimport WelcomeGuideStyles from './welcome-guide';\n\nexport default function GlobalStylesSidebar() {\n\tconst {\n\t\tshouldResetNavigation,\n\t\tstylesPath,\n\t\tshowStylebook,\n\t\tshowListViewByDefault,\n\t\thasRevisions,\n\t\tactiveComplementaryArea,\n\t} = useSelect( ( select ) => {\n\t\tconst { getActiveComplementaryArea } = select( interfaceStore );\n\t\tconst { getStylesPath, getShowStylebook } = unlock(\n\t\t\tselect( editorStore )\n\t\t);\n\t\tconst _isVisualEditorMode =\n\t\t\t'visual' === select( editorStore ).getEditorMode();\n\t\tconst _showListViewByDefault = select( preferencesStore ).get(\n\t\t\t'core',\n\t\t\t'showListViewByDefault'\n\t\t);\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tstylesPath: getStylesPath(),\n\t\t\tshowStylebook: getShowStylebook(),\n\t\t\tshouldResetNavigation:\n\t\t\t\t'edit-site/global-styles' !==\n\t\t\t\t\tgetActiveComplementaryArea( 'core' ) ||\n\t\t\t\t! _isVisualEditorMode,\n\t\t\tshowListViewByDefault: _showListViewByDefault,\n\t\t\thasRevisions:\n\t\t\t\t!! globalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count,\n\t\t\tactiveComplementaryArea:\n\t\t\t\tselect( interfaceStore ).getActiveComplementaryArea( 'core' ),\n\t\t};\n\t}, [] );\n\tconst { setStylesPath, setShowStylebook, resetStylesNavigation } = unlock(\n\t\tuseDispatch( editorStore )\n\t);\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\n\t// Derive state from path and showStylebook\n\tconst isRevisionsOpened =\n\t\tstylesPath.startsWith( '/revisions' ) && ! showStylebook;\n\tconst isRevisionsStyleBookOpened =\n\t\tstylesPath.startsWith( '/revisions' ) && showStylebook;\n\n\tconst previousActiveArea = usePrevious( activeComplementaryArea );\n\n\t// Reset navigation when sidebar opens\n\tuseEffect( () => {\n\t\tif (\n\t\t\tactiveComplementaryArea === 'edit-site/global-styles' &&\n\t\t\tpreviousActiveArea !== 'edit-site/global-styles'\n\t\t) {\n\t\t\tresetStylesNavigation();\n\t\t}\n\t}, [ activeComplementaryArea, previousActiveArea, resetStylesNavigation ] );\n\n\tuseEffect( () => {\n\t\tif ( shouldResetNavigation ) {\n\t\t\tresetStylesNavigation();\n\t\t}\n\t}, [ shouldResetNavigation, resetStylesNavigation ] );\n\n\tconst { setIsListViewOpened } = useDispatch( editorStore );\n\n\tconst toggleRevisions = () => {\n\t\tsetIsListViewOpened( false );\n\t\tif ( isRevisionsOpened || isRevisionsStyleBookOpened ) {\n\t\t\t// Close revisions, go back to root\n\t\t\tsetStylesPath( '/' );\n\t\t} else {\n\t\t\t// Open revisions\n\t\t\tsetStylesPath( '/revisions' );\n\t\t}\n\t};\n\tconst toggleStyleBook = () => {\n\t\tsetIsListViewOpened( showStylebook && showListViewByDefault );\n\t\tsetShowStylebook( ! showStylebook );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<DefaultSidebar\n\t\t\t\tclassName=\"editor-global-styles-sidebar\"\n\t\t\t\tidentifier=\"edit-site/global-styles\"\n\t\t\t\ttitle={ __( 'Styles' ) }\n\t\t\t\ticon={ styles }\n\t\t\t\tcloseLabel={ __( 'Close Styles' ) }\n\t\t\t\tpanelClassName=\"editor-global-styles-sidebar__panel\"\n\t\t\t\theader={\n\t\t\t\t\t<Flex\n\t\t\t\t\t\tclassName=\"editor-global-styles-sidebar__header\"\n\t\t\t\t\t\tgap={ 1 }\n\t\t\t\t\t>\n\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t<h2 className=\"editor-global-styles-sidebar__header-title\">\n\t\t\t\t\t\t\t\t{ __( 'Styles' ) }\n\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t<Flex\n\t\t\t\t\t\t\tjustify=\"flex-end\"\n\t\t\t\t\t\t\tgap={ 1 }\n\t\t\t\t\t\t\tclassName=\"editor-global-styles-sidebar__header-actions\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ ! isMobileViewport && (\n\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\ticon={ seen }\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Style Book' ) }\n\t\t\t\t\t\t\t\t\t\tisPressed={ showStylebook }\n\t\t\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\t\t\tdisabled={ shouldResetNavigation }\n\t\t\t\t\t\t\t\t\t\tonClick={ toggleStyleBook }\n\t\t\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Revisions' ) }\n\t\t\t\t\t\t\t\t\ticon={ backup }\n\t\t\t\t\t\t\t\t\tonClick={ toggleRevisions }\n\t\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\t\tdisabled={ ! hasRevisions }\n\t\t\t\t\t\t\t\t\tisPressed={\n\t\t\t\t\t\t\t\t\t\tisRevisionsOpened ||\n\t\t\t\t\t\t\t\t\t\tisRevisionsStyleBookOpened\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t<GlobalStylesActionMenu\n\t\t\t\t\t\t\t\tonChangePath={ setStylesPath }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Flex>\n\t\t\t\t\t</Flex>\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<GlobalStylesUI\n\t\t\t\t\tpath={ stylesPath }\n\t\t\t\t\tonPathChange={ setStylesPath }\n\t\t\t\t/>\n\t\t\t</DefaultSidebar>\n\t\t\t<WelcomeGuideStyles />\n\t\t</>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { moreVertical } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { useGlobalStyles } from './hooks';\n\n/**\n * Action menu with Reset, Welcome Guide, and Additional CSS.\n *\n * @param {Object} props Component props.\n * @param {boolean} props.hideWelcomeGuide Whether to hide the Welcome Guide option.\n * @param {Function} props.onChangePath Callback for navigation to different paths (e.g., '/css').\n * @return {JSX.Element} The Global Styles Action Menu component.\n */\nexport function GlobalStylesActionMenu( {\n\thideWelcomeGuide = false,\n\tonChangePath,\n} ) {\n\tconst { user, setUser } = useGlobalStyles();\n\n\t// Check if there are user customizations that can be reset\n\tconst canReset =\n\t\t!! user &&\n\t\t( Object.keys( user?.styles ?? {} ).length > 0 ||\n\t\t\tObject.keys( user?.settings ?? {} ).length > 0 );\n\n\t// Reset function to clear all user customizations\n\tconst onReset = () => {\n\t\tsetUser( { styles: {}, settings: {} } );\n\t};\n\tconst { toggle } = useDispatch( preferencesStore );\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\tconst loadCustomCSS = () => {\n\t\tonChangePath( '/css' );\n\t};\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\ticon={ moreVertical }\n\t\t\tlabel={ __( 'More' ) }\n\t\t\ttoggleProps={ { size: 'compact' } }\n\t\t>\n\t\t\t{ ( { onClose } ) => (\n\t\t\t\t<>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t{ canEditCSS && (\n\t\t\t\t\t\t\t<MenuItem onClick={ loadCustomCSS }>\n\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! hideWelcomeGuide && (\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\ttoggle(\n\t\t\t\t\t\t\t\t\t\t'core/edit-site',\n\t\t\t\t\t\t\t\t\t\t'welcomeGuideStyles'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tonReset();\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tdisabled={ ! canReset }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Reset styles' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport {\n\tComplementaryArea,\n\tComplementaryAreaMoreMenuItem,\n} from '@wordpress/interface';\n\nexport default function DefaultSidebar( {\n\tclassName,\n\tidentifier,\n\ttitle,\n\ticon,\n\tchildren,\n\tcloseLabel,\n\theader,\n\theaderClassName,\n\tpanelClassName,\n\tisActiveByDefault,\n} ) {\n\treturn (\n\t\t<>\n\t\t\t<ComplementaryArea\n\t\t\t\tclassName={ className }\n\t\t\t\tscope=\"core\"\n\t\t\t\tidentifier={ identifier }\n\t\t\t\ttitle={ title }\n\t\t\t\ticon={ icon }\n\t\t\t\tcloseLabel={ closeLabel }\n\t\t\t\theader={ header }\n\t\t\t\theaderClassName={ headerClassName }\n\t\t\t\tpanelClassName={ panelClassName }\n\t\t\t\tisActiveByDefault={ isActiveByDefault }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</ComplementaryArea>\n\t\t\t<ComplementaryAreaMoreMenuItem\n\t\t\t\tscope=\"core\"\n\t\t\t\tidentifier={ identifier }\n\t\t\t\ticon={ icon }\n\t\t\t>\n\t\t\t\t{ title }\n\t\t\t</ComplementaryAreaMoreMenuItem>\n\t\t</>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { ExternalLink, Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport WelcomeGuideImage from './welcome-guide-image';\n\nexport default function WelcomeGuideStyles() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst { isActive, isStylesOpen } = useSelect( ( select ) => {\n\t\tconst sidebar =\n\t\t\tselect( interfaceStore ).getActiveComplementaryArea( 'core' );\n\n\t\treturn {\n\t\t\tisActive: !! select( preferencesStore ).get(\n\t\t\t\t'core/edit-site',\n\t\t\t\t'welcomeGuideStyles'\n\t\t\t),\n\t\t\tisStylesOpen: sidebar === 'edit-site/global-styles',\n\t\t};\n\t}, [] );\n\n\tif ( ! isActive || ! isStylesOpen ) {\n\t\treturn null;\n\t}\n\n\tconst welcomeLabel = __( 'Welcome to Styles' );\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"editor-welcome-guide guide-styles\"\n\t\t\tcontentLabel={ welcomeLabel }\n\t\t\tfinishButtonText={ __( 'Get started' ) }\n\t\t\tonFinish={ () => toggle( 'core/edit-site', 'welcomeGuideStyles' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-to-styles.svg?1\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-to-styles.gif?1\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"editor-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ welcomeLabel }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"editor-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Tweak your site, or give it a whole new look! Get creative \u2014 how about a new color palette for your buttons, or choosing a new font? Take a look at what you can do here.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/set-the-design.svg?1\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/set-the-design.gif?1\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"editor-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Set the design' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"editor-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'You can customize your site as much as you like with different colors, typography, and layouts. Or if you prefer, just leave it up to your theme to handle!'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/personalize-blocks.svg?1\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/personalize-blocks.gif?1\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"editor-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Personalize blocks' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"editor-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'You can adjust your blocks to ensure a cohesive experience across your site \u2014 add your unique colors to a branded Button block, or adjust the Heading block to your preferred size.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-documentation.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-documentation.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"editor-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Learn more' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"editor-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'New to block themes and styling your site?'\n\t\t\t\t\t\t\t\t) }{ ' ' }\n\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/styles-overview/'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t'Here\u2019s a detailed guide to learn how to make the most of it.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t] }\n\t\t/>\n\t);\n}\n", "export default function WelcomeGuideImage( { nonAnimatedSrc, animatedSrc } ) {\n\treturn (\n\t\t<picture className=\"editor-welcome-guide__image\">\n\t\t\t<source\n\t\t\t\tsrcSet={ nonAnimatedSrc }\n\t\t\t\tmedia=\"(prefers-reduced-motion: reduce)\"\n\t\t\t/>\n\t\t\t<img src={ animatedSrc } width=\"312\" height=\"240\" alt=\"\" />\n\t\t</picture>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\n\nimport { __ } from '@wordpress/i18n';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport {\n\tstore as preferencesStore,\n\tprivateApis as preferencesPrivateApis,\n} from '@wordpress/preferences';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport EnablePanelOption from './enable-panel';\nimport EnablePluginDocumentSettingPanelOption from './enable-plugin-document-setting-panel';\nimport EnablePublishSidebarOption from './enable-publish-sidebar';\nimport BlockVisibility from '../block-visibility';\nimport PostTaxonomies from '../post-taxonomies';\nimport PostFeaturedImageCheck from '../post-featured-image/check';\nimport PostExcerptCheck from '../post-excerpt/check';\nimport PageAttributesCheck from '../page-attributes/check';\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tPreferencesModal,\n\tPreferencesModalTabs,\n\tPreferencesModalSection,\n\tPreferenceToggleControl,\n} = unlock( preferencesPrivateApis );\n\nexport default function EditorPreferencesModal( { extraSections = {} } ) {\n\tconst isActive = useSelect( ( select ) => {\n\t\treturn select( interfaceStore ).isModalActive( 'editor/preferences' );\n\t}, [] );\n\tconst { closeModal } = useDispatch( interfaceStore );\n\n\tif ( ! isActive ) {\n\t\treturn null;\n\t}\n\n\t// Please wrap all contents inside PreferencesModalContents to prevent all\n\t// hooks from executing when the modal is not open.\n\treturn (\n\t\t<PreferencesModal closeModal={ closeModal }>\n\t\t\t<PreferencesModalContents extraSections={ extraSections } />\n\t\t</PreferencesModal>\n\t);\n}\n\nfunction PreferencesModalContents( { extraSections = {} } ) {\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst showBlockBreadcrumbsOption = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditorSettings } = select( editorStore );\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\tconst isRichEditingEnabled = getEditorSettings().richEditingEnabled;\n\t\t\tconst isDistractionFreeEnabled = get( 'core', 'distractionFree' );\n\t\t\treturn (\n\t\t\t\t! isDistractionFreeEnabled &&\n\t\t\t\tisLargeViewport &&\n\t\t\t\tisRichEditingEnabled\n\t\t\t);\n\t\t},\n\t\t[ isLargeViewport ]\n\t);\n\tconst { setIsListViewOpened, setIsInserterOpened } =\n\t\tuseDispatch( editorStore );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\n\tconst sections = useMemo(\n\t\t() =>\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\tname: 'general',\n\t\t\t\t\ttabLabel: __( 'General' ),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\ttitle={ __( 'Interface' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"showListViewByDefault\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Opens the List View panel by default.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Always open List View' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t{ showBlockBreadcrumbsOption && (\n\t\t\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\t\tfeatureName=\"showBlockBreadcrumbs\"\n\t\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t\t'Display the block hierarchy trail at the bottom of the editor.'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Show block breadcrumbs' ) }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"allowRightClickOverrides\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Allows contextual List View menus via right-click, overriding browser defaults.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t'Allow right-click contextual menus'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"enableChoosePatternModal\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Pick from starter content when creating a new page.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Show starter patterns' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\ttitle={ __( 'Document settings' ) }\n\t\t\t\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t\t\t\t'Select what settings are shown in the document panel.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<EnablePluginDocumentSettingPanelOption.Slot />\n\t\t\t\t\t\t\t\t<PostTaxonomies\n\t\t\t\t\t\t\t\t\ttaxonomyWrapper={ ( content, taxonomy ) => (\n\t\t\t\t\t\t\t\t\t\t<EnablePanelOption\n\t\t\t\t\t\t\t\t\t\t\tlabel={ taxonomy.labels.menu_name }\n\t\t\t\t\t\t\t\t\t\t\tpanelName={ `taxonomy-panel-${ taxonomy.slug }` }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<PostFeaturedImageCheck>\n\t\t\t\t\t\t\t\t\t<EnablePanelOption\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Featured image' ) }\n\t\t\t\t\t\t\t\t\t\tpanelName=\"featured-image\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</PostFeaturedImageCheck>\n\t\t\t\t\t\t\t\t<PostExcerptCheck>\n\t\t\t\t\t\t\t\t\t<EnablePanelOption\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Excerpt' ) }\n\t\t\t\t\t\t\t\t\t\tpanelName=\"post-excerpt\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</PostExcerptCheck>\n\t\t\t\t\t\t\t\t<PostTypeSupportCheck\n\t\t\t\t\t\t\t\t\tsupportKeys={ [ 'comments', 'trackbacks' ] }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<EnablePanelOption\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Discussion' ) }\n\t\t\t\t\t\t\t\t\t\tpanelName=\"discussion-panel\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</PostTypeSupportCheck>\n\t\t\t\t\t\t\t\t<PageAttributesCheck>\n\t\t\t\t\t\t\t\t\t<EnablePanelOption\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Page attributes' ) }\n\t\t\t\t\t\t\t\t\t\tpanelName=\"page-attributes\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</PageAttributesCheck>\n\t\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\t\ttitle={ __( 'Publishing' ) }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<EnablePublishSidebarOption\n\t\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t\t'Review settings, such as visibility and tags.'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t\t'Enable pre-publish checks'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ extraSections?.general }\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'appearance',\n\t\t\t\t\ttabLabel: __( 'Appearance' ),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\ttitle={ __( 'Appearance' ) }\n\t\t\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t\t\t'Customize the editor interface to suit your needs.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tfeatureName=\"fixedToolbar\"\n\t\t\t\t\t\t\t\tonToggle={ () =>\n\t\t\t\t\t\t\t\t\tsetPreference(\n\t\t\t\t\t\t\t\t\t\t'core',\n\t\t\t\t\t\t\t\t\t\t'distractionFree',\n\t\t\t\t\t\t\t\t\t\tfalse\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t'Access all block and document tools in a single place.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tlabel={ __( 'Top toolbar' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tfeatureName=\"distractionFree\"\n\t\t\t\t\t\t\t\tonToggle={ () => {\n\t\t\t\t\t\t\t\t\tsetPreference(\n\t\t\t\t\t\t\t\t\t\t'core',\n\t\t\t\t\t\t\t\t\t\t'fixedToolbar',\n\t\t\t\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tsetIsInserterOpened( false );\n\t\t\t\t\t\t\t\t\tsetIsListViewOpened( false );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t'Reduce visual distractions by hiding the toolbar and other elements to focus on writing.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tlabel={ __( 'Distraction free' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tfeatureName=\"focusMode\"\n\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t'Highlights the current block and fades other content.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tlabel={ __( 'Spotlight mode' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ extraSections?.appearance }\n\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'accessibility',\n\t\t\t\t\ttabLabel: __( 'Accessibility' ),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\ttitle={ __( 'Navigation' ) }\n\t\t\t\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t\t\t\t'Optimize the editing experience for enhanced control.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"keepCaretInsideBlock\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Keeps the text cursor within blocks while navigating with arrow keys, preventing it from moving to other blocks and enhancing accessibility for keyboard users.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t'Contain text cursor inside block'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\ttitle={ __( 'Interface' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"showIconLabels\"\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Show button text labels' ) }\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Show text instead of icons on buttons across the interface.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'blocks',\n\t\t\t\t\ttabLabel: __( 'Blocks' ),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<PreferencesModalSection title={ __( 'Inserter' ) }>\n\t\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"mostUsedBlocks\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Adds a category with the most frequently used blocks in the inserter.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Show most used blocks' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\ttitle={ __( 'Manage block visibility' ) }\n\t\t\t\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t\t\t\t\"Disable blocks that you don't want to appear in the inserter. They can always be toggled back on later.\"\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<BlockVisibility />\n\t\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\twindow.__experimentalMediaProcessing && {\n\t\t\t\t\tname: 'media',\n\t\t\t\t\ttabLabel: __( 'Media' ),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\ttitle={ __( 'General' ) }\n\t\t\t\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t\t\t\t'Customize options related to the media upload flow.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core/media\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"optimizeOnUpload\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Compress media items before uploading to the server.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Pre-upload compression' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core/media\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"requireApproval\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Require approval step when optimizing existing media.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Approval step' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t].filter( Boolean ),\n\t\t[\n\t\t\tshowBlockBreadcrumbsOption,\n\t\t\textraSections,\n\t\t\tsetIsInserterOpened,\n\t\t\tsetIsListViewOpened,\n\t\t\tsetPreference,\n\t\t\tisLargeViewport,\n\t\t]\n\t);\n\n\treturn <PreferencesModalTabs sections={ sections } />;\n}\n", "/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { privateApis as preferencesPrivateApis } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst { PreferenceBaseOption } = unlock( preferencesPrivateApis );\n\nexport default function EnablePublishSidebarOption( props ) {\n\tconst isChecked = useSelect( ( select ) => {\n\t\treturn select( editorStore ).isPublishSidebarEnabled();\n\t}, [] );\n\tconst { enablePublishSidebar, disablePublishSidebar } =\n\t\tuseDispatch( editorStore );\n\n\treturn (\n\t\t<PreferenceBaseOption\n\t\t\tisChecked={ isChecked }\n\t\t\tonChange={ ( isEnabled ) =>\n\t\t\t\tisEnabled ? enablePublishSidebar() : disablePublishSidebar()\n\t\t\t}\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { hasBlockSupport, store as blocksStore } from '@wordpress/blocks';\nimport { useMemo } from '@wordpress/element';\nimport { Button } from '@wordpress/components';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { BlockManager } = unlock( blockEditorPrivateApis );\nconst EMPTY_ARRAY = [];\n\nexport default function BlockVisibility() {\n\tconst { showBlockTypes, hideBlockTypes } = unlock(\n\t\tuseDispatch( editorStore )\n\t);\n\n\tconst {\n\t\tblockTypes,\n\t\tallowedBlockTypes: _allowedBlockTypes,\n\t\thiddenBlockTypes: _hiddenBlockTypes,\n\t} = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tblockTypes: select( blocksStore ).getBlockTypes(),\n\t\t\tallowedBlockTypes:\n\t\t\t\tselect( editorStore ).getEditorSettings().allowedBlockTypes,\n\t\t\thiddenBlockTypes:\n\t\t\t\tselect( preferencesStore ).get( 'core', 'hiddenBlockTypes' ) ??\n\t\t\t\tEMPTY_ARRAY,\n\t\t};\n\t}, [] );\n\n\tconst allowedBlockTypes = useMemo( () => {\n\t\tif ( _allowedBlockTypes === true ) {\n\t\t\treturn blockTypes;\n\t\t}\n\t\treturn blockTypes.filter( ( { name } ) => {\n\t\t\treturn _allowedBlockTypes?.includes( name );\n\t\t} );\n\t}, [ _allowedBlockTypes, blockTypes ] );\n\n\tconst filteredBlockTypes = allowedBlockTypes.filter(\n\t\t( blockType ) =>\n\t\t\thasBlockSupport( blockType, 'inserter', true ) &&\n\t\t\t( ! blockType.parent ||\n\t\t\t\tblockType.parent.includes( 'core/post-content' ) )\n\t);\n\n\t// Some hidden blocks become unregistered\n\t// by removing for instance the plugin that registered them, yet\n\t// they're still remain as hidden by the user's action.\n\t// We consider \"hidden\", blocks which were hidden and\n\t// are still registered.\n\tconst hiddenBlockTypes = _hiddenBlockTypes.filter( ( hiddenBlock ) => {\n\t\treturn filteredBlockTypes.some(\n\t\t\t( registeredBlock ) => registeredBlock.name === hiddenBlock\n\t\t);\n\t} );\n\n\tconst selectedBlockTypes = filteredBlockTypes.filter(\n\t\t( blockType ) => ! hiddenBlockTypes.includes( blockType.name )\n\t);\n\n\tconst numberOfHiddenBlocks =\n\t\tfilteredBlockTypes.length - selectedBlockTypes.length;\n\n\tfunction enableAllBlockTypes() {\n\t\tonChangeSelectedBlockTypes( filteredBlockTypes );\n\t}\n\n\tconst onChangeSelectedBlockTypes = ( newSelectedBlockTypes ) => {\n\t\tif ( selectedBlockTypes.length > newSelectedBlockTypes.length ) {\n\t\t\tconst blockTypesToHide = selectedBlockTypes.filter(\n\t\t\t\t( blockType ) =>\n\t\t\t\t\t! newSelectedBlockTypes.find(\n\t\t\t\t\t\t( { name } ) => name === blockType.name\n\t\t\t\t\t)\n\t\t\t);\n\t\t\thideBlockTypes( blockTypesToHide.map( ( { name } ) => name ) );\n\t\t} else if ( selectedBlockTypes.length < newSelectedBlockTypes.length ) {\n\t\t\tconst blockTypesToShow = newSelectedBlockTypes.filter(\n\t\t\t\t( blockType ) =>\n\t\t\t\t\t! selectedBlockTypes.find(\n\t\t\t\t\t\t( { name } ) => name === blockType.name\n\t\t\t\t\t)\n\t\t\t);\n\t\t\tshowBlockTypes( blockTypesToShow.map( ( { name } ) => name ) );\n\t\t}\n\t};\n\n\treturn (\n\t\t<div className=\"editor-block-visibility\">\n\t\t\t{ !! numberOfHiddenBlocks && (\n\t\t\t\t<div className=\"editor-block-visibility__disabled-blocks-count\">\n\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t/* translators: %d: number of blocks. */\n\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t'%d block is hidden.',\n\t\t\t\t\t\t\t'%d blocks are hidden.',\n\t\t\t\t\t\t\tnumberOfHiddenBlocks\n\t\t\t\t\t\t),\n\t\t\t\t\t\tnumberOfHiddenBlocks\n\t\t\t\t\t) }\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\tonClick={ enableAllBlockTypes }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<BlockManager\n\t\t\t\tblockTypes={ filteredBlockTypes }\n\t\t\t\tselectedBlockTypes={ selectedBlockTypes }\n\t\t\t\tonChange={ onChangeSelectedBlockTypes }\n\t\t\t\tshowSelectAll={ false }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n", "/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport type { Field } from '@wordpress/dataviews';\nimport type { BasePostWithEmbeddedAuthor } from '@wordpress/fields';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nfunction usePostFields( {\n\tpostType,\n}: {\n\tpostType: string;\n} ): Field< BasePostWithEmbeddedAuthor >[] {\n\tconst { registerPostTypeSchema } = unlock( useDispatch( editorStore ) );\n\tuseEffect( () => {\n\t\tregisterPostTypeSchema( postType );\n\t}, [ registerPostTypeSchema, postType ] );\n\n\tconst { fields } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityFields } = unlock( select( editorStore ) );\n\t\t\treturn {\n\t\t\t\tfields: getEntityFields( 'postType', postType ),\n\t\t\t};\n\t\t},\n\t\t[ postType ]\n\t);\n\n\treturn fields;\n}\n\n/**\n * Hook to get the fields for a post (BasePost or BasePostWithEmbeddedAuthor).\n */\nexport default usePostFields;\n", "/**\n * WordPress dependencies\n */\nimport { registerBlockBindingsSource } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport patternOverrides from './pattern-overrides';\nimport postData from './post-data';\nimport postMeta from './post-meta';\nimport termData from './term-data';\n\n/**\n * Function to register core block bindings sources provided by the editor.\n *\n * @example\n * ```js\n * import { registerCoreBlockBindingsSources } from '@wordpress/editor';\n *\n * registerCoreBlockBindingsSources();\n * ```\n */\nexport function registerCoreBlockBindingsSources() {\n\tregisterBlockBindingsSource( patternOverrides );\n\tregisterBlockBindingsSource( postData );\n\tregisterBlockBindingsSource( postMeta );\n\tregisterBlockBindingsSource( termData );\n}\n", "/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\nconst CONTENT = 'content';\n\n/**\n * @type {WPBlockBindingsSource}\n */\nexport default {\n\tname: 'core/pattern-overrides',\n\tgetValues( { select, clientId, context, bindings } ) {\n\t\tconst patternOverridesContent = context[ 'pattern/overrides' ];\n\t\tconst { getBlockAttributes } = select( blockEditorStore );\n\t\tconst currentBlockAttributes = getBlockAttributes( clientId );\n\n\t\tconst overridesValues = {};\n\t\tfor ( const attributeName of Object.keys( bindings ) ) {\n\t\t\tconst overridableValue =\n\t\t\t\tpatternOverridesContent?.[\n\t\t\t\t\tcurrentBlockAttributes?.metadata?.name\n\t\t\t\t]?.[ attributeName ];\n\n\t\t\t// If it has not been overridden, return the original value.\n\t\t\t// Check undefined because empty string is a valid value.\n\t\t\tif ( overridableValue === undefined ) {\n\t\t\t\toverridesValues[ attributeName ] =\n\t\t\t\t\tcurrentBlockAttributes[ attributeName ];\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\toverridesValues[ attributeName ] =\n\t\t\t\t\toverridableValue === '' ? undefined : overridableValue;\n\t\t\t}\n\t\t}\n\t\treturn overridesValues;\n\t},\n\tsetValues( { select, dispatch, clientId, bindings } ) {\n\t\tconst { getBlockAttributes, getBlockParentsByBlockName, getBlocks } =\n\t\t\tselect( blockEditorStore );\n\t\tconst currentBlockAttributes = getBlockAttributes( clientId );\n\t\tconst blockName = currentBlockAttributes?.metadata?.name;\n\t\tif ( ! blockName ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst [ patternClientId ] = getBlockParentsByBlockName(\n\t\t\tclientId,\n\t\t\t'core/block',\n\t\t\ttrue\n\t\t);\n\n\t\t// Extract the updated attributes from the source bindings.\n\t\tconst attributes = Object.entries( bindings ).reduce(\n\t\t\t( attrs, [ key, { newValue } ] ) => {\n\t\t\t\tattrs[ key ] = newValue;\n\t\t\t\treturn attrs;\n\t\t\t},\n\t\t\t{}\n\t\t);\n\n\t\t// If there is no pattern client ID, sync blocks with the same name and same attributes.\n\t\tif ( ! patternClientId ) {\n\t\t\tconst syncBlocksWithSameName = ( blocks ) => {\n\t\t\t\tfor ( const block of blocks ) {\n\t\t\t\t\tif ( block.attributes?.metadata?.name === blockName ) {\n\t\t\t\t\t\tdispatch( blockEditorStore ).updateBlockAttributes(\n\t\t\t\t\t\t\tblock.clientId,\n\t\t\t\t\t\t\tattributes\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tsyncBlocksWithSameName( block.innerBlocks );\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tsyncBlocksWithSameName( getBlocks() );\n\t\t\treturn;\n\t\t}\n\t\tconst currentBindingValue =\n\t\t\tgetBlockAttributes( patternClientId )?.[ CONTENT ];\n\n\t\tdispatch( blockEditorStore ).updateBlockAttributes( patternClientId, {\n\t\t\t[ CONTENT ]: {\n\t\t\t\t...currentBindingValue,\n\t\t\t\t[ blockName ]: {\n\t\t\t\t\t...currentBindingValue?.[ blockName ],\n\t\t\t\t\t...Object.entries( attributes ).reduce(\n\t\t\t\t\t\t( acc, [ key, value ] ) => {\n\t\t\t\t\t\t\t// TODO: We need a way to represent `undefined` in the serialized overrides.\n\t\t\t\t\t\t\t// Also see: https://github.com/WordPress/gutenberg/pull/57249#discussion_r1452987871\n\t\t\t\t\t\t\t// We use an empty string to represent undefined for now until\n\t\t\t\t\t\t\t// we support a richer format for overrides and the block bindings API.\n\t\t\t\t\t\t\tacc[ key ] = value === undefined ? '' : value;\n\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{}\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t},\n\t\t} );\n\t},\n\tcanUserEditValue: () => true,\n};\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n// Navigation block types that use special handling for backwards compatibility\nconst NAVIGATION_BLOCK_TYPES = [\n\t'core/navigation-link',\n\t'core/navigation-submenu',\n];\n\nconst postDataFields = [\n\t{\n\t\tlabel: __( 'Post Date' ),\n\t\targs: { field: 'date' },\n\t\ttype: 'string',\n\t},\n\t{\n\t\tlabel: __( 'Post Modified Date' ),\n\t\targs: { field: 'modified' },\n\t\ttype: 'string',\n\t},\n\t{\n\t\tlabel: __( 'Post Link' ),\n\t\targs: { field: 'link' },\n\t\ttype: 'string',\n\t},\n];\n\n/**\n * @type {WPBlockBindingsSource}\n */\nexport default {\n\tname: 'core/post-data',\n\tgetValues( { select, context, bindings, clientId } ) {\n\t\t/*\n\t\t * BACKWARDS COMPATIBILITY: Hardcoded exception for navigation blocks.\n\t\t * Required for WordPress 6.9+ navigation blocks. DO NOT REMOVE.\n\t\t */\n\t\tconst { getBlockAttributes, getBlockName } = select( blockEditorStore );\n\t\tconst blockName = getBlockName( clientId );\n\t\tconst isNavigationBlock = NAVIGATION_BLOCK_TYPES.includes( blockName );\n\n\t\tlet postId, postType;\n\n\t\tif ( isNavigationBlock ) {\n\t\t\t// Navigation blocks: read from block attributes\n\t\t\tconst blockAttributes = getBlockAttributes( clientId );\n\t\t\tpostId = blockAttributes?.id;\n\t\t\tpostType = blockAttributes?.type;\n\t\t} else {\n\t\t\t// All other blocks: use context\n\t\t\tpostId = context?.postId;\n\t\t\tpostType = context?.postType;\n\t\t}\n\n\t\tconst { getEditedEntityRecord } = select( coreDataStore );\n\t\tconst entityDataValues = getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\n\t\tconst newValues = {};\n\t\tfor ( const [ attributeName, binding ] of Object.entries( bindings ) ) {\n\t\t\tconst postDataField = postDataFields.find(\n\t\t\t\t( field ) => field.args.field === binding.args.field\n\t\t\t);\n\n\t\t\tif ( ! postDataField ) {\n\t\t\t\t// If the field is unknown, return the field name.\n\t\t\t\tnewValues[ attributeName ] = binding.args.field;\n\t\t\t} else if ( ! entityDataValues ) {\n\t\t\t\t// If the entity data does not exist, return the field label.\n\t\t\t\tnewValues[ attributeName ] = postDataField.label;\n\t\t\t} else {\n\t\t\t\t// If the entity data exists, return the entity value.\n\t\t\t\tnewValues[ attributeName ] =\n\t\t\t\t\tentityDataValues[ binding.args.field ];\n\t\t\t}\n\t\t}\n\t\treturn newValues;\n\t},\n\tsetValues( { dispatch, context, bindings, clientId, select } ) {\n\t\tconst { getBlockName } = select( blockEditorStore );\n\n\t\tconst blockName = getBlockName( clientId );\n\n\t\t// Navigaton block types are read-only.\n\t\t// See https://github.com/WordPress/gutenberg/pull/72165.\n\t\tif ( NAVIGATION_BLOCK_TYPES.includes( blockName ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tconst newData = {};\n\t\tObject.values( bindings ).forEach( ( { args, newValue } ) => {\n\t\t\tnewData[ args.field ] = newValue;\n\t\t} );\n\n\t\tdispatch( coreDataStore ).editEntityRecord(\n\t\t\t'postType',\n\t\t\tcontext?.postType,\n\t\t\tcontext?.postId,\n\t\t\tnewData\n\t\t);\n\t},\n\tcanUserEditValue( { select, context } ) {\n\t\tconst { getBlockName, getSelectedBlockClientId } =\n\t\t\tselect( blockEditorStore );\n\t\tconst clientId = getSelectedBlockClientId();\n\t\tconst blockName = getBlockName( clientId );\n\n\t\t// Navigaton block types are read-only.\n\t\t// See https://github.com/WordPress/gutenberg/pull/72165.\n\t\tif ( NAVIGATION_BLOCK_TYPES.includes( blockName ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Lock editing in query loop.\n\t\tif ( context?.query || context?.queryId ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Lock editing when `postType` is not defined.\n\t\tif ( ! context?.postType ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check that the user has the capability to edit post data.\n\t\tconst canUserEdit = select( coreDataStore ).canUser( 'update', {\n\t\t\tkind: 'postType',\n\t\t\tname: context?.postType,\n\t\t\tid: context?.postId,\n\t\t} );\n\t\tif ( ! canUserEdit ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t},\n\tgetFieldsList( { context, select } ) {\n\t\tconst selectedBlock = select( blockEditorStore ).getSelectedBlock();\n\t\tif ( selectedBlock?.name !== 'core/post-date' ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif ( ! context || ! context.postId || ! context.postType ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn postDataFields;\n\t},\n};\n", "/**\n * WordPress dependencies\n */\nimport { store as coreDataStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../store';\nimport { unlock } from '../lock-unlock';\n\n/**\n * Gets a list of post meta fields with their values and labels\n * to be consumed in the needed callbacks.\n * If the value is not available based on context, like in templates,\n * it falls back to the default value, label, or key.\n *\n * @param {Object} select The select function from the data store.\n * @param {Object} context The context provided.\n * @return {Object} List of post meta fields with their value and label.\n *\n * @example\n * ```js\n * {\n * field_1_key: {\n * label: 'Field 1 Label',\n * value: 'Field 1 Value',\n * },\n * field_2_key: {\n * label: 'Field 2 Label',\n * value: 'Field 2 Value',\n * },\n * ...\n * }\n * ```\n */\nfunction getPostMetaFields( select, context ) {\n\tconst { getRegisteredPostMeta } = unlock( select( coreDataStore ) );\n\n\tconst registeredFields = getRegisteredPostMeta( context?.postType );\n\tconst metaFields = [];\n\tObject.entries( registeredFields ).forEach( ( [ key, props ] ) => {\n\t\t// Don't include footnotes or private fields.\n\t\tif ( key === 'footnotes' || key.charAt( 0 ) === '_' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tmetaFields.push( {\n\t\t\tlabel: props.title || key,\n\t\t\targs: { key },\n\t\t\tdefault: props.default,\n\t\t\ttype: props.type,\n\t\t} );\n\t} );\n\n\treturn metaFields;\n}\n\nfunction getValue( { select, context, args } ) {\n\tconst metaFields = getPostMetaFields( select, context );\n\tconst metaField = metaFields.find(\n\t\t( field ) => field.args.key === args.key\n\t);\n\n\t// If the meta field was not found, it's either protected, inaccessible, or simply doesn't exist.\n\tif ( ! metaField ) {\n\t\treturn args.key;\n\t}\n\n\t// Without a postId, we cannot look up a meta value.\n\tif ( ! context?.postId ) {\n\t\t// Return the default value for the meta field if available.\n\t\treturn metaField.default || metaField.label || args.key;\n\t}\n\n\tconst { getEditedEntityRecord } = select( coreDataStore );\n\tconst entityMetaValues = getEditedEntityRecord(\n\t\t'postType',\n\t\tcontext?.postType,\n\t\tcontext?.postId\n\t).meta;\n\n\treturn entityMetaValues?.[ args.key ] ?? metaField?.label ?? args.key;\n}\n\n/**\n * @type {WPBlockBindingsSource}\n */\nexport default {\n\tname: 'core/post-meta',\n\tgetValues( { select, context, bindings } ) {\n\t\tconst newValues = {};\n\t\tfor ( const [ attributeName, binding ] of Object.entries( bindings ) ) {\n\t\t\tnewValues[ attributeName ] = getValue( {\n\t\t\t\tselect,\n\t\t\t\tcontext,\n\t\t\t\targs: binding.args,\n\t\t\t} );\n\t\t}\n\t\treturn newValues;\n\t},\n\tsetValues( { dispatch, context, bindings } ) {\n\t\tconst newMeta = {};\n\t\tObject.values( bindings ).forEach( ( { args, newValue } ) => {\n\t\t\tnewMeta[ args.key ] = newValue;\n\t\t} );\n\n\t\tdispatch( coreDataStore ).editEntityRecord(\n\t\t\t'postType',\n\t\t\tcontext?.postType,\n\t\t\tcontext?.postId,\n\t\t\t{\n\t\t\t\tmeta: newMeta,\n\t\t\t}\n\t\t);\n\t},\n\tcanUserEditValue( { select, context, args } ) {\n\t\t// Lock editing in query loop.\n\t\tif ( context?.query || context?.queryId ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Lock editing when `postType` is not defined.\n\t\tif ( ! context?.postType ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst metaFields = getPostMetaFields( select, context );\n\t\tconst hasMatchingMetaField = metaFields.some(\n\t\t\t( field ) => field.args.key === args.key\n\t\t);\n\t\tif ( ! hasMatchingMetaField ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check that custom fields metabox is not enabled.\n\t\tconst areCustomFieldsEnabled =\n\t\t\tselect( editorStore ).getEditorSettings().enableCustomFields;\n\t\tif ( areCustomFieldsEnabled ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check that the user has the capability to edit post meta.\n\t\tconst canUserEdit = select( coreDataStore ).canUser( 'update', {\n\t\t\tkind: 'postType',\n\t\t\tname: context?.postType,\n\t\t\tid: context?.postId,\n\t\t} );\n\t\tif ( ! canUserEdit ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t},\n\tgetFieldsList( { select, context } ) {\n\t\tconst metaFields = getPostMetaFields( select, context );\n\t\t// Remove 'default' property from meta fields.\n\t\treturn metaFields.map(\n\t\t\t( { default: defaultProp, ...otherProps } ) => ( {\n\t\t\t\t...otherProps,\n\t\t\t} )\n\t\t);\n\t},\n};\n", "/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n// Navigation block types that use special handling for backwards compatibility\nconst NAVIGATION_BLOCK_TYPES = [\n\t'core/navigation-link',\n\t'core/navigation-submenu',\n];\n\nexport const termDataFields = [\n\t{\n\t\tlabel: __( 'Term ID' ),\n\t\targs: { field: 'id' },\n\t\ttype: 'string',\n\t},\n\t{\n\t\tlabel: __( 'Name' ),\n\t\targs: { field: 'name' },\n\t\ttype: 'string',\n\t},\n\t{\n\t\tlabel: __( 'Slug' ),\n\t\targs: { field: 'slug' },\n\t\ttype: 'string',\n\t},\n\t{\n\t\tlabel: __( 'Link' ),\n\t\targs: { field: 'link' },\n\t\ttype: 'string',\n\t},\n\t{\n\t\tlabel: __( 'Description' ),\n\t\targs: { field: 'description' },\n\t\ttype: 'string',\n\t},\n\t{\n\t\tlabel: __( 'Parent ID' ),\n\t\targs: { field: 'parent' },\n\t\ttype: 'string',\n\t},\n\t{\n\t\tlabel: __( 'Count' ),\n\t\targs: { field: 'count' },\n\t\ttype: 'string',\n\t},\n];\n\n/**\n * @type {WPBlockBindingsSource}\n */\nexport default {\n\tname: 'core/term-data',\n\tusesContext: [ 'taxonomy', 'termId', 'termData' ],\n\tgetValues( { select, context, bindings, clientId } ) {\n\t\tconst { getEntityRecord } = select( coreDataStore );\n\n\t\t/*\n\t\t * BACKWARDS COMPATIBILITY: Hardcoded exception for navigation blocks.\n\t\t * Required for WordPress 6.9+ navigation blocks. DO NOT REMOVE.\n\t\t */\n\t\tconst { getBlockAttributes, getBlockName } = select( blockEditorStore );\n\t\tconst blockName = getBlockName( clientId );\n\t\tconst isNavigationBlock = NAVIGATION_BLOCK_TYPES.includes( blockName );\n\n\t\tlet termDataValues;\n\n\t\tif ( isNavigationBlock ) {\n\t\t\t// Navigation blocks: read from block attributes\n\t\t\tconst blockAttributes = getBlockAttributes( clientId );\n\t\t\tconst typeFromAttributes = blockAttributes?.type;\n\t\t\tconst taxonomy =\n\t\t\t\ttypeFromAttributes === 'tag' ? 'post_tag' : typeFromAttributes;\n\t\t\ttermDataValues = getEntityRecord(\n\t\t\t\t'taxonomy',\n\t\t\t\ttaxonomy,\n\t\t\t\tblockAttributes?.id\n\t\t\t);\n\t\t} else if ( context.termId && context.taxonomy ) {\n\t\t\t// All other blocks: use context\n\t\t\ttermDataValues = getEntityRecord(\n\t\t\t\t'taxonomy',\n\t\t\t\tcontext.taxonomy,\n\t\t\t\tcontext.termId\n\t\t\t);\n\t\t}\n\n\t\t// Fall back to context termData if available.\n\t\tif ( ! termDataValues && context?.termData && ! isNavigationBlock ) {\n\t\t\ttermDataValues = context.termData;\n\t\t}\n\n\t\tconst newValues = {};\n\t\tfor ( const [ attributeName, binding ] of Object.entries( bindings ) ) {\n\t\t\tconst termDataField = termDataFields.find(\n\t\t\t\t( field ) => field.args.field === binding.args.field\n\t\t\t);\n\n\t\t\tif ( ! termDataField ) {\n\t\t\t\t// If the field is unknown, return the field name.\n\t\t\t\tnewValues[ attributeName ] = binding.args.field;\n\t\t\t} else if (\n\t\t\t\t! termDataValues ||\n\t\t\t\ttermDataValues[ binding.args.field ] === undefined\n\t\t\t) {\n\t\t\t\t// If the term data does not exist, return the field label.\n\t\t\t\tnewValues[ attributeName ] = termDataField.label;\n\t\t\t} else if ( binding.args.field === 'count' ) {\n\t\t\t\t// Return the term count value in parentheses.\n\t\t\t\tnewValues[ attributeName ] =\n\t\t\t\t\t'(' + termDataValues[ binding.args.field ] + ')';\n\t\t\t} else {\n\t\t\t\t// If the term data exists, return the term data value.\n\t\t\t\tnewValues[ attributeName ] =\n\t\t\t\t\ttermDataValues[ binding.args.field ];\n\t\t\t}\n\t\t}\n\t\treturn newValues;\n\t},\n\t// eslint-disable-next-line no-unused-vars\n\tsetValues( { dispatch, context, bindings } ) {\n\t\t// Terms are typically not editable through block bindings in most contexts.\n\t\treturn false;\n\t},\n\tcanUserEditValue( { select, context } ) {\n\t\tconst { getBlockName, getSelectedBlockClientId } =\n\t\t\tselect( blockEditorStore );\n\n\t\tconst clientId = getSelectedBlockClientId();\n\t\tconst blockName = getBlockName( clientId );\n\n\t\t// Navigaton block types are read-only.\n\t\t// See https://github.com/WordPress/gutenberg/pull/72165.\n\t\tif ( NAVIGATION_BLOCK_TYPES.includes( blockName ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Terms are typically read-only when displayed.\n\t\tif ( context?.termQuery ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Lock editing when `taxonomy` or `termId` is not defined.\n\t\tif ( ! context?.taxonomy || ! context?.termId ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn false;\n\t},\n\tgetFieldsList( { context, select } ) {\n\t\tconst { getBlockAttributes, getBlockName, getSelectedBlockClientId } =\n\t\t\tselect( blockEditorStore );\n\t\tconst clientId = getSelectedBlockClientId();\n\t\tconst blockName = getBlockName( clientId );\n\n\t\tif ( NAVIGATION_BLOCK_TYPES.includes( blockName ) ) {\n\t\t\t// Navigation blocks: read from block attributes\n\t\t\tconst blockAttributes = getBlockAttributes( clientId );\n\t\t\tif (\n\t\t\t\t! blockAttributes ||\n\t\t\t\t! blockAttributes.id ||\n\t\t\t\t! blockAttributes.type\n\t\t\t) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\treturn termDataFields;\n\t\t}\n\n\t\tif ( ! context ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif ( ( context.taxonomy && context.termId ) || context.termData ) {\n\t\t\treturn termDataFields;\n\t\t}\n\n\t\treturn [];\n\t},\n};\n", "/**\n * WordPress dependencies\n */\nimport {\n\tCreateTemplatePartModal,\n\tpatternTitleField,\n\ttemplateTitleField,\n} from '@wordpress/fields';\nimport * as interfaceApis from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { lock } from './lock-unlock';\nimport { EntitiesSavedStatesExtensible } from './components/entities-saved-states';\nimport BackButton from './components/header/back-button';\nimport Editor from './components/editor';\nimport PluginPostExcerpt from './components/post-excerpt/plugin';\nimport PostCardPanel from './components/post-card-panel';\nimport PreferencesModal from './components/preferences-modal';\nimport { usePostActions } from './components/post-actions/actions';\nimport usePostFields from './components/post-fields';\nimport ToolsMoreMenuGroup from './components/more-menu/tools-more-menu-group';\nimport ViewMoreMenuGroup from './components/more-menu/view-more-menu-group';\nimport ResizableEditor from './components/resizable-editor';\nimport { registerCoreBlockBindingsSources } from './bindings/api';\nimport { getTemplateInfo } from './utils/get-template-info';\nimport GlobalStylesUIWrapper from './components/global-styles';\nimport { StyleBookPreview } from './components/style-book';\nimport { useGlobalStyles, useStyle } from './components/global-styles/hooks';\nimport { GlobalStylesActionMenu } from './components/global-styles/menu';\nimport {\n\tuseGenerateBlockPath,\n\tuseRestoreBlockFromPath,\n} from './utils/block-selection-path';\n\nconst { store: interfaceStore, ...remainingInterfaceApis } = interfaceApis;\n\nexport const privateApis = {};\nlock( privateApis, {\n\tCreateTemplatePartModal,\n\tpatternTitleField,\n\ttemplateTitleField,\n\tBackButton,\n\tEntitiesSavedStatesExtensible,\n\tEditor,\n\tPluginPostExcerpt,\n\tPostCardPanel,\n\tPreferencesModal,\n\tusePostActions,\n\tusePostFields,\n\tToolsMoreMenuGroup,\n\tViewMoreMenuGroup,\n\tResizableEditor,\n\tregisterCoreBlockBindingsSources,\n\tgetTemplateInfo,\n\t// Global Styles\n\tGlobalStylesUIWrapper,\n\tGlobalStylesActionMenu,\n\tStyleBookPreview,\n\tuseGlobalStyles,\n\tuseStyle,\n\t// Block selection\n\tuseGenerateBlockPath,\n\tuseRestoreBlockFromPath,\n\t// This is a temporary private API while we're updating the site editor to use EditorProvider.\n\tinterfaceStore,\n\t...remainingInterfaceApis,\n} );\n", "/**\n * WordPress dependencies\n */\nimport { dispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport { store as editorStore } from '../store';\n\n/**\n * @typedef {import('@wordpress/dataviews').Action} Action\n * @typedef {import('@wordpress/dataviews').Field} Field\n */\n\n/**\n * Registers a new DataViews action.\n *\n * This is an experimental API and is subject to change.\n * it's only available in the Gutenberg plugin for now.\n *\n * @param {string} kind Entity kind.\n * @param {string} name Entity name.\n * @param {Action} config Action configuration.\n */\n\nexport function registerEntityAction( kind, name, config ) {\n\tconst { registerEntityAction: _registerEntityAction } = unlock(\n\t\tdispatch( editorStore )\n\t);\n\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t_registerEntityAction( kind, name, config );\n\t}\n}\n\n/**\n * Unregisters a DataViews action.\n *\n * This is an experimental API and is subject to change.\n * it's only available in the Gutenberg plugin for now.\n *\n * @param {string} kind Entity kind.\n * @param {string} name Entity name.\n * @param {string} actionId Action ID.\n */\nexport function unregisterEntityAction( kind, name, actionId ) {\n\tconst { unregisterEntityAction: _unregisterEntityAction } = unlock(\n\t\tdispatch( editorStore )\n\t);\n\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t_unregisterEntityAction( kind, name, actionId );\n\t}\n}\n\n/**\n * Registers a new DataViews field.\n *\n * This is an experimental API and is subject to change.\n * it's only available in the Gutenberg plugin for now.\n *\n * @param {string} kind Entity kind.\n * @param {string} name Entity name.\n * @param {Field} config Field configuration.\n */\nexport function registerEntityField( kind, name, config ) {\n\tconst { registerEntityField: _registerEntityField } = unlock(\n\t\tdispatch( editorStore )\n\t);\n\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t_registerEntityField( kind, name, config );\n\t}\n}\n\n/**\n * Unregisters a DataViews field.\n *\n * This is an experimental API and is subject to change.\n * it's only available in the Gutenberg plugin for now.\n *\n * @param {string} kind Entity kind.\n * @param {string} name Entity name.\n * @param {string} fieldId Field ID.\n */\nexport function unregisterEntityField( kind, name, fieldId ) {\n\tconst { unregisterEntityField: _unregisterEntityField } = unlock(\n\t\tdispatch( editorStore )\n\t);\n\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t_unregisterEntityField( kind, name, fieldId );\n\t}\n}\n", "/**\n * Internal dependencies\n */\nimport './hooks';\n\nexport { storeConfig, store } from './store';\nexport * from './components';\nexport * from './utils';\nexport * from './private-apis';\nexport * from './dataviews/api';\n\n/*\n * Backward compatibility\n */\nexport { transformStyles } from '@wordpress/block-editor';\n"],
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,aAAO,UAAU,OAAO,GAAG;AAAA;AAAA;;;ACA3B;AAAA;AAAA,aAAO,UAAU,OAAO,GAAG;AAAA;AAAA;;;ACA3B;AAAA;AAAA,aAAO,UAAU,OAAO,GAAG;AAAA;AAAA;;;ACA3B;AAAA;AAAA,aAAO,UAAU,OAAO,GAAG;AAAA;AAAA;;;ACA3B;AAAA;AAAA,aAAO,UAAU,OAAO,GAAG;AAAA;AAAA;;;ACA3B;AAAA;AAAA,aAAO,UAAU,OAAO,GAAG;AAAA;AAAA;;;ACA3B;AAAA;AAAA,aAAO,UAAU,OAAO,GAAG;AAAA;AAAA;;;ACA3B;AAAA;AAAA,aAAO,UAAU,OAAO,GAAG;AAAA;AAAA;;;ACA3B;AAAA;AAAA,aAAO,UAAU,OAAO,GAAG;AAAA;AAAA;;;ACA3B;AAAA;AAAA,aAAO,UAAU,OAAO,GAAG;AAAA;AAAA;;;ACA3B;AAAA;AAAA,aAAO,UAAU,OAAO,GAAG;AAAA;AAAA;;;ACA3B;AAAA;AAAA,aAAO,UAAU,OAAO,GAAG;AAAA;AAAA;;;ACA3B;AAAA;AAAA,aAAO,UAAU,OAAO;AAAA;AAAA;;;ACAxB;AAAA;AAAA,aAAO,UAAU,OAAO,GAAG;AAAA;AAAA;;;ACA3B;AAAA;AAAA,aAAO,UAAU,OAAO,GAAG;AAAA;AAAA;;;ACA3B;AAAA;AAAA,aAAO,UAAU,OAAO,GAAG;AAAA;AAAA;;;ACA3B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YACf,gBAAgB;UACjB;QACD;QACA;UACC,UACC;UACD,OAAO;YACN,aAAa;YACb,eAAe;YACf,gBAAgB;UACjB;QACD;QACA;UACC,UAAU;UACV,OAAO;YACN,aAAa;UACd;QACD;MACD;MACA,eAAe;QACd;UACC,UAAU;UACV,OAAO;YACN,sBAAsB;UACvB;QACD;QACA;UACC,UAAU;UACV,OAAO;YACN,oBAAoB;UACrB;QACD;QACA;UACC,UAAU;UACV,OAAO;YACN,sBAAsB;YACtB,oBAAoB;UACrB;QACD;MACD;IACD;IACA,MAAM;MACL,MAAM;MACN,MAAM;MACN,WAAW;MACX,aAAa;MACb,YAAY;QACX;UACC,UAAU;UACV,OAAO;YACN,aAAa;YACb,eAAe;UAChB;QACD;QACA;UACC,UAAU;;UACV,OAAO;YACN,QAAQ;UACT;QACD;MACD;MACA,eAAe;QACd;UACC,UAAU;UACV,OAAO;YACN,KAAK;UACN;QACD;MACD;IACD;IACA,MAAM;MACL,MAAM;MACN,MAAM;MACN,WAAW;MACX,aAAa;MACb,YAAY;QACX;UACC,UAAU;;UACV,OAAO;YACN,QAAQ;UACT;QACD;MACD;MACA,eAAe;QACd;UACC,UAAU;UACV,OAAO;YACN,KAAK;UACN;QACD;MACD;IACD;EACD;;;AR1BA,MAAM,sBAAsB;IAC3B,QAAQ;IACR,SAAS;EACV;AAIA,MAAM,wCAAwC;IAC7C,sBAAsB;IACtB,OAAO;IACP,YAAY;IACZ,SAAS;IACT,YAAY;EACb;AASA,WAAS,uBACR,eAAsC,CAAC,GACvC,gBACW;AACX,WAAO,gBAAgB;MACtB,CACC,cACA,EAAE,MAAM,UAAU,WAAW,YAAY,MACrC;AACJ,cAAM,iBAAiB;UACtB;UACA;UACA,CAAC;QACF;AACA,SAAE,WAAW,SAAS,QAAS,EAAE,QAAS,CAAE,WAAY;AACvD,cAAK,eAAgB,MAAO,GAAI;AAC/B,2BAAgB,MAAO,EAAE,QAAS,CAAE,UAAgB;AACnD,kBAAK,YAAY,CAAE,WAAY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AAgB,MACzB,SACD;AACD,sCACC,6BACIA,UACH,GAAG,SAAU,KAAM,KACnB,yBACD;oBACF;kBACD;AAIA,6BAAW;oBACV;oBACA;oBACA;kBACD;AACA,sBAAK,WAAW,GAAI;AACnB,0BAAM,IAAI;sBACT;oBACD;kBACD;AAEA,sBACC,MAAM,yBACN,iBAAiB,uBAChB;AACD,mCAAe;kBAChB,OAAO;AACN,mCAAe;kBAChB;AAEA,6BAAW,MAAM;AAEjB,sBAAK,WAAW,cAAe;AAC9B,wBACC,eACC,iBAAiB,2BAClB,eACC,iBAAiB,yBACjB;AACD,0BAAIA,UACH,iBAAiB,gBAChB,WACD;AACD,0BAAI,UACH,WAAW,eAAe;AAC3B,0BAAIC,SACH,iBAAiB,iBAChB,WACD;AACD,0BAAI,QAAS,KAAKA,UAAU;AAC5B,0BAAI,WAAW,UAAU;AACzB,0BAAI,gBAAgB,WAAWA;AAC/B,sBAAAD,WAAU,WAAW;AACrB,0BACC,gBACA,UAAU,gBACT;AACD,4BAAI,MACH,UAAU;0BACT;0BACA;0BACAA;0BACA;0BACA;wBACD;AACD,oCAAY;AACZ,+BAAO;AACP,oDAA4B;AAC5B,4BAAK,YAAY,gBAAiB;AACjC,iCAAO;4BACN;4BACA;0BACD;AAEA,mCACKE,OAAK,GACTA,OACA,WAAW,gBACXA;AAEA,uCAAYA,IAAG,IACd,WACC,iBAAiBA,IAClB;wBACH;sBACD,OAAO;AACN,8BAAM,IAAI;0BACT,sCACC,MACA,gBACA,WACA,WACA,cACA,kBACA;wBACF;sBACD;oBACD,OAAO;AACN,4BAAM,IAAI;wBACT,sCACC,MACA,gBACA,WACA,WACA,cACA,kBACA;sBACF;oBACD;kBACD,OAAO;AACN,wBAAK,gBAAgB,GAAI;AACxB,8BAAS,cAAc,CAAE,IAAI;AAC7B,wBAAE;oBACH;AAEA,wBACC,cAAc,0BACb;AACD,4BAAM,IAAI;wBACT,sCACC,MACA,gBACA,WACA,WACA,cACA,kBACA;sBACF;oBACD;AA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D;IACA,aAAc,SAAU;AACvB,UAAK,KAAK,YAAY,GAAI;AACzB,gBAAQ;UACP,sBAAuB,KAAK,OAAQ;QACrC;AACA,eAAO;MACR;AACA,UAAIc,SAAQ,KAAK,eAAgB,OAAQ;AACzC,UAAKA,SAAQ,IAAM,QAAO,WAAYA,MAAM;AAC5C,UAAIX,UAAS,KAAK,iBAAkB,OAAQ;AAC5C,UAAI,OAAO,KAAK,iBAAkB,UAAU,CAAE;AAC9C,UAAI,MAAM,OAAOA,UAAS;AAC1B,UAAK,QAAQ,EAAI,QAAO;AACxB,WAAK,OAAO,kBAAkB,KAAK,cAAcA;AACjD,YAAM,OAAO,KAAK,OAAO;QACxB;QACA,KAAK,cAAcA;QACnB;QACA;MACD;AACA,aAAO,KAAK,IAAK,CAAEQ,OAAO,OAAO,aAAcA,EAAE,CAAE,EAAE,KAAM,EAAG;IAC/D;EACD;AACA,MAAM,aAAa;IAClB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACD;AACA,MAAI,SAAS,OAAO,OAAQ,EAAE,WAAW,MAAM,KAAW,CAAE;AAC5D,MAAM,OAAN,cAAmB,YAAY;IAC9B,YAAa,MAAM,UAAW;AAC7B,YAAM,EAAE,GAAGX,IAAE,IAAI,MAAO,MAAM,QAAS;AACvC,WAAK,eAAeA,IAAE;AACtB,WAAK,eAAeA,IAAE;AACtB,WAAK,kBAAkBA,IAAE;AACzB,WAAK,iBAAiBA,IAAE;AACxB;QACC;QACA;QACA,MACC,IAAI;UACH,EAAE,QAAQ,KAAK,SAAS,KAAK,gBAAgB;UAC7C;QACD;MACF;AACA;QACC;QACA;QACA,MACC,IAAI;UACH,EAAE,QAAQ,KAAK,SAAS,KAAK,eAAe;UAC5C;QACD;MACF;AACA,UAAK,KAAK,iBAAiB,KAAK,KAAK,iBAAiB,GAAI;AACzD,aAAK,qBAAqBA,IAAE;AAC5B;UACC;UACA;UACA,MACC,IAAI;YACH,EAAE,QAAQ,KAAK,SAAS,KAAK,mBAAmB;YAChD;UACD;QACF;MACD;IACD;EACD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AAU,KAAY;IACvB;AAEA,QAAK,MAAiC;AACrC,8BAAyB,MAAMA,OAAM,QAAS;IAC/C;EACD;AAYO,WAASE,qBAAqB,MAAMF,OAAM,QAAS;AACzD,UAAM,EAAE,qBAAqB,qBAAqB,IAAI;UACrD,yBAAU,KAAY;IACvB;AAEA,QAAK,MAAiC;AACrC,2BAAsB,MAAMA,OAAM,MAAO;IAC1C;EACD;AAYO,WAASG,uBAAuB,MAAMH,OAAM,SAAU;AAC5D,UAAM,EAAE,uBAAuB,uBAAuB,IAAI;UACzD,yBAAU,KAAY;IACvB;AAEA,QAAK,MAAiC;AACrC,6BAAwB,MAAMA,OAAM,OAAQ;IAC7C;EACD;;;ACjFA,MAAAI,yBAAgC;",
"names": ["match", "removeAccents", "a", "b", "i", "isMergeableObject", "deepmerge", "a", "b", "i", "Element", "Fragment", "isElement", "i", "n", "s", "x", "x", "y", "i", "checker", "isNode", "module", "exports", "index", "createEvent", "name", "e", "update", "pageResize", "destroy", "autosize", "x", "getComputedStyle", "d", "b", "p", "__", "__assign", "t", "s", "i", "n", "e", "React", "TextareaAutosizeClass", "import_data", "import_core_data", "import_element", "import_compose", "import_hooks", "import_data", "import_data", "reducer_default", "import_data", "import_element", "import_block_editor", "size", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "import_primitives", "import_jsx_runtime", "template", "EMPTY_OBJECT", "select", "coreStore", "postType", "postId", "post", "autosave", "blockEditorStore", "name", "preferencesStore", "deprecated", "template", "import_deprecated", "import_blocks", "import_core_data", "import_block_editor", "import_preferences", "import_i18n", "postId", "post", "postType", "actions", "messages", "noticeMessage", "post", "template", "dispatch", "deprecated", "postType", "postId", "select", "coreStore", "noticesStore", "blockEditorStore", "editorSettings", "apiFetch", "lock", "preferencesStore", "deviceType", "name", "import_core_data", "import_i18n", "import_notices", "import_block_editor", "import_preferences", "import_url", "import_api_fetch", "import_blocks", "import_html_entities", "import_core_data", "import_hooks", "import_i18n", "import_data", "import_element", "import_notices", "import_url", "import_i18n", "import_url", "import_i18n", "post", "p", "template", "import_jsx_runtime", "PERMALINK_POSTNAME_REGEX", "noticesStore", "VStack", "InputControl", "InputControlPrefixWrapper", "InputControlSuffixWrapper", "import_element", "import_i18n", "e", "t", "f", "n", "o", "import_components", "import_i18n", "import_jsx_runtime", "HStack", "import_i18n", "import_i18n", "import_data", "import_core_data", "import_components", "import_private_apis", "lock", "unlock", "import_jsx_runtime", "unlock", "componentsPrivateApis", "select", "coreStore", "import_i18n", "import_i18n", "import_i18n", "import_components", "import_jsx_runtime", "unlock", "patternPrivateApis", "import_i18n", "import_components", "import_core_data", "import_data", "import_element", "import_i18n", "import_notices", "import_jsx_runtime", "unlock", "mediaUtilsPrivateApis", "Truncate", "VStack", "select", "coreStore", "noticesStore", "a", "m", "Text", "import_jsx_runtime", "size", "import_i18n", "import_element", "import_blocks", "import_core_data", "import_block_editor", "import_components", "import_compose", "import_data", "import_html_entities", "import_i18n", "import_jsx_runtime", "postType", "postId", "select", "coreStore", "unlock", "template", "templateId", "BlockPatternsList", "import_i18n", "import_components", "import_data", "import_element", "import_core_data", "import_compose", "import_html_entities", "import_i18n", "import_url", "import_html_entities", "import_i18n", "post", "import_jsx_runtime", "name", "removeAccents", "postId", "select", "coreStore", "tree", "a", "b", "import_data", "import_core_data", "import_i18n", "import_jsx_runtime", "select", "coreStore", "import_i18n", "import_components", "import_element", "import_i18n", "import_jsx_runtime", "VStack", "import_i18n", "import_components", "import_i18n", "import_jsx_runtime", "HStack", "import_i18n", "import_i18n", "import_components", "import_jsx_runtime", "import_i18n", "import_i18n", "import_i18n", "import_element", "import_date", "import_jsx_runtime", "import_i18n", "import_data", "import_core_data", "import_i18n", "import_element", "import_components", "import_data", "import_core_data", "import_jsx_runtime", "select", "coreStore", "HStack", "coreDataStore", "name", "a", "b", "import_i18n", "import_i18n", "post", "import_data", "import_core_data", "import_i18n", "import_notices", "import_element", "import_components", "import_jsx_runtime", "closeModal", "coreStore", "noticesStore", "VStack", "InputControl", "HStack", "import_data", "import_core_data", "import_i18n", "import_notices", "import_element", "import_components", "import_jsx_runtime", "closeModal", "coreStore", "noticesStore", "isTemplate", "VStack", "InputControl", "HStack", "import_data", "import_core_data", "import_i18n", "import_element", "import_patterns", "import_components", "import_notices", "import_jsx_runtime", "PATTERN_TYPES", "unlock", "patternsPrivateApis", "post", "closeModal", "coreStore", "noticesStore", "VStack", "HStack", "import_data", "import_core_data", "import_i18n", "import_notices", "import_element", "import_blocks", "import_components", "import_url", "import_api_fetch", "import_jsx_runtime", "isTemplateRevertable", "template", "noticesStore", "coreStore", "apiFetch", "closeModal", "VStack", "Text", "HStack", "import_i18n", "import_patterns", "import_jsx_runtime", "unlock", "patternsPrivateApis", "closeModal", "__assign", "t", "s", "i", "n", "p", "input", "re", "e", "n", "t", "i", "r", "f", "o", "a", "s", "u", "c", "p", "d", "l", "import_blob", "import_i18n", "name", "import_url", "import_i18n", "post", "import_core_data", "import_i18n", "import_notices", "import_element", "import_data", "import_components", "import_html_entities", "import_jsx_runtime", "closeModal", "noticesStore", "coreStore", "VStack", "Text", "HStack", "post", "import_core_data", "import_i18n", "import_notices", "noticesStore", "coreStore", "post", "import_data", "import_core_data", "import_i18n", "import_notices", "import_element", "import_components", "import_jsx_runtime", "trashPost", "closeModal", "noticesStore", "coreStore", "VStack", "Text", "HStack", "import_i18n", "import_element", "import_components", "import_patterns", "import_html_entities", "import_notices", "import_core_data", "import_data", "noticesStore", "coreStore", "post", "import_jsx_runtime", "PATTERN_TYPES", "unlock", "patternsPrivateApis", "post", "closeModal", "VStack", "Text", "HStack", "import_data", "import_i18n", "import_notices", "import_element", "import_blocks", "import_components", "import_compose", "import_core_data", "import_data", "import_element", "import_i18n", "import_notices", "import_blocks", "import_data", "import_core_data", "select", "coreStore", "import_jsx_runtime", "select", "coreStore", "getTemplatePartIcon", "closeModal", "noticesStore", "VStack", "HStack", "import_jsx_runtime", "closeModal", "noticesStore", "import_i18n", "import_i18n", "import_block_editor", "import_data", "import_core_data", "import_element", "import_data", "import_i18n", "import_core_data", "import_block_editor", "import_notices", "import_patterns", "import_blocks", "import_element", "import_data", "import_compose", "import_block_editor", "import_jsx_runtime", "blockEditorStoreConfig", "import_element", "import_data", "import_core_data", "import_i18n", "import_preferences", "import_compose", "import_blocks", "import_block_editor", "import_i18n", "import_data", "import_html_entities", "import_core_data", "coreStore", "i", "offset", "offset", "i", "import_data", "import_core_data", "import_media_utils", "coreDataStore", "getCurrentPost", "getEditorSettings", "lockPostAutosaving", "unlockPostAutosaving", "lockPostSaving", "unlockPostSaving", "import_url", "import_deprecated", "cleanForSlug", "deprecated", "urlCleanForSlug", "import_media_utils", "import_block_editor", "import_core_data", "import_data", "import_element", "size", "fastDeepEqual", "o", "deepmerge", "size", "head", "i", "import_i18n", "import_blocks", "EMPTY_ARRAY", "name", "isObject", "import_blocks", "import_style_engine", "import_data", "name", "featureSelector", "r", "t", "n", "e", "u", "a", "o", "i", "s", "h", "b", "g", "d", "f", "l", "p", "v", "y", "N", "r", "t", "n", "e", "o", "u", "i", "a", "s", "d", "h", "w", "S", "y", "w", "STYLE_PROPERTY", "name", "ELEMENTS", "presets", "blocksStore", "blockEditorPrivateApis", "isReady", "select", "getEditedEntityRecord", "coreStore", "EMPTY_OBJECT", "select", "RECEIVE_INTERMEDIATE_RESULTS", "coreDataPrivateApis", "coreStore", "postType", "postId", "renderingMode", "deviceType", "preferencesStore", "getBlockTypes", "blocksStore", "getDeviceType", "getBlockAttributes", "blockEditorStore", "x", "index", "y", "undo", "setIsInserterOpened", "getSelectedBlockClientId", "name", "patterns", "fetchLinkSuggestions", "fetchUrlData", "import_data", "import_block_editor", "import_element", "import_data", "import_element", "import_hooks", "select", "getPostBlocksByName", "select", "blockEditorStore", "getBlockOrder", "import_element", "import_data", "import_block_editor", "select", "blockEditorStore", "import_element", "import_hooks", "postType", "import_data", "import_i18n", "import_preferences", "import_notices", "import_block_editor", "import_core_data", "import_components", "import_data", "import_i18n", "import_element", "import_preferences", "import_compose", "import_plugins", "import_components", "import_data", "import_data", "import_deprecated", "import_preferences", "import_deprecated", "deprecated", "name", "dispatch", "preferencesStore", "deprecated", "name", "import_data", "import_deprecated", "import_preferences", "select", "preferencesStore", "deprecated", "modalName", "import_data", "reducer_default", "STORE_NAME", "store", "STORE_NAME", "reducer_default", "actions_exports", "selectors_exports", "import_jsx_runtime", "name", "select", "store", "enableComplementaryArea", "disableComplementaryArea", "import_jsx_runtime", "import_components", "import_components", "import_element", "import_jsx_runtime", "noop", "name", "Component", "import_jsx_runtime", "import_components", "import_jsx_runtime", "import_jsx_runtime", "AnimatePresence", "motion", "enableComplementaryArea", "disableComplementaryArea", "store", "name", "isReady", "setIsReady", "select", "getActiveComplementaryArea", "isComplementaryAreaLoading", "isItemPinned", "preferencesStore", "viewportStore", "pinItem", "unpinItem", "import_element", "import_element", "import_jsx_runtime", "import_element", "import_components", "import_i18n", "import_compose", "import_jsx_runtime", "ANIMATION_DURATION", "actions", "AnimatePresence", "motion", "import_html_entities", "import_data", "import_patterns", "import_core_data", "import_jsx_runtime", "patternsPrivateApis", "select", "store", "postType", "getCurrentPostType", "getCurrentPostId", "coreStore", "closeModal", "import_data", "import_patterns", "import_core_data", "import_jsx_runtime", "patternsPrivateApis", "modalName", "select", "store", "postType", "getCurrentPostType", "getCurrentPostId", "coreStore", "closeModal", "isPublishSidebarEnabled", "select", "preferencesStore", "isListViewOpened", "getCurrentPostType", "getEditorSettings", "getSettings", "blockEditorStore", "coreStore", "getActiveComplementaryArea", "store", "noticesStore", "__unstableSaveForPreview", "setIsListViewOpened", "switchEditorMode", "toggleDistractionFree", "toggleSpotlightMode", "toggleTopToolbar", "openModal", "enableComplementaryArea", "disableComplementaryArea", "getCurrentPostId", "postId", "postType", "modalName", "templateId", "getRenderingMode", "getCurrentTemplateId", "editorSettings", "template", "revertTemplate", "import_i18n", "import_block_editor", "import_data", "import_element", "import_jsx_runtime", "blockEditorPrivateApis", "name", "select", "import_components", "import_i18n", "import_element", "import_block_editor", "import_data", "import_core_data", "import_blocks", "import_preferences", "import_jsx_runtime", "postType", "select", "blockEditorStore", "getCurrentPostType", "getRenderingMode", "coreStore", "postId", "getCurrentPostId", "BlockPatternsList", "preferencesStore", "isEditedPostDirty", "isEditedPostEmpty", "isModalActive", "store", "import_components", "import_i18n", "import_keyboard_shortcuts", "import_data", "import_i18n", "import_element", "import_jsx_runtime", "index", "Fragment", "import_data", "import_jsx_runtime", "name", "select", "keyboardShortcutsStore", "import_jsx_runtime", "index", "select", "keyboardShortcutsStore", "isModalActive", "store", "openModal", "closeModal", "import_components", "import_i18n", "import_element", "import_block_editor", "import_data", "import_blocks", "import_core_data", "import_jsx_runtime", "select", "coreStore", "templateId", "useStartPatterns", "patterns", "getCurrentPostType", "getCurrentPostId", "postId", "postType", "injectThemeAttributeInBlockTemplateContent", "PatternSelection", "BlockPatternsList", "import_keyboard_shortcuts", "import_data", "import_block_editor", "select", "getBlockSelectionStart", "blockEditorStore", "getActiveComplementaryArea", "store", "enableComplementaryArea", "disableComplementaryArea", "redo", "undo", "savePost", "setIsListViewOpened", "switchEditorMode", "toggleDistractionFree", "isEditedPostDirty", "isPostSavingLocked", "isListViewOpened", "getEditorMode", "import_data", "import_block_editor", "import_data", "import_block_editor", "import_components", "import_i18n", "import_jsx_runtime", "getBlocks", "blockEditorStore", "replaceBlocks", "select", "import_data", "import_block_editor", "import_components", "import_blocks", "import_i18n", "import_element", "import_notices", "import_core_data", "import_jsx_runtime", "replaceBlocks", "blockEditorStore", "noticesStore", "select", "coreStore", "import_jsx_runtime", "select", "getBlocksByClientId", "blockEditorStore", "import_jsx_runtime", "blockEditorPrivateApis", "editPatternsPrivateApis", "noop", "post", "template", "editorSettings", "isReady", "select", "getEditorSettings", "getEditorSelection", "getRenderingMode", "__unstableIsEditorReady", "getDefaultRenderingMode", "coreStore", "match", "updatePostLock", "setupEditor", "updateEditorSettings", "setCurrentTemplateId", "setEditedPost", "setRenderingMode", "noticesStore", "import_core_data", "import_data", "import_element", "import_components", "import_blocks", "import_data", "import_block_editor", "import_element", "import_compose", "import_element", "import_element", "import_jsx_runtime", "import_components", "import_i18n", "import_data", "import_core_data", "import_jsx_runtime", "import_components", "import_jsx_runtime", "Item", "HStack", "import_components", "import_i18n", "import_block_editor", "o", "t", "r", "n", "a", "i", "e", "v", "u", "d", "c", "import_element", "import_data", "import_core_data", "import_i18n", "EMPTY_ARRAY", "select", "coreStore", "w", "import_private_apis", "lock", "unlock", "import_jsx_runtime", "unlock", "blockEditorPrivateApis", "ItemGroup", "import_components", "import_element", "import_components", "import_i18n", "a", "b", "i", "import_jsx_runtime", "motion", "import_components", "import_jsx_runtime", "index", "motion", "import_components", "import_compose", "import_element", "import_jsx_runtime", "isReady", "motion", "import_jsx_runtime", "motion", "HStack", "VStack", "index", "import_jsx_runtime", "select", "coreStore", "VStack", "ItemGroup", "HStack", "Spacer", "import_blocks", "import_i18n", "import_components", "import_data", "import_element", "import_block_editor", "import_compose", "import_a11y", "import_blocks", "import_data", "import_components", "import_jsx_runtime", "name", "select", "blocksStore", "ItemGroup", "index", "import_components", "import_i18n", "import_jsx_runtime", "VStack", "View", "Spacer", "HStack", "Heading", "Text", "import_jsx_runtime", "useHasDimensionsPanel", "useHasTypographyPanel", "useSettingsForBlockElement", "useHasColorPanel", "unlock", "blockEditorPrivateApis", "select", "blocksStore", "HStack", "Text", "import_blocks", "import_block_editor", "import_element", "import_data", "import_core_data", "import_components", "import_i18n", "import_block_editor", "import_blocks", "import_components", "import_element", "import_jsx_runtime", "name", "Spacer", "import_components", "import_jsx_runtime", "Heading", "import_jsx_runtime", "BACKGROUND_BLOCK_DEFAULT_VALUES", "hasSplitBorders", "useHasDimensionsPanel", "useHasTypographyPanel", "useHasBorderPanel", "useSettingsForBlockElement", "useHasColorPanel", "useHasBackgroundPanel", "unlock", "blockEditorPrivateApis", "name", "setStyle", "select", "coreStore", "s", "VStack", "import_i18n", "import_components", "import_element", "import_components", "import_jsx_runtime", "Spacer", "import_i18n", "import_components", "import_jsx_runtime", "HStack", "VStack", "ItemGroup", "import_components", "import_components", "import_jsx_runtime", "HStack", "import_components", "import_element", "import_keycodes", "import_i18n", "import_jsx_runtime", "import_jsx_runtime", "VStack", "Grid", "index", "import_i18n", "import_components", "import_element", "import_element", "import_data", "import_core_data", "import_i18n", "import_api_fetch", "import_core_data", "coreDataStore", "apiFetch", "import_components", "import_i18n", "File", "kebabCase", "unlock", "componentsPrivateApis", "font", "f", "index", "setImmutably", "font", "f", "activatedFont", "import_jsx_runtime", "coreStore", "select", "setImmutably", "f", "a", "b", "font", "import_i18n", "import_components", "import_core_data", "import_data", "import_components", "import_core_data", "import_data", "import_element", "import_i18n", "import_i18n", "import_components", "import_components", "import_element", "import_jsx_runtime", "font", "Text", "import_jsx_runtime", "font", "Text", "import_element", "import_components", "import_jsx_runtime", "font", "a", "b", "import_jsx_runtime", "select", "coreStore", "f", "a", "b", "font", "VStack", "Text", "Heading", "Spacer", "i", "HStack", "ConfirmDialog", "import_element", "import_components", "import_compose", "import_i18n", "import_core_data", "font", "font", "import_i18n", "import_components", "import_jsx_runtime", "Heading", "Spacer", "Text", "import_element", "import_components", "import_jsx_runtime", "font", "import_jsx_runtime", "font", "HStack", "VStack", "Heading", "Text", "Spacer", "i", "e", "import_i18n", "import_components", "import_element", "define", "r", "e", "n", "t", "o", "i", "f", "c", "__require", "u", "a", "p", "require", "module", "exports", "index", "x", "v", "j", "offset", "shift", "_x", "len", "len2", "define", "r", "e", "n", "t", "o", "i", "f", "c", "__require", "u", "a", "p", "require", "module", "exports", "size", "l", "__", "c2", "max", "s2", "k", "head", "min", "Event", "e", "l", "v", "name", "n", "t", "i", "p", "font", "createTable", "offset", "size", "d", "OS2", "h", "s", "r", "w", "b", "record", "str", "index", "f", "SVG", "a", "import_components", "kebabCase", "unlock", "componentsPrivateApis", "import_jsx_runtime", "font", "name", "VStack", "index", "Text", "import_jsx_runtime", "unlock", "componentsPrivateApis", "name", "select", "coreStore", "import_i18n", "import_components", "import_element", "import_jsx_runtime", "font", "Item", "HStack", "import_jsx_runtime", "f", "a", "b", "VStack", "HStack", "ItemGroup", "font", "Text", "import_i18n", "import_components", "import_jsx_runtime", "VStack", "HStack", "ItemGroup", "import_jsx_runtime", "VStack", "import_i18n", "import_components", "import_element", "import_block_editor", "import_jsx_runtime", "useSettingsForBlockElement", "StylesTypographyPanel", "unlock", "blockEditorPrivateApis", "setStyle", "import_jsx_runtime", "name", "import_jsx_runtime", "Spacer", "ToggleGroupControl", "ToggleGroupControlOption", "import_i18n", "import_components", "import_block_editor", "import_components", "import_i18n", "import_element", "import_components", "import_jsx_runtime", "import_jsx_runtime", "name", "VStack", "ItemGroup", "HStack", "ZStack", "index", "import_jsx_runtime", "useSettingsForBlockElement", "StylesColorPanel", "unlock", "blockEditorPrivateApis", "setStyle", "VStack", "import_i18n", "import_components", "import_compose", "import_components", "import_i18n", "import_components", "import_components", "import_jsx_runtime", "index", "import_jsx_runtime", "firstFrameVariants", "motion", "HStack", "import_jsx_runtime", "propertiesToFilter", "VStack", "Grid", "index", "import_jsx_runtime", "name", "VStack", "PaletteEdit", "import_compose", "import_components", "import_i18n", "import_jsx_runtime", "mobilePopoverProps", "noop", "name", "VStack", "PaletteEdit", "Spacer", "import_jsx_runtime", "Tabs", "unlock", "componentsPrivateApis", "name", "import_i18n", "import_block_editor", "import_components", "import_block_editor", "import_jsx_runtime", "StylesBackgroundPanel", "unlock", "blockEditorPrivateApis", "setStyle", "StylesBackgroundPanel", "import_jsx_runtime", "useHasBackgroundPanel", "unlock", "blockEditorPrivateApis", "Text", "import_components", "import_i18n", "import_element", "import_components", "import_i18n", "import_jsx_runtime", "ConfirmDialog", "import_jsx_runtime", "unlock", "componentsPrivateApis", "VStack", "HStack", "ItemGroup", "import_components", "import_i18n", "import_element", "defaultShadow", "x", "y", "import_jsx_runtime", "Menu", "unlock", "componentsPrivateApis", "b", "s", "HStack", "Spacer", "ConfirmDialog", "InputControl", "index", "p", "i", "VStack", "ItemGroup", "ShadowItem", "DropdownContentWrapper", "ToggleGroupControl", "ToggleGroupControlOption", "Grid", "UnitControl", "import_jsx_runtime", "import_i18n", "import_block_editor", "import_block_editor", "import_element", "import_jsx_runtime", "useSettingsForBlockElement", "StylesDimensionsPanel", "unlock", "blockEditorPrivateApis", "setStyle", "import_jsx_runtime", "useHasDimensionsPanel", "useSettingsForBlockElement", "unlock", "blockEditorPrivateApis", "import_components", "import_i18n", "import_i18n", "import_components", "import_core_data", "import_data", "import_element", "import_components", "import_i18n", "import_jsx_runtime", "select", "coreStore", "Grid", "index", "import_jsx_runtime", "VStack", "import_jsx_runtime", "import_i18n", "import_components", "import_block_editor", "import_jsx_runtime", "StylesAdvancedPanel", "unlock", "blockEditorPrivateApis", "setStyle", "import_i18n", "import_components", "import_element", "import_data", "import_core_data", "import_element", "EMPTY_ARRAY", "select", "coreStore", "import_i18n", "import_components", "import_date", "import_core_data", "import_data", "import_keycodes", "import_jsx_runtime", "select", "coreStore", "index", "import_components", "import_i18n", "import_jsx_runtime", "HStack", "Text", "import_jsx_runtime", "ConfirmDialog", "import_i18n", "import_components", "import_element", "import_components", "import_i18n", "import_jsx_runtime", "ConfirmDialog", "import_jsx_runtime", "Menu", "unlock", "componentsPrivateApis", "VStack", "HStack", "ItemGroup", "size", "FontSizes", "index", "View", "Spacer", "import_i18n", "import_components", "import_element", "import_block_editor", "import_i18n", "import_jsx_runtime", "font", "import_components", "import_i18n", "import_jsx_runtime", "ConfirmDialog", "import_components", "import_i18n", "import_element", "import_jsx_runtime", "VStack", "InputControl", "HStack", "import_components", "import_jsx_runtime", "useCustomUnits", "parseQuantityAndUnitFromRawValue", "UnitControl", "Spacer", "import_jsx_runtime", "Menu", "unlock", "componentsPrivateApis", "size", "VStack", "HStack", "Spacer", "View", "import_jsx_runtime", "Fragment", "index", "name", "select", "blocksStore", "import_jsx_runtime", "Component", "ColorVariations", "TypographyVariations", "import_jsx_runtime", "import_media_utils", "import_data", "import_element", "import_block_editor", "import_compose", "select", "getSelectedBlockClientId", "getBlockName", "blockEditorStore", "import_element", "import_core_data", "import_data", "import_block_editor", "cleanEmptyObject", "blockEditorPrivateApis", "useGlobalStylesUserConfig", "isReady", "select", "getEditedEntityRecord", "coreStore", "useGlobalStylesBaseConfig", "useStyle", "useSetting", "import_jsx_runtime", "select", "getEditorSettings", "coreStore", "editorSettings", "isReady", "import_jsx_runtime", "template", "post", "useStyle", "select", "coreStore", "templateId", "name", "postType", "isReady", "coreStore", "actions", "fields", "template", "select", "dispatch", "coreStore", "noticesStore", "preferencesStore", "name", "blockEditorStore", "revertTemplate", "apiFetch", "postType", "import_block_editor", "import_data", "import_core_data", "import_preferences", "EMPTY_ARRAY", "name", "select", "blockEditorStore", "postType", "coreStore", "postId", "fastDeepEqual", "getEntityActions", "isEntityReady", "getEntityFields", "getBlockName", "preferencesStore", "reducer_default", "import_jsx_runtime", "BlockEdit", "postType", "select", "meta", "import_hooks", "import_element", "import_data", "import_core_data", "import_jsx_runtime", "select", "coreStore", "import_element", "import_compose", "import_data", "import_core_data", "select", "coreStore", "isEditedPostDirty", "isEditedPostAutosaveable", "isAutosavingPost", "getEditorSettings", "dispatch", "autosave", "import_i18n", "import_data", "import_components", "import_block_editor", "import_keycodes", "import_core_data", "import_commands", "import_element", "import_compose", "import_html_entities", "import_i18n", "import_data", "import_core_data", "postId", "select", "coreStore", "import_components", "import_keycodes", "import_i18n", "import_data", "import_compose", "import_preferences", "import_element", "import_components", "import_i18n", "import_block_editor", "import_data", "import_element", "import_keycodes", "import_media_utils", "import_core_data", "import_i18n", "import_blocks", "import_i18n", "import_blocks", "import_components", "import_block_editor", "import_jsx_runtime", "Grid", "import_components", "import_jsx_runtime", "Grid", "import_jsx_runtime", "name", "import_element", "import_data", "import_blocks", "import_data", "import_element", "useSetting", "select", "getEditorSettings", "blocksStore", "getEditorSettings", "updateEditorSettings", "import_jsx_runtime", "ExperimentalBlockEditorProvider", "blockEditorPrivateApis", "Tabs", "componentsPrivateApis", "useMultipleOriginColorsAndGradients", "useStyle", "select", "blockEditorStore", "editorSettings", "coreStore", "Iframe", "EditorStyles", "import_jsx_runtime", "style_book_default", "import_components", "import_block_editor", "import_data", "import_element", "import_jsx_runtime", "ExperimentalBlockEditorProvider", "blockEditorPrivateApis", "isObjectEmpty", "select", "blockEditorStore", "match", "Iframe", "EditorStyles", "import_element", "import_components", "import_i18n", "import_keycodes", "import_components", "import_jsx_runtime", "motion", "import_jsx_runtime", "import_jsx_runtime", "showStylebook", "stylesPath", "select", "getStylesPath", "getShowStylebook", "preferencesStore", "resetStylesNavigation", "setStylesPath", "setIsListViewOpened", "style_book_default", "import_data", "import_html_entities", "import_block_editor", "import_core_data", "select", "getBlockAttributes", "getBlockName", "blockEditorStore", "coreStore", "import_jsx_runtime", "motion", "blockEditorStore", "postId", "postType", "select", "getCurrentPostType", "getCurrentPostId", "getEditorSettings", "getRenderingMode", "coreStore", "getStylesPath", "getShowStylebook", "commandsStore", "isTemplate", "AnimatePresence", "Text", "stripHTML", "import_i18n", "import_data", "import_element", "import_block_editor", "import_core_data", "import_components", "import_jsx_runtime", "import_jsx_runtime", "selectBlock", "blockEditorStore", "select", "getEditedPostAttribute", "coreStore", "postType", "getClientIdsWithDescendants", "getBlock", "getClientIdsOfDescendants", "import_data", "import_block_editor", "select", "getGlobalBlockCount", "blockEditorStore", "import_element", "import_data", "import_i18n", "import_block_editor", "import_keyboard_shortcuts", "import_keycodes", "import_jsx_runtime", "keyboardShortcutsStore", "import_i18n", "import_components", "import_data", "import_keycodes", "import_element", "import_jsx_runtime", "select", "redo", "redo_default", "import_i18n", "import_components", "import_data", "import_keycodes", "import_element", "import_jsx_runtime", "select", "undo", "undo_default", "import_components", "import_data", "import_notices", "import_components", "import_i18n", "import_data", "import_element", "import_block_editor", "import_jsx_runtime", "select", "blockEditorStore", "setTemplateValidity", "synchronizeTemplate", "ConfirmDialog", "import_jsx_runtime", "select", "noticesStore", "import_components", "import_data", "import_notices", "import_jsx_runtime", "select", "noticesStore", "import_components", "import_i18n", "import_element", "import_compose", "import_data", "import_i18n", "import_data", "import_components", "import_core_data", "import_components", "import_i18n", "import_data", "import_core_data", "import_html_entities", "import_jsx_runtime", "name", "hasPostMetaChanges", "select", "template", "coreStore", "import_jsx_runtime", "select", "coreStore", "import_data", "import_core_data", "import_element", "select", "coreStore", "name", "import_jsx_runtime", "saveDirtyEntities", "name", "useDialog", "import_element", "import_i18n", "import_components", "import_data", "import_compose", "import_hooks", "import_jsx_runtime", "HStack", "Text", "import_element", "import_compose", "import_data", "import_i18n", "import_blocks", "import_notices", "import_jsx_runtime", "postId", "isEditedPostNew", "select", "getEditedPostAttribute", "noticesStore", "editPost", "resetEditorBlocks", "autosave", "import_data", "import_core_data", "select", "getEditedPostAttribute", "coreStore", "postType", "check_default", "import_i18n", "import_components", "import_data", "import_element", "import_data", "import_core_data", "postType", "select", "getEditedPostAttribute", "coreStore", "import_jsx_runtime", "select", "editPost", "value", "NumberControl", "import_data", "import_core_data", "import_remove_accents", "import_i18n", "import_components", "import_compose", "import_element", "import_data", "import_html_entities", "import_core_data", "import_block_editor", "import_url", "import_components", "import_element", "import_jsx_runtime", "HStack", "import_html_entities", "buildTermsTree", "import_jsx_runtime", "post", "getItemPriority", "name", "removeAccents", "PageAttributesParent", "editPost", "select", "coreStore", "getCurrentPostId", "getEditedPostAttribute", "postId", "tree", "a", "b", "buildTermsTree", "InspectorPopoverHeader", "parent_default", "import_jsx_runtime", "postType", "select", "getEditedPostAttribute", "isEditorPanelEnabled", "coreStore", "check_default", "import_i18n", "import_components", "import_data", "import_core_data", "import_block_editor", "import_element", "import_notices", "import_data", "import_element", "import_blocks", "import_components", "import_i18n", "import_jsx_runtime", "select", "getEditorSettings", "getCurrentTemplateId", "createTemplate", "VStack", "HStack", "import_data", "import_element", "import_core_data", "select", "getCurrentPostId", "getCurrentPostType", "postType", "postId", "coreStore", "template", "post", "import_jsx_runtime", "select", "template", "coreStore", "getEditorSettings", "editorSettings", "editPost", "noticesStore", "InspectorPopoverHeader", "import_components", "import_plugins", "import_data", "import_components", "import_data", "import_preferences", "import_jsx_runtime", "preferencesPrivateApis", "toggleEditorPanelEnabled", "select", "isEditorPanelEnabled", "isEditorPanelRemoved", "import_jsx_runtime", "Fill", "Slot", "import_jsx_runtime", "Fill", "Slot", "name", "select", "isEditorPanelOpened", "isEditorPanelEnabled", "toggleEditorPanelOpened", "warning", "import_block_editor", "import_components", "import_compose", "import_jsx_runtime", "import_components", "import_plugins", "import_jsx_runtime", "import_plugins", "import_components", "import_jsx_runtime", "Fill", "Slot", "import_components", "import_jsx_runtime", "Fill", "Slot", "import_components", "import_plugins", "import_jsx_runtime", "Fill", "Slot", "import_components", "import_plugins", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "import_data", "import_core_data", "import_data", "import_html_entities", "import_components", "import_element", "import_i18n", "import_core_data", "import_notices", "import_preferences", "import_element", "import_html_entities", "import_block_editor", "import_components", "import_i18n", "import_data", "import_core_data", "import_blocks", "import_remove_accents", "removeAccents", "template", "import_jsx_runtime", "postType", "postId", "coreStore", "template", "BlockPatternsList", "import_components", "import_i18n", "import_data", "import_core_data", "import_jsx_runtime", "postType", "postId", "coreStore", "import_components", "import_i18n", "import_data", "import_core_data", "import_element", "import_jsx_runtime", "select", "coreStore", "import_jsx_runtime", "getEditorSettings", "select", "getRenderingMode", "getCurrentPost", "editorSettings", "preferencesStore", "template", "coreStore", "noticesStore", "setRenderingMode", "setDefaultRenderingMode", "import_jsx_runtime", "templateId", "select", "getCurrentTemplateId", "getEditorSettings", "postType", "coreStore", "import_data", "import_core_data", "import_compose", "import_element", "import_data", "import_i18n", "import_components", "import_i18n", "import_element", "import_data", "import_html_entities", "import_core_data", "select", "coreStore", "getEditedPostAttribute", "import_jsx_runtime", "editPost", "import_i18n", "import_data", "import_components", "import_jsx_runtime", "editPost", "import_jsx_runtime", "select", "coreStore", "import_data", "import_jsx_runtime", "select", "post", "import_i18n", "import_components", "import_element", "import_html_entities", "import_block_editor", "import_data", "import_core_data", "import_jsx_runtime", "select", "coreStore", "PostAuthor", "InspectorPopoverHeader", "import_i18n", "import_components", "import_data", "import_jsx_runtime", "select", "editPost", "VStack", "import_i18n", "import_components", "import_data", "import_element", "import_block_editor", "import_core_data", "import_i18n", "import_components", "import_data", "import_jsx_runtime", "select", "editPost", "import_jsx_runtime", "PANEL_NAME", "InspectorPopoverHeader", "VStack", "select", "getEditedPostAttribute", "coreStore", "postType", "isEditorPanelEnabled", "import_i18n", "import_components", "import_data", "import_element", "import_html_entities", "import_jsx_runtime", "select", "getCurrentPostType", "getEditedPostAttribute", "postType", "editPost", "updatePost", "import_jsx_runtime", "check_default", "import_i18n", "import_components", "import_data", "import_element", "import_block_editor", "import_core_data", "import_html_entities", "import_components", "import_jsx_runtime", "Fill", "Slot", "import_jsx_runtime", "PANEL_NAME", "postType", "select", "isEditorPanelOpened", "isEditorPanelEnabled", "getCurrentPostType", "toggleEditorPanelOpened", "check_default", "getCurrentPostId", "getEditedPostAttribute", "isTemplateOrTemplatePart", "template", "coreStore", "Text", "VStack", "InspectorPopoverHeader", "import_i18n", "import_hooks", "import_components", "import_blob", "import_element", "import_compose", "import_data", "import_block_editor", "import_core_data", "import_data", "import_core_data", "postType", "select", "coreStore", "import_jsx_runtime", "check_default", "import_jsx_runtime", "postId", "postType", "getSettings", "blockEditorStore", "check_default", "HStack", "select", "coreStore", "getCurrentPostId", "getEditedPostAttribute", "dispatch", "editPost", "import_i18n", "import_components", "import_data", "import_core_data", "import_jsx_runtime", "PANEL_NAME", "postType", "select", "getEditedPostAttribute", "isEditorPanelEnabled", "isEditorPanelOpened", "coreStore", "toggleEditorPanelOpened", "check_default", "import_i18n", "import_components", "import_data", "import_compose", "import_core_data", "import_data", "import_jsx_runtime", "select", "import_jsx_runtime", "a", "b", "select", "getEditedPostAttribute", "getSuggestedPostFormat", "coreStore", "editPost", "import_i18n", "import_components", "import_data", "import_url", "import_data", "import_jsx_runtime", "select", "getCurrentPostLastRevisionId", "getCurrentPostRevisionsCount", "check_default", "import_jsx_runtime", "select", "getCurrentPostLastRevisionId", "getCurrentPostRevisionsCount", "check_default", "import_components", "import_jsx_runtime", "check_default", "panel_default", "import_i18n", "import_components", "import_data", "import_url", "import_element", "import_hooks", "import_compose", "import_core_data", "import_jsx_runtime", "autosave", "updatePostLock", "postId", "postType", "select", "isPostLocked", "isPostLockTakeover", "getPostLockUser", "getCurrentPostId", "getCurrentPostType", "getActivePostLock", "getEditedPostAttribute", "getEditedPostPreviewLink", "getEditorSettings", "coreStore", "HStack", "import_i18n", "import_components", "import_data", "import_data", "select", "isCurrentPostPublished", "getCurrentPost", "check_default", "import_jsx_runtime", "select", "editPost", "check_default", "import_element", "import_components", "import_i18n", "import_data", "import_hooks", "import_core_data", "import_jsx_runtime", "postId", "select", "coreStore", "postType", "__unstableSaveForPreview", "import_components", "import_element", "import_data", "import_compose", "import_i18n", "import_data", "import_compose", "hasNonPostEntityChanges", "select", "isCurrentPostPublished", "isEditedPostBeingScheduled", "isSavingPost", "isPublishingPost", "getCurrentPost", "getCurrentPostType", "isAutosavingPost", "getPostEdits", "getEditedPostAttribute", "import_jsx_runtime", "noop", "hasNonPostEntityChanges", "postType", "postId", "isPostSavingLocked", "isSavingNonPostEntityChanges", "select", "isSavingPost", "isAutosavingPost", "isEditedPostBeingScheduled", "getEditedPostVisibility", "isCurrentPostPublished", "isEditedPostSaveable", "isEditedPostPublishable", "getCurrentPost", "getCurrentPostType", "getCurrentPostId", "getEditedPostAttribute", "getPostEdits", "dispatch", "editPost", "savePost", "import_i18n", "import_element", "import_components", "import_data", "import_compose", "import_core_data", "import_i18n", "import_components", "import_data", "import_url", "import_core_data", "import_html_entities", "import_i18n", "import_element", "import_components", "import_compose", "import_data", "import_block_editor", "import_i18n", "import_jsx_runtime", "select", "editPost", "InspectorPopoverHeader", "VStack", "import_data", "select", "offset", "import_date", "import_i18n", "import_data", "import_block_editor", "import_element", "import_core_data", "import_jsx_runtime", "blockEditorPrivateApis", "postType", "select", "editPost", "coreStore", "import_i18n", "import_date", "import_data", "select", "import_i18n", "import_element", "import_data", "import_components", "import_core_data", "import_i18n", "import_element", "import_components", "import_data", "import_core_data", "import_compose", "import_a11y", "import_notices", "import_components", "import_data", "import_core_data", "import_jsx_runtime", "DEFAULT_QUERY", "select", "coreStore", "import_jsx_runtime", "EMPTY_ARRAY", "DEFAULT_QUERY", "select", "getCurrentPost", "getEditedPostAttribute", "coreStore", "post", "editPost", "noticesStore", "name", "n", "VStack", "import_jsx_runtime", "select", "coreStore", "postType", "import_components", "import_data", "import_i18n", "import_core_data", "import_jsx_runtime", "select", "getEditedPostAttribute", "getSuggestedPostFormat", "coreStore", "editPost", "import_i18n", "import_data", "import_components", "import_core_data", "import_element", "import_i18n", "import_element", "import_notices", "import_components", "import_data", "import_compose", "import_core_data", "import_a11y", "import_html_entities", "import_jsx_runtime", "componentsPrivateApis", "coreDataPrivateApis", "DEFAULT_QUERY", "EMPTY_ARRAY", "name", "select", "getCurrentPost", "getEditedPostAttribute", "coreStore", "post", "editPost", "buildTermsTree", "noticesStore", "i", "import_jsx_runtime", "select", "postType", "coreStore", "import_components", "import_data", "import_i18n", "import_block_editor", "import_element", "import_blob", "import_url", "import_jsx_runtime", "selectBlock", "blockEditorStore", "motion", "mediaUpload", "select", "updateBlockAttributes", "AnimatePresence", "import_jsx_runtime", "select", "getCurrentPost", "isEditedPostBeingScheduled", "coreStore", "import_components", "import_i18n", "import_element", "import_data", "import_url", "import_html_entities", "import_compose", "import_core_data", "import_jsx_runtime", "post", "CopyButton", "postType", "select", "getEditedPostAttribute", "getCurrentPost", "isCurrentPostScheduled", "coreStore", "import_jsx_runtime", "isPublishSidebarEnabled", "isSavingNonPostEntityChanges", "select", "coreStore", "getCurrentPost", "getCurrentPostId", "getEditedPostAttribute", "isCurrentPostPublished", "isCurrentPostScheduled", "isEditedPostBeingScheduled", "isEditedPostDirty", "isAutosavingPost", "isSavingPost", "postType", "dispatch", "disablePublishSidebar", "enablePublishSidebar", "import_components", "import_compose", "import_data", "import_element", "import_i18n", "import_keycodes", "import_preferences", "import_components", "import_i18n", "import_data", "import_element", "import_core_data", "import_block_editor", "import_compose", "import_i18n", "import_components", "import_data", "import_data", "postType", "select", "post", "import_jsx_runtime", "select", "editPost", "import_jsx_runtime", "postId", "postType", "select", "getEditedPostAttribute", "getCurrentPostId", "getCurrentPostType", "getCurrentPost", "coreStore", "updatePost", "InspectorPopoverHeader", "VStack", "import_jsx_runtime", "select", "isEditedPostNew", "isCurrentPostPublished", "isCurrentPostScheduled", "isEditedPostDirty", "isSavingPost", "isEditedPostSaveable", "getCurrentPost", "isAutosavingPost", "getEditedPostAttribute", "getPostEdits", "preferencesStore", "savePost", "getAnimateClassName", "import_data", "select", "import_components", "import_i18n", "import_element", "import_data", "import_jsx_runtime", "postType", "select", "import_components", "import_i18n", "import_data", "import_element", "import_deprecated", "import_jsx_runtime", "deprecated", "editPost", "savePost", "select", "isSavingPost", "isCurrentPostPublished", "isCurrentPostScheduled", "ConfirmDialog", "import_data", "import_i18n", "import_jsx_runtime", "postType", "select", "getEditedPostAttribute", "meta", "import_element", "import_data", "import_core_data", "import_jsx_runtime", "identity", "x", "postType", "select", "coreStore", "import_data", "import_core_data", "select", "postType", "coreStore", "import_components", "import_data", "import_jsx_runtime", "select", "isEditorPanelEnabled", "isEditorPanelOpened", "toggleEditorPanelOpened", "PostTaxonomies", "import_i18n", "import_core_data", "import_element", "import_blocks", "import_data", "import_compose", "import_components", "import_jsx_runtime", "select", "coreStore", "getCurrentPostType", "getCurrentPostId", "Textarea", "import_i18n", "import_element", "import_html_entities", "import_data", "import_block_editor", "import_keycodes", "import_blocks", "import_rich_text", "import_compose", "import_dom", "import_element", "import_data", "isCleanNewPost", "select", "name", "import_data", "editPost", "select", "getEditedPostAttribute", "import_jsx_runtime", "select", "getSettings", "blockEditorStore", "clearSelectedBlock", "insertBlocks", "insertDefaultBlock", "useRichText", "stripHTML", "import_components", "import_i18n", "import_html_entities", "import_data", "import_block_editor", "import_element", "import_jsx_runtime", "select", "getSettings", "blockEditorStore", "import_i18n", "import_components", "import_data", "import_element", "import_data", "import_core_data", "select", "isEditedPostNew", "getCurrentPostId", "getCurrentPostType", "coreStore", "postType", "postId", "import_jsx_runtime", "postId", "select", "store", "trashPost", "ConfirmDialog", "import_data", "import_url", "import_element", "import_block_editor", "import_i18n", "import_components", "import_notices", "import_core_data", "import_compose", "import_jsx_runtime", "select", "post", "postType", "coreStore", "editPost", "noticesStore", "InspectorPopoverHeader", "VStack", "InputControl", "InputControlPrefixWrapper", "InputControlSuffixWrapper", "import_data", "import_core_data", "select", "postType", "coreStore", "post", "import_data", "import_url", "select", "import_element", "import_data", "import_components", "import_i18n", "import_url", "import_core_data", "import_jsx_runtime", "select", "getCurrentPostId", "coreStore", "getCurrentPost", "import_data", "select", "import_i18n", "import_components", "import_data", "import_element", "import_block_editor", "import_i18n", "import_data", "import_block_editor", "import_data", "import_i18n", "import_jsx_runtime", "select", "wordCount", "import_data", "import_i18n", "import_wordcount", "import_element", "import_jsx_runtime", "select", "wordCount", "import_data", "import_wordcount", "select", "characterCount", "import_jsx_runtime", "select", "getGlobalBlockCount", "blockEditorStore", "panel_default", "import_jsx_runtime", "select", "blockEditorStore", "panel_default", "import_i18n", "import_element", "import_data", "import_core_data", "coreStore", "import_deprecated", "import_element", "import_block_editor", "import_jsx_runtime", "name", "Component", "deprecated", "RootRichText", "RootAutocomplete", "RootAlignmentToolbar", "RootBlockAlignmentToolbar", "RootBlockControls", "RootBlockEdit", "BlockEditorKeyboardShortcuts", "RootBlockEditorKeyboardShortcuts", "RootBlockFormatControls", "BlockIcon", "RootBlockIcon", "RootBlockInspector", "BlockList", "RootBlockList", "RootBlockMover", "RootBlockNavigationDropdown", "RootBlockSelectionClearer", "RootBlockSettingsMenu", "RootBlockTitle", "RootBlockToolbar", "ColorPalette", "RootColorPalette", "RootContrastChecker", "RootCopyHandler", "RootDefaultBlockAppender", "RootFontSizePicker", "RootInserter", "RootInnerBlocks", "RootInspectorAdvancedControls", "RootInspectorControls", "RootPanelColorSettings", "RootPlainText", "RootRichTextShortcut", "RootRichTextToolbarButton", "__unstableRootRichTextInputEvent", "RootMediaPlaceholder", "MediaUpload", "RootMediaUpload", "MediaUploadCheck", "RootMediaUploadCheck", "RootMultiSelectScrollIntoView", "RootNavigableToolbar", "RootObserveTyping", "RootSkipToSelectedBlock", "RootURLInput", "RootURLInputButton", "RootURLPopover", "RootWarning", "RootWritingFlow", "rootCreateCustomColorsHOC", "getColorClassName", "rootGetColorClassName", "rootGetColorObjectByAttributeValues", "rootGetColorObjectByColorValue", "rootGetFontSize", "rootGetFontSizeClass", "rootWithColorContext", "rootWithColors", "rootWithFontSizes", "import_element", "import_hooks", "import_deprecated", "import_media_utils", "import_jsx_runtime", "mediaUtilsPrivateApis", "deprecated", "import_hooks", "import_patterns", "import_compose", "import_block_editor", "import_data", "import_blocks", "import_jsx_runtime", "PATTERN_TYPES", "patternsPrivateApis", "BlockEdit", "select", "blockEditorStore", "getCurrentPostType", "getEditedPostAttribute", "import_hooks", "import_compose", "import_element", "import_i18n", "import_block_editor", "import_components", "import_data", "import_jsx_runtime", "select", "blockEditorStore", "BlockToolbarLastItem", "BlockEdit", "import_hooks", "import_compose", "import_element", "import_i18n", "import_block_editor", "import_components", "import_data", "import_jsx_runtime", "selectBlock", "blockEditorStore", "enableComplementaryArea", "store", "select", "getClientIdsOfDescendants", "getBlockName", "BlockToolbarLastItem", "BlockEdit", "isTemplatePart", "import_hooks", "import_compose", "import_block_editor", "import_components", "import_i18n", "import_blocks", "import_element", "import_data", "import_notices", "import_core_data", "import_jsx_runtime", "cleanEmptyObject", "blockEditorPrivateApis", "STYLE_PROPERTY", "getValueFromObjectPath", "name", "select", "blocksStore", "blockEditorStore", "noticesStore", "coreStore", "BlockEdit", "import_components", "import_jsx_runtime", "useSlotFills", "Fill", "Slot", "import_data", "import_core_data", "import_components", "import_i18n", "import_element", "import_block_editor", "import_data", "import_element", "import_block_editor", "getBlock", "getBlockOrder", "blockEditorStore", "i", "index", "import_data", "import_i18n", "import_preferences", "import_block_editor", "import_compose", "import_element", "import_html_entities", "import_block_editor", "import_data", "import_compose", "import_components", "import_preferences", "import_element", "import_block_editor", "import_element", "import_components", "import_i18n", "import_data", "import_jsx_runtime", "blockEditorPrivateApis", "select", "blockEditorStore", "import_compose", "import_data", "import_i18n", "import_block_editor", "import_components", "import_element", "import_keyboard_shortcuts", "import_preferences", "import_jsx_runtime", "setIsInserterOpened", "setIsListViewOpened", "isInserterOpened", "inserterSidebarToggleRef", "listViewToggleRef", "select", "preferencesStore", "isListViewOpened", "getEditorMode", "getInserterSidebarToggleRef", "getListViewToggleRef", "keyboardShortcutsStore", "undo_default", "redo_default", "import_i18n", "import_data", "import_keycodes", "import_components", "import_preferences", "import_components", "import_data", "import_i18n", "import_compose", "import_notices", "import_core_data", "import_blocks", "import_jsx_runtime", "noticesStore", "getCurrentPostId", "getCurrentPostType", "coreStore", "import_i18n", "import_components", "import_data", "import_keyboard_shortcuts", "import_jsx_runtime", "select", "keyboardShortcutsStore", "switchEditorMode", "import_components", "import_jsx_runtime", "Slot", "import_components", "import_element", "import_jsx_runtime", "Slot", "import_jsx_runtime", "openModal", "store", "preferencesStore", "toggleDistractionFree", "select", "import_compose", "import_data", "import_jsx_runtime", "togglePublishSidebar", "isPublishSidebarEnabled", "isPublishSidebarOpened", "select", "import_i18n", "import_components", "import_core_data", "import_data", "import_preferences", "import_jsx_runtime", "select", "postType", "coreStore", "preferencesStore", "import_compose", "import_components", "import_i18n", "import_data", "import_core_data", "import_preferences", "import_block_editor", "import_jsx_runtime", "deviceType", "isTemplate", "templateId", "select", "getDeviceType", "getCurrentPostType", "getCurrentTemplateId", "getRenderingMode", "coreStore", "preferencesStore", "setDeviceType", "setRenderingMode", "setDefaultRenderingMode", "blockEditorStore", "import_components", "import_i18n", "import_element", "import_data", "import_block_editor", "import_preferences", "import_keyboard_shortcuts", "import_keycodes", "import_jsx_runtime", "select", "blockEditorStore", "preferencesStore", "keyboardShortcutsStore", "import_jsx_runtime", "postType", "isPublishSidebarOpened", "select", "preferencesStore", "getEditorMode", "getCurrentPostType", "getStylesPath", "getShowStylebook", "getBlockSelectionStart", "blockEditorStore", "motion", "header_default", "import_data", "import_block_editor", "import_compose", "import_element", "import_preferences", "import_keycodes", "import_jsx_runtime", "blockEditorPrivateApis", "inserterSidebarToggleRef", "select", "getInserterSidebarToggleRef", "getInserter", "isPublishSidebarOpened", "getBlockRootClientId", "blockEditorStore", "preferencesStore", "getActiveComplementaryArea", "store", "setIsInserterOpened", "disableComplementaryArea", "import_block_editor", "import_compose", "import_data", "import_dom", "import_element", "import_i18n", "import_keyboard_shortcuts", "import_keycodes", "import_components", "import_i18n", "import_jsx_runtime", "Text", "import_jsx_runtime", "blockEditorPrivateApis", "setIsListViewOpened", "getListViewToggleRef", "ListView", "import_data", "import_components", "import_i18n", "import_element", "import_jsx_runtime", "Fill", "Slot", "closePublishSidebar", "togglePublishSidebar", "select", "isPublishSidebarOpened", "isEditedPostPublishable", "isCurrentPostPublished", "isEditedPostDirty", "hasNonPostEntityChanges", "Slot", "import_components", "import_data", "import_i18n", "import_keyboard_shortcuts", "import_element", "import_jsx_runtime", "switchEditorMode", "select", "getEditorSettings", "keyboardShortcutsStore", "import_block_editor", "import_element", "import_data", "import_blocks", "import_core_data", "import_compose", "import_data", "import_core_data", "import_element", "import_i18n", "import_components", "import_jsx_runtime", "templateId", "select", "getEditorSettings", "getCurrentTemplateId", "coreStore", "ConfirmDialog", "import_compose", "import_data", "import_block_editor", "min", "max", "x", "y", "getBlockName", "getBlockOrder", "blockEditorStore", "selectBlock", "import_data", "import_compose", "import_block_editor", "getSettings", "blockEditorStore", "import_data", "import_compose", "import_block_editor", "import_blocks", "CSS", "blockEditorStore", "selectBlock", "insertDefaultBlock", "import_data", "import_compose", "import_block_editor", "blockEditorStore", "import_jsx_runtime", "blockEditorPrivateApis", "i", "renderingMode", "deviceType", "postType", "canvasMinHeight", "select", "getCurrentPostId", "getCurrentPostType", "getCurrentTemplateId", "getEditorSettings", "getRenderingMode", "getDeviceType", "getCanvasMinHeight", "coreStore", "editorSettings", "template", "isCleanNewPost", "getSettings", "blockEditorStore", "useResizeCanvas", "useTypingObserver", "useTypewriter", "import_jsx_runtime", "isInserterOpened", "isListViewOpened", "stylesPath", "showStylebook", "select", "preferencesStore", "getEditorSettings", "getPostTypeLabel", "getStylesPath", "getShowStylebook", "editorSettings", "header_default", "import_block_editor", "import_data", "import_element", "import_i18n", "import_keyboard_shortcuts", "import_components", "import_data", "import_patterns", "import_jsx_runtime", "patternsPrivateApis", "select", "import_components", "import_data", "import_components", "import_core_data", "import_data", "import_element", "import_i18n", "import_dom", "import_data", "import_element", "import_i18n", "import_components", "import_core_data", "import_data", "import_element", "import_core_data", "import_i18n", "import_element", "import_components", "import_data", "import_core_data", "import_notices", "import_html_entities", "getItemTitle", "import_jsx_runtime", "closeModal", "getItemTitle", "select", "coreStore", "noticesStore", "VStack", "Text", "HStack", "post", "import_i18n", "import_element", "import_components", "import_data", "import_core_data", "import_notices", "import_jsx_runtime", "closeModal", "getItemTitle", "select", "coreStore", "noticesStore", "VStack", "Text", "HStack", "post", "import_jsx_runtime", "postType", "select", "getEntityActions", "coreStore", "registerPostTypeSchema", "actions", "a", "b", "i", "import_jsx_runtime", "Menu", "kebabCase", "componentsPrivateApis", "postType", "postId", "select", "coreStore", "actions", "closeModal", "import_jsx_runtime", "Badge", "componentsPrivateApis", "postType", "postId", "select", "coreStore", "getPostIcon", "stripHTML", "VStack", "HStack", "Text", "import_components", "import_data", "import_i18n", "import_wordcount", "import_element", "import_core_data", "import_jsx_runtime", "AVERAGE_READING_RATE", "select", "getEditedPostAttribute", "getCurrentPostType", "getCurrentPostId", "coreStore", "postType", "wordCount", "Text", "import_components", "import_i18n", "import_data", "import_element", "import_block_editor", "import_jsx_runtime", "PostFormat", "select", "getEditedPostAttribute", "InspectorPopoverHeader", "panel_default", "import_components", "import_data", "import_i18n", "import_date", "import_jsx_runtime", "select", "Text", "import_components", "import_jsx_runtime", "VStack", "import_i18n", "import_compose", "import_data", "import_core_data", "import_html_entities", "import_components", "import_element", "import_block_editor", "import_jsx_runtime", "EMPTY_OBJECT", "coreStore", "isTemplate", "select", "getEditedPostAttribute", "getCurrentPostType", "InspectorPopoverHeader", "InputControl", "import_i18n", "import_data", "import_core_data", "import_components", "import_element", "import_block_editor", "import_jsx_runtime", "coreStore", "isTemplate", "select", "getEditedPostAttribute", "getCurrentPostType", "InspectorPopoverHeader", "NumberControl", "import_i18n", "import_data", "import_core_data", "import_components", "import_element", "import_block_editor", "import_jsx_runtime", "COMMENT_OPTIONS", "coreStore", "isTemplate", "select", "getEditedPostAttribute", "getCurrentPostType", "InspectorPopoverHeader", "VStack", "Text", "import_jsx_runtime", "PANEL_NAME", "postType", "postId", "select", "isEditorPanelRemoved", "getCurrentPostType", "getCurrentPostId", "VStack", "panel_default", "import_data", "import_core_data", "import_components", "import_i18n", "import_block_editor", "import_blocks", "import_data", "import_element", "import_core_data", "import_blocks", "import_patterns", "PATTERN_TYPES", "patternsPrivateApis", "patterns", "template", "index", "name", "select", "getEditorSettings", "coreStore", "import_jsx_runtime", "TemplatesList", "BlockPatternsList", "name", "postType", "postId", "select", "getCurrentPostType", "getCurrentPostId", "coreStore", "import_components", "import_i18n", "import_data", "import_element", "import_html_entities", "import_jsx_runtime", "Tabs", "componentsPrivateApis", "select", "header_default", "import_data", "import_block_editor", "import_components", "import_i18n", "import_hooks", "import_element", "import_jsx_runtime", "blockEditorPrivateApis", "POST_CONTENT_BLOCK_TYPES", "postType", "renderingMode", "select", "getCurrentPostType", "getPostBlocksByName", "getRenderingMode", "enableComplementaryArea", "store", "import_data", "import_element", "import_blocks", "import_block_editor", "import_components", "import_i18n", "import_jsx_runtime", "BlockQuickNavigation", "blockEditorPrivateApis", "select", "getBlockTypes", "blocksStore", "name", "blockEditorStore", "postType", "getCurrentPostType", "import_data", "import_element", "import_block_editor", "import_preferences", "select", "blockEditorStore", "getActiveComplementaryArea", "store", "enableComplementaryArea", "preferencesStore", "import_jsx_runtime", "Tabs", "componentsPrivateApis", "header_default", "PostTaxonomies", "select", "keyboardShortcutsStore", "store", "blockEditorStore", "enableComplementaryArea", "sidebar_default", "import_i18n", "import_data", "import_components", "import_element", "import_compose", "import_block_editor", "import_element", "import_components", "import_compose", "import_i18n", "import_data", "import_dom", "import_block_editor", "import_components", "import_i18n", "import_date", "import_core_data", "import_data", "import_block_editor", "import_i18n", "noop", "import_jsx_runtime", "name", "getDateSettings", "select", "coreStore", "getSettings", "blockEditorStore", "VStack", "import_react_autosize_textarea", "import_element", "import_components", "import_i18n", "import_compose", "import_keycodes", "import_jsx_runtime", "noop", "VStack", "TextareaAutosize", "HStack", "Truncate", "v", "x", "y", "platform", "x", "y", "i", "name", "platform", "elements", "x", "y", "getComputedStyle", "getComputedStyle", "$", "x", "y", "elements", "isRTL", "a", "b", "offset", "computePosition", "a", "b", "i", "platform", "computePosition", "data", "elements", "x", "y", "import_i18n", "import_element", "import_core_data", "import_data", "import_block_editor", "import_notices", "import_html_entities", "cleanEmptyObject", "blockEditorPrivateApis", "postId", "getBlockAttributes", "blockEditorStore", "select", "getClientIdsWithDescendants", "noop", "noticesStore", "coreStore", "getCurrentPostId", "getSelectedBlockClientId", "updateBlockAttributes", "getActiveComplementaryArea", "store", "disableComplementaryArea", "enableComplementaryArea", "y", "offset", "import_i18n", "import_data", "import_components", "import_block_editor", "import_jsx_runtime", "useBlockElement", "blockEditorPrivateApis", "noop", "y", "select", "getSelectedBlockClientId", "blockEditorStore", "VStack", "HStack", "import_jsx_runtime", "useBlockElement", "blockEditorPrivateApis", "Menu", "componentsPrivateApis", "setCanvasMinHeight", "selectBlock", "blockEditorStore", "select", "getBlockAttributes", "getSelectedBlockClientId", "getClientIdsWithDescendants", "t", "i", "y", "stripHTML", "VStack", "Text", "HStack", "actions", "ConfirmDialog", "import_components", "import_i18n", "import_block_editor", "import_data", "import_blocks", "import_jsx_runtime", "blockEditorPrivateApis", "select", "blockEditorStore", "import_components", "import_i18n", "import_element", "import_block_editor", "import_jsx_runtime", "blockEditorPrivateApis", "a", "b", "HStack", "Text", "import_jsx_runtime", "VStack", "postId", "getActiveComplementaryArea", "store", "enableComplementaryArea", "blockEditorStore", "select", "getBlockAttributes", "getSelectedBlockClientId", "getSettings", "name", "getCurrentPostId", "getEditorMode", "import_components", "import_i18n", "import_data", "import_element", "import_preferences", "import_compose", "import_core_data", "import_components", "import_data", "import_i18n", "import_preferences", "import_core_data", "import_jsx_runtime", "preferencesStore", "select", "coreStore", "import_jsx_runtime", "import_data", "import_components", "import_i18n", "import_preferences", "import_jsx_runtime", "import_jsx_runtime", "preferencesStore", "select", "store", "import_jsx_runtime", "stylesPath", "showStylebook", "select", "getActiveComplementaryArea", "store", "getStylesPath", "getShowStylebook", "preferencesStore", "coreStore", "setStylesPath", "setShowStylebook", "resetStylesNavigation", "setIsListViewOpened", "import_jsx_runtime", "postType", "postId", "templateId", "post", "template", "select", "coreStore", "getRenderingMode", "getCurrentPostType", "renderingMode", "selectBlock", "blockEditorStore", "sidebar_default", "import_i18n", "import_compose", "import_data", "import_element", "import_preferences", "import_data", "import_preferences", "import_jsx_runtime", "PreferenceBaseOption", "preferencesPrivateApis", "select", "enablePublishSidebar", "disablePublishSidebar", "import_data", "import_preferences", "import_blocks", "import_element", "import_components", "import_i18n", "import_block_editor", "import_jsx_runtime", "blockEditorPrivateApis", "EMPTY_ARRAY", "showBlockTypes", "hideBlockTypes", "select", "blocksStore", "preferencesStore", "name", "import_jsx_runtime", "preferencesPrivateApis", "select", "store", "closeModal", "getEditorSettings", "preferencesStore", "setIsListViewOpened", "setIsInserterOpened", "check_default", "import_element", "import_data", "postType", "registerPostTypeSchema", "fields", "select", "getEntityFields", "import_blocks", "import_block_editor", "select", "getBlockAttributes", "blockEditorStore", "dispatch", "getBlocks", "import_i18n", "import_core_data", "import_block_editor", "select", "getBlockAttributes", "getBlockName", "blockEditorStore", "postId", "postType", "coreDataStore", "dispatch", "getSelectedBlockClientId", "import_core_data", "select", "coreDataStore", "dispatch", "import_i18n", "import_core_data", "import_block_editor", "NAVIGATION_BLOCK_TYPES", "select", "coreDataStore", "getBlockAttributes", "getBlockName", "blockEditorStore", "dispatch", "getSelectedBlockClientId", "privateApis", "useStyle", "import_data", "registerEntityAction", "name", "unregisterEntityAction", "registerEntityField", "unregisterEntityField", "import_block_editor"]
}