b0y-101 Mini Shell


Current Path : E:/www/km/wp2/wp-content/plugins/gutenberg/build/edit-site/
File Upload :
Current File : E:/www/km/wp2/wp-content/plugins/gutenberg/build/edit-site/index.min.js.map

{"version":3,"file":"./build/edit-site/index.min.js","mappings":"gCAAA,QAOgC,EAUvB,SAAUA,EAAQC,GAC1B,aAEA,IACKC,EACAC,EAFDC,EAAqB,mBAARC,IAAqB,IAAIA,KACrCH,EAAO,GACPC,EAAS,GAEN,CACNG,IAAK,SAAaC,GACjB,OAAOL,EAAKM,QAAQD,IAAQ,CAC7B,EACAE,IAAK,SAAaF,GACjB,OAAOJ,EAAOD,EAAKM,QAAQD,GAC5B,EACAG,IAAK,SAAaH,EAAKI,IACK,IAAvBT,EAAKM,QAAQD,KAChBL,EAAKU,KAAKL,GACVJ,EAAOS,KAAKD,GAEd,EACAE,OAAQ,SAAiBN,GACxB,IAAIO,EAAQZ,EAAKM,QAAQD,GACrBO,GAAS,IACZZ,EAAKa,OAAOD,EAAO,GACnBX,EAAOY,OAAOD,EAAO,GAEvB,IAIEE,EAAc,SAAqBC,GACtC,OAAO,IAAIC,MAAMD,EAAM,CAAEE,SAAS,GACnC,EACA,IACC,IAAID,MAAM,OACX,CAAE,MAAOE,GAERJ,EAAc,SAAqBC,GAClC,IAAII,EAAMC,SAASN,YAAY,SAE/B,OADAK,EAAIE,UAAUN,GAAM,GAAM,GACnBI,CACR,CACD,CAEA,SAASG,EAAOC,GACf,GAAKA,GAAOA,EAAGC,UAA4B,aAAhBD,EAAGC,WAA2BtB,EAAIE,IAAImB,GAAjE,CAEA,IAAIE,EAAe,KACfC,EAAc,KACdC,EAAe,KAwHfC,EAAa,WACZL,EAAGG,cAAgBA,GACtBG,GAEF,EAEIC,EAAU,SAAUC,GACvBC,OAAOC,oBAAoB,SAAUL,GAAY,GACjDL,EAAGU,oBAAoB,QAASJ,GAAQ,GACxCN,EAAGU,oBAAoB,QAASJ,GAAQ,GACxCN,EAAGU,oBAAoB,mBAAoBH,GAAS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AAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,KACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,KACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,KACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,KACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,KAGHC,EAAQ7Q,OA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,mBAAkB,GAClExnB,OAAOU,iBAAkB,QAAUxB,GAAOA,EAAEsoB,mBAAkB,GAE9Dy7D,EAAKlzE,QAAQ,mBAACuyE,GAAD,OAENW,CACP,CAEM,SAASuB,KACf/wE,IAAY,iCAAkC,CAC7CC,MAAO,MACPkY,QAAS,OAEV,C","sources":["webpack://wp/./node_modules/autosize/dist/autosize.js","webpack://wp/./node_modules/classnames/index.js","webpack://wp/./node_modules/computed-style/dist/computedStyle.commonjs.js","webpack://wp/./node_modules/deepmerge/dist/cjs.js","webpack://wp/./node_modules/downloadjs/download.js","webpack://wp/./node_modules/line-height/lib/line-height.js","webpack://wp/./node_modules/prop-types/factoryWithThrowingShims.js","webpack://wp/./node_modules/prop-types/index.js","webpack://wp/./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://wp/./node_modules/react-autosize-textarea/lib/TextareaAutosize.js","webpack://wp/./node_modules/react-autosize-textarea/lib/index.js","webpack://wp/./node_modules/remove-accents/index.js","webpack://wp/external window \"React\"","webpack://wp/webpack/bootstrap","webpack://wp/webpack/runtime/compat get default export","webpack://wp/webpack/runtime/define property getters","webpack://wp/webpack/runtime/hasOwnProperty shorthand","webpack://wp/webpack/runtime/make namespace object","webpack://wp/external window [\"wp\",\"element\"]","webpack://wp/external window [\"wp\",\"blocks\"]","webpack://wp/external window [\"wp\",\"blockLibrary\"]","webpack://wp/external window [\"wp\",\"data\"]","webpack://wp/external window [\"wp\",\"deprecated\"]","webpack://wp/external window [\"wp\",\"coreData\"]","webpack://wp/external window [\"wp\",\"editor\"]","webpack://wp/external window [\"wp\",\"components\"]","webpack://wp/external window [\"wp\",\"i18n\"]","webpack://wp/external window [\"wp\",\"primitives\"]","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/check.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/star-filled.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/star-empty.js","webpack://wp/external window [\"wp\",\"viewport\"]","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/close-small.js","webpack://wp/external window [\"wp\",\"preferences\"]","webpack://wp/./packages/interface/build-module/store/@wordpress/interface/src/store/actions.js","webpack://wp/./packages/interface/build-module/store/@wordpress/interface/src/store/selectors.js","webpack://wp/./packages/interface/build-module/store/@wordpress/interface/src/store/reducer.js","webpack://wp/./packages/interface/build-module/store/@wordpress/interface/src/store/index.js","webpack://wp/./packages/interface/build-module/store/@wordpress/interface/src/store/constants.js","webpack://wp/external window [\"wp\",\"plugins\"]","webpack://wp/./packages/interface/build-module/components/complementary-area-context/@wordpress/interface/src/components/complementary-area-context/index.js","webpack://wp/./packages/interface/build-module/components/complementary-area-toggle/@wordpress/interface/src/components/complementary-area-toggle/index.js","webpack://wp/./packages/interface/build-module/components/complementary-area-header/@wordpress/interface/src/components/complementary-area-header/index.js","webpack://wp/./packages/interface/build-module/components/action-item/@wordpress/interface/src/components/action-item/index.js","webpack://wp/./packages/interface/build-module/components/complementary-area-more-menu-item/@wordpress/interface/src/components/complementary-area-more-menu-item/index.js","webpack://wp/./packages/interface/build-module/components/pinned-items/@wordpress/interface/src/components/pinned-items/index.js","webpack://wp/./packages/interface/build-module/components/complementary-area/@wordpress/interface/src/components/complementary-area/index.js","webpack://wp/external window [\"wp\",\"compose\"]","webpack://wp/./packages/interface/build-module/components/navigable-region/@wordpress/interface/src/components/navigable-region/index.js","webpack://wp/./packages/interface/build-module/components/interface-skeleton/@wordpress/interface/src/components/interface-skeleton/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/more-vertical.js","webpack://wp/./packages/interface/build-module/components/more-menu-dropdown/@wordpress/interface/src/components/more-menu-dropdown/index.js","webpack://wp/./packages/interface/build-module/components/preferences-modal/@wordpress/interface/src/components/preferences-modal/index.js","webpack://wp/./packages/icons/build-module/icon/@wordpress/icons/src/icon/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/chevron-left.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/chevron-right.js","webpack://wp/./packages/interface/build-module/components/preferences-modal-tabs/@wordpress/interface/src/components/preferences-modal-tabs/index.js","webpack://wp/./packages/interface/build-module/components/preferences-modal-section/@wordpress/interface/src/components/preferences-modal-section/index.js","webpack://wp/./packages/interface/build-module/components/preferences-modal-base-option/@wordpress/interface/src/components/preferences-modal-base-option/index.js","webpack://wp/external window [\"wp\",\"widgets\"]","webpack://wp/external window [\"wp\",\"hooks\"]","webpack://wp/external window [\"wp\",\"mediaUtils\"]","webpack://wp/./packages/edit-site/build-module/hooks/@wordpress/edit-site/src/hooks/components.js","webpack://wp/external window \"lodash\"","webpack://wp/external window [\"wp\",\"blockEditor\"]","webpack://wp/external window [\"wp\",\"notices\"]","webpack://wp/./node_modules/colord/index.mjs","webpack://wp/./node_modules/colord/plugins/a11y.mjs","webpack://wp/external window [\"wp\",\"privateApis\"]","webpack://wp/./packages/edit-site/build-module/@wordpress/edit-site/src/lock-unlock.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/hooks.js","webpack://wp/./packages/edit-site/build-module/hooks/push-changes-to-global-styles/@wordpress/edit-site/src/hooks/push-changes-to-global-styles/index.js","webpack://wp/external window [\"wp\",\"router\"]","webpack://wp/external window [\"wp\",\"url\"]","webpack://wp/./packages/edit-site/build-module/utils/@wordpress/edit-site/src/utils/is-previewing-theme.js","webpack://wp/./packages/edit-site/build-module/components/routes/@wordpress/edit-site/src/components/routes/link.js","webpack://wp/./packages/edit-site/build-module/hooks/@wordpress/edit-site/src/hooks/template-part-edit.js","webpack://wp/./packages/edit-site/build-module/hooks/@wordpress/edit-site/src/hooks/navigation-menu-edit.js","webpack://wp/./packages/edit-site/build-module/store/@wordpress/edit-site/src/store/reducer.js","webpack://wp/external window [\"wp\",\"apiFetch\"]","webpack://wp/external window [\"wp\",\"a11y\"]","webpack://wp/external window [\"wp\",\"htmlEntities\"]","webpack://wp/./packages/edit-site/build-module/store/@wordpress/edit-site/src/store/constants.js","webpack://wp/./packages/edit-site/build-module/utils/@wordpress/edit-site/src/utils/is-template-revertable.js","webpack://wp/./packages/edit-site/build-module/store/@wordpress/edit-site/src/store/actions.js","webpack://wp/./packages/edit-site/build-module/store/@wordpress/edit-site/src/store/private-actions.js","webpack://wp/./node_modules/rememo/rememo.js","webpack://wp/./packages/edit-site/build-module/store/@wordpress/edit-site/src/store/utils.js","webpack://wp/./node_modules/memize/dist/index.js","webpack://wp/./packages/edit-site/build-module/store/@wordpress/edit-site/src/store/selectors.js","webpack://wp/./packages/edit-site/build-module/store/@wordpress/edit-site/src/store/private-selectors.js","webpack://wp/./packages/edit-site/build-module/store/@wordpress/edit-site/src/store/index.js","webpack://wp/external window [\"wp\",\"keyboardShortcuts\"]","webpack://wp/external window [\"wp\",\"commands\"]","webpack://wp/external window [\"wp\",\"coreCommands\"]","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/navigation.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/styles.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/page.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/layout.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/symbol.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-button/@wordpress/edit-site/src/components/sidebar-button/index.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen/@wordpress/edit-site/src/components/sidebar-navigation-screen/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/chevron-left-small.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/chevron-right-small.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-item/@wordpress/edit-site/src/components/sidebar-navigation-item/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/backup.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/seen.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/pencil.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/edit.js","webpack://wp/external window [\"wp\",\"date\"]","webpack://wp/external window [\"wp\",\"keycodes\"]","webpack://wp/./node_modules/is-plain-object/dist/is-plain-object.mjs","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/global-styles-provider.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/preview.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/style-variations-container.js","webpack://wp/./packages/edit-site/build-module/components/block-editor/@wordpress/edit-site/src/components/block-editor/resize-handle.js","webpack://wp/./packages/edit-site/build-module/components/block-editor/@wordpress/edit-site/src/components/block-editor/resizable-editor.js","webpack://wp/./packages/edit-site/build-module/components/editor-canvas-container/@wordpress/edit-site/src/components/editor-canvas-container/index.js","webpack://wp/./packages/edit-site/build-module/components/style-book/@wordpress/edit-site/src/components/style-book/index.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/screen-revisions/@wordpress/edit-site/src/components/global-styles/screen-revisions/use-global-styles-revisions.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-global-styles/@wordpress/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-main/@wordpress/edit-site/src/components/sidebar-navigation-screen-main/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/home.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/verse.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/pin.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/archive.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/search.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/not-found.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/list.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/category.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/comment-author-avatar.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/block-meta.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/calendar.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/tag.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/media.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/plus.js","webpack://wp/./packages/edit-site/build-module/utils/@wordpress/edit-site/src/utils/use-debounced-input.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/post.js","webpack://wp/./packages/edit-site/build-module/components/add-new-template/@wordpress/edit-site/src/components/add-new-template/utils.js","webpack://wp/./packages/edit-site/build-module/components/add-new-template/@wordpress/edit-site/src/components/add-new-template/add-custom-template-modal-content.js","webpack://wp/./node_modules/tslib/tslib.es6.js","webpack://wp/./node_modules/lower-case/src/index.ts","webpack://wp/./node_modules/no-case/src/index.ts","webpack://wp/./node_modules/param-case/src/index.ts","webpack://wp/./node_modules/dot-case/src/index.ts","webpack://wp/./packages/edit-site/build-module/components/add-new-template/@wordpress/edit-site/src/components/add-new-template/add-custom-generic-template-modal-content.js","webpack://wp/./packages/edit-site/build-module/components/add-new-template/@wordpress/edit-site/src/components/add-new-template/template-actions-loading-screen.js","webpack://wp/./packages/edit-site/build-module/components/add-new-template/@wordpress/edit-site/src/components/add-new-template/new-template.js","webpack://wp/./packages/edit-site/build-module/components/add-new-template/@wordpress/edit-site/src/components/add-new-template/index.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-templates/@wordpress/edit-site/src/components/sidebar-navigation-screen-templates/index.js","webpack://wp/./packages/edit-site/build-module/components/use-edited-entity-record/@wordpress/edit-site/src/components/use-edited-entity-record/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/plugins.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/globe.js","webpack://wp/./packages/edit-site/build-module/components/list/@wordpress/edit-site/src/components/list/added-by.js","webpack://wp/./packages/edit-site/build-module/utils/@wordpress/edit-site/src/utils/is-template-removable.js","webpack://wp/./packages/edit-site/build-module/components/template-actions/@wordpress/edit-site/src/components/template-actions/rename-menu-item.js","webpack://wp/./packages/edit-site/build-module/components/template-actions/@wordpress/edit-site/src/components/template-actions/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/header.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/footer.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-details-panel/@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-details-panel/@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-details-panel/@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-details-panel/@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/index.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-template/@wordpress/edit-site/src/components/sidebar-navigation-screen-template/home-template-details.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-details-footer/@wordpress/edit-site/src/components/sidebar-navigation-screen-details-footer/index.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-template/@wordpress/edit-site/src/components/sidebar-navigation-screen-template/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/lock-small.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/file.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/symbol-filled.js","webpack://wp/./packages/edit-site/build-module/components/page-patterns/@wordpress/edit-site/src/components/page-patterns/utils.js","webpack://wp/./packages/edit-site/build-module/components/create-pattern-modal/@wordpress/edit-site/src/components/create-pattern-modal/index.js","webpack://wp/./packages/edit-site/build-module/utils/@wordpress/edit-site/src/utils/template-part-create.js","webpack://wp/./packages/edit-site/build-module/components/create-template-part-modal/@wordpress/edit-site/src/components/create-template-part-modal/index.js","webpack://wp/./packages/edit-site/build-module/components/add-new-pattern/@wordpress/edit-site/src/components/add-new-pattern/index.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-patterns/@wordpress/edit-site/src/components/sidebar-navigation-screen-patterns/category-item.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-patterns/@wordpress/edit-site/src/components/sidebar-navigation-screen-patterns/use-template-part-areas.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-patterns/@wordpress/edit-site/src/components/sidebar-navigation-screen-patterns/index.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-patterns/@wordpress/edit-site/src/components/sidebar-navigation-screen-patterns/use-pattern-categories.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-patterns/@wordpress/edit-site/src/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-patterns/@wordpress/edit-site/src/components/sidebar-navigation-screen-patterns/use-theme-patterns.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-patterns/@wordpress/edit-site/src/components/sidebar-navigation-screen-patterns/use-my-patterns.js","webpack://wp/./packages/edit-site/build-module/components/sync-state-with-url/@wordpress/edit-site/src/components/sync-state-with-url/use-init-edited-entity-from-url.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/chevron-up.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/chevron-down.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menus/@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menus/@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-pattern/@wordpress/edit-site/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-pattern/@wordpress/edit-site/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-pattern/@wordpress/edit-site/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-pattern/@wordpress/edit-site/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-pattern/@wordpress/edit-site/src/components/sidebar-navigation-screen-pattern/index.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-pattern/@wordpress/edit-site/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-pattern/@wordpress/edit-site/src/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js","webpack://wp/./packages/edit-site/build-module/components/sync-state-with-url/@wordpress/edit-site/src/components/sync-state-with-url/use-sync-path-with-url.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menus/@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menus/constants.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/delete-modal.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/more-menu.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menus/@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/edit-button.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/index.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menu/@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-navigation-menus/@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menus/index.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-templates-browse/@wordpress/edit-site/src/components/sidebar-navigation-screen-templates-browse/index.js","webpack://wp/./packages/edit-site/build-module/components/save-button/@wordpress/edit-site/src/components/save-button/index.js","webpack://wp/./packages/edit-site/build-module/components/save-hub/@wordpress/edit-site/src/components/save-hub/index.js","webpack://wp/./packages/edit-site/build-module/components/add-new-page/@wordpress/edit-site/src/components/add-new-page/index.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-pages/@wordpress/edit-site/src/components/sidebar-navigation-screen-pages/index.js","webpack://wp/external window [\"wp\",\"dom\"]","webpack://wp/external window [\"wp\",\"escapeHtml\"]","webpack://wp/external window [\"wp\",\"wordcount\"]","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-page/@wordpress/edit-site/src/components/sidebar-navigation-screen-page/status-label.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-page/@wordpress/edit-site/src/components/sidebar-navigation-screen-page/page-details.js","webpack://wp/./packages/edit-site/build-module/components/page-actions/@wordpress/edit-site/src/components/page-actions/delete-page-menu-item.js","webpack://wp/./packages/edit-site/build-module/components/page-actions/@wordpress/edit-site/src/components/page-actions/index.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-navigation-screen-page/@wordpress/edit-site/src/components/sidebar-navigation-screen-page/index.js","webpack://wp/./packages/edit-site/build-module/components/sidebar/@wordpress/edit-site/src/components/sidebar/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/drawer-left.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/drawer-right.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-edit-mode/@wordpress/edit-site/src/components/sidebar-edit-mode/default-sidebar.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/icon-with-current-color.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/navigation-button.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/typography.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/color.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/root-menu.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/screen-root.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/variations-panel.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/header.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/screen-block-list.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/block-preview-panel.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/subtitle.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/screen-block.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/screen-typography.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/typography-panel.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/typography-preview.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/screen-typography-element.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/shuffle.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/color-indicator-wrapper.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/palette.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/screen-colors.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/color-palette-panel.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/gradients-palette-panel.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/screen-color-palette.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/dimensions-panel.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/screen-layout.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/screen-style-variations.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/screen-css.js","webpack://wp/./packages/edit-site/build-module/components/revisions/@wordpress/edit-site/src/components/revisions/index.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-edit-mode/@wordpress/edit-site/src/components/sidebar-edit-mode/sidebar-fixed-bottom.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/screen-revisions/@wordpress/edit-site/src/components/global-styles/screen-revisions/revisions-buttons.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/screen-revisions/@wordpress/edit-site/src/components/global-styles/screen-revisions/index.js","webpack://wp/./packages/edit-site/build-module/components/global-styles/@wordpress/edit-site/src/components/global-styles/ui.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-edit-mode/@wordpress/edit-site/src/components/sidebar-edit-mode/global-styles-sidebar.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-edit-mode/@wordpress/edit-site/src/components/sidebar-edit-mode/constants.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-edit-mode/settings-header/@wordpress/edit-site/src/components/sidebar-edit-mode/settings-header/index.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-edit-mode/sidebar-card/@wordpress/edit-site/src/components/sidebar-edit-mode/sidebar-card/index.js","webpack://wp/./packages/edit-site/build-module/components/page-content-focus-manager/@wordpress/edit-site/src/components/page-content-focus-manager/constants.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-edit-mode/page-panels/@wordpress/edit-site/src/components/sidebar-edit-mode/page-panels/page-content.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-edit-mode/page-panels/@wordpress/edit-site/src/components/sidebar-edit-mode/page-panels/page-status.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-edit-mode/page-panels/@wordpress/edit-site/src/components/sidebar-edit-mode/page-panels/publish-date.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-edit-mode/page-panels/@wordpress/edit-site/src/components/sidebar-edit-mode/page-panels/page-summary.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-edit-mode/page-panels/@wordpress/edit-site/src/components/sidebar-edit-mode/page-panels/edit-template.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-edit-mode/page-panels/@wordpress/edit-site/src/components/sidebar-edit-mode/page-panels/index.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-edit-mode/template-panel/@wordpress/edit-site/src/components/sidebar-edit-mode/template-panel/template-actions.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-edit-mode/template-panel/@wordpress/edit-site/src/components/sidebar-edit-mode/template-panel/template-areas.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-edit-mode/template-panel/@wordpress/edit-site/src/components/sidebar-edit-mode/template-panel/last-revision.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-edit-mode/template-panel/@wordpress/edit-site/src/components/sidebar-edit-mode/template-panel/index.js","webpack://wp/./packages/edit-site/build-module/components/plugin-template-setting-panel/@wordpress/edit-site/src/components/plugin-template-setting-panel/index.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-edit-mode/@wordpress/edit-site/src/components/sidebar-edit-mode/index.js","webpack://wp/external window [\"wp\",\"reusableBlocks\"]","webpack://wp/./packages/edit-site/build-module/components/template-part-converter/@wordpress/edit-site/src/components/template-part-converter/convert-to-regular.js","webpack://wp/./packages/edit-site/build-module/components/template-part-converter/@wordpress/edit-site/src/components/template-part-converter/convert-to-template-part.js","webpack://wp/./packages/edit-site/build-module/components/template-part-converter/@wordpress/edit-site/src/components/template-part-converter/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/arrow-left.js","webpack://wp/./packages/edit-site/build-module/components/block-editor/@wordpress/edit-site/src/components/block-editor/back-button.js","webpack://wp/./packages/edit-site/build-module/components/block-editor/@wordpress/edit-site/src/components/block-editor/editor-canvas.js","webpack://wp/./packages/edit-site/build-module/components/block-editor/@wordpress/edit-site/src/components/block-editor/inserter-media-categories.js","webpack://wp/./packages/edit-site/build-module/components/block-editor/@wordpress/edit-site/src/components/block-editor/use-site-editor-settings.js","webpack://wp/./packages/edit-site/build-module/components/block-editor/@wordpress/edit-site/src/components/block-editor/constants.js","webpack://wp/./packages/edit-site/build-module/components/page-content-focus-manager/@wordpress/edit-site/src/components/page-content-focus-manager/disable-non-page-content-blocks.js","webpack://wp/./packages/edit-site/build-module/components/page-content-focus-manager/@wordpress/edit-site/src/components/page-content-focus-manager/edit-template-notification.js","webpack://wp/./packages/edit-site/build-module/components/page-content-focus-manager/@wordpress/edit-site/src/components/page-content-focus-manager/back-to-page-notification.js","webpack://wp/./packages/edit-site/build-module/components/page-content-focus-manager/@wordpress/edit-site/src/components/page-content-focus-manager/index.js","webpack://wp/./packages/edit-site/build-module/components/block-editor/@wordpress/edit-site/src/components/block-editor/site-editor-canvas.js","webpack://wp/./packages/edit-site/build-module/components/block-editor/providers/@wordpress/edit-site/src/components/block-editor/providers/default-block-editor-provider.js","webpack://wp/./packages/edit-site/build-module/components/block-editor/providers/@wordpress/edit-site/src/components/block-editor/providers/navigation-block-editor-provider.js","webpack://wp/./packages/edit-site/build-module/components/block-editor/@wordpress/edit-site/src/components/block-editor/index.js","webpack://wp/./packages/edit-site/build-module/components/block-editor/@wordpress/edit-site/src/components/block-editor/get-block-editor-provider.js","webpack://wp/./packages/edit-site/build-module/components/code-editor/@wordpress/edit-site/src/components/code-editor/code-editor-text-area.js","webpack://wp/./packages/edit-site/build-module/components/code-editor/@wordpress/edit-site/src/components/code-editor/index.js","webpack://wp/./packages/edit-site/build-module/components/keyboard-shortcuts/@wordpress/edit-site/src/components/keyboard-shortcuts/edit-mode.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/close.js","webpack://wp/./packages/edit-site/build-module/components/secondary-sidebar/@wordpress/edit-site/src/components/secondary-sidebar/inserter-sidebar.js","webpack://wp/./packages/edit-site/build-module/components/secondary-sidebar/@wordpress/edit-site/src/components/secondary-sidebar/list-view-sidebar.js","webpack://wp/./packages/edit-site/build-module/components/welcome-guide/@wordpress/edit-site/src/components/welcome-guide/image.js","webpack://wp/./packages/edit-site/build-module/components/welcome-guide/@wordpress/edit-site/src/components/welcome-guide/editor.js","webpack://wp/./packages/edit-site/build-module/components/welcome-guide/@wordpress/edit-site/src/components/welcome-guide/styles.js","webpack://wp/./packages/edit-site/build-module/components/welcome-guide/@wordpress/edit-site/src/components/welcome-guide/page.js","webpack://wp/./packages/edit-site/build-module/components/welcome-guide/@wordpress/edit-site/src/components/welcome-guide/template.js","webpack://wp/./packages/edit-site/build-module/components/welcome-guide/@wordpress/edit-site/src/components/welcome-guide/index.js","webpack://wp/./packages/edit-site/build-module/components/start-template-options/@wordpress/edit-site/src/components/start-template-options/index.js","webpack://wp/./packages/edit-site/build-module/components/global-styles-renderer/@wordpress/edit-site/src/components/global-styles-renderer/index.js","webpack://wp/./packages/edit-site/build-module/components/routes/@wordpress/edit-site/src/components/routes/use-title.js","webpack://wp/./packages/edit-site/build-module/components/canvas-spinner/@wordpress/edit-site/src/components/canvas-spinner/index.js","webpack://wp/./packages/edit-site/build-module/components/editor/@wordpress/edit-site/src/components/editor/index.js","webpack://wp/./packages/edit-site/build-module/components/error-boundary/@wordpress/edit-site/src/components/error-boundary/warning.js","webpack://wp/./packages/edit-site/build-module/components/error-boundary/@wordpress/edit-site/src/components/error-boundary/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/list-view.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/chevron-up-down.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/external.js","webpack://wp/./packages/edit-site/build-module/components/keyboard-shortcut-help-modal/@wordpress/edit-site/src/components/keyboard-shortcut-help-modal/config.js","webpack://wp/./packages/edit-site/build-module/components/keyboard-shortcut-help-modal/@wordpress/edit-site/src/components/keyboard-shortcut-help-modal/shortcut.js","webpack://wp/./packages/edit-site/build-module/components/keyboard-shortcut-help-modal/@wordpress/edit-site/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js","webpack://wp/./packages/edit-site/build-module/components/keyboard-shortcut-help-modal/@wordpress/edit-site/src/components/keyboard-shortcut-help-modal/index.js","webpack://wp/./packages/edit-site/build-module/components/preferences-modal/@wordpress/edit-site/src/components/preferences-modal/enable-feature.js","webpack://wp/./packages/edit-site/build-module/components/preferences-modal/@wordpress/edit-site/src/components/preferences-modal/index.js","webpack://wp/./packages/edit-site/build-module/components/header-edit-mode/tools-more-menu-group/@wordpress/edit-site/src/components/header-edit-mode/tools-more-menu-group/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/download.js","webpack://wp/./packages/edit-site/build-module/components/header-edit-mode/more-menu/@wordpress/edit-site/src/components/header-edit-mode/more-menu/site-export.js","webpack://wp/./packages/edit-site/build-module/components/header-edit-mode/more-menu/@wordpress/edit-site/src/components/header-edit-mode/more-menu/welcome-guide-menu-item.js","webpack://wp/./packages/edit-site/build-module/components/header-edit-mode/more-menu/@wordpress/edit-site/src/components/header-edit-mode/more-menu/copy-content-menu-item.js","webpack://wp/./packages/edit-site/build-module/components/header-edit-mode/mode-switcher/@wordpress/edit-site/src/components/header-edit-mode/mode-switcher/index.js","webpack://wp/./packages/edit-site/build-module/components/header-edit-mode/more-menu/@wordpress/edit-site/src/components/header-edit-mode/more-menu/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/undo.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/redo.js","webpack://wp/./packages/edit-site/build-module/components/header-edit-mode/undo-redo/@wordpress/edit-site/src/components/header-edit-mode/undo-redo/undo.js","webpack://wp/./packages/edit-site/build-module/components/header-edit-mode/undo-redo/@wordpress/edit-site/src/components/header-edit-mode/undo-redo/redo.js","webpack://wp/./packages/edit-site/build-module/components/header-edit-mode/document-actions/@wordpress/edit-site/src/components/header-edit-mode/document-actions/index.js","webpack://wp/./packages/edit-site/build-module/components/header-edit-mode/@wordpress/edit-site/src/components/header-edit-mode/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/wordpress.js","webpack://wp/./packages/edit-site/build-module/components/site-icon/@wordpress/edit-site/src/components/site-icon/index.js","webpack://wp/./packages/edit-site/build-module/components/site-hub/@wordpress/edit-site/src/components/site-hub/index.js","webpack://wp/./packages/edit-site/build-module/components/resizable-frame/@wordpress/edit-site/src/components/resizable-frame/index.js","webpack://wp/./packages/edit-site/build-module/components/sync-state-with-url/@wordpress/edit-site/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js","webpack://wp/./packages/edit-site/build-module/utils/@wordpress/edit-site/src/utils/use-activate-theme.js","webpack://wp/./packages/edit-site/build-module/components/save-panel/@wordpress/edit-site/src/components/save-panel/index.js","webpack://wp/./packages/edit-site/build-module/components/keyboard-shortcuts/@wordpress/edit-site/src/components/keyboard-shortcuts/register.js","webpack://wp/./packages/edit-site/build-module/components/keyboard-shortcuts/@wordpress/edit-site/src/components/keyboard-shortcuts/global.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/trash.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/help.js","webpack://wp/./packages/edit-site/build-module/hooks/commands/@wordpress/edit-site/src/hooks/commands/use-common-commands.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/block-default.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/cog.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/code.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/keyboard-close.js","webpack://wp/./packages/edit-site/build-module/hooks/commands/@wordpress/edit-site/src/hooks/commands/use-edit-mode-commands.js","webpack://wp/./packages/edit-site/build-module/components/page/@wordpress/edit-site/src/components/page/header.js","webpack://wp/./packages/edit-site/build-module/components/page/@wordpress/edit-site/src/components/page/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/more-horizontal.js","webpack://wp/./packages/edit-site/build-module/components/page-patterns/@wordpress/edit-site/src/components/page-patterns/grid-item.js","webpack://wp/./packages/edit-site/build-module/components/page-patterns/@wordpress/edit-site/src/components/page-patterns/grid.js","webpack://wp/./packages/edit-site/build-module/components/page-patterns/@wordpress/edit-site/src/components/page-patterns/no-patterns.js","webpack://wp/./packages/edit-site/build-module/components/page-patterns/@wordpress/edit-site/src/components/page-patterns/search-items.js","webpack://wp/./packages/edit-site/build-module/components/page-patterns/@wordpress/edit-site/src/components/page-patterns/use-patterns.js","webpack://wp/./packages/edit-site/build-module/components/page-patterns/@wordpress/edit-site/src/components/page-patterns/patterns-list.js","webpack://wp/./packages/edit-site/build-module/components/page-patterns/@wordpress/edit-site/src/components/page-patterns/index.js","webpack://wp/./packages/edit-site/build-module/components/page-patterns/@wordpress/edit-site/src/components/page-patterns/use-pattern-settings.js","webpack://wp/./packages/edit-site/build-module/components/table/@wordpress/edit-site/src/components/table/index.js","webpack://wp/./packages/edit-site/build-module/components/page-template-parts/@wordpress/edit-site/src/components/page-template-parts/index.js","webpack://wp/./packages/edit-site/build-module/components/page-templates/@wordpress/edit-site/src/components/page-templates/index.js","webpack://wp/./packages/edit-site/build-module/components/page-main/@wordpress/edit-site/src/components/page-main/index.js","webpack://wp/./packages/edit-site/build-module/components/layout/@wordpress/edit-site/src/components/layout/hooks.js","webpack://wp/./packages/edit-site/build-module/components/layout/@wordpress/edit-site/src/components/layout/index.js","webpack://wp/./packages/edit-site/build-module/utils/@wordpress/edit-site/src/utils/get-is-list-page.js","webpack://wp/./packages/edit-site/build-module/components/app/@wordpress/edit-site/src/components/app/index.js","webpack://wp/./packages/edit-site/build-module/components/sidebar-edit-mode/plugin-sidebar/@wordpress/edit-site/src/components/sidebar-edit-mode/plugin-sidebar/index.js","webpack://wp/./packages/edit-site/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/@wordpress/edit-site/src/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js","webpack://wp/./packages/edit-site/build-module/components/header-edit-mode/plugin-more-menu-item/@wordpress/edit-site/src/components/header-edit-mode/plugin-more-menu-item/index.js","webpack://wp/./packages/edit-site/build-module/@wordpress/edit-site/src/index.js"],"sourcesContent":["/*!\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});","/*!\n  Copyright (c) 2018 Jed Watson.\n  Licensed under the MIT License (MIT), see\n  http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString === Object.prototype.toString) {\n\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\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","'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","//download.js v4.2, by dandavis; 2008-2016. [MIT] see http://danml.com/download.html for tests/usage\n// v1 landed a FF+Chrome compat way of downloading strings to local un-named files, upgraded to use a hidden frame and optional mime\n// v2 added named files via a[download], msSaveBlob, IE (10+) support, and window.URL support for larger+faster saves than dataURLs\n// v3 added dataURL and Blob Input, bind-toggle arity, and legacy dataURL fallback was improved with force-download mime and base64 support. 3.1 improved safari handling.\n// v4 adds AMD/UMD, commonJS, and plain browser support\n// v4.1 adds url download capability via solo URL argument (same domain/CORS only)\n// v4.2 adds semantic variable names, long (over 2MB) dataURL support, and hidden by default temp anchors\n// https://github.com/rndme/download\n\n(function (root, factory) {\n\tif (typeof define === 'function' && define.amd) {\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine([], factory);\n\t} else if (typeof exports === 'object') {\n\t\t// Node. Does not work with strict CommonJS, but\n\t\t// only CommonJS-like environments that support module.exports,\n\t\t// like Node.\n\t\tmodule.exports = factory();\n\t} else {\n\t\t// Browser globals (root is window)\n\t\troot.download = factory();\n  }\n}(this, function () {\n\n\treturn function download(data, strFileName, strMimeType) {\n\n\t\tvar self = window, // this script is only for browsers anyway...\n\t\t\tdefaultMime = \"application/octet-stream\", // this default mime also triggers iframe downloads\n\t\t\tmimeType = strMimeType || defaultMime,\n\t\t\tpayload = data,\n\t\t\turl = !strFileName && !strMimeType && payload,\n\t\t\tanchor = document.createElement(\"a\"),\n\t\t\ttoString = function(a){return String(a);},\n\t\t\tmyBlob = (self.Blob || self.MozBlob || self.WebKitBlob || toString),\n\t\t\tfileName = strFileName || \"download\",\n\t\t\tblob,\n\t\t\treader;\n\t\t\tmyBlob= myBlob.call ? myBlob.bind(self) : Blob ;\n\t  \n\t\tif(String(this)===\"true\"){ //reverse arguments, allowing download.bind(true, \"text/xml\", \"export.xml\") to act as a callback\n\t\t\tpayload=[payload, mimeType];\n\t\t\tmimeType=payload[0];\n\t\t\tpayload=payload[1];\n\t\t}\n\n\n\t\tif(url && url.length< 2048){ // if no filename and no mime, assume a url was passed as the only argument\n\t\t\tfileName = url.split(\"/\").pop().split(\"?\")[0];\n\t\t\tanchor.href = url; // assign href prop to temp anchor\n\t\t  \tif(anchor.href.indexOf(url) !== -1){ // if the browser determines that it's a potentially valid url path:\n        \t\tvar ajax=new XMLHttpRequest();\n        \t\tajax.open( \"GET\", url, true);\n        \t\tajax.responseType = 'blob';\n        \t\tajax.onload= function(e){ \n\t\t\t\t  download(e.target.response, fileName, defaultMime);\n\t\t\t\t};\n        \t\tsetTimeout(function(){ ajax.send();}, 0); // allows setting custom ajax headers using the return:\n\t\t\t    return ajax;\n\t\t\t} // end if valid url?\n\t\t} // end if url?\n\n\n\t\t//go ahead and download dataURLs right away\n\t\tif(/^data:([\\w+-]+\\/[\\w+.-]+)?[,;]/.test(payload)){\n\t\t\n\t\t\tif(payload.length > (1024*1024*1.999) && myBlob !== toString ){\n\t\t\t\tpayload=dataUrlToBlob(payload);\n\t\t\t\tmimeType=payload.type || defaultMime;\n\t\t\t}else{\t\t\t\n\t\t\t\treturn navigator.msSaveBlob ?  // IE10 can't do a[download], only Blobs:\n\t\t\t\t\tnavigator.msSaveBlob(dataUrlToBlob(payload), fileName) :\n\t\t\t\t\tsaver(payload) ; // everyone else can save dataURLs un-processed\n\t\t\t}\n\t\t\t\n\t\t}else{//not data url, is it a string with special needs?\n\t\t\tif(/([\\x80-\\xff])/.test(payload)){\t\t\t  \n\t\t\t\tvar i=0, tempUiArr= new Uint8Array(payload.length), mx=tempUiArr.length;\n\t\t\t\tfor(i;i<mx;++i) tempUiArr[i]= payload.charCodeAt(i);\n\t\t\t \tpayload=new myBlob([tempUiArr], {type: mimeType});\n\t\t\t}\t\t  \n\t\t}\n\t\tblob = payload instanceof myBlob ?\n\t\t\tpayload :\n\t\t\tnew myBlob([payload], {type: mimeType}) ;\n\n\n\t\tfunction dataUrlToBlob(strUrl) {\n\t\t\tvar parts= strUrl.split(/[:;,]/),\n\t\t\ttype= parts[1],\n\t\t\tdecoder= parts[2] == \"base64\" ? atob : decodeURIComponent,\n\t\t\tbinData= decoder( parts.pop() ),\n\t\t\tmx= binData.length,\n\t\t\ti= 0,\n\t\t\tuiArr= new Uint8Array(mx);\n\n\t\t\tfor(i;i<mx;++i) uiArr[i]= binData.charCodeAt(i);\n\n\t\t\treturn new myBlob([uiArr], {type: type});\n\t\t }\n\n\t\tfunction saver(url, winMode){\n\n\t\t\tif ('download' in anchor) { //html5 A[download]\n\t\t\t\tanchor.href = url;\n\t\t\t\tanchor.setAttribute(\"download\", fileName);\n\t\t\t\tanchor.className = \"download-js-link\";\n\t\t\t\tanchor.innerHTML = \"downloading...\";\n\t\t\t\tanchor.style.display = \"none\";\n\t\t\t\tdocument.body.appendChild(anchor);\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\tanchor.click();\n\t\t\t\t\tdocument.body.removeChild(anchor);\n\t\t\t\t\tif(winMode===true){setTimeout(function(){ self.URL.revokeObjectURL(anchor.href);}, 250 );}\n\t\t\t\t}, 66);\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// handle non-a[download] safari as best we can:\n\t\t\tif(/(Version)\\/(\\d+)\\.(\\d+)(?:\\.(\\d+))?.*Safari\\//.test(navigator.userAgent)) {\n\t\t\t\tif(/^data:/.test(url))\turl=\"data:\"+url.replace(/^data:([\\w\\/\\-\\+]+)/, defaultMime);\n\t\t\t\tif(!window.open(url)){ // popup blocked, offer direct download:\n\t\t\t\t\tif(confirm(\"Displaying New Document\\n\\nUse Save As... to download, then click back to return to this page.\")){ location.href=url; }\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t//do iframe dataURL download (old ch+FF):\n\t\t\tvar f = document.createElement(\"iframe\");\n\t\t\tdocument.body.appendChild(f);\n\n\t\t\tif(!winMode && /^data:/.test(url)){ // force a mime that will download:\n\t\t\t\turl=\"data:\"+url.replace(/^data:([\\w\\/\\-\\+]+)/, defaultMime);\n\t\t\t}\n\t\t\tf.src=url;\n\t\t\tsetTimeout(function(){ document.body.removeChild(f); }, 333);\n\n\t\t}//end saver\n\n\n\n\n\t\tif (navigator.msSaveBlob) { // IE10+ : (has Blob, but not a[download] or URL)\n\t\t\treturn navigator.msSaveBlob(blob, fileName);\n\t\t}\n\n\t\tif(self.URL){ // simple fast and modern way using Blob and URL:\n\t\t\tsaver(self.URL.createObjectURL(blob), true);\n\t\t}else{\n\t\t\t// handle non-Blob()+non-URL browsers:\n\t\t\tif(typeof blob === \"string\" || blob.constructor===toString ){\n\t\t\t\ttry{\n\t\t\t\t\treturn saver( \"data:\" +  mimeType   + \";base64,\"  +  self.btoa(blob)  );\n\t\t\t\t}catch(y){\n\t\t\t\t\treturn saver( \"data:\" +  mimeType   + \",\" + encodeURIComponent(blob)  );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Blob but not URL support:\n\t\t\treader=new FileReader();\n\t\t\treader.onload=function(e){\n\t\t\t\tsaver(this.result);\n\t\t\t};\n\t\t\treader.readAsDataURL(blob);\n\t\t}\n\t\treturn true;\n\t}; /* end download() */\n}));\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 = '&nbsp;';\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","/**\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 = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n  function shim(props, propName, componentName, location, propFullName, secret) {\n    if (secret === ReactPropTypesSecret) {\n      // It is still safe when called from React.\n      return;\n    }\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  };\n  shim.isRequired = shim;\n  function getShim() {\n    return shim;\n  };\n  // Important!\n  // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n  var ReactPropTypes = {\n    array: shim,\n    bool: shim,\n    func: shim,\n    number: shim,\n    object: shim,\n    string: shim,\n    symbol: shim,\n\n    any: shim,\n    arrayOf: getShim,\n    element: shim,\n    elementType: shim,\n    instanceOf: getShim,\n    node: shim,\n    objectOf: getShim,\n    oneOf: getShim,\n    oneOfType: getShim,\n    shape: getShim,\n    exact: getShim,\n\n    checkPropTypes: emptyFunctionWithReset,\n    resetWarningCache: emptyFunction\n  };\n\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 * 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","\"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\";\nexports.__esModule = true;\nvar TextareaAutosize_1 = require(\"./TextareaAutosize\");\nexports[\"default\"] = TextareaAutosize_1.TextareaAutosize;\n","var characterMap = {\r\n\t\"À\": \"A\",\r\n\t\"Á\": \"A\",\r\n\t\"Â\": \"A\",\r\n\t\"Ã\": \"A\",\r\n\t\"Ä\": \"A\",\r\n\t\"Å\": \"A\",\r\n\t\"Ấ\": \"A\",\r\n\t\"Ắ\": \"A\",\r\n\t\"Ẳ\": \"A\",\r\n\t\"Ẵ\": \"A\",\r\n\t\"Ặ\": \"A\",\r\n\t\"Æ\": \"AE\",\r\n\t\"Ầ\": \"A\",\r\n\t\"Ằ\": \"A\",\r\n\t\"Ȃ\": \"A\",\r\n\t\"Ç\": \"C\",\r\n\t\"Ḉ\": \"C\",\r\n\t\"È\": \"E\",\r\n\t\"É\": \"E\",\r\n\t\"Ê\": \"E\",\r\n\t\"Ë\": \"E\",\r\n\t\"Ế\": \"E\",\r\n\t\"Ḗ\": \"E\",\r\n\t\"Ề\": \"E\",\r\n\t\"Ḕ\": \"E\",\r\n\t\"Ḝ\": \"E\",\r\n\t\"Ȇ\": \"E\",\r\n\t\"Ì\": \"I\",\r\n\t\"Í\": \"I\",\r\n\t\"Î\": \"I\",\r\n\t\"Ï\": \"I\",\r\n\t\"Ḯ\": \"I\",\r\n\t\"Ȋ\": \"I\",\r\n\t\"Ð\": \"D\",\r\n\t\"Ñ\": \"N\",\r\n\t\"Ò\": \"O\",\r\n\t\"Ó\": \"O\",\r\n\t\"Ô\": \"O\",\r\n\t\"Õ\": \"O\",\r\n\t\"Ö\": \"O\",\r\n\t\"Ø\": \"O\",\r\n\t\"Ố\": \"O\",\r\n\t\"Ṍ\": \"O\",\r\n\t\"Ṓ\": \"O\",\r\n\t\"Ȏ\": \"O\",\r\n\t\"Ù\": \"U\",\r\n\t\"Ú\": \"U\",\r\n\t\"Û\": \"U\",\r\n\t\"Ü\": \"U\",\r\n\t\"Ý\": \"Y\",\r\n\t\"à\": \"a\",\r\n\t\"á\": \"a\",\r\n\t\"â\": \"a\",\r\n\t\"ã\": \"a\",\r\n\t\"ä\": \"a\",\r\n\t\"å\": \"a\",\r\n\t\"ấ\": \"a\",\r\n\t\"ắ\": \"a\",\r\n\t\"ẳ\": \"a\",\r\n\t\"ẵ\": \"a\",\r\n\t\"ặ\": \"a\",\r\n\t\"æ\": \"ae\",\r\n\t\"ầ\": \"a\",\r\n\t\"ằ\": \"a\",\r\n\t\"ȃ\": \"a\",\r\n\t\"ç\": \"c\",\r\n\t\"ḉ\": \"c\",\r\n\t\"è\": \"e\",\r\n\t\"é\": \"e\",\r\n\t\"ê\": \"e\",\r\n\t\"ë\": \"e\",\r\n\t\"ế\": \"e\",\r\n\t\"ḗ\": \"e\",\r\n\t\"ề\": \"e\",\r\n\t\"ḕ\": \"e\",\r\n\t\"ḝ\": \"e\",\r\n\t\"ȇ\": \"e\",\r\n\t\"ì\": \"i\",\r\n\t\"í\": \"i\",\r\n\t\"î\": \"i\",\r\n\t\"ï\": \"i\",\r\n\t\"ḯ\": \"i\",\r\n\t\"ȋ\": \"i\",\r\n\t\"ð\": \"d\",\r\n\t\"ñ\": \"n\",\r\n\t\"ò\": \"o\",\r\n\t\"ó\": \"o\",\r\n\t\"ô\": \"o\",\r\n\t\"õ\": \"o\",\r\n\t\"ö\": \"o\",\r\n\t\"ø\": \"o\",\r\n\t\"ố\": \"o\",\r\n\t\"ṍ\": \"o\",\r\n\t\"ṓ\": \"o\",\r\n\t\"ȏ\": \"o\",\r\n\t\"ù\": \"u\",\r\n\t\"ú\": \"u\",\r\n\t\"û\": \"u\",\r\n\t\"ü\": \"u\",\r\n\t\"ý\": \"y\",\r\n\t\"ÿ\": \"y\",\r\n\t\"Ā\": \"A\",\r\n\t\"ā\": \"a\",\r\n\t\"Ă\": \"A\",\r\n\t\"ă\": \"a\",\r\n\t\"Ą\": \"A\",\r\n\t\"ą\": \"a\",\r\n\t\"Ć\": \"C\",\r\n\t\"ć\": \"c\",\r\n\t\"Ĉ\": \"C\",\r\n\t\"ĉ\": \"c\",\r\n\t\"Ċ\": \"C\",\r\n\t\"ċ\": \"c\",\r\n\t\"Č\": \"C\",\r\n\t\"č\": \"c\",\r\n\t\"C̆\": \"C\",\r\n\t\"c̆\": \"c\",\r\n\t\"Ď\": \"D\",\r\n\t\"ď\": \"d\",\r\n\t\"Đ\": \"D\",\r\n\t\"đ\": \"d\",\r\n\t\"Ē\": \"E\",\r\n\t\"ē\": \"e\",\r\n\t\"Ĕ\": \"E\",\r\n\t\"ĕ\": \"e\",\r\n\t\"Ė\": \"E\",\r\n\t\"ė\": \"e\",\r\n\t\"Ę\": \"E\",\r\n\t\"ę\": \"e\",\r\n\t\"Ě\": \"E\",\r\n\t\"ě\": \"e\",\r\n\t\"Ĝ\": \"G\",\r\n\t\"Ǵ\": \"G\",\r\n\t\"ĝ\": \"g\",\r\n\t\"ǵ\": \"g\",\r\n\t\"Ğ\": \"G\",\r\n\t\"ğ\": \"g\",\r\n\t\"Ġ\": \"G\",\r\n\t\"ġ\": \"g\",\r\n\t\"Ģ\": \"G\",\r\n\t\"ģ\": \"g\",\r\n\t\"Ĥ\": \"H\",\r\n\t\"ĥ\": \"h\",\r\n\t\"Ħ\": \"H\",\r\n\t\"ħ\": \"h\",\r\n\t\"Ḫ\": \"H\",\r\n\t\"ḫ\": \"h\",\r\n\t\"Ĩ\": \"I\",\r\n\t\"ĩ\": \"i\",\r\n\t\"Ī\": \"I\",\r\n\t\"ī\": \"i\",\r\n\t\"Ĭ\": \"I\",\r\n\t\"ĭ\": \"i\",\r\n\t\"Į\": \"I\",\r\n\t\"į\": \"i\",\r\n\t\"İ\": \"I\",\r\n\t\"ı\": \"i\",\r\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ŝ\": \"S\",\r\n\t\"ŝ\": \"s\",\r\n\t\"Ş\": \"S\",\r\n\t\"Ș\": \"S\",\r\n\t\"ș\": \"s\",\r\n\t\"ş\": \"s\",\r\n\t\"Š\": \"S\",\r\n\t\"š\": \"s\",\r\n\t\"Ţ\": \"T\",\r\n\t\"ţ\": \"t\",\r\n\t\"ț\": \"t\",\r\n\t\"Ț\": \"T\",\r\n\t\"Ť\": \"T\",\r\n\t\"ť\": \"t\",\r\n\t\"Ŧ\": \"T\",\r\n\t\"ŧ\": \"t\",\r\n\t\"T̆\": \"T\",\r\n\t\"t̆\": \"t\",\r\n\t\"Ũ\": \"U\",\r\n\t\"ũ\": \"u\",\r\n\t\"Ū\": \"U\",\r\n\t\"ū\": \"u\",\r\n\t\"Ŭ\": \"U\",\r\n\t\"ŭ\": \"u\",\r\n\t\"Ů\": \"U\",\r\n\t\"ů\": \"u\",\r\n\t\"Ű\": \"U\",\r\n\t\"ű\": \"u\",\r\n\t\"Ų\": \"U\",\r\n\t\"ų\": \"u\",\r\n\t\"Ȗ\": \"U\",\r\n\t\"ȗ\": \"u\",\r\n\t\"V̆\": \"V\",\r\n\t\"v̆\": \"v\",\r\n\t\"Ŵ\": \"W\",\r\n\t\"ŵ\": \"w\",\r\n\t\"Ẃ\": \"W\",\r\n\t\"ẃ\": \"w\",\r\n\t\"X̆\": \"X\",\r\n\t\"x̆\": \"x\",\r\n\t\"Ŷ\": \"Y\",\r\n\t\"ŷ\": \"y\",\r\n\t\"Ÿ\": \"Y\",\r\n\t\"Y̆\": \"Y\",\r\n\t\"y̆\": \"y\",\r\n\t\"Ź\": \"Z\",\r\n\t\"ź\": \"z\",\r\n\t\"Ż\": \"Z\",\r\n\t\"ż\": \"z\",\r\n\t\"Ž\": \"Z\",\r\n\t\"ž\": \"z\",\r\n\t\"ſ\": \"s\",\r\n\t\"ƒ\": \"f\",\r\n\t\"Ơ\": \"O\",\r\n\t\"ơ\": \"o\",\r\n\t\"Ư\": \"U\",\r\n\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n\t\"ḑ\": \"d\",\r\n\t\"Ȩ\": \"E\",\r\n\t\"ȩ\": \"e\",\r\n\t\"Ɛ̧\": \"E\",\r\n\t\"ɛ̧\": \"e\",\r\n\t\"Ḩ\": \"H\",\r\n\t\"ḩ\": \"h\",\r\n\t\"I̧\": \"I\",\r\n\t\"i̧\": \"i\",\r\n\t\"Ɨ̧\": \"I\",\r\n\t\"ɨ̧\": \"i\",\r\n\t\"M̧\": \"M\",\r\n\t\"m̧\": \"m\",\r\n\t\"O̧\": \"O\",\r\n\t\"o̧\": \"o\",\r\n\t\"Q̧\": \"Q\",\r\n\t\"q̧\": \"q\",\r\n\t\"U̧\": \"U\",\r\n\t\"u̧\": \"u\",\r\n\t\"X̧\": \"X\",\r\n\t\"x̧\": \"x\",\r\n\t\"Z̧\": \"Z\",\r\n\t\"z̧\": \"z\",\r\n};\r\n\r\nvar chars = Object.keys(characterMap).join('|');\r\nvar allAccents = new RegExp(chars, 'g');\r\nvar firstAccent = new RegExp(chars, '');\r\n\r\nvar removeAccents = function(string) {\t\r\n\treturn string.replace(allAccents, function(match) {\r\n\t\treturn characterMap[match];\r\n\t});\r\n};\r\n\r\nvar hasAccents = function(string) {\r\n\treturn !!string.match(firstAccent);\r\n};\r\n\r\nmodule.exports = removeAccents;\r\nmodule.exports.has = hasAccents;\r\nmodule.exports.remove = removeAccents;\r\n","module.exports = window[\"React\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"element\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"blocks\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"blockLibrary\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"data\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"deprecated\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"coreData\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"editor\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"components\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"i18n\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"primitives\"];","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst check = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z\" />\n\t</SVG>\n);\n\nexport default check;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst starFilled = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\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\nexport default starFilled;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst starEmpty = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\td=\"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\t\tclipRule=\"evenodd\"\n\t\t/>\n\t</SVG>\n);\n\nexport default starEmpty;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"viewport\"];","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst closeSmall = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\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\nexport default closeSmall;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"preferences\"];","/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { store as preferencesStore } from '@wordpress/preferences';\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\ttype: 'SET_DEFAULT_COMPLEMENTARY_AREA',\n\tscope,\n\tarea,\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\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\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\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\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 { createRegistrySelector } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { store as preferencesStore } from '@wordpress/preferences';\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\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\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\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 * 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} );\n\n// Once we build a more generic persistence plugin that works across types of stores\n// we'd be able to replace this with a register call.\nregister( store );\n","/**\n * The identifier for the data store.\n *\n * @type {string}\n */\nexport const STORE_NAME = 'core/interface';\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"plugins\"];","/**\n * WordPress dependencies\n */\nimport { withPluginContext } from '@wordpress/plugins';\n\nexport default withPluginContext( ( context, ownProps ) => {\n\treturn {\n\t\ticon: ownProps.icon || context.icon,\n\t\tidentifier:\n\t\t\townProps.identifier || `${ context.name }/${ ownProps.name }`,\n\t};\n} );\n","/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as interfaceStore } from '../../store';\nimport complementaryAreaContext from '../complementary-area-context';\n\nfunction ComplementaryAreaToggle( {\n\tas = Button,\n\tscope,\n\tidentifier,\n\ticon,\n\tselectedIcon,\n\tname,\n\t...props\n} ) {\n\tconst ComponentToUse = as;\n\tconst isSelected = useSelect(\n\t\t( select ) =>\n\t\t\tselect( interfaceStore ).getActiveComplementaryArea( scope ) ===\n\t\t\tidentifier,\n\t\t[ identifier ]\n\t);\n\tconst { enableComplementaryArea, disableComplementaryArea } =\n\t\tuseDispatch( interfaceStore );\n\treturn (\n\t\t<ComponentToUse\n\t\t\ticon={ selectedIcon && isSelected ? selectedIcon : icon }\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\t{ ...props }\n\t\t/>\n\t);\n}\n\nexport default complementaryAreaContext( ComplementaryAreaToggle );\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\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\tsmallScreenTitle,\n\tchildren,\n\tclassName,\n\ttoggleButtonProps,\n} ) => {\n\tconst toggleButton = (\n\t\t<ComplementaryAreaToggle icon={ closeSmall } { ...toggleButtonProps } />\n\t);\n\treturn (\n\t\t<>\n\t\t\t<div className=\"components-panel__header interface-complementary-area-header__small\">\n\t\t\t\t{ smallScreenTitle && (\n\t\t\t\t\t<span className=\"interface-complementary-area-header__small-title\">\n\t\t\t\t\t\t{ smallScreenTitle }\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t\t{ toggleButton }\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'components-panel__header',\n\t\t\t\t\t'interface-complementary-area-header',\n\t\t\t\t\tclassName\n\t\t\t\t) }\n\t\t\t\ttabIndex={ -1 }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t\t{ toggleButton }\n\t\t\t</div>\n\t\t</>\n\t);\n};\n\nexport default ComplementaryAreaHeader;\n","/**\n * WordPress dependencies\n */\nimport { ButtonGroup, Button, Slot, Fill } from '@wordpress/components';\nimport { Children } from '@wordpress/element';\n\nconst noop = () => {};\n\nfunction ActionItemSlot( {\n\tname,\n\tas: Component = ButtonGroup,\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 * 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 * External dependencies\n */\nimport classnames from 'classnames';\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={ classnames(\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 * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Button, Panel, Slot, Fill } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { check, starEmpty, starFilled } from '@wordpress/icons';\nimport { useEffect, useRef } from '@wordpress/element';\nimport { store as viewportStore } from '@wordpress/viewport';\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 withComplementaryAreaContext from '../complementary-area-context';\nimport PinnedItems from '../pinned-items';\nimport { store as interfaceStore } from '../../store';\n\nfunction ComplementaryAreaSlot( { scope, ...props } ) {\n\treturn <Slot name={ `ComplementaryArea/${ scope }` } { ...props } />;\n}\n\nfunction ComplementaryAreaFill( { scope, children, className } ) {\n\treturn (\n\t\t<Fill name={ `ComplementaryArea/${ scope }` }>\n\t\t\t<div className={ className }>{ children }</div>\n\t\t</Fill>\n\t);\n}\n\nfunction useAdjustComplementaryListener(\n\tscope,\n\tidentifier,\n\tactiveArea,\n\tisActive,\n\tisSmall\n) {\n\tconst previousIsSmall = useRef( false );\n\tconst shouldOpenWhenNotSmall = 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 && ! previousIsSmall.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\tshouldOpenWhenNotSmall.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\tshouldOpenWhenNotSmall.current &&\n\t\t\t! isSmall &&\n\t\t\tpreviousIsSmall.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\tshouldOpenWhenNotSmall.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\tshouldOpenWhenNotSmall.current &&\n\t\t\tactiveArea &&\n\t\t\tactiveArea !== identifier\n\t\t) {\n\t\t\tshouldOpenWhenNotSmall.current = false;\n\t\t}\n\t\tif ( isSmall !== previousIsSmall.current ) {\n\t\t\tpreviousIsSmall.current = isSmall;\n\t\t}\n\t}, [ isActive, isSmall, scope, identifier, activeArea ] );\n}\n\nfunction ComplementaryArea( {\n\tchildren,\n\tclassName,\n\tcloseLabel = __( 'Close plugin' ),\n\tidentifier,\n\theader,\n\theaderClassName,\n\ticon,\n\tisPinnable = true,\n\tpanelClassName,\n\tscope,\n\tname,\n\tsmallScreenTitle,\n\ttitle,\n\ttoggleShortcut,\n\tisActiveByDefault,\n\tshowIconLabels = false,\n} ) {\n\tconst { isLoading, isActive, isPinned, activeArea, isSmall, isLarge } =\n\t\tuseSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst {\n\t\t\t\t\tgetActiveComplementaryArea,\n\t\t\t\t\tisComplementaryAreaLoading,\n\t\t\t\t\tisItemPinned,\n\t\t\t\t} = select( interfaceStore );\n\n\t\t\t\tconst _activeArea = getActiveComplementaryArea( scope );\n\n\t\t\t\treturn {\n\t\t\t\t\tisLoading: isComplementaryAreaLoading( scope ),\n\t\t\t\t\tisActive: _activeArea === identifier,\n\t\t\t\t\tisPinned: isItemPinned( scope, identifier ),\n\t\t\t\t\tactiveArea: _activeArea,\n\t\t\t\t\tisSmall:\n\t\t\t\t\t\tselect( viewportStore ).isViewportMatch( '< medium' ),\n\t\t\t\t\tisLarge: select( viewportStore ).isViewportMatch( 'large' ),\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ identifier, scope ]\n\t\t);\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}, [ activeArea, isActiveByDefault, scope, identifier, isSmall ] );\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/>\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>\n\t\t\t\t\t{ title }\n\t\t\t\t</ComplementaryAreaMoreMenuItem>\n\t\t\t) }\n\t\t\t{ isActive && (\n\t\t\t\t<ComplementaryAreaFill\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'interface-complementary-area',\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t\tscope={ scope }\n\t\t\t\t>\n\t\t\t\t\t<ComplementaryAreaHeader\n\t\t\t\t\t\tclassName={ headerClassName }\n\t\t\t\t\t\tcloseLabel={ closeLabel }\n\t\t\t\t\t\tonClose={ () => disableComplementaryArea( scope ) }\n\t\t\t\t\t\tsmallScreenTitle={ smallScreenTitle }\n\t\t\t\t\t\ttoggleButtonProps={ {\n\t\t\t\t\t\t\tlabel: closeLabel,\n\t\t\t\t\t\t\tshortcut: toggleShortcut,\n\t\t\t\t\t\t\tscope,\n\t\t\t\t\t\t\tidentifier,\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ header || (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<strong>{ title }</strong>\n\t\t\t\t\t\t\t\t{ isPinnable && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tclassName=\"interface-complementary-area__pin-unpin-item\"\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tisPinned ? starFilled : starEmpty\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\tisPinned\n\t\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\t: __( 'Pin to toolbar' )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t\t( isPinned ? unpinItem : pinItem )(\n\t\t\t\t\t\t\t\t\t\t\t\tscope,\n\t\t\t\t\t\t\t\t\t\t\t\tidentifier\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\tisPressed={ isPinned }\n\t\t\t\t\t\t\t\t\t\taria-expanded={ isPinned }\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</ComplementaryAreaHeader>\n\t\t\t\t\t<Panel className={ panelClassName }>{ children }</Panel>\n\t\t\t\t</ComplementaryAreaFill>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nconst ComplementaryAreaWrapped =\n\twithComplementaryAreaContext( ComplementaryArea );\n\nComplementaryAreaWrapped.Slot = ComplementaryAreaSlot;\n\nexport default ComplementaryAreaWrapped;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"compose\"];","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\nexport default function NavigableRegion( {\n\tchildren,\n\tclassName,\n\tariaLabel,\n\tas: Tag = 'div',\n\t...props\n} ) {\n\treturn (\n\t\t<Tag\n\t\t\tclassName={ classnames( 'interface-navigable-region', className ) }\n\t\t\taria-label={ ariaLabel }\n\t\t\trole=\"region\"\n\t\t\ttabIndex=\"-1\"\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ children }\n\t\t</Tag>\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useEffect } from '@wordpress/element';\nimport {\n\t__unstableUseNavigateRegions as useNavigateRegions,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport NavigableRegion from '../navigable-region';\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: 0 },\n\thover: {\n\t\topacity: 1,\n\t\ttransition: { type: 'tween', delay: 0.2, delayChildren: 0.2 },\n\t},\n\tdistractionFreeInactive: { opacity: 1, transition: { delay: 0 } },\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\tnotices,\n\t\tcontent,\n\t\tactions,\n\t\tlabels,\n\t\tclassName,\n\t\tenableRegionNavigation = true,\n\t\t// Todo: does this need to be a prop.\n\t\t// Can we use a dependency to keyboard-shortcuts directly?\n\t\tshortcuts,\n\t},\n\tref\n) {\n\tconst navigateRegionsProps = useNavigateRegions( shortcuts );\n\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: __( 'Header' ),\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: __( 'Settings' ),\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\t{ ...( enableRegionNavigation ? navigateRegionsProps : {} ) }\n\t\t\tref={ useMergeRefs( [\n\t\t\t\tref,\n\t\t\t\tenableRegionNavigation ? navigateRegionsProps.ref : undefined,\n\t\t\t] ) }\n\t\t\tclassName={ classnames(\n\t\t\t\tclassName,\n\t\t\t\t'interface-interface-skeleton',\n\t\t\t\tnavigateRegionsProps.className,\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{ !! header && (\n\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\tas={ motion.div }\n\t\t\t\t\t\tclassName=\"interface-interface-skeleton__header\"\n\t\t\t\t\t\taria-label={ mergedLabels.header }\n\t\t\t\t\t\tinitial={\n\t\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t\t? 'hidden'\n\t\t\t\t\t\t\t\t: 'distractionFreeInactive'\n\t\t\t\t\t\t}\n\t\t\t\t\t\twhileHover={\n\t\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t\t? 'hover'\n\t\t\t\t\t\t\t\t: 'distractionFreeInactive'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tanimate={\n\t\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t\t? 'hidden'\n\t\t\t\t\t\t\t\t: 'distractionFreeInactive'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvariants={ headerVariants }\n\t\t\t\t\t\ttransition={\n\t\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t\t? { type: 'tween', delay: 0.8 }\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\t\t{ header }\n\t\t\t\t\t</NavigableRegion>\n\t\t\t\t) }\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{ !! secondarySidebar && (\n\t\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\t\tclassName=\"interface-interface-skeleton__secondary-sidebar\"\n\t\t\t\t\t\t\tariaLabel={ mergedLabels.secondarySidebar }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ secondarySidebar }\n\t\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t) }\n\t\t\t\t\t{ !! notices && (\n\t\t\t\t\t\t<div className=\"interface-interface-skeleton__notices\">\n\t\t\t\t\t\t\t{ notices }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\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 { SVG, Path } from '@wordpress/primitives';\n\nconst moreVertical = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z\" />\n\t</SVG>\n);\n\nexport default moreVertical;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { DropdownMenu } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { moreVertical } from '@wordpress/icons';\n\nexport default function MoreMenuDropdown( {\n\tas: DropdownComponent = DropdownMenu,\n\tclassName,\n\t/* translators: button label text should, if possible, be under 16 characters. */\n\tlabel = __( 'Options' ),\n\tpopoverProps,\n\ttoggleProps,\n\tchildren,\n} ) {\n\treturn (\n\t\t<DropdownComponent\n\t\t\tclassName={ classnames(\n\t\t\t\t'interface-more-menu-dropdown',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\ticon={ moreVertical }\n\t\t\tlabel={ label }\n\t\t\tpopoverProps={ {\n\t\t\t\tplacement: 'bottom-end',\n\t\t\t\t...popoverProps,\n\t\t\t\tclassName: classnames(\n\t\t\t\t\t'interface-more-menu-dropdown__content',\n\t\t\t\t\tpopoverProps?.className\n\t\t\t\t),\n\t\t\t} }\n\t\t\ttoggleProps={ {\n\t\t\t\ttooltipPosition: 'bottom',\n\t\t\t\t...toggleProps,\n\t\t\t} }\n\t\t>\n\t\t\t{ ( onClose ) => children( onClose ) }\n\t\t</DropdownComponent>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nexport default function PreferencesModal( { closeModal, children } ) {\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"interface-preferences-modal\"\n\t\t\ttitle={ __( 'Preferences' ) }\n\t\t\tonRequestClose={ closeModal }\n\t\t>\n\t\t\t{ children }\n\t\t</Modal>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { cloneElement } from '@wordpress/element';\n\n/** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */\n\n/**\n * Return an SVG icon.\n *\n * @param {IconProps} props icon is the SVG component to render\n *                          size is a number specifiying the icon size in pixels\n *                          Other props will be passed to wrapped SVG component\n *\n * @return {JSX.Element}  Icon component\n */\nfunction Icon( { icon, size = 24, ...props } ) {\n\treturn cloneElement( icon, {\n\t\twidth: size,\n\t\theight: size,\n\t\t...props,\n\t} );\n}\n\nexport default Icon;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst chevronLeft = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z\" />\n\t</SVG>\n);\n\nexport default chevronLeft;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst chevronRight = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z\" />\n\t</SVG>\n);\n\nexport default chevronRight;\n","/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\t__experimentalNavigatorProvider as NavigatorProvider,\n\t__experimentalNavigatorScreen as NavigatorScreen,\n\t__experimentalNavigatorButton as NavigatorButton,\n\t__experimentalNavigatorBackButton as NavigatorBackButton,\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalItem as Item,\n\t__experimentalHStack as HStack,\n\t__experimentalText as Text,\n\t__experimentalTruncate as Truncate,\n\tFlexItem,\n\tTabPanel,\n\tCard,\n\tCardHeader,\n\tCardBody,\n} from '@wordpress/components';\nimport { useMemo, useCallback, useState } from '@wordpress/element';\nimport { chevronLeft, chevronRight, Icon } from '@wordpress/icons';\nimport { isRTL, __ } from '@wordpress/i18n';\n\nconst PREFERENCES_MENU = 'preferences-menu';\n\nexport default function PreferencesModalTabs( { sections } ) {\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\n\t// This is also used to sync the two different rendered components\n\t// between small and large viewports.\n\tconst [ activeMenu, setActiveMenu ] = useState( PREFERENCES_MENU );\n\t/**\n\t * Create helper objects from `sections` for easier data handling.\n\t * `tabs` is used for creating the `TabPanel` and `sectionsContentMap`\n\t * is used for easier access to active tab's content.\n\t */\n\tconst { tabs, sectionsContentMap } = useMemo( () => {\n\t\tlet mappedTabs = {\n\t\t\ttabs: [],\n\t\t\tsectionsContentMap: {},\n\t\t};\n\t\tif ( sections.length ) {\n\t\t\tmappedTabs = sections.reduce(\n\t\t\t\t( accumulator, { name, tabLabel: title, content } ) => {\n\t\t\t\t\taccumulator.tabs.push( { name, title } );\n\t\t\t\t\taccumulator.sectionsContentMap[ name ] = content;\n\t\t\t\t\treturn accumulator;\n\t\t\t\t},\n\t\t\t\t{ tabs: [], sectionsContentMap: {} }\n\t\t\t);\n\t\t}\n\t\treturn mappedTabs;\n\t}, [ sections ] );\n\n\tconst getCurrentTab = useCallback(\n\t\t( tab ) => sectionsContentMap[ tab.name ] || null,\n\t\t[ sectionsContentMap ]\n\t);\n\n\tlet modalContent;\n\t// We render different components based on the viewport size.\n\tif ( isLargeViewport ) {\n\t\tmodalContent = (\n\t\t\t<TabPanel\n\t\t\t\tclassName=\"interface-preferences__tabs\"\n\t\t\t\ttabs={ tabs }\n\t\t\t\tinitialTabName={\n\t\t\t\t\tactiveMenu !== PREFERENCES_MENU ? activeMenu : undefined\n\t\t\t\t}\n\t\t\t\tonSelect={ setActiveMenu }\n\t\t\t\torientation=\"vertical\"\n\t\t\t>\n\t\t\t\t{ getCurrentTab }\n\t\t\t</TabPanel>\n\t\t);\n\t} else {\n\t\tmodalContent = (\n\t\t\t<NavigatorProvider\n\t\t\t\tinitialPath=\"/\"\n\t\t\t\tclassName=\"interface-preferences__provider\"\n\t\t\t>\n\t\t\t\t<NavigatorScreen path=\"/\">\n\t\t\t\t\t<Card isBorderless size=\"small\">\n\t\t\t\t\t\t<CardBody>\n\t\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t\t{ tabs.map( ( tab ) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<NavigatorButton\n\t\t\t\t\t\t\t\t\t\t\tkey={ tab.name }\n\t\t\t\t\t\t\t\t\t\t\tpath={ tab.name }\n\t\t\t\t\t\t\t\t\t\t\tas={ Item }\n\t\t\t\t\t\t\t\t\t\t\tisAction\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Truncate>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ tab.title }\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Truncate>\n\t\t\t\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\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\t\t\t? chevronLeft\n\t\t\t\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\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</FlexItem>\n\t\t\t\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t\t\t\t</NavigatorButton>\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</ItemGroup>\n\t\t\t\t\t\t</CardBody>\n\t\t\t\t\t</Card>\n\t\t\t\t</NavigatorScreen>\n\t\t\t\t{ sections.length &&\n\t\t\t\t\tsections.map( ( section ) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<NavigatorScreen\n\t\t\t\t\t\t\t\tkey={ `${ section.name }-menu` }\n\t\t\t\t\t\t\t\tpath={ section.name }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Card isBorderless size=\"large\">\n\t\t\t\t\t\t\t\t\t<CardHeader\n\t\t\t\t\t\t\t\t\t\tisBorderless={ false }\n\t\t\t\t\t\t\t\t\t\tjustify=\"left\"\n\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\tgap=\"6\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<NavigatorBackButton\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? chevronRight\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}\n\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'Navigate to the previous view'\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<Text size=\"16\">\n\t\t\t\t\t\t\t\t\t\t\t{ section.tabLabel }\n\t\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t\t\t<CardBody>{ section.content }</CardBody>\n\t\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t\t</NavigatorScreen>\n\t\t\t\t\t\t);\n\t\t\t\t\t} ) }\n\t\t\t</NavigatorProvider>\n\t\t);\n\t}\n\n\treturn modalContent;\n}\n","const Section = ( { description, title, children } ) => (\n\t<fieldset className=\"interface-preferences-modal__section\">\n\t\t<legend className=\"interface-preferences-modal__section-legend\">\n\t\t\t<h2 className=\"interface-preferences-modal__section-title\">\n\t\t\t\t{ title }\n\t\t\t</h2>\n\t\t\t{ description && (\n\t\t\t\t<p className=\"interface-preferences-modal__section-description\">\n\t\t\t\t\t{ description }\n\t\t\t\t</p>\n\t\t\t) }\n\t\t</legend>\n\t\t{ children }\n\t</fieldset>\n);\n\nexport default Section;\n","/**\n * WordPress dependencies\n */\nimport { ToggleControl } from '@wordpress/components';\n\nfunction BaseOption( { help, label, isChecked, onChange, children } ) {\n\treturn (\n\t\t<div className=\"interface-preferences-modal__option\">\n\t\t\t<ToggleControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\thelp={ help }\n\t\t\t\tlabel={ label }\n\t\t\t\tchecked={ isChecked }\n\t\t\t\tonChange={ onChange }\n\t\t\t/>\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default BaseOption;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"widgets\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"hooks\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"mediaUtils\"];","/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { MediaUpload } from '@wordpress/media-utils';\n\naddFilter(\n\t'editor.MediaUpload',\n\t'core/edit-site/components/media-upload',\n\t() => MediaUpload\n);\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"lodash\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"blockEditor\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"notices\"];","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","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","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"privateApis\"];","/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.',\n\t\t'@wordpress/edit-site'\n\t);\n","/**\n * External dependencies\n */\nimport { colord, extend } from 'colord';\nimport a11yPlugin from 'colord/plugins/a11y';\n\n/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { useSelect } from '@wordpress/data';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\n\n// Enable colord's a11y plugin.\nextend( [ a11yPlugin ] );\n\nexport function useColorRandomizer( name ) {\n\tconst [ themeColors, setThemeColors ] = useGlobalSetting(\n\t\t'color.palette.theme',\n\t\tname\n\t);\n\n\tfunction randomizeColors() {\n\t\t/* eslint-disable no-restricted-syntax */\n\t\tconst randomRotationValue = Math.floor( Math.random() * 225 );\n\t\t/* eslint-enable no-restricted-syntax */\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}\n\n\treturn window.__experimentalEnableColorRandomizer\n\t\t? [ randomizeColors ]\n\t\t: [];\n}\n\nexport function useSupportedStyles( name, element ) {\n\tconst { supportedPanels } = useSelect(\n\t\t( select ) => {\n\t\t\treturn {\n\t\t\t\tsupportedPanels: unlock(\n\t\t\t\t\tselect( blocksStore )\n\t\t\t\t).getSupportedStyles( name, element ),\n\t\t\t};\n\t\t},\n\t\t[ name, element ]\n\t);\n\n\treturn supportedPanels;\n}\n","/**\n * External dependencies\n */\nimport { get, set } from 'lodash';\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} from '@wordpress/block-editor';\nimport { BaseControl, Button } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\t__EXPERIMENTAL_STYLE_PROPERTY as STYLE_PROPERTY,\n\tgetBlockType,\n} from '@wordpress/blocks';\nimport { useContext, useMemo, useCallback } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { useSupportedStyles } from '../../components/global-styles/hooks';\nimport { unlock } from '../../lock-unlock';\n\nconst { GlobalStylesContext, useBlockEditingMode } = unlock(\n\tblockEditorPrivateApis\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'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\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'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\nfunction useChangesToPush( name, attributes ) {\n\tconst supports = useSupportedStyles( name );\n\n\treturn useMemo(\n\t\t() =>\n\t\t\tsupports.flatMap( ( key ) => {\n\t\t\t\tif ( ! STYLE_PROPERTY[ key ] ) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\t\t\t\tconst { value: path } = STYLE_PROPERTY[ key ];\n\t\t\t\tconst presetAttributeKey = path.join( '.' );\n\t\t\t\tconst presetAttributeValue =\n\t\t\t\t\tattributes[\n\t\t\t\t\t\tSTYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE[\n\t\t\t\t\t\t\tpresetAttributeKey\n\t\t\t\t\t\t]\n\t\t\t\t\t];\n\t\t\t\tconst value = presetAttributeValue\n\t\t\t\t\t? `var:preset|${ STYLE_PATH_TO_CSS_VAR_INFIX[ presetAttributeKey ] }|${ presetAttributeValue }`\n\t\t\t\t\t: get( attributes.style, path );\n\t\t\t\treturn value ? [ { path, value } ] : [];\n\t\t\t} ),\n\t\t[ supports, name, attributes ]\n\t);\n}\n\nfunction cloneDeep( object ) {\n\treturn ! object ? {} : JSON.parse( JSON.stringify( object ) );\n}\n\nfunction PushChangesToGlobalStylesControl( {\n\tname,\n\tattributes,\n\tsetAttributes,\n} ) {\n\tconst changes = useChangesToPush( name, attributes );\n\n\tconst { user: userConfig, setUserConfig } =\n\t\tuseContext( GlobalStylesContext );\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\tconst { style: blockStyles } = attributes;\n\n\t\tconst newBlockStyles = cloneDeep( blockStyles );\n\t\tconst newUserConfig = cloneDeep( userConfig );\n\n\t\tfor ( const { path, value } of changes ) {\n\t\t\tset( newBlockStyles, path, undefined );\n\t\t\tset( newUserConfig, [ 'styles', 'blocks', name, ...path ], value );\n\t\t}\n\n\t\t// @wordpress/core-data doesn't support editing multiple entity types in\n\t\t// a single undo level. So for now, we disable @wordpress/core-data undo\n\t\t// tracking and implement our own Undo button in the snackbar\n\t\t// notification.\n\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\tsetAttributes( { style: newBlockStyles } );\n\t\tsetUserConfig( () => newUserConfig, { undoIgnore: true } );\n\n\t\tcreateSuccessNotice(\n\t\t\tsprintf(\n\t\t\t\t// translators: %s: Title of the block e.g. 'Heading'.\n\t\t\t\t__( '%s styles applied.' ),\n\t\t\t\tgetBlockType( name ).title\n\t\t\t),\n\t\t\t{\n\t\t\t\ttype: 'snackbar',\n\t\t\t\tactions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\tonClick() {\n\t\t\t\t\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\t\t\t\t\tsetAttributes( { style: blockStyles } );\n\t\t\t\t\t\t\tsetUserConfig( () => userConfig, {\n\t\t\t\t\t\t\t\tundoIgnore: true,\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}, [ changes, attributes, userConfig, name ] );\n\n\treturn (\n\t\t<BaseControl\n\t\t\tclassName=\"edit-site-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’s 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\tvariant=\"primary\"\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\nconst withPushChangesToGlobalStyles = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst blockEditingMode = useBlockEditingMode();\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockEdit { ...props } />\n\t\t\t\t{ blockEditingMode === 'default' && (\n\t\t\t\t\t<InspectorAdvancedControls>\n\t\t\t\t\t\t<PushChangesToGlobalStylesControl { ...props } />\n\t\t\t\t\t</InspectorAdvancedControls>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t}\n);\n\naddFilter(\n\t'editor.BlockEdit',\n\t'core/edit-site/push-changes-to-global-styles',\n\twithPushChangesToGlobalStyles\n);\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"router\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"url\"];","/**\n * WordPress dependencies\n */\nimport { getQueryArg } from '@wordpress/url';\n\nexport function isPreviewingTheme() {\n\treturn (\n\t\tgetQueryArg( window.location.href, 'wp_theme_preview' ) !== undefined\n\t);\n}\n\nexport function currentlyPreviewingTheme() {\n\tif ( isPreviewingTheme() ) {\n\t\treturn getQueryArg( window.location.href, 'wp_theme_preview' );\n\t}\n\treturn null;\n}\n","/**\n * WordPress dependencies\n */\nimport { addQueryArgs, getQueryArgs, removeQueryArgs } from '@wordpress/url';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport {\n\tisPreviewingTheme,\n\tcurrentlyPreviewingTheme,\n} from '../../utils/is-previewing-theme';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nexport function useLink( params = {}, state, shouldReplace = false ) {\n\tconst history = useHistory();\n\n\tfunction onClick( event ) {\n\t\tevent.preventDefault();\n\n\t\tif ( shouldReplace ) {\n\t\t\thistory.replace( params, state );\n\t\t} else {\n\t\t\thistory.push( params, state );\n\t\t}\n\t}\n\n\tconst currentArgs = getQueryArgs( window.location.href );\n\tconst currentUrlWithoutArgs = removeQueryArgs(\n\t\twindow.location.href,\n\t\t...Object.keys( currentArgs )\n\t);\n\n\tif ( isPreviewingTheme() ) {\n\t\tparams = {\n\t\t\t...params,\n\t\t\twp_theme_preview: currentlyPreviewingTheme(),\n\t\t};\n\t}\n\n\tconst newUrl = addQueryArgs( currentUrlWithoutArgs, params );\n\n\treturn {\n\t\thref: newUrl,\n\t\tonClick,\n\t};\n}\n\nexport default function Link( {\n\tparams = {},\n\tstate,\n\treplace: shouldReplace = false,\n\tchildren,\n\t...props\n} ) {\n\tconst { href, onClick } = useLink( params, state, shouldReplace );\n\n\treturn (\n\t\t<a href={ href } onClick={ onClick } { ...props }>\n\t\t\t{ children }\n\t\t</a>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { BlockControls } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { ToolbarButton } from '@wordpress/components';\nimport { addFilter } from '@wordpress/hooks';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { useLink } from '../components/routes/link';\nimport { unlock } from '../lock-unlock';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nfunction EditTemplatePartMenuItem( { attributes } ) {\n\tconst { theme, slug } = attributes;\n\tconst { params } = useLocation();\n\tconst templatePart = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( coreStore ).getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'wp_template_part',\n\t\t\t\t// Ideally this should be an official public API.\n\t\t\t\t`${ theme }//${ slug }`\n\t\t\t);\n\t\t},\n\t\t[ theme, slug ]\n\t);\n\n\tconst linkProps = useLink(\n\t\t{\n\t\t\tpostId: templatePart?.id,\n\t\t\tpostType: templatePart?.type,\n\t\t\tcanvas: 'edit',\n\t\t},\n\t\t{\n\t\t\tfromTemplateId: params.postId,\n\t\t}\n\t);\n\n\tif ( ! templatePart ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockControls group=\"other\">\n\t\t\t<ToolbarButton\n\t\t\t\t{ ...linkProps }\n\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\tlinkProps.onClick( event );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ __( 'Edit' ) }\n\t\t\t</ToolbarButton>\n\t\t</BlockControls>\n\t);\n}\n\nexport const withEditBlockControls = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst { attributes, name } = props;\n\t\tconst isDisplayed = name === 'core/template-part' && attributes.slug;\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockEdit { ...props } />\n\t\t\t\t{ isDisplayed && (\n\t\t\t\t\t<EditTemplatePartMenuItem attributes={ attributes } />\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t},\n\t'withEditBlockControls'\n);\n\naddFilter(\n\t'editor.BlockEdit',\n\t'core/edit-site/template-part-edit-button',\n\twithEditBlockControls\n);\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tBlockControls,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { ToolbarButton } from '@wordpress/components';\nimport { addFilter } from '@wordpress/hooks';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { useLink } from '../components/routes/link';\nimport { unlock } from '../lock-unlock';\n\nconst { useLocation } = unlock( routerPrivateApis );\nconst { useBlockEditingMode } = unlock( blockEditorPrivateApis );\n\nfunction NavigationMenuEdit( { attributes } ) {\n\tconst { ref } = attributes;\n\tconst { params } = useLocation();\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst navigationMenu = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( coreStore ).getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'wp_navigation',\n\t\t\t\t// Ideally this should be an official public API.\n\t\t\t\tref\n\t\t\t);\n\t\t},\n\t\t[ ref ]\n\t);\n\n\tconst linkProps = useLink(\n\t\t{\n\t\t\tpostId: navigationMenu?.id,\n\t\t\tpostType: navigationMenu?.type,\n\t\t\tcanvas: 'edit',\n\t\t},\n\t\t{\n\t\t\t// this applies to Navigation Menus as well.\n\t\t\tfromTemplateId: params.postId,\n\t\t}\n\t);\n\n\t// A non-default setting for block editing mode indicates that the\n\t// editor should restrict \"editing\" actions. Therefore the `Edit` button\n\t// should not be displayed.\n\tif ( ! navigationMenu || blockEditingMode !== 'default' ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockControls group=\"other\">\n\t\t\t<ToolbarButton\n\t\t\t\t{ ...linkProps }\n\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\tlinkProps.onClick( event );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ __( 'Edit' ) }\n\t\t\t</ToolbarButton>\n\t\t</BlockControls>\n\t);\n}\n\nexport const withEditBlockControls = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst { attributes, name } = props;\n\t\tconst isDisplayed = name === 'core/navigation' && attributes.ref;\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockEdit { ...props } />\n\t\t\t\t{ isDisplayed && (\n\t\t\t\t\t<NavigationMenuEdit attributes={ attributes } />\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t},\n\t'withEditBlockControls'\n);\n\naddFilter(\n\t'editor.BlockEdit',\n\t'core/edit-site/navigation-edit-button',\n\twithEditBlockControls\n);\n","/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\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_PREVIEW_DEVICE_TYPE':\n\t\t\treturn action.deviceType;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the settings.\n *\n * @param {Object} state  Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function settings( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_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\n/**\n * Reducer keeping track of the currently edited Post Type,\n * Post Id and the context provided to fill the content of the block editor.\n *\n * @param {Object} state  Current edited post.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function editedPost( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITED_POST':\n\t\t\treturn {\n\t\t\t\tpostType: action.postType,\n\t\t\t\tid: action.id,\n\t\t\t\tcontext: action.context,\n\t\t\t};\n\t\tcase 'SET_EDITED_POST_CONTEXT':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tcontext: action.context,\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 navigation and list view panels reducers\n * to make sure that only one of the three panels is open at the same time.\n *\n * @param {boolean|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\tcase 'SET_CANVAS_MODE':\n\t\t\treturn false;\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 navigation and inserter panels reducers\n * to make sure that only one of the three 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\tcase 'SET_CANVAS_MODE':\n\t\t\treturn false;\n\t}\n\treturn state;\n}\n\n/**\n * Reducer to set the save view panel open or closed.\n *\n * @param {Object} state  Current state.\n * @param {Object} action Dispatched action.\n */\nexport function saveViewPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_SAVE_VIEW_OPENED':\n\t\t\treturn action.isOpen;\n\t\tcase 'SET_CANVAS_MODE':\n\t\t\treturn false;\n\t}\n\treturn state;\n}\n\n/**\n * Reducer used to track the site editor canvas mode (edit or view).\n *\n * @param {Object} state  Current state.\n * @param {Object} action Dispatched action.\n */\nfunction canvasMode( state = 'init', action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_CANVAS_MODE':\n\t\t\treturn action.mode;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer used to track the site editor canvas container view.\n * Default is `undefined`, denoting the default, visual block editor.\n * This could be, for example, `'style-book'` (the style book).\n *\n * @param {string|undefined} state  Current state.\n * @param {Object}           action Dispatched action.\n */\nfunction editorCanvasContainerView( state = undefined, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITOR_CANVAS_CONTAINER_VIEW':\n\t\t\treturn action.view;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer used to track whether the editor allows only page content to be\n * edited.\n *\n * @param {boolean} state  Current state.\n * @param {Object}  action Dispatched action.\n *\n * @return {boolean} Updated state.\n */\nexport function hasPageContentFocus( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITED_POST':\n\t\t\treturn !! action.context?.postId;\n\t\tcase 'SET_HAS_PAGE_CONTENT_FOCUS':\n\t\t\treturn action.hasPageContentFocus;\n\t}\n\n\treturn state;\n}\n\nexport default combineReducers( {\n\tdeviceType,\n\tsettings,\n\teditedPost,\n\tblockInserterPanel,\n\tlistViewPanel,\n\tsaveViewPanel,\n\tcanvasMode,\n\teditorCanvasContainerView,\n\thasPageContentFocus,\n} );\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"apiFetch\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"a11y\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"htmlEntities\"];","/**\n * The identifier for the data store.\n *\n * @type {string}\n */\nexport const STORE_NAME = 'core/edit-site';\n\nexport const TEMPLATE_PART_AREA_HEADER = 'header';\nexport const TEMPLATE_PART_AREA_FOOTER = 'footer';\nexport const TEMPLATE_PART_AREA_SIDEBAR = 'sidebar';\nexport const TEMPLATE_PART_AREA_GENERAL = 'uncategorized';\n","/**\n * Check if a template is revertable to its original theme-provided template file.\n *\n * @param {Object} template The template entity to check.\n * @return {boolean} Whether the template is revertable.\n */\nexport default function isTemplateRevertable( template ) {\n\tif ( ! template ) {\n\t\treturn false;\n\t}\n\t/* eslint-disable camelcase */\n\treturn template?.source === 'custom' && template?.has_theme_file;\n\t/* eslint-enable camelcase */\n}\n","/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { parse, __unstableSerializeAndClean } from '@wordpress/blocks';\nimport deprecated from '@wordpress/deprecated';\nimport { addQueryArgs, getPathAndQueryString } from '@wordpress/url';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { speak } from '@wordpress/a11y';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { STORE_NAME as editSiteStoreName } from './constants';\nimport isTemplateRevertable from '../utils/is-template-revertable';\n\n/**\n * Dispatches an action that toggles a feature flag.\n *\n * @param {string} featureName Feature name.\n */\nexport function toggleFeature( featureName ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated( \"select( 'core/edit-site' ).toggleFeature( featureName )\", {\n\t\t\tsince: '6.0',\n\t\t\talternative:\n\t\t\t\t\"select( 'core/preferences').toggle( 'core/edit-site', featureName )\",\n\t\t} );\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.toggle( 'core/edit-site', featureName );\n\t};\n}\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 __experimentalSetPreviewDeviceType( deviceType ) {\n\treturn {\n\t\ttype: 'SET_PREVIEW_DEVICE_TYPE',\n\t\tdeviceType,\n\t};\n}\n\n/**\n * Action that sets a template, optionally fetching it from REST API.\n *\n * @param {number} templateId   The template ID.\n * @param {string} templateSlug The template slug.\n * @return {Object} Action object.\n */\nexport const setTemplate =\n\t( templateId, templateSlug ) =>\n\tasync ( { dispatch, registry } ) => {\n\t\tif ( ! templateSlug ) {\n\t\t\ttry {\n\t\t\t\tconst template = await registry\n\t\t\t\t\t.resolveSelect( coreStore )\n\t\t\t\t\t.getEntityRecord( 'postType', 'wp_template', templateId );\n\t\t\t\ttemplateSlug = template?.slug;\n\t\t\t} catch ( error ) {}\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'SET_EDITED_POST',\n\t\t\tpostType: 'wp_template',\n\t\t\tid: templateId,\n\t\t\tcontext: { templateSlug },\n\t\t} );\n\t};\n\n/**\n * Action that adds a new template and sets it as the current template.\n *\n * @param {Object} template The template.\n *\n * @return {Object} Action object used to set the current template.\n */\nexport const addTemplate =\n\t( template ) =>\n\tasync ( { dispatch, registry } ) => {\n\t\tconst newTemplate = await registry\n\t\t\t.dispatch( coreStore )\n\t\t\t.saveEntityRecord( 'postType', 'wp_template', template );\n\n\t\tif ( template.content ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( coreStore )\n\t\t\t\t.editEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_template',\n\t\t\t\t\tnewTemplate.id,\n\t\t\t\t\t{ blocks: parse( template.content ) },\n\t\t\t\t\t{ undoIgnore: true }\n\t\t\t\t);\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'SET_EDITED_POST',\n\t\t\tpostType: 'wp_template',\n\t\t\tid: newTemplate.id,\n\t\t\tcontext: { templateSlug: newTemplate.slug },\n\t\t} );\n\t};\n\n/**\n * Action that removes a template.\n *\n * @param {Object} template The template object.\n */\nexport const removeTemplate =\n\t( template ) =>\n\tasync ( { registry } ) => {\n\t\ttry {\n\t\t\tawait registry\n\t\t\t\t.dispatch( coreStore )\n\t\t\t\t.deleteEntityRecord( 'postType', template.type, template.id, {\n\t\t\t\t\tforce: true,\n\t\t\t\t} );\n\n\t\t\tconst lastError = registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getLastEntityDeleteError(\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\tif ( lastError ) {\n\t\t\t\tthrow lastError;\n\t\t\t}\n\n\t\t\t// Depending on how the entity was retrieved it's title might be\n\t\t\t// an object or simple string.\n\t\t\tconst templateTitle =\n\t\t\t\ttypeof template.title === 'string'\n\t\t\t\t\t? template.title\n\t\t\t\t\t: template.title?.rendered;\n\n\t\t\tregistry.dispatch( noticesStore ).createSuccessNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: The template/part's name. */\n\t\t\t\t\t__( '\"%s\" deleted.' ),\n\t\t\t\t\tdecodeEntities( templateTitle )\n\t\t\t\t),\n\t\t\t\t{ type: 'snackbar', id: 'site-editor-template-deleted-success' }\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 deleting the template.' );\n\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 sets a template part.\n *\n * @param {string} templatePartId The template part ID.\n *\n * @return {Object} Action object.\n */\nexport function setTemplatePart( templatePartId ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType: 'wp_template_part',\n\t\tid: templatePartId,\n\t};\n}\n\n/**\n * Action that sets a navigation menu.\n *\n * @param {string} navigationMenuId The Navigation Menu Post ID.\n *\n * @return {Object} Action object.\n */\nexport function setNavigationMenu( navigationMenuId ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType: 'wp_navigation',\n\t\tid: navigationMenuId,\n\t};\n}\n\n/**\n * Action that sets an edited entity.\n *\n * @param {string} postType The entity's post type.\n * @param {string} postId   The entity's ID.\n *\n * @return {Object} Action object.\n */\nexport function setEditedEntity( postType, postId ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType,\n\t\tid: postId,\n\t};\n}\n\n/**\n * @deprecated\n */\nexport function setHomeTemplateId() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setHomeTemplateId\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn {\n\t\ttype: 'NOTHING',\n\t};\n}\n\n/**\n * Set's the current block editor context.\n *\n * @param {Object} context The context object.\n *\n * @return {number} The resolved template ID for the page route.\n */\nexport function setEditedPostContext( context ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST_CONTEXT',\n\t\tcontext,\n\t};\n}\n\n/**\n * Resolves the template for a page and displays both. If no path is given, attempts\n * to use the postId to generate a path like `?p=${ postId }`.\n *\n * @param {Object} page         The page object.\n * @param {string} page.type    The page type.\n * @param {string} page.slug    The page slug.\n * @param {string} page.path    The page path.\n * @param {Object} page.context The page context.\n *\n * @return {number} The resolved template ID for the page route.\n */\nexport const setPage =\n\t( page ) =>\n\tasync ( { dispatch, registry } ) => {\n\t\tif ( ! page.path && page.context?.postId ) {\n\t\t\tconst entity = await registry\n\t\t\t\t.resolveSelect( coreStore )\n\t\t\t\t.getEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpage.context.postType || 'post',\n\t\t\t\t\tpage.context.postId\n\t\t\t\t);\n\t\t\t// If the entity is undefined for some reason, path will resolve to \"/\"\n\t\t\tpage.path = getPathAndQueryString( entity?.link );\n\t\t}\n\n\t\tconst template = await registry\n\t\t\t.resolveSelect( coreStore )\n\t\t\t.__experimentalGetTemplateForLink( page.path );\n\n\t\tif ( ! template ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'SET_EDITED_POST',\n\t\t\tpostType: 'wp_template',\n\t\t\tid: template.id,\n\t\t\tcontext: {\n\t\t\t\t...page.context,\n\t\t\t\ttemplateSlug: template.slug,\n\t\t\t},\n\t\t} );\n\n\t\treturn template.id;\n\t};\n\n/**\n * Action that sets the active navigation panel menu.\n *\n * @deprecated\n *\n * @return {Object} Action object.\n */\nexport function setNavigationPanelActiveMenu() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setNavigationPanelActiveMenu\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Opens the navigation panel and sets its active menu at the same time.\n *\n * @deprecated\n */\nexport function openNavigationPanelToMenu() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).openNavigationPanelToMenu\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Sets whether the navigation panel should be open.\n *\n * @deprecated\n */\nexport function setIsNavigationPanelOpened() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setIsNavigationPanelOpened\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Opens or closes 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 *\n * @return {Object} Action object.\n */\nexport function setIsInserterOpened( value ) {\n\treturn {\n\t\ttype: 'SET_IS_INSERTER_OPENED',\n\t\tvalue,\n\t};\n}\n\n/**\n * Returns an action object used to update the settings.\n *\n * @param {Object} settings New settings.\n *\n * @return {Object} Action object.\n */\nexport function updateSettings( settings ) {\n\treturn {\n\t\ttype: 'UPDATE_SETTINGS',\n\t\tsettings,\n\t};\n}\n\n/**\n * Sets whether the list view panel should be open.\n *\n * @param {boolean} isOpen If true, opens the list view. If false, closes it.\n *                         It does not toggle the state, but sets it directly.\n */\nexport function setIsListViewOpened( isOpen ) {\n\treturn {\n\t\ttype: 'SET_IS_LIST_VIEW_OPENED',\n\t\tisOpen,\n\t};\n}\n\n/**\n * Sets whether the save view panel should be open.\n *\n * @param {boolean} isOpen If true, opens the save view. If false, closes it.\n *                         It does not toggle the state, but sets it directly.\n */\nexport function setIsSaveViewOpened( isOpen ) {\n\treturn {\n\t\ttype: 'SET_IS_SAVE_VIEW_OPENED',\n\t\tisOpen,\n\t};\n}\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: 'theme' }\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 reverted.' ), {\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 * Action that opens an editor sidebar.\n *\n * @param {?string} name Sidebar name to be opened.\n */\nexport const openGeneralSidebar =\n\t( name ) =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t.enableComplementaryArea( editSiteStoreName, name );\n\t};\n\n/**\n * Action that closes the sidebar.\n */\nexport const closeGeneralSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t.disableComplementaryArea( editSiteStoreName );\n\t};\n\nexport const switchEditorMode =\n\t( mode ) =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( 'core/preferences' )\n\t\t\t.set( 'core/edit-site', 'editorMode', mode );\n\n\t\t// Unselect blocks when we switch to a non visual mode.\n\t\tif ( mode !== 'visual' ) {\n\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\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\tspeak( __( 'Code editor selected' ), 'assertive' );\n\t\t}\n\t};\n\n/**\n * Sets whether or not the editor allows only page content to be edited.\n *\n * @param {boolean} hasPageContentFocus True to allow only page content to be\n *                                      edited, false to allow template to be\n *                                      edited.\n */\nexport const setHasPageContentFocus =\n\t( hasPageContentFocus ) =>\n\t( { dispatch, registry } ) => {\n\t\tif ( hasPageContentFocus ) {\n\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'SET_HAS_PAGE_CONTENT_FOCUS',\n\t\t\thasPageContentFocus,\n\t\t} );\n\t};\n","/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Action that switches the canvas mode.\n *\n * @param {?string} mode Canvas mode.\n */\nexport const setCanvasMode =\n\t( mode ) =>\n\t( { registry, dispatch } ) => {\n\t\tregistry.dispatch( blockEditorStore ).__unstableSetEditorMode( 'edit' );\n\t\tdispatch( {\n\t\t\ttype: 'SET_CANVAS_MODE',\n\t\t\tmode,\n\t\t} );\n\t\t// Check if the block list view should be open by default.\n\t\tif (\n\t\t\tmode === 'edit' &&\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core/edit-site', 'showListViewByDefault' )\n\t\t) {\n\t\t\tdispatch.setIsListViewOpened( true );\n\t\t}\n\t};\n\n/**\n * Action that switches the editor canvas container view.\n *\n * @param {?string} view Editor canvas container view.\n */\nexport const setEditorCanvasContainerView =\n\t( view ) =>\n\t( { dispatch } ) => {\n\t\tdispatch( {\n\t\t\ttype: 'SET_EDITOR_CANVAS_CONTAINER_VIEW',\n\t\t\tview,\n\t\t} );\n\t};\n","'use strict';\n\n/** @typedef {(...args: any[]) => *[]} GetDependants */\n\n/** @typedef {() => void} Clear */\n\n/**\n * @typedef {{\n *   getDependants: GetDependants,\n *   clear: Clear\n * }} EnhancedSelector\n */\n\n/**\n * Internal cache entry.\n *\n * @typedef CacheNode\n *\n * @property {?CacheNode|undefined} [prev] Previous node.\n * @property {?CacheNode|undefined} [next] Next node.\n * @property {*[]} args Function arguments for cache entry.\n * @property {*} val Function result.\n */\n\n/**\n * @typedef Cache\n *\n * @property {Clear} clear Function to clear cache.\n * @property {boolean} [isUniqueByDependants] Whether dependants are valid in\n * considering cache uniqueness. A cache is unique if dependents are all arrays\n * or objects.\n * @property {CacheNode?} [head] Cache head.\n * @property {*[]} [lastDependants] Dependants from previous invocation.\n */\n\n/**\n * Arbitrary value used as key for referencing cache object in WeakMap tree.\n *\n * @type {{}}\n */\nvar LEAF_KEY = {};\n\n/**\n * Returns the first argument as the sole entry in an array.\n *\n * @template T\n *\n * @param {T} value Value to return.\n *\n * @return {[T]} Value returned as entry in array.\n */\nfunction arrayOf(value) {\n\treturn [value];\n}\n\n/**\n * Returns true if the value passed is object-like, or false otherwise. A value\n * is object-like if it can support property assignment, e.g. object or array.\n *\n * @param {*} value Value to test.\n *\n * @return {boolean} Whether value is object-like.\n */\nfunction isObjectLike(value) {\n\treturn !!value && 'object' === typeof value;\n}\n\n/**\n * Creates and returns a new cache object.\n *\n * @return {Cache} Cache object.\n */\nfunction createCache() {\n\t/** @type {Cache} */\n\tvar cache = {\n\t\tclear: function () {\n\t\t\tcache.head = null;\n\t\t},\n\t};\n\n\treturn cache;\n}\n\n/**\n * Returns true if entries within the two arrays are strictly equal by\n * reference from a starting index.\n *\n * @param {*[]} a First array.\n * @param {*[]} b Second array.\n * @param {number} fromIndex Index from which to start comparison.\n *\n * @return {boolean} Whether arrays are shallowly equal.\n */\nfunction isShallowEqual(a, b, fromIndex) {\n\tvar i;\n\n\tif (a.length !== b.length) {\n\t\treturn false;\n\t}\n\n\tfor (i = fromIndex; i < a.length; i++) {\n\t\tif (a[i] !== b[i]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\n/**\n * Returns a memoized selector function. The getDependants function argument is\n * called before the memoized selector and is expected to return an immutable\n * reference or array of references on which the selector depends for computing\n * its own return value. The memoize cache is preserved only as long as those\n * dependant references remain the same. If getDependants returns a different\n * reference(s), the cache is cleared and the selector value regenerated.\n *\n * @template {(...args: *[]) => *} S\n *\n * @param {S} selector Selector function.\n * @param {GetDependants=} getDependants Dependant getter returning an array of\n * references used in cache bust consideration.\n */\nexport default function (selector, getDependants) {\n\t/** @type {WeakMap<*,*>} */\n\tvar rootCache;\n\n\t/** @type {GetDependants} */\n\tvar normalizedGetDependants = getDependants ? getDependants : arrayOf;\n\n\t/**\n\t * Returns the cache for a given dependants array. When possible, a WeakMap\n\t * will be used to create a unique cache for each set of dependants. This\n\t * is feasible due to the nature of WeakMap in allowing garbage collection\n\t * to occur on entries where the key object is no longer referenced. Since\n\t * WeakMap requires the key to be an object, this is only possible when the\n\t * dependant is object-like. The root cache is created as a hierarchy where\n\t * each top-level key is the first entry in a dependants set, the value a\n\t * WeakMap where each key is the next dependant, and so on. This continues\n\t * so long as the dependants are object-like. If no dependants are object-\n\t * like, then the cache is shared across all invocations.\n\t *\n\t * @see isObjectLike\n\t *\n\t * @param {*[]} dependants Selector dependants.\n\t *\n\t * @return {Cache} Cache object.\n\t */\n\tfunction getCache(dependants) {\n\t\tvar caches = rootCache,\n\t\t\tisUniqueByDependants = true,\n\t\t\ti,\n\t\t\tdependant,\n\t\t\tmap,\n\t\t\tcache;\n\n\t\tfor (i = 0; i < dependants.length; i++) {\n\t\t\tdependant = dependants[i];\n\n\t\t\t// Can only compose WeakMap from object-like key.\n\t\t\tif (!isObjectLike(dependant)) {\n\t\t\t\tisUniqueByDependants = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Does current segment of cache already have a WeakMap?\n\t\t\tif (caches.has(dependant)) {\n\t\t\t\t// Traverse into nested WeakMap.\n\t\t\t\tcaches = caches.get(dependant);\n\t\t\t} else {\n\t\t\t\t// Create, set, and traverse into a new one.\n\t\t\t\tmap = new WeakMap();\n\t\t\t\tcaches.set(dependant, map);\n\t\t\t\tcaches = map;\n\t\t\t}\n\t\t}\n\n\t\t// We use an arbitrary (but consistent) object as key for the last item\n\t\t// in the WeakMap to serve as our running cache.\n\t\tif (!caches.has(LEAF_KEY)) {\n\t\t\tcache = createCache();\n\t\t\tcache.isUniqueByDependants = isUniqueByDependants;\n\t\t\tcaches.set(LEAF_KEY, cache);\n\t\t}\n\n\t\treturn caches.get(LEAF_KEY);\n\t}\n\n\t/**\n\t * Resets root memoization cache.\n\t */\n\tfunction clear() {\n\t\trootCache = new WeakMap();\n\t}\n\n\t/* eslint-disable jsdoc/check-param-names */\n\t/**\n\t * The augmented selector call, considering first whether dependants have\n\t * changed before passing it to underlying memoize function.\n\t *\n\t * @param {*}    source    Source object for derivation.\n\t * @param {...*} extraArgs Additional arguments to pass to selector.\n\t *\n\t * @return {*} Selector result.\n\t */\n\t/* eslint-enable jsdoc/check-param-names */\n\tfunction callSelector(/* source, ...extraArgs */) {\n\t\tvar len = arguments.length,\n\t\t\tcache,\n\t\t\tnode,\n\t\t\ti,\n\t\t\targs,\n\t\t\tdependants;\n\n\t\t// Create 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\tdependants = normalizedGetDependants.apply(null, args);\n\t\tcache = getCache(dependants);\n\n\t\t// If not guaranteed uniqueness by dependants (primitive type), shallow\n\t\t// compare against last dependants and, if references have changed,\n\t\t// destroy cache to recalculate result.\n\t\tif (!cache.isUniqueByDependants) {\n\t\t\tif (\n\t\t\t\tcache.lastDependants &&\n\t\t\t\t!isShallowEqual(dependants, cache.lastDependants, 0)\n\t\t\t) {\n\t\t\t\tcache.clear();\n\t\t\t}\n\n\t\t\tcache.lastDependants = dependants;\n\t\t}\n\n\t\tnode = cache.head;\n\t\twhile (node) {\n\t\t\t// Check whether node arguments match arguments\n\t\t\tif (!isShallowEqual(node.args, args, 1)) {\n\t\t\t\tnode = node.next;\n\t\t\t\tcontinue;\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 !== cache.head) {\n\t\t\t\t// Adjust siblings to point to each other.\n\t\t\t\t/** @type {CacheNode} */ (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 = cache.head;\n\t\t\t\tnode.prev = null;\n\t\t\t\t/** @type {CacheNode} */ (cache.head).prev = node;\n\t\t\t\tcache.head = 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\tnode = /** @type {CacheNode} */ ({\n\t\t\t// Generate the result from original function\n\t\t\tval: selector.apply(null, args),\n\t\t});\n\n\t\t// Avoid including the source object in the cache.\n\t\targs[0] = null;\n\t\tnode.args = args;\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 (cache.head) {\n\t\t\tcache.head.prev = node;\n\t\t\tnode.next = cache.head;\n\t\t}\n\n\t\tcache.head = node;\n\n\t\treturn node.val;\n\t}\n\n\tcallSelector.getDependants = normalizedGetDependants;\n\tcallSelector.clear = clear;\n\tclear();\n\n\treturn /** @type {S & EnhancedSelector} */ (callSelector);\n}\n","/**\n * External dependencies\n */\nimport memoize from 'memize';\n\n/**\n * WordPress dependencies\n */\nimport { isTemplatePart } from '@wordpress/blocks';\n\nconst EMPTY_ARRAY = [];\n\n/**\n * Get a flattened and filtered list of template parts and the matching block for that template part.\n *\n * Takes a list of blocks defined within a template, and a list of template parts, and returns a\n * flattened list of template parts and the matching block for that template part.\n *\n * @param {Array}  blocks        Blocks to flatten.\n * @param {?Array} templateParts Available template parts.\n * @return {Array} An array of template parts and their blocks.\n */\nfunction getFilteredTemplatePartBlocks( blocks = EMPTY_ARRAY, templateParts ) {\n\tconst templatePartsById = templateParts\n\t\t? // Key template parts by their ID.\n\t\t  templateParts.reduce(\n\t\t\t\t( newTemplateParts, part ) => ( {\n\t\t\t\t\t...newTemplateParts,\n\t\t\t\t\t[ part.id ]: part,\n\t\t\t\t} ),\n\t\t\t\t{}\n\t\t  )\n\t\t: {};\n\n\tconst result = [];\n\n\t// Iterate over all blocks, recursing into inner blocks.\n\t// Output will be based on a depth-first traversal.\n\tconst stack = [ ...blocks ];\n\twhile ( stack.length ) {\n\t\tconst { innerBlocks, ...block } = stack.shift();\n\t\t// Place inner blocks at the beginning of the stack to preserve order.\n\t\tstack.unshift( ...innerBlocks );\n\n\t\tif ( isTemplatePart( block ) ) {\n\t\t\tconst {\n\t\t\t\tattributes: { theme, slug },\n\t\t\t} = block;\n\t\t\tconst templatePartId = `${ theme }//${ slug }`;\n\t\t\tconst templatePart = templatePartsById[ templatePartId ];\n\n\t\t\t// Only add to output if the found template part block is in the list of available template parts.\n\t\t\tif ( templatePart ) {\n\t\t\t\tresult.push( {\n\t\t\t\t\ttemplatePart,\n\t\t\t\t\tblock,\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result;\n}\n\nconst memoizedGetFilteredTemplatePartBlocks = memoize(\n\tgetFilteredTemplatePartBlocks\n);\n\nexport { memoizedGetFilteredTemplatePartBlocks as getFilteredTemplatePartBlocks };\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 createSelector from 'rememo';\n\n/**\n * WordPress dependencies\n */\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { createRegistrySelector } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { uploadMedia } from '@wordpress/media-utils';\nimport { Platform } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { getFilteredTemplatePartBlocks } from './utils';\n\n/**\n * @typedef {'template'|'template_type'} TemplateType Template type.\n */\n\n/**\n * Helper for getting a preference from the preferences store.\n *\n * This is only present so that `getSettings` doesn't need to be made a\n * registry selector.\n *\n * It's unstable because the selector needs to be exported and so part of the\n * public API to work.\n */\nexport const __unstableGetPreference = createRegistrySelector(\n\t( select ) => ( state, name ) =>\n\t\tselect( preferencesStore ).get( 'core/edit-site', name )\n);\n\n/**\n * Returns whether the given feature is enabled or not.\n *\n * @deprecated\n * @param {Object} state       Global application state.\n * @param {string} featureName Feature slug.\n *\n * @return {boolean} Is active.\n */\nexport function isFeatureActive( state, featureName ) {\n\tdeprecated( `select( 'core/edit-site' ).isFeatureActive`, {\n\t\tsince: '6.0',\n\t\talternative: `select( 'core/preferences' ).get`,\n\t} );\n\n\treturn !! __unstableGetPreference( state, featureName );\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 function __experimentalGetPreviewDeviceType( state ) {\n\treturn state.deviceType;\n}\n\n/**\n * Returns whether the current user can create media or not.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Whether the current user can create media or not.\n */\nexport const getCanUserCreateMedia = createRegistrySelector(\n\t( select ) => () => select( coreDataStore ).canUser( 'create', 'media' )\n);\n\n/**\n * Returns any available Reusable blocks.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} The available reusable blocks.\n */\nexport const getReusableBlocks = createRegistrySelector( ( select ) => () => {\n\tconst isWeb = Platform.OS === 'web';\n\treturn isWeb\n\t\t? select( coreDataStore ).getEntityRecords( 'postType', 'wp_block', {\n\t\t\t\tper_page: -1,\n\t\t  } )\n\t\t: [];\n} );\n\n/**\n * Returns the settings, taking into account active features and permissions.\n *\n * @param {Object}   state             Global application state.\n * @param {Function} setIsInserterOpen Setter for the open state of the global inserter.\n *\n * @return {Object} Settings.\n */\nexport const getSettings = createSelector(\n\t( state, setIsInserterOpen ) => {\n\t\tconst settings = {\n\t\t\t...state.settings,\n\t\t\toutlineMode: true,\n\t\t\tfocusMode: !! __unstableGetPreference( state, 'focusMode' ),\n\t\t\tisDistractionFree: !! __unstableGetPreference(\n\t\t\t\tstate,\n\t\t\t\t'distractionFree'\n\t\t\t),\n\t\t\thasFixedToolbar: !! __unstableGetPreference(\n\t\t\t\tstate,\n\t\t\t\t'fixedToolbar'\n\t\t\t),\n\t\t\tkeepCaretInsideBlock: !! __unstableGetPreference(\n\t\t\t\tstate,\n\t\t\t\t'keepCaretInsideBlock'\n\t\t\t),\n\t\t\tshowIconLabels: !! __unstableGetPreference(\n\t\t\t\tstate,\n\t\t\t\t'showIconLabels'\n\t\t\t),\n\t\t\t__experimentalSetIsInserterOpened: setIsInserterOpen,\n\t\t\t__experimentalReusableBlocks: getReusableBlocks( state ),\n\t\t\t__experimentalPreferPatternsOnRoot:\n\t\t\t\t'wp_template' === getEditedPostType( state ),\n\t\t};\n\n\t\tconst canUserCreateMedia = getCanUserCreateMedia( state );\n\t\tif ( ! canUserCreateMedia ) {\n\t\t\treturn settings;\n\t\t}\n\n\t\tsettings.mediaUpload = ( { onError, ...rest } ) => {\n\t\t\tuploadMedia( {\n\t\t\t\twpAllowedMimeTypes: state.settings.allowedMimeTypes,\n\t\t\t\tonError: ( { message } ) => onError( message ),\n\t\t\t\t...rest,\n\t\t\t} );\n\t\t};\n\t\treturn settings;\n\t},\n\t( state ) => [\n\t\tgetCanUserCreateMedia( state ),\n\t\tstate.settings,\n\t\t__unstableGetPreference( state, 'focusMode' ),\n\t\t__unstableGetPreference( state, 'distractionFree' ),\n\t\t__unstableGetPreference( state, 'fixedToolbar' ),\n\t\t__unstableGetPreference( state, 'keepCaretInsideBlock' ),\n\t\t__unstableGetPreference( state, 'showIconLabels' ),\n\t\tgetReusableBlocks( state ),\n\t\tgetEditedPostType( state ),\n\t]\n);\n\n/**\n * @deprecated\n */\nexport function getHomeTemplateId() {\n\tdeprecated( \"select( 'core/edit-site' ).getHomeTemplateId\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * Returns the current edited post type (wp_template or wp_template_part).\n *\n * @param {Object} state Global application state.\n *\n * @return {TemplateType?} Template type.\n */\nexport function getEditedPostType( state ) {\n\treturn state.editedPost.postType;\n}\n\n/**\n * Returns the ID of the currently edited template or template part.\n *\n * @param {Object} state Global application state.\n *\n * @return {string?} Post ID.\n */\nexport function getEditedPostId( state ) {\n\treturn state.editedPost.id;\n}\n\n/**\n * Returns the edited post's context object.\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {Object} Page.\n */\nexport function getEditedPostContext( state ) {\n\treturn state.editedPost.context;\n}\n\n/**\n * Returns the current page object.\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {Object} Page.\n */\nexport function getPage( state ) {\n\treturn { context: state.editedPost.context };\n}\n\n/**\n * Returns the current opened/closed state of the inserter panel.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if the inserter panel should be open; false if closed.\n */\nexport function isInserterOpened( state ) {\n\treturn !! state.blockInserterPanel;\n}\n\n/**\n * Get the insertion point for 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 __experimentalGetInsertionPoint = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tif ( typeof state.blockInserterPanel === 'object' ) {\n\t\t\tconst { rootClientId, insertionIndex, filterValue } =\n\t\t\t\tstate.blockInserterPanel;\n\t\t\treturn { rootClientId, insertionIndex, filterValue };\n\t\t}\n\n\t\tif ( hasPageContentFocus( state ) ) {\n\t\t\tconst [ postContentClientId ] =\n\t\t\t\tselect( blockEditorStore ).__experimentalGetGlobalBlocksByName(\n\t\t\t\t\t'core/post-content'\n\t\t\t\t);\n\t\t\tif ( postContentClientId ) {\n\t\t\t\treturn {\n\t\t\t\t\trootClientId: postContentClientId,\n\t\t\t\t\tinsertionIndex: undefined,\n\t\t\t\t\tfilterValue: undefined,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\trootClientId: undefined,\n\t\t\tinsertionIndex: undefined,\n\t\t\tfilterValue: undefined,\n\t\t};\n\t}\n);\n\n/**\n * Returns the current opened/closed state of the list view panel.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if the list view panel should be open; false if closed.\n */\nexport function isListViewOpened( state ) {\n\treturn state.listViewPanel;\n}\n\n/**\n * Returns the current opened/closed state of the save panel.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if the save panel should be open; false if closed.\n */\nexport function isSaveViewOpened( state ) {\n\treturn state.saveViewPanel;\n}\n\n/**\n * Returns the template parts and their blocks for the current edited template.\n *\n * @param {Object} state Global application state.\n * @return {Array} Template parts and their blocks in an array.\n */\nexport const getCurrentTemplateTemplateParts = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst templateType = getEditedPostType( state );\n\t\tconst templateId = getEditedPostId( state );\n\t\tconst template = select( coreDataStore ).getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\ttemplateType,\n\t\t\ttemplateId\n\t\t);\n\n\t\tconst templateParts = select( coreDataStore ).getEntityRecords(\n\t\t\t'postType',\n\t\t\t'wp_template_part',\n\t\t\t{ per_page: -1 }\n\t\t);\n\n\t\treturn getFilteredTemplatePartBlocks( template.blocks, templateParts );\n\t}\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 function getEditorMode( state ) {\n\treturn __unstableGetPreference( state, 'editorMode' );\n}\n\n/**\n * @deprecated\n */\nexport function getCurrentTemplateNavigationPanelSubMenu() {\n\tdeprecated(\n\t\t\"dispatch( 'core/edit-site' ).getCurrentTemplateNavigationPanelSubMenu\",\n\t\t{\n\t\t\tsince: '6.2',\n\t\t\tversion: '6.4',\n\t\t}\n\t);\n}\n\n/**\n * @deprecated\n */\nexport function getNavigationPanelActiveMenu() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).getNavigationPanelActiveMenu\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * @deprecated\n */\nexport function isNavigationOpened() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).isNavigationOpened\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * Whether or not the editor has a page loaded into it.\n *\n * @see setPage\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether or not the editor has a page loaded into it.\n */\nexport function isPage( state ) {\n\treturn !! state.editedPost.context?.postId;\n}\n\n/**\n * Whether or not the editor allows only page content to be edited.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether or not focus is on editing page content.\n */\nexport function hasPageContentFocus( state ) {\n\treturn isPage( state ) ? state.hasPageContentFocus : false;\n}\n","/**\n * Returns the current canvas mode.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Canvas mode.\n */\nexport function getCanvasMode( state ) {\n\treturn state.canvasMode;\n}\n\n/**\n * Returns the editor canvas container view.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Editor canvas container view.\n */\nexport function getEditorCanvasContainerView( state ) {\n\treturn state.editorCanvasContainerView;\n}\n","/**\n * WordPress dependencies\n */\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as actions from './actions';\nimport * as privateActions from './private-actions';\nimport * as selectors from './selectors';\nimport * as privateSelectors from './private-selectors';\nimport { STORE_NAME } from './constants';\nimport { unlock } from '../lock-unlock';\n\nexport const storeConfig = {\n\treducer,\n\tactions,\n\tselectors,\n};\n\nexport const store = createReduxStore( STORE_NAME, storeConfig );\nregister( store );\nunlock( store ).registerPrivateSelectors( privateSelectors );\nunlock( store ).registerPrivateActions( privateActions );\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"keyboardShortcuts\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"commands\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"coreCommands\"];","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst navigation = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\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\nexport default navigation;\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport const styles = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z\" />\n\t</SVG>\n);\n\nexport default styles;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst page = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z\" />\n\t</SVG>\n);\n\nexport default page;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst layout = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\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\nexport default layout;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst symbol = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\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\nexport default symbol;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\n\nexport default function SidebarButton( props ) {\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tclassName={ classnames(\n\t\t\t\t'edit-site-sidebar-button',\n\t\t\t\tprops.className\n\t\t\t) }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalHeading as Heading,\n\t__experimentalNavigatorToParentButton as NavigatorToParentButton,\n\t__experimentalUseNavigator as useNavigator,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { isRTL, __, sprintf } from '@wordpress/i18n';\nimport { chevronRight, chevronLeft } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport SidebarButton from '../sidebar-button';\nimport {\n\tisPreviewingTheme,\n\tcurrentlyPreviewingTheme,\n} from '../../utils/is-previewing-theme';\n\nexport default function SidebarNavigationScreen( {\n\tisRoot,\n\ttitle,\n\tactions,\n\tmeta,\n\tcontent,\n\tfooter,\n\tdescription,\n\tbackPath,\n} ) {\n\tconst { dashboardLink } = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\t\treturn {\n\t\t\tdashboardLink: getSettings().__experimentalDashboardLink,\n\t\t};\n\t}, [] );\n\tconst { getTheme } = useSelect( coreStore );\n\tconst { goTo } = useNavigator();\n\tconst theme = getTheme( currentlyPreviewingTheme() );\n\tconst icon = isRTL() ? chevronRight : chevronLeft;\n\n\treturn (\n\t\t<>\n\t\t\t<VStack\n\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__main\"\n\t\t\t\tspacing={ 0 }\n\t\t\t\tjustify=\"flex-start\"\n\t\t\t>\n\t\t\t\t<HStack\n\t\t\t\t\tspacing={ 4 }\n\t\t\t\t\talignment=\"flex-start\"\n\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__title-icon\"\n\t\t\t\t>\n\t\t\t\t\t{ ! isRoot && ! backPath && (\n\t\t\t\t\t\t<NavigatorToParentButton\n\t\t\t\t\t\t\tas={ SidebarButton }\n\t\t\t\t\t\t\ticon={ isRTL() ? chevronRight : chevronLeft }\n\t\t\t\t\t\t\tlabel={ __( 'Back' ) }\n\t\t\t\t\t\t\tshowTooltip={ false }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! isRoot && backPath && (\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\tonClick={ () => goTo( backPath, { isBack: true } ) }\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tlabel={ __( 'Back' ) }\n\t\t\t\t\t\t\tshowTooltip={ false }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isRoot && (\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t! isPreviewingTheme()\n\t\t\t\t\t\t\t\t\t? __( 'Go back to the Dashboard' )\n\t\t\t\t\t\t\t\t\t: __( 'Go back to the theme showcase' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t! isPreviewingTheme()\n\t\t\t\t\t\t\t\t\t? dashboardLink || 'index.php'\n\t\t\t\t\t\t\t\t\t: 'themes.php'\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<Heading\n\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__title\"\n\t\t\t\t\t\tcolor={ '#e0e0e0' /* $gray-200 */ }\n\t\t\t\t\t\tlevel={ 1 }\n\t\t\t\t\t\tsize={ 20 }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! isPreviewingTheme()\n\t\t\t\t\t\t\t? title\n\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t'Previewing %1$s: %2$s',\n\t\t\t\t\t\t\t\t\ttheme?.name?.rendered,\n\t\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t\t  ) }\n\t\t\t\t\t</Heading>\n\t\t\t\t\t{ actions && (\n\t\t\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen__actions\">\n\t\t\t\t\t\t\t{ actions }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\n\t\t\t\t{ meta && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen__meta\">\n\t\t\t\t\t\t\t{ meta }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\n\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen__content\">\n\t\t\t\t\t{ description && (\n\t\t\t\t\t\t<p className=\"edit-site-sidebar-navigation-screen__description\">\n\t\t\t\t\t\t\t{ description }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t) }\n\t\t\t\t\t{ content }\n\t\t\t\t</div>\n\t\t\t</VStack>\n\t\t\t{ footer && (\n\t\t\t\t<footer className=\"edit-site-sidebar-navigation-screen__footer\">\n\t\t\t\t\t{ footer }\n\t\t\t\t</footer>\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst chevronLeftSmall = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\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\nexport default chevronLeftSmall;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst chevronRightSmall = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\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\nexport default chevronRightSmall;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItem as Item,\n\t__experimentalHStack as HStack,\n\tFlexBlock,\n} from '@wordpress/components';\nimport { isRTL } from '@wordpress/i18n';\nimport { chevronRightSmall, chevronLeftSmall, Icon } from '@wordpress/icons';\n\nexport default function SidebarNavigationItem( {\n\tclassName,\n\ticon,\n\twithChevron = false,\n\tsuffix,\n\tchildren,\n\t...props\n} ) {\n\treturn (\n\t\t<Item\n\t\t\tclassName={ classnames(\n\t\t\t\t'edit-site-sidebar-navigation-item',\n\t\t\t\t{ 'with-suffix': ! withChevron && suffix },\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t{ icon && (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\tstyle={ { fill: 'currentcolor' } }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<FlexBlock>{ children }</FlexBlock>\n\t\t\t\t{ withChevron && (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ isRTL() ? chevronLeftSmall : chevronRightSmall }\n\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-item__drilldown-indicator\"\n\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ ! withChevron && suffix }\n\t\t\t</HStack>\n\t\t</Item>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst backup = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\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\nexport default backup;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst seen = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\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\nexport default seen;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst pencil = (\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\nexport default pencil;\n","/**\n * Internal dependencies\n */\n\nimport { default as pencil } from './pencil';\nexport default pencil;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"date\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"keycodes\"];","/*!\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 * External dependencies\n */\nimport deepmerge from 'deepmerge';\nimport { isPlainObject } from 'is-plain-object';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, useCallback } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { GlobalStylesContext, cleanEmptyObject } = unlock(\n\tblockEditorPrivateApis\n);\n\nexport function mergeBaseAndUserConfigs( base, user ) {\n\treturn deepmerge( base, user, {\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\tisMergeableObject: isPlainObject,\n\t} );\n}\n\nfunction useGlobalStylesUserConfig() {\n\tconst { globalStylesId, isReady, settings, styles } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedEntityRecord, hasFinishedResolution } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst _globalStylesId =\n\t\t\t\tselect( coreStore ).__experimentalGetCurrentGlobalStylesId();\n\t\t\tconst record = _globalStylesId\n\t\t\t\t? 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  )\n\t\t\t\t: undefined;\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\thasResolved = _globalStylesId\n\t\t\t\t\t? hasFinishedResolution( 'getEditedEntityRecord', [\n\t\t\t\t\t\t\t'root',\n\t\t\t\t\t\t\t'globalStyles',\n\t\t\t\t\t\t\t_globalStylesId,\n\t\t\t\t\t  ] )\n\t\t\t\t\t: true;\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};\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};\n\t}, [ settings, styles ] );\n\n\tconst setConfig = useCallback(\n\t\t( callback, 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\t\t\tconst currentConfig = {\n\t\t\t\tstyles: record?.styles ?? {},\n\t\t\t\tsettings: record?.settings ?? {},\n\t\t\t};\n\t\t\tconst updatedConfig = callback( currentConfig );\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},\n\t\t\t\toptions\n\t\t\t);\n\t\t},\n\t\t[ globalStylesId ]\n\t);\n\n\treturn [ isReady, config, setConfig ];\n}\n\nfunction useGlobalStylesBaseConfig() {\n\tconst baseConfig = useSelect( ( select ) => {\n\t\treturn select(\n\t\t\tcoreStore\n\t\t).__experimentalGetCurrentThemeBaseGlobalStyles();\n\t}, [] );\n\n\treturn [ !! baseConfig, baseConfig ];\n}\n\nfunction useGlobalStylesContext() {\n\tconst [ isUserConfigReady, userConfig, setUserConfig ] =\n\t\tuseGlobalStylesUserConfig();\n\tconst [ isBaseConfigReady, baseConfig ] = useGlobalStylesBaseConfig();\n\tconst mergedConfig = useMemo( () => {\n\t\tif ( ! baseConfig || ! userConfig ) {\n\t\t\treturn {};\n\t\t}\n\t\treturn mergeBaseAndUserConfigs( baseConfig, userConfig );\n\t}, [ userConfig, baseConfig ] );\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\nexport function GlobalStylesProvider( { children } ) {\n\tconst context = useGlobalStylesContext();\n\tif ( ! context.isReady ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<GlobalStylesContext.Provider value={ context }>\n\t\t\t{ children }\n\t\t</GlobalStylesContext.Provider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\t__unstableIframe as Iframe,\n\t__unstableEditorStyles as EditorStyles,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport {\n\t__unstableMotion as motion,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useReducedMotion, useResizeObserver } from '@wordpress/compose';\nimport { useState, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalSetting, useGlobalStyle, useGlobalStylesOutput } = unlock(\n\tblockEditorPrivateApis\n);\n\nconst firstFrame = {\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 midFrame = {\n\thover: {\n\t\topacity: 1,\n\t},\n\tstart: {\n\t\topacity: 0.5,\n\t},\n};\n\nconst secondFrame = {\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\nconst normalizedWidth = 248;\nconst normalizedHeight = 152;\n\nconst normalizedColorSwatchSize = 32;\n\nconst StylesPreview = ( { label, isFocused, withHoverView } ) => {\n\tconst [ fontWeight ] = useGlobalStyle( 'typography.fontWeight' );\n\tconst [ fontFamily = 'serif' ] = useGlobalStyle( 'typography.fontFamily' );\n\tconst [ headingFontFamily = fontFamily ] = useGlobalStyle(\n\t\t'elements.h1.typography.fontFamily'\n\t);\n\tconst [ headingFontWeight = fontWeight ] = useGlobalStyle(\n\t\t'elements.h1.typography.fontWeight'\n\t);\n\tconst [ textColor = 'black' ] = useGlobalStyle( 'color.text' );\n\tconst [ headingColor = textColor ] = useGlobalStyle(\n\t\t'elements.h1.color.text'\n\t);\n\tconst [ backgroundColor = 'white' ] = useGlobalStyle( 'color.background' );\n\tconst [ gradientValue ] = useGlobalStyle( 'color.gradient' );\n\tconst [ styles ] = useGlobalStylesOutput();\n\tconst disableMotion = useReducedMotion();\n\tconst [ coreColors ] = useGlobalSetting( 'color.palette.core' );\n\tconst [ themeColors ] = useGlobalSetting( 'color.palette.theme' );\n\tconst [ customColors ] = useGlobalSetting( 'color.palette.custom' );\n\tconst [ isHovered, setIsHovered ] = useState( false );\n\tconst [ containerResizeListener, { width } ] = useResizeObserver();\n\tconst ratio = width ? width / normalizedWidth : 1;\n\n\tconst paletteColors = ( themeColors ?? [] )\n\t\t.concat( customColors ?? [] )\n\t\t.concat( coreColors ?? [] );\n\tconst highlightedColors = paletteColors\n\t\t.filter(\n\t\t\t// we exclude these two colors because they are already visible in the preview.\n\t\t\t( { color } ) => color !== backgroundColor && color !== headingColor\n\t\t)\n\t\t.slice( 0, 2 );\n\n\t// Reset leaked styles from WP common.css and remove main content layout padding and border.\n\tconst editorStyles = useMemo( () => {\n\t\tif ( styles ) {\n\t\t\treturn [\n\t\t\t\t...styles,\n\t\t\t\t{\n\t\t\t\t\tcss: 'html{overflow:hidden}body{min-width: 0;padding: 0;border: none;}',\n\t\t\t\t\tisGlobalStyles: true,\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\treturn styles;\n\t}, [ styles ] );\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<Iframe\n\t\t\t\t\tclassName=\"edit-site-global-styles-preview__iframe\"\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<EditorStyles styles={ editorStyles } />\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<motion.div\n\t\t\t\t\t\t\tvariants={ firstFrame }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\tspacing={ 10 * ratio }\n\t\t\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\toverflow: 'hidden',\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<motion.div\n\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\tfontFamily: headingFontFamily,\n\t\t\t\t\t\t\t\t\t\tfontSize: 65 * ratio,\n\t\t\t\t\t\t\t\t\t\tcolor: headingColor,\n\t\t\t\t\t\t\t\t\t\tfontWeight: headingFontWeight,\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tanimate={ { scale: 1, opacity: 1 } }\n\t\t\t\t\t\t\t\t\tinitial={ { scale: 0.1, opacity: 0 } }\n\t\t\t\t\t\t\t\t\ttransition={ { delay: 0.3, type: 'tween' } }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tAa\n\t\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t\t\t<VStack spacing={ 4 * ratio }>\n\t\t\t\t\t\t\t\t\t{ highlightedColors.map(\n\t\t\t\t\t\t\t\t\t\t( { slug, color }, index ) => (\n\t\t\t\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\t\t\t\tkey={ slug }\n\t\t\t\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\t\t\t\theight:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnormalizedColorSwatchSize *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tratio,\n\t\t\t\t\t\t\t\t\t\t\t\t\twidth:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnormalizedColorSwatchSize *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tratio,\n\t\t\t\t\t\t\t\t\t\t\t\t\tbackground: color,\n\t\t\t\t\t\t\t\t\t\t\t\t\tborderRadius:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t( normalizedColorSwatchSize *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tratio ) /\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t2,\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\tanimate={ {\n\t\t\t\t\t\t\t\t\t\t\t\t\tscale: 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\topacity: 1,\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\tinitial={ {\n\t\t\t\t\t\t\t\t\t\t\t\t\tscale: 0.1,\n\t\t\t\t\t\t\t\t\t\t\t\t\topacity: 0,\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\ttransition={ {\n\t\t\t\t\t\t\t\t\t\t\t\t\tdelay:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex === 1 ? 0.2 : 0.1,\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</VStack>\n\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tvariants={ withHoverView && midFrame }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\tfilter: 'blur(60px)',\n\t\t\t\t\t\t\t\topacity: 0.1,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\toverflow: 'hidden',\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{ paletteColors\n\t\t\t\t\t\t\t\t\t.slice( 0, 4 )\n\t\t\t\t\t\t\t\t\t.map( ( { color }, index ) => (\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\t\t\t\tbackground: color,\n\t\t\t\t\t\t\t\t\t\t\t\tflexGrow: 1,\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</HStack>\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tvariants={ secondFrame }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\t\tspacing={ 3 * ratio }\n\t\t\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\t\tpadding: 10 * ratio,\n\t\t\t\t\t\t\t\t\tboxSizing: 'border-box',\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\t\t<div\n\t\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\t\tfontSize: 40 * ratio,\n\t\t\t\t\t\t\t\t\t\t\tfontFamily: headingFontFamily,\n\t\t\t\t\t\t\t\t\t\t\tcolor: headingColor,\n\t\t\t\t\t\t\t\t\t\t\tfontWeight: headingFontWeight,\n\t\t\t\t\t\t\t\t\t\t\tlineHeight: '1em',\n\t\t\t\t\t\t\t\t\t\t\ttextAlign: 'center',\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{ label }\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</VStack>\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t</motion.div>\n\t\t\t\t</Iframe>\n\t\t\t) }\n\t\t</>\n\t);\n};\n\nexport default StylesPreview;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo, useContext, useState } from '@wordpress/element';\nimport { ENTER } from '@wordpress/keycodes';\nimport { __experimentalGrid as Grid } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { mergeBaseAndUserConfigs } from './global-styles-provider';\nimport StylesPreview from './preview';\nimport { unlock } from '../../lock-unlock';\n\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction Variation( { variation } ) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst { base, user, setUserConfig } = useContext( GlobalStylesContext );\n\tconst context = useMemo( () => {\n\t\treturn {\n\t\t\tuser: {\n\t\t\t\tsettings: variation.settings ?? {},\n\t\t\t\tstyles: variation.styles ?? {},\n\t\t\t},\n\t\t\tbase,\n\t\t\tmerged: mergeBaseAndUserConfigs( base, variation ),\n\t\t\tsetUserConfig: () => {},\n\t\t};\n\t}, [ variation, base ] );\n\n\tconst selectVariation = () => {\n\t\tsetUserConfig( () => {\n\t\t\treturn {\n\t\t\t\tsettings: variation.settings,\n\t\t\t\tstyles: variation.styles,\n\t\t\t};\n\t\t} );\n\t};\n\n\tconst selectOnEnter = ( event ) => {\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\treturn areGlobalStyleConfigsEqual( user, variation );\n\t}, [ user, variation ] );\n\n\tlet label = variation?.title;\n\tif ( variation?.description ) {\n\t\tlabel = sprintf(\n\t\t\t/* translators: %1$s: variation title. %2$s variation description. */\n\t\t\t__( '%1$s (%2$s)' ),\n\t\t\tvariation?.title,\n\t\t\tvariation?.description\n\t\t);\n\t}\n\n\treturn (\n\t\t<GlobalStylesContext.Provider value={ context }>\n\t\t\t<div\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'edit-site-global-styles-variations_item',\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-active': isActive,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\trole=\"button\"\n\t\t\t\tonClick={ selectVariation }\n\t\t\t\tonKeyDown={ selectOnEnter }\n\t\t\t\ttabIndex=\"0\"\n\t\t\t\taria-label={ label }\n\t\t\t\taria-current={ isActive }\n\t\t\t\tonFocus={ () => setIsFocused( true ) }\n\t\t\t\tonBlur={ () => setIsFocused( false ) }\n\t\t\t>\n\t\t\t\t<div className=\"edit-site-global-styles-variations_item-preview\">\n\t\t\t\t\t<StylesPreview\n\t\t\t\t\t\tlabel={ variation?.title }\n\t\t\t\t\t\tisFocused={ isFocused }\n\t\t\t\t\t\twithHoverView\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</GlobalStylesContext.Provider>\n\t);\n}\n\nexport default function StyleVariationsContainer() {\n\tconst variations = useSelect( ( select ) => {\n\t\treturn select(\n\t\t\tcoreStore\n\t\t).__experimentalGetCurrentThemeGlobalStylesVariations();\n\t}, [] );\n\n\tconst withEmptyVariation = useMemo( () => {\n\t\treturn [\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...( variations ?? [] ).map( ( variation ) => ( {\n\t\t\t\t...variation,\n\t\t\t\tsettings: variation.settings ?? {},\n\t\t\t\tstyles: variation.styles ?? {},\n\t\t\t} ) ),\n\t\t];\n\t}, [ variations ] );\n\n\treturn (\n\t\t<Grid\n\t\t\tcolumns={ 2 }\n\t\t\tclassName=\"edit-site-global-styles-style-variations-container\"\n\t\t>\n\t\t\t{ withEmptyVariation.map( ( variation, index ) => (\n\t\t\t\t<Variation key={ index } variation={ variation } />\n\t\t\t) ) }\n\t\t</Grid>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { LEFT, RIGHT } from '@wordpress/keycodes';\nimport { VisuallyHidden } from '@wordpress/components';\n\nconst DELTA_DISTANCE = 20; // The distance to resize per keydown in pixels.\n\nexport default function ResizeHandle( {\n\tvariation = 'default',\n\tdirection,\n\tresizeWidthBy,\n} ) {\n\tfunction handleKeyDown( event ) {\n\t\tconst { keyCode } = event;\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\treturn (\n\t\t<>\n\t\t\t<button\n\t\t\t\tclassName={ `resizable-editor__drag-handle is-${ direction } is-variation-${ variation }` }\n\t\t\t\taria-label={ __( 'Drag to resize' ) }\n\t\t\t\taria-describedby={ `resizable-editor__resize-help-${ direction }` }\n\t\t\t\tonKeyDown={ handleKeyDown }\n\t\t\t/>\n\t\t\t<VisuallyHidden\n\t\t\t\tid={ `resizable-editor__resize-help-${ direction }` }\n\t\t\t>\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 { 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( { 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\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\tright: enableResizing,\n\t\t\t\tleft: 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 { Children, cloneElement, useState, useMemo } from '@wordpress/element';\nimport {\n\tButton,\n\tprivateApis as componentsPrivateApis,\n\t__experimentalUseSlotFills as useSlotFills,\n} 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/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport ResizableEditor from '../block-editor/resizable-editor';\n\n/**\n * Returns a translated string for the title of the editor canvas container.\n *\n * @param {string} view Editor canvas container view.\n *\n * @return {string} Translated string corresponding to value of view. Default is ''.\n */\nfunction getEditorCanvasContainerTitle( view ) {\n\tswitch ( view ) {\n\t\tcase 'style-book':\n\t\t\treturn __( 'Style Book' );\n\t\tcase 'global-styles-revisions':\n\t\t\treturn __( 'Global styles revisions' );\n\t\tdefault:\n\t\t\treturn '';\n\t}\n}\n\n// Creates a private slot fill.\nconst { createPrivateSlotFill } = unlock( componentsPrivateApis );\nconst SLOT_FILL_NAME = 'EditSiteEditorCanvasContainerSlot';\nconst {\n\tprivateKey,\n\tSlot: EditorCanvasContainerSlot,\n\tFill: EditorCanvasContainerFill,\n} = createPrivateSlotFill( SLOT_FILL_NAME );\n\nfunction EditorCanvasContainer( {\n\tchildren,\n\tcloseButtonLabel,\n\tonClose,\n\tenableResizing = false,\n} ) {\n\tconst { editorCanvasContainerView, showListViewByDefault } = useSelect(\n\t\t( select ) => {\n\t\t\tconst _editorCanvasContainerView = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t).getEditorCanvasContainerView();\n\n\t\t\tconst _showListViewByDefault = select( preferencesStore ).get(\n\t\t\t\t'core/edit-site',\n\t\t\t\t'showListViewByDefault'\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\teditorCanvasContainerView: _editorCanvasContainerView,\n\t\t\t\tshowListViewByDefault: _showListViewByDefault,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst [ isClosed, setIsClosed ] = useState( false );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\tconst sectionFocusReturnRef = useFocusReturn();\n\tconst title = useMemo(\n\t\t() => getEditorCanvasContainerTitle( editorCanvasContainerView ),\n\t\t[ editorCanvasContainerView ]\n\t);\n\n\tconst { setIsListViewOpened } = useDispatch( editSiteStore );\n\n\tfunction onCloseContainer() {\n\t\tif ( typeof onClose === 'function' ) {\n\t\t\tonClose();\n\t\t}\n\t\tsetIsListViewOpened( showListViewByDefault );\n\t\tsetEditorCanvasContainerView( undefined );\n\t\tsetIsClosed( true );\n\t}\n\n\tfunction closeOnEscape( event ) {\n\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\tevent.preventDefault();\n\t\t\tonCloseContainer();\n\t\t}\n\t}\n\n\tconst childrenWithProps = Array.isArray( children )\n\t\t? Children.map( children, ( child, index ) =>\n\t\t\t\tindex === 0\n\t\t\t\t\t? cloneElement( child, {\n\t\t\t\t\t\t\tref: sectionFocusReturnRef,\n\t\t\t\t\t  } )\n\t\t\t\t\t: child\n\t\t  )\n\t\t: cloneElement( children, {\n\t\t\t\tref: sectionFocusReturnRef,\n\t\t  } );\n\n\tif ( isClosed ) {\n\t\treturn null;\n\t}\n\n\tconst shouldShowCloseButton = onClose || closeButtonLabel;\n\n\treturn (\n\t\t<EditorCanvasContainerFill>\n\t\t\t<ResizableEditor enableResizing={ enableResizing }>\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=\"edit-site-editor-canvas-container\"\n\t\t\t\t\tref={ shouldShowCloseButton ? focusOnMountRef : null }\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{ shouldShowCloseButton && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"edit-site-editor-canvas-container__close-button\"\n\t\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\t\tlabel={ closeButtonLabel || __( 'Close' ) }\n\t\t\t\t\t\t\tonClick={ onCloseContainer }\n\t\t\t\t\t\t\tshowTooltip={ false }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ childrenWithProps }\n\t\t\t\t</section>\n\t\t\t</ResizableEditor>\n\t\t</EditorCanvasContainerFill>\n\t);\n}\nfunction useHasEditorCanvasContainer() {\n\tconst fills = useSlotFills( privateKey );\n\treturn !! fills?.length;\n}\n\nEditorCanvasContainer.Slot = EditorCanvasContainerSlot;\nexport default EditorCanvasContainer;\nexport { useHasEditorCanvasContainer, getEditorCanvasContainerTitle };\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__unstableComposite as Composite,\n\t__unstableUseCompositeState as useCompositeState,\n\t__unstableCompositeItem as CompositeItem,\n\tDisabled,\n\tTabPanel,\n} from '@wordpress/components';\n\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tgetCategories,\n\tgetBlockTypes,\n\tgetBlockFromExample,\n\tcreateBlock,\n} from '@wordpress/blocks';\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 { useResizeObserver } from '@wordpress/compose';\nimport { useMemo, useState, memo } from '@wordpress/element';\nimport { ENTER, SPACE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport EditorCanvasContainer from '../editor-canvas-container';\n\nconst { ExperimentalBlockEditorProvider, useGlobalStyle } = unlock(\n\tblockEditorPrivateApis\n);\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 `.edit-site-style-book__example`.\n// This is to ensure that browser default styles for buttons are not applied to the previews.\nconst STYLE_BOOK_IFRAME_STYLES = `\n\t.edit-site-style-book__examples {\n\t\tmax-width: 900px;\n\t\tmargin: 0 auto;\n\t}\n\n\t.edit-site-style-book__example {\n\t\tborder-radius: 2px;\n\t\tcursor: pointer;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 40px;\n\t\tmargin-bottom: 40px;\n\t\tpadding: 16px;\n\t\twidth: 100%;\n\t\tbox-sizing: border-box;\n\t}\n\n\t.edit-site-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.edit-site-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.edit-site-style-book__examples.is-wide .edit-site-style-book__example {\n\t\tflex-direction: row;\n\t}\n\n\t.edit-site-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: 11px;\n\t\tfont-weight: 500;\n\t\tline-height: normal;\n\t\tmargin: 0;\n\t\ttext-align: left;\n\t\ttext-transform: uppercase;\n\t}\n\n\t.edit-site-style-book__examples.is-wide .edit-site-style-book__example-title {\n\t\ttext-align: right;\n\t\twidth: 120px;\n\t}\n\n\t.edit-site-style-book__example-preview {\n\t\twidth: 100%;\n\t}\n\n\t.edit-site-style-book__example-preview .block-editor-block-list__insertion-point,\n\t.edit-site-style-book__example-preview .block-list-appender {\n\t\tdisplay: none;\n\t}\n\n\t.edit-site-style-book__example-preview .is-root-container > .wp-block:first-child {\n\t\tmargin-top: 0;\n\t}\n\t.edit-site-style-book__example-preview .is-root-container > .wp-block:last-child {\n\t\tmargin-bottom: 0;\n\t}\n`;\n\nfunction getExamples() {\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: [\n\t\t\tcreateBlock( 'core/heading', {\n\t\t\t\tcontent: __( 'Code Is Poetry' ),\n\t\t\t\tlevel: 1,\n\t\t\t} ),\n\t\t\tcreateBlock( 'core/heading', {\n\t\t\t\tcontent: __( 'Code Is Poetry' ),\n\t\t\t\tlevel: 2,\n\t\t\t} ),\n\t\t\tcreateBlock( 'core/heading', {\n\t\t\t\tcontent: __( 'Code Is Poetry' ),\n\t\t\t\tlevel: 3,\n\t\t\t} ),\n\t\t\tcreateBlock( 'core/heading', {\n\t\t\t\tcontent: __( 'Code Is Poetry' ),\n\t\t\t\tlevel: 4,\n\t\t\t} ),\n\t\t\tcreateBlock( 'core/heading', {\n\t\t\t\tcontent: __( 'Code Is Poetry' ),\n\t\t\t\tlevel: 5,\n\t\t\t} ),\n\t\t],\n\t};\n\n\tconst otherExamples = getBlockTypes()\n\t\t.filter( ( 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 ) => ( {\n\t\t\tname: blockType.name,\n\t\t\ttitle: blockType.title,\n\t\t\tcategory: blockType.category,\n\t\t\tblocks: getBlockFromExample( blockType.name, blockType.example ),\n\t\t} ) );\n\n\treturn [ headingsExample, ...otherExamples ];\n}\n\nfunction StyleBook( {\n\tenableResizing = true,\n\tisSelected,\n\tonClick,\n\tonSelect,\n\tshowCloseButton = true,\n\tshowTabs = true,\n} ) {\n\tconst [ resizeObserver, sizes ] = useResizeObserver();\n\tconst [ textColor ] = useGlobalStyle( 'color.text' );\n\tconst [ backgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst examples = useMemo( getExamples, [] );\n\tconst tabs = useMemo(\n\t\t() =>\n\t\t\tgetCategories()\n\t\t\t\t.filter( ( category ) =>\n\t\t\t\t\texamples.some(\n\t\t\t\t\t\t( example ) => example.category === category.slug\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t.map( ( category ) => ( {\n\t\t\t\t\tname: category.slug,\n\t\t\t\t\ttitle: category.title,\n\t\t\t\t\ticon: category.icon,\n\t\t\t\t} ) ),\n\t\t[ examples ]\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() => ( { ...originalSettings, __unstableIsPreviewMode: true } ),\n\t\t[ originalSettings ]\n\t);\n\n\treturn (\n\t\t<EditorCanvasContainer\n\t\t\tenableResizing={ enableResizing }\n\t\t\tcloseButtonLabel={\n\t\t\t\tshowCloseButton ? __( 'Close Style Book' ) : null\n\t\t\t}\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={ classnames( 'edit-site-style-book', {\n\t\t\t\t\t'is-wide': sizes.width > 600,\n\t\t\t\t\t'is-button': !! onClick,\n\t\t\t\t} ) }\n\t\t\t\tstyle={ {\n\t\t\t\t\tcolor: textColor,\n\t\t\t\t\tbackground: backgroundColor,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ resizeObserver }\n\t\t\t\t{ showTabs ? (\n\t\t\t\t\t<TabPanel\n\t\t\t\t\t\tclassName=\"edit-site-style-book__tab-panel\"\n\t\t\t\t\t\ttabs={ tabs }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ( tab ) => (\n\t\t\t\t\t\t\t<StyleBookBody\n\t\t\t\t\t\t\t\tcategory={ tab.name }\n\t\t\t\t\t\t\t\texamples={ 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\tsettings={ settings }\n\t\t\t\t\t\t\t\tsizes={ sizes }\n\t\t\t\t\t\t\t\ttitle={ tab.title }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</TabPanel>\n\t\t\t\t) : (\n\t\t\t\t\t<StyleBookBody\n\t\t\t\t\t\texamples={ examples }\n\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\tsizes={ sizes }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</EditorCanvasContainer>\n\t);\n}\n\nconst StyleBookBody = ( {\n\tcategory,\n\texamples,\n\tisSelected,\n\tonClick,\n\tonSelect,\n\tsettings,\n\tsizes,\n\ttitle,\n} ) => {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\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 buttonModeStyles = onClick\n\t\t? 'body { cursor: pointer; } body * { pointer-events: none; }'\n\t\t: '';\n\n\treturn (\n\t\t<Iframe\n\t\t\tclassName={ classnames( 'edit-site-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{\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\t\tbody { position: relative; padding: 32px !important; }` +\n\t\t\t\t\t\tSTYLE_BOOK_IFRAME_STYLES +\n\t\t\t\t\t\tbuttonModeStyles\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<Examples\n\t\t\t\tclassName={ classnames( 'edit-site-style-book__examples', {\n\t\t\t\t\t'is-wide': sizes.width > 600,\n\t\t\t\t} ) }\n\t\t\t\texamples={ examples }\n\t\t\t\tcategory={ category }\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/>\n\t\t</Iframe>\n\t);\n};\n\nconst Examples = memo(\n\t( { className, examples, category, label, isSelected, onSelect } ) => {\n\t\tconst composite = useCompositeState( { orientation: 'vertical' } );\n\t\treturn (\n\t\t\t<Composite\n\t\t\t\t{ ...composite }\n\t\t\t\tclassName={ className }\n\t\t\t\taria-label={ label }\n\t\t\t>\n\t\t\t\t{ examples\n\t\t\t\t\t.filter( ( example ) =>\n\t\t\t\t\t\tcategory ? example.category === category : true\n\t\t\t\t\t)\n\t\t\t\t\t.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\tcomposite={ composite }\n\t\t\t\t\t\t\ttitle={ example.title }\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\tonSelect?.( example.name );\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</Composite>\n\t\t);\n\t}\n);\n\nconst Example = ( { composite, id, title, blocks, isSelected, onClick } ) => {\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\tconst settings = useMemo(\n\t\t() => ( { ...originalSettings, __unstableIsPreviewMode: true } ),\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\treturn (\n\t\t<CompositeItem\n\t\t\t{ ...composite }\n\t\t\tclassName={ classnames( 'edit-site-style-book__example', {\n\t\t\t\t'is-selected': isSelected,\n\t\t\t} ) }\n\t\t\tid={ id }\n\t\t\taria-label={ sprintf(\n\t\t\t\t// translators: %s: Title of a block, e.g. Heading.\n\t\t\t\t__( 'Open %s styles in Styles panel' ),\n\t\t\t\ttitle\n\t\t\t) }\n\t\t\tonClick={ onClick }\n\t\t\trole=\"button\"\n\t\t\tas=\"div\"\n\t\t>\n\t\t\t<span className=\"edit-site-style-book__example-title\">\n\t\t\t\t{ title }\n\t\t\t</span>\n\t\t\t<div className=\"edit-site-style-book__example-preview\" aria-hidden>\n\t\t\t\t<Disabled className=\"edit-site-style-book__example-preview__content\">\n\t\t\t\t\t<ExperimentalBlockEditorProvider\n\t\t\t\t\t\tvalue={ renderedBlocks }\n\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t>\n\t\t\t\t\t\t<BlockList renderAppender={ false } />\n\t\t\t\t\t</ExperimentalBlockEditorProvider>\n\t\t\t\t</Disabled>\n\t\t\t</div>\n\t\t</CompositeItem>\n\t);\n};\n\nexport default StyleBook;\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useContext, useMemo } from '@wordpress/element';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\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 EMPTY_ARRAY = [];\nconst { GlobalStylesContext } = unlock( blockEditorPrivateApis );\nexport default function useGlobalStylesRevisions() {\n\tconst { user: userConfig } = useContext( GlobalStylesContext );\n\tconst { authors, currentUser, isDirty, revisions } = 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\tgetCurrentThemeGlobalStylesRevisions,\n\t\t\t} = select( coreStore );\n\t\t\tconst dirtyEntityRecords = __experimentalGetDirtyEntityRecords();\n\t\t\tconst _currentUser = getCurrentUser();\n\t\t\tconst _isDirty = dirtyEntityRecords.length > 0;\n\t\t\tconst globalStylesRevisions =\n\t\t\t\tgetCurrentThemeGlobalStylesRevisions() || EMPTY_ARRAY;\n\t\t\tconst _authors =\n\t\t\t\tgetUsers( SITE_EDITOR_AUTHORS_QUERY ) || EMPTY_ARRAY;\n\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};\n\t\t},\n\t\t[]\n\t);\n\treturn useMemo( () => {\n\t\tlet _modifiedRevisions = [];\n\t\tif ( ! authors.length || ! revisions.length ) {\n\t\t\treturn {\n\t\t\t\trevisions: _modifiedRevisions,\n\t\t\t\thasUnsavedChanges: isDirty,\n\t\t\t\tisLoading: true,\n\t\t\t};\n\t\t}\n\n\t\t// Adds author details to each revision.\n\t\t_modifiedRevisions = 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\t// Flags the most current saved revision.\n\t\tif ( _modifiedRevisions[ 0 ].id !== 'unsaved' ) {\n\t\t\t_modifiedRevisions[ 0 ].isLatest = true;\n\t\t}\n\n\t\t// Adds an item for unsaved changes.\n\t\tif (\n\t\t\tisDirty &&\n\t\t\tuserConfig &&\n\t\t\tObject.keys( userConfig ).length > 0 &&\n\t\t\tcurrentUser\n\t\t) {\n\t\t\tconst unsavedRevision = {\n\t\t\t\tid: 'unsaved',\n\t\t\t\tstyles: userConfig?.styles,\n\t\t\t\tsettings: userConfig?.settings,\n\t\t\t\tauthor: {\n\t\t\t\t\tname: currentUser?.name,\n\t\t\t\t\tavatar_urls: currentUser?.avatar_urls,\n\t\t\t\t},\n\t\t\t\tmodified: new Date(),\n\t\t\t};\n\n\t\t\t_modifiedRevisions.unshift( unsavedRevision );\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};\n\t}, [ isDirty, revisions, currentUser, authors, userConfig ] );\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { backup, edit, seen } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tIcon,\n\t__experimentalNavigatorButton as NavigatorButton,\n\t__experimentalVStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { BlockEditorProvider } from '@wordpress/block-editor';\nimport { humanTimeDiff } from '@wordpress/date';\nimport { useCallback } from '@wordpress/element';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport StyleVariationsContainer from '../global-styles/style-variations-container';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport StyleBook from '../style-book';\nimport useGlobalStylesRevisions from '../global-styles/screen-revisions/use-global-styles-revisions';\n\nconst noop = () => {};\n\nexport function SidebarNavigationItemGlobalStyles( props ) {\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\tconst { get: getPrefference } = useSelect( preferencesStore );\n\n\tconst turnOffDistractionFreeMode = useCallback( () => {\n\t\tconst isDistractionFree = getPrefference(\n\t\t\teditSiteStore.name,\n\t\t\t'distractionFree'\n\t\t);\n\t\tif ( ! isDistractionFree ) {\n\t\t\treturn;\n\t\t}\n\t\tsetPreference( editSiteStore.name, 'distractionFree', false );\n\t\tcreateNotice( 'info', __( 'Distraction free mode turned off' ), {\n\t\t\tisDismissible: true,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t}, [ createNotice, setPreference, getPrefference ] );\n\tconst hasGlobalStyleVariations = useSelect(\n\t\t( select ) =>\n\t\t\t!! select(\n\t\t\t\tcoreStore\n\t\t\t).__experimentalGetCurrentThemeGlobalStylesVariations()?.length,\n\t\t[]\n\t);\n\tif ( hasGlobalStyleVariations ) {\n\t\treturn (\n\t\t\t<NavigatorButton\n\t\t\t\t{ ...props }\n\t\t\t\tas={ SidebarNavigationItem }\n\t\t\t\tpath=\"/wp_global_styles\"\n\t\t\t/>\n\t\t);\n\t}\n\treturn (\n\t\t<SidebarNavigationItem\n\t\t\t{ ...props }\n\t\t\tonClick={ () => {\n\t\t\t\tturnOffDistractionFreeMode();\n\t\t\t\t// Switch to edit mode.\n\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t// Open global styles sidebar.\n\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction SidebarNavigationScreenGlobalStylesContent() {\n\tconst { storedSettings } = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\treturn {\n\t\t\tstoredSettings: getSettings( false ),\n\t\t};\n\t}, [] );\n\n\t// Wrap in a BlockEditorProvider to ensure that the Iframe's dependencies are\n\t// loaded. This is necessary because the Iframe component waits until\n\t// the block editor store's `__internalIsInitialized` is true before\n\t// rendering the iframe. Without this, the iframe previews will not render\n\t// in mobile viewport sizes, where the editor canvas is hidden.\n\treturn (\n\t\t<BlockEditorProvider\n\t\t\tsettings={ storedSettings }\n\t\t\tonChange={ noop }\n\t\t\tonInput={ noop }\n\t\t>\n\t\t\t<StyleVariationsContainer />\n\t\t</BlockEditorProvider>\n\t);\n}\n\nfunction SidebarNavigationScreenGlobalStylesFooter( { onClickRevisions } ) {\n\tconst { revisions, isLoading } = useGlobalStylesRevisions();\n\tconst { revisionsCount } = 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\trevisionsCount:\n\t\t\t\tglobalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0,\n\t\t};\n\t}, [] );\n\n\tconst hasRevisions = revisionsCount >= 2;\n\tconst modified = revisions?.[ 0 ]?.modified;\n\n\tif ( ! hasRevisions || isLoading || ! modified ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack className=\"edit-site-sidebar-navigation-screen-global-styles__footer\">\n\t\t\t<SidebarNavigationItem\n\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen-global-styles__revisions\"\n\t\t\t\tlabel={ __( 'Revisions' ) }\n\t\t\t\tonClick={ onClickRevisions }\n\t\t\t>\n\t\t\t\t<HStack\n\t\t\t\t\tas=\"span\"\n\t\t\t\t\talignment=\"center\"\n\t\t\t\t\tspacing={ 5 }\n\t\t\t\t\tdirection=\"row\"\n\t\t\t\t\tjustify=\"space-between\"\n\t\t\t\t>\n\t\t\t\t\t<span className=\"edit-site-sidebar-navigation-screen-global-styles__revisions__label\">\n\t\t\t\t\t\t{ __( 'Last modified' ) }\n\t\t\t\t\t</span>\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<time dateTime={ modified }>\n\t\t\t\t\t\t\t{ humanTimeDiff( modified ) }\n\t\t\t\t\t\t</time>\n\t\t\t\t\t</span>\n\t\t\t\t\t<Icon icon={ backup } style={ { fill: 'currentcolor' } } />\n\t\t\t\t</HStack>\n\t\t\t</SidebarNavigationItem>\n\t\t</VStack>\n\t);\n}\n\nexport default function SidebarNavigationScreenGlobalStyles() {\n\tconst { openGeneralSidebar, setIsListViewOpened } =\n\t\tuseDispatch( editSiteStore );\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst { setCanvasMode, setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\tconst { get: getPrefference } = useSelect( preferencesStore );\n\tconst { isViewMode, isStyleBookOpened } = useSelect( ( select ) => {\n\t\tconst { getCanvasMode, getEditorCanvasContainerView } = unlock(\n\t\t\tselect( editSiteStore )\n\t\t);\n\t\treturn {\n\t\t\tisViewMode: 'view' === getCanvasMode(),\n\t\t\tisStyleBookOpened: 'style-book' === getEditorCanvasContainerView(),\n\t\t};\n\t}, [] );\n\n\tconst turnOffDistractionFreeMode = useCallback( () => {\n\t\tconst isDistractionFree = getPrefference(\n\t\t\teditSiteStore.name,\n\t\t\t'distractionFree'\n\t\t);\n\t\tif ( ! isDistractionFree ) {\n\t\t\treturn;\n\t\t}\n\t\tsetPreference( editSiteStore.name, 'distractionFree', false );\n\t\tcreateNotice( 'info', __( 'Distraction free mode turned off' ), {\n\t\t\tisDismissible: true,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t}, [ createNotice, setPreference, getPrefference ] );\n\n\tconst openGlobalStyles = useCallback( async () => {\n\t\tturnOffDistractionFreeMode();\n\t\treturn Promise.all( [\n\t\t\tsetCanvasMode( 'edit' ),\n\t\t\topenGeneralSidebar( 'edit-site/global-styles' ),\n\t\t] );\n\t}, [ setCanvasMode, openGeneralSidebar, turnOffDistractionFreeMode ] );\n\n\tconst openStyleBook = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the Style Book once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. This ensures that\n\t\t// the Style Book is not prematurely closed.\n\t\tsetEditorCanvasContainerView( 'style-book' );\n\t\tsetIsListViewOpened( false );\n\t}, [\n\t\topenGlobalStyles,\n\t\tsetEditorCanvasContainerView,\n\t\tsetIsListViewOpened,\n\t] );\n\n\tconst openRevisions = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the global styles revisions once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. The global styles UI is responsible\n\t\t// for redirecting to the revisions screen once the editor canvas container\n\t\t// has been set to 'global-styles-revisions'.\n\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t}, [ openGlobalStyles, setEditorCanvasContainerView ] );\n\n\treturn (\n\t\t<>\n\t\t\t<SidebarNavigationScreen\n\t\t\t\ttitle={ __( 'Styles' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Choose a different style combination for the theme styles.'\n\t\t\t\t) }\n\t\t\t\tcontent={ <SidebarNavigationScreenGlobalStylesContent /> }\n\t\t\t\tfooter={\n\t\t\t\t\t<SidebarNavigationScreenGlobalStylesFooter\n\t\t\t\t\t\tonClickRevisions={ openRevisions }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tactions={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! isMobileViewport && (\n\t\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\t\ticon={ seen }\n\t\t\t\t\t\t\t\tlabel={ __( 'Style Book' ) }\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\tsetEditorCanvasContainerView(\n\t\t\t\t\t\t\t\t\t\t! isStyleBookOpened\n\t\t\t\t\t\t\t\t\t\t\t? 'style-book'\n\t\t\t\t\t\t\t\t\t\t\t: undefined\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\tisPressed={ isStyleBookOpened }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\ticon={ edit }\n\t\t\t\t\t\t\tlabel={ __( 'Edit styles' ) }\n\t\t\t\t\t\t\tonClick={ async () => await openGlobalStyles() }\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{ isStyleBookOpened && ! isMobileViewport && isViewMode && (\n\t\t\t\t<StyleBook\n\t\t\t\t\tenableResizing={ false }\n\t\t\t\t\tisSelected={ () => false }\n\t\t\t\t\tonClick={ openStyleBook }\n\t\t\t\t\tonSelect={ openStyleBook }\n\t\t\t\t\tshowCloseButton={ false }\n\t\t\t\t\tshowTabs={ false }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalNavigatorButton as NavigatorButton,\n\t__experimentalUseNavigator as useNavigator,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { layout, symbol, navigation, styles, page } from '@wordpress/icons';\nimport { useDispatch } from '@wordpress/data';\n\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { SidebarNavigationItemGlobalStyles } from '../sidebar-navigation-screen-global-styles';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nexport default function SidebarNavigationScreenMain() {\n\tconst { location } = useNavigator();\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\n\t// Clear the editor canvas container view when accessing the main navigation screen.\n\tuseEffect( () => {\n\t\tif ( location?.path === '/' ) {\n\t\t\tsetEditorCanvasContainerView( undefined );\n\t\t}\n\t}, [ setEditorCanvasContainerView, location?.path ] );\n\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\tisRoot\n\t\t\ttitle={ __( 'Design' ) }\n\t\t\tdescription={ __(\n\t\t\t\t'Customize the appearance of your website using the block editor.'\n\t\t\t) }\n\t\t\tcontent={\n\t\t\t\t<ItemGroup>\n\t\t\t\t\t<NavigatorButton\n\t\t\t\t\t\tas={ SidebarNavigationItem }\n\t\t\t\t\t\tpath=\"/navigation\"\n\t\t\t\t\t\twithChevron\n\t\t\t\t\t\ticon={ navigation }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Navigation' ) }\n\t\t\t\t\t</NavigatorButton>\n\t\t\t\t\t<SidebarNavigationItemGlobalStyles\n\t\t\t\t\t\twithChevron\n\t\t\t\t\t\ticon={ styles }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Styles' ) }\n\t\t\t\t\t</SidebarNavigationItemGlobalStyles>\n\t\t\t\t\t<NavigatorButton\n\t\t\t\t\t\tas={ SidebarNavigationItem }\n\t\t\t\t\t\tpath=\"/page\"\n\t\t\t\t\t\twithChevron\n\t\t\t\t\t\ticon={ page }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Pages' ) }\n\t\t\t\t\t</NavigatorButton>\n\t\t\t\t\t<NavigatorButton\n\t\t\t\t\t\tas={ SidebarNavigationItem }\n\t\t\t\t\t\tpath=\"/wp_template\"\n\t\t\t\t\t\twithChevron\n\t\t\t\t\t\ticon={ layout }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Templates' ) }\n\t\t\t\t\t</NavigatorButton>\n\t\t\t\t\t<NavigatorButton\n\t\t\t\t\t\tas={ SidebarNavigationItem }\n\t\t\t\t\t\tpath=\"/patterns\"\n\t\t\t\t\t\twithChevron\n\t\t\t\t\t\ticon={ symbol }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Patterns' ) }\n\t\t\t\t\t</NavigatorButton>\n\t\t\t\t</ItemGroup>\n\t\t\t}\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst home = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z\" />\n\t</SVG>\n);\n\nexport default home;\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst verse = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\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\nexport default verse;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst pin = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"m21.5 9.1-6.6-6.6-4.2 5.6c-1.2-.1-2.4.1-3.6.7-.1 0-.1.1-.2.1-.5.3-.9.6-1.2.9l3.7 3.7-5.7 5.7v1.1h1.1l5.7-5.7 3.7 3.7c.4-.4.7-.8.9-1.2.1-.1.1-.2.2-.3.6-1.1.8-2.4.6-3.6l5.6-4.1zm-7.3 3.5.1.9c.1.9 0 1.8-.4 2.6l-6-6c.8-.4 1.7-.5 2.6-.4l.9.1L15 4.9 19.1 9l-4.9 3.6z\" />\n\t</SVG>\n);\n\nexport default pin;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst archive = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5zM8 12.8h8v-1.5H8v1.5zm0 3h8v-1.5H8v1.5z\" />\n\t</SVG>\n);\n\nexport default archive;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst search = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z\" />\n\t</SVG>\n);\n\nexport default search;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst notFound = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm.5 12c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v10zm-11-7.6h-.7l-3.1 4.3h2.8V15h1v-1.3h.7v-.8h-.7V9.4zm-.9 3.5H6.3l1.2-1.7v1.7zm5.6-3.2c-.4-.2-.8-.4-1.2-.4-.5 0-.9.1-1.2.4-.4.2-.6.6-.8 1-.2.4-.3.9-.3 1.5s.1 1.1.3 1.6c.2.4.5.8.8 1 .4.2.8.4 1.2.4.5 0 .9-.1 1.2-.4.4-.2.6-.6.8-1 .2-.4.3-1 .3-1.6 0-.6-.1-1.1-.3-1.5-.1-.5-.4-.8-.8-1zm0 3.6c-.1.3-.3.5-.5.7-.2.1-.4.2-.7.2-.3 0-.5-.1-.7-.2-.2-.1-.4-.4-.5-.7-.1-.3-.2-.7-.2-1.2 0-.7.1-1.2.4-1.5.3-.3.6-.5 1-.5s.7.2 1 .5c.3.3.4.8.4 1.5-.1.5-.1.9-.2 1.2zm5-3.9h-.7l-3.1 4.3h2.8V15h1v-1.3h.7v-.8h-.7V9.4zm-1 3.5H16l1.2-1.7v1.7z\" />\n\t</SVG>\n);\n\nexport default notFound;\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst list = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z\" />\n\t</SVG>\n);\n\nexport default list;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst category = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path\n\t\t\td=\"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z\"\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t/>\n\t</SVG>\n);\n\nexport default category;\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst commentAuthorAvatar = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\td=\"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\t\tclipRule=\"evenodd\"\n\t\t/>\n\t</SVG>\n);\n\nexport default commentAuthorAvatar;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst blockMeta = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\td=\"M8.95 11.25H4v1.5h4.95v4.5H13V18c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v.75h-2.55v-7.5H13V9c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v.75H8.95v4.5ZM14.5 15v3c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-3c0-.3-.2-.5-.5-.5h-3c-.3 0-.5.2-.5.5Zm0-6V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5Z\"\n\t\t\tclipRule=\"evenodd\"\n\t\t/>\n\t</SVG>\n);\n\nexport default blockMeta;\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst calendar = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z\" />\n\t</SVG>\n);\n\nexport default calendar;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst tag = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M20.1 11.2l-6.7-6.7c-.1-.1-.3-.2-.5-.2H5c-.4-.1-.8.3-.8.7v7.8c0 .2.1.4.2.5l6.7 6.7c.2.2.5.4.7.5s.6.2.9.2c.3 0 .6-.1.9-.2.3-.1.5-.3.8-.5l5.6-5.6c.4-.4.7-1 .7-1.6.1-.6-.2-1.2-.6-1.6zM19 13.4L13.4 19c-.1.1-.2.1-.3.2-.2.1-.4.1-.6 0-.1 0-.2-.1-.3-.2l-6.5-6.5V5.8h6.8l6.5 6.5c.2.2.2.4.2.6 0 .1 0 .3-.2.5zM9 8c-.6 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.4-1-1-1z\" />\n\t</SVG>\n);\n\nexport default tag;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst media = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"m7 6.5 4 2.5-4 2.5z\" />\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default media;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst plus = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z\" />\n\t</SVG>\n);\n\nexport default plus;\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useState } from '@wordpress/element';\nimport { useDebounce } from '@wordpress/compose';\n\nexport default function useDebouncedInput( defaultValue = '' ) {\n\tconst [ input, setInput ] = useState( defaultValue );\n\tconst [ debounced, setter ] = useState( defaultValue );\n\tconst setDebounced = useDebounce( setter, 250 );\n\tuseEffect( () => {\n\t\tif ( debounced !== input ) {\n\t\t\tsetDebounced( input );\n\t\t}\n\t}, [ debounced, input ] );\n\treturn [ input, setInput, debounced ];\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst post = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z\" />\n\t</SVG>\n);\n\nexport default post;\n","/**\n * External dependencies\n */\nimport { get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useMemo, useCallback } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { blockMeta, post, archive } from '@wordpress/icons';\n\n/**\n * @typedef IHasNameAndId\n * @property {string|number} id   The entity's id.\n * @property {string}        name The entity's name.\n */\n\n/**\n * Helper util to map records to add a `name` prop from a\n * provided path, in order to handle all entities in the same\n * fashion(implementing`IHasNameAndId` interface).\n *\n * @param {Object[]} entities The array of entities.\n * @param {string}   path     The path to map a `name` property from the entity.\n * @return {IHasNameAndId[]} An array of enitities that now implement the `IHasNameAndId` interface.\n */\nexport const mapToIHasNameAndId = ( entities, path ) => {\n\treturn ( entities || [] ).map( ( entity ) => ( {\n\t\t...entity,\n\t\tname: decodeEntities( get( entity, path ) ),\n\t} ) );\n};\n\n/**\n * @typedef {Object} EntitiesInfo\n * @property {boolean}  hasEntities         If an entity has available records(posts, terms, etc..).\n * @property {number[]} existingEntitiesIds An array of the existing entities ids.\n */\n\nexport const useExistingTemplates = () => {\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} ),\n\t\t[]\n\t);\n};\n\nexport const useDefaultTemplateTypes = () => {\n\treturn useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).__experimentalGetDefaultTemplateTypes(),\n\t\t[]\n\t);\n};\n\nconst usePublicPostTypes = () => {\n\tconst postTypes = useSelect(\n\t\t( select ) => select( coreStore ).getPostTypes( { per_page: -1 } ),\n\t\t[]\n\t);\n\treturn useMemo( () => {\n\t\tconst excludedPostTypes = [ 'attachment' ];\n\t\treturn postTypes?.filter(\n\t\t\t( { viewable, slug } ) =>\n\t\t\t\tviewable && ! excludedPostTypes.includes( slug )\n\t\t);\n\t}, [ postTypes ] );\n};\n\nconst usePublicTaxonomies = () => {\n\tconst taxonomies = useSelect(\n\t\t( select ) => select( coreStore ).getTaxonomies( { per_page: -1 } ),\n\t\t[]\n\t);\n\treturn useMemo( () => {\n\t\treturn taxonomies?.filter(\n\t\t\t( { visibility } ) => visibility?.publicly_queryable\n\t\t);\n\t}, [ taxonomies ] );\n};\n\nfunction usePostTypeNeedsUniqueIdentifier( publicPostTypes ) {\n\tconst postTypeLabels = useMemo( () =>\n\t\tpublicPostTypes?.reduce( ( accumulator, { labels } ) => {\n\t\t\tconst singularName = labels.singular_name.toLowerCase();\n\t\t\taccumulator[ singularName ] =\n\t\t\t\t( accumulator[ singularName ] || 0 ) + 1;\n\t\t\treturn accumulator;\n\t\t}, {} )\n\t);\n\treturn useCallback(\n\t\t( { labels, slug } ) => {\n\t\t\tconst singularName = labels.singular_name.toLowerCase();\n\t\t\treturn postTypeLabels[ singularName ] > 1 && singularName !== slug;\n\t\t},\n\t\t[ postTypeLabels ]\n\t);\n}\n\nexport function usePostTypeArchiveMenuItems() {\n\tconst publicPostTypes = usePublicPostTypes();\n\tconst postTypesWithArchives = useMemo(\n\t\t() => publicPostTypes?.filter( ( postType ) => postType.has_archive ),\n\t\t[ publicPostTypes ]\n\t);\n\tconst existingTemplates = useExistingTemplates();\n\tconst needsUniqueIdentifier = usePostTypeNeedsUniqueIdentifier(\n\t\tpostTypesWithArchives\n\t);\n\treturn useMemo(\n\t\t() =>\n\t\t\tpostTypesWithArchives\n\t\t\t\t?.filter(\n\t\t\t\t\t( postType ) =>\n\t\t\t\t\t\t! ( existingTemplates || [] ).some(\n\t\t\t\t\t\t\t( existingTemplate ) =>\n\t\t\t\t\t\t\t\texistingTemplate.slug ===\n\t\t\t\t\t\t\t\t'archive-' + postType.slug\n\t\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t.map( ( postType ) => {\n\t\t\t\t\tlet title;\n\t\t\t\t\tif ( needsUniqueIdentifier( postType ) ) {\n\t\t\t\t\t\ttitle = sprintf(\n\t\t\t\t\t\t\t// translators: %1s: Name of the post type e.g: \"Post\"; %2s: Slug of the post type e.g: \"book\".\n\t\t\t\t\t\t\t__( 'Archive: %1$s (%2$s)' ),\n\t\t\t\t\t\t\tpostType.labels.singular_name,\n\t\t\t\t\t\t\tpostType.slug\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttitle = sprintf(\n\t\t\t\t\t\t\t// translators: %s: Name of the post type e.g: \"Post\".\n\t\t\t\t\t\t\t__( 'Archive: %s' ),\n\t\t\t\t\t\t\tpostType.labels.singular_name\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\treturn {\n\t\t\t\t\t\tslug: 'archive-' + postType.slug,\n\t\t\t\t\t\tdescription: sprintf(\n\t\t\t\t\t\t\t// translators: %s: Name of the post type e.g: \"Post\".\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'Displays an archive with the latest posts of type: %s.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tpostType.labels.singular_name\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t// `icon` is the `menu_icon` property of a post type. We\n\t\t\t\t\t\t// only handle `dashicons` for now, even if the `menu_icon`\n\t\t\t\t\t\t// also supports urls and svg as values.\n\t\t\t\t\t\ticon: postType.icon?.startsWith( 'dashicons-' )\n\t\t\t\t\t\t\t? postType.icon.slice( 10 )\n\t\t\t\t\t\t\t: archive,\n\t\t\t\t\t\ttemplatePrefix: 'archive',\n\t\t\t\t\t};\n\t\t\t\t} ) || [],\n\t\t[ postTypesWithArchives, existingTemplates, needsUniqueIdentifier ]\n\t);\n}\n\nexport const usePostTypeMenuItems = ( onClickMenuItem ) => {\n\tconst publicPostTypes = usePublicPostTypes();\n\tconst existingTemplates = useExistingTemplates();\n\tconst defaultTemplateTypes = useDefaultTemplateTypes();\n\tconst needsUniqueIdentifier =\n\t\tusePostTypeNeedsUniqueIdentifier( publicPostTypes );\n\t// `page`is a special case in template hierarchy.\n\tconst templatePrefixes = useMemo(\n\t\t() =>\n\t\t\tpublicPostTypes?.reduce( ( accumulator, { slug } ) => {\n\t\t\t\tlet suffix = slug;\n\t\t\t\tif ( slug !== 'page' ) {\n\t\t\t\t\tsuffix = `single-${ suffix }`;\n\t\t\t\t}\n\t\t\t\taccumulator[ slug ] = suffix;\n\t\t\t\treturn accumulator;\n\t\t\t}, {} ),\n\t\t[ publicPostTypes ]\n\t);\n\tconst postTypesInfo = useEntitiesInfo( 'postType', templatePrefixes );\n\tconst existingTemplateSlugs = ( existingTemplates || [] ).map(\n\t\t( { slug } ) => slug\n\t);\n\tconst menuItems = ( publicPostTypes || [] ).reduce(\n\t\t( accumulator, postType ) => {\n\t\t\tconst { slug, labels, icon } = postType;\n\t\t\t// We need to check if the general template is part of the\n\t\t\t// defaultTemplateTypes. If it is, just use that info and\n\t\t\t// augment it with the specific template functionality.\n\t\t\tconst generalTemplateSlug = templatePrefixes[ slug ];\n\t\t\tconst defaultTemplateType = defaultTemplateTypes?.find(\n\t\t\t\t( { slug: _slug } ) => _slug === generalTemplateSlug\n\t\t\t);\n\t\t\tconst hasGeneralTemplate =\n\t\t\t\texistingTemplateSlugs?.includes( generalTemplateSlug );\n\t\t\tconst _needsUniqueIdentifier = needsUniqueIdentifier( postType );\n\t\t\tlet menuItemTitle = sprintf(\n\t\t\t\t// translators: %s: Name of the post type e.g: \"Post\".\n\t\t\t\t__( 'Single item: %s' ),\n\t\t\t\tlabels.singular_name\n\t\t\t);\n\t\t\tif ( _needsUniqueIdentifier ) {\n\t\t\t\tmenuItemTitle = sprintf(\n\t\t\t\t\t// translators: %1s: Name of the post type e.g: \"Post\"; %2s: Slug of the post type e.g: \"book\".\n\t\t\t\t\t__( 'Single item: %1$s (%2$s)' ),\n\t\t\t\t\tlabels.singular_name,\n\t\t\t\t\tslug\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst menuItem = defaultTemplateType\n\t\t\t\t? {\n\t\t\t\t\t\t...defaultTemplateType,\n\t\t\t\t\t\ttemplatePrefix: templatePrefixes[ slug ],\n\t\t\t\t  }\n\t\t\t\t: {\n\t\t\t\t\t\tslug: generalTemplateSlug,\n\t\t\t\t\t\ttitle: menuItemTitle,\n\t\t\t\t\t\tdescription: sprintf(\n\t\t\t\t\t\t\t// translators: %s: Name of the post type e.g: \"Post\".\n\t\t\t\t\t\t\t__( 'Displays a single item: %s.' ),\n\t\t\t\t\t\t\tlabels.singular_name\n\t\t\t\t\t\t),\n\t\t\t\t\t\t// `icon` is the `menu_icon` property of a post type. We\n\t\t\t\t\t\t// only handle `dashicons` for now, even if the `menu_icon`\n\t\t\t\t\t\t// also supports urls and svg as values.\n\t\t\t\t\t\ticon: icon?.startsWith( 'dashicons-' )\n\t\t\t\t\t\t\t? icon.slice( 10 )\n\t\t\t\t\t\t\t: post,\n\t\t\t\t\t\ttemplatePrefix: templatePrefixes[ slug ],\n\t\t\t\t  };\n\t\t\tconst hasEntities = postTypesInfo?.[ slug ]?.hasEntities;\n\t\t\t// We have a different template creation flow only if they have entities.\n\t\t\tif ( hasEntities ) {\n\t\t\t\tmenuItem.onClick = ( template ) => {\n\t\t\t\t\tonClickMenuItem( {\n\t\t\t\t\t\ttype: 'postType',\n\t\t\t\t\t\tslug,\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\trecordNamePath: 'title.rendered',\n\t\t\t\t\t\t\tqueryArgs: ( { search } ) => {\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\t_fields: 'id,title,slug,link',\n\t\t\t\t\t\t\t\t\torderBy: search ? 'relevance' : 'modified',\n\t\t\t\t\t\t\t\t\texclude:\n\t\t\t\t\t\t\t\t\t\tpostTypesInfo[ slug ]\n\t\t\t\t\t\t\t\t\t\t\t.existingEntitiesIds,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tgetSpecificTemplate: ( suggestion ) => {\n\t\t\t\t\t\t\t\tconst templateSlug = `${ templatePrefixes[ slug ] }-${ suggestion.slug }`;\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\ttitle: templateSlug,\n\t\t\t\t\t\t\t\t\tslug: templateSlug,\n\t\t\t\t\t\t\t\t\ttemplatePrefix: templatePrefixes[ 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},\n\t\t\t\t\t\tlabels,\n\t\t\t\t\t\thasGeneralTemplate,\n\t\t\t\t\t\ttemplate,\n\t\t\t\t\t} );\n\t\t\t\t};\n\t\t\t}\n\t\t\t// We don't need to add the menu item if there are no\n\t\t\t// entities and the general template exists.\n\t\t\tif ( ! hasGeneralTemplate || hasEntities ) {\n\t\t\t\taccumulator.push( menuItem );\n\t\t\t}\n\t\t\treturn accumulator;\n\t\t},\n\t\t[]\n\t);\n\t// Split menu items into two groups: one for the default post types\n\t// and one for the rest.\n\tconst postTypesMenuItems = useMemo(\n\t\t() =>\n\t\t\tmenuItems.reduce(\n\t\t\t\t( accumulator, postType ) => {\n\t\t\t\t\tconst { slug } = postType;\n\t\t\t\t\tlet key = 'postTypesMenuItems';\n\t\t\t\t\tif ( slug === 'page' ) {\n\t\t\t\t\t\tkey = 'defaultPostTypesMenuItems';\n\t\t\t\t\t}\n\t\t\t\t\taccumulator[ key ].push( postType );\n\t\t\t\t\treturn accumulator;\n\t\t\t\t},\n\t\t\t\t{ defaultPostTypesMenuItems: [], postTypesMenuItems: [] }\n\t\t\t),\n\t\t[ menuItems ]\n\t);\n\treturn postTypesMenuItems;\n};\n\nexport const useTaxonomiesMenuItems = ( onClickMenuItem ) => {\n\tconst publicTaxonomies = usePublicTaxonomies();\n\tconst existingTemplates = useExistingTemplates();\n\tconst defaultTemplateTypes = useDefaultTemplateTypes();\n\t// `category` and `post_tag` are special cases in template hierarchy.\n\tconst templatePrefixes = useMemo(\n\t\t() =>\n\t\t\tpublicTaxonomies?.reduce( ( accumulator, { slug } ) => {\n\t\t\t\tlet suffix = slug;\n\t\t\t\tif ( ! [ 'category', 'post_tag' ].includes( slug ) ) {\n\t\t\t\t\tsuffix = `taxonomy-${ suffix }`;\n\t\t\t\t}\n\t\t\t\tif ( slug === 'post_tag' ) {\n\t\t\t\t\tsuffix = `tag`;\n\t\t\t\t}\n\t\t\t\taccumulator[ slug ] = suffix;\n\t\t\t\treturn accumulator;\n\t\t\t}, {} ),\n\t\t[ publicTaxonomies ]\n\t);\n\t// We need to keep track of naming conflicts. If a conflict\n\t// occurs, we need to add slug.\n\tconst taxonomyLabels = publicTaxonomies?.reduce(\n\t\t( accumulator, { labels } ) => {\n\t\t\tconst singularName = labels.singular_name.toLowerCase();\n\t\t\taccumulator[ singularName ] =\n\t\t\t\t( accumulator[ singularName ] || 0 ) + 1;\n\t\t\treturn accumulator;\n\t\t},\n\t\t{}\n\t);\n\tconst needsUniqueIdentifier = ( labels, slug ) => {\n\t\tif ( [ 'category', 'post_tag' ].includes( slug ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tconst singularName = labels.singular_name.toLowerCase();\n\t\treturn taxonomyLabels[ singularName ] > 1 && singularName !== slug;\n\t};\n\tconst taxonomiesInfo = useEntitiesInfo( 'taxonomy', templatePrefixes );\n\tconst existingTemplateSlugs = ( existingTemplates || [] ).map(\n\t\t( { slug } ) => slug\n\t);\n\tconst menuItems = ( publicTaxonomies || [] ).reduce(\n\t\t( accumulator, taxonomy ) => {\n\t\t\tconst { slug, labels } = taxonomy;\n\t\t\t// We need to check if the general template is part of the\n\t\t\t// defaultTemplateTypes. If it is, just use that info and\n\t\t\t// augment it with the specific template functionality.\n\t\t\tconst generalTemplateSlug = templatePrefixes[ slug ];\n\t\t\tconst defaultTemplateType = defaultTemplateTypes?.find(\n\t\t\t\t( { slug: _slug } ) => _slug === generalTemplateSlug\n\t\t\t);\n\t\t\tconst hasGeneralTemplate =\n\t\t\t\texistingTemplateSlugs?.includes( generalTemplateSlug );\n\t\t\tconst _needsUniqueIdentifier = needsUniqueIdentifier(\n\t\t\t\tlabels,\n\t\t\t\tslug\n\t\t\t);\n\t\t\tlet menuItemTitle = labels.singular_name;\n\t\t\tif ( _needsUniqueIdentifier ) {\n\t\t\t\tmenuItemTitle = sprintf(\n\t\t\t\t\t// translators: %1s: Name of the taxonomy e.g: \"Category\"; %2s: Slug of the taxonomy e.g: \"product_cat\".\n\t\t\t\t\t__( '%1$s (%2$s)' ),\n\t\t\t\t\tlabels.singular_name,\n\t\t\t\t\tslug\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst menuItem = defaultTemplateType\n\t\t\t\t? {\n\t\t\t\t\t\t...defaultTemplateType,\n\t\t\t\t\t\ttemplatePrefix: templatePrefixes[ slug ],\n\t\t\t\t  }\n\t\t\t\t: {\n\t\t\t\t\t\tslug: generalTemplateSlug,\n\t\t\t\t\t\ttitle: menuItemTitle,\n\t\t\t\t\t\tdescription: sprintf(\n\t\t\t\t\t\t\t// translators: %s: Name of the taxonomy e.g: \"Product Categories\".\n\t\t\t\t\t\t\t__( 'Displays taxonomy: %s.' ),\n\t\t\t\t\t\t\tlabels.singular_name\n\t\t\t\t\t\t),\n\t\t\t\t\t\ticon: blockMeta,\n\t\t\t\t\t\ttemplatePrefix: templatePrefixes[ slug ],\n\t\t\t\t  };\n\t\t\tconst hasEntities = taxonomiesInfo?.[ slug ]?.hasEntities;\n\t\t\t// We have a different template creation flow only if they have entities.\n\t\t\tif ( hasEntities ) {\n\t\t\t\tmenuItem.onClick = ( template ) => {\n\t\t\t\t\tonClickMenuItem( {\n\t\t\t\t\t\ttype: 'taxonomy',\n\t\t\t\t\t\tslug,\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tqueryArgs: ( { search } ) => {\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\t_fields: 'id,name,slug,link',\n\t\t\t\t\t\t\t\t\torderBy: search ? 'name' : 'count',\n\t\t\t\t\t\t\t\t\texclude:\n\t\t\t\t\t\t\t\t\t\ttaxonomiesInfo[ slug ]\n\t\t\t\t\t\t\t\t\t\t\t.existingEntitiesIds,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tgetSpecificTemplate: ( suggestion ) => {\n\t\t\t\t\t\t\t\tconst templateSlug = `${ templatePrefixes[ slug ] }-${ suggestion.slug }`;\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\ttitle: templateSlug,\n\t\t\t\t\t\t\t\t\tslug: templateSlug,\n\t\t\t\t\t\t\t\t\ttemplatePrefix: templatePrefixes[ 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},\n\t\t\t\t\t\tlabels,\n\t\t\t\t\t\thasGeneralTemplate,\n\t\t\t\t\t\ttemplate,\n\t\t\t\t\t} );\n\t\t\t\t};\n\t\t\t}\n\t\t\t// We don't need to add the menu item if there are no\n\t\t\t// entities and the general template exists.\n\t\t\tif ( ! hasGeneralTemplate || hasEntities ) {\n\t\t\t\taccumulator.push( menuItem );\n\t\t\t}\n\t\t\treturn accumulator;\n\t\t},\n\t\t[]\n\t);\n\t// Split menu items into two groups: one for the default taxonomies\n\t// and one for the rest.\n\tconst taxonomiesMenuItems = useMemo(\n\t\t() =>\n\t\t\tmenuItems.reduce(\n\t\t\t\t( accumulator, taxonomy ) => {\n\t\t\t\t\tconst { slug } = taxonomy;\n\t\t\t\t\tlet key = 'taxonomiesMenuItems';\n\t\t\t\t\tif ( [ 'category', 'tag' ].includes( slug ) ) {\n\t\t\t\t\t\tkey = 'defaultTaxonomiesMenuItems';\n\t\t\t\t\t}\n\t\t\t\t\taccumulator[ key ].push( taxonomy );\n\t\t\t\t\treturn accumulator;\n\t\t\t\t},\n\t\t\t\t{ defaultTaxonomiesMenuItems: [], taxonomiesMenuItems: [] }\n\t\t\t),\n\t\t[ menuItems ]\n\t);\n\treturn taxonomiesMenuItems;\n};\n\nconst USE_AUTHOR_MENU_ITEM_TEMPLATE_PREFIX = { user: 'author' };\nconst USE_AUTHOR_MENU_ITEM_QUERY_PARAMETERS = { user: { who: 'authors' } };\nexport function useAuthorMenuItem( onClickMenuItem ) {\n\tconst existingTemplates = useExistingTemplates();\n\tconst defaultTemplateTypes = useDefaultTemplateTypes();\n\tconst authorInfo = useEntitiesInfo(\n\t\t'root',\n\t\tUSE_AUTHOR_MENU_ITEM_TEMPLATE_PREFIX,\n\t\tUSE_AUTHOR_MENU_ITEM_QUERY_PARAMETERS\n\t);\n\tlet authorMenuItem = defaultTemplateTypes?.find(\n\t\t( { slug } ) => slug === 'author'\n\t);\n\tif ( ! authorMenuItem ) {\n\t\tauthorMenuItem = {\n\t\t\tdescription: __(\n\t\t\t\t'Displays latest posts written by a single author.'\n\t\t\t),\n\t\t\tslug: 'author',\n\t\t\ttitle: 'Author',\n\t\t};\n\t}\n\tconst hasGeneralTemplate = !! existingTemplates?.find(\n\t\t( { slug } ) => slug === 'author'\n\t);\n\tif ( authorInfo.user?.hasEntities ) {\n\t\tauthorMenuItem = { ...authorMenuItem, templatePrefix: 'author' };\n\t\tauthorMenuItem.onClick = ( template ) => {\n\t\t\tonClickMenuItem( {\n\t\t\t\ttype: 'root',\n\t\t\t\tslug: 'user',\n\t\t\t\tconfig: {\n\t\t\t\t\tqueryArgs: ( { search } ) => {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t_fields: 'id,name,slug,link',\n\t\t\t\t\t\t\torderBy: search ? 'name' : 'registered_date',\n\t\t\t\t\t\t\texclude: authorInfo.user.existingEntitiesIds,\n\t\t\t\t\t\t\twho: 'authors',\n\t\t\t\t\t\t};\n\t\t\t\t\t},\n\t\t\t\t\tgetSpecificTemplate: ( suggestion ) => {\n\t\t\t\t\t\tconst templateSlug = `author-${ suggestion.slug }`;\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\ttitle: templateSlug,\n\t\t\t\t\t\t\tslug: templateSlug,\n\t\t\t\t\t\t\ttemplatePrefix: 'author',\n\t\t\t\t\t\t};\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tlabels: {\n\t\t\t\t\tsingular_name: __( 'Author' ),\n\t\t\t\t\tsearch_items: __( 'Search Authors' ),\n\t\t\t\t\tnot_found: __( 'No authors found.' ),\n\t\t\t\t\tall_items: __( 'All Authors' ),\n\t\t\t\t},\n\t\t\t\thasGeneralTemplate,\n\t\t\t\ttemplate,\n\t\t\t} );\n\t\t};\n\t}\n\tif ( ! hasGeneralTemplate || authorInfo.user?.hasEntities ) {\n\t\treturn authorMenuItem;\n\t}\n}\n\n/**\n * Helper hook that filters all the existing templates by the given\n * object with the entity's slug as key and the template prefix as value.\n *\n * Example:\n * `existingTemplates` is: [ { slug: 'tag-apple' }, { slug: 'page-about' }, { slug: 'tag' } ]\n * `templatePrefixes` is: { post_tag: 'tag' }\n * It will return: { post_tag: ['apple'] }\n *\n * Note: We append the `-` to the given template prefix in this function for our checks.\n *\n * @param {Record<string,string>} templatePrefixes An object with the entity's slug as key and the template prefix as value.\n * @return {Record<string,string[]>} An object with the entity's slug as key and an array with the existing template slugs as value.\n */\nconst useExistingTemplateSlugs = ( templatePrefixes ) => {\n\tconst existingTemplates = useExistingTemplates();\n\tconst existingSlugs = useMemo( () => {\n\t\treturn Object.entries( templatePrefixes || {} ).reduce(\n\t\t\t( accumulator, [ slug, prefix ] ) => {\n\t\t\t\tconst slugsWithTemplates = ( existingTemplates || [] ).reduce(\n\t\t\t\t\t( _accumulator, existingTemplate ) => {\n\t\t\t\t\t\tconst _prefix = `${ prefix }-`;\n\t\t\t\t\t\tif ( existingTemplate.slug.startsWith( _prefix ) ) {\n\t\t\t\t\t\t\t_accumulator.push(\n\t\t\t\t\t\t\t\texistingTemplate.slug.substring(\n\t\t\t\t\t\t\t\t\t_prefix.length\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 _accumulator;\n\t\t\t\t\t},\n\t\t\t\t\t[]\n\t\t\t\t);\n\t\t\t\tif ( slugsWithTemplates.length ) {\n\t\t\t\t\taccumulator[ slug ] = slugsWithTemplates;\n\t\t\t\t}\n\t\t\t\treturn accumulator;\n\t\t\t},\n\t\t\t{}\n\t\t);\n\t}, [ templatePrefixes, existingTemplates ] );\n\treturn existingSlugs;\n};\n\n/**\n * Helper hook that finds the existing records with an associated template,\n * as they need to be excluded from the template suggestions.\n *\n * @param {string}                entityName                The entity's name.\n * @param {Record<string,string>} templatePrefixes          An object with the entity's slug as key and the template prefix as value.\n * @param {Record<string,Object>} additionalQueryParameters An object with the entity's slug as key and additional query parameters as value.\n * @return {Record<string,EntitiesInfo>} An object with the entity's slug as key and the existing records as value.\n */\nconst useTemplatesToExclude = (\n\tentityName,\n\ttemplatePrefixes,\n\tadditionalQueryParameters = {}\n) => {\n\tconst slugsToExcludePerEntity =\n\t\tuseExistingTemplateSlugs( templatePrefixes );\n\tconst recordsToExcludePerEntity = useSelect(\n\t\t( select ) => {\n\t\t\treturn Object.entries( slugsToExcludePerEntity || {} ).reduce(\n\t\t\t\t( accumulator, [ slug, slugsWithTemplates ] ) => {\n\t\t\t\t\tconst entitiesWithTemplates = select(\n\t\t\t\t\t\tcoreStore\n\t\t\t\t\t).getEntityRecords( entityName, slug, {\n\t\t\t\t\t\t_fields: 'id',\n\t\t\t\t\t\tcontext: 'view',\n\t\t\t\t\t\tslug: slugsWithTemplates,\n\t\t\t\t\t\t...additionalQueryParameters[ slug ],\n\t\t\t\t\t} );\n\t\t\t\t\tif ( entitiesWithTemplates?.length ) {\n\t\t\t\t\t\taccumulator[ slug ] = entitiesWithTemplates;\n\t\t\t\t\t}\n\t\t\t\t\treturn accumulator;\n\t\t\t\t},\n\t\t\t\t{}\n\t\t\t);\n\t\t},\n\t\t[ slugsToExcludePerEntity ]\n\t);\n\treturn recordsToExcludePerEntity;\n};\n\n/**\n * Helper hook that returns information about an entity having\n * records that we can create a specific template for.\n *\n * For example we can search for `terms` in `taxonomy` entity or\n * `posts` in `postType` entity.\n *\n * First we need to find the existing records with an associated template,\n * to query afterwards for any remaining record, by excluding them.\n *\n * @param {string}                entityName                The entity's name.\n * @param {Record<string,string>} templatePrefixes          An object with the entity's slug as key and the template prefix as value.\n * @param {Record<string,Object>} additionalQueryParameters An object with the entity's slug as key and additional query parameters as value.\n * @return {Record<string,EntitiesInfo>} An object with the entity's slug as key and the EntitiesInfo as value.\n */\nconst useEntitiesInfo = (\n\tentityName,\n\ttemplatePrefixes,\n\tadditionalQueryParameters = {}\n) => {\n\tconst recordsToExcludePerEntity = useTemplatesToExclude(\n\t\tentityName,\n\t\ttemplatePrefixes,\n\t\tadditionalQueryParameters\n\t);\n\tconst entitiesInfo = useSelect(\n\t\t( select ) => {\n\t\t\treturn Object.keys( templatePrefixes || {} ).reduce(\n\t\t\t\t( accumulator, slug ) => {\n\t\t\t\t\tconst existingEntitiesIds =\n\t\t\t\t\t\trecordsToExcludePerEntity?.[ slug ]?.map(\n\t\t\t\t\t\t\t( { id } ) => id\n\t\t\t\t\t\t) || [];\n\t\t\t\t\taccumulator[ slug ] = {\n\t\t\t\t\t\thasEntities: !! select( coreStore ).getEntityRecords(\n\t\t\t\t\t\t\tentityName,\n\t\t\t\t\t\t\tslug,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tper_page: 1,\n\t\t\t\t\t\t\t\t_fields: 'id',\n\t\t\t\t\t\t\t\tcontext: 'view',\n\t\t\t\t\t\t\t\texclude: existingEntitiesIds,\n\t\t\t\t\t\t\t\t...additionalQueryParameters[ slug ],\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t)?.length,\n\t\t\t\t\t\texistingEntitiesIds,\n\t\t\t\t\t};\n\t\t\t\t\treturn accumulator;\n\t\t\t\t},\n\t\t\t\t{}\n\t\t\t);\n\t\t},\n\t\t[ templatePrefixes, recordsToExcludePerEntity ]\n\t);\n\treturn entitiesInfo;\n};\n","/**\n * WordPress dependencies\n */\nimport { useState, useMemo, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tButton,\n\tFlex,\n\tFlexItem,\n\tSearchControl,\n\tTextHighlight,\n\t__experimentalText as Text,\n\t__experimentalVStack as VStack,\n\t__unstableComposite as Composite,\n\t__unstableUseCompositeState as useCompositeState,\n\t__unstableCompositeItem as CompositeItem,\n} from '@wordpress/components';\nimport { useEntityRecords } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport useDebouncedInput from '../../utils/use-debounced-input';\nimport { mapToIHasNameAndId } from './utils';\n\nconst EMPTY_ARRAY = [];\n\nfunction SuggestionListItem( {\n\tsuggestion,\n\tsearch,\n\tonSelect,\n\tentityForSuggestions,\n\tcomposite,\n} ) {\n\tconst baseCssClass =\n\t\t'edit-site-custom-template-modal__suggestions_list__list-item';\n\treturn (\n\t\t<CompositeItem\n\t\t\trole=\"option\"\n\t\t\tas={ Button }\n\t\t\t{ ...composite }\n\t\t\tclassName={ baseCssClass }\n\t\t\tonClick={ () =>\n\t\t\t\tonSelect(\n\t\t\t\t\tentityForSuggestions.config.getSpecificTemplate(\n\t\t\t\t\t\tsuggestion\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t}\n\t\t>\n\t\t\t<Text\n\t\t\t\tsize=\"body\"\n\t\t\t\tlineHeight={ 1.53846153846 } // 20px\n\t\t\t\tweight={ 500 }\n\t\t\t\tclassName={ `${ baseCssClass }__title` }\n\t\t\t>\n\t\t\t\t<TextHighlight\n\t\t\t\t\ttext={ decodeEntities( suggestion.name ) }\n\t\t\t\t\thighlight={ search }\n\t\t\t\t/>\n\t\t\t</Text>\n\t\t\t{ suggestion.link && (\n\t\t\t\t<Text\n\t\t\t\t\tsize=\"body\"\n\t\t\t\t\tlineHeight={ 1.53846153846 } // 20px\n\t\t\t\t\tclassName={ `${ baseCssClass }__info` }\n\t\t\t\t>\n\t\t\t\t\t{ suggestion.link }\n\t\t\t\t</Text>\n\t\t\t) }\n\t\t</CompositeItem>\n\t);\n}\n\nfunction useSearchSuggestions( entityForSuggestions, search ) {\n\tconst { config } = entityForSuggestions;\n\tconst query = useMemo(\n\t\t() => ( {\n\t\t\torder: 'asc',\n\t\t\tcontext: 'view',\n\t\t\tsearch,\n\t\t\tper_page: search ? 20 : 10,\n\t\t\t...config.queryArgs( search ),\n\t\t} ),\n\t\t[ search, config ]\n\t);\n\tconst { records: searchResults, hasResolved: searchHasResolved } =\n\t\tuseEntityRecords(\n\t\t\tentityForSuggestions.type,\n\t\t\tentityForSuggestions.slug,\n\t\t\tquery\n\t\t);\n\tconst [ suggestions, setSuggestions ] = useState( EMPTY_ARRAY );\n\tuseEffect( () => {\n\t\tif ( ! searchHasResolved ) return;\n\t\tlet newSuggestions = EMPTY_ARRAY;\n\t\tif ( searchResults?.length ) {\n\t\t\tnewSuggestions = searchResults;\n\t\t\tif ( config.recordNamePath ) {\n\t\t\t\tnewSuggestions = mapToIHasNameAndId(\n\t\t\t\t\tnewSuggestions,\n\t\t\t\t\tconfig.recordNamePath\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t// Update suggestions only when the query has resolved, so as to keep\n\t\t// the previous results in the UI.\n\t\tsetSuggestions( newSuggestions );\n\t}, [ searchResults, searchHasResolved ] );\n\treturn suggestions;\n}\n\nfunction SuggestionList( { entityForSuggestions, onSelect } ) {\n\tconst composite = useCompositeState( { orientation: 'vertical' } );\n\tconst [ search, setSearch, debouncedSearch ] = useDebouncedInput();\n\tconst suggestions = useSearchSuggestions(\n\t\tentityForSuggestions,\n\t\tdebouncedSearch\n\t);\n\tconst { labels } = entityForSuggestions;\n\tconst [ showSearchControl, setShowSearchControl ] = useState( false );\n\tif ( ! showSearchControl && suggestions?.length > 9 ) {\n\t\tsetShowSearchControl( true );\n\t}\n\treturn (\n\t\t<>\n\t\t\t{ showSearchControl && (\n\t\t\t\t<SearchControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tonChange={ setSearch }\n\t\t\t\t\tvalue={ search }\n\t\t\t\t\tlabel={ labels.search_items }\n\t\t\t\t\tplaceholder={ labels.search_items }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ !! suggestions?.length && (\n\t\t\t\t<Composite\n\t\t\t\t\t{ ...composite }\n\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\tclassName=\"edit-site-custom-template-modal__suggestions_list\"\n\t\t\t\t\taria-label={ __( 'Suggestions list' ) }\n\t\t\t\t>\n\t\t\t\t\t{ suggestions.map( ( suggestion ) => (\n\t\t\t\t\t\t<SuggestionListItem\n\t\t\t\t\t\t\tkey={ suggestion.slug }\n\t\t\t\t\t\t\tsuggestion={ suggestion }\n\t\t\t\t\t\t\tsearch={ debouncedSearch }\n\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\tentityForSuggestions={ entityForSuggestions }\n\t\t\t\t\t\t\tcomposite={ composite }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</Composite>\n\t\t\t) }\n\t\t\t{ debouncedSearch && ! suggestions?.length && (\n\t\t\t\t<Text\n\t\t\t\t\tas=\"p\"\n\t\t\t\t\tclassName=\"edit-site-custom-template-modal__no-results\"\n\t\t\t\t>\n\t\t\t\t\t{ labels.not_found }\n\t\t\t\t</Text>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction AddCustomTemplateModalContent( { onSelect, entityForSuggestions } ) {\n\tconst [ showSearchEntities, setShowSearchEntities ] = useState(\n\t\tentityForSuggestions.hasGeneralTemplate\n\t);\n\treturn (\n\t\t<VStack\n\t\t\tspacing={ 4 }\n\t\t\tclassName=\"edit-site-custom-template-modal__contents-wrapper\"\n\t\t\talignment=\"left\"\n\t\t>\n\t\t\t{ ! showSearchEntities && (\n\t\t\t\t<>\n\t\t\t\t\t<Text as=\"p\">\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'Select whether to create a single template for all items or a specific one.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Text>\n\t\t\t\t\t<Flex\n\t\t\t\t\t\tclassName=\"edit-site-custom-template-modal__contents\"\n\t\t\t\t\t\tgap=\"4\"\n\t\t\t\t\t\talign=\"initial\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FlexItem\n\t\t\t\t\t\t\tisBlock\n\t\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tconst {\n\t\t\t\t\t\t\t\t\tslug,\n\t\t\t\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t\t\t\tdescription,\n\t\t\t\t\t\t\t\t\ttemplatePrefix,\n\t\t\t\t\t\t\t\t} = entityForSuggestions.template;\n\t\t\t\t\t\t\t\tonSelect( {\n\t\t\t\t\t\t\t\t\tslug,\n\t\t\t\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t\t\t\tdescription,\n\t\t\t\t\t\t\t\t\ttemplatePrefix,\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<Text\n\t\t\t\t\t\t\t\tas=\"span\"\n\t\t\t\t\t\t\t\tweight={ 500 }\n\t\t\t\t\t\t\t\tlineHeight={ 1.53846153846 } // 20px\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ entityForSuggestions.labels.all_items }\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\tas=\"span\"\n\t\t\t\t\t\t\t\tlineHeight={ 1.53846153846 } // 20px\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// translators: The user is given the choice to set up a template for all items of a post type or taxonomy, or just a specific one.\n\t\t\t\t\t\t\t\t\t__( 'For all items' )\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</FlexItem>\n\t\t\t\t\t\t<FlexItem\n\t\t\t\t\t\t\tisBlock\n\t\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tsetShowSearchEntities( true );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\tas=\"span\"\n\t\t\t\t\t\t\t\tweight={ 500 }\n\t\t\t\t\t\t\t\tlineHeight={ 1.53846153846 } // 20px\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ entityForSuggestions.labels.singular_name }\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\tas=\"span\"\n\t\t\t\t\t\t\t\tlineHeight={ 1.53846153846 } // 20px\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// translators: The user is given the choice to set up a template for all items of a post type or taxonomy, or just a specific one.\n\t\t\t\t\t\t\t\t\t__( 'For a specific item' )\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</FlexItem>\n\t\t\t\t\t</Flex>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t{ showSearchEntities && (\n\t\t\t\t<>\n\t\t\t\t\t<Text as=\"p\">\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'This template will be used only for the specific item chosen.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Text>\n\t\t\t\t\t<SuggestionList\n\t\t\t\t\t\tentityForSuggestions={ entityForSuggestions }\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\nexport default AddCustomTemplateModalContent;\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n    extendStatics = Object.setPrototypeOf ||\r\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n        function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n    return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n    if (typeof b !== \"function\" && b !== null)\r\n        throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n    extendStatics(d, b);\r\n    function __() { this.constructor = d; }\r\n    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n    __assign = Object.assign || function __assign(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n        }\r\n        return t;\r\n    }\r\n    return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n    var t = {};\r\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n        t[p] = s[p];\r\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n                t[p[i]] = s[p[i]];\r\n        }\r\n    return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\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;\r\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n    return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\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;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n    if (k2 === undefined) k2 = k;\r\n    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n    if (k2 === undefined) k2 = k;\r\n    o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n    for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n    var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n    if (m) return m.call(o);\r\n    if (o && typeof o.length === \"number\") return {\r\n        next: function () {\r\n            if (o && i >= o.length) o = void 0;\r\n            return { value: o && o[i++], done: !o };\r\n        }\r\n    };\r\n    throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n    var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n    if (!m) return o;\r\n    var i = m.call(o), r, ar = [], e;\r\n    try {\r\n        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n    }\r\n    catch (error) { e = { error: error }; }\r\n    finally {\r\n        try {\r\n            if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n        }\r\n        finally { if (e) throw e.error; }\r\n    }\r\n    return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n    for (var ar = [], i = 0; i < arguments.length; i++)\r\n        ar = ar.concat(__read(arguments[i]));\r\n    return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n    for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n            r[k] = a[j];\r\n    return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n        if (ar || !(i in from)) {\r\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n            ar[i] = from[i];\r\n        }\r\n    }\r\n    return to.concat(ar || from);\r\n}\r\n\r\nexport function __await(v) {\r\n    return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n    var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n    return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n    function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n    function fulfill(value) { resume(\"next\", value); }\r\n    function reject(value) { resume(\"throw\", value); }\r\n    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n    var i, p;\r\n    return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n    function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n    var m = o[Symbol.asyncIterator], i;\r\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);\r\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); }); }; }\r\n    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n    if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n    return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n    o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n    if (mod && mod.__esModule) return mod;\r\n    var result = {};\r\n    if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n    __setModuleDefault(result, mod);\r\n    return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n    return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n    if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\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\");\r\n    return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n    if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n    if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\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\");\r\n    return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\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 { 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","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","/**\n * External dependencies\n */\nimport { paramCase as kebabCase } from 'change-case';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tButton,\n\tTextControl,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n\nfunction AddCustomGenericTemplateModalContent( { onClose, createTemplate } ) {\n\tconst [ title, setTitle ] = useState( '' );\n\tconst defaultTitle = __( 'Custom Template' );\n\tconst [ isBusy, setIsBusy ] = useState( false );\n\tasync function onCreateTemplate( event ) {\n\t\tevent.preventDefault();\n\t\tif ( isBusy ) {\n\t\t\treturn;\n\t\t}\n\t\tsetIsBusy( true );\n\t\ttry {\n\t\t\tawait createTemplate(\n\t\t\t\t{\n\t\t\t\t\tslug:\n\t\t\t\t\t\t'wp-custom-template-' +\n\t\t\t\t\t\tkebabCase( title || defaultTitle ),\n\t\t\t\t\ttitle: title || defaultTitle,\n\t\t\t\t},\n\t\t\t\tfalse\n\t\t\t);\n\t\t} finally {\n\t\t\tsetIsBusy( false );\n\t\t}\n\t}\n\treturn (\n\t\t<form onSubmit={ onCreateTemplate }>\n\t\t\t<VStack spacing={ 6 }>\n\t\t\t\t<TextControl\n\t\t\t\t\t__nextHasNoMarginBottom\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\tplaceholder={ defaultTitle }\n\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\thelp={ __(\n\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) }\n\t\t\t\t/>\n\t\t\t\t<HStack\n\t\t\t\t\tclassName=\"edit-site-custom-generic-template__modal-actions\"\n\t\t\t\t\tjustify=\"right\"\n\t\t\t\t>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tonClose();\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\tvariant=\"primary\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\tisBusy={ isBusy }\n\t\t\t\t\t\taria-disabled={ isBusy }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Create' ) }\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 default AddCustomGenericTemplateModalContent;\n","/**\n * WordPress dependencies\n */\nimport { Spinner, Modal } from '@wordpress/components';\n\nexport default function TemplateActionsLoadingScreen() {\n\tconst baseCssClass = 'edit-site-template-actions-loading-screen-modal';\n\treturn (\n\t\t<Modal\n\t\t\tisFullScreen\n\t\t\tisDismissible={ false }\n\t\t\tshouldCloseOnClickOutside={ false }\n\t\t\tshouldCloseOnEsc={ false }\n\t\t\tonRequestClose={ () => {} }\n\t\t\t__experimentalHideHeader\n\t\t\tclassName={ baseCssClass }\n\t\t>\n\t\t\t<div className={ `${ baseCssClass }__content` }>\n\t\t\t\t<Spinner />\n\t\t\t</div>\n\t\t</Modal>\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tModal,\n\t__experimentalGrid as Grid,\n\t__experimentalText as Text,\n\t__experimentalVStack as VStack,\n\tFlex,\n\tIcon,\n} from '@wordpress/components';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useState } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tarchive,\n\tblockMeta,\n\tcalendar,\n\tcategory,\n\tcommentAuthorAvatar,\n\tedit,\n\thome,\n\tlayout,\n\tlist,\n\tmedia,\n\tnotFound,\n\tpage,\n\tplus,\n\tpin,\n\tverse,\n\tsearch,\n\ttag,\n} from '@wordpress/icons';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport AddCustomTemplateModalContent from './add-custom-template-modal-content';\nimport {\n\tuseExistingTemplates,\n\tuseDefaultTemplateTypes,\n\tuseTaxonomiesMenuItems,\n\tusePostTypeMenuItems,\n\tuseAuthorMenuItem,\n\tusePostTypeArchiveMenuItems,\n} from './utils';\nimport AddCustomGenericTemplateModalContent from './add-custom-generic-template-modal-content';\nimport TemplateActionsLoadingScreen from './template-actions-loading-screen';\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nconst DEFAULT_TEMPLATE_SLUGS = [\n\t'front-page',\n\t'home',\n\t'single',\n\t'page',\n\t'index',\n\t'archive',\n\t'author',\n\t'category',\n\t'date',\n\t'tag',\n\t'search',\n\t'404',\n];\n\nconst TEMPLATE_ICONS = {\n\t'front-page': home,\n\thome: verse,\n\tsingle: pin,\n\tpage,\n\tarchive,\n\tsearch,\n\t404: notFound,\n\tindex: list,\n\tcategory,\n\tauthor: commentAuthorAvatar,\n\ttaxonomy: blockMeta,\n\tdate: calendar,\n\ttag,\n\tattachment: media,\n};\n\nfunction TemplateListItem( {\n\ttitle,\n\tdirection,\n\tclassName,\n\tdescription,\n\ticon,\n\tonClick,\n\tchildren,\n} ) {\n\treturn (\n\t\t<Button\n\t\t\tclassName={ className }\n\t\t\tonClick={ onClick }\n\t\t\tlabel={ description }\n\t\t\tshowTooltip={ !! description }\n\t\t>\n\t\t\t<Flex\n\t\t\t\tas=\"span\"\n\t\t\t\tspacing={ 2 }\n\t\t\t\talign=\"center\"\n\t\t\t\tjustify=\"center\"\n\t\t\t\tstyle={ { width: '100%' } }\n\t\t\t\tdirection={ direction }\n\t\t\t>\n\t\t\t\t<div className=\"edit-site-add-new-template__template-icon\">\n\t\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t</div>\n\t\t\t\t<VStack\n\t\t\t\t\tclassName=\"edit-site-add-new-template__template-name\"\n\t\t\t\t\talignment=\"center\"\n\t\t\t\t\tspacing={ 0 }\n\t\t\t\t>\n\t\t\t\t\t<Text\n\t\t\t\t\t\tweight={ 500 }\n\t\t\t\t\t\tlineHeight={ 1.53846153846 } // 20px\n\t\t\t\t\t>\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</Text>\n\t\t\t\t\t{ children }\n\t\t\t\t</VStack>\n\t\t\t</Flex>\n\t\t</Button>\n\t);\n}\n\nconst modalContentMap = {\n\ttemplatesList: 1,\n\tcustomTemplate: 2,\n\tcustomGenericTemplate: 3,\n};\n\nexport default function NewTemplate( {\n\tpostType,\n\ttoggleProps,\n\tshowIcon = true,\n} ) {\n\tconst [ showModal, setShowModal ] = useState( false );\n\tconst [ modalContent, setModalContent ] = useState(\n\t\tmodalContentMap.templatesList\n\t);\n\tconst [ entityForSuggestions, setEntityForSuggestions ] = useState( {} );\n\tconst [ isCreatingTemplate, setIsCreatingTemplate ] = useState( false );\n\n\tconst history = useHistory();\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst { createErrorNotice, createSuccessNotice } =\n\t\tuseDispatch( noticesStore );\n\tconst { setTemplate } = unlock( useDispatch( editSiteStore ) );\n\n\tconst { homeUrl } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetUnstableBase, // Site index.\n\t\t} = select( coreStore );\n\n\t\treturn {\n\t\t\thomeUrl: getUnstableBase()?.home,\n\t\t};\n\t}, [] );\n\n\tconst TEMPLATE_SHORT_DESCRIPTIONS = {\n\t\t'front-page': homeUrl,\n\t\tdate: sprintf(\n\t\t\t// translators: %s: The homepage url.\n\t\t\t__( 'E.g. %s' ),\n\t\t\thomeUrl + '/' + new Date().getFullYear()\n\t\t),\n\t};\n\n\tasync function createTemplate( template, isWPSuggestion = true ) {\n\t\tif ( isCreatingTemplate ) {\n\t\t\treturn;\n\t\t}\n\t\tsetIsCreatingTemplate( true );\n\t\ttry {\n\t\t\tconst { title, description, slug } = template;\n\t\t\tconst newTemplate = await saveEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'wp_template',\n\t\t\t\t{\n\t\t\t\t\tdescription,\n\t\t\t\t\t// Slugs need to be strings, so this is for template `404`\n\t\t\t\t\tslug: slug.toString(),\n\t\t\t\t\tstatus: 'publish',\n\t\t\t\t\ttitle,\n\t\t\t\t\t// This adds a post meta field in template that is part of `is_custom` value calculation.\n\t\t\t\t\tis_wp_suggestion: isWPSuggestion,\n\t\t\t\t},\n\t\t\t\t{ throwOnError: true }\n\t\t\t);\n\n\t\t\t// Set template before navigating away to avoid initial stale value.\n\t\t\tsetTemplate( newTemplate.id, newTemplate.slug );\n\n\t\t\t// Navigate to the created template editor.\n\t\t\thistory.push( {\n\t\t\t\tpostId: newTemplate.id,\n\t\t\t\tpostType: newTemplate.type,\n\t\t\t\tcanvas: 'edit',\n\t\t\t} );\n\n\t\t\tcreateSuccessNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t// translators: %s: Title of the created template e.g: \"Category\".\n\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\tdecodeEntities( newTemplate.title?.rendered || title )\n\t\t\t\t),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\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: __( 'An error occurred while creating the template.' );\n\n\t\t\tcreateErrorNotice( errorMessage, {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t} finally {\n\t\t\tsetIsCreatingTemplate( false );\n\t\t}\n\t}\n\tconst onModalClose = () => {\n\t\tsetShowModal( false );\n\t\tsetModalContent( modalContentMap.templatesList );\n\t};\n\n\tconst missingTemplates = useMissingTemplates( setEntityForSuggestions, () =>\n\t\tsetModalContent( modalContentMap.customTemplate )\n\t);\n\tif ( ! missingTemplates.length ) {\n\t\treturn null;\n\t}\n\tconst { as: Toggle = Button, ...restToggleProps } = toggleProps ?? {};\n\n\tlet modalTitle = __( 'Add template' );\n\tif ( modalContent === modalContentMap.customTemplate ) {\n\t\tmodalTitle = sprintf(\n\t\t\t// translators: %s: Name of the post type e.g: \"Post\".\n\t\t\t__( 'Add template: %s' ),\n\t\t\tentityForSuggestions.labels.singular_name\n\t\t);\n\t} else if ( modalContent === modalContentMap.customGenericTemplate ) {\n\t\tmodalTitle = __( 'Create custom template' );\n\t}\n\treturn (\n\t\t<>\n\t\t\t{ isCreatingTemplate && <TemplateActionsLoadingScreen /> }\n\t\t\t<Toggle\n\t\t\t\t{ ...restToggleProps }\n\t\t\t\tonClick={ () => setShowModal( true ) }\n\t\t\t\ticon={ showIcon ? plus : null }\n\t\t\t\tlabel={ postType.labels.add_new_item }\n\t\t\t>\n\t\t\t\t{ showIcon ? null : postType.labels.add_new_item }\n\t\t\t</Toggle>\n\t\t\t{ showModal && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={ modalTitle }\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'edit-site-add-new-template__modal',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'edit-site-add-new-template__modal_template_list':\n\t\t\t\t\t\t\t\tmodalContent === modalContentMap.templatesList,\n\t\t\t\t\t\t\t'edit-site-custom-template-modal':\n\t\t\t\t\t\t\t\tmodalContent === modalContentMap.customTemplate,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t\tonRequestClose={ onModalClose }\n\t\t\t\t\toverlayClassName={\n\t\t\t\t\t\tmodalContent === modalContentMap.customGenericTemplate\n\t\t\t\t\t\t\t? 'edit-site-custom-generic-template__modal'\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t{ modalContent === modalContentMap.templatesList && (\n\t\t\t\t\t\t<Grid\n\t\t\t\t\t\t\tcolumns={ 3 }\n\t\t\t\t\t\t\tgap={ 4 }\n\t\t\t\t\t\t\talign=\"flex-start\"\n\t\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\t\tclassName=\"edit-site-add-new-template__template-list__contents\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Flex className=\"edit-site-add-new-template__template-list__prompt\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Select what the new template should apply to:'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t\t{ missingTemplates.map( ( template ) => {\n\t\t\t\t\t\t\t\tconst { title, slug, onClick } = template;\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<TemplateListItem\n\t\t\t\t\t\t\t\t\t\tkey={ slug }\n\t\t\t\t\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\t\t\t\t\tdirection=\"column\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"edit-site-add-new-template__template-button\"\n\t\t\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\t\t\tTEMPLATE_SHORT_DESCRIPTIONS[ slug ]\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tTEMPLATE_ICONS[ slug ] || layout\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t\tonClick\n\t\t\t\t\t\t\t\t\t\t\t\t? onClick( template )\n\t\t\t\t\t\t\t\t\t\t\t\t: createTemplate( template )\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<TemplateListItem\n\t\t\t\t\t\t\t\ttitle={ __( 'Custom template' ) }\n\t\t\t\t\t\t\t\tdirection=\"row\"\n\t\t\t\t\t\t\t\tclassName=\"edit-site-add-new-template__custom-template-button\"\n\t\t\t\t\t\t\t\ticon={ edit }\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\tsetModalContent(\n\t\t\t\t\t\t\t\t\t\tmodalContentMap.customGenericTemplate\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\t<Text\n\t\t\t\t\t\t\t\t\tlineHeight={ 1.53846153846 } // 20px\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'A custom template can be manually applied to any post or page.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t</TemplateListItem>\n\t\t\t\t\t\t</Grid>\n\t\t\t\t\t) }\n\t\t\t\t\t{ modalContent === modalContentMap.customTemplate && (\n\t\t\t\t\t\t<AddCustomTemplateModalContent\n\t\t\t\t\t\t\tonSelect={ createTemplate }\n\t\t\t\t\t\t\tentityForSuggestions={ entityForSuggestions }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ modalContent ===\n\t\t\t\t\t\tmodalContentMap.customGenericTemplate && (\n\t\t\t\t\t\t<AddCustomGenericTemplateModalContent\n\t\t\t\t\t\t\tonClose={ onModalClose }\n\t\t\t\t\t\t\tcreateTemplate={ createTemplate }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction useMissingTemplates( setEntityForSuggestions, onClick ) {\n\tconst existingTemplates = useExistingTemplates();\n\tconst defaultTemplateTypes = useDefaultTemplateTypes();\n\tconst existingTemplateSlugs = ( existingTemplates || [] ).map(\n\t\t( { slug } ) => slug\n\t);\n\tconst missingDefaultTemplates = ( defaultTemplateTypes || [] ).filter(\n\t\t( template ) =>\n\t\t\tDEFAULT_TEMPLATE_SLUGS.includes( template.slug ) &&\n\t\t\t! existingTemplateSlugs.includes( template.slug )\n\t);\n\tconst onClickMenuItem = ( _entityForSuggestions ) => {\n\t\tonClick?.();\n\t\tsetEntityForSuggestions( _entityForSuggestions );\n\t};\n\t// We need to replace existing default template types with\n\t// the create specific template functionality. The original\n\t// info (title, description, etc.) is preserved in the\n\t// used hooks.\n\tconst enhancedMissingDefaultTemplateTypes = [ ...missingDefaultTemplates ];\n\tconst { defaultTaxonomiesMenuItems, taxonomiesMenuItems } =\n\t\tuseTaxonomiesMenuItems( onClickMenuItem );\n\tconst { defaultPostTypesMenuItems, postTypesMenuItems } =\n\t\tusePostTypeMenuItems( onClickMenuItem );\n\n\tconst authorMenuItem = useAuthorMenuItem( onClickMenuItem );\n\t[\n\t\t...defaultTaxonomiesMenuItems,\n\t\t...defaultPostTypesMenuItems,\n\t\tauthorMenuItem,\n\t].forEach( ( menuItem ) => {\n\t\tif ( ! menuItem ) {\n\t\t\treturn;\n\t\t}\n\t\tconst matchIndex = enhancedMissingDefaultTemplateTypes.findIndex(\n\t\t\t( template ) => template.slug === menuItem.slug\n\t\t);\n\t\t// Some default template types might have been filtered above from\n\t\t// `missingDefaultTemplates` because they only check for the general\n\t\t// template. So here we either replace or append the item, augmented\n\t\t// with the check if it has available specific item to create a\n\t\t// template for.\n\t\tif ( matchIndex > -1 ) {\n\t\t\tenhancedMissingDefaultTemplateTypes[ matchIndex ] = menuItem;\n\t\t} else {\n\t\t\tenhancedMissingDefaultTemplateTypes.push( menuItem );\n\t\t}\n\t} );\n\t// Update the sort order to match the DEFAULT_TEMPLATE_SLUGS order.\n\tenhancedMissingDefaultTemplateTypes?.sort( ( template1, template2 ) => {\n\t\treturn (\n\t\t\tDEFAULT_TEMPLATE_SLUGS.indexOf( template1.slug ) -\n\t\t\tDEFAULT_TEMPLATE_SLUGS.indexOf( template2.slug )\n\t\t);\n\t} );\n\tconst missingTemplates = [\n\t\t...enhancedMissingDefaultTemplateTypes,\n\t\t...usePostTypeArchiveMenuItems(),\n\t\t...postTypesMenuItems,\n\t\t...taxonomiesMenuItems,\n\t];\n\treturn missingTemplates;\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 NewTemplate from './new-template';\n\nexport default function AddNewTemplate( {\n\ttemplateType = 'wp_template',\n\t...props\n} ) {\n\tconst postType = useSelect(\n\t\t( select ) => select( coreStore ).getPostType( templateType ),\n\t\t[ templateType ]\n\t);\n\n\tif ( ! postType ) {\n\t\treturn null;\n\t}\n\n\tif ( templateType === 'wp_template' ) {\n\t\treturn <NewTemplate { ...props } postType={ postType } />;\n\t}\n\n\treturn null;\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalItem as Item,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useEntityRecords } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useViewportMatch } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport { useLink } from '../routes/link';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport AddNewTemplate from '../add-new-template';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\n\nconst TemplateItem = ( { postType, postId, ...props } ) => {\n\tconst linkInfo = useLink( {\n\t\tpostType,\n\t\tpostId,\n\t} );\n\treturn <SidebarNavigationItem { ...linkInfo } { ...props } />;\n};\n\nexport default function SidebarNavigationScreenTemplates() {\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isTemplatePartsMode = useSelect( ( select ) => {\n\t\tconst settings = select( editSiteStore ).getSettings();\n\n\t\treturn !! settings.supportsTemplatePartsMode;\n\t}, [] );\n\n\tconst { records: templates, isResolving: isLoading } = useEntityRecords(\n\t\t'postType',\n\t\t'wp_template',\n\t\t{\n\t\t\tper_page: -1,\n\t\t}\n\t);\n\n\tconst sortedTemplates = templates ? [ ...templates ] : [];\n\tsortedTemplates.sort( ( a, b ) =>\n\t\ta.title.rendered.localeCompare( b.title.rendered )\n\t);\n\n\tconst browseAllLink = useLink( { path: '/wp_template/all' } );\n\tconst canCreate = ! isMobileViewport && ! isTemplatePartsMode;\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\tisRoot={ isTemplatePartsMode }\n\t\t\ttitle={ __( 'Templates' ) }\n\t\t\tdescription={ __(\n\t\t\t\t'Express the layout of your site with templates'\n\t\t\t) }\n\t\t\tactions={\n\t\t\t\tcanCreate && (\n\t\t\t\t\t<AddNewTemplate\n\t\t\t\t\t\ttemplateType={ 'wp_template' }\n\t\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\t\tas: SidebarButton,\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\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t{ isLoading && __( 'Loading templates' ) }\n\t\t\t\t\t{ ! isLoading && (\n\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t{ ! templates?.length && (\n\t\t\t\t\t\t\t\t<Item>{ __( 'No templates found' ) }</Item>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ sortedTemplates.map( ( template ) => (\n\t\t\t\t\t\t\t\t<TemplateItem\n\t\t\t\t\t\t\t\t\tpostType={ 'wp_template' }\n\t\t\t\t\t\t\t\t\tpostId={ template.id }\n\t\t\t\t\t\t\t\t\tkey={ template.id }\n\t\t\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ decodeEntities(\n\t\t\t\t\t\t\t\t\t\ttemplate.title?.rendered ||\n\t\t\t\t\t\t\t\t\t\t\ttemplate.slug\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</TemplateItem>\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}\n\t\t\tfooter={\n\t\t\t\t! isMobileViewport && (\n\t\t\t\t\t<SidebarNavigationItem withChevron { ...browseAllLink }>\n\t\t\t\t\t\t{ __( 'Manage all templates' ) }\n\t\t\t\t\t</SidebarNavigationItem>\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';\nimport { store as editorStore } from '@wordpress/editor';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\n\nexport default function useEditedEntityRecord( postType, postId ) {\n\tconst { record, title, description, isLoaded, icon } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedPostType, getEditedPostId } =\n\t\t\t\tselect( editSiteStore );\n\t\t\tconst { getEditedEntityRecord, hasFinishedResolution } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst { __experimentalGetTemplateInfo: getTemplateInfo } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst usedPostType = postType ?? getEditedPostType();\n\t\t\tconst usedPostId = postId ?? getEditedPostId();\n\t\t\tconst _record = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tusedPostType,\n\t\t\t\tusedPostId\n\t\t\t);\n\t\t\tconst _isLoaded =\n\t\t\t\tusedPostId &&\n\t\t\t\thasFinishedResolution( 'getEditedEntityRecord', [\n\t\t\t\t\t'postType',\n\t\t\t\t\tusedPostType,\n\t\t\t\t\tusedPostId,\n\t\t\t\t] );\n\t\t\tconst templateInfo = getTemplateInfo( _record );\n\n\t\t\treturn {\n\t\t\t\trecord: _record,\n\t\t\t\ttitle: templateInfo.title,\n\t\t\t\tdescription: templateInfo.description,\n\t\t\t\tisLoaded: _isLoaded,\n\t\t\t\ticon: templateInfo.icon,\n\t\t\t};\n\t\t},\n\t\t[ postType, postId ]\n\t);\n\n\treturn {\n\t\tisLoaded,\n\t\ticon,\n\t\trecord,\n\t\tgetTitle: () => ( title ? decodeEntities( title ) : null ),\n\t\tgetDescription: () =>\n\t\t\tdescription ? decodeEntities( description ) : null,\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst plugins = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z\" />\n\t</SVG>\n);\n\nexport default plugins;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst globe = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z\" />\n\t</SVG>\n);\n\nexport default globe;\n","// @ts-check\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Icon, __experimentalHStack as HStack } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport {\n\tcommentAuthorAvatar as authorIcon,\n\tlayout as themeIcon,\n\tplugins as pluginIcon,\n\tglobe as globeIcon,\n} from '@wordpress/icons';\nimport { _x } from '@wordpress/i18n';\n\n/** @typedef {'wp_template'|'wp_template_part'} TemplateType */\n\n/** @type {TemplateType} */\nconst TEMPLATE_POST_TYPE_NAMES = [ 'wp_template', 'wp_template_part' ];\n\n/**\n * @typedef {'theme'|'plugin'|'site'|'user'} AddedByType\n *\n * @typedef AddedByData\n * @type {Object}\n * @property {AddedByType}  type         The type of the data.\n * @property {JSX.Element}  icon         The icon to display.\n * @property {string}       [imageUrl]   The optional image URL to display.\n * @property {string}       [text]       The text to display.\n * @property {boolean}      isCustomized Whether the template has been customized.\n *\n * @param    {TemplateType} postType     The template post type.\n * @param    {number}       postId       The template post id.\n * @return {AddedByData} The added by object or null.\n */\nexport function useAddedBy( postType, postId ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetTheme,\n\t\t\t\tgetPlugin,\n\t\t\t\tgetEntityRecord,\n\t\t\t\tgetMedia,\n\t\t\t\tgetUser,\n\t\t\t\tgetEditedEntityRecord,\n\t\t\t} = select( coreStore );\n\t\t\tconst template = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t);\n\n\t\t\tif ( TEMPLATE_POST_TYPE_NAMES.includes( template.type ) ) {\n\t\t\t\t// Added by theme.\n\t\t\t\t// Template originally provided by a theme, but customized by a user.\n\t\t\t\t// Templates originally didn't have the 'origin' field so identify\n\t\t\t\t// older customized templates by checking for no origin and a 'theme'\n\t\t\t\t// or 'custom' source.\n\t\t\t\tif (\n\t\t\t\t\ttemplate.has_theme_file &&\n\t\t\t\t\t( template.origin === 'theme' ||\n\t\t\t\t\t\t( ! template.origin &&\n\t\t\t\t\t\t\t[ 'theme', 'custom' ].includes(\n\t\t\t\t\t\t\t\ttemplate.source\n\t\t\t\t\t\t\t) ) )\n\t\t\t\t) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: 'theme',\n\t\t\t\t\t\ticon: themeIcon,\n\t\t\t\t\t\ttext:\n\t\t\t\t\t\t\tgetTheme( template.theme )?.name?.rendered ||\n\t\t\t\t\t\t\ttemplate.theme,\n\t\t\t\t\t\tisCustomized: template.source === 'custom',\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Added by plugin.\n\t\t\t\tif ( template.has_theme_file && template.origin === 'plugin' ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: 'plugin',\n\t\t\t\t\t\ticon: pluginIcon,\n\t\t\t\t\t\ttext:\n\t\t\t\t\t\t\tgetPlugin( template.theme )?.name || template.theme,\n\t\t\t\t\t\tisCustomized: template.source === 'custom',\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Added by site.\n\t\t\t\t// Template was created from scratch, but has no author. Author support\n\t\t\t\t// was only added to templates in WordPress 5.9. Fallback to showing the\n\t\t\t\t// site logo and title.\n\t\t\t\tif (\n\t\t\t\t\t! template.has_theme_file &&\n\t\t\t\t\ttemplate.source === 'custom' &&\n\t\t\t\t\t! template.author\n\t\t\t\t) {\n\t\t\t\t\tconst siteData = getEntityRecord(\n\t\t\t\t\t\t'root',\n\t\t\t\t\t\t'__unstableBase'\n\t\t\t\t\t);\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: 'site',\n\t\t\t\t\t\ticon: globeIcon,\n\t\t\t\t\t\timageUrl: siteData?.site_logo\n\t\t\t\t\t\t\t? getMedia( siteData.site_logo )?.source_url\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\ttext: siteData?.name,\n\t\t\t\t\t\tisCustomized: false,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Added by user.\n\t\t\tconst user = getUser( template.author );\n\t\t\treturn {\n\t\t\t\ttype: 'user',\n\t\t\t\ticon: authorIcon,\n\t\t\t\timageUrl: user?.avatar_urls?.[ 48 ],\n\t\t\t\ttext: user?.nickname,\n\t\t\t\tisCustomized: false,\n\t\t\t};\n\t\t},\n\t\t[ postType, postId ]\n\t);\n}\n\n/**\n * @param {Object} props\n * @param {string} props.imageUrl\n */\nfunction AvatarImage( { imageUrl } ) {\n\tconst [ isImageLoaded, setIsImageLoaded ] = useState( false );\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames( 'edit-site-list-added-by__avatar', {\n\t\t\t\t'is-loaded': isImageLoaded,\n\t\t\t} ) }\n\t\t>\n\t\t\t<img\n\t\t\t\tonLoad={ () => setIsImageLoaded( true ) }\n\t\t\t\talt=\"\"\n\t\t\t\tsrc={ imageUrl }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\n/**\n * @param {Object}       props\n * @param {TemplateType} props.postType The template post type.\n * @param {number}       props.postId   The template post id.\n */\nexport default function AddedBy( { postType, postId } ) {\n\tconst { text, icon, imageUrl, isCustomized } = useAddedBy(\n\t\tpostType,\n\t\tpostId\n\t);\n\n\treturn (\n\t\t<HStack alignment=\"left\">\n\t\t\t{ imageUrl ? (\n\t\t\t\t<AvatarImage imageUrl={ imageUrl } />\n\t\t\t) : (\n\t\t\t\t<div className=\"edit-site-list-added-by__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>\n\t\t\t\t{ text }\n\t\t\t\t{ isCustomized && (\n\t\t\t\t\t<span className=\"edit-site-list-added-by__customized-info\">\n\t\t\t\t\t\t{ postType === 'wp_template'\n\t\t\t\t\t\t\t? _x( 'Customized', 'template' )\n\t\t\t\t\t\t\t: _x( 'Customized', 'template part' ) }\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t</span>\n\t\t</HStack>\n\t);\n}\n","/**\n * Check if a template is removable.\n *\n * @param {Object} template The template entity to check.\n * @return {boolean} Whether the template is revertable.\n */\nexport default function isTemplateRemovable( template ) {\n\tif ( ! template ) {\n\t\treturn false;\n\t}\n\n\treturn template.source === 'custom' && ! template.has_theme_file;\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport {\n\tButton,\n\tMenuItem,\n\tModal,\n\tTextControl,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as noticesStore } from '@wordpress/notices';\n\nexport default function RenameMenuItem( { template, onClose } ) {\n\tconst [ title, setTitle ] = useState( () => template.title.rendered );\n\tconst [ isModalOpen, setIsModalOpen ] = useState( false );\n\n\tconst { editEntityRecord, saveEditedEntityRecord } =\n\t\tuseDispatch( coreStore );\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tif ( template.type === 'wp_template' && ! template.is_custom ) {\n\t\treturn null;\n\t}\n\n\tasync function onTemplateRename( event ) {\n\t\tevent.preventDefault();\n\n\t\ttry {\n\t\t\tawait editEntityRecord( 'postType', template.type, template.id, {\n\t\t\t\ttitle,\n\t\t\t} );\n\n\t\t\t// Update state before saving rerenders the list.\n\t\t\tsetTitle( '' );\n\t\t\tsetIsModalOpen( false );\n\t\t\tonClose();\n\n\t\t\t// Persist edited entity.\n\t\t\tawait saveEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\ttemplate.type,\n\t\t\t\ttemplate.id,\n\t\t\t\t{ throwOnError: true }\n\t\t\t);\n\n\t\t\tcreateSuccessNotice( __( 'Entity renamed.' ), {\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 renaming the entity.' );\n\n\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t}\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetIsModalOpen( true );\n\t\t\t\t\tsetTitle( template.title.rendered );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ __( 'Rename' ) }\n\t\t\t</MenuItem>\n\t\t\t{ isModalOpen && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={ __( 'Rename' ) }\n\t\t\t\t\tonRequestClose={ () => {\n\t\t\t\t\t\tsetIsModalOpen( false );\n\t\t\t\t\t} }\n\t\t\t\t\toverlayClassName=\"edit-site-list__rename-modal\"\n\t\t\t\t>\n\t\t\t\t\t<form onSubmit={ onTemplateRename }>\n\t\t\t\t\t\t<VStack spacing=\"5\">\n\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\t\t\t\tvalue={ title }\n\t\t\t\t\t\t\t\tonChange={ setTitle }\n\t\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t\t\t\t<Button\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\tsetIsModalOpen( 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\n\t\t\t\t\t\t\t\t<Button variant=\"primary\" type=\"submit\">\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</HStack>\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t</form>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useState } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n\t__experimentalConfirmDialog as ConfirmDialog,\n} from '@wordpress/components';\nimport { moreVertical } from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport isTemplateRemovable from '../../utils/is-template-removable';\nimport isTemplateRevertable from '../../utils/is-template-revertable';\nimport RenameMenuItem from './rename-menu-item';\n\nexport default function TemplateActions( {\n\tpostType,\n\tpostId,\n\tclassName,\n\ttoggleProps,\n\tonRemove,\n} ) {\n\tconst template = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityRecord( 'postType', postType, postId ),\n\t\t[ postType, postId ]\n\t);\n\tconst { removeTemplate, revertTemplate } = useDispatch( editSiteStore );\n\tconst { saveEditedEntityRecord } = useDispatch( coreStore );\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\tconst isRemovable = isTemplateRemovable( template );\n\tconst isRevertable = isTemplateRevertable( template );\n\n\tif ( ! isRemovable && ! isRevertable ) {\n\t\treturn null;\n\t}\n\n\tasync function revertAndSaveTemplate() {\n\t\ttry {\n\t\t\tawait revertTemplate( template, { allowUndo: false } );\n\t\t\tawait saveEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\ttemplate.type,\n\t\t\t\ttemplate.id\n\t\t\t);\n\n\t\t\tcreateSuccessNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: The template/part's name. */\n\t\t\t\t\t__( '\"%s\" reverted.' ),\n\t\t\t\t\ttemplate.title.rendered\n\t\t\t\t),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tid: 'edit-site-template-reverted',\n\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: __( 'An error occurred while reverting the entity.' );\n\n\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t}\n\t}\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\ticon={ moreVertical }\n\t\t\tlabel={ __( 'Actions' ) }\n\t\t\tclassName={ className }\n\t\t\ttoggleProps={ toggleProps }\n\t\t>\n\t\t\t{ ( { onClose } ) => (\n\t\t\t\t<MenuGroup>\n\t\t\t\t\t{ isRemovable && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<RenameMenuItem\n\t\t\t\t\t\t\t\ttemplate={ template }\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<DeleteMenuItem\n\t\t\t\t\t\t\t\tonRemove={ () => {\n\t\t\t\t\t\t\t\t\tremoveTemplate( template );\n\t\t\t\t\t\t\t\t\tonRemove?.();\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\tisTemplate={ template.type === 'wp_template' }\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{ isRevertable && (\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t'Use the template as supplied by the theme.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\trevertAndSaveTemplate();\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Clear customizations' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t) }\n\t\t\t\t</MenuGroup>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n\nfunction DeleteMenuItem( { onRemove, isTemplate } ) {\n\tconst [ isModalOpen, setIsModalOpen ] = useState( false );\n\treturn (\n\t\t<>\n\t\t\t<MenuItem\n\t\t\t\tisDestructive\n\t\t\t\tisTertiary\n\t\t\t\tonClick={ () => setIsModalOpen( true ) }\n\t\t\t>\n\t\t\t\t{ __( 'Delete' ) }\n\t\t\t</MenuItem>\n\t\t\t<ConfirmDialog\n\t\t\t\tisOpen={ isModalOpen }\n\t\t\t\tonConfirm={ onRemove }\n\t\t\t\tonCancel={ () => setIsModalOpen( false ) }\n\t\t\t\tconfirmButtonText={ __( 'Delete' ) }\n\t\t\t>\n\t\t\t\t{ isTemplate\n\t\t\t\t\t? __( 'Are you sure you want to delete this template?' )\n\t\t\t\t\t: __(\n\t\t\t\t\t\t\t'Are you sure you want to delete this template part?'\n\t\t\t\t\t  ) }\n\t\t\t</ConfirmDialog>\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst header = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\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\nexport default header;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst footer = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\td=\"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\t/>\n\t</SVG>\n);\n\nexport default footer;\n","/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenDetailsPanelLabel( {\n\tchildren,\n} ) {\n\treturn (\n\t\t<Text className=\"edit-site-sidebar-navigation-details-screen-panel__label\">\n\t\t\t{ children }\n\t\t</Text>\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenDetailsPanelRow( {\n\tlabel,\n\tchildren,\n\tclassName,\n} ) {\n\treturn (\n\t\t<HStack\n\t\t\tkey={ label }\n\t\t\tspacing={ 5 }\n\t\t\talignment=\"left\"\n\t\t\tclassName={ classnames(\n\t\t\t\t'edit-site-sidebar-navigation-details-screen-panel__row',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t{ children }\n\t\t</HStack>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenDetailsPanelValue( {\n\tchildren,\n} ) {\n\treturn (\n\t\t<Text className=\"edit-site-sidebar-navigation-details-screen-panel__value\">\n\t\t\t{ children }\n\t\t</Text>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalHeading as Heading,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreenDetailsPanelLabel from './sidebar-navigation-screen-details-panel-label';\nimport SidebarNavigationScreenDetailsPanelRow from './sidebar-navigation-screen-details-panel-row';\nimport SidebarNavigationScreenDetailsPanelValue from './sidebar-navigation-screen-details-panel-value';\n\nfunction SidebarNavigationScreenDetailsPanel( { title, children, spacing } ) {\n\treturn (\n\t\t<VStack\n\t\t\tclassName=\"edit-site-sidebar-navigation-details-screen-panel\"\n\t\t\tspacing={ spacing }\n\t\t>\n\t\t\t{ title && (\n\t\t\t\t<Heading\n\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-details-screen-panel__heading\"\n\t\t\t\t\tlevel={ 2 }\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</Heading>\n\t\t\t) }\n\t\t\t{ children }\n\t\t</VStack>\n\t);\n}\n\nexport {\n\tSidebarNavigationScreenDetailsPanel,\n\tSidebarNavigationScreenDetailsPanelRow,\n\tSidebarNavigationScreenDetailsPanelLabel,\n\tSidebarNavigationScreenDetailsPanelValue,\n};\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { debounce } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tCheckboxControl,\n\t__experimentalUseNavigator as useNavigator,\n\t__experimentalInputControl as InputControl,\n\t__experimentalNumberControl as NumberControl,\n\t__experimentalTruncate as Truncate,\n\t__experimentalItemGroup as ItemGroup,\n} from '@wordpress/components';\nimport { header, footer, layout } from '@wordpress/icons';\nimport { useMemo, useState, useEffect } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport {\n\tSidebarNavigationScreenDetailsPanel,\n\tSidebarNavigationScreenDetailsPanelRow,\n} from '../sidebar-navigation-screen-details-panel';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport { useLink } from '../routes/link';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\n\nconst EMPTY_OBJECT = {};\n\nfunction TemplateAreaButton( { postId, icon, title } ) {\n\tconst icons = {\n\t\theader,\n\t\tfooter,\n\t};\n\tconst linkInfo = useLink( {\n\t\tpostType: 'wp_template_part',\n\t\tpostId,\n\t} );\n\n\treturn (\n\t\t<SidebarNavigationItem\n\t\t\tclassName=\"edit-site-sidebar-navigation-screen-template__template-area-button\"\n\t\t\t{ ...linkInfo }\n\t\t\ticon={ icons[ icon ] ?? layout }\n\t\t\twithChevron\n\t\t>\n\t\t\t<Truncate\n\t\t\t\tlimit={ 20 }\n\t\t\t\tellipsizeMode=\"tail\"\n\t\t\t\tnumberOfLines={ 1 }\n\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen-template__template-area-label-text\"\n\t\t\t>\n\t\t\t\t{ decodeEntities( title ) }\n\t\t\t</Truncate>\n\t\t</SidebarNavigationItem>\n\t);\n}\n\nexport default function HomeTemplateDetails() {\n\tconst navigator = useNavigator();\n\tconst {\n\t\tparams: { postType, postId },\n\t} = navigator;\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\n\tconst {\n\t\tallowCommentsOnNewPosts,\n\t\ttemplatePartAreas,\n\t\tpostsPerPage,\n\t\tpostsPageTitle,\n\t\tpostsPageId,\n\t\tcurrentTemplateParts,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\t\t\tconst siteSettings = getEntityRecord( 'root', 'site' );\n\t\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\t\t\tconst _currentTemplateParts =\n\t\t\t\tselect( editSiteStore ).getCurrentTemplateTemplateParts();\n\t\t\tconst siteEditorSettings = getSettings();\n\t\t\tconst _postsPageRecord = siteSettings?.page_for_posts\n\t\t\t\t? select( coreStore ).getEntityRecord(\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\n\t\t\treturn {\n\t\t\t\tallowCommentsOnNewPosts:\n\t\t\t\t\tsiteSettings?.default_comment_status === 'open',\n\t\t\t\tpostsPageTitle: _postsPageRecord?.title?.rendered,\n\t\t\t\tpostsPageId: _postsPageRecord?.id,\n\t\t\t\tpostsPerPage: siteSettings?.posts_per_page,\n\t\t\t\ttemplatePartAreas: siteEditorSettings?.defaultTemplatePartAreas,\n\t\t\t\tcurrentTemplateParts: _currentTemplateParts,\n\t\t\t};\n\t\t},\n\t\t[ postType, postId ]\n\t);\n\n\tconst [ commentsOnNewPostsValue, setCommentsOnNewPostsValue ] =\n\t\tuseState( '' );\n\tconst [ postsCountValue, setPostsCountValue ] = useState( 1 );\n\tconst [ postsPageTitleValue, setPostsPageTitleValue ] = useState( '' );\n\n\t/*\n\t * This hook serves to set the server-retrieved values,\n\t * postsPageTitle, allowCommentsOnNewPosts, postsPerPage,\n\t * to local state.\n\t */\n\tuseEffect( () => {\n\t\tsetCommentsOnNewPostsValue( allowCommentsOnNewPosts );\n\t\tsetPostsPageTitleValue( postsPageTitle );\n\t\tsetPostsCountValue( postsPerPage );\n\t}, [ postsPageTitle, allowCommentsOnNewPosts, postsPerPage ] );\n\n\t/*\n\t * Merge data in currentTemplateParts with templatePartAreas,\n\t * which contains the template icon and fallback labels\n\t */\n\tconst templateAreas = useMemo( () => {\n\t\treturn currentTemplateParts.length && templatePartAreas\n\t\t\t? currentTemplateParts.map( ( { templatePart } ) => ( {\n\t\t\t\t\t...templatePartAreas?.find(\n\t\t\t\t\t\t( { area } ) => area === templatePart?.area\n\t\t\t\t\t),\n\t\t\t\t\t...templatePart,\n\t\t\t  } ) )\n\t\t\t: [];\n\t}, [ currentTemplateParts, templatePartAreas ] );\n\n\tconst setAllowCommentsOnNewPosts = ( newValue ) => {\n\t\tsetCommentsOnNewPostsValue( newValue );\n\t\teditEntityRecord( 'root', 'site', undefined, {\n\t\t\tdefault_comment_status: newValue ? 'open' : null,\n\t\t} );\n\t};\n\n\tconst setPostsPageTitle = ( newValue ) => {\n\t\tsetPostsPageTitleValue( newValue );\n\t\teditEntityRecord( 'postType', 'page', postsPageId, {\n\t\t\ttitle: newValue,\n\t\t} );\n\t};\n\n\tconst setPostsPerPage = ( newValue ) => {\n\t\tsetPostsCountValue( newValue );\n\t\teditEntityRecord( 'root', 'site', undefined, {\n\t\t\tposts_per_page: newValue,\n\t\t} );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<SidebarNavigationScreenDetailsPanel spacing={ 6 }>\n\t\t\t\t{ postsPageId && (\n\t\t\t\t\t<SidebarNavigationScreenDetailsPanelRow>\n\t\t\t\t\t\t<InputControl\n\t\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__input-control\"\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={ postsPageTitleValue }\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/>\n\t\t\t\t\t</SidebarNavigationScreenDetailsPanelRow>\n\t\t\t\t) }\n\t\t\t\t<SidebarNavigationScreenDetailsPanelRow>\n\t\t\t\t\t<NumberControl\n\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__input-control\"\n\t\t\t\t\t\tplaceholder={ 0 }\n\t\t\t\t\t\tvalue={ postsCountValue }\n\t\t\t\t\t\tsize={ '__unstable-large' }\n\t\t\t\t\t\tspinControls=\"custom\"\n\t\t\t\t\t\tstep=\"1\"\n\t\t\t\t\t\tmin=\"1\"\n\t\t\t\t\t\tonChange={ setPostsPerPage }\n\t\t\t\t\t\tlabel={ __( 'Posts per page' ) }\n\t\t\t\t\t\thelp={ __(\n\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) }\n\t\t\t\t\t/>\n\t\t\t\t</SidebarNavigationScreenDetailsPanelRow>\n\t\t\t</SidebarNavigationScreenDetailsPanel>\n\n\t\t\t<SidebarNavigationScreenDetailsPanel\n\t\t\t\ttitle={ __( 'Discussion' ) }\n\t\t\t\tspacing={ 3 }\n\t\t\t>\n\t\t\t\t<SidebarNavigationScreenDetailsPanelRow>\n\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__input-control\"\n\t\t\t\t\t\tlabel=\"Allow comments on new posts\"\n\t\t\t\t\t\thelp=\"Changes will apply to new posts only. Individual posts may override these settings.\"\n\t\t\t\t\t\tchecked={ commentsOnNewPostsValue }\n\t\t\t\t\t\tonChange={ setAllowCommentsOnNewPosts }\n\t\t\t\t\t/>\n\t\t\t\t</SidebarNavigationScreenDetailsPanelRow>\n\t\t\t</SidebarNavigationScreenDetailsPanel>\n\t\t\t<SidebarNavigationScreenDetailsPanel\n\t\t\t\ttitle={ __( 'Areas' ) }\n\t\t\t\tspacing={ 3 }\n\t\t\t>\n\t\t\t\t<ItemGroup>\n\t\t\t\t\t{ templateAreas.map(\n\t\t\t\t\t\t( { label, icon, theme, slug, title } ) => (\n\t\t\t\t\t\t\t<SidebarNavigationScreenDetailsPanelRow\n\t\t\t\t\t\t\t\tkey={ slug }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<TemplateAreaButton\n\t\t\t\t\t\t\t\t\tpostId={ `${ theme }//${ slug }` }\n\t\t\t\t\t\t\t\t\ttitle={ title?.rendered || label }\n\t\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</SidebarNavigationScreenDetailsPanelRow>\n\t\t\t\t\t\t)\n\t\t\t\t\t) }\n\t\t\t\t</ItemGroup>\n\t\t\t</SidebarNavigationScreenDetailsPanel>\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { humanTimeDiff } from '@wordpress/date';\nimport { createInterpolateElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport {\n\tSidebarNavigationScreenDetailsPanelRow,\n\tSidebarNavigationScreenDetailsPanelLabel,\n\tSidebarNavigationScreenDetailsPanelValue,\n} from '../sidebar-navigation-screen-details-panel';\n\nexport default function SidebarNavigationScreenDetailsFooter( {\n\tlastModifiedDateTime,\n} ) {\n\treturn (\n\t\t<>\n\t\t\t{ lastModifiedDateTime && (\n\t\t\t\t<SidebarNavigationScreenDetailsPanelRow className=\"edit-site-sidebar-navigation-screen-details-footer\">\n\t\t\t\t\t<SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t\t{ __( 'Last modified' ) }\n\t\t\t\t\t</SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t<SidebarNavigationScreenDetailsPanelValue>\n\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: is the relative time when the post was last modified. */\n\t\t\t\t\t\t\t\t__( '<time>%s</time>' ),\n\t\t\t\t\t\t\t\thumanTimeDiff( lastModifiedDateTime )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttime: (\n\t\t\t\t\t\t\t\t\t<time dateTime={ lastModifiedDateTime } />\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</SidebarNavigationScreenDetailsPanelValue>\n\t\t\t\t</SidebarNavigationScreenDetailsPanelRow>\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { pencil } from '@wordpress/icons';\nimport {\n\t__experimentalUseNavigator as useNavigator,\n\tIcon,\n} from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport useEditedEntityRecord from '../use-edited-entity-record';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\nimport { useAddedBy } from '../list/added-by';\nimport TemplateActions from '../template-actions';\nimport HomeTemplateDetails from './home-template-details';\nimport SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-details-footer';\n\nfunction useTemplateDetails( postType, postId ) {\n\tconst { getDescription, getTitle, record } = useEditedEntityRecord(\n\t\tpostType,\n\t\tpostId\n\t);\n\tconst currentTheme = useSelect(\n\t\t( select ) => select( coreStore ).getCurrentTheme(),\n\t\t[]\n\t);\n\tconst addedBy = useAddedBy( postType, postId );\n\tconst isAddedByActiveTheme =\n\t\taddedBy.type === 'theme' && record.theme === currentTheme?.stylesheet;\n\tconst title = getTitle();\n\tlet descriptionText = getDescription();\n\n\tif ( ! descriptionText && addedBy.text ) {\n\t\tdescriptionText = __(\n\t\t\t'This is a custom template that can be applied manually to any Post or Page.'\n\t\t);\n\t}\n\n\tconst content =\n\t\trecord?.slug === 'home' || record?.slug === 'index' ? (\n\t\t\t<HomeTemplateDetails />\n\t\t) : null;\n\n\tconst footer = !! record?.modified ? (\n\t\t<SidebarNavigationScreenDetailsFooter\n\t\t\tlastModifiedDateTime={ record.modified }\n\t\t/>\n\t) : null;\n\n\tconst description = (\n\t\t<>\n\t\t\t{ descriptionText }\n\n\t\t\t{ addedBy.text && ! isAddedByActiveTheme && (\n\t\t\t\t<span className=\"edit-site-sidebar-navigation-screen-template__added-by-description\">\n\t\t\t\t\t<span className=\"edit-site-sidebar-navigation-screen-template__added-by-description-author\">\n\t\t\t\t\t\t<span className=\"edit-site-sidebar-navigation-screen-template__added-by-description-author-icon\">\n\t\t\t\t\t\t\t{ addedBy.imageUrl ? (\n\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\tsrc={ addedBy.imageUrl }\n\t\t\t\t\t\t\t\t\talt=\"\"\n\t\t\t\t\t\t\t\t\twidth=\"24\"\n\t\t\t\t\t\t\t\t\theight=\"24\"\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<Icon icon={ addedBy.icon } />\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t{ addedBy.text }\n\t\t\t\t\t</span>\n\n\t\t\t\t\t{ addedBy.isCustomized && (\n\t\t\t\t\t\t<span className=\"edit-site-sidebar-navigation-screen-template__added-by-description-customized\">\n\t\t\t\t\t\t\t{ _x( '(Customized)', 'template' ) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) }\n\t\t\t\t</span>\n\t\t\t) }\n\t\t</>\n\t);\n\n\treturn { title, description, content, footer };\n}\n\nexport default function SidebarNavigationScreenTemplate() {\n\tconst navigator = useNavigator();\n\tconst {\n\t\tparams: { postType, postId },\n\t} = navigator;\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\tconst { title, content, description, footer } = useTemplateDetails(\n\t\tpostType,\n\t\tpostId\n\t);\n\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\ttitle={ title }\n\t\t\tactions={\n\t\t\t\t<>\n\t\t\t\t\t<TemplateActions\n\t\t\t\t\t\tpostType={ postType }\n\t\t\t\t\t\tpostId={ postId }\n\t\t\t\t\t\ttoggleProps={ { as: SidebarButton } }\n\t\t\t\t\t\tonRemove={ () => {\n\t\t\t\t\t\t\tnavigator.goTo( `/${ postType }/all` );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\tonClick={ () => setCanvasMode( 'edit' ) }\n\t\t\t\t\t\tlabel={ __( 'Edit' ) }\n\t\t\t\t\t\ticon={ pencil }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t}\n\t\t\tdescription={ description }\n\t\t\tcontent={ content }\n\t\t\tfooter={ footer }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst lockSmall = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"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\t/>\n\t</SVG>\n);\n\nexport default lockSmall;\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst file = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5z\" />\n\t</SVG>\n);\n\nexport default file;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst symbolFilled = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\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\nexport default symbolFilled;\n","export const DEFAULT_CATEGORY = 'my-patterns';\nexport const DEFAULT_TYPE = 'wp_block';\nexport const PATTERNS = 'pattern';\nexport const TEMPLATE_PARTS = 'wp_template_part';\nexport const USER_PATTERNS = 'wp_block';\nexport const USER_PATTERN_CATEGORY = 'my-patterns';\n\nexport const CORE_PATTERN_SOURCES = [\n\t'core',\n\t'pattern-directory/core',\n\t'pattern-directory/featured',\n\t'pattern-directory/theme',\n];\n\nexport const SYNC_TYPES = {\n\tfull: 'fully',\n\tunsynced: 'unsynced',\n};\n\nexport const filterOutDuplicatesByName = ( currentItem, index, items ) =>\n\tindex === items.findIndex( ( item ) => currentItem.name === item.name );\n","/**\n * WordPress dependencies\n */\nimport {\n\tTextControl,\n\tButton,\n\tModal,\n\tToggleControl,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { SYNC_TYPES, USER_PATTERN_CATEGORY } from '../page-patterns/utils';\n\nexport default function CreatePatternModal( {\n\tcloseModal,\n\tonCreate,\n\tonError,\n} ) {\n\tconst [ name, setName ] = useState( '' );\n\tconst [ syncType, setSyncType ] = useState( SYNC_TYPES.unsynced );\n\tconst [ isSubmitting, setIsSubmitting ] = useState( false );\n\n\tconst onSyncChange = () => {\n\t\tsetSyncType(\n\t\t\tsyncType === SYNC_TYPES.full ? SYNC_TYPES.unsynced : SYNC_TYPES.full\n\t\t);\n\t};\n\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\n\tasync function createPattern() {\n\t\tif ( ! name ) {\n\t\t\tcreateErrorNotice( __( 'Please enter a pattern name.' ), {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tconst pattern = await saveEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'wp_block',\n\t\t\t\t{\n\t\t\t\t\ttitle: name || __( 'Untitled Pattern' ),\n\t\t\t\t\tcontent: '',\n\t\t\t\t\tstatus: 'publish',\n\t\t\t\t\tmeta:\n\t\t\t\t\t\tsyncType === SYNC_TYPES.unsynced\n\t\t\t\t\t\t\t? { wp_pattern_sync_status: syncType }\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t},\n\t\t\t\t{ throwOnError: true }\n\t\t\t);\n\n\t\t\tonCreate( { pattern, categoryId: USER_PATTERN_CATEGORY } );\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 creating the pattern.' );\n\n\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t\tonError();\n\t\t}\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ __( 'Create pattern' ) }\n\t\t\tonRequestClose={ closeModal }\n\t\t\toverlayClassName=\"edit-site-create-pattern-modal\"\n\t\t>\n\t\t\t<form\n\t\t\t\tonSubmit={ async ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif ( ! name ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tsetIsSubmitting( true );\n\t\t\t\t\tawait createPattern();\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<VStack spacing=\"4\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\tclassName=\"edit-site-create-pattern-modal__input\"\n\t\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\t\tonChange={ setName }\n\t\t\t\t\t\tplaceholder={ __( 'My pattern' ) }\n\t\t\t\t\t\trequired\n\t\t\t\t\t\tvalue={ name }\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t/>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Keep all pattern instances in sync' ) }\n\t\t\t\t\t\tonChange={ onSyncChange }\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'Editing the original pattern will also update anywhere the pattern is used.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tchecked={ syncType === SYNC_TYPES.full }\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\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\tvariant=\"primary\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\tdisabled={ ! name }\n\t\t\t\t\t\t\tisBusy={ isSubmitting }\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 * 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\nexport const useExistingTemplateParts = () => {\n\treturn useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityRecords(\n\t\t\t\t'postType',\n\t\t\t\t'wp_template_part',\n\t\t\t\t{\n\t\t\t\t\tper_page: -1,\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 { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tIcon,\n\tBaseControl,\n\tTextControl,\n\tFlex,\n\tFlexItem,\n\tFlexBlock,\n\tButton,\n\tModal,\n\t__experimentalRadioGroup as RadioGroup,\n\t__experimentalRadio as Radio,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { check } from '@wordpress/icons';\nimport { serialize } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_PART_AREA_GENERAL } from '../../store/constants';\nimport {\n\tuseExistingTemplateParts,\n\tgetUniqueTemplatePartTitle,\n\tgetCleanTemplatePartSlug,\n} from '../../utils/template-part-create';\n\nexport default function CreateTemplatePartModal( {\n\tcloseModal,\n\tblocks = [],\n\tonCreate,\n\tonError,\n} ) {\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst existingTemplateParts = useExistingTemplateParts();\n\n\tconst [ title, setTitle ] = useState( '' );\n\tconst [ area, setArea ] = useState( TEMPLATE_PART_AREA_GENERAL );\n\tconst [ isSubmitting, setIsSubmitting ] = useState( false );\n\tconst instanceId = useInstanceId( CreateTemplatePartModal );\n\n\tconst templatePartAreas = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).__experimentalGetDefaultTemplatePartAreas(),\n\t\t[]\n\t);\n\n\tasync function createTemplatePart() {\n\t\tif ( ! title ) {\n\t\t\tcreateErrorNotice( __( 'Please enter a title.' ), {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\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.message && error.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}\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ __( 'Create template part' ) }\n\t\t\tonRequestClose={ closeModal }\n\t\t\toverlayClassName=\"edit-site-create-template-part-modal\"\n\t\t>\n\t\t\t<form\n\t\t\t\tonSubmit={ async ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif ( ! title ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tsetIsSubmitting( true );\n\t\t\t\t\tawait createTemplatePart();\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<VStack spacing=\"4\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\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<BaseControl\n\t\t\t\t\t\tlabel={ __( 'Area' ) }\n\t\t\t\t\t\tid={ `edit-site-create-template-part-modal__area-selection-${ instanceId }` }\n\t\t\t\t\t\tclassName=\"edit-site-create-template-part-modal__area-base-control\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<RadioGroup\n\t\t\t\t\t\t\tlabel={ __( 'Area' ) }\n\t\t\t\t\t\t\tclassName=\"edit-site-create-template-part-modal__area-radio-group\"\n\t\t\t\t\t\t\tid={ `edit-site-create-template-part-modal__area-selection-${ instanceId }` }\n\t\t\t\t\t\t\tonChange={ setArea }\n\t\t\t\t\t\t\tchecked={ area }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ templatePartAreas.map(\n\t\t\t\t\t\t\t\t( {\n\t\t\t\t\t\t\t\t\ticon,\n\t\t\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\t\t\tarea: value,\n\t\t\t\t\t\t\t\t\tdescription,\n\t\t\t\t\t\t\t\t} ) => (\n\t\t\t\t\t\t\t\t\t<Radio\n\t\t\t\t\t\t\t\t\t\tkey={ label }\n\t\t\t\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\t\t\t\tclassName=\"edit-site-create-template-part-modal__area-radio\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Flex align=\"start\" justify=\"start\">\n\t\t\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t\t\t<FlexBlock className=\"edit-site-create-template-part-modal__option-label\">\n\t\t\t\t\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t\t\t\t\t\t<div>{ description }</div>\n\t\t\t\t\t\t\t\t\t\t\t</FlexBlock>\n\n\t\t\t\t\t\t\t\t\t\t\t<FlexItem className=\"edit-site-create-template-part-modal__checkbox\">\n\t\t\t\t\t\t\t\t\t\t\t\t{ area === value && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Icon icon={ check } />\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</FlexItem>\n\t\t\t\t\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t\t\t\t</Radio>\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</RadioGroup>\n\t\t\t\t\t</BaseControl>\n\t\t\t\t\t<HStack justify=\"right\">\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={ () => {\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\tvariant=\"primary\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\tdisabled={ ! title }\n\t\t\t\t\t\t\tisBusy={ isSubmitting }\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 { DropdownMenu } from '@wordpress/components';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { plus, symbol, symbolFilled } from '@wordpress/icons';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport CreatePatternModal from '../create-pattern-modal';\nimport CreateTemplatePartModal from '../create-template-part-modal';\nimport SidebarButton from '../sidebar-button';\nimport { unlock } from '../../lock-unlock';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nexport default function AddNewPattern() {\n\tconst history = useHistory();\n\tconst [ showPatternModal, setShowPatternModal ] = useState( false );\n\tconst [ showTemplatePartModal, setShowTemplatePartModal ] =\n\t\tuseState( false );\n\n\tfunction handleCreatePattern( { pattern, categoryId } ) {\n\t\tsetShowPatternModal( false );\n\n\t\thistory.push( {\n\t\t\tpostId: pattern.id,\n\t\t\tpostType: 'wp_block',\n\t\t\tcategoryType: 'wp_block',\n\t\t\tcategoryId,\n\t\t\tcanvas: 'edit',\n\t\t} );\n\t}\n\n\tfunction handleCreateTemplatePart( templatePart ) {\n\t\tsetShowTemplatePartModal( false );\n\n\t\t// Navigate to the created template part editor.\n\t\thistory.push( {\n\t\t\tpostId: templatePart.id,\n\t\t\tpostType: 'wp_template_part',\n\t\t\tcanvas: 'edit',\n\t\t} );\n\t}\n\n\tfunction handleError() {\n\t\tsetShowPatternModal( false );\n\t\tsetShowTemplatePartModal( false );\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<DropdownMenu\n\t\t\t\tcontrols={ [\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: symbolFilled,\n\t\t\t\t\t\tonClick: () => setShowTemplatePartModal( true ),\n\t\t\t\t\t\ttitle: __( 'Create template part' ),\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: symbol,\n\t\t\t\t\t\tonClick: () => setShowPatternModal( true ),\n\t\t\t\t\t\ttitle: __( 'Create pattern' ),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t\ttoggleProps={ {\n\t\t\t\t\tas: SidebarButton,\n\t\t\t\t} }\n\t\t\t\ticon={ plus }\n\t\t\t\tlabel={ __( 'Create pattern' ) }\n\t\t\t/>\n\t\t\t{ showPatternModal && (\n\t\t\t\t<CreatePatternModal\n\t\t\t\t\tcloseModal={ () => setShowPatternModal( false ) }\n\t\t\t\t\tonCreate={ handleCreatePattern }\n\t\t\t\t\tonError={ handleError }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ showTemplatePartModal && (\n\t\t\t\t<CreateTemplatePartModal\n\t\t\t\t\tcloseModal={ () => setShowTemplatePartModal( false ) }\n\t\t\t\t\tblocks={ [] }\n\t\t\t\t\tonCreate={ handleCreateTemplatePart }\n\t\t\t\t\tonError={ handleError }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * Internal dependencies\n */\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { useLink } from '../routes/link';\n\nexport default function CategoryItem( {\n\tcount,\n\ticon,\n\tid,\n\tisActive,\n\tlabel,\n\ttype,\n} ) {\n\tconst linkInfo = useLink(\n\t\t{\n\t\t\tpath: '/patterns',\n\t\t\tcategoryType: type,\n\t\t\tcategoryId: id,\n\t\t},\n\t\t{\n\t\t\t// Keep a record of where we came from in state so we can\n\t\t\t// use the browser's back button to go back to Patterns.\n\t\t\t// See the implementation of the back button in patterns-list.\n\t\t\tbackPath: '/patterns',\n\t\t}\n\t);\n\n\tif ( ! count ) {\n\t\treturn;\n\t}\n\n\treturn (\n\t\t<SidebarNavigationItem\n\t\t\t{ ...linkInfo }\n\t\t\ticon={ icon }\n\t\t\tsuffix={ <span>{ count }</span> }\n\t\t\taria-current={ isActive ? 'true' : undefined }\n\t\t>\n\t\t\t{ label }\n\t\t</SidebarNavigationItem>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useEntityRecords } from '@wordpress/core-data';\n\nconst getTemplatePartAreas = ( items ) => {\n\tconst allItems = items || [];\n\n\tconst groupedByArea = allItems.reduce(\n\t\t( accumulator, item ) => {\n\t\t\tconst key = accumulator[ item.area ] ? item.area : 'uncategorized';\n\t\t\taccumulator[ key ].push( item );\n\t\t\treturn accumulator;\n\t\t},\n\t\t{ header: [], footer: [], sidebar: [], uncategorized: [] }\n\t);\n\n\treturn groupedByArea;\n};\n\nexport default function useTemplatePartAreas() {\n\tconst { records: templateParts, isResolving: isLoading } = useEntityRecords(\n\t\t'postType',\n\t\t'wp_template_part',\n\t\t{ per_page: -1 }\n\t);\n\n\treturn {\n\t\thasTemplateParts: templateParts ? !! templateParts.length : false,\n\t\tisLoading,\n\t\ttemplatePartAreas: getTemplatePartAreas( templateParts ),\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalItem as Item,\n\tFlex,\n\tIcon,\n\tTooltip,\n\t__experimentalHeading as Heading,\n} from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { getTemplatePartIcon } from '@wordpress/editor';\nimport { __ } from '@wordpress/i18n';\nimport { getQueryArgs } from '@wordpress/url';\nimport { file, starFilled, lockSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport AddNewPattern from '../add-new-pattern';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport CategoryItem from './category-item';\nimport { DEFAULT_CATEGORY, DEFAULT_TYPE } from '../page-patterns/utils';\nimport { store as editSiteStore } from '../../store';\nimport { useLink } from '../routes/link';\nimport usePatternCategories from './use-pattern-categories';\nimport useMyPatterns from './use-my-patterns';\nimport useTemplatePartAreas from './use-template-part-areas';\n\nconst templatePartAreaLabels = {\n\theader: __( 'Headers' ),\n\tfooter: __( 'Footers' ),\n\tsidebar: __( 'Sidebar' ),\n\tuncategorized: __( 'Uncategorized' ),\n};\n\nexport default function SidebarNavigationScreenPatterns() {\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst { categoryType, categoryId } = getQueryArgs( window.location.href );\n\tconst currentCategory = categoryId || DEFAULT_CATEGORY;\n\tconst currentType = categoryType || DEFAULT_TYPE;\n\n\tconst { templatePartAreas, hasTemplateParts, isLoading } =\n\t\tuseTemplatePartAreas();\n\tconst { patternCategories, hasPatterns } = usePatternCategories();\n\tconst { myPatterns, hasPatterns: hasMyPatterns } = useMyPatterns();\n\n\tconst isTemplatePartsMode = useSelect( ( select ) => {\n\t\tconst settings = select( editSiteStore ).getSettings();\n\t\treturn !! settings.supportsTemplatePartsMode;\n\t}, [] );\n\n\tconst templatePartsLink = useLink( { path: '/wp_template_part/all' } );\n\tconst footer = ! isMobileViewport ? (\n\t\t<ItemGroup>\n\t\t\t<SidebarNavigationItem withChevron { ...templatePartsLink }>\n\t\t\t\t{ __( 'Manage all template parts' ) }\n\t\t\t</SidebarNavigationItem>\n\t\t\t<SidebarNavigationItem\n\t\t\t\tas=\"a\"\n\t\t\t\thref=\"edit.php?post_type=wp_block\"\n\t\t\t\twithChevron\n\t\t\t>\n\t\t\t\t{ __( 'Manage all of my patterns' ) }\n\t\t\t</SidebarNavigationItem>\n\t\t</ItemGroup>\n\t) : undefined;\n\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\tisRoot={ isTemplatePartsMode }\n\t\t\ttitle={ __( 'Patterns' ) }\n\t\t\tdescription={ __(\n\t\t\t\t'Manage what patterns are available when editing your site.'\n\t\t\t) }\n\t\t\tactions={ <AddNewPattern /> }\n\t\t\tfooter={ footer }\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t{ isLoading && __( 'Loading patterns' ) }\n\t\t\t\t\t{ ! isLoading && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ ! hasTemplateParts && ! hasPatterns && (\n\t\t\t\t\t\t\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-patterns__group\">\n\t\t\t\t\t\t\t\t\t<Item>\n\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t'No template parts or patterns found'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</Item>\n\t\t\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ hasMyPatterns && (\n\t\t\t\t\t\t\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-patterns__group\">\n\t\t\t\t\t\t\t\t\t<CategoryItem\n\t\t\t\t\t\t\t\t\t\tkey={ myPatterns.name }\n\t\t\t\t\t\t\t\t\t\tcount={ myPatterns.count }\n\t\t\t\t\t\t\t\t\t\tlabel={ myPatterns.label }\n\t\t\t\t\t\t\t\t\t\ticon={ starFilled }\n\t\t\t\t\t\t\t\t\t\tid={ myPatterns.name }\n\t\t\t\t\t\t\t\t\t\ttype=\"wp_block\"\n\t\t\t\t\t\t\t\t\t\tisActive={\n\t\t\t\t\t\t\t\t\t\t\tcurrentCategory ===\n\t\t\t\t\t\t\t\t\t\t\t\t`${ myPatterns.name }` &&\n\t\t\t\t\t\t\t\t\t\t\tcurrentType === 'wp_block'\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</ItemGroup>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ hasTemplateParts && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen-patterns__group-header\">\n\t\t\t\t\t\t\t\t\t\t<Heading level={ 2 }>\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Template parts' ) }\n\t\t\t\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t\t\t\t\t<p>\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'Synced patterns for use in template building.'\n\t\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</div>\n\t\t\t\t\t\t\t\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-patterns__group\">\n\t\t\t\t\t\t\t\t\t\t{ Object.entries(\n\t\t\t\t\t\t\t\t\t\t\ttemplatePartAreas\n\t\t\t\t\t\t\t\t\t\t).map( ( [ area, parts ] ) => (\n\t\t\t\t\t\t\t\t\t\t\t<CategoryItem\n\t\t\t\t\t\t\t\t\t\t\t\tkey={ area }\n\t\t\t\t\t\t\t\t\t\t\t\tcount={ parts.length }\n\t\t\t\t\t\t\t\t\t\t\t\ticon={ getTemplatePartIcon(\n\t\t\t\t\t\t\t\t\t\t\t\t\tarea\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\tlabel={\n\t\t\t\t\t\t\t\t\t\t\t\t\ttemplatePartAreaLabels[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tarea\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\tid={ area }\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"wp_template_part\"\n\t\t\t\t\t\t\t\t\t\t\t\tisActive={\n\t\t\t\t\t\t\t\t\t\t\t\t\tcurrentCategory === area &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tcurrentType ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'wp_template_part'\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</ItemGroup>\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{ hasPatterns && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen-patterns__group-header\">\n\t\t\t\t\t\t\t\t\t\t<Heading level={ 2 }>\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Theme patterns' ) }\n\t\t\t\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t\t\t\t\t<p>\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'For insertion into documents where they can then be customized.'\n\t\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</div>\n\t\t\t\t\t\t\t\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-patterns__group\">\n\t\t\t\t\t\t\t\t\t\t{ patternCategories.map(\n\t\t\t\t\t\t\t\t\t\t\t( category ) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<CategoryItem\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={ category.name }\n\t\t\t\t\t\t\t\t\t\t\t\t\tcount={ category.count }\n\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<Flex\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjustify=\"left\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgap={ 0 }\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{ category.label }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Tooltip\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition=\"top center\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Theme patterns cannot be edited.'\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>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"edit-site-sidebar-navigation-screen-pattern__lock-icon\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfill: 'currentcolor',\n\t\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\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlockSmall\n\t\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\t\t\tsize={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t24\n\t\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\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Flex>\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\ticon={ file }\n\t\t\t\t\t\t\t\t\t\t\t\t\tid={ category.name }\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"pattern\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tisActive={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrentCategory ===\n\t\t\t\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\t\t\tcurrentType ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'pattern'\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</ItemGroup>\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","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport useDefaultPatternCategories from './use-default-pattern-categories';\nimport useThemePatterns from './use-theme-patterns';\n\nexport default function usePatternCategories() {\n\tconst defaultCategories = useDefaultPatternCategories();\n\tconst themePatterns = useThemePatterns();\n\n\tconst patternCategories = useMemo( () => {\n\t\tconst categoryMap = {};\n\t\tconst categoriesWithCounts = [];\n\n\t\t// Create a map for easier counting of patterns in categories.\n\t\tdefaultCategories.forEach( ( category ) => {\n\t\t\tif ( ! categoryMap[ category.name ] ) {\n\t\t\t\tcategoryMap[ category.name ] = { ...category, count: 0 };\n\t\t\t}\n\t\t} );\n\n\t\t// Update the category counts to reflect theme registered patterns.\n\t\tthemePatterns.forEach( ( pattern ) => {\n\t\t\tpattern.categories?.forEach( ( category ) => {\n\t\t\t\tif ( categoryMap[ category ] ) {\n\t\t\t\t\tcategoryMap[ category ].count += 1;\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\n\t\t// Filter categories so we only have those containing patterns.\n\t\tdefaultCategories.forEach( ( category ) => {\n\t\t\tif ( categoryMap[ category.name ].count ) {\n\t\t\t\tcategoriesWithCounts.push( categoryMap[ category.name ] );\n\t\t\t}\n\t\t} );\n\n\t\treturn categoriesWithCounts;\n\t}, [ defaultCategories, themePatterns ] );\n\n\treturn { patternCategories, hasPatterns: !! patternCategories.length };\n}\n","/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nexport default function useDefaultPatternCategories() {\n\tconst blockPatternCategories = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\t\tconst settings = getSettings();\n\n\t\treturn (\n\t\t\tsettings.__experimentalAdditionalBlockPatternCategories ??\n\t\t\tsettings.__experimentalBlockPatternCategories\n\t\t);\n\t} );\n\n\tconst restBlockPatternCategories = useSelect( ( select ) =>\n\t\tselect( coreStore ).getBlockPatternCategories()\n\t);\n\n\treturn [\n\t\t...( blockPatternCategories || [] ),\n\t\t...( restBlockPatternCategories || [] ),\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';\n\n/**\n * Internal dependencies\n */\nimport {\n\tCORE_PATTERN_SOURCES,\n\tfilterOutDuplicatesByName,\n} from '../page-patterns/utils';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nexport default function useThemePatterns() {\n\tconst blockPatterns = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\treturn (\n\t\t\tgetSettings().__experimentalAdditionalBlockPatterns ??\n\t\t\tgetSettings().__experimentalBlockPatterns\n\t\t);\n\t} );\n\n\tconst restBlockPatterns = useSelect( ( select ) =>\n\t\tselect( coreStore ).getBlockPatterns()\n\t);\n\n\tconst patterns = useMemo(\n\t\t() =>\n\t\t\t[ ...( blockPatterns || [] ), ...( restBlockPatterns || [] ) ]\n\t\t\t\t.filter(\n\t\t\t\t\t( pattern ) =>\n\t\t\t\t\t\t! CORE_PATTERN_SOURCES.includes( pattern.source )\n\t\t\t\t)\n\t\t\t\t.filter( filterOutDuplicatesByName ),\n\t\t[ blockPatterns, restBlockPatterns ]\n\t);\n\n\treturn patterns;\n}\n","/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\nexport default function useMyPatterns() {\n\tconst myPatterns = useSelect( ( select ) =>\n\t\tselect( coreStore ).getEntityRecords( 'postType', 'wp_block', {\n\t\t\tper_page: -1,\n\t\t} )\n\t);\n\n\treturn {\n\t\tmyPatterns: {\n\t\t\tcount: myPatterns?.length || 0,\n\t\t\tname: 'my-patterns',\n\t\t\tlabel: __( 'My patterns' ),\n\t\t},\n\t\thasPatterns: !! myPatterns?.length,\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport default function useInitEditedEntityFromURL() {\n\tconst { params: { postId, postType } = {} } = useLocation();\n\tconst { isRequestingSite, homepageId, url } = useSelect( ( select ) => {\n\t\tconst { getSite, getUnstableBase } = select( coreDataStore );\n\t\tconst siteData = getSite();\n\t\tconst base = getUnstableBase();\n\n\t\treturn {\n\t\t\tisRequestingSite: ! base,\n\t\t\thomepageId:\n\t\t\t\tsiteData?.show_on_front === 'page'\n\t\t\t\t\t? siteData.page_on_front\n\t\t\t\t\t: null,\n\t\t\turl: base?.home,\n\t\t};\n\t}, [] );\n\n\tconst {\n\t\tsetEditedEntity,\n\t\tsetTemplate,\n\t\tsetTemplatePart,\n\t\tsetPage,\n\t\tsetNavigationMenu,\n\t} = useDispatch( editSiteStore );\n\n\tuseEffect( () => {\n\t\tif ( postType && postId ) {\n\t\t\tswitch ( postType ) {\n\t\t\t\tcase 'wp_template':\n\t\t\t\t\tsetTemplate( postId );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'wp_template_part':\n\t\t\t\t\tsetTemplatePart( postId );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'wp_navigation':\n\t\t\t\t\tsetNavigationMenu( postId );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'wp_block':\n\t\t\t\t\tsetEditedEntity( postType, postId );\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tsetPage( {\n\t\t\t\t\t\tcontext: { postType, postId },\n\t\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// In all other cases, we need to set the home page in the site editor view.\n\t\tif ( homepageId ) {\n\t\t\tsetPage( {\n\t\t\t\tcontext: { postType: 'page', postId: homepageId },\n\t\t\t} );\n\t\t} else if ( ! isRequestingSite ) {\n\t\t\tsetPage( {\n\t\t\t\tpath: url,\n\t\t\t} );\n\t\t}\n\t}, [\n\t\turl,\n\t\tpostId,\n\t\tpostType,\n\t\thomepageId,\n\t\tisRequestingSite,\n\t\tsetEditedEntity,\n\t\tsetPage,\n\t\tsetTemplate,\n\t\tsetTemplatePart,\n\t\tsetNavigationMenu,\n\t] );\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst chevronUp = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z\" />\n\t</SVG>\n);\n\nexport default chevronUp;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst chevronDown = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z\" />\n\t</SVG>\n);\n\nexport default chevronDown;\n","/**\n * WordPress dependencies\n */\n\nimport { chevronUp, chevronDown, moreVertical } from '@wordpress/icons';\nimport { DropdownMenu, MenuItem, MenuGroup } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useCallback } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { BlockTitle, store as blockEditorStore } from '@wordpress/block-editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\nconst POPOVER_PROPS = {\n\tclassName: 'block-editor-block-settings-menu__popover',\n\tplacement: 'bottom-start',\n};\n\n/**\n * Internal dependencies\n */\nimport {\n\tisPreviewingTheme,\n\tcurrentlyPreviewingTheme,\n} from '../../utils/is-previewing-theme';\nimport { unlock } from '../../lock-unlock';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nexport default function LeafMoreMenu( props ) {\n\tconst history = useHistory();\n\tconst { block } = props;\n\tconst { clientId } = block;\n\tconst { moveBlocksDown, moveBlocksUp, removeBlocks } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst removeLabel = sprintf(\n\t\t/* translators: %s: block name */\n\t\t__( 'Remove %s' ),\n\t\tBlockTitle( { clientId, maximumLength: 25 } )\n\t);\n\n\tconst goToLabel = sprintf(\n\t\t/* translators: %s: block name */\n\t\t__( 'Go to %s' ),\n\t\tBlockTitle( { clientId, maximumLength: 25 } )\n\t);\n\n\tconst rootClientId = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockRootClientId } = select( blockEditorStore );\n\n\t\t\treturn getBlockRootClientId( clientId );\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst onGoToPage = useCallback(\n\t\t( selectedBlock ) => {\n\t\t\tconst { attributes, name } = selectedBlock;\n\t\t\tif (\n\t\t\t\tattributes.kind === 'post-type' &&\n\t\t\t\tattributes.id &&\n\t\t\t\tattributes.type &&\n\t\t\t\thistory\n\t\t\t) {\n\t\t\t\thistory.push( {\n\t\t\t\t\tpostType: attributes.type,\n\t\t\t\t\tpostId: attributes.id,\n\t\t\t\t\t...( isPreviewingTheme() && {\n\t\t\t\t\t\twp_theme_preview: currentlyPreviewingTheme(),\n\t\t\t\t\t} ),\n\t\t\t\t} );\n\t\t\t}\n\t\t\tif ( name === 'core/page-list-item' && attributes.id && history ) {\n\t\t\t\thistory.push( {\n\t\t\t\t\tpostType: 'page',\n\t\t\t\t\tpostId: attributes.id,\n\t\t\t\t\t...( isPreviewingTheme() && {\n\t\t\t\t\t\twp_theme_preview: currentlyPreviewingTheme(),\n\t\t\t\t\t} ),\n\t\t\t\t} );\n\t\t\t}\n\t\t},\n\t\t[ history ]\n\t);\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\ticon={ moreVertical }\n\t\t\tlabel={ __( 'Options' ) }\n\t\t\tclassName=\"block-editor-block-settings-menu\"\n\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\tnoIcons\n\t\t\t{ ...props }\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<MenuItem\n\t\t\t\t\t\t\ticon={ chevronUp }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tmoveBlocksUp( [ clientId ], rootClientId );\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Move up' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\ticon={ chevronDown }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tmoveBlocksDown( [ clientId ], rootClientId );\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Move down' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t{ block.attributes?.id && (\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\tonGoToPage( block );\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{ goToLabel }\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\tremoveBlocks( [ clientId ], false );\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ removeLabel }\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\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n\tBlockList,\n\tBlockTools,\n} from '@wordpress/block-editor';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { createBlock } from '@wordpress/blocks';\nimport { useCallback } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport LeafMoreMenu from './leaf-more-menu';\n\nconst { PrivateListView } = unlock( blockEditorPrivateApis );\n\n// Needs to be kept in sync with the query used at packages/block-library/src/page-list/edit.js.\nconst MAX_PAGE_COUNT = 100;\nconst PAGES_QUERY = [\n\t'postType',\n\t'page',\n\t{\n\t\tper_page: MAX_PAGE_COUNT,\n\t\t_fields: [ 'id', 'link', 'menu_order', 'parent', 'title', 'type' ],\n\t\t// TODO: When https://core.trac.wordpress.org/ticket/39037 REST API support for multiple orderby\n\t\t// values is resolved, update 'orderby' to [ 'menu_order', 'post_title' ] to provide a consistent\n\t\t// sort.\n\t\torderby: 'menu_order',\n\t\torder: 'asc',\n\t},\n];\n\nexport default function NavigationMenuContent( { rootClientId } ) {\n\tconst { listViewRootClientId, isLoading } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tareInnerBlocksControlled,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockCount,\n\t\t\t\tgetBlockOrder,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { isResolving } = select( coreStore );\n\n\t\t\tconst blockClientIds = getBlockOrder( rootClientId );\n\n\t\t\tconst hasOnlyPageListBlock =\n\t\t\t\tblockClientIds.length === 1 &&\n\t\t\t\tgetBlockName( blockClientIds[ 0 ] ) === 'core/page-list';\n\t\t\tconst pageListHasBlocks =\n\t\t\t\thasOnlyPageListBlock &&\n\t\t\t\tgetBlockCount( blockClientIds[ 0 ] ) > 0;\n\n\t\t\tconst isLoadingPages = isResolving(\n\t\t\t\t'getEntityRecords',\n\t\t\t\tPAGES_QUERY\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tlistViewRootClientId: pageListHasBlocks\n\t\t\t\t\t? blockClientIds[ 0 ]\n\t\t\t\t\t: rootClientId,\n\t\t\t\t// This is a small hack to wait for the navigation block\n\t\t\t\t// to actually load its inner blocks.\n\t\t\t\tisLoading:\n\t\t\t\t\t! areInnerBlocksControlled( rootClientId ) ||\n\t\t\t\t\tisLoadingPages,\n\t\t\t};\n\t\t},\n\t\t[ rootClientId ]\n\t);\n\tconst { replaceBlock, __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst offCanvasOnselect = useCallback(\n\t\t( block ) => {\n\t\t\tif (\n\t\t\t\tblock.name === 'core/navigation-link' &&\n\t\t\t\t! block.attributes.url\n\t\t\t) {\n\t\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\t\treplaceBlock(\n\t\t\t\t\tblock.clientId,\n\t\t\t\t\tcreateBlock( 'core/navigation-link', block.attributes )\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ __unstableMarkNextChangeAsNotPersistent, replaceBlock ]\n\t);\n\n\t// The hidden block is needed because it makes block edit side effects trigger.\n\t// For example a navigation page list load its items has an effect on edit to load its items.\n\treturn (\n\t\t<>\n\t\t\t{ ! isLoading && (\n\t\t\t\t<PrivateListView\n\t\t\t\t\trootClientId={ listViewRootClientId }\n\t\t\t\t\tonSelect={ offCanvasOnselect }\n\t\t\t\t\tblockSettingsMenu={ LeafMoreMenu }\n\t\t\t\t\tshowAppender={ false }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<div className=\"edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor\">\n\t\t\t\t<BlockTools>\n\t\t\t\t\t<BlockList />\n\t\t\t\t</BlockTools>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { BlockEditorProvider } from '@wordpress/block-editor';\nimport { createBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport NavigationMenuContent from '../sidebar-navigation-screen-navigation-menus/navigation-menu-content';\n\nconst noop = () => {};\n\nexport default function NavigationMenuEditor( { navigationMenuId } ) {\n\tconst { storedSettings } = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\treturn {\n\t\t\tstoredSettings: getSettings( false ),\n\t\t};\n\t}, [] );\n\n\tconst blocks = useMemo( () => {\n\t\tif ( ! navigationMenuId ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [ createBlock( 'core/navigation', { ref: navigationMenuId } ) ];\n\t}, [ navigationMenuId ] );\n\n\tif ( ! navigationMenuId || ! blocks?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockEditorProvider\n\t\t\tsettings={ storedSettings }\n\t\t\tvalue={ blocks }\n\t\t\tonChange={ noop }\n\t\t\tonInput={ noop }\n\t\t>\n\t\t\t<div className=\"edit-site-sidebar-navigation-screen-navigation-menus__content\">\n\t\t\t\t<NavigationMenuContent rootClientId={ blocks[ 0 ].clientId } />\n\t\t\t</div>\n\t\t</BlockEditorProvider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalHeading as Heading } from '@wordpress/components';\nimport { useEntityProp } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport NavigationMenuEditor from '../sidebar-navigation-screen-navigation-menu/navigation-menu-editor';\n\nexport default function TemplatePartNavigationMenu( { id } ) {\n\tconst [ title ] = useEntityProp( 'postType', 'wp_navigation', 'title', id );\n\n\tif ( ! id ) return null;\n\n\treturn (\n\t\t<>\n\t\t\t<Heading\n\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen-template-part-navigation-menu__title\"\n\t\t\t\tsize=\"12\"\n\t\t\t\tupperCase={ true }\n\t\t\t>\n\t\t\t\t{ title?.rendered || title || __( 'Navigation' ) }\n\t\t\t</Heading>\n\t\t\t<NavigationMenuEditor navigationMenuId={ id } />\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useEntityProp } from '@wordpress/core-data';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { useLink } from '../routes/link';\n\nexport default function TemplatePartNavigationMenuListItem( { id } ) {\n\tconst [ title ] = useEntityProp( 'postType', 'wp_navigation', 'title', id );\n\n\tconst linkInfo = useLink( {\n\t\tpostId: id,\n\t\tpostType: 'wp_navigation',\n\t} );\n\n\tif ( ! id ) return null;\n\n\treturn (\n\t\t<SidebarNavigationItem withChevron { ...linkInfo }>\n\t\t\t{ title || __( '(no title)' ) }\n\t\t</SidebarNavigationItem>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\n/**\n * Internal dependencies\n */\nimport TemplatePartNavigationMenuListItem from './template-part-navigation-menu-list-item';\n\nexport default function TemplatePartNavigationMenuList( { menus } ) {\n\treturn (\n\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-template-part-navigation-menu-list\">\n\t\t\t{ menus.map( ( menuId ) => (\n\t\t\t\t<TemplatePartNavigationMenuListItem\n\t\t\t\t\tkey={ menuId }\n\t\t\t\t\tid={ menuId }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</ItemGroup>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalHeading as Heading } from '@wordpress/components';\n/**\n * Internal dependencies\n */\nimport TemplatePartNavigationMenu from './template-part-navigation-menu';\nimport TemplatePartNavigationMenuList from './template-part-navigation-menu-list';\n\nexport default function TemplatePartNavigationMenus( { menus } ) {\n\tif ( ! menus.length ) return null;\n\n\t// if there is a single menu then render TemplatePartNavigationMenu\n\tif ( menus.length === 1 ) {\n\t\treturn <TemplatePartNavigationMenu id={ menus[ 0 ] } />;\n\t}\n\n\t// if there are multiple menus then render TemplatePartNavigationMenuList\n\treturn (\n\t\t<>\n\t\t\t<Heading\n\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen-template-part-navigation-menu__title\"\n\t\t\t\tsize=\"12\"\n\t\t\t\tupperCase={ true }\n\t\t\t>\n\t\t\t\t{ __( 'Navigation' ) }\n\t\t\t</Heading>\n\t\t\t<TemplatePartNavigationMenuList menus={ menus } />\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __experimentalUseNavigator as useNavigator } from '@wordpress/components';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { pencil } from '@wordpress/icons';\nimport { getQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport SidebarButton from '../sidebar-button';\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport useInitEditedEntityFromURL from '../sync-state-with-url/use-init-edited-entity-from-url';\nimport usePatternDetails from './use-pattern-details';\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nexport default function SidebarNavigationScreenPattern() {\n\tconst { params } = useNavigator();\n\tconst { categoryType } = getQueryArgs( window.location.href );\n\tconst { postType, postId } = params;\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\n\tuseInitEditedEntityFromURL();\n\n\tconst patternDetails = usePatternDetails( postType, postId );\n\n\t// The absence of a category type in the query params for template parts\n\t// indicates the user has arrived at the template part via the \"manage all\"\n\t// page and the back button should return them to that list page.\n\tconst backPath =\n\t\t! categoryType && postType === 'wp_template_part'\n\t\t\t? '/wp_template_part/all'\n\t\t\t: '/patterns';\n\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\tactions={\n\t\t\t\t<SidebarButton\n\t\t\t\t\tonClick={ () => setCanvasMode( 'edit' ) }\n\t\t\t\t\tlabel={ __( 'Edit' ) }\n\t\t\t\t\ticon={ pencil }\n\t\t\t\t/>\n\t\t\t}\n\t\t\tbackPath={ backPath }\n\t\t\t{ ...patternDetails }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf, _x } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { Icon } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { useAddedBy } from '../list/added-by';\nimport useEditedEntityRecord from '../use-edited-entity-record';\nimport useNavigationMenuContent from './use-navigation-menu-content';\nimport SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-details-footer';\nimport {\n\tSidebarNavigationScreenDetailsPanel,\n\tSidebarNavigationScreenDetailsPanelRow,\n\tSidebarNavigationScreenDetailsPanelLabel,\n\tSidebarNavigationScreenDetailsPanelValue,\n} from '../sidebar-navigation-screen-details-panel';\n\nexport default function usePatternDetails( postType, postId ) {\n\tconst { getDescription, getTitle, record } = useEditedEntityRecord(\n\t\tpostType,\n\t\tpostId\n\t);\n\tconst currentTheme = useSelect(\n\t\t( select ) => select( coreStore ).getCurrentTheme(),\n\t\t[]\n\t);\n\tconst addedBy = useAddedBy( postType, postId );\n\tconst isAddedByActiveTheme =\n\t\taddedBy.type === 'theme' && record.theme === currentTheme?.stylesheet;\n\tconst title = getTitle();\n\tlet descriptionText = getDescription();\n\n\tif ( ! descriptionText && addedBy.text ) {\n\t\tdescriptionText = sprintf(\n\t\t\t// translators: %s: pattern title e.g: \"Header\".\n\t\t\t__( 'This is your %s pattern.' ),\n\t\t\tgetTitle()\n\t\t);\n\t}\n\n\tif ( ! descriptionText && postType === 'wp_block' && record?.title ) {\n\t\tdescriptionText = sprintf(\n\t\t\t// translators: %s: user created pattern title e.g. \"Footer\".\n\t\t\t__( 'This is your %s pattern.' ),\n\t\t\trecord.title\n\t\t);\n\t}\n\n\tconst description = (\n\t\t<>\n\t\t\t{ descriptionText }\n\n\t\t\t{ addedBy.text && ! isAddedByActiveTheme && (\n\t\t\t\t<span className=\"edit-site-sidebar-navigation-screen-pattern__added-by-description\">\n\t\t\t\t\t<span className=\"edit-site-sidebar-navigation-screen-pattern__added-by-description-author\">\n\t\t\t\t\t\t<span className=\"edit-site-sidebar-navigation-screen-pattern__added-by-description-author-icon\">\n\t\t\t\t\t\t\t{ addedBy.imageUrl ? (\n\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\tsrc={ addedBy.imageUrl }\n\t\t\t\t\t\t\t\t\talt=\"\"\n\t\t\t\t\t\t\t\t\twidth=\"24\"\n\t\t\t\t\t\t\t\t\theight=\"24\"\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<Icon icon={ addedBy.icon } />\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t{ addedBy.text }\n\t\t\t\t\t</span>\n\n\t\t\t\t\t{ addedBy.isCustomized && (\n\t\t\t\t\t\t<span className=\"edit-site-sidebar-navigation-screen-pattern__added-by-description-customized\">\n\t\t\t\t\t\t\t{ _x( '(Customized)', 'pattern' ) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) }\n\t\t\t\t</span>\n\t\t\t) }\n\t\t</>\n\t);\n\n\tconst footer = !! record?.modified ? (\n\t\t<SidebarNavigationScreenDetailsFooter\n\t\t\tlastModifiedDateTime={ record.modified }\n\t\t/>\n\t) : null;\n\n\tconst details = [];\n\n\tif ( postType === 'wp_block' ) {\n\t\tdetails.push( {\n\t\t\tlabel: __( 'Syncing' ),\n\t\t\tvalue:\n\t\t\t\trecord.wp_pattern_sync_status === 'unsynced'\n\t\t\t\t\t? __( 'Not synced' )\n\t\t\t\t\t: __( 'Fully synced' ),\n\t\t} );\n\t}\n\n\tconst content = (\n\t\t<>\n\t\t\t{ !! details.length && (\n\t\t\t\t<SidebarNavigationScreenDetailsPanel\n\t\t\t\t\tspacing={ 5 }\n\t\t\t\t\ttitle={ __( 'Details' ) }\n\t\t\t\t>\n\t\t\t\t\t{ details.map( ( { label, value } ) => (\n\t\t\t\t\t\t<SidebarNavigationScreenDetailsPanelRow key={ label }>\n\t\t\t\t\t\t\t<SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t</SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t\t\t<SidebarNavigationScreenDetailsPanelValue>\n\t\t\t\t\t\t\t\t{ value }\n\t\t\t\t\t\t\t</SidebarNavigationScreenDetailsPanelValue>\n\t\t\t\t\t\t</SidebarNavigationScreenDetailsPanelRow>\n\t\t\t\t\t) ) }\n\t\t\t\t</SidebarNavigationScreenDetailsPanel>\n\t\t\t) }\n\t\t\t{ useNavigationMenuContent( postType, postId ) }\n\t\t</>\n\t);\n\n\treturn { title, description, content, footer };\n}\n","/**\n * Internal dependencies\n */\nimport TemplatePartNavigationMenus from './template-part-navigation-menus';\nimport useEditedEntityRecord from '../use-edited-entity-record';\n\n/**\n * Retrieves a list of specific blocks from a given tree of blocks.\n *\n * @param {string} targetBlockType The name of the block type to find.\n * @param {Array}  blocks          A list of blocks from a template part entity.\n *\n * @return {Array} A list of any navigation blocks found in the blocks.\n */\nfunction getBlocksOfTypeFromBlocks( targetBlockType, blocks ) {\n\tif ( ! targetBlockType || ! blocks?.length ) {\n\t\treturn [];\n\t}\n\n\tconst findInBlocks = ( _blocks ) => {\n\t\tif ( ! _blocks ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst navigationBlocks = [];\n\n\t\tfor ( const block of _blocks ) {\n\t\t\tif ( block.name === targetBlockType ) {\n\t\t\t\tnavigationBlocks.push( block );\n\t\t\t}\n\n\t\t\tif ( block?.innerBlocks ) {\n\t\t\t\tconst innerNavigationBlocks = findInBlocks( block.innerBlocks );\n\n\t\t\t\tif ( innerNavigationBlocks.length ) {\n\t\t\t\t\tnavigationBlocks.push( ...innerNavigationBlocks );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn navigationBlocks;\n\t};\n\n\treturn findInBlocks( blocks );\n}\n\nexport default function useNavigationMenuContent( postType, postId ) {\n\tconst { record } = useEditedEntityRecord( postType, postId );\n\n\t// Only managing navigation menus in template parts is supported\n\t// to match previous behaviour. This could potentially be expanded\n\t// to patterns as well.\n\tif ( postType !== 'wp_template_part' ) {\n\t\treturn;\n\t}\n\n\tconst navigationBlocks = getBlocksOfTypeFromBlocks(\n\t\t'core/navigation',\n\t\trecord?.blocks\n\t);\n\n\tconst navigationMenuIds = navigationBlocks?.map(\n\t\t( block ) => block.attributes.ref\n\t);\n\n\tif ( ! navigationMenuIds?.length ) {\n\t\treturn;\n\t}\n\n\treturn <TemplatePartNavigationMenus menus={ navigationMenuIds } />;\n}\n","/**\n * WordPress dependencies\n */\nimport { __experimentalUseNavigator as useNavigator } from '@wordpress/components';\nimport { useEffect, useRef } from '@wordpress/element';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nexport function getPathFromURL( urlParams ) {\n\tlet path = urlParams?.path ?? '/';\n\n\t// Compute the navigator path based on the URL params.\n\tif ( urlParams?.postType && urlParams?.postId ) {\n\t\tswitch ( urlParams.postType ) {\n\t\t\tcase 'wp_block':\n\t\t\tcase 'wp_template':\n\t\t\tcase 'wp_template_part':\n\t\t\tcase 'page':\n\t\t\t\tpath = `/${ encodeURIComponent(\n\t\t\t\t\turlParams.postType\n\t\t\t\t) }/${ encodeURIComponent( urlParams.postId ) }`;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tpath = `/navigation/${ encodeURIComponent(\n\t\t\t\t\turlParams.postType\n\t\t\t\t) }/${ encodeURIComponent( urlParams.postId ) }`;\n\t\t}\n\t}\n\n\treturn path;\n}\n\nexport default function useSyncPathWithURL() {\n\tconst history = useHistory();\n\tconst { params: urlParams } = useLocation();\n\tconst {\n\t\tlocation: navigatorLocation,\n\t\tparams: navigatorParams,\n\t\tgoTo,\n\t} = useNavigator();\n\tconst currentUrlParams = useRef( urlParams );\n\tconst currentPath = useRef( navigatorLocation.path );\n\tconst isMounting = useRef( true );\n\n\tuseEffect( () => {\n\t\t// The navigatorParams are only initially filled properly when the\n\t\t// navigator screens mount. so we ignore the first synchronisation.\n\t\tif ( isMounting.current ) {\n\t\t\tisMounting.current = false;\n\t\t\treturn;\n\t\t}\n\n\t\tfunction updateUrlParams( newUrlParams ) {\n\t\t\tif (\n\t\t\t\tObject.entries( newUrlParams ).every( ( [ key, value ] ) => {\n\t\t\t\t\treturn currentUrlParams.current[ key ] === value;\n\t\t\t\t} )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst updatedParams = {\n\t\t\t\t...currentUrlParams.current,\n\t\t\t\t...newUrlParams,\n\t\t\t};\n\t\t\tcurrentUrlParams.current = updatedParams;\n\t\t\thistory.push( updatedParams );\n\t\t}\n\n\t\tif ( navigatorParams?.postType && navigatorParams?.postId ) {\n\t\t\tupdateUrlParams( {\n\t\t\t\tpostType: navigatorParams?.postType,\n\t\t\t\tpostId: navigatorParams?.postId,\n\t\t\t\tpath: undefined,\n\t\t\t} );\n\t\t} else if (\n\t\t\tnavigatorLocation.path.startsWith( '/page/' ) &&\n\t\t\tnavigatorParams?.postId\n\t\t) {\n\t\t\tupdateUrlParams( {\n\t\t\t\tpostType: 'page',\n\t\t\t\tpostId: navigatorParams?.postId,\n\t\t\t\tpath: undefined,\n\t\t\t} );\n\t\t} else if ( navigatorLocation.path === '/patterns' ) {\n\t\t\tupdateUrlParams( {\n\t\t\t\tpostType: undefined,\n\t\t\t\tpostId: undefined,\n\t\t\t\tcanvas: undefined,\n\t\t\t\tpath: navigatorLocation.path,\n\t\t\t} );\n\t\t} else {\n\t\t\tupdateUrlParams( {\n\t\t\t\tpostType: undefined,\n\t\t\t\tpostId: undefined,\n\t\t\t\tcategoryType: undefined,\n\t\t\t\tcategoryId: undefined,\n\t\t\t\tpath:\n\t\t\t\t\tnavigatorLocation.path === '/'\n\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t: navigatorLocation.path,\n\t\t\t} );\n\t\t}\n\t}, [ navigatorLocation?.path, navigatorParams, history ] );\n\n\tuseEffect( () => {\n\t\tcurrentUrlParams.current = urlParams;\n\t\tconst path = getPathFromURL( urlParams );\n\t\tif ( currentPath.current !== path ) {\n\t\t\tcurrentPath.current = path;\n\t\t\tgoTo( path );\n\t\t}\n\t}, [ urlParams, goTo ] );\n}\n","// This requested is preloaded in `gutenberg_preload_navigation_posts`.\n// As unbounded queries are limited to 100 by `fetchAllMiddleware`\n// on apiFetch this query is limited to 100.\n// These parameters must be kept aligned with those in\n// lib/compat/wordpress-6.3/navigation-block-preloading.php\nexport const PRELOADED_NAVIGATION_MENUS_QUERY = {\n\tper_page: 100,\n\tstatus: [ 'publish', 'draft' ],\n\torder: 'desc',\n\torderby: 'date',\n};\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tButton,\n\tTextControl,\n\tModal,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\n\nconst notEmptyString = ( testString ) => testString?.trim()?.length > 0;\n\nexport default function RenameModal( { menuTitle, onClose, onSave } ) {\n\tconst [ editedMenuTitle, setEditedMenuTitle ] = useState( menuTitle );\n\n\tconst titleHasChanged = editedMenuTitle !== menuTitle;\n\n\tconst isEditedMenuTitleValid =\n\t\ttitleHasChanged && notEmptyString( editedMenuTitle );\n\n\treturn (\n\t\t<Modal title={ __( 'Rename' ) } onRequestClose={ onClose }>\n\t\t\t<form className=\"sidebar-navigation__rename-modal-form\">\n\t\t\t\t<VStack spacing=\"3\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tvalue={ editedMenuTitle }\n\t\t\t\t\t\tplaceholder={ __( 'Navigation title' ) }\n\t\t\t\t\t\tonChange={ setEditedMenuTitle }\n\t\t\t\t\t/>\n\t\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t\t<Button variant=\"tertiary\" onClick={ onClose }>\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\tdisabled={ ! isEditedMenuTitleValid }\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\tonClick={ ( e ) => {\n\t\t\t\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\t\t\t\tif ( ! isEditedMenuTitleValid ) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonSave( { title: editedMenuTitle } );\n\n\t\t\t\t\t\t\t\t// Immediate close avoids ability to hit save multiple times.\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\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","/**\n * WordPress dependencies\n */\nimport { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nexport default function RenameModal( { onClose, onConfirm } ) {\n\treturn (\n\t\t<ConfirmDialog\n\t\t\tisOpen={ true }\n\t\t\tonConfirm={ ( e ) => {\n\t\t\t\te.preventDefault();\n\t\t\t\tonConfirm();\n\n\t\t\t\t// Immediate close avoids ability to hit delete multiple times.\n\t\t\t\tonClose();\n\t\t\t} }\n\t\t\tonCancel={ onClose }\n\t\t\tconfirmButtonText={ __( 'Delete' ) }\n\t\t>\n\t\t\t{ __( 'Are you sure you want to delete this Navigation menu?' ) }\n\t\t</ConfirmDialog>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { DropdownMenu, MenuItem, MenuGroup } from '@wordpress/components';\nimport { moreVertical } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport RenameModal from './rename-modal';\nimport DeleteModal from './delete-modal';\n\nconst POPOVER_PROPS = {\n\tposition: 'bottom right',\n};\n\nexport default function ScreenNavigationMoreMenu( props ) {\n\tconst { onDelete, onSave, onDuplicate, menuTitle } = props;\n\n\tconst [ renameModalOpen, setRenameModalOpen ] = useState( false );\n\tconst [ deleteModalOpen, setDeleteModalOpen ] = useState( false );\n\n\tconst closeModals = () => {\n\t\tsetRenameModalOpen( false );\n\t\tsetDeleteModalOpen( false );\n\t};\n\tconst openRenameModal = () => setRenameModalOpen( true );\n\tconst openDeleteModal = () => setDeleteModalOpen( true );\n\n\treturn (\n\t\t<>\n\t\t\t<DropdownMenu\n\t\t\t\tclassName=\"sidebar-navigation__more-menu\"\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\t>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<div>\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\topenRenameModal();\n\t\t\t\t\t\t\t\t\t// Close the dropdown after opening the modal.\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{ __( 'Rename' ) }\n\t\t\t\t\t\t\t</MenuItem>\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\tonDuplicate();\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{ __( 'Duplicate' ) }\n\t\t\t\t\t\t\t</MenuItem>\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\topenDeleteModal();\n\n\t\t\t\t\t\t\t\t\t// Close the dropdown after opening the modal.\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{ __( 'Delete' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\n\t\t\t{ deleteModalOpen && (\n\t\t\t\t<DeleteModal onClose={ closeModals } onConfirm={ onDelete } />\n\t\t\t) }\n\n\t\t\t{ renameModalOpen && (\n\t\t\t\t<RenameModal\n\t\t\t\t\tonClose={ closeModals }\n\t\t\t\t\tmenuTitle={ menuTitle }\n\t\t\t\t\tonSave={ onSave }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n// Copied from packages/block-library/src/navigation/edit/navigation-menu-selector.js.\nexport default function buildNavigationLabel( title, id, status ) {\n\tif ( ! title?.rendered ) {\n\t\t/* translators: %s is the index of the menu in the list of menus. */\n\t\treturn sprintf( __( '(no title %s)' ), id );\n\t}\n\n\tif ( status === 'publish' ) {\n\t\treturn decodeEntities( title?.rendered );\n\t}\n\n\treturn sprintf(\n\t\t// translators: %1s: title of the menu; %2s: status of the menu (draft, pending, etc.).\n\t\t__( '%1$s (%2$s)' ),\n\t\tdecodeEntities( title?.rendered ),\n\t\tstatus\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { pencil } from '@wordpress/icons';\n/**\n * Internal dependencies\n */\nimport SidebarButton from '../sidebar-button';\nimport { useLink } from '../routes/link';\n\nexport default function EditButton( { postId } ) {\n\tconst linkInfo = useLink( {\n\t\tpostId,\n\t\tpostType: 'wp_navigation',\n\t\tcanvas: 'edit',\n\t} );\n\treturn (\n\t\t<SidebarButton { ...linkInfo } label={ __( 'Edit' ) } icon={ pencil } />\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { decodeEntities } from '@wordpress/html-entities';\n/**\n * Internal dependencies\n */\nimport { SidebarNavigationScreenWrapper } from '../sidebar-navigation-screen-navigation-menus';\nimport ScreenNavigationMoreMenu from './more-menu';\nimport NavigationMenuEditor from './navigation-menu-editor';\nimport buildNavigationLabel from '../sidebar-navigation-screen-navigation-menus/build-navigation-label';\nimport EditButton from './edit-button';\n\nexport default function SingleNavigationMenu( {\n\tnavigationMenu,\n\thandleDelete,\n\thandleDuplicate,\n\thandleSave,\n} ) {\n\tconst menuTitle = navigationMenu?.title?.rendered;\n\n\treturn (\n\t\t<SidebarNavigationScreenWrapper\n\t\t\tactions={\n\t\t\t\t<>\n\t\t\t\t\t<EditButton postId={ navigationMenu?.id } />\n\t\t\t\t\t<ScreenNavigationMoreMenu\n\t\t\t\t\t\tmenuTitle={ decodeEntities( menuTitle ) }\n\t\t\t\t\t\tonDelete={ handleDelete }\n\t\t\t\t\t\tonSave={ handleSave }\n\t\t\t\t\t\tonDuplicate={ handleDuplicate }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t}\n\t\t\ttitle={ buildNavigationLabel(\n\t\t\t\tnavigationMenu?.title,\n\t\t\t\tnavigationMenu?.id,\n\t\t\t\tnavigationMenu?.status\n\t\t\t) }\n\t\t\tdescription={ __(\n\t\t\t\t'Navigation menus are a curated collection of blocks that allow visitors to get around your site.'\n\t\t\t) }\n\t\t>\n\t\t\t<NavigationMenuEditor navigationMenuId={ navigationMenu?.id } />\n\t\t</SidebarNavigationScreenWrapper>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useEntityRecord, store as coreStore } from '@wordpress/core-data';\nimport {\n\t__experimentalUseNavigator as useNavigator,\n\tSpinner,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { SidebarNavigationScreenWrapper } from '../sidebar-navigation-screen-navigation-menus';\nimport ScreenNavigationMoreMenu from './more-menu';\nimport SingleNavigationMenu from './single-navigation-menu';\nimport useNavigationMenuHandlers from './use-navigation-menu-handlers';\nimport buildNavigationLabel from '../sidebar-navigation-screen-navigation-menus/build-navigation-label';\n\nexport const postType = `wp_navigation`;\n\nexport default function SidebarNavigationScreenNavigationMenu() {\n\tconst {\n\t\tparams: { postId },\n\t} = useNavigator();\n\n\tconst { record: navigationMenu, isResolving } = useEntityRecord(\n\t\t'postType',\n\t\tpostType,\n\t\tpostId\n\t);\n\n\tconst { isSaving, isDeleting } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isSavingEntityRecord, isDeletingEntityRecord } =\n\t\t\t\tselect( coreStore );\n\n\t\t\treturn {\n\t\t\t\tisSaving: isSavingEntityRecord( 'postType', postType, postId ),\n\t\t\t\tisDeleting: isDeletingEntityRecord(\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 ]\n\t);\n\n\tconst isLoading = isResolving || isSaving || isDeleting;\n\n\tconst menuTitle = navigationMenu?.title?.rendered || navigationMenu?.slug;\n\n\tconst { handleSave, handleDelete, handleDuplicate } =\n\t\tuseNavigationMenuHandlers();\n\n\tconst _handleDelete = () => handleDelete( navigationMenu );\n\tconst _handleSave = ( edits ) => handleSave( navigationMenu, edits );\n\tconst _handleDuplicate = () => handleDuplicate( navigationMenu );\n\n\tif ( isLoading ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Navigation menus are a curated collection of blocks that allow visitors to get around your site.'\n\t\t\t\t) }\n\t\t\t>\n\t\t\t\t<Spinner className=\"edit-site-sidebar-navigation-screen-navigation-menus__loading\" />\n\t\t\t</SidebarNavigationScreenWrapper>\n\t\t);\n\t}\n\n\tif ( ! isLoading && ! navigationMenu ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __( 'Navigation Menu missing.' ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( ! navigationMenu?.content?.raw ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tactions={\n\t\t\t\t\t<ScreenNavigationMoreMenu\n\t\t\t\t\t\tmenuTitle={ decodeEntities( menuTitle ) }\n\t\t\t\t\t\tonDelete={ _handleDelete }\n\t\t\t\t\t\tonSave={ _handleSave }\n\t\t\t\t\t\tonDuplicate={ _handleDuplicate }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\ttitle={ buildNavigationLabel(\n\t\t\t\t\tnavigationMenu?.title,\n\t\t\t\t\tnavigationMenu?.id,\n\t\t\t\t\tnavigationMenu?.status\n\t\t\t\t) }\n\t\t\t\tdescription={ __( 'This Navigation Menu is empty.' ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<SingleNavigationMenu\n\t\t\tnavigationMenu={ navigationMenu }\n\t\t\thandleDelete={ _handleDelete }\n\t\t\thandleSave={ _handleSave }\n\t\t\thandleDuplicate={ _handleDuplicate }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalUseNavigator as useNavigator } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\n/**\n * Internal dependencies\n */\nimport { postType } from '.';\n\nfunction useDeleteNavigationMenu() {\n\tconst { goTo } = useNavigator();\n\n\tconst { deleteEntityRecord } = useDispatch( coreStore );\n\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tconst handleDelete = async ( navigationMenu ) => {\n\t\tconst postId = navigationMenu?.id;\n\t\ttry {\n\t\t\tawait deleteEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId,\n\t\t\t\t{\n\t\t\t\t\tforce: true,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t}\n\t\t\t);\n\t\t\tcreateSuccessNotice( __( 'Deleted Navigation menu' ), {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t\tgoTo( '/navigation' );\n\t\t} catch ( error ) {\n\t\t\tcreateErrorNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %s: error message describing why the navigation menu could not be deleted. */\n\t\t\t\t\t__( `Unable to delete Navigation menu (%s).` ),\n\t\t\t\t\terror?.message\n\t\t\t\t),\n\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t};\n\n\treturn handleDelete;\n}\n\nfunction useSaveNavigationMenu() {\n\tconst { getEditedEntityRecord } = useSelect( ( select ) => {\n\t\tconst { getEditedEntityRecord: getEditedEntityRecordSelector } =\n\t\t\tselect( coreStore );\n\n\t\treturn {\n\t\t\tgetEditedEntityRecord: getEditedEntityRecordSelector,\n\t\t};\n\t}, [] );\n\n\tconst { editEntityRecord, saveEditedEntityRecord } =\n\t\tuseDispatch( coreStore );\n\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tconst handleSave = async ( navigationMenu, edits ) => {\n\t\tif ( ! edits ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst postId = navigationMenu?.id;\n\t\t// Prepare for revert in case of error.\n\t\tconst originalRecord = getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\t'wp_navigation',\n\t\t\tpostId\n\t\t);\n\n\t\t// Apply the edits.\n\t\teditEntityRecord( 'postType', postType, postId, edits );\n\n\t\t// Attempt to persist.\n\t\ttry {\n\t\t\tawait saveEditedEntityRecord( 'postType', postType, postId, {\n\t\t\t\tthrowOnError: true,\n\t\t\t} );\n\t\t\tcreateSuccessNotice( __( 'Renamed Navigation menu' ), {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\t// Revert to original in case of error.\n\t\t\teditEntityRecord( 'postType', postType, postId, originalRecord );\n\n\t\t\tcreateErrorNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %s: error message describing why the navigation menu could not be renamed. */\n\t\t\t\t\t__( `Unable to rename Navigation menu (%s).` ),\n\t\t\t\t\terror?.message\n\t\t\t\t),\n\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t};\n\n\treturn handleSave;\n}\n\nfunction useDuplicateNavigationMenu() {\n\tconst { goTo } = useNavigator();\n\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tconst handleDuplicate = async ( navigationMenu ) => {\n\t\tconst menuTitle =\n\t\t\tnavigationMenu?.title?.rendered || navigationMenu?.slug;\n\n\t\ttry {\n\t\t\tconst savedRecord = await saveEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\t{\n\t\t\t\t\ttitle: sprintf(\n\t\t\t\t\t\t/* translators: %s: Navigation menu title */\n\t\t\t\t\t\t__( '%s (Copy)' ),\n\t\t\t\t\t\tmenuTitle\n\t\t\t\t\t),\n\t\t\t\t\tcontent: navigationMenu?.content?.raw,\n\t\t\t\t\tstatus: 'publish',\n\t\t\t\t},\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 ( savedRecord ) {\n\t\t\t\tcreateSuccessNotice( __( 'Duplicated Navigation menu' ), {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t} );\n\t\t\t\tgoTo( `/navigation/${ postType }/${ savedRecord.id }` );\n\t\t\t}\n\t\t} catch ( error ) {\n\t\t\tcreateErrorNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %s: error message describing why the navigation menu could not be deleted. */\n\t\t\t\t\t__( `Unable to duplicate Navigation menu (%s).` ),\n\t\t\t\t\terror?.message\n\t\t\t\t),\n\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t};\n\n\treturn handleDuplicate;\n}\n\nexport default function useNavigationMenuHandlers() {\n\treturn {\n\t\thandleDelete: useDeleteNavigationMenu(),\n\t\thandleSave: useSaveNavigationMenu(),\n\t\thandleDuplicate: useDuplicateNavigationMenu(),\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useEntityRecords, store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\nimport { decodeEntities } from '@wordpress/html-entities';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\tSpinner,\n} from '@wordpress/components';\nimport { navigation } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { PRELOADED_NAVIGATION_MENUS_QUERY } from './constants';\nimport { useLink } from '../routes/link';\nimport SingleNavigationMenu from '../sidebar-navigation-screen-navigation-menu/single-navigation-menu';\nimport useNavigationMenuHandlers from '../sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers';\nimport { unlock } from '../../lock-unlock';\n\n// Copied from packages/block-library/src/navigation/edit/navigation-menu-selector.js.\nfunction buildMenuLabel( title, id, status ) {\n\tif ( ! title?.rendered ) {\n\t\t/* translators: %s is the index of the menu in the list of menus. */\n\t\treturn sprintf( __( '(no title %s)' ), id );\n\t}\n\n\tif ( status === 'publish' ) {\n\t\treturn decodeEntities( title?.rendered );\n\t}\n\n\treturn sprintf(\n\t\t// translators: %1s: title of the menu; %2s: status of the menu (draft, pending, etc.).\n\t\t__( '%1$s (%2$s)' ),\n\t\tdecodeEntities( title?.rendered ),\n\t\tstatus\n\t);\n}\n\n// Save a boolean to prevent us creating a fallback more than once per session.\nlet hasCreatedFallback = false;\n\nexport default function SidebarNavigationScreenNavigationMenus() {\n\tconst {\n\t\trecords: navigationMenus,\n\t\tisResolving: isResolvingNavigationMenus,\n\t\thasResolved: hasResolvedNavigationMenus,\n\t} = useEntityRecords(\n\t\t'postType',\n\t\t`wp_navigation`,\n\t\tPRELOADED_NAVIGATION_MENUS_QUERY\n\t);\n\n\tconst isLoading =\n\t\tisResolvingNavigationMenus && ! hasResolvedNavigationMenus;\n\n\tconst { getNavigationFallbackId } = unlock( useSelect( coreStore ) );\n\n\tconst firstNavigationMenu = navigationMenus?.[ 0 ];\n\n\t// Save a boolean to prevent us creating a fallback more than once per session.\n\tif ( firstNavigationMenu ) {\n\t\thasCreatedFallback = true;\n\t}\n\n\t// If there is no navigation menu found\n\t// then trigger fallback algorithm to create one.\n\tif (\n\t\t! firstNavigationMenu &&\n\t\t! isResolvingNavigationMenus &&\n\t\thasResolvedNavigationMenus &&\n\t\t! hasCreatedFallback\n\t) {\n\t\tgetNavigationFallbackId();\n\t}\n\n\tconst { handleSave, handleDelete, handleDuplicate } =\n\t\tuseNavigationMenuHandlers();\n\n\tconst hasNavigationMenus = !! navigationMenus?.length;\n\n\tif ( isLoading ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper>\n\t\t\t\t<Spinner className=\"edit-site-sidebar-navigation-screen-navigation-menus__loading\" />\n\t\t\t</SidebarNavigationScreenWrapper>\n\t\t);\n\t}\n\n\tif ( ! isLoading && ! hasNavigationMenus ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __( 'No Navigation Menus found.' ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\t// if single menu then render it\n\tif ( navigationMenus?.length === 1 ) {\n\t\treturn (\n\t\t\t<SingleNavigationMenu\n\t\t\t\tnavigationMenu={ firstNavigationMenu }\n\t\t\t\thandleDelete={ () => handleDelete( firstNavigationMenu ) }\n\t\t\t\thandleDuplicate={ () => handleDuplicate( firstNavigationMenu ) }\n\t\t\t\thandleSave={ ( edits ) =>\n\t\t\t\t\thandleSave( firstNavigationMenu, edits )\n\t\t\t\t}\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<SidebarNavigationScreenWrapper>\n\t\t\t<ItemGroup>\n\t\t\t\t{ navigationMenus?.map( ( { id, title, status }, index ) => (\n\t\t\t\t\t<NavMenuItem\n\t\t\t\t\t\tpostId={ id }\n\t\t\t\t\t\tkey={ id }\n\t\t\t\t\t\twithChevron\n\t\t\t\t\t\ticon={ navigation }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ buildMenuLabel( title, index + 1, status ) }\n\t\t\t\t\t</NavMenuItem>\n\t\t\t\t) ) }\n\t\t\t</ItemGroup>\n\t\t</SidebarNavigationScreenWrapper>\n\t);\n}\n\nexport function SidebarNavigationScreenWrapper( {\n\tchildren,\n\tactions,\n\ttitle,\n\tdescription,\n} ) {\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\ttitle={ title || __( 'Navigation' ) }\n\t\t\tactions={ actions }\n\t\t\tdescription={ description || __( 'Manage your Navigation menus.' ) }\n\t\t\tcontent={ children }\n\t\t/>\n\t);\n}\n\nconst NavMenuItem = ( { postId, ...props } ) => {\n\tconst linkInfo = useLink( {\n\t\tpostId,\n\t\tpostType: 'wp_navigation',\n\t} );\n\treturn <SidebarNavigationItem { ...linkInfo } { ...props } />;\n};\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalUseNavigator as useNavigator } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\n\nconst config = {\n\twp_template: {\n\t\ttitle: __( 'All templates' ),\n\t\tdescription: __(\n\t\t\t'Create new templates, or reset any customizations made to the templates supplied by your theme.'\n\t\t),\n\t},\n\twp_template_part: {\n\t\ttitle: __( 'All template parts' ),\n\t\tdescription: __(\n\t\t\t'Create new template parts, or reset any customizations made to the template parts supplied by your theme.'\n\t\t),\n\t\tbackPath: '/patterns',\n\t},\n};\n\nexport default function SidebarNavigationScreenTemplatesBrowse() {\n\tconst {\n\t\tparams: { postType },\n\t} = useNavigator();\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\ttitle={ config[ postType ].title }\n\t\t\tdescription={ config[ postType ].description }\n\t\t\tbackPath={ config[ postType ].backPath }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { displayShortcut } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { isPreviewingTheme } from '../../utils/is-previewing-theme';\n\nexport default function SaveButton( {\n\tclassName = 'edit-site-save-button__button',\n\tvariant = 'primary',\n\tshowTooltip = true,\n\tdefaultLabel,\n\ticon,\n} ) {\n\tconst { isDirty, isSaving, isSaveViewOpen } = useSelect( ( select ) => {\n\t\tconst { __experimentalGetDirtyEntityRecords, isSavingEntityRecord } =\n\t\t\tselect( coreStore );\n\t\tconst dirtyEntityRecords = __experimentalGetDirtyEntityRecords();\n\t\tconst { isSaveViewOpened } = select( editSiteStore );\n\t\treturn {\n\t\t\tisDirty: dirtyEntityRecords.length > 0,\n\t\t\tisSaving: dirtyEntityRecords.some( ( record ) =>\n\t\t\t\tisSavingEntityRecord( record.kind, record.name, record.key )\n\t\t\t),\n\t\t\tisSaveViewOpen: isSaveViewOpened(),\n\t\t};\n\t}, [] );\n\tconst { setIsSaveViewOpened } = useDispatch( editSiteStore );\n\n\tconst activateSaveEnabled = isPreviewingTheme() || isDirty;\n\tconst disabled = isSaving || ! activateSaveEnabled;\n\n\tconst getLabel = () => {\n\t\tif ( isPreviewingTheme() ) {\n\t\t\tif ( isSaving ) {\n\t\t\t\treturn __( 'Activating' );\n\t\t\t} else if ( disabled ) {\n\t\t\t\treturn __( 'Saved' );\n\t\t\t} else if ( isDirty ) {\n\t\t\t\treturn __( 'Activate & Save' );\n\t\t\t}\n\t\t\treturn __( 'Activate' );\n\t\t}\n\n\t\tif ( isSaving ) {\n\t\t\treturn __( 'Saving' );\n\t\t} else if ( disabled ) {\n\t\t\treturn __( 'Saved' );\n\t\t} else if ( defaultLabel ) {\n\t\t\treturn defaultLabel;\n\t\t}\n\t\treturn __( 'Save' );\n\t};\n\tconst label = getLabel();\n\n\treturn (\n\t\t<Button\n\t\t\tvariant={ variant }\n\t\t\tclassName={ className }\n\t\t\taria-disabled={ disabled }\n\t\t\taria-expanded={ isSaveViewOpen }\n\t\t\tisBusy={ isSaving }\n\t\t\tonClick={ disabled ? undefined : () => setIsSaveViewOpened( true ) }\n\t\t\tlabel={ label }\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={ disabled ? undefined : displayShortcut.primary( 's' ) }\n\t\t\t/*\n\t\t\t * Displaying the keyboard shortcut conditionally makes the tooltip\n\t\t\t * itself show conditionally. This would trigger a full-rerendering\n\t\t\t * of the button that we want to avoid. By setting `showTooltip`,\n\t\t\t & the tooltip is always rendered even when there's no keyboard shortcut.\n\t\t\t */\n\t\t\tshowTooltip={ showTooltip }\n\t\t\ticon={ icon }\n\t\t>\n\t\t\t{ label }\n\t\t</Button>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { Button, __experimentalHStack as HStack } from '@wordpress/components';\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { check } from '@wordpress/icons';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport SaveButton from '../save-button';\nimport { isPreviewingTheme } from '../../utils/is-previewing-theme';\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nconst PUBLISH_ON_SAVE_ENTITIES = [\n\t{\n\t\tkind: 'postType',\n\t\tname: 'wp_navigation',\n\t},\n];\n\nexport default function SaveHub() {\n\tconst { params } = useLocation();\n\n\tconst { __unstableMarkLastChangeAsPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tconst { dirtyCurrentEntity, countUnsavedChanges, isDirty, isSaving } =\n\t\tuseSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst {\n\t\t\t\t\t__experimentalGetDirtyEntityRecords,\n\t\t\t\t\tisSavingEntityRecord,\n\t\t\t\t} = select( coreStore );\n\t\t\t\tconst dirtyEntityRecords =\n\t\t\t\t\t__experimentalGetDirtyEntityRecords();\n\t\t\t\tlet calcDirtyCurrentEntity = null;\n\n\t\t\t\tif ( dirtyEntityRecords.length === 1 ) {\n\t\t\t\t\t// if we are on global styles\n\t\t\t\t\tif ( params.path?.includes( 'wp_global_styles' ) ) {\n\t\t\t\t\t\tcalcDirtyCurrentEntity = dirtyEntityRecords.find(\n\t\t\t\t\t\t\t( record ) => record.name === 'globalStyles'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\t// if we are on pages\n\t\t\t\t\telse if ( params.postId ) {\n\t\t\t\t\t\tcalcDirtyCurrentEntity = dirtyEntityRecords.find(\n\t\t\t\t\t\t\t( record ) =>\n\t\t\t\t\t\t\t\trecord.name === params.postType &&\n\t\t\t\t\t\t\t\tString( record.key ) === params.postId\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tdirtyCurrentEntity: calcDirtyCurrentEntity,\n\t\t\t\t\tisDirty: dirtyEntityRecords.length > 0,\n\t\t\t\t\tisSaving: dirtyEntityRecords.some( ( record ) =>\n\t\t\t\t\t\tisSavingEntityRecord(\n\t\t\t\t\t\t\trecord.kind,\n\t\t\t\t\t\t\trecord.name,\n\t\t\t\t\t\t\trecord.key\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\tcountUnsavedChanges: dirtyEntityRecords.length,\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ params.path, params.postType, params.postId ]\n\t\t);\n\n\tconst {\n\t\teditEntityRecord,\n\t\tsaveEditedEntityRecord,\n\t\t__experimentalSaveSpecifiedEntityEdits: saveSpecifiedEntityEdits,\n\t} = useDispatch( coreStore );\n\n\tconst disabled = isSaving || ( ! isDirty && ! isPreviewingTheme() );\n\n\t// if we have only one unsaved change and it matches current context, we can show a more specific label\n\tlet label = dirtyCurrentEntity\n\t\t? __( 'Save' )\n\t\t: sprintf(\n\t\t\t\t// translators: %d: number of unsaved changes (number).\n\t\t\t\t_n(\n\t\t\t\t\t'Review %d change…',\n\t\t\t\t\t'Review %d changes…',\n\t\t\t\t\tcountUnsavedChanges\n\t\t\t\t),\n\t\t\t\tcountUnsavedChanges\n\t\t  );\n\n\tif ( isSaving ) {\n\t\tlabel = __( 'Saving' );\n\t}\n\n\tconst saveCurrentEntity = async () => {\n\t\tif ( ! dirtyCurrentEntity ) return;\n\n\t\tconst { kind, name, key, property } = dirtyCurrentEntity;\n\n\t\ttry {\n\t\t\tif ( 'root' === dirtyCurrentEntity.kind && 'site' === name ) {\n\t\t\t\tawait saveSpecifiedEntityEdits( 'root', 'site', undefined, [\n\t\t\t\t\tproperty,\n\t\t\t\t] );\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\teditEntityRecord( kind, name, key, { status: 'publish' } );\n\t\t\t\t}\n\n\t\t\t\tawait saveEditedEntityRecord( kind, name, key );\n\t\t\t}\n\n\t\t\t__unstableMarkLastChangeAsPersistent();\n\n\t\t\tcreateSuccessNotice( __( 'Site updated.' ), {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\tcreateErrorNotice( `${ __( 'Saving failed.' ) } ${ error }` );\n\t\t}\n\t};\n\n\treturn (\n\t\t<HStack className=\"edit-site-save-hub\" alignment=\"right\" spacing={ 4 }>\n\t\t\t{ dirtyCurrentEntity ? (\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\tonClick={ saveCurrentEntity }\n\t\t\t\t\tisBusy={ isSaving }\n\t\t\t\t\tdisabled={ isSaving }\n\t\t\t\t\taria-disabled={ isSaving }\n\t\t\t\t\tclassName=\"edit-site-save-hub__button\"\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</Button>\n\t\t\t) : (\n\t\t\t\t<SaveButton\n\t\t\t\t\tclassName=\"edit-site-save-hub__button\"\n\t\t\t\t\tvariant={ disabled ? null : 'primary' }\n\t\t\t\t\tshowTooltip={ false }\n\t\t\t\t\ticon={ disabled && ! isSaving ? check : null }\n\t\t\t\t\tdefaultLabel={ label }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</HStack>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tModal,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tTextControl,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as noticesStore } from '@wordpress/notices';\n\nexport default function AddNewPageModal( { onSave, onClose } ) {\n\tconst [ isCreatingPage, setIsCreatingPage ] = useState( false );\n\tconst [ title, setTitle ] = useState( '' );\n\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst { createErrorNotice, createSuccessNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tasync function createPage( event ) {\n\t\tevent.preventDefault();\n\n\t\tif ( isCreatingPage ) {\n\t\t\treturn;\n\t\t}\n\t\tsetIsCreatingPage( true );\n\t\ttry {\n\t\t\tconst newPage = await saveEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'page',\n\t\t\t\t{\n\t\t\t\t\tstatus: 'draft',\n\t\t\t\t\ttitle,\n\t\t\t\t\tslug: title || __( 'No title' ),\n\t\t\t\t},\n\t\t\t\t{ throwOnError: true }\n\t\t\t);\n\n\t\t\tonSave( newPage );\n\n\t\t\tcreateSuccessNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t// translators: %s: Title of the created template e.g: \"Category\".\n\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\tnewPage.title?.rendered || title\n\t\t\t\t),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\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: __( 'An error occurred while creating the page.' );\n\n\t\t\tcreateErrorNotice( errorMessage, {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t} finally {\n\t\t\tsetIsCreatingPage( false );\n\t\t}\n\t}\n\n\treturn (\n\t\t<Modal title={ __( 'Draft a new page' ) } onRequestClose={ onClose }>\n\t\t\t<form onSubmit={ createPage }>\n\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t/* eslint-disable jsx-a11y/no-autofocus */\n\t\t\t\t\t\tautoFocus\n\t\t\t\t\t\t/* eslint-enable jsx-a11y/no-autofocus */\n\t\t\t\t\t\tlabel={ __( 'Page title' ) }\n\t\t\t\t\t\tonChange={ setTitle }\n\t\t\t\t\t\tplaceholder={ __( 'No title' ) }\n\t\t\t\t\t\tvalue={ title }\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 variant=\"tertiary\" onClick={ onClose }>\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>\n\t\t\t\t\t\t\t{ __( 'Create draft' ) }\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 {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalItem as Item,\n\t__experimentalTruncate as Truncate,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { useEntityRecords, store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { layout, page, home, verse, plus } from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport { useLink } from '../routes/link';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport SidebarButton from '../sidebar-button';\nimport AddNewPageModal from '../add-new-page';\nimport { unlock } from '../../lock-unlock';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nconst PageItem = ( { postType = 'page', postId, ...props } ) => {\n\tconst linkInfo = useLink( {\n\t\tpostType,\n\t\tpostId,\n\t} );\n\treturn <SidebarNavigationItem { ...linkInfo } { ...props } />;\n};\n\nexport default function SidebarNavigationScreenPages() {\n\tconst { records: pages, isResolving: isLoadingPages } = useEntityRecords(\n\t\t'postType',\n\t\t'page',\n\t\t{\n\t\t\tstatus: 'any',\n\t\t\tper_page: -1,\n\t\t}\n\t);\n\tconst { records: templates, isResolving: isLoadingTemplates } =\n\t\tuseEntityRecords( 'postType', 'wp_template', {\n\t\t\tper_page: -1,\n\t\t} );\n\n\tconst dynamicPageTemplates = templates?.filter( ( { slug } ) =>\n\t\t[ '404', 'search' ].includes( slug )\n\t);\n\n\tconst homeTemplate =\n\t\ttemplates?.find( ( template ) => template.slug === 'front-page' ) ||\n\t\ttemplates?.find( ( template ) => template.slug === 'home' ) ||\n\t\ttemplates?.find( ( template ) => template.slug === 'index' );\n\n\tconst pagesAndTemplates = pages?.concat( dynamicPageTemplates, [\n\t\thomeTemplate,\n\t] );\n\n\tconst { frontPage, postsPage } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord } = select( coreStore );\n\n\t\tconst siteSettings = getEntityRecord( 'root', 'site' );\n\t\treturn {\n\t\t\tfrontPage: siteSettings?.page_on_front,\n\t\t\tpostsPage: siteSettings?.page_for_posts,\n\t\t};\n\t}, [] );\n\n\tconst isHomePageBlog = frontPage === postsPage;\n\n\tconst reorderedPages = pages && [ ...pages ];\n\n\tif ( ! isHomePageBlog && reorderedPages?.length ) {\n\t\tconst homePageIndex = reorderedPages.findIndex(\n\t\t\t( item ) => item.id === frontPage\n\t\t);\n\t\tconst homePage = reorderedPages.splice( homePageIndex, 1 );\n\t\treorderedPages?.splice( 0, 0, ...homePage );\n\n\t\tconst postsPageIndex = reorderedPages.findIndex(\n\t\t\t( item ) => item.id === postsPage\n\t\t);\n\n\t\tconst blogPage = reorderedPages.splice( postsPageIndex, 1 );\n\n\t\treorderedPages.splice( 1, 0, ...blogPage );\n\t}\n\n\tconst [ showAddPage, setShowAddPage ] = useState( false );\n\n\tconst history = useHistory();\n\n\tconst handleNewPage = ( { type, id } ) => {\n\t\t// Navigate to the created template editor.\n\t\thistory.push( {\n\t\t\tpostId: id,\n\t\t\tpostType: type,\n\t\t\tcanvas: 'edit',\n\t\t} );\n\t\tsetShowAddPage( false );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t{ showAddPage && (\n\t\t\t\t<AddNewPageModal\n\t\t\t\t\tonSave={ handleNewPage }\n\t\t\t\t\tonClose={ () => setShowAddPage( false ) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<SidebarNavigationScreen\n\t\t\t\ttitle={ __( 'Pages' ) }\n\t\t\t\tdescription={ __( 'Browse and edit pages on your site.' ) }\n\t\t\t\tactions={\n\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\tlabel={ __( 'Draft a new page' ) }\n\t\t\t\t\t\tonClick={ () => setShowAddPage( true ) }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tcontent={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ( isLoadingPages || isLoadingTemplates ) && (\n\t\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t\t<Item>{ __( 'Loading pages' ) }</Item>\n\t\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! ( isLoadingPages || isLoadingTemplates ) && (\n\t\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t\t{ ! pagesAndTemplates?.length && (\n\t\t\t\t\t\t\t\t\t<Item>{ __( 'No page found' ) }</Item>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ isHomePageBlog && homeTemplate && (\n\t\t\t\t\t\t\t\t\t<PageItem\n\t\t\t\t\t\t\t\t\t\tpostType=\"wp_template\"\n\t\t\t\t\t\t\t\t\t\tpostId={ homeTemplate.id }\n\t\t\t\t\t\t\t\t\t\tkey={ homeTemplate.id }\n\t\t\t\t\t\t\t\t\t\ticon={ home }\n\t\t\t\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Truncate numberOfLines={ 1 }>\n\t\t\t\t\t\t\t\t\t\t\t{ decodeEntities(\n\t\t\t\t\t\t\t\t\t\t\t\thomeTemplate.title?.rendered ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t__( '(no title)' )\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</Truncate>\n\t\t\t\t\t\t\t\t\t</PageItem>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ reorderedPages?.map( ( item ) => {\n\t\t\t\t\t\t\t\t\tlet itemIcon;\n\t\t\t\t\t\t\t\t\tswitch ( item.id ) {\n\t\t\t\t\t\t\t\t\t\tcase frontPage:\n\t\t\t\t\t\t\t\t\t\t\titemIcon = home;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase postsPage:\n\t\t\t\t\t\t\t\t\t\t\titemIcon = verse;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\t\titemIcon = page;\n\t\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\t\t<PageItem\n\t\t\t\t\t\t\t\t\t\t\tpostId={ item.id }\n\t\t\t\t\t\t\t\t\t\t\tkey={ item.id }\n\t\t\t\t\t\t\t\t\t\t\ticon={ itemIcon }\n\t\t\t\t\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Truncate numberOfLines={ 1 }>\n\t\t\t\t\t\t\t\t\t\t\t\t{ decodeEntities(\n\t\t\t\t\t\t\t\t\t\t\t\t\titem?.title?.rendered ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t__( '(no title)' )\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</Truncate>\n\t\t\t\t\t\t\t\t\t\t</PageItem>\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</ItemGroup>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t\tfooter={\n\t\t\t\t\t<VStack spacing={ 0 }>\n\t\t\t\t\t\t{ dynamicPageTemplates?.map( ( item ) => (\n\t\t\t\t\t\t\t<PageItem\n\t\t\t\t\t\t\t\tpostType=\"wp_template\"\n\t\t\t\t\t\t\t\tpostId={ item.id }\n\t\t\t\t\t\t\t\tkey={ item.id }\n\t\t\t\t\t\t\t\ticon={ layout }\n\t\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Truncate numberOfLines={ 1 }>\n\t\t\t\t\t\t\t\t\t{ decodeEntities(\n\t\t\t\t\t\t\t\t\t\titem.title?.rendered ||\n\t\t\t\t\t\t\t\t\t\t\t__( '(no title)' )\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</Truncate>\n\t\t\t\t\t\t\t</PageItem>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t<SidebarNavigationItem\n\t\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen-pages__see-all\"\n\t\t\t\t\t\t\thref=\"edit.php?post_type=page\"\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tdocument.location = 'edit.php?post_type=page';\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Manage all pages' ) }\n\t\t\t\t\t\t</SidebarNavigationItem>\n\t\t\t\t\t</VStack>\n\t\t\t\t}\n\t\t\t/>\n\t\t</>\n\t);\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"dom\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"escapeHtml\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"wordcount\"];","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { dateI18n, getDate, humanTimeDiff } from '@wordpress/date';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst publishedIcon = (\n\t<SVG fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16Zm-1.067-5.6 4.2-5.667.8.6-4.8 6.467-3-2.267.6-.8 2.2 1.667Z\"\n\t\t/>\n\t</SVG>\n);\n\nconst draftIcon = (\n\t<SVG fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M14.5 8a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0ZM16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0Zm-8 4a4 4 0 0 0 0-8v8Z\"\n\t\t/>\n\t</SVG>\n);\n\nconst pendingIcon = (\n\t<SVG fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M14.5 8a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0ZM16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0ZM8 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default function StatusLabel( { status, date, short } ) {\n\tconst relateToNow = humanTimeDiff( date );\n\tlet statusLabel = status;\n\tlet statusIcon = pendingIcon;\n\tswitch ( status ) {\n\t\tcase 'publish':\n\t\t\tstatusLabel = date\n\t\t\t\t? createInterpolateElement(\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t/* translators: %s: is the relative time when the post was published. */\n\t\t\t\t\t\t\t__( 'Published <time>%s</time>' ),\n\t\t\t\t\t\t\trelateToNow\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{ time: <time dateTime={ date } /> }\n\t\t\t\t  )\n\t\t\t\t: __( 'Published' );\n\t\t\tstatusIcon = publishedIcon;\n\t\t\tbreak;\n\t\tcase 'future':\n\t\t\tconst formattedDate = dateI18n(\n\t\t\t\tshort ? 'M j' : 'F j',\n\t\t\t\tgetDate( date )\n\t\t\t);\n\t\t\tstatusLabel = date\n\t\t\t\t? createInterpolateElement(\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t/* translators: %s: is the formatted date and time on which the post is scheduled to be published. */\n\t\t\t\t\t\t\t__( 'Scheduled: <time>%s</time>' ),\n\t\t\t\t\t\t\tformattedDate\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{ time: <time dateTime={ date } /> }\n\t\t\t\t  )\n\t\t\t\t: __( 'Scheduled' );\n\t\t\tbreak;\n\t\tcase 'draft':\n\t\t\tstatusLabel = __( 'Draft' );\n\t\t\tstatusIcon = draftIcon;\n\t\t\tbreak;\n\t\tcase 'pending':\n\t\t\tstatusLabel = __( 'Pending' );\n\t\t\tbreak;\n\t\tcase 'private':\n\t\t\tstatusLabel = __( 'Private' );\n\t\t\tbreak;\n\t\tcase 'protected':\n\t\t\tstatusLabel = __( 'Password protected' );\n\t\t\tbreak;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames(\n\t\t\t\t'edit-site-sidebar-navigation-screen-page__status',\n\t\t\t\t{\n\t\t\t\t\t[ `has-status has-${ status }-status` ]: !! status,\n\t\t\t\t}\n\t\t\t) }\n\t\t>\n\t\t\t{ statusIcon } { statusLabel }\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { __experimentalTruncate as Truncate } from '@wordpress/components';\nimport { count as wordCount } from '@wordpress/wordcount';\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as coreStore, useEntityRecord } from '@wordpress/core-data';\nimport { safeDecodeURIComponent } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport StatusLabel from './status-label';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport {\n\tSidebarNavigationScreenDetailsPanel,\n\tSidebarNavigationScreenDetailsPanelRow,\n\tSidebarNavigationScreenDetailsPanelLabel,\n\tSidebarNavigationScreenDetailsPanelValue,\n} from '../sidebar-navigation-screen-details-panel';\n\n// Taken from packages/editor/src/components/time-to-read/index.js.\nconst AVERAGE_READING_RATE = 189;\n\nfunction getPageDetails( page ) {\n\tif ( ! page ) {\n\t\treturn [];\n\t}\n\n\tconst details = [\n\t\t{\n\t\t\tlabel: __( 'Status' ),\n\t\t\tvalue: (\n\t\t\t\t<StatusLabel\n\t\t\t\t\tstatus={ page?.password ? 'protected' : page.status }\n\t\t\t\t\tdate={ page?.date }\n\t\t\t\t\tshort\n\t\t\t\t/>\n\t\t\t),\n\t\t},\n\t\t{\n\t\t\tlabel: __( 'Slug' ),\n\t\t\tvalue: (\n\t\t\t\t<Truncate numberOfLines={ 1 }>\n\t\t\t\t\t{ safeDecodeURIComponent( page.slug ) }\n\t\t\t\t</Truncate>\n\t\t\t),\n\t\t},\n\t];\n\n\tif ( page?.templateTitle ) {\n\t\tdetails.push( {\n\t\t\tlabel: __( 'Template' ),\n\t\t\tvalue: decodeEntities( page.templateTitle ),\n\t\t} );\n\t}\n\n\tif ( page?.parentTitle ) {\n\t\tdetails.push( {\n\t\t\tlabel: __( 'Parent' ),\n\t\t\tvalue: decodeEntities( page.parentTitle || __( '(no title)' ) ),\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 = page?.content?.rendered\n\t\t? wordCount( page.content.rendered, wordCountType )\n\t\t: 0;\n\tconst readingTime = Math.round( wordsCounted / AVERAGE_READING_RATE );\n\n\tif ( wordsCounted && ! page?.isPostsPage ) {\n\t\tdetails.push(\n\t\t\t{\n\t\t\t\tlabel: __( 'Words' ),\n\t\t\t\tvalue: wordsCounted.toLocaleString() || __( 'Unknown' ),\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: __( 'Time to read' ),\n\t\t\t\tvalue:\n\t\t\t\t\treadingTime > 1\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: is the number of minutes. */\n\t\t\t\t\t\t\t\t__( '%s mins' ),\n\t\t\t\t\t\t\t\treadingTime.toLocaleString()\n\t\t\t\t\t\t  )\n\t\t\t\t\t\t: __( '< 1 min' ),\n\t\t\t}\n\t\t);\n\t}\n\treturn details;\n}\n\nexport default function PageDetails( { id } ) {\n\tconst { record } = useEntityRecord( 'postType', 'page', id );\n\tconst { parentTitle, templateTitle, isPostsPage } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedPostContext } = unlock( select( editSiteStore ) );\n\t\t\tconst postContext = getEditedPostContext();\n\t\t\tconst templates = select( coreStore ).getEntityRecords(\n\t\t\t\t'postType',\n\t\t\t\t'wp_template',\n\t\t\t\t{ per_page: -1 }\n\t\t\t);\n\t\t\t// Template title.\n\t\t\tconst templateSlug =\n\t\t\t\t// Checks that the post type matches the current theme's post type, otherwise\n\t\t\t\t// the templateSlug returns 'home'.\n\t\t\t\tpostContext?.postType === 'page'\n\t\t\t\t\t? postContext?.templateSlug\n\t\t\t\t\t: null;\n\t\t\tconst _templateTitle =\n\t\t\t\ttemplates && templateSlug\n\t\t\t\t\t? templates.find(\n\t\t\t\t\t\t\t( template ) => template.slug === templateSlug\n\t\t\t\t\t  )?.title?.rendered\n\t\t\t\t\t: null;\n\n\t\t\t// Parent page title.\n\t\t\tconst _parentTitle = record?.parent\n\t\t\t\t? select( coreStore ).getEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t'page',\n\t\t\t\t\t\trecord.parent,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t_fields: [ 'title' ],\n\t\t\t\t\t\t}\n\t\t\t\t  )?.title?.rendered\n\t\t\t\t: null;\n\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\t\t\tconst siteSettings = getEntityRecord( 'root', 'site' );\n\n\t\t\treturn {\n\t\t\t\tparentTitle: _parentTitle,\n\t\t\t\ttemplateTitle: _templateTitle,\n\t\t\t\tisPostsPage: record?.id === siteSettings?.page_for_posts,\n\t\t\t};\n\t\t},\n\t\t[ record?.parent, record?.id ]\n\t);\n\treturn (\n\t\t<SidebarNavigationScreenDetailsPanel\n\t\t\tspacing={ 5 }\n\t\t\ttitle={ __( 'Details' ) }\n\t\t>\n\t\t\t{ getPageDetails( {\n\t\t\t\tparentTitle,\n\t\t\t\ttemplateTitle,\n\t\t\t\tisPostsPage,\n\t\t\t\t...record,\n\t\t\t} ).map( ( { label, value } ) => (\n\t\t\t\t<SidebarNavigationScreenDetailsPanelRow key={ label }>\n\t\t\t\t\t<SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t<SidebarNavigationScreenDetailsPanelValue>\n\t\t\t\t\t\t{ value }\n\t\t\t\t\t</SidebarNavigationScreenDetailsPanelValue>\n\t\t\t\t</SidebarNavigationScreenDetailsPanelRow>\n\t\t\t) ) }\n\t\t</SidebarNavigationScreenDetailsPanel>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useState } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tMenuItem,\n\t__experimentalConfirmDialog as ConfirmDialog,\n} from '@wordpress/components';\nimport { store as noticesStore } from '@wordpress/notices';\n\nexport default function DeletePageMenuItem( { postId, onRemove } ) {\n\tconst [ isModalOpen, setIsModalOpen ] = useState( false );\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\tconst { deleteEntityRecord } = useDispatch( coreStore );\n\tconst page = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityRecord( 'postType', 'page', postId ),\n\t\t[ postId ]\n\t);\n\tasync function removePage() {\n\t\ttry {\n\t\t\tawait deleteEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'page',\n\t\t\t\tpostId,\n\t\t\t\t{},\n\t\t\t\t{ throwOnError: true }\n\t\t\t);\n\t\t\tcreateSuccessNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: The page's title. */\n\t\t\t\t\t__( '\"%s\" deleted.' ),\n\t\t\t\t\tdecodeEntities( page.title.rendered )\n\t\t\t\t),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tid: 'edit-site-page-removed',\n\t\t\t\t}\n\t\t\t);\n\t\t\tonRemove?.();\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 deleting the page.' );\n\n\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t} finally {\n\t\t\tsetIsModalOpen( false );\n\t\t}\n\t}\n\treturn (\n\t\t<>\n\t\t\t<MenuItem onClick={ () => setIsModalOpen( true ) } isDestructive>\n\t\t\t\t{ __( 'Delete' ) }\n\t\t\t</MenuItem>\n\t\t\t<ConfirmDialog\n\t\t\t\tisOpen={ isModalOpen }\n\t\t\t\tonConfirm={ removePage }\n\t\t\t\tonCancel={ () => setIsModalOpen( false ) }\n\t\t\t\tconfirmButtonText={ __( 'Delete' ) }\n\t\t\t>\n\t\t\t\t{ __( 'Are you sure you want to delete this page?' ) }\n\t\t\t</ConfirmDialog>\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { DropdownMenu, MenuGroup } from '@wordpress/components';\nimport { moreVertical } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport DeletePageMenuItem from './delete-page-menu-item';\n\nexport default function PageActions( {\n\tpostId,\n\tclassName,\n\ttoggleProps,\n\tonRemove,\n} ) {\n\treturn (\n\t\t<DropdownMenu\n\t\t\ticon={ moreVertical }\n\t\t\tlabel={ __( 'Actions' ) }\n\t\t\tclassName={ className }\n\t\t\ttoggleProps={ toggleProps }\n\t\t>\n\t\t\t{ () => (\n\t\t\t\t<MenuGroup>\n\t\t\t\t\t<DeletePageMenuItem\n\t\t\t\t\t\tpostId={ postId }\n\t\t\t\t\t\tonRemove={ onRemove }\n\t\t\t\t\t/>\n\t\t\t\t</MenuGroup>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\t__experimentalUseNavigator as useNavigator,\n\t__experimentalVStack as VStack,\n\tExternalLink,\n\t__experimentalTruncate as Truncate,\n} from '@wordpress/components';\nimport { store as coreStore, useEntityRecord } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { pencil } from '@wordpress/icons';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\nimport { escapeAttribute } from '@wordpress/escape-html';\nimport { safeDecodeURIComponent, filterURLForDisplay } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\nimport PageDetails from './page-details';\nimport PageActions from '../page-actions';\nimport SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-details-footer';\n\nexport default function SidebarNavigationScreenPage() {\n\tconst navigator = useNavigator();\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\tconst {\n\t\tparams: { postId },\n\t} = useNavigator();\n\tconst { record } = useEntityRecord( 'postType', 'page', postId );\n\n\tconst { featuredMediaAltText, featuredMediaSourceUrl } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\t\t\t// Featured image.\n\t\t\tconst attachedMedia = record?.featured_media\n\t\t\t\t? getEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t'attachment',\n\t\t\t\t\t\trecord?.featured_media\n\t\t\t\t  )\n\t\t\t\t: null;\n\n\t\t\treturn {\n\t\t\t\tfeaturedMediaSourceUrl:\n\t\t\t\t\tattachedMedia?.media_details.sizes?.medium?.source_url ||\n\t\t\t\t\tattachedMedia?.source_url,\n\t\t\t\tfeaturedMediaAltText: escapeAttribute(\n\t\t\t\t\tattachedMedia?.alt_text ||\n\t\t\t\t\t\tattachedMedia?.description?.raw ||\n\t\t\t\t\t\t''\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ record ]\n\t);\n\n\tconst featureImageAltText = featuredMediaAltText\n\t\t? decodeEntities( featuredMediaAltText )\n\t\t: decodeEntities( record?.title?.rendered || __( 'Featured image' ) );\n\n\treturn record ? (\n\t\t<SidebarNavigationScreen\n\t\t\ttitle={ decodeEntities(\n\t\t\t\trecord?.title?.rendered || __( '(no title)' )\n\t\t\t) }\n\t\t\tactions={\n\t\t\t\t<>\n\t\t\t\t\t<PageActions\n\t\t\t\t\t\tpostId={ postId }\n\t\t\t\t\t\ttoggleProps={ { as: SidebarButton } }\n\t\t\t\t\t\tonRemove={ () => {\n\t\t\t\t\t\t\tnavigator.goTo( '/page' );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\tonClick={ () => setCanvasMode( 'edit' ) }\n\t\t\t\t\t\tlabel={ __( 'Edit' ) }\n\t\t\t\t\t\ticon={ pencil }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t}\n\t\t\tmeta={\n\t\t\t\t<ExternalLink\n\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__page-link\"\n\t\t\t\t\thref={ record.link }\n\t\t\t\t>\n\t\t\t\t\t{ filterURLForDisplay(\n\t\t\t\t\t\tsafeDecodeURIComponent( record.link )\n\t\t\t\t\t) }\n\t\t\t\t</ExternalLink>\n\t\t\t}\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t{ !! featuredMediaSourceUrl && (\n\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen-page__featured-image-wrapper\"\n\t\t\t\t\t\t\talignment=\"left\"\n\t\t\t\t\t\t\tspacing={ 2 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen-page__featured-image has-image\">\n\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\talt={ featureImageAltText }\n\t\t\t\t\t\t\t\t\tsrc={ featuredMediaSourceUrl }\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</VStack>\n\t\t\t\t\t) }\n\t\t\t\t\t{ !! record?.excerpt?.rendered && (\n\t\t\t\t\t\t<Truncate\n\t\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen-page__excerpt\"\n\t\t\t\t\t\t\tnumberOfLines={ 3 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ stripHTML( record.excerpt.rendered ) }\n\t\t\t\t\t\t</Truncate>\n\t\t\t\t\t) }\n\t\t\t\t\t<PageDetails id={ postId } />\n\t\t\t\t</>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\t<SidebarNavigationScreenDetailsFooter\n\t\t\t\t\tlastModifiedDateTime={ record?.modified }\n\t\t\t\t/>\n\t\t\t}\n\t\t/>\n\t) : null;\n}\n","/**\n * WordPress dependencies\n */\nimport { memo, useRef } from '@wordpress/element';\nimport {\n\t__experimentalNavigatorProvider as NavigatorProvider,\n\t__experimentalNavigatorScreen as NavigatorScreen,\n} from '@wordpress/components';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreenMain from '../sidebar-navigation-screen-main';\nimport SidebarNavigationScreenTemplates from '../sidebar-navigation-screen-templates';\nimport SidebarNavigationScreenTemplate from '../sidebar-navigation-screen-template';\nimport SidebarNavigationScreenPatterns from '../sidebar-navigation-screen-patterns';\nimport SidebarNavigationScreenPattern from '../sidebar-navigation-screen-pattern';\nimport useSyncPathWithURL, {\n\tgetPathFromURL,\n} from '../sync-state-with-url/use-sync-path-with-url';\nimport SidebarNavigationScreenNavigationMenus from '../sidebar-navigation-screen-navigation-menus';\nimport SidebarNavigationScreenNavigationMenu from '../sidebar-navigation-screen-navigation-menu';\nimport SidebarNavigationScreenGlobalStyles from '../sidebar-navigation-screen-global-styles';\nimport SidebarNavigationScreenTemplatesBrowse from '../sidebar-navigation-screen-templates-browse';\nimport SaveHub from '../save-hub';\nimport { unlock } from '../../lock-unlock';\nimport SidebarNavigationScreenPages from '../sidebar-navigation-screen-pages';\nimport SidebarNavigationScreenPage from '../sidebar-navigation-screen-page';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nfunction SidebarScreens() {\n\tuseSyncPathWithURL();\n\n\treturn (\n\t\t<>\n\t\t\t<NavigatorScreen path=\"/\">\n\t\t\t\t<SidebarNavigationScreenMain />\n\t\t\t</NavigatorScreen>\n\t\t\t<NavigatorScreen path=\"/navigation\">\n\t\t\t\t<SidebarNavigationScreenNavigationMenus />\n\t\t\t</NavigatorScreen>\n\t\t\t<NavigatorScreen path=\"/navigation/:postType/:postId\">\n\t\t\t\t<SidebarNavigationScreenNavigationMenu />\n\t\t\t</NavigatorScreen>\n\t\t\t<NavigatorScreen path=\"/wp_global_styles\">\n\t\t\t\t<SidebarNavigationScreenGlobalStyles />\n\t\t\t</NavigatorScreen>\n\t\t\t<NavigatorScreen path=\"/page\">\n\t\t\t\t<SidebarNavigationScreenPages />\n\t\t\t</NavigatorScreen>\n\t\t\t<NavigatorScreen path=\"/page/:postId\">\n\t\t\t\t<SidebarNavigationScreenPage />\n\t\t\t</NavigatorScreen>\n\t\t\t<NavigatorScreen path=\"/:postType(wp_template)\">\n\t\t\t\t<SidebarNavigationScreenTemplates />\n\t\t\t</NavigatorScreen>\n\t\t\t<NavigatorScreen path=\"/patterns\">\n\t\t\t\t<SidebarNavigationScreenPatterns />\n\t\t\t</NavigatorScreen>\n\t\t\t<NavigatorScreen path=\"/:postType(wp_template|wp_template_part)/all\">\n\t\t\t\t<SidebarNavigationScreenTemplatesBrowse />\n\t\t\t</NavigatorScreen>\n\t\t\t<NavigatorScreen path=\"/:postType(wp_template_part|wp_block)/:postId\">\n\t\t\t\t<SidebarNavigationScreenPattern />\n\t\t\t</NavigatorScreen>\n\t\t\t<NavigatorScreen path=\"/:postType(wp_template)/:postId\">\n\t\t\t\t<SidebarNavigationScreenTemplate />\n\t\t\t</NavigatorScreen>\n\t\t</>\n\t);\n}\n\nfunction Sidebar() {\n\tconst { params: urlParams } = useLocation();\n\tconst initialPath = useRef( getPathFromURL( urlParams ) );\n\n\treturn (\n\t\t<>\n\t\t\t<NavigatorProvider\n\t\t\t\tclassName=\"edit-site-sidebar__content\"\n\t\t\t\tinitialPath={ initialPath.current }\n\t\t\t>\n\t\t\t\t<SidebarScreens />\n\t\t\t</NavigatorProvider>\n\t\t\t<SaveHub />\n\t\t</>\n\t);\n}\n\nexport default memo( Sidebar );\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst drawerLeft = (\n\t<SVG\n\t\twidth=\"24\"\n\t\theight=\"24\"\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox=\"0 0 24 24\"\n\t>\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"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\t/>\n\t</SVG>\n);\n\nexport default drawerLeft;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst drawerRight = (\n\t<SVG\n\t\twidth=\"24\"\n\t\theight=\"24\"\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox=\"0 0 24 24\"\n\t>\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"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\t/>\n\t</SVG>\n);\n\nexport default drawerRight;\n","/**\n * WordPress dependencies\n */\nimport {\n\tComplementaryArea,\n\tComplementaryAreaMoreMenuItem,\n} from '@wordpress/interface';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\n\nexport default function DefaultSidebar( {\n\tclassName,\n\tidentifier,\n\ttitle,\n\ticon,\n\tchildren,\n\tcloseLabel,\n\theader,\n\theaderClassName,\n\tpanelClassName,\n} ) {\n\tconst showIconLabels = useSelect(\n\t\t( select ) => select( editSiteStore ).getSettings().showIconLabels,\n\t\t[]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<ComplementaryArea\n\t\t\t\tclassName={ className }\n\t\t\t\tscope=\"core/edit-site\"\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\tshowIconLabels={ showIconLabels }\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/edit-site\"\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 * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Icon } from '@wordpress/components';\n\nexport function IconWithCurrentColor( { className, ...props } ) {\n\treturn (\n\t\t<Icon\n\t\t\tclassName={ classnames(\n\t\t\t\tclassName,\n\t\t\t\t'edit-site-global-styles-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\t__experimentalNavigatorButton as NavigatorButton,\n\t__experimentalNavigatorToParentButton as NavigatorToParentButton,\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\nfunction GenericNavigationButton( { icon, children, ...props } ) {\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\nfunction NavigationButtonAsItem( props ) {\n\treturn <NavigatorButton as={ GenericNavigationButton } { ...props } />;\n}\n\nfunction NavigationBackButtonAsItem( props ) {\n\treturn (\n\t\t<NavigatorToParentButton as={ GenericNavigationButton } { ...props } />\n\t);\n}\n\nexport { NavigationButtonAsItem, NavigationBackButtonAsItem };\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst typography = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M6.9 7L3 17.8h1.7l1-2.8h4.1l1 2.8h1.7L8.6 7H6.9zm-.7 6.6l1.5-4.3 1.5 4.3h-3zM21.6 17c-.1.1-.2.2-.3.2-.1.1-.2.1-.4.1s-.3-.1-.4-.2c-.1-.1-.1-.3-.1-.6V12c0-.5 0-1-.1-1.4-.1-.4-.3-.7-.5-1-.2-.2-.5-.4-.9-.5-.4 0-.8-.1-1.3-.1s-1 .1-1.4.2c-.4.1-.7.3-1 .4-.2.2-.4.3-.6.5-.1.2-.2.4-.2.7 0 .3.1.5.2.8.2.2.4.3.8.3.3 0 .6-.1.8-.3.2-.2.3-.4.3-.7 0-.3-.1-.5-.2-.7-.2-.2-.4-.3-.6-.4.2-.2.4-.3.7-.4.3-.1.6-.1.8-.1.3 0 .6 0 .8.1.2.1.4.3.5.5.1.2.2.5.2.9v1.1c0 .3-.1.5-.3.6-.2.2-.5.3-.9.4-.3.1-.7.3-1.1.4-.4.1-.8.3-1.1.5-.3.2-.6.4-.8.7-.2.3-.3.7-.3 1.2 0 .6.2 1.1.5 1.4.3.4.9.5 1.6.5.5 0 1-.1 1.4-.3.4-.2.8-.6 1.1-1.1 0 .4.1.7.3 1 .2.3.6.4 1.2.4.4 0 .7-.1.9-.2.2-.1.5-.3.7-.4h-.3zm-3-.9c-.2.4-.5.7-.8.8-.3.2-.6.2-.8.2-.4 0-.6-.1-.9-.3-.2-.2-.3-.6-.3-1.1 0-.5.1-.9.3-1.2s.5-.5.8-.7c.3-.2.7-.3 1-.5.3-.1.6-.3.7-.6v3.4z\" />\n\t</SVG>\n);\n\nexport default typography;\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst color = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\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\nexport default color;\n","/**\n * WordPress dependencies\n */\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\nimport { typography, color, layout } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { NavigationButtonAsItem } from './navigation-button';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasColorPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n} = unlock( blockEditorPrivateApis );\n\nfunction RootMenu() {\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\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\taria-label={ __( 'Typography styles' ) }\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\n\t\t\t\t\t\ticon={ color }\n\t\t\t\t\t\tpath=\"/colors\"\n\t\t\t\t\t\taria-label={ __( 'Colors styles' ) }\n\t\t\t\t\t>\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{ hasLayoutPanel && (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\ticon={ layout }\n\t\t\t\t\t\tpath=\"/layout\"\n\t\t\t\t\t\taria-label={ __( 'Layout styles' ) }\n\t\t\t\t\t>\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","/**\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';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { IconWithCurrentColor } from './icon-with-current-color';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport RootMenu from './root-menu';\nimport StylesPreview from './preview';\nimport { unlock } from '../../lock-unlock';\n\nfunction ScreenRoot() {\n\tconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\tconst [ customCSS ] = useGlobalStyle( 'css' );\n\n\tconst { hasVariations, canEditCSS } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEntityRecord,\n\t\t\t__experimentalGetCurrentGlobalStylesId,\n\t\t\t__experimentalGetCurrentThemeGlobalStylesVariations,\n\t\t} = select( 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\thasVariations:\n\t\t\t\t!! __experimentalGetCurrentThemeGlobalStylesVariations()\n\t\t\t\t\t?.length,\n\t\t\tcanEditCSS:\n\t\t\t\t!! globalStyles?._links?.[ 'wp:action-edit-css' ] ?? false,\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Card size=\"small\" className=\"edit-site-global-styles-screen-root\">\n\t\t\t<CardBody>\n\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t<Card>\n\t\t\t\t\t\t<CardMedia>\n\t\t\t\t\t\t\t<StylesPreview />\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\n\t\t\t\t\t\t\t\tpath=\"/variations\"\n\t\t\t\t\t\t\t\taria-label={ __( 'Browse styles' ) }\n\t\t\t\t\t\t\t>\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\t/*\n\t\t\t\t\t * 13px matches the text inset of the NavigationButton (12px padding, plus the width of the button's border).\n\t\t\t\t\t * This is an ad hoc override for this instance and the Addtional CSS option below. Other options for matching the\n\t\t\t\t\t * the nav button inset should be looked at before reusing further.\n\t\t\t\t\t */\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\n\t\t\t\t\t\tpath=\"/blocks\"\n\t\t\t\t\t\taria-label={ __( 'Blocks styles' ) }\n\t\t\t\t\t>\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\n\t\t\t{ canEditCSS && !! customCSS && (\n\t\t\t\t<>\n\t\t\t\t\t<CardDivider />\n\t\t\t\t\t<CardBody>\n\t\t\t\t\t\t<Spacer\n\t\t\t\t\t\t\tas=\"p\"\n\t\t\t\t\t\t\tpaddingTop={ 2 }\n\t\t\t\t\t\t\tpaddingX=\"13px\"\n\t\t\t\t\t\t\tmarginBottom={ 4 }\n\t\t\t\t\t\t>\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 and layout of your site.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\t\t\tpath=\"/css\"\n\t\t\t\t\t\t\t\taria-label={ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t>\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{ __( 'Additional CSS' ) }\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</CardBody>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</Card>\n\t);\n}\n\nexport default ScreenRoot;\n","/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\n/**\n * Internal dependencies\n */\n\nimport { NavigationButtonAsItem } from './navigation-button';\n\nfunction getCoreBlockStyles( blockStyles ) {\n\treturn blockStyles?.filter( ( style ) => style.source === 'block' );\n}\n\nexport function useBlockVariations( name ) {\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 coreBlockStyles = getCoreBlockStyles( blockStyles );\n\treturn coreBlockStyles;\n}\n\nexport function VariationsPanel( { name } ) {\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\taria-label={ style.label }\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__experimentalNavigatorToParentButton as NavigatorToParentButton,\n} from '@wordpress/components';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { chevronRight, chevronLeft } from '@wordpress/icons';\n\nfunction ScreenHeader( { title, description } ) {\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<HStack spacing={ 2 }>\n\t\t\t\t\t\t<NavigatorToParentButton\n\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t// TODO: This style override is also used in ToolsPanelHeader.\n\t\t\t\t\t\t\t\t// It should be supported out-of-the-box by Button.\n\t\t\t\t\t\t\t\t{ minWidth: 24, padding: 0 }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ticon={ isRTL() ? chevronRight : chevronLeft }\n\t\t\t\t\t\t\tisSmall\n\t\t\t\t\t\t\taria-label={ __( 'Navigate to the previous view' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Spacer>\n\t\t\t\t\t\t\t<Heading\n\t\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-header\"\n\t\t\t\t\t\t\t\tlevel={ 2 }\n\t\t\t\t\t\t\t\tsize={ 13 }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t</HStack>\n\t\t\t\t</Spacer>\n\t\t\t</View>\n\t\t\t{ description && (\n\t\t\t\t<p className=\"edit-site-global-styles-header__description\">\n\t\t\t\t\t{ description }\n\t\t\t\t</p>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\nexport default ScreenHeader;\n","/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport {\n\tFlexItem,\n\tSearchControl,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { useState, useMemo, useEffect, useRef } from '@wordpress/element';\nimport {\n\tBlockIcon,\n\tprivateApis as blockEditorPrivateApis,\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-panel';\nimport ScreenHeader from './header';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasBorderPanel,\n\tuseGlobalSetting,\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, block ) => {\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 ) {\n\tconst [ rawSettings ] = useGlobalSetting( '', 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\nfunction BlockMenuItem( { block } ) {\n\tconst hasBlockMenuItem = useBlockHasGlobalStyles( block.name );\n\tif ( ! hasBlockMenuItem ) {\n\t\treturn null;\n\t}\n\n\tconst navigationButtonLabel = sprintf(\n\t\t// translators: %s: is the name of a block e.g., 'Image' or 'Table'.\n\t\t__( '%s block styles' ),\n\t\tblock.title\n\t);\n\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\taria-label={ navigationButtonLabel }\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\nfunction ScreenBlockList() {\n\tconst sortedBlockTypes = useSortedBlockTypes();\n\tconst [ filterValue, setFilterValue ] = useState( '' );\n\tconst debouncedSpeak = useDebounce( speak, 500 );\n\tconst isMatchingSearchTerm = useSelect(\n\t\t( select ) => select( blocksStore ).isMatchingSearchTerm,\n\t\t[]\n\t);\n\tconst filteredBlockTypes = useMemo( () => {\n\t\tif ( ! filterValue ) {\n\t\t\treturn sortedBlockTypes;\n\t\t}\n\t\treturn sortedBlockTypes.filter( ( blockType ) =>\n\t\t\tisMatchingSearchTerm( blockType, filterValue )\n\t\t);\n\t}, [ filterValue, sortedBlockTypes, isMatchingSearchTerm ] );\n\n\tconst blockTypesListRef = useRef();\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;\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, count );\n\t}, [ filterValue, debouncedSpeak ] );\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\t__nextHasNoMarginBottom\n\t\t\t\tclassName=\"edit-site-block-types-search\"\n\t\t\t\tonChange={ setFilterValue }\n\t\t\t\tvalue={ filterValue }\n\t\t\t\tlabel={ __( 'Search for blocks' ) }\n\t\t\t\tplaceholder={ __( 'Search' ) }\n\t\t\t/>\n\t\t\t<div\n\t\t\t\tref={ blockTypesListRef }\n\t\t\t\tclassName=\"edit-site-block-types-item-list\"\n\t\t\t>\n\t\t\t\t{ filteredBlockTypes.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</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenBlockList;\n","/**\n * WordPress dependencies\n */\nimport { BlockPreview } from '@wordpress/block-editor';\nimport { getBlockType, getBlockFromExample } from '@wordpress/blocks';\nimport { __experimentalSpacer as Spacer } from '@wordpress/components';\n\nconst BlockPreviewPanel = ( { name, variation = '' } ) => {\n\tconst blockExample = getBlockType( name )?.example;\n\tconst blockExampleWithVariation = {\n\t\t...blockExample,\n\t\tattributes: {\n\t\t\t...blockExample?.attributes,\n\t\t\tclassName: 'is-style-' + variation,\n\t\t},\n\t};\n\tconst blocks =\n\t\tblockExample &&\n\t\tgetBlockFromExample(\n\t\t\tname,\n\t\t\tvariation ? blockExampleWithVariation : blockExample\n\t\t);\n\tconst viewportWidth = blockExample?.viewportWidth || null;\n\tconst previewHeight = '150px';\n\n\treturn ! blockExample ? null : (\n\t\t<Spacer marginX={ 4 } marginBottom={ 4 }>\n\t\t\t<div\n\t\t\t\tclassName=\"edit-site-global-styles__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{\n\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\tmin-height:${ previewHeight };\n\t\t\t\t\t\t\t\t\tdisplay:flex;align-items:center;justify-content: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},\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\nfunction Subtitle( { children, level } ) {\n\treturn (\n\t\t<Heading\n\t\t\tclassName=\"edit-site-global-styles-subtitle\"\n\t\t\tlevel={ level ?? 2 }\n\t\t>\n\t\t\t{ children }\n\t\t</Heading>\n\t);\n}\n\nexport default Subtitle;\n","/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\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';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../lock-unlock';\nimport Subtitle from './subtitle';\nimport { useBlockVariations, VariationsPanel } from './variations-panel';\n\nfunction applyFallbackStyle( border ) {\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 ) {\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\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tuseHasColorPanel,\n\tuseHasEffectsPanel,\n\tuseHasFiltersPanel,\n\tuseGlobalStyle,\n\tBorderPanel: StylesBorderPanel,\n\tColorPanel: StylesColorPanel,\n\tTypographyPanel: StylesTypographyPanel,\n\tDimensionsPanel: StylesDimensionsPanel,\n\tEffectsPanel: StylesEffectsPanel,\n\tFiltersPanel: StylesFiltersPanel,\n\tAdvancedPanel: StylesAdvancedPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction ScreenBlock( { name, variation } ) {\n\tlet prefixParts = [];\n\tif ( variation ) {\n\t\tprefixParts = [ 'variations', variation ].concat( prefixParts );\n\t}\n\tconst prefix = prefixParts.join( '.' );\n\n\tconst [ style ] = useGlobalStyle( prefix, name, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( prefix, name, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ rawSettings, setSettings ] = useGlobalSetting( '', name );\n\tconst settings = useSettingsForBlockElement( rawSettings, name );\n\tconst blockType = getBlockType( name );\n\tconst blockVariations = useBlockVariations( name );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasBorderPanel = useHasBorderPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasEffectsPanel = useHasEffectsPanel( settings );\n\tconst hasFiltersPanel = useHasFiltersPanel( settings );\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:\n\t\t\t\t!! globalStyles?._links?.[ 'wp:action-edit-css' ] ?? false,\n\t\t};\n\t}, [] );\n\tconst currentBlockStyle = variation\n\t\t? blockVariations.find( ( s ) => 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: settings.layout,\n\t\t};\n\t}, [ style, settings.layout ] );\n\tconst onChangeDimensions = ( newStyle ) => {\n\t\tconst updatedStyle = { ...newStyle };\n\t\tdelete updatedStyle.layout;\n\t\tsetStyle( updatedStyle );\n\n\t\tif ( newStyle.layout !== settings.layout ) {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlayout: newStyle.layout,\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeBorders = ( newStyle ) => {\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={ variation ? currentBlockStyle.label : blockType.title }\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=\"edit-site-global-styles-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{ 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{ hasEffectsPanel && (\n\t\t\t\t<StylesEffectsPanel\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{ 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={ {\n\t\t\t\t\t\t...settings,\n\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\t...settings.color,\n\t\t\t\t\t\t\tcustomDuotone: false, //TO FIX: Custom duotone only works on the block level right now\n\t\t\t\t\t\t},\n\t\t\t\t\t} }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\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.'\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 */\nimport { __, sprintf } 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 { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport Subtitle from './subtitle';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nfunction Item( { parentMenu, element, label } ) {\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\tconst [ fontFamily ] = useGlobalStyle( prefix + 'typography.fontFamily' );\n\tconst [ fontStyle ] = useGlobalStyle( prefix + 'typography.fontStyle' );\n\tconst [ fontWeight ] = useGlobalStyle( prefix + 'typography.fontWeight' );\n\tconst [ letterSpacing ] = useGlobalStyle(\n\t\tprefix + 'typography.letterSpacing'\n\t);\n\tconst [ backgroundColor ] = useGlobalStyle( prefix + 'color.background' );\n\tconst [ gradientValue ] = useGlobalStyle( prefix + 'color.gradient' );\n\tconst [ color ] = useGlobalStyle( prefix + 'color.text' );\n\n\tconst navigationButtonLabel = sprintf(\n\t\t// translators: %s: is a subset of Typography, e.g., 'text' or 'links'.\n\t\t__( 'Typography %s styles' ),\n\t\tlabel\n\t);\n\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ parentMenu + '/typography/' + element }\n\t\t\taria-label={ navigationButtonLabel }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<FlexItem\n\t\t\t\t\tclassName=\"edit-site-global-styles-screen-typography__indicator\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tfontFamily: fontFamily ?? 'serif',\n\t\t\t\t\t\tbackground: gradientValue ?? backgroundColor,\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\tletterSpacing,\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 ScreenTypography() {\n\tconst parentMenu = '';\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'Manage the typography settings for different elements.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<BlockPreviewPanel />\n\n\t\t\t<div className=\"edit-site-global-styles-screen-typography\">\n\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t<Subtitle level={ 3 }>{ __( 'Elements' ) }</Subtitle>\n\t\t\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"text\"\n\t\t\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"link\"\n\t\t\t\t\t\t\tlabel={ __( 'Links' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"heading\"\n\t\t\t\t\t\t\tlabel={ __( 'Headings' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"caption\"\n\t\t\t\t\t\t\tlabel={ __( 'Captions' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"button\"\n\t\t\t\t\t\t\tlabel={ __( 'Buttons' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ItemGroup>\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenTypography;\n","/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tTypographyPanel: StylesTypographyPanel,\n} = unlock( blockEditorPrivateApis );\n\nexport default function TypographyPanel( { element, headingLevel } ) {\n\tlet prefixParts = [];\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 ] = useGlobalStyle( prefix, undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle(\n\t\tprefix,\n\t\tundefined,\n\t\t'all',\n\t\t{\n\t\t\tshouldDecodeEncode: false,\n\t\t}\n\t);\n\tconst [ rawSettings ] = useGlobalSetting( '' );\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 * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nexport default function TypographyPreview( { name, element, headingLevel } ) {\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 ] = useGlobalStyle(\n\t\tprefix + 'typography.fontFamily',\n\t\tname\n\t);\n\tconst [ gradientValue ] = useGlobalStyle( prefix + 'color.gradient', name );\n\tconst [ backgroundColor ] = useGlobalStyle(\n\t\tprefix + 'color.background',\n\t\tname\n\t);\n\tconst [ color ] = useGlobalStyle( prefix + 'color.text', name );\n\tconst [ fontSize ] = useGlobalStyle( prefix + 'typography.fontSize', name );\n\tconst [ fontStyle ] = useGlobalStyle(\n\t\tprefix + 'typography.fontStyle',\n\t\tname\n\t);\n\tconst [ fontWeight ] = useGlobalStyle(\n\t\tprefix + 'typography.fontWeight',\n\t\tname\n\t);\n\tconst [ letterSpacing ] = useGlobalStyle(\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=\"edit-site-typography-preview\"\n\t\t\tstyle={ {\n\t\t\t\tfontFamily: fontFamily ?? 'serif',\n\t\t\t\tbackground: gradientValue ?? backgroundColor,\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 {\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 './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\nfunction ScreenTypographyElement( { element } ) {\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={ setHeadingLevel }\n\t\t\t\t\t\tisBlock\n\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t__nextHasNoMarginBottom\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\t/* translators: 'All' refers to selecting all heading levels \n\t\t\t\t\t\t\tand applying the same style to h1-h6. */\n\t\t\t\t\t\t\tlabel={ __( 'All' ) }\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\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\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\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\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\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\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 */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst shuffle = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/SVG\">\n\t\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\nexport default shuffle;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Flex } from '@wordpress/components';\n\nfunction ColorIndicatorWrapper( { className, ...props } ) {\n\treturn (\n\t\t<Flex\n\t\t\tclassName={ classnames(\n\t\t\t\t'edit-site-global-styles__color-indicator-wrapper',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nexport default ColorIndicatorWrapper;\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\tButton,\n} from '@wordpress/components';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { shuffle } from '@wordpress/icons';\nimport { useMemo } from '@wordpress/element';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport Subtitle from './subtitle';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport { useColorRandomizer } from './hooks';\nimport ColorIndicatorWrapper from './color-indicator-wrapper';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\n\nconst EMPTY_COLORS = [];\n\nfunction Palette( { name } ) {\n\tconst [ customColors ] = useGlobalSetting( 'color.palette.custom' );\n\tconst [ themeColors ] = useGlobalSetting( 'color.palette.theme' );\n\tconst [ defaultColors ] = useGlobalSetting( 'color.palette.default' );\n\n\tconst [ defaultPaletteEnabled ] = useGlobalSetting(\n\t\t'color.defaultPalette',\n\t\tname\n\t);\n\n\tconst [ randomizeThemeColors ] = useColorRandomizer();\n\n\tconst colors = useMemo(\n\t\t() => [\n\t\t\t...( customColors || EMPTY_COLORS ),\n\t\t\t...( themeColors || EMPTY_COLORS ),\n\t\t\t...( defaultColors && defaultPaletteEnabled\n\t\t\t\t? defaultColors\n\t\t\t\t: EMPTY_COLORS ),\n\t\t],\n\t\t[ customColors, themeColors, defaultColors, defaultPaletteEnabled ]\n\t);\n\n\tconst screenPath = ! name\n\t\t? '/colors/palette'\n\t\t: '/blocks/' + encodeURIComponent( name ) + '/colors/palette';\n\tconst paletteButtonText =\n\t\tcolors.length > 0\n\t\t\t? sprintf(\n\t\t\t\t\t// Translators: %d: Number of palette colors.\n\t\t\t\t\t_n( '%d color', '%d colors', colors.length ),\n\t\t\t\t\tcolors.length\n\t\t\t  )\n\t\t\t: __( 'Add custom colors' );\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\n\t\t\t\t\tpath={ screenPath }\n\t\t\t\t\taria-label={ __( 'Color palettes' ) }\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\tdirection={\n\t\t\t\t\t\t\tcolors.length === 0 ? 'row-reverse' : 'row'\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<ZStack isLayered={ false } offset={ -8 }>\n\t\t\t\t\t\t\t{ colors\n\t\t\t\t\t\t\t\t.slice( 0, 5 )\n\t\t\t\t\t\t\t\t.map( ( { color }, index ) => (\n\t\t\t\t\t\t\t\t\t<ColorIndicatorWrapper\n\t\t\t\t\t\t\t\t\t\tkey={ `${ color }-${ index }` }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<ColorIndicator colorValue={ color } />\n\t\t\t\t\t\t\t\t\t</ColorIndicatorWrapper>\n\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t</ZStack>\n\t\t\t\t\t\t<FlexItem>{ paletteButtonText }</FlexItem>\n\t\t\t\t\t</HStack>\n\t\t\t\t</NavigationButtonAsItem>\n\t\t\t</ItemGroup>\n\t\t\t{ window.__experimentalEnableColorRandomizer &&\n\t\t\t\tthemeColors?.length > 0 && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\ticon={ shuffle }\n\t\t\t\t\t\tonClick={ randomizeThemeColors }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Randomize colors' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\nexport default Palette;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport Palette from './palette';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tColorPanel: StylesColorPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction ScreenColors() {\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ rawSettings ] = useGlobalSetting( '' );\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'Manage palettes and the default color of different global elements on the site.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<BlockPreviewPanel />\n\n\t\t\t<div className=\"edit-site-global-styles-screen-colors\">\n\t\t\t\t<VStack spacing={ 10 }>\n\t\t\t\t\t<Palette />\n\n\t\t\t\t\t<StylesColorPanel\n\t\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t/>\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenColors;\n","/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\t__experimentalPaletteEdit as PaletteEdit,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\nconst mobilePopoverProps = { placement: 'bottom-start', offset: 8 };\n\nexport default function ColorPalettePanel( { name } ) {\n\tconst [ themeColors, setThemeColors ] = useGlobalSetting(\n\t\t'color.palette.theme',\n\t\tname\n\t);\n\tconst [ baseThemeColors ] = useGlobalSetting(\n\t\t'color.palette.theme',\n\t\tname,\n\t\t'base'\n\t);\n\tconst [ defaultColors, setDefaultColors ] = useGlobalSetting(\n\t\t'color.palette.default',\n\t\tname\n\t);\n\tconst [ baseDefaultColors ] = useGlobalSetting(\n\t\t'color.palette.default',\n\t\tname,\n\t\t'base'\n\t);\n\tconst [ customColors, setCustomColors ] = useGlobalSetting(\n\t\t'color.palette.custom',\n\t\tname\n\t);\n\n\tconst [ defaultPaletteEnabled ] = useGlobalSetting(\n\t\t'color.defaultPalette',\n\t\tname\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=\"edit-site-global-styles-color-palette-panel\"\n\t\t\tspacing={ 10 }\n\t\t>\n\t\t\t{ !! themeColors && !! themeColors.length && (\n\t\t\t\t<PaletteEdit\n\t\t\t\t\tcanReset={ themeColors !== baseThemeColors }\n\t\t\t\t\tcanOnlyChangeValues\n\t\t\t\t\tcolors={ themeColors }\n\t\t\t\t\tonChange={ setThemeColors }\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{ !! 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\temptyMessage={ __(\n\t\t\t\t\t'Custom colors are empty! Add some colors to create your own color palette.'\n\t\t\t\t) }\n\t\t\t\tslugPrefix=\"custom-\"\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t/>\n\t\t</VStack>\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 { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport Subtitle from './subtitle';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\nconst mobilePopoverProps = { placement: 'bottom-start', offset: 8 };\n\nconst noop = () => {};\n\nexport default function GradientPalettePanel( { name } ) {\n\tconst [ themeGradients, setThemeGradients ] = useGlobalSetting(\n\t\t'color.gradients.theme',\n\t\tname\n\t);\n\tconst [ baseThemeGradients ] = useGlobalSetting(\n\t\t'color.gradients.theme',\n\t\tname,\n\t\t'base'\n\t);\n\tconst [ defaultGradients, setDefaultGradients ] = useGlobalSetting(\n\t\t'color.gradients.default',\n\t\tname\n\t);\n\tconst [ baseDefaultGradients ] = useGlobalSetting(\n\t\t'color.gradients.default',\n\t\tname,\n\t\t'base'\n\t);\n\tconst [ customGradients, setCustomGradients ] = useGlobalSetting(\n\t\t'color.gradients.custom',\n\t\tname\n\t);\n\n\tconst [ defaultPaletteEnabled ] = useGlobalSetting(\n\t\t'color.defaultGradients',\n\t\tname\n\t);\n\n\tconst [ customDuotone ] = useGlobalSetting( 'color.duotone.custom' ) || [];\n\tconst [ defaultDuotone ] =\n\t\tuseGlobalSetting( 'color.duotone.default' ) || [];\n\tconst [ themeDuotone ] = useGlobalSetting( 'color.duotone.theme' ) || [];\n\tconst [ defaultDuotoneEnabled ] = useGlobalSetting(\n\t\t'color.defaultDuotone'\n\t);\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=\"edit-site-global-styles-gradient-palette-panel\"\n\t\t\tspacing={ 10 }\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\tpaletteLabelLevel={ 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\tpaletteLabelLevel={ 3 }\n\t\t\t\temptyMessage={ __(\n\t\t\t\t\t'Custom gradients are empty! Add some gradients to create your own palette.'\n\t\t\t\t) }\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={ true }\n\t\t\t\t\t\tdisableCustomColors={ true }\n\t\t\t\t\t\tclearable={ false }\n\t\t\t\t\t\tonChange={ noop }\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';\nimport { TabPanel } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ColorPalettePanel from './color-palette-panel';\nimport GradientPalettePanel from './gradients-palette-panel';\nimport ScreenHeader from './header';\n\nfunction ScreenColorPalette( { name } ) {\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Palette' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Palettes are used to provide default color options for blocks and various design tools. Here you can edit the colors with their labels.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<TabPanel\n\t\t\t\ttabs={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'solid',\n\t\t\t\t\t\ttitle: 'Solid',\n\t\t\t\t\t\tvalue: 'solid',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'gradient',\n\t\t\t\t\t\ttitle: 'Gradient',\n\t\t\t\t\t\tvalue: 'gradient',\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t>\n\t\t\t\t{ ( tab ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ tab.value === 'solid' && (\n\t\t\t\t\t\t\t<ColorPalettePanel name={ name } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ tab.value === 'gradient' && (\n\t\t\t\t\t\t\t<GradientPalettePanel name={ name } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</TabPanel>\n\t\t</>\n\t);\n}\n\nexport default ScreenColorPalette;\n","/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tDimensionsPanel: StylesDimensionsPanel,\n} = unlock( blockEditorPrivateApis );\n\nconst DEFAULT_CONTROLS = {\n\tcontentSize: true,\n\twideSize: true,\n\tpadding: true,\n\tmargin: true,\n\tblockGap: true,\n\tminHeight: true,\n\tchildLayout: false,\n};\n\nexport default function DimensionsPanel() {\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ rawSettings, setSettings ] = useGlobalSetting( '' );\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: settings.layout,\n\t\t};\n\t}, [ style, settings.layout ] );\n\n\tconst onChange = ( newStyle ) => {\n\t\tconst updatedStyle = { ...newStyle };\n\t\tdelete updatedStyle.layout;\n\t\tsetStyle( updatedStyle );\n\n\t\tif ( newStyle.layout !== settings.layout ) {\n\t\t\tconst updatedSettings = { ...rawSettings, layout: newStyle.layout };\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 { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport DimensionsPanel from './dimensions-panel';\nimport ScreenHeader from './header';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../lock-unlock';\n\nconst { useHasDimensionsPanel, useGlobalSetting, useSettingsForBlockElement } =\n\tunlock( blockEditorPrivateApis );\n\nfunction ScreenLayout() {\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader title={ __( 'Layout' ) } />\n\t\t\t<BlockPreviewPanel />\n\t\t\t{ hasDimensionsPanel && <DimensionsPanel /> }\n\t\t</>\n\t);\n}\n\nexport default ScreenLayout;\n","/**\n * WordPress dependencies\n */\nimport { Card, CardBody } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useEffect, useRef } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport StyleVariationsContainer from './style-variations-container';\n\nfunction ScreenStyleVariations() {\n\tconst { mode } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tmode: select( blockEditorStore ).__unstableGetEditorMode(),\n\t\t};\n\t}, [] );\n\n\tconst shouldRevertInitialMode = useRef( null );\n\tuseEffect( () => {\n\t\t// ignore changes to zoom-out mode as we explictily change to it on mount.\n\t\tif ( mode !== 'zoom-out' ) {\n\t\t\tshouldRevertInitialMode.current = false;\n\t\t}\n\t}, [ mode ] );\n\n\t// Intentionality left without any dependency.\n\t// This effect should only run the first time the component is rendered.\n\t// The effect opens the zoom-out view if it is not open before when applying a style variation.\n\tuseEffect( () => {\n\t\tif ( mode !== 'zoom-out' ) {\n\t\t\t__unstableSetEditorMode( 'zoom-out' );\n\t\t\tshouldRevertInitialMode.current = true;\n\t\t\treturn () => {\n\t\t\t\t// if there were not mode changes revert to the initial mode when unmounting.\n\t\t\t\tif ( shouldRevertInitialMode.current ) {\n\t\t\t\t\t__unstableSetEditorMode( mode );\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [] );\n\n\tconst { __unstableSetEditorMode } = useDispatch( blockEditorStore );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\tback=\"/\"\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=\"edit-site-global-styles-screen-style-variations\"\n\t\t\t>\n\t\t\t\t<CardBody>\n\t\t\t\t\t<StyleVariationsContainer />\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 { ExternalLink } from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport ScreenHeader from './header';\n\nconst { useGlobalStyle, AdvancedPanel: StylesAdvancedPanel } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction ScreenCSS() {\n\tconst description = __(\n\t\t'Add your own CSS to customize the appearance and layout of your site.'\n\t);\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'CSS' ) }\n\t\t\t\tdescription={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ description }\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\thref=\"https://wordpress.org/documentation/article/css/\"\n\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-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=\"edit-site-global-styles-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 { Disabled } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\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 } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\n\nimport { unlock } from '../../lock-unlock';\nimport { mergeBaseAndUserConfigs } from '../global-styles/global-styles-provider';\nimport EditorCanvasContainer from '../editor-canvas-container';\n\nconst { ExperimentalBlockEditorProvider, useGlobalStylesOutputWithConfig } =\n\tunlock( blockEditorPrivateApis );\n\nfunction isObjectEmpty( object ) {\n\treturn ! object || Object.keys( object ).length === 0;\n}\n\nfunction Revisions( { onClose, userConfig, blocks } ) {\n\tconst { baseConfig } = useSelect(\n\t\t( select ) => ( {\n\t\t\tbaseConfig:\n\t\t\t\tselect(\n\t\t\t\t\tcoreStore\n\t\t\t\t).__experimentalGetCurrentThemeBaseGlobalStyles(),\n\t\t} ),\n\t\t[]\n\t);\n\n\tconst mergedConfig = useMemo( () => {\n\t\tif ( ! isObjectEmpty( userConfig ) && ! isObjectEmpty( baseConfig ) ) {\n\t\t\treturn mergeBaseAndUserConfigs( baseConfig, userConfig );\n\t\t}\n\t\treturn {};\n\t}, [ baseConfig, userConfig ] );\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() => ( { ...originalSettings, __unstableIsPreviewMode: true } ),\n\t\t[ originalSettings ]\n\t);\n\n\tconst [ globalStyles ] = useGlobalStylesOutputWithConfig( mergedConfig );\n\n\tconst editorStyles =\n\t\t! isObjectEmpty( globalStyles ) && ! isObjectEmpty( userConfig )\n\t\t\t? globalStyles\n\t\t\t: settings.styles;\n\n\treturn (\n\t\t<EditorCanvasContainer\n\t\t\ttitle={ __( 'Revisions' ) }\n\t\t\tonClose={ onClose }\n\t\t\tcloseButtonLabel={ __( 'Close revisions' ) }\n\t\t\tenableResizing={ true }\n\t\t>\n\t\t\t<Iframe\n\t\t\t\tclassName=\"edit-site-revisions__iframe\"\n\t\t\t\tname=\"revisions\"\n\t\t\t\ttabIndex={ 0 }\n\t\t\t>\n\t\t\t\t<EditorStyles styles={ editorStyles } />\n\t\t\t\t<style>\n\t\t\t\t\t{\n\t\t\t\t\t\t// Forming a \"block formatting context\" to prevent margin collapsing.\n\t\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\t`.is-root-container { display: flow-root; } body { position: relative; padding: 32px; }`\n\t\t\t\t\t}\n\t\t\t\t</style>\n\t\t\t\t<Disabled className=\"edit-site-revisions__example-preview__content\">\n\t\t\t\t\t<ExperimentalBlockEditorProvider\n\t\t\t\t\t\tvalue={ renderedBlocksArray }\n\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t>\n\t\t\t\t\t\t<BlockList renderAppender={ false } />\n\t\t\t\t\t</ExperimentalBlockEditorProvider>\n\t\t\t\t</Disabled>\n\t\t\t</Iframe>\n\t\t</EditorCanvasContainer>\n\t);\n}\n\nexport default Revisions;\n","/**\n * WordPress dependencies\n */\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { createPrivateSlotFill } = unlock( componentsPrivateApis );\nconst SIDEBAR_FIXED_BOTTOM_SLOT_FILL_NAME = 'SidebarFixedBottom';\nconst { Slot: SidebarFixedBottomSlot, Fill: SidebarFixedBottomFill } =\n\tcreatePrivateSlotFill( SIDEBAR_FIXED_BOTTOM_SLOT_FILL_NAME );\n\nexport default function SidebarFixedBottom( { children } ) {\n\treturn (\n\t\t<SidebarFixedBottomFill>\n\t\t\t<div className=\"edit-site-sidebar-fixed-bottom-slot\">\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</SidebarFixedBottomFill>\n\t);\n}\n\nexport { SidebarFixedBottomSlot };\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { dateI18n, getDate, humanTimeDiff, getSettings } from '@wordpress/date';\n\n/**\n * Returns a button label for the revision.\n *\n * @param {Object} revision A revision object.\n * @return {string} Translated label.\n */\nfunction getRevisionLabel( revision ) {\n\tconst authorDisplayName = revision?.author?.name || __( 'User' );\n\n\tif ( 'unsaved' === revision?.id ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %(name)s author display name */\n\t\t\t__( 'Unsaved changes by %(name)s' ),\n\t\t\t{\n\t\t\t\tname: authorDisplayName,\n\t\t\t}\n\t\t);\n\t}\n\tconst formattedDate = dateI18n(\n\t\tgetSettings().formats.datetimeAbbreviated,\n\t\tgetDate( revision?.modified )\n\t);\n\n\treturn revision?.isLatest\n\t\t? sprintf(\n\t\t\t\t/* translators: %(name)s author display name, %(date)s: revision creation date */\n\t\t\t\t__( 'Changes saved by %(name)s on %(date)s (current)' ),\n\t\t\t\t{\n\t\t\t\t\tname: authorDisplayName,\n\t\t\t\t\tdate: formattedDate,\n\t\t\t\t}\n\t\t  )\n\t\t: sprintf(\n\t\t\t\t/* translators: %(name)s author display name, %(date)s: revision creation date */\n\t\t\t\t__( 'Changes saved by %(name)s on %(date)s' ),\n\t\t\t\t{\n\t\t\t\t\tname: authorDisplayName,\n\t\t\t\t\tdate: formattedDate,\n\t\t\t\t}\n\t\t  );\n}\n\n/**\n * Returns a rendered list of revisions buttons.\n *\n * @typedef {Object} props\n * @property {Array<Object>} userRevisions      A collection of user revisions.\n * @property {number}        selectedRevisionId The id of the currently-selected revision.\n * @property {Function}      onChange           Callback fired when a revision is selected.\n *\n * @param    {props}         Component          props.\n * @return {JSX.Element} The modal component.\n */\nfunction RevisionsButtons( { userRevisions, selectedRevisionId, onChange } ) {\n\treturn (\n\t\t<ol\n\t\t\tclassName=\"edit-site-global-styles-screen-revisions__revisions-list\"\n\t\t\taria-label={ __( 'Global styles revisions' ) }\n\t\t\trole=\"group\"\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 authorDisplayName = author?.name || __( 'User' );\n\t\t\t\tconst authorAvatar = author?.avatar_urls?.[ '48' ];\n\t\t\t\tconst isUnsaved = 'unsaved' === revision?.id;\n\t\t\t\tconst isSelected = selectedRevisionId\n\t\t\t\t\t? selectedRevisionId === revision?.id\n\t\t\t\t\t: index === 0;\n\n\t\t\t\treturn (\n\t\t\t\t\t<li\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'edit-site-global-styles-screen-revisions__revision-item',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'is-selected': isSelected,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tkey={ id }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-revisions__revision-button\"\n\t\t\t\t\t\t\tdisabled={ isSelected }\n\t\t\t\t\t\t\tonClick={ () => {\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\tlabel={ getRevisionLabel( revision ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__description\">\n\t\t\t\t\t\t\t\t<time dateTime={ modified }>\n\t\t\t\t\t\t\t\t\t{ humanTimeDiff( modified ) }\n\t\t\t\t\t\t\t\t</time>\n\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__meta\">\n\t\t\t\t\t\t\t\t\t{ isUnsaved\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: %(name)s author 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'Unsaved changes by %(name)s'\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\tname: authorDisplayName,\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\t: sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t/* translators: %(name)s author 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'Changes saved by %(name)s'\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\tname: authorDisplayName,\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\n\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\talt={ author?.name }\n\t\t\t\t\t\t\t\t\t\tsrc={ authorAvatar }\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</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</li>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ol>\n\t);\n}\n\nexport default RevisionsButtons;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tButton,\n\t__experimentalUseNavigator as useNavigator,\n\t__experimentalConfirmDialog as ConfirmDialog,\n\tSpinner,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useContext, useState, useEffect } from '@wordpress/element';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from '../header';\nimport { unlock } from '../../../lock-unlock';\nimport Revisions from '../../revisions';\nimport SidebarFixedBottom from '../../sidebar-edit-mode/sidebar-fixed-bottom';\nimport { store as editSiteStore } from '../../../store';\nimport useGlobalStylesRevisions from './use-global-styles-revisions';\nimport RevisionsButtons from './revisions-buttons';\n\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction ScreenRevisions() {\n\tconst { goBack } = useNavigator();\n\tconst { user: userConfig, setUserConfig } =\n\t\tuseContext( GlobalStylesContext );\n\tconst { blocks, editorCanvasContainerView } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\teditorCanvasContainerView: unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t).getEditorCanvasContainerView(),\n\t\t\tblocks: select( blockEditorStore ).getBlocks(),\n\t\t};\n\t}, [] );\n\tconst { revisions, isLoading, hasUnsavedChanges } =\n\t\tuseGlobalStylesRevisions();\n\tconst [ selectedRevisionId, setSelectedRevisionId ] = useState();\n\tconst [ globalStylesRevision, setGlobalStylesRevision ] =\n\t\tuseState( userConfig );\n\tconst [\n\t\tisLoadingRevisionWithUnsavedChanges,\n\t\tsetIsLoadingRevisionWithUnsavedChanges,\n\t] = useState( false );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\n\tuseEffect( () => {\n\t\tif ( editorCanvasContainerView !== 'global-styles-revisions' ) {\n\t\t\tgoBack();\n\t\t\tsetEditorCanvasContainerView( editorCanvasContainerView );\n\t\t}\n\t}, [ editorCanvasContainerView ] );\n\n\tconst onCloseRevisions = () => {\n\t\tgoBack();\n\t};\n\n\tconst restoreRevision = ( revision ) => {\n\t\tsetUserConfig( () => ( {\n\t\t\tstyles: revision?.styles,\n\t\t\tsettings: revision?.settings,\n\t\t} ) );\n\t\tsetIsLoadingRevisionWithUnsavedChanges( false );\n\t\tonCloseRevisions();\n\t};\n\n\tconst selectRevision = ( revision ) => {\n\t\tsetGlobalStylesRevision( {\n\t\t\tstyles: revision?.styles,\n\t\t\tsettings: revision?.settings,\n\t\t\tid: revision?.id,\n\t\t} );\n\t\tsetSelectedRevisionId( revision?.id );\n\t};\n\n\tconst isLoadButtonEnabled =\n\t\t!! globalStylesRevision?.id &&\n\t\t! areGlobalStyleConfigsEqual( globalStylesRevision, userConfig );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Revisions' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Revisions are added to the timeline when style changes are saved.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t{ isLoading && (\n\t\t\t\t<Spinner className=\"edit-site-global-styles-screen-revisions__loading\" />\n\t\t\t) }\n\t\t\t{ ! isLoading && (\n\t\t\t\t<Revisions\n\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\tuserConfig={ globalStylesRevision }\n\t\t\t\t\tonClose={ onCloseRevisions }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<div className=\"edit-site-global-styles-screen-revisions\">\n\t\t\t\t<RevisionsButtons\n\t\t\t\t\tonChange={ selectRevision }\n\t\t\t\t\tselectedRevisionId={ selectedRevisionId }\n\t\t\t\t\tuserRevisions={ revisions }\n\t\t\t\t/>\n\t\t\t\t{ isLoadButtonEnabled && (\n\t\t\t\t\t<SidebarFixedBottom>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-revisions__button\"\n\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t! globalStylesRevision?.id ||\n\t\t\t\t\t\t\t\tglobalStylesRevision?.id === 'unsaved'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tif ( hasUnsavedChanges ) {\n\t\t\t\t\t\t\t\t\tsetIsLoadingRevisionWithUnsavedChanges(\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} else {\n\t\t\t\t\t\t\t\t\trestoreRevision( globalStylesRevision );\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{ __( 'Apply' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</SidebarFixedBottom>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t\t{ isLoadingRevisionWithUnsavedChanges && (\n\t\t\t\t<ConfirmDialog\n\t\t\t\t\ttitle={ __(\n\t\t\t\t\t\t'Loading this revision will discard all unsaved changes.'\n\t\t\t\t\t) }\n\t\t\t\t\tisOpen={ isLoadingRevisionWithUnsavedChanges }\n\t\t\t\t\tconfirmButtonText={ __( ' Discard unsaved changes' ) }\n\t\t\t\t\tonConfirm={ () => restoreRevision( globalStylesRevision ) }\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>\n\t\t\t\t\t<>\n\t\t\t\t\t\t<h2>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Loading this revision will discard all unsaved changes.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Do you want to replace your unsaved changes in the editor?'\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</ConfirmDialog>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ScreenRevisions;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalNavigatorProvider as NavigatorProvider,\n\t__experimentalNavigatorScreen as NavigatorScreen,\n\t__experimentalUseNavigator as useNavigator,\n\tcreateSlotFill,\n\tButton,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n} from '@wordpress/components';\nimport { getBlockTypes, store as blocksStore } from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { backup, moreVertical } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ScreenRoot from './screen-root';\nimport {\n\tuseBlockHasGlobalStyles,\n\tdefault as ScreenBlockList,\n} 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 ScreenLayout from './screen-layout';\nimport ScreenStyleVariations from './screen-style-variations';\nimport StyleBook from '../style-book';\nimport ScreenCSS from './screen-css';\nimport ScreenRevisions from './screen-revisions';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nconst SLOT_FILL_NAME = 'GlobalStylesMenu';\nconst { Slot: GlobalStylesMenuSlot, Fill: GlobalStylesMenuFill } =\n\tcreateSlotFill( SLOT_FILL_NAME );\n\nfunction GlobalStylesActionMenu() {\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:\n\t\t\t\t!! globalStyles?._links?.[ 'wp:action-edit-css' ] ?? false,\n\t\t};\n\t}, [] );\n\tconst { goTo } = useNavigator();\n\tconst loadCustomCSS = () => goTo( '/css' );\n\n\treturn (\n\t\t<GlobalStylesMenuFill>\n\t\t\t<DropdownMenu icon={ moreVertical } label={ __( 'More' ) }>\n\t\t\t\t{ ( { onClose } ) => (\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<MenuItem\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\ttoggle(\n\t\t\t\t\t\t\t\t\t'core/edit-site',\n\t\t\t\t\t\t\t\t\t'welcomeGuideStyles'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</GlobalStylesMenuFill>\n\t);\n}\n\nfunction RevisionsCountBadge( { className, children } ) {\n\treturn (\n\t\t<span\n\t\t\tclassName={ classnames(\n\t\t\t\tclassName,\n\t\t\t\t'edit-site-global-styles-sidebar__revisions-count-badge'\n\t\t\t) }\n\t\t>\n\t\t\t{ children }\n\t\t</span>\n\t);\n}\nfunction GlobalStylesRevisionsMenu() {\n\tconst { setIsListViewOpened } = useDispatch( editSiteStore );\n\tconst { revisionsCount } = 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\trevisionsCount:\n\t\t\t\tglobalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0,\n\t\t};\n\t}, [] );\n\tconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\n\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\tconst { goTo } = useNavigator();\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst loadRevisions = () => {\n\t\tsetIsListViewOpened( false );\n\t\tgoTo( '/revisions' );\n\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t};\n\tconst hasRevisions = revisionsCount >= 2;\n\n\treturn (\n\t\t<GlobalStylesMenuFill>\n\t\t\t{ canReset || hasRevisions ? (\n\t\t\t\t<DropdownMenu icon={ backup } label={ __( 'Revisions' ) }>\n\t\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t{ hasRevisions && (\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tonClick={ loadRevisions }\n\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t<RevisionsCountBadge>\n\t\t\t\t\t\t\t\t\t\t\t{ revisionsCount }\n\t\t\t\t\t\t\t\t\t\t</RevisionsCountBadge>\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{ __( 'Revision history' ) }\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\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonReset();\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\tdisabled={ ! canReset }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reset to defaults' ) }\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</DropdownMenu>\n\t\t\t) : (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={ __( 'Revisions' ) }\n\t\t\t\t\ticon={ backup }\n\t\t\t\t\tdisabled\n\t\t\t\t\t__experimentalIsFocusable\n\t\t\t\t/>\n\t\t\t) }\n\t\t</GlobalStylesMenuFill>\n\t);\n}\n\nfunction GlobalStylesNavigationScreen( { className, ...props } ) {\n\treturn (\n\t\t<NavigatorScreen\n\t\t\tclassName={ [\n\t\t\t\t'edit-site-global-styles-sidebar__navigator-screen',\n\t\t\t\tclassName,\n\t\t\t]\n\t\t\t\t.filter( Boolean )\n\t\t\t\t.join( ' ' ) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nfunction BlockStylesNavigationScreens( {\n\tparentMenu,\n\tblockStyles,\n\tblockName,\n} ) {\n\treturn blockStyles.map( ( style, index ) => (\n\t\t<GlobalStylesNavigationScreen\n\t\t\tkey={ index }\n\t\t\tpath={ parentMenu + '/variations/' + style.name }\n\t\t>\n\t\t\t<ScreenBlock name={ blockName } variation={ style.name } />\n\t\t</GlobalStylesNavigationScreen>\n\t) );\n}\n\nfunction ContextScreens( { name, parentMenu = '' } ) {\n\tconst blockStyleVariations = 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\n\treturn (\n\t\t<>\n\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\tpath={ parentMenu + '/colors/palette' }\n\t\t\t>\n\t\t\t\t<ScreenColorPalette name={ name } />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ !! blockStyleVariations?.length && (\n\t\t\t\t<BlockStylesNavigationScreens\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\tblockStyles={ blockStyleVariations }\n\t\t\t\t\tblockName={ name }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction GlobalStylesStyleBook() {\n\tconst navigator = useNavigator();\n\tconst { path } = navigator.location;\n\treturn (\n\t\t<StyleBook\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\t// Now go to the selected block.\n\t\t\t\tnavigator.goTo( '/blocks/' + encodeURIComponent( blockName ) );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction GlobalStylesBlockLink() {\n\tconst navigator = useNavigator();\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\tconst blockHasGlobalStyles = useBlockHasGlobalStyles( selectedBlockName );\n\t// When we're in the `Blocks` screen enable deep linking to the selected block.\n\tuseEffect( () => {\n\t\tif ( ! selectedBlockClientId || ! blockHasGlobalStyles ) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentPath = navigator.location.path;\n\t\tif (\n\t\t\tcurrentPath !== '/blocks' &&\n\t\t\t! currentPath.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 !== currentPath ) {\n\t\t\tnavigator.goTo( newPath, { skipFocus: true } );\n\t\t}\n\t}, [ selectedBlockClientId, selectedBlockName, blockHasGlobalStyles ] );\n}\n\nfunction GlobalStylesEditorCanvasContainerLink() {\n\tconst { goTo, location } = useNavigator();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\n\t// If the user switches the editor canvas container view, redirect\n\t// to the appropriate screen. This effectively allows deep linking to the\n\t// desired screens from outside the global styles navigation provider.\n\tuseEffect( () => {\n\t\tif ( editorCanvasContainerView === 'global-styles-revisions' ) {\n\t\t\t// Switching to the revisions container view should\n\t\t\t// redirect to the revisions screen.\n\t\t\tgoTo( '/revisions' );\n\t\t} else if (\n\t\t\t!! editorCanvasContainerView &&\n\t\t\tlocation?.path === '/revisions'\n\t\t) {\n\t\t\t// Switching to any container other than revisions should\n\t\t\t// redirect from the revisions screen to the root global styles screen.\n\t\t\tgoTo( '/' );\n\t\t} else if ( editorCanvasContainerView === 'global-styles-css' ) {\n\t\t\tgoTo( '/css' );\n\t\t}\n\n\t\t// location?.path is not a dependency because we don't want to track it.\n\t\t// Doing so will cause an infinite loop. We could abstract logic to avoid\n\t\t// having to disable the check later.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ editorCanvasContainerView, goTo ] );\n}\n\nfunction GlobalStylesUI() {\n\tconst blocks = getBlockTypes();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\treturn (\n\t\t<NavigatorProvider\n\t\t\tclassName=\"edit-site-global-styles-sidebar__navigator-provider\"\n\t\t\tinitialPath=\"/\"\n\t\t>\n\t\t\t<GlobalStylesNavigationScreen path=\"/\">\n\t\t\t\t<ScreenRoot />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/variations\">\n\t\t\t\t<ScreenStyleVariations />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/blocks\">\n\t\t\t\t<ScreenBlockList />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography\">\n\t\t\t\t<ScreenTypography />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/text\">\n\t\t\t\t<ScreenTypographyElement element=\"text\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/link\">\n\t\t\t\t<ScreenTypographyElement element=\"link\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/heading\">\n\t\t\t\t<ScreenTypographyElement element=\"heading\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/caption\">\n\t\t\t\t<ScreenTypographyElement element=\"caption\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/button\">\n\t\t\t\t<ScreenTypographyElement element=\"button\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/colors\">\n\t\t\t\t<ScreenColors />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/layout\">\n\t\t\t\t<ScreenLayout />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/css\">\n\t\t\t\t<ScreenCSS />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path={ '/revisions' }>\n\t\t\t\t<ScreenRevisions />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\t\tkey={ 'menu-block-' + block.name }\n\t\t\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t>\n\t\t\t\t\t<ScreenBlock name={ block.name } />\n\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t) ) }\n\n\t\t\t<ContextScreens />\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<ContextScreens\n\t\t\t\t\tkey={ 'screens-block-' + block.name }\n\t\t\t\t\tname={ block.name }\n\t\t\t\t\tparentMenu={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t/>\n\t\t\t) ) }\n\n\t\t\t{ 'style-book' === editorCanvasContainerView && (\n\t\t\t\t<GlobalStylesStyleBook />\n\t\t\t) }\n\n\t\t\t<GlobalStylesRevisionsMenu />\n\t\t\t<GlobalStylesActionMenu />\n\t\t\t<GlobalStylesBlockLink />\n\t\t\t<GlobalStylesEditorCanvasContainerLink />\n\t\t</NavigatorProvider>\n\t);\n}\nexport { GlobalStylesMenuSlot };\nexport default GlobalStylesUI;\n","/**\n * WordPress dependencies\n */\nimport { FlexItem, FlexBlock, Flex, Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { styles, seen } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport DefaultSidebar from './default-sidebar';\nimport { GlobalStylesUI } from '../global-styles';\nimport { store as editSiteStore } from '../../store';\nimport { GlobalStylesMenuSlot } from '../global-styles/ui';\nimport { unlock } from '../../lock-unlock';\n\nexport default function GlobalStylesSidebar() {\n\tconst {\n\t\tshouldClearCanvasContainerView,\n\t\tisStyleBookOpened,\n\t\tshowListViewByDefault,\n\t} = useSelect( ( select ) => {\n\t\tconst { getActiveComplementaryArea } = select( interfaceStore );\n\t\tconst { getEditorCanvasContainerView, getCanvasMode } = unlock(\n\t\t\tselect( editSiteStore )\n\t\t);\n\t\tconst _isVisualEditorMode =\n\t\t\t'visual' === select( editSiteStore ).getEditorMode();\n\t\tconst _isEditCanvasMode = 'edit' === getCanvasMode();\n\t\tconst _showListViewByDefault = select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\t'showListViewByDefault'\n\t\t);\n\n\t\treturn {\n\t\t\tisStyleBookOpened: 'style-book' === getEditorCanvasContainerView(),\n\t\t\tshouldClearCanvasContainerView:\n\t\t\t\t'edit-site/global-styles' !==\n\t\t\t\t\tgetActiveComplementaryArea( 'core/edit-site' ) ||\n\t\t\t\t! _isVisualEditorMode ||\n\t\t\t\t! _isEditCanvasMode,\n\t\t\tshowListViewByDefault: _showListViewByDefault,\n\t\t};\n\t}, [] );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\n\tuseEffect( () => {\n\t\tif ( shouldClearCanvasContainerView ) {\n\t\t\tsetEditorCanvasContainerView( undefined );\n\t\t}\n\t}, [ shouldClearCanvasContainerView ] );\n\n\tconst { setIsListViewOpened } = useDispatch( editSiteStore );\n\n\treturn (\n\t\t<DefaultSidebar\n\t\t\tclassName=\"edit-site-global-styles-sidebar\"\n\t\t\tidentifier=\"edit-site/global-styles\"\n\t\t\ttitle={ __( 'Styles' ) }\n\t\t\ticon={ styles }\n\t\t\tcloseLabel={ __( 'Close Styles' ) }\n\t\t\tpanelClassName=\"edit-site-global-styles-sidebar__panel\"\n\t\t\theader={\n\t\t\t\t<Flex\n\t\t\t\t\tclassName=\"edit-site-global-styles-sidebar__header\"\n\t\t\t\t\trole=\"menubar\"\n\t\t\t\t\taria-label={ __( 'Styles actions' ) }\n\t\t\t\t>\n\t\t\t\t\t<FlexBlock style={ { minWidth: 'min-content' } }>\n\t\t\t\t\t\t<strong>{ __( 'Styles' ) }</strong>\n\t\t\t\t\t</FlexBlock>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ticon={ seen }\n\t\t\t\t\t\t\tlabel={ __( 'Style Book' ) }\n\t\t\t\t\t\t\tisPressed={ isStyleBookOpened }\n\t\t\t\t\t\t\tdisabled={ shouldClearCanvasContainerView }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tsetIsListViewOpened(\n\t\t\t\t\t\t\t\t\tisStyleBookOpened && showListViewByDefault\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tsetEditorCanvasContainerView(\n\t\t\t\t\t\t\t\t\tisStyleBookOpened ? undefined : 'style-book'\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</FlexItem>\n\t\t\t\t\t<GlobalStylesMenuSlot />\n\t\t\t\t</Flex>\n\t\t\t}\n\t\t>\n\t\t\t<GlobalStylesUI />\n\t\t</DefaultSidebar>\n\t);\n}\n","export const SIDEBAR_TEMPLATE = 'edit-site/template';\nexport const SIDEBAR_BLOCK = 'edit-site/block-inspector';\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { STORE_NAME } from '../../../store/constants';\nimport { SIDEBAR_BLOCK, SIDEBAR_TEMPLATE } from '../constants';\nimport { store as editSiteStore } from '../../../store';\n\nconst entityLabels = {\n\twp_navigation: __( 'Navigation' ),\n\twp_block: __( 'Pattern' ),\n\twp_template: __( 'Template' ),\n};\n\nconst SettingsHeader = ( { sidebarName } ) => {\n\tconst { hasPageContentFocus, entityType } = useSelect( ( select ) => {\n\t\tconst { getEditedPostType, hasPageContentFocus: _hasPageContentFocus } =\n\t\t\tselect( editSiteStore );\n\n\t\treturn {\n\t\t\thasPageContentFocus: _hasPageContentFocus(),\n\t\t\tentityType: getEditedPostType(),\n\t\t};\n\t} );\n\n\tconst entityLabel = entityLabels[ entityType ] || entityLabels.wp_template;\n\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\tconst openTemplateSettings = () =>\n\t\tenableComplementaryArea( STORE_NAME, SIDEBAR_TEMPLATE );\n\tconst openBlockSettings = () =>\n\t\tenableComplementaryArea( STORE_NAME, SIDEBAR_BLOCK );\n\n\tlet templateAriaLabel;\n\tif ( hasPageContentFocus ) {\n\t\ttemplateAriaLabel =\n\t\t\tsidebarName === SIDEBAR_TEMPLATE\n\t\t\t\t? // translators: ARIA label for the Template sidebar tab, selected.\n\t\t\t\t  __( 'Page (selected)' )\n\t\t\t\t: // translators: ARIA label for the Template Settings Sidebar tab, not selected.\n\t\t\t\t  __( 'Page' );\n\t} else {\n\t\ttemplateAriaLabel =\n\t\t\tsidebarName === SIDEBAR_TEMPLATE\n\t\t\t\t? // translators: ARIA label for the Template sidebar tab, selected.\n\t\t\t\t  sprintf( __( '%s (selected)' ), entityLabel )\n\t\t\t\t: // translators: ARIA label for the Template Settings Sidebar tab, not selected.\n\t\t\t\t  entityLabel;\n\t}\n\n\t/* Use a list so screen readers will announce how many tabs there are. */\n\treturn (\n\t\t<ul>\n\t\t\t<li>\n\t\t\t\t<Button\n\t\t\t\t\tonClick={ openTemplateSettings }\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'edit-site-sidebar-edit-mode__panel-tab',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'is-active': sidebarName === SIDEBAR_TEMPLATE,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t\taria-label={ templateAriaLabel }\n\t\t\t\t\tdata-label={\n\t\t\t\t\t\thasPageContentFocus ? __( 'Page' ) : entityLabel\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t{ hasPageContentFocus ? __( 'Page' ) : entityLabel }\n\t\t\t\t</Button>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<Button\n\t\t\t\t\tonClick={ openBlockSettings }\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'edit-site-sidebar-edit-mode__panel-tab',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'is-active': sidebarName === SIDEBAR_BLOCK,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t\taria-label={\n\t\t\t\t\t\tsidebarName === SIDEBAR_BLOCK\n\t\t\t\t\t\t\t? // translators: ARIA label for the Block Settings Sidebar tab, selected.\n\t\t\t\t\t\t\t  __( 'Block (selected)' )\n\t\t\t\t\t\t\t: // translators: ARIA label for the Block Settings Sidebar tab, not selected.\n\t\t\t\t\t\t\t  __( 'Block' )\n\t\t\t\t\t}\n\t\t\t\t\tdata-label={ __( 'Block' ) }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Block' ) }\n\t\t\t\t</Button>\n\t\t\t</li>\n\t\t</ul>\n\t);\n};\n\nexport default SettingsHeader;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Icon } from '@wordpress/components';\n\nexport default function SidebarCard( {\n\tclassName,\n\ttitle,\n\ticon,\n\tdescription,\n\tactions,\n\tchildren,\n} ) {\n\treturn (\n\t\t<div className={ classnames( 'edit-site-sidebar-card', className ) }>\n\t\t\t<Icon className=\"edit-site-sidebar-card__icon\" icon={ icon } />\n\t\t\t<div className=\"edit-site-sidebar-card__content\">\n\t\t\t\t<div className=\"edit-site-sidebar-card__header\">\n\t\t\t\t\t<h2 className=\"edit-site-sidebar-card__title\">{ title }</h2>\n\t\t\t\t\t{ actions }\n\t\t\t\t</div>\n\t\t\t\t<div className=\"edit-site-sidebar-card__description\">\n\t\t\t\t\t{ description }\n\t\t\t\t</div>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","export const PAGE_CONTENT_BLOCK_TYPES = [\n\t'core/post-title',\n\t'core/post-featured-image',\n\t'core/post-content',\n];\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { PAGE_CONTENT_BLOCK_TYPES } from '../../page-content-focus-manager/constants';\nimport { unlock } from '../../../lock-unlock';\n\nconst { BlockQuickNavigation } = unlock( blockEditorPrivateApis );\n\nexport default function PageContent() {\n\tconst clientIds = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blockEditorStore ).__experimentalGetGlobalBlocksByName(\n\t\t\t\tPAGE_CONTENT_BLOCK_TYPES\n\t\t\t),\n\t\t[]\n\t);\n\treturn <BlockQuickNavigation clientIds={ clientIds } />;\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tBaseControl,\n\tToggleControl,\n\tDropdown,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tTextControl,\n\tRadioControl,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { useState, useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\n/**\n * Internal dependencies\n */\nimport StatusLabel from '../../sidebar-navigation-screen-page/status-label';\n\nconst STATUS_OPTIONS = [\n\t{\n\t\tlabel: (\n\t\t\t<>\n\t\t\t\t{ __( 'Draft' ) }\n\t\t\t\t<Text variant=\"muted\">{ __( 'Not ready to publish.' ) }</Text>\n\t\t\t</>\n\t\t),\n\t\tvalue: 'draft',\n\t},\n\t{\n\t\tlabel: (\n\t\t\t<>\n\t\t\t\t{ __( 'Pending' ) }\n\t\t\t\t<Text variant=\"muted\">\n\t\t\t\t\t{ __( 'Waiting for review before publishing.' ) }\n\t\t\t\t</Text>\n\t\t\t</>\n\t\t),\n\t\tvalue: 'pending',\n\t},\n\t{\n\t\tlabel: (\n\t\t\t<>\n\t\t\t\t{ __( 'Private' ) }\n\t\t\t\t<Text variant=\"muted\">\n\t\t\t\t\t{ __( 'Only visible to site admins and editors.' ) }\n\t\t\t\t</Text>\n\t\t\t</>\n\t\t),\n\t\tvalue: 'private',\n\t},\n\t{\n\t\tlabel: (\n\t\t\t<>\n\t\t\t\t{ __( 'Scheduled' ) }\n\t\t\t\t<Text variant=\"muted\">\n\t\t\t\t\t{ __( 'Publish automatically on a chosen date.' ) }\n\t\t\t\t</Text>\n\t\t\t</>\n\t\t),\n\t\tvalue: 'future',\n\t},\n\t{\n\t\tlabel: (\n\t\t\t<>\n\t\t\t\t{ __( 'Published' ) }\n\t\t\t\t<Text variant=\"muted\">{ __( 'Visible to everyone.' ) }</Text>\n\t\t\t</>\n\t\t),\n\t\tvalue: 'publish',\n\t},\n];\n\nexport default function PageStatus( {\n\tpostType,\n\tpostId,\n\tstatus,\n\tpassword,\n\tdate,\n} ) {\n\tconst [ showPassword, setShowPassword ] = useState( !! password );\n\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst { createErrorNotice } = useDispatch( noticesStore );\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\t'aria-label': __( 'Change status' ),\n\t\t\tplacement: 'bottom-end',\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tconst saveStatus = async ( {\n\t\tstatus: newStatus = status,\n\t\tpassword: newPassword = password,\n\t\tdate: newDate = date,\n\t} ) => {\n\t\ttry {\n\t\t\tawait editEntityRecord( 'postType', postType, postId, {\n\t\t\t\tstatus: newStatus,\n\t\t\t\tdate: newDate,\n\t\t\t\tpassword: newPassword,\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 updating the status' );\n\n\t\t\tcreateErrorNotice( errorMessage, {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t}\n\t};\n\n\tconst handleTogglePassword = ( value ) => {\n\t\tsetShowPassword( value );\n\t\tif ( ! value ) {\n\t\t\tsaveStatus( { password: '' } );\n\t\t}\n\t};\n\n\tconst handleStatus = ( value ) => {\n\t\tlet newDate = date;\n\t\tlet newPassword = password;\n\t\tif ( value === 'publish' ) {\n\t\t\tif ( new Date( date ) > new Date() ) {\n\t\t\t\tnewDate = null;\n\t\t\t}\n\t\t} else if ( value === 'future' ) {\n\t\t\tif ( ! date || new Date( date ) < new Date() ) {\n\t\t\t\tnewDate = new Date();\n\t\t\t\tnewDate.setDate( newDate.getDate() + 7 );\n\t\t\t}\n\t\t} else if ( value === 'private' && password ) {\n\t\t\tsetShowPassword( false );\n\t\t\tnewPassword = '';\n\t\t}\n\t\tsaveStatus( {\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<HStack className=\"edit-site-summary-field\">\n\t\t\t<Text className=\"edit-site-summary-field__label\">\n\t\t\t\t{ __( 'Status' ) }\n\t\t\t</Text>\n\t\t\t<Dropdown\n\t\t\t\tcontentClassName=\"edit-site-change-status__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\tclassName=\"edit-site-summary-field__trigger\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t>\n\t\t\t\t\t\t<StatusLabel\n\t\t\t\t\t\t\tstatus={ password ? 'protected' : status }\n\t\t\t\t\t\t/>\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={ __( 'Status' ) }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<form>\n\t\t\t\t\t\t\t<VStack spacing={ 5 }>\n\t\t\t\t\t\t\t\t<RadioControl\n\t\t\t\t\t\t\t\t\tclassName=\"edit-site-change-status__options\"\n\t\t\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Status' ) }\n\t\t\t\t\t\t\t\t\toptions={ STATUS_OPTIONS }\n\t\t\t\t\t\t\t\t\tonChange={ handleStatus }\n\t\t\t\t\t\t\t\t\tselected={ status }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t{ status !== 'private' && (\n\t\t\t\t\t\t\t\t\t<BaseControl\n\t\t\t\t\t\t\t\t\t\tid={ `edit-site-change-status__password` }\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Password' ) }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<ToggleControl\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'Hide this page behind a password'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\tchecked={ showPassword }\n\t\t\t\t\t\t\t\t\t\t\tonChange={ handleTogglePassword }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t{ showPassword && (\n\t\t\t\t\t\t\t\t\t\t\t<TextControl\n\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\tsaveStatus( {\n\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} )\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={ password }\n\t\t\t\t\t\t\t\t\t\t\t\t/* eslint-disable jsx-a11y/no-autofocus */\n\t\t\t\t\t\t\t\t\t\t\t\tautoFocus={ ! password }\n\t\t\t\t\t\t\t\t\t\t\t\t/* eslint-enable jsx-a11y/no-autofocus */\n\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'Enter a secure 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\ttype=\"password\"\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</BaseControl>\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</form>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t/>\n\t\t</HStack>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tDropdown,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { useState, useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { __experimentalPublishDateTimePicker as PublishDateTimePicker } from '@wordpress/block-editor';\nimport { humanTimeDiff } from '@wordpress/date';\n\nexport default function ChangeStatus( { postType, postId, status, date } ) {\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst { createErrorNotice } = useDispatch( noticesStore );\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\t'aria-label': __( 'Change publish date' ),\n\t\t\tplacement: 'bottom-end',\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tconst saveDate = async ( newDate ) => {\n\t\ttry {\n\t\t\tlet newStatus = status;\n\t\t\tif ( status === 'future' && new Date( newDate ) < new Date() ) {\n\t\t\t\tnewStatus = 'publish';\n\t\t\t} else if (\n\t\t\t\tstatus === 'publish' &&\n\t\t\t\tnew Date( newDate ) > new Date()\n\t\t\t) {\n\t\t\t\tnewStatus = 'future';\n\t\t\t}\n\t\t\tawait editEntityRecord( 'postType', postType, postId, {\n\t\t\t\tstatus: newStatus,\n\t\t\t\tdate: newDate,\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 updating the status' );\n\n\t\t\tcreateErrorNotice( errorMessage, {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t}\n\t};\n\n\tconst relateToNow = date ? humanTimeDiff( date ) : __( 'Immediately' );\n\n\treturn (\n\t\t<HStack className=\"edit-site-summary-field\">\n\t\t\t<Text className=\"edit-site-summary-field__label\">\n\t\t\t\t{ __( 'Publish' ) }\n\t\t\t</Text>\n\t\t\t<Dropdown\n\t\t\t\tcontentClassName=\"edit-site-change-status__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\tclassName=\"edit-site-summary-field__trigger\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ relateToNow }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t<PublishDateTimePicker\n\t\t\t\t\t\tcurrentDate={ date }\n\t\t\t\t\t\tis12Hour\n\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\tonChange={ saveDate }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t/>\n\t\t</HStack>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __experimentalVStack as VStack } from '@wordpress/components';\n/**\n * Internal dependencies\n */\nimport PageStatus from './page-status';\nimport PublishDate from './publish-date';\n\nexport default function PageSummary( {\n\tstatus,\n\tdate,\n\tpassword,\n\tpostId,\n\tpostType,\n} ) {\n\treturn (\n\t\t<VStack>\n\t\t\t<PageStatus\n\t\t\t\tstatus={ status }\n\t\t\t\tdate={ date }\n\t\t\t\tpassword={ password }\n\t\t\t\tpostId={ postId }\n\t\t\t\tpostType={ postType }\n\t\t\t/>\n\t\t\t<PublishDate\n\t\t\t\tstatus={ status }\n\t\t\t\tdate={ date }\n\t\t\t\tpostId={ postId }\n\t\t\t\tpostType={ postType }\n\t\t\t/>\n\t\t</VStack>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { BlockContextProvider, BlockPreview } from '@wordpress/block-editor';\nimport { Button, __experimentalVStack as VStack } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../../store';\n\nexport default function EditTemplate() {\n\tconst { context, hasResolved, title, blocks } = useSelect( ( select ) => {\n\t\tconst { getEditedPostContext, getEditedPostType, getEditedPostId } =\n\t\t\tselect( editSiteStore );\n\t\tconst { getEditedEntityRecord, hasFinishedResolution } =\n\t\t\tselect( coreStore );\n\t\tconst _context = getEditedPostContext();\n\t\tconst queryArgs = [\n\t\t\t'postType',\n\t\t\tgetEditedPostType(),\n\t\t\tgetEditedPostId(),\n\t\t];\n\t\tconst template = getEditedEntityRecord( ...queryArgs );\n\t\treturn {\n\t\t\tcontext: _context,\n\t\t\thasResolved: hasFinishedResolution(\n\t\t\t\t'getEditedEntityRecord',\n\t\t\t\tqueryArgs\n\t\t\t),\n\t\t\ttitle: template?.title,\n\t\t\tblocks: template?.blocks,\n\t\t};\n\t}, [] );\n\n\tconst { setHasPageContentFocus } = useDispatch( editSiteStore );\n\n\tconst blockContext = useMemo(\n\t\t() => ( { ...context, postType: null, postId: null } ),\n\t\t[ context ]\n\t);\n\n\tif ( ! hasResolved ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack>\n\t\t\t<div>{ decodeEntities( title ) }</div>\n\t\t\t<div className=\"edit-site-page-panels__edit-template-preview\">\n\t\t\t\t<BlockContextProvider value={ blockContext }>\n\t\t\t\t\t<BlockPreview viewportWidth={ 1024 } blocks={ blocks } />\n\t\t\t\t</BlockContextProvider>\n\t\t\t</div>\n\t\t\t<Button\n\t\t\t\tclassName=\"edit-site-page-panels__edit-template-button\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tonClick={ () => setHasPageContentFocus( false ) }\n\t\t\t>\n\t\t\t\t{ __( 'Edit template' ) }\n\t\t\t</Button>\n\t\t</VStack>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tPanelBody,\n\t__experimentalText as Text,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { page as pageIcon } from '@wordpress/icons';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { humanTimeDiff } from '@wordpress/date';\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 editSiteStore } from '../../../store';\nimport SidebarCard from '../sidebar-card';\nimport PageContent from './page-content';\nimport PageSummary from './page-summary';\nimport EditTemplate from './edit-template';\n\nexport default function PagePanels() {\n\tconst { id, type, hasResolved, status, date, password, title, modified } =\n\t\tuseSelect( ( select ) => {\n\t\t\tconst { getEditedPostContext } = select( editSiteStore );\n\t\t\tconst { getEditedEntityRecord, hasFinishedResolution } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst context = getEditedPostContext();\n\t\t\tconst queryArgs = [ 'postType', context.postType, context.postId ];\n\t\t\tconst page = getEditedEntityRecord( ...queryArgs );\n\t\t\treturn {\n\t\t\t\thasResolved: hasFinishedResolution(\n\t\t\t\t\t'getEditedEntityRecord',\n\t\t\t\t\tqueryArgs\n\t\t\t\t),\n\t\t\t\ttitle: page?.title,\n\t\t\t\tid: page?.id,\n\t\t\t\ttype: page?.type,\n\t\t\t\tstatus: page?.status,\n\t\t\t\tdate: page?.date,\n\t\t\t\tpassword: page?.password,\n\t\t\t\tmodified: page?.modified,\n\t\t\t};\n\t\t}, [] );\n\n\tif ( ! hasResolved ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<PanelBody>\n\t\t\t\t<SidebarCard\n\t\t\t\t\ttitle={ decodeEntities( title ) }\n\t\t\t\t\ticon={ pageIcon }\n\t\t\t\t\tdescription={\n\t\t\t\t\t\t<VStack>\n\t\t\t\t\t\t\t<Text>\n\t\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t\t// translators: %s: Human-readable time difference, e.g. \"2 days ago\".\n\t\t\t\t\t\t\t\t\t__( 'Last edited %s' ),\n\t\t\t\t\t\t\t\t\thumanTimeDiff( modified )\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</VStack>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t\t<PanelBody title={ __( 'Summary' ) }>\n\t\t\t\t<PageSummary\n\t\t\t\t\tstatus={ status }\n\t\t\t\t\tdate={ date }\n\t\t\t\t\tpassword={ password }\n\t\t\t\t\tpostId={ id }\n\t\t\t\t\tpostType={ type }\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t\t<PanelBody title={ __( 'Content' ) }>\n\t\t\t\t<PageContent />\n\t\t\t</PanelBody>\n\t\t\t<PanelBody title={ __( 'Template' ) }>\n\t\t\t\t<EditTemplate />\n\t\t\t</PanelBody>\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components';\nimport { moreVertical } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../../store';\nimport isTemplateRevertable from '../../../utils/is-template-revertable';\n\nexport default function Actions( { template } ) {\n\tconst { revertTemplate } = useDispatch( editSiteStore );\n\tconst isRevertable = isTemplateRevertable( template );\n\tif ( ! isRevertable ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<DropdownMenu\n\t\t\ticon={ moreVertical }\n\t\t\tlabel={ __( 'Actions' ) }\n\t\t\tclassName=\"edit-site-template-card__actions\"\n\t\t\ttoggleProps={ { isSmall: true } }\n\t\t>\n\t\t\t{ ( { onClose } ) => (\n\t\t\t\t<MenuGroup>\n\t\t\t\t\t<MenuItem\n\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t'Use the template as supplied by the theme.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\trevertTemplate( template );\n\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Clear customizations' ) }\n\t\t\t\t\t</MenuItem>\n\t\t\t\t</MenuGroup>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tButton,\n\t__experimentalHeading as Heading,\n} from '@wordpress/components';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../../store';\n\nfunction TemplateAreaItem( { area, clientId } ) {\n\tconst { selectBlock, toggleBlockHighlight } =\n\t\tuseDispatch( blockEditorStore );\n\tconst templatePartArea = useSelect(\n\t\t( select ) => {\n\t\t\tconst defaultAreas =\n\t\t\t\tselect(\n\t\t\t\t\teditorStore\n\t\t\t\t).__experimentalGetDefaultTemplatePartAreas();\n\n\t\t\treturn defaultAreas.find(\n\t\t\t\t( defaultArea ) => defaultArea.area === area\n\t\t\t);\n\t\t},\n\t\t[ area ]\n\t);\n\n\tconst highlightBlock = () => toggleBlockHighlight( clientId, true );\n\tconst cancelHighlightBlock = () => toggleBlockHighlight( clientId, false );\n\n\treturn (\n\t\t<Button\n\t\t\tclassName=\"edit-site-template-card__template-areas-item\"\n\t\t\ticon={ templatePartArea?.icon }\n\t\t\tonMouseOver={ highlightBlock }\n\t\t\tonMouseLeave={ cancelHighlightBlock }\n\t\t\tonFocus={ highlightBlock }\n\t\t\tonBlur={ cancelHighlightBlock }\n\t\t\tonClick={ () => {\n\t\t\t\tselectBlock( clientId );\n\t\t\t} }\n\t\t>\n\t\t\t{ templatePartArea?.label }\n\t\t</Button>\n\t);\n}\n\nexport default function TemplateAreas() {\n\tconst templateParts = useSelect(\n\t\t( select ) => select( editSiteStore ).getCurrentTemplateTemplateParts(),\n\t\t[]\n\t);\n\n\tif ( ! templateParts.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<section className=\"edit-site-template-card__template-areas\">\n\t\t\t<Heading\n\t\t\t\tlevel={ 3 }\n\t\t\t\tclassName=\"edit-site-template-card__template-areas-title\"\n\t\t\t>\n\t\t\t\t{ __( 'Areas' ) }\n\t\t\t</Heading>\n\n\t\t\t<ul className=\"edit-site-template-card__template-areas-list\">\n\t\t\t\t{ templateParts.map( ( { templatePart, block } ) => (\n\t\t\t\t\t<li key={ templatePart.slug }>\n\t\t\t\t\t\t<TemplateAreaItem\n\t\t\t\t\t\t\tarea={ templatePart.area }\n\t\t\t\t\t\t\tclientId={ block.clientId }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</li>\n\t\t\t\t) ) }\n\t\t\t</ul>\n\t\t</section>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { sprintf, _n } from '@wordpress/i18n';\nimport { backup } from '@wordpress/icons';\nimport { addQueryArgs } from '@wordpress/url';\nimport { PostTypeSupportCheck } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport useEditedEntityRecord from '../../use-edited-entity-record';\n\nconst useRevisionData = () => {\n\tconst { record: currentTemplate } = useEditedEntityRecord();\n\n\tconst lastRevisionId =\n\t\tcurrentTemplate?._links?.[ 'predecessor-version' ]?.[ 0 ]?.id ?? null;\n\n\tconst revisionsCount =\n\t\tcurrentTemplate?._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0;\n\n\treturn {\n\t\tcurrentTemplate,\n\t\tlastRevisionId,\n\t\trevisionsCount,\n\t};\n};\n\nfunction PostLastRevisionCheck( { children } ) {\n\tconst { lastRevisionId, revisionsCount } = useRevisionData();\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\nconst PostLastRevision = () => {\n\tconst { lastRevisionId, revisionsCount } = useRevisionData();\n\n\treturn (\n\t\t<PostLastRevisionCheck>\n\t\t\t<Button\n\t\t\t\thref={ addQueryArgs( 'revision.php', {\n\t\t\t\t\trevision: lastRevisionId,\n\t\t\t\t\tgutenberg: true,\n\t\t\t\t} ) }\n\t\t\t\tclassName=\"edit-site-template-last-revision__title\"\n\t\t\t\ticon={ backup }\n\t\t\t>\n\t\t\t\t{ sprintf(\n\t\t\t\t\t/* translators: %d: number of revisions */\n\t\t\t\t\t_n( '%d Revision', '%d Revisions', revisionsCount ),\n\t\t\t\t\trevisionsCount\n\t\t\t\t) }\n\t\t\t</Button>\n\t\t</PostLastRevisionCheck>\n\t);\n};\n\nexport default function LastRevision() {\n\treturn (\n\t\t<PostLastRevisionCheck>\n\t\t\t<PostLastRevision />\n\t\t</PostLastRevisionCheck>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { PanelRow, PanelBody } from '@wordpress/components';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __ } from '@wordpress/i18n';\nimport { navigation as navigationIcon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../../store';\nimport TemplateActions from './template-actions';\nimport TemplateAreas from './template-areas';\nimport LastRevision from './last-revision';\nimport SidebarCard from '../sidebar-card';\n\nexport default function TemplatePanel() {\n\tconst {\n\t\tinfo: { title, description, icon },\n\t\trecord,\n\t} = useSelect( ( select ) => {\n\t\tconst { getEditedPostType, getEditedPostId } = select( editSiteStore );\n\t\tconst { getEditedEntityRecord } = select( coreStore );\n\t\tconst { __experimentalGetTemplateInfo: getTemplateInfo } =\n\t\t\tselect( editorStore );\n\n\t\tconst postType = getEditedPostType();\n\t\tconst postId = getEditedPostId();\n\t\tconst _record = getEditedEntityRecord( 'postType', postType, postId );\n\n\t\tconst info = _record ? getTemplateInfo( _record ) : {};\n\n\t\treturn { info, record: _record };\n\t}, [] );\n\n\tif ( ! title && ! description ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody className=\"edit-site-template-panel\">\n\t\t\t<SidebarCard\n\t\t\t\tclassName=\"edit-site-template-card\"\n\t\t\t\ttitle={ decodeEntities( title ) }\n\t\t\t\ticon={\n\t\t\t\t\trecord?.type === 'wp_navigation' ? navigationIcon : icon\n\t\t\t\t}\n\t\t\t\tdescription={ decodeEntities( description ) }\n\t\t\t\tactions={ <TemplateActions template={ record } /> }\n\t\t\t>\n\t\t\t\t<TemplateAreas />\n\t\t\t</SidebarCard>\n\t\t\t<PanelRow\n\t\t\t\theader={ __( 'Editing history' ) }\n\t\t\t\tclassName=\"edit-site-template-revisions\"\n\t\t\t>\n\t\t\t\t<LastRevision />\n\t\t\t</PanelRow>\n\t\t</PanelBody>\n\t);\n}\n","/**\n * Defines an extensibility slot for the Template sidebar.\n */\n\n/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\nconst { Fill, Slot } = createSlotFill( 'PluginTemplateSettingPanel' );\n\nconst PluginTemplateSettingPanel = Fill;\nPluginTemplateSettingPanel.Slot = Slot;\n\n/**\n * Renders items in the Template Sidebar below the main information\n * like the Template Card.\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { PluginTemplateSettingPanel } from '@wordpress/edit-site';\n *\n * const MyTemplateSettingTest = () => (\n * \t\t<PluginTemplateSettingPanel>\n *\t\t\t<p>Hello, World!</p>\n *\t\t</PluginTemplateSettingPanel>\n *\t);\n * ```\n *\n * @return {WPComponent} The component to be rendered.\n */\nexport default PluginTemplateSettingPanel;\n","/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { drawerLeft, drawerRight } from '@wordpress/icons';\nimport { useEffect } from '@wordpress/element';\nimport { useSelect, useDispatch } 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 DefaultSidebar from './default-sidebar';\nimport GlobalStylesSidebar from './global-styles-sidebar';\nimport { STORE_NAME } from '../../store/constants';\nimport SettingsHeader from './settings-header';\nimport PagePanels from './page-panels';\nimport TemplatePanel from './template-panel';\nimport PluginTemplateSettingPanel from '../plugin-template-setting-panel';\nimport { SIDEBAR_BLOCK, SIDEBAR_TEMPLATE } from './constants';\nimport { store as editSiteStore } from '../../store';\n\nconst { Slot: InspectorSlot, Fill: InspectorFill } = createSlotFill(\n\t'EditSiteSidebarInspector'\n);\nexport const SidebarInspectorFill = InspectorFill;\n\nexport function SidebarComplementaryAreaFills() {\n\tconst {\n\t\tsidebar,\n\t\tisEditorSidebarOpened,\n\t\thasBlockSelection,\n\t\tsupportsGlobalStyles,\n\t\thasPageContentFocus,\n\t} = useSelect( ( select ) => {\n\t\tconst _sidebar =\n\t\t\tselect( interfaceStore ).getActiveComplementaryArea( STORE_NAME );\n\t\tconst _isEditorSidebarOpened = [\n\t\t\tSIDEBAR_BLOCK,\n\t\t\tSIDEBAR_TEMPLATE,\n\t\t].includes( _sidebar );\n\t\tconst settings = select( editSiteStore ).getSettings();\n\t\treturn {\n\t\t\tsidebar: _sidebar,\n\t\t\tisEditorSidebarOpened: _isEditorSidebarOpened,\n\t\t\thasBlockSelection:\n\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\tsupportsGlobalStyles: ! settings?.supportsTemplatePartsMode,\n\t\t\thasPageContentFocus: select( editSiteStore ).hasPageContentFocus(),\n\t\t};\n\t}, [] );\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\n\tuseEffect( () => {\n\t\t// Don't automatically switch tab when the sidebar is closed or when we\n\t\t// are focused on page content.\n\t\tif ( ! isEditorSidebarOpened ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( hasBlockSelection ) {\n\t\t\tif ( ! hasPageContentFocus ) {\n\t\t\t\tenableComplementaryArea( STORE_NAME, SIDEBAR_BLOCK );\n\t\t\t}\n\t\t} else {\n\t\t\tenableComplementaryArea( STORE_NAME, SIDEBAR_TEMPLATE );\n\t\t}\n\t}, [ hasBlockSelection, isEditorSidebarOpened, hasPageContentFocus ] );\n\n\tlet sidebarName = sidebar;\n\tif ( ! isEditorSidebarOpened ) {\n\t\tsidebarName = hasBlockSelection ? SIDEBAR_BLOCK : SIDEBAR_TEMPLATE;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<DefaultSidebar\n\t\t\t\tidentifier={ sidebarName }\n\t\t\t\ttitle={ __( 'Settings' ) }\n\t\t\t\ticon={ isRTL() ? drawerLeft : drawerRight }\n\t\t\t\tcloseLabel={ __( 'Close Settings' ) }\n\t\t\t\theader={ <SettingsHeader sidebarName={ sidebarName } /> }\n\t\t\t\theaderClassName=\"edit-site-sidebar-edit-mode__panel-tabs\"\n\t\t\t>\n\t\t\t\t{ sidebarName === SIDEBAR_TEMPLATE && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ hasPageContentFocus ? (\n\t\t\t\t\t\t\t<PagePanels />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<TemplatePanel />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<PluginTemplateSettingPanel.Slot />\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t\t{ sidebarName === SIDEBAR_BLOCK && (\n\t\t\t\t\t<InspectorSlot bubblesVirtually />\n\t\t\t\t) }\n\t\t\t</DefaultSidebar>\n\t\t\t{ supportsGlobalStyles && <GlobalStylesSidebar /> }\n\t\t</>\n\t);\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"reusableBlocks\"];","/**\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 blocks from template part' ) }\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';\n\n/**\n * Internal dependencies\n */\nimport CreateTemplatePartModal from '../create-template-part-modal';\nimport { store as editSiteStore } from '../../store';\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 { canCreate } = useSelect( ( select ) => {\n\t\tconst { supportsTemplatePartsMode } =\n\t\t\tselect( editSiteStore ).getSettings();\n\t\treturn {\n\t\t\tcanCreate: ! supportsTemplatePartsMode,\n\t\t};\n\t}, [] );\n\n\tif ( ! 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>\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 { 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 TemplatePartConverter() {\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\tselect( blockEditorStore ).getBlocksByClientId( clientIds ),\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 { SVG, Path } from '@wordpress/primitives';\n\nconst arrowLeft = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z\" />\n\t</SVG>\n);\n\nexport default arrowLeft;\n","/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { arrowLeft } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nfunction BackButton() {\n\tconst location = useLocation();\n\tconst history = useHistory();\n\tconst isTemplatePart = location.params.postType === 'wp_template_part';\n\tconst isNavigationMenu = location.params.postType === 'wp_navigation';\n\tconst previousTemplateId = location.state?.fromTemplateId;\n\n\tconst isFocusMode = isTemplatePart || isNavigationMenu;\n\n\tif ( ! isFocusMode || ! previousTemplateId ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Button\n\t\t\tclassName=\"edit-site-visual-editor__back-button\"\n\t\t\ticon={ arrowLeft }\n\t\t\tonClick={ () => {\n\t\t\t\thistory.back();\n\t\t\t} }\n\t\t>\n\t\t\t{ __( 'Back' ) }\n\t\t</Button>\n\t);\n}\n\nexport default BackButton;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalUseResizeCanvas as useResizeCanvas,\n\t__unstableEditorStyles as EditorStyles,\n\t__unstableIframe as Iframe,\n\t__unstableUseMouseMoveTypingReset as useMouseMoveTypingReset,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { ENTER, SPACE } from '@wordpress/keycodes';\nimport { useState, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nfunction EditorCanvas( { enableResizing, settings, children, ...props } ) {\n\tconst { canvasMode, deviceType, isZoomOutMode } = useSelect(\n\t\t( select ) => ( {\n\t\t\tdeviceType:\n\t\t\t\tselect( editSiteStore ).__experimentalGetPreviewDeviceType(),\n\t\t\tisZoomOutMode:\n\t\t\t\tselect( blockEditorStore ).__unstableGetEditorMode() ===\n\t\t\t\t'zoom-out',\n\t\t\tcanvasMode: unlock( select( editSiteStore ) ).getCanvasMode(),\n\t\t} ),\n\t\t[]\n\t);\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\tconst deviceStyles = useResizeCanvas( deviceType );\n\tconst mouseMoveTypingRef = useMouseMoveTypingReset();\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\n\tuseEffect( () => {\n\t\tif ( canvasMode === 'edit' ) {\n\t\t\tsetIsFocused( false );\n\t\t}\n\t}, [ canvasMode ] );\n\n\tconst viewModeProps = {\n\t\t'aria-label': __( 'Editor Canvas' ),\n\t\trole: 'button',\n\t\ttabIndex: 0,\n\t\tonFocus: () => setIsFocused( true ),\n\t\tonBlur: () => setIsFocused( false ),\n\t\tonKeyDown: ( event ) => {\n\t\t\tconst { keyCode } = event;\n\t\t\tif ( keyCode === ENTER || keyCode === SPACE ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t}\n\t\t},\n\t\tonClick: () => setCanvasMode( 'edit' ),\n\t\treadonly: true,\n\t};\n\n\treturn (\n\t\t<Iframe\n\t\t\texpand={ isZoomOutMode }\n\t\t\tscale={ ( isZoomOutMode && 0.45 ) || undefined }\n\t\t\tframeSize={ isZoomOutMode ? 100 : undefined }\n\t\t\tstyle={ enableResizing ? {} : deviceStyles }\n\t\t\tref={ mouseMoveTypingRef }\n\t\t\tname=\"editor-canvas\"\n\t\t\tclassName={ classnames( 'edit-site-visual-editor__editor-canvas', {\n\t\t\t\t'is-focused': isFocused && canvasMode === 'view',\n\t\t\t} ) }\n\t\t\t{ ...props }\n\t\t\t{ ...( canvasMode === 'view' ? viewModeProps : {} ) }\n\t\t>\n\t\t\t<EditorStyles styles={ settings.styles } />\n\t\t\t<style>{\n\t\t\t\t// Forming a \"block formatting context\" to prevent margin collapsing.\n\t\t\t\t// @see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context\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}}body{position:relative; ${\n\t\t\t\t\tcanvasMode === 'view'\n\t\t\t\t\t\t? 'cursor: pointer; height: 100vh'\n\t\t\t\t\t\t: ''\n\t\t\t\t}}}`\n\t\t\t}</style>\n\t\t\t{ children }\n\t\t</Iframe>\n\t);\n}\n\nexport default EditorCanvas;\n","/**\n * The `edit-site` settings here need to be in sync with the corresponding ones in `site-editor` package.\n * See `packages/edit-site/src/components/block-editor/inserter-media-categories.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; %2s: 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>/ %3$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 ).getMediaItems( {\n\t\t...query,\n\t\torderBy: !! query?.search ? 'relevance' : 'date',\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(\n\t\t\t\t'https://api.openverse.engineering/v1/images/'\n\t\t\t);\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","/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport inserterMediaCategories from './inserter-media-categories';\n\nexport default function useSiteEditorSettings( templateType ) {\n\tconst { setIsInserterOpened } = useDispatch( editSiteStore );\n\tconst { storedSettings, canvasMode } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSettings, getCanvasMode } = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tstoredSettings: getSettings( setIsInserterOpened ),\n\t\t\t\tcanvasMode: getCanvasMode(),\n\t\t\t};\n\t\t},\n\t\t[ setIsInserterOpened ]\n\t);\n\n\tconst settingsBlockPatterns =\n\t\tstoredSettings.__experimentalAdditionalBlockPatterns ?? // WP 6.0\n\t\tstoredSettings.__experimentalBlockPatterns; // WP 5.9\n\tconst settingsBlockPatternCategories =\n\t\tstoredSettings.__experimentalAdditionalBlockPatternCategories ?? // WP 6.0\n\t\tstoredSettings.__experimentalBlockPatternCategories; // WP 5.9\n\n\tconst { restBlockPatterns, restBlockPatternCategories } = useSelect(\n\t\t( select ) => ( {\n\t\t\trestBlockPatterns: select( coreStore ).getBlockPatterns(),\n\t\t\trestBlockPatternCategories:\n\t\t\t\tselect( coreStore ).getBlockPatternCategories(),\n\t\t} ),\n\t\t[]\n\t);\n\tconst blockPatterns = useMemo(\n\t\t() =>\n\t\t\t[\n\t\t\t\t...( settingsBlockPatterns || [] ),\n\t\t\t\t...( restBlockPatterns || [] ),\n\t\t\t]\n\t\t\t\t.filter(\n\t\t\t\t\t( x, index, arr ) =>\n\t\t\t\t\t\tindex === arr.findIndex( ( y ) => x.name === y.name )\n\t\t\t\t)\n\t\t\t\t.filter( ( { 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( templateType ) )\n\t\t\t\t\t);\n\t\t\t\t} ),\n\t\t[ settingsBlockPatterns, restBlockPatterns, templateType ]\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\treturn useMemo( () => {\n\t\tconst {\n\t\t\t__experimentalAdditionalBlockPatterns,\n\t\t\t__experimentalAdditionalBlockPatternCategories,\n\t\t\tfocusMode,\n\t\t\t...restStoredSettings\n\t\t} = storedSettings;\n\n\t\treturn {\n\t\t\t...restStoredSettings,\n\t\t\tinserterMediaCategories,\n\t\t\t__experimentalBlockPatterns: blockPatterns,\n\t\t\t__experimentalBlockPatternCategories: blockPatternCategories,\n\t\t\tfocusMode: canvasMode === 'view' && focusMode ? false : focusMode,\n\t\t};\n\t}, [ storedSettings, blockPatterns, blockPatternCategories, canvasMode ] );\n}\n","export const FOCUSABLE_ENTITIES = [ 'wp_template_part', 'wp_navigation' ];\n","/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { addFilter, removeFilter } from '@wordpress/hooks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { PAGE_CONTENT_BLOCK_TYPES } from './constants';\n\nconst { useBlockEditingMode } = unlock( blockEditorPrivateApis );\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\tuseDisableNonPageContentBlocks();\n}\n\n/**\n * Disables non-content blocks using the `useBlockEditingMode` hook.\n */\nexport function useDisableNonPageContentBlocks() {\n\tuseBlockEditingMode( 'disabled' );\n\tuseEffect( () => {\n\t\taddFilter(\n\t\t\t'editor.BlockEdit',\n\t\t\t'core/edit-site/disable-non-content-blocks',\n\t\t\twithDisableNonPageContentBlocks\n\t\t);\n\t\treturn () =>\n\t\t\tremoveFilter(\n\t\t\t\t'editor.BlockEdit',\n\t\t\t\t'core/edit-site/disable-non-content-blocks'\n\t\t\t);\n\t}, [] );\n}\n\nconst withDisableNonPageContentBlocks = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst isContent = PAGE_CONTENT_BLOCK_TYPES.includes( props.name );\n\t\tconst mode = isContent ? 'contentOnly' : undefined;\n\t\tuseBlockEditingMode( mode );\n\t\treturn <BlockEdit { ...props } />;\n\t},\n\t'withDisableNonPageContentBlocks'\n);\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useEffect, useState, useRef } from '@wordpress/element';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } 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 conetnt 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 EditTemplateNotification( { contentRef } ) {\n\tconst hasPageContentFocus = useSelect(\n\t\t( select ) => select( editSiteStore ).hasPageContentFocus(),\n\t\t[]\n\t);\n\tconst { getNotices } = useSelect( noticesStore );\n\n\tconst { createInfoNotice, removeNotice } = useDispatch( noticesStore );\n\tconst { setHasPageContentFocus } = useDispatch( editSiteStore );\n\n\tconst [ isDialogOpen, setIsDialogOpen ] = useState( false );\n\n\tconst lastNoticeId = useRef( 0 );\n\n\tuseEffect( () => {\n\t\tconst handleClick = async ( event ) => {\n\t\t\tif ( ! hasPageContentFocus ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( ! event.target.classList.contains( 'is-root-container' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst isNoticeAlreadyShowing = getNotices().some(\n\t\t\t\t( notice ) => notice.id === lastNoticeId.current\n\t\t\t);\n\t\t\tif ( isNoticeAlreadyShowing ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { notice } = await createInfoNotice(\n\t\t\t\t__( 'Edit your template to edit this block.' ),\n\t\t\t\t{\n\t\t\t\t\tisDismissible: true,\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: __( 'Edit template' ),\n\t\t\t\t\t\t\tonClick: () => setHasPageContentFocus( false ),\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\tlastNoticeId.current = notice.id;\n\t\t};\n\n\t\tconst handleDblClick = ( event ) => {\n\t\t\tif ( ! hasPageContentFocus ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( ! event.target.classList.contains( 'is-root-container' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( lastNoticeId.current ) {\n\t\t\t\tremoveNotice( lastNoticeId.current );\n\t\t\t}\n\t\t\tsetIsDialogOpen( true );\n\t\t};\n\n\t\tconst canvas = contentRef.current;\n\t\tcanvas?.addEventListener( 'click', handleClick );\n\t\tcanvas?.addEventListener( 'dblclick', handleDblClick );\n\t\treturn () => {\n\t\t\tcanvas?.removeEventListener( 'click', handleClick );\n\t\t\tcanvas?.removeEventListener( 'dblclick', handleDblClick );\n\t\t};\n\t}, [ lastNoticeId, hasPageContentFocus, contentRef.current ] );\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\tsetHasPageContentFocus( false );\n\t\t\t} }\n\t\t\tonCancel={ () => setIsDialogOpen( false ) }\n\t\t>\n\t\t\t{ __( 'Edit your template to edit this block.' ) }\n\t\t</ConfirmDialog>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useEffect, useRef } from '@wordpress/element';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\n\n/**\n * Component that displays a 'You are editing a template' notification when the\n * user switches from focusing on editing page content to editing a template.\n */\nexport default function BackToPageNotification() {\n\tuseBackToPageNotification();\n\treturn null;\n}\n\n/**\n * Hook that displays a 'You are editing a template' notification when the user\n * switches from focusing on editing page content to editing a template.\n */\nexport function useBackToPageNotification() {\n\tconst { isPage, hasPageContentFocus } = useSelect(\n\t\t( select ) => ( {\n\t\t\tisPage: select( editSiteStore ).isPage(),\n\t\t\thasPageContentFocus: select( editSiteStore ).hasPageContentFocus(),\n\t\t} ),\n\t\t[]\n\t);\n\n\tconst alreadySeen = useRef( false );\n\tconst prevHasPageContentFocus = useRef( false );\n\n\tconst { createInfoNotice } = useDispatch( noticesStore );\n\tconst { setHasPageContentFocus } = useDispatch( editSiteStore );\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\t! alreadySeen.current &&\n\t\t\tisPage &&\n\t\t\tprevHasPageContentFocus.current &&\n\t\t\t! hasPageContentFocus\n\t\t) {\n\t\t\tcreateInfoNotice( __( 'You are editing a template.' ), {\n\t\t\t\tisDismissible: true,\n\t\t\t\ttype: 'snackbar',\n\t\t\t\tactions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Back to page' ),\n\t\t\t\t\t\tonClick: () => setHasPageContentFocus( true ),\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t} );\n\t\t\talreadySeen.current = true;\n\t\t}\n\t\tprevHasPageContentFocus.current = hasPageContentFocus;\n\t}, [\n\t\talreadySeen,\n\t\tisPage,\n\t\tprevHasPageContentFocus,\n\t\thasPageContentFocus,\n\t\tcreateInfoNotice,\n\t\tsetHasPageContentFocus,\n\t] );\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport DisableNonPageContentBlocks from './disable-non-page-content-blocks';\nimport EditTemplateNotification from './edit-template-notification';\nimport BackToPageNotification from './back-to-page-notification';\n\nexport default function PageContentFocusManager( { contentRef } ) {\n\tconst hasPageContentFocus = useSelect(\n\t\t( select ) => select( editSiteStore ).hasPageContentFocus(),\n\t\t[]\n\t);\n\treturn (\n\t\t<>\n\t\t\t{ hasPageContentFocus && <DisableNonPageContentBlocks /> }\n\t\t\t<EditTemplateNotification contentRef={ contentRef } />\n\t\t\t<BackToPageNotification />\n\t\t</>\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRef } from '@wordpress/element';\nimport {\n\tBlockList,\n\tBlockTools,\n\t__unstableUseClipboardHandler as useClipboardHandler,\n\t__unstableUseTypingObserver as useTypingObserver,\n\tBlockEditorKeyboardShortcuts,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport {\n\tuseMergeRefs,\n\tuseViewportMatch,\n\tuseResizeObserver,\n} from '@wordpress/compose';\n/**\n * Internal dependencies\n */\nimport BackButton from './back-button';\nimport ResizableEditor from './resizable-editor';\nimport EditorCanvas from './editor-canvas';\nimport EditorCanvasContainer from '../editor-canvas-container';\nimport useSiteEditorSettings from './use-site-editor-settings';\nimport { store as editSiteStore } from '../../store';\nimport { FOCUSABLE_ENTITIES } from './constants';\nimport { unlock } from '../../lock-unlock';\nimport PageContentFocusManager from '../page-content-focus-manager';\n\nconst LAYOUT = {\n\ttype: 'default',\n\t// At the root level of the site editor, no alignments should be allowed.\n\talignments: [],\n};\n\nexport default function SiteEditorCanvas() {\n\tconst { clearSelectedBlock } = useDispatch( blockEditorStore );\n\n\tconst { templateType, isFocusMode, isViewMode } = useSelect( ( select ) => {\n\t\tconst { getEditedPostType, getCanvasMode } = unlock(\n\t\t\tselect( editSiteStore )\n\t\t);\n\n\t\tconst _templateType = getEditedPostType();\n\n\t\treturn {\n\t\t\ttemplateType: _templateType,\n\t\t\tisFocusMode: FOCUSABLE_ENTITIES.includes( _templateType ),\n\t\t\tisViewMode: getCanvasMode() === 'view',\n\t\t};\n\t}, [] );\n\n\tconst [ resizeObserver, sizes ] = useResizeObserver();\n\n\tconst settings = useSiteEditorSettings();\n\n\tconst { hasBlocks } = useSelect( ( select ) => {\n\t\tconst { getBlockCount } = select( blockEditorStore );\n\n\t\tconst blocks = getBlockCount();\n\n\t\treturn {\n\t\t\thasBlocks: !! blocks,\n\t\t};\n\t}, [] );\n\n\tconst isMobileViewport = useViewportMatch( 'small', '<' );\n\tconst enableResizing =\n\t\tisFocusMode &&\n\t\t! isViewMode &&\n\t\t// Disable resizing in mobile viewport.\n\t\t! isMobileViewport;\n\n\tconst contentRef = useRef();\n\tconst mergedRefs = useMergeRefs( [\n\t\tcontentRef,\n\t\tuseClipboardHandler(),\n\t\tuseTypingObserver(),\n\t] );\n\n\tconst isTemplateTypeNavigation = templateType === 'wp_navigation';\n\n\tconst isNavigationFocusMode = isTemplateTypeNavigation && isFocusMode;\n\n\t// Hide the appender when:\n\t// - In navigation focus mode (should only allow the root Nav block).\n\t// - In view mode (i.e. not editing).\n\tconst showBlockAppender =\n\t\t( isNavigationFocusMode && hasBlocks ) || isViewMode\n\t\t\t? false\n\t\t\t: undefined;\n\n\tconst forceFullHeight = isNavigationFocusMode;\n\n\treturn (\n\t\t<>\n\t\t\t<EditorCanvasContainer.Slot>\n\t\t\t\t{ ( [ editorCanvasView ] ) =>\n\t\t\t\t\teditorCanvasView ? (\n\t\t\t\t\t\t<div className=\"edit-site-visual-editor is-focus-mode\">\n\t\t\t\t\t\t\t{ editorCanvasView }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<BlockTools\n\t\t\t\t\t\t\tclassName={ classnames( 'edit-site-visual-editor', {\n\t\t\t\t\t\t\t\t'is-focus-mode':\n\t\t\t\t\t\t\t\t\tisFocusMode || !! editorCanvasView,\n\t\t\t\t\t\t\t\t'is-view-mode': isViewMode,\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\t__unstableContentRef={ contentRef }\n\t\t\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\t\t\t// Clear selected block when clicking on the gray background.\n\t\t\t\t\t\t\t\tif ( event.target === event.currentTarget ) {\n\t\t\t\t\t\t\t\t\tclearSelectedBlock();\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<BlockEditorKeyboardShortcuts.Register />\n\t\t\t\t\t\t\t<BackButton />\n\t\t\t\t\t\t\t<ResizableEditor\n\t\t\t\t\t\t\t\tenableResizing={ enableResizing }\n\t\t\t\t\t\t\t\theight={\n\t\t\t\t\t\t\t\t\tsizes.height && ! forceFullHeight\n\t\t\t\t\t\t\t\t\t\t? sizes.height\n\t\t\t\t\t\t\t\t\t\t: '100%'\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<EditorCanvas\n\t\t\t\t\t\t\t\t\tenableResizing={ enableResizing }\n\t\t\t\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\t\t\t\tcontentRef={ mergedRefs }\n\t\t\t\t\t\t\t\t\treadonly={ isViewMode }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ resizeObserver }\n\t\t\t\t\t\t\t\t\t<BlockList\n\t\t\t\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t\t\t\t'edit-site-block-editor__block-list wp-site-blocks',\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'is-navigation-block':\n\t\t\t\t\t\t\t\t\t\t\t\t\tisTemplateTypeNavigation,\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\tlayout={ LAYOUT }\n\t\t\t\t\t\t\t\t\t\trenderAppender={ showBlockAppender }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</EditorCanvas>\n\t\t\t\t\t\t\t</ResizableEditor>\n\t\t\t\t\t\t</BlockTools>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t</EditorCanvasContainer.Slot>\n\t\t\t<PageContentFocusManager contentRef={ contentRef } />\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useEntityBlockEditor } from '@wordpress/core-data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../../store';\nimport { unlock } from '../../../lock-unlock';\nimport useSiteEditorSettings from '../use-site-editor-settings';\n\nconst { ExperimentalBlockEditorProvider } = unlock( blockEditorPrivateApis );\n\nexport default function DefaultBlockEditorProvider( { children } ) {\n\tconst settings = useSiteEditorSettings();\n\n\tconst { templateType } = useSelect( ( select ) => {\n\t\tconst { getEditedPostType } = unlock( select( editSiteStore ) );\n\n\t\treturn {\n\t\t\ttemplateType: getEditedPostType(),\n\t\t};\n\t}, [] );\n\n\tconst [ blocks, onInput, onChange ] = useEntityBlockEditor(\n\t\t'postType',\n\t\ttemplateType\n\t);\n\n\treturn (\n\t\t<ExperimentalBlockEditorProvider\n\t\t\tsettings={ settings }\n\t\t\tvalue={ blocks }\n\t\t\tonInput={ onInput }\n\t\t\tonChange={ onChange }\n\t\t\tuseSubRegistry={ false }\n\t\t>\n\t\t\t{ children }\n\t\t</ExperimentalBlockEditorProvider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useMemo, useEffect } from '@wordpress/element';\nimport { useEntityId } from '@wordpress/core-data';\nimport {\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { createBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\nimport useSiteEditorSettings from '../use-site-editor-settings';\nimport { store as editSiteStore } from '../../../store';\n\nconst { ExperimentalBlockEditorProvider } = unlock( blockEditorPrivateApis );\n\nconst noop = () => {};\n\n/**\n * Block editor component for editing navigation menus.\n *\n * Note: Navigation entities require a wrapping Navigation block to provide\n * them with some basic layout and styling. Therefore we create a \"ghost\" block\n * and provide it will a reference to the navigation entity ID being edited.\n *\n * In this scenario it is the **block** that handles syncing the entity content\n * whereas for other entities this is handled by entity block editor.\n *\n * @param {number} navigationMenuId the navigation menu ID\n * @return {[WPBlock[], Function, Function]} The block array and setters.\n */\nexport default function NavigationBlockEditorProvider( { children } ) {\n\tconst defaultSettings = useSiteEditorSettings();\n\n\tconst navigationMenuId = useEntityId( 'postType', 'wp_navigation' );\n\n\tconst blocks = useMemo( () => {\n\t\treturn [\n\t\t\tcreateBlock( 'core/navigation', {\n\t\t\t\tref: navigationMenuId,\n\t\t\t\t// As the parent editor is locked with `templateLock`, the template locking\n\t\t\t\t// must be explicitly \"unset\" on the block itself to allow the user to modify\n\t\t\t\t// the block's content.\n\t\t\t\ttemplateLock: false,\n\t\t\t} ),\n\t\t];\n\t}, [ navigationMenuId ] );\n\n\tconst { isEditMode } = useSelect( ( select ) => {\n\t\tconst { getCanvasMode } = unlock( select( editSiteStore ) );\n\n\t\treturn {\n\t\t\tisEditMode: getCanvasMode() === 'edit',\n\t\t};\n\t}, [] );\n\n\tconst { selectBlock, setBlockEditingMode, unsetBlockEditingMode } = unlock(\n\t\tuseDispatch( blockEditorStore )\n\t);\n\n\tconst navigationBlockClientId = blocks && blocks[ 0 ]?.clientId;\n\n\tconst settings = useMemo( () => {\n\t\treturn {\n\t\t\t...defaultSettings,\n\t\t\t// Lock the editor to allow the root (\"ghost\") Navigation block only.\n\t\t\ttemplateLock: 'insert',\n\t\t\ttemplate: [ [ 'core/navigation', {}, [] ] ],\n\t\t};\n\t}, [ defaultSettings ] );\n\n\t// Auto-select the Navigation block when entering Navigation focus mode.\n\tuseEffect( () => {\n\t\tif ( navigationBlockClientId && isEditMode ) {\n\t\t\tselectBlock( navigationBlockClientId );\n\t\t}\n\t}, [ navigationBlockClientId, isEditMode, selectBlock ] );\n\n\t// Set block editing mode to contentOnly when entering Navigation focus mode.\n\t// This ensures that non-content controls on the block will be hidden and thus\n\t// the user can focus on editing the Navigation Menu content only.\n\tuseEffect( () => {\n\t\tif ( ! navigationBlockClientId ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetBlockEditingMode( navigationBlockClientId, 'contentOnly' );\n\n\t\treturn () => {\n\t\t\tunsetBlockEditingMode( navigationBlockClientId );\n\t\t};\n\t}, [\n\t\tnavigationBlockClientId,\n\t\tunsetBlockEditingMode,\n\t\tsetBlockEditingMode,\n\t] );\n\n\treturn (\n\t\t<ExperimentalBlockEditorProvider\n\t\t\tsettings={ settings }\n\t\t\tvalue={ blocks }\n\t\t\tonInput={ noop }\n\t\t\tonChange={ noop }\n\t\t\tuseSubRegistry={ false }\n\t\t>\n\t\t\t{ children }\n\t\t</ExperimentalBlockEditorProvider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { BlockInspector } from '@wordpress/block-editor';\n\nimport { ReusableBlocksMenuItems } from '@wordpress/reusable-blocks';\n\n/**\n * Internal dependencies\n */\nimport TemplatePartConverter from '../template-part-converter';\nimport { SidebarInspectorFill } from '../sidebar-edit-mode';\nimport { store as editSiteStore } from '../../store';\nimport SiteEditorCanvas from './site-editor-canvas';\nimport getBlockEditorProvider from './get-block-editor-provider';\n\nexport default function BlockEditor() {\n\tconst entityType = useSelect(\n\t\t( select ) => select( editSiteStore ).getEditedPostType(),\n\t\t[]\n\t);\n\n\t// Choose the provider based on the entity type currently\n\t// being edited.\n\tconst BlockEditorProvider = getBlockEditorProvider( entityType );\n\n\treturn (\n\t\t<BlockEditorProvider>\n\t\t\t<TemplatePartConverter />\n\t\t\t<SidebarInspectorFill>\n\t\t\t\t<BlockInspector />\n\t\t\t</SidebarInspectorFill>\n\n\t\t\t<SiteEditorCanvas />\n\n\t\t\t<ReusableBlocksMenuItems />\n\t\t</BlockEditorProvider>\n\t);\n}\n","/**\n * Internal dependencies\n */\nimport DefaultBlockEditor from './providers/default-block-editor-provider';\nimport NavigationBlockEditor from './providers/navigation-block-editor-provider';\n\n/**\n * Factory to isolate choosing the appropriate block editor\n * component to handle a given entity type.\n *\n * @param {string} entityType the entity type being edited\n * @return {JSX.Element} the block editor component to use.\n */\nexport default function getBlockEditorProvider( entityType ) {\n\tlet Provider = null;\n\n\tswitch ( entityType ) {\n\t\tcase 'wp_navigation':\n\t\t\tProvider = NavigationBlockEditor;\n\t\t\tbreak;\n\t\tcase 'wp_template':\n\t\tcase 'wp_template_part':\n\t\tdefault:\n\t\t\tProvider = DefaultBlockEditor;\n\t\t\tbreak;\n\t}\n\n\treturn Provider;\n}\n","/**\n * External dependencies\n */\nimport Textarea from 'react-autosize-textarea';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useEffect, useState, useRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { VisuallyHidden } from '@wordpress/components';\n\nexport default function CodeEditorTextArea( { value, onChange, onInput } ) {\n\tconst [ stateValue, setStateValue ] = useState( value );\n\tconst [ isDirty, setIsDirty ] = useState( false );\n\tconst instanceId = useInstanceId( CodeEditorTextArea );\n\tconst valueRef = useRef();\n\n\tif ( ! isDirty && stateValue !== value ) {\n\t\tsetStateValue( value );\n\t}\n\n\t/**\n\t * Handles a textarea change event to notify the onChange prop callback and\n\t * reflect the new value in the component's own state. This marks the start\n\t * of the user's edits, if not already changed, preventing future props\n\t * changes to value from replacing the rendered value. This is expected to\n\t * be followed by a reset to dirty state via `stopEditing`.\n\t *\n\t * @see stopEditing\n\t *\n\t * @param {Event} event Change event.\n\t */\n\tconst onChangeHandler = ( event ) => {\n\t\tconst newValue = event.target.value;\n\t\tonInput( newValue );\n\t\tsetStateValue( newValue );\n\t\tsetIsDirty( true );\n\t\tvalueRef.current = newValue;\n\t};\n\n\t/**\n\t * Function called when the user has completed their edits, responsible for\n\t * ensuring that changes, if made, are surfaced to the onPersist prop\n\t * callback and resetting dirty state.\n\t */\n\tconst stopEditing = () => {\n\t\tif ( isDirty ) {\n\t\t\tonChange( stateValue );\n\t\t\tsetIsDirty( false );\n\t\t}\n\t};\n\n\t// Ensure changes aren't lost when component unmounts.\n\tuseEffect( () => {\n\t\treturn () => {\n\t\t\tif ( valueRef.current ) {\n\t\t\t\tonChange( valueRef.current );\n\t\t\t}\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<>\n\t\t\t<VisuallyHidden\n\t\t\t\tas=\"label\"\n\t\t\t\thtmlFor={ `code-editor-text-area-${ 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={ stateValue }\n\t\t\t\tonChange={ onChangeHandler }\n\t\t\t\tonBlur={ stopEditing }\n\t\t\t\tclassName=\"edit-site-code-editor-text-area\"\n\t\t\t\tid={ `code-editor-text-area-${ instanceId }` }\n\t\t\t\tplaceholder={ __( 'Start writing with text or HTML' ) }\n\t\t\t/>\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { parse, __unstableSerializeAndClean } from '@wordpress/blocks';\nimport { useEntityBlockEditor, useEntityProp } from '@wordpress/core-data';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport CodeEditorTextArea from './code-editor-text-area';\n\nexport default function CodeEditor() {\n\tconst { templateType, shortcut } = useSelect( ( select ) => {\n\t\tconst { getEditedPostType } = select( editSiteStore );\n\t\tconst { getShortcutRepresentation } = select( keyboardShortcutsStore );\n\t\treturn {\n\t\t\ttemplateType: getEditedPostType(),\n\t\t\tshortcut: getShortcutRepresentation( 'core/edit-site/toggle-mode' ),\n\t\t};\n\t}, [] );\n\tconst [ contentStructure, setContent ] = useEntityProp(\n\t\t'postType',\n\t\ttemplateType,\n\t\t'content'\n\t);\n\tconst [ blocks, , onChange ] = useEntityBlockEditor(\n\t\t'postType',\n\t\ttemplateType\n\t);\n\n\t// Replicates the logic found in getEditedPostContent().\n\tlet content;\n\tif ( contentStructure instanceof Function ) {\n\t\tcontent = contentStructure( { blocks } );\n\t} else if ( blocks ) {\n\t\t// If we have parsed blocks already, they should be our source of truth.\n\t\t// Parsing applies block deprecations and legacy block conversions that\n\t\t// unparsed content will not have.\n\t\tcontent = __unstableSerializeAndClean( blocks );\n\t} else {\n\t\tcontent = contentStructure;\n\t}\n\n\tconst { switchEditorMode } = useDispatch( editSiteStore );\n\treturn (\n\t\t<div className=\"edit-site-code-editor\">\n\t\t\t<div className=\"edit-site-code-editor__toolbar\">\n\t\t\t\t<h2>{ __( 'Editing code' ) }</h2>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\tonClick={ () => switchEditorMode( 'visual' ) }\n\t\t\t\t\tshortcut={ shortcut }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Exit code editor' ) }\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t\t<div className=\"edit-site-code-editor__body\">\n\t\t\t\t<CodeEditorTextArea\n\t\t\t\t\tvalue={ content }\n\t\t\t\t\tonChange={ ( newContent ) => {\n\t\t\t\t\t\tonChange( parse( newContent ), {\n\t\t\t\t\t\t\tselection: undefined,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tonInput={ setContent }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { createBlock } from '@wordpress/blocks';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { SIDEBAR_BLOCK } from '../sidebar-edit-mode/constants';\nimport { STORE_NAME } from '../../store/constants';\n\nfunction KeyboardShortcutsEditMode() {\n\tconst { getEditorMode } = useSelect( editSiteStore );\n\tconst isListViewOpen = useSelect(\n\t\t( select ) => select( editSiteStore ).isListViewOpened(),\n\t\t[]\n\t);\n\tconst isBlockInspectorOpen = useSelect(\n\t\t( select ) =>\n\t\t\tselect( interfaceStore ).getActiveComplementaryArea(\n\t\t\t\teditSiteStore.name\n\t\t\t) === SIDEBAR_BLOCK,\n\t\t[]\n\t);\n\tconst { redo, undo } = useDispatch( coreStore );\n\tconst {\n\t\tisFeatureActive,\n\t\tsetIsListViewOpened,\n\t\tswitchEditorMode,\n\t\ttoggleFeature,\n\t\tsetIsInserterOpened,\n\t\tcloseGeneralSidebar,\n\t} = useDispatch( editSiteStore );\n\tconst { enableComplementaryArea, disableComplementaryArea } =\n\t\tuseDispatch( interfaceStore );\n\n\tconst { replaceBlocks } = useDispatch( blockEditorStore );\n\tconst { getBlockName, getSelectedBlockClientId, getBlockAttributes } =\n\t\tuseSelect( blockEditorStore );\n\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\tconst { createInfoNotice } = useDispatch( noticesStore );\n\n\tconst toggleDistractionFree = () => {\n\t\tsetPreference( 'core/edit-site', 'fixedToolbar', false );\n\t\tsetIsInserterOpened( false );\n\t\tsetIsListViewOpened( false );\n\t\tcloseGeneralSidebar();\n\t};\n\n\tconst handleTextLevelShortcut = ( event, level ) => {\n\t\tevent.preventDefault();\n\t\tconst destinationBlockName =\n\t\t\tlevel === 0 ? 'core/paragraph' : 'core/heading';\n\t\tconst currentClientId = getSelectedBlockClientId();\n\t\tif ( currentClientId === null ) {\n\t\t\treturn;\n\t\t}\n\t\tconst blockName = getBlockName( currentClientId );\n\t\tif ( blockName !== 'core/paragraph' && blockName !== 'core/heading' ) {\n\t\t\treturn;\n\t\t}\n\t\tconst attributes = getBlockAttributes( currentClientId );\n\t\tconst textAlign =\n\t\t\tblockName === 'core/paragraph' ? 'align' : 'textAlign';\n\t\tconst destinationTextAlign =\n\t\t\tdestinationBlockName === 'core/paragraph' ? 'align' : 'textAlign';\n\n\t\treplaceBlocks(\n\t\t\tcurrentClientId,\n\t\t\tcreateBlock( destinationBlockName, {\n\t\t\t\tlevel,\n\t\t\t\tcontent: attributes.content,\n\t\t\t\t...{ [ destinationTextAlign ]: attributes[ textAlign ] },\n\t\t\t} )\n\t\t);\n\t};\n\n\tuseShortcut( 'core/edit-site/undo', ( event ) => {\n\t\tundo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-site/redo', ( event ) => {\n\t\tredo();\n\t\tevent.preventDefault();\n\t} );\n\n\t// Only opens the list view. Other functionality for this shortcut happens in the rendered sidebar.\n\tuseShortcut( 'core/edit-site/toggle-list-view', () => {\n\t\tif ( isListViewOpen ) {\n\t\t\treturn;\n\t\t}\n\t\tsetIsListViewOpened( true );\n\t} );\n\n\tuseShortcut( 'core/edit-site/toggle-block-settings-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\n\t\tif ( isBlockInspectorOpen ) {\n\t\t\tdisableComplementaryArea( STORE_NAME );\n\t\t} else {\n\t\t\tenableComplementaryArea( STORE_NAME, SIDEBAR_BLOCK );\n\t\t}\n\t} );\n\n\tuseShortcut( 'core/edit-site/toggle-mode', () => {\n\t\tswitchEditorMode( getEditorMode() === 'visual' ? 'text' : 'visual' );\n\t} );\n\n\tuseShortcut( 'core/edit-site/transform-heading-to-paragraph', ( event ) =>\n\t\thandleTextLevelShortcut( event, 0 )\n\t);\n\n\t[ 1, 2, 3, 4, 5, 6 ].forEach( ( level ) => {\n\t\t//the loop is based off on a constant therefore\n\t\t//the hook will execute the same way every time\n\t\t//eslint-disable-next-line react-hooks/rules-of-hooks\n\t\tuseShortcut(\n\t\t\t`core/edit-site/transform-paragraph-to-heading-${ level }`,\n\t\t\t( event ) => handleTextLevelShortcut( event, level )\n\t\t);\n\t} );\n\n\tuseShortcut( 'core/edit-site/toggle-distraction-free', () => {\n\t\ttoggleDistractionFree();\n\t\ttoggleFeature( 'distractionFree' );\n\t\tcreateInfoNotice(\n\t\t\tisFeatureActive( 'distractionFree' )\n\t\t\t\t? __( 'Distraction free mode turned on.' )\n\t\t\t\t: __( 'Distraction free mode turned off.' ),\n\t\t\t{\n\t\t\t\tid: 'core/edit-site/distraction-free-mode/notice',\n\t\t\t\ttype: 'snackbar',\n\t\t\t}\n\t\t);\n\t} );\n\n\treturn null;\n}\n\nexport default KeyboardShortcutsEditMode;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst close = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z\" />\n\t</SVG>\n);\n\nexport default close;\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { Button, VisuallyHidden } from '@wordpress/components';\nimport { __experimentalLibrary as Library } from '@wordpress/block-editor';\nimport { close } from '@wordpress/icons';\nimport {\n\tuseViewportMatch,\n\t__experimentalUseDialog as useDialog,\n} from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { useEffect, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\n\nexport default function InserterSidebar() {\n\tconst { setIsInserterOpened } = useDispatch( editSiteStore );\n\tconst insertionPoint = useSelect(\n\t\t( select ) => select( editSiteStore ).__experimentalGetInsertionPoint(),\n\t\t[]\n\t);\n\n\tconst isMobile = useViewportMatch( 'medium', '<' );\n\tconst TagName = ! isMobile ? VisuallyHidden : 'div';\n\tconst [ inserterDialogRef, inserterDialogProps ] = useDialog( {\n\t\tonClose: () => setIsInserterOpened( false ),\n\t\tfocusOnMount: null,\n\t} );\n\n\tconst libraryRef = useRef();\n\tuseEffect( () => {\n\t\tlibraryRef.current.focusSearch();\n\t}, [] );\n\n\treturn (\n\t\t<div\n\t\t\tref={ inserterDialogRef }\n\t\t\t{ ...inserterDialogProps }\n\t\t\tclassName=\"edit-site-editor__inserter-panel\"\n\t\t>\n\t\t\t<TagName className=\"edit-site-editor__inserter-panel-header\">\n\t\t\t\t<Button\n\t\t\t\t\ticon={ close }\n\t\t\t\t\tlabel={ __( 'Close block inserter' ) }\n\t\t\t\t\tonClick={ () => setIsInserterOpened( false ) }\n\t\t\t\t/>\n\t\t\t</TagName>\n\t\t\t<div className=\"edit-site-editor__inserter-panel-content\">\n\t\t\t\t<Library\n\t\t\t\t\tshowInserterHelpPanel\n\t\t\t\t\tshouldFocusBlock={ isMobile }\n\t\t\t\t\trootClientId={ insertionPoint.rootClientId }\n\t\t\t\t\t__experimentalInsertionIndex={\n\t\t\t\t\t\tinsertionPoint.insertionIndex\n\t\t\t\t\t}\n\t\t\t\t\t__experimentalFilterValue={ insertionPoint.filterValue }\n\t\t\t\t\tref={ libraryRef }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport {\n\tuseFocusOnMount,\n\tuseFocusReturn,\n\tuseMergeRefs,\n} from '@wordpress/compose';\nimport { useDispatch } from '@wordpress/data';\nimport { useRef, useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { closeSmall } from '@wordpress/icons';\nimport { ESCAPE } from '@wordpress/keycodes';\nimport { focus } from '@wordpress/dom';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { PrivateListView } = unlock( blockEditorPrivateApis );\n\nexport default function ListViewSidebar() {\n\tconst { setIsListViewOpened } = useDispatch( editSiteStore );\n\n\t// This hook handles focus when the sidebar first renders.\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\t// The next 2 hooks handle focus for when the sidebar closes and returning focus to the element that had focus before sidebar opened.\n\tconst headerFocusReturnRef = useFocusReturn();\n\tconst contentFocusReturnRef = useFocusReturn();\n\n\tfunction closeOnEscape( event ) {\n\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\tsetIsListViewOpened( false );\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 dropZoneElement updates.\n\tconst [ dropZoneElement, setDropZoneElement ] = useState( null );\n\n\t// This ref refers to the sidebar as a whole.\n\tconst sidebarRef = useRef();\n\t// This ref refers to the close button.\n\tconst sidebarCloseButtonRef = useRef();\n\t// This ref refers to the list view application area.\n\tconst listViewRef = useRef();\n\n\t/*\n\t * Callback function to handle list view or close button focus.\n\t *\n\t * @return void\n\t */\n\tfunction handleSidebarFocus() {\n\t\t// Either focus the list view or the sidebar close button. Must have a fallback because the list view does not render when there are no blocks.\n\t\tconst listViewApplicationFocus = focus.tabbable.find(\n\t\t\tlistViewRef.current\n\t\t)[ 0 ];\n\t\tconst listViewFocusArea = sidebarRef.current.contains(\n\t\t\tlistViewApplicationFocus\n\t\t)\n\t\t\t? listViewApplicationFocus\n\t\t\t: sidebarCloseButtonRef.current;\n\t\tlistViewFocusArea.focus();\n\t}\n\n\t// This only fires when the sidebar is open because of the conditional rendering. 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/edit-site/toggle-list-view', () => {\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\tsetIsListViewOpened( false );\n\t\t\t// If the list view or close button does not have focus, focus should be moved to it.\n\t\t} else {\n\t\t\thandleSidebarFocus();\n\t\t}\n\t} );\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tclassName=\"edit-site-editor__list-view-panel\"\n\t\t\tonKeyDown={ closeOnEscape }\n\t\t\tref={ sidebarRef }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName=\"edit-site-editor__list-view-panel-header\"\n\t\t\t\tref={ headerFocusReturnRef }\n\t\t\t>\n\t\t\t\t<strong>{ __( 'List View' ) }</strong>\n\t\t\t\t<Button\n\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\tlabel={ __( 'Close' ) }\n\t\t\t\t\tonClick={ () => setIsListViewOpened( false ) }\n\t\t\t\t\tref={ sidebarCloseButtonRef }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\tclassName=\"edit-site-editor__list-view-panel-content\"\n\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\tcontentFocusReturnRef,\n\t\t\t\t\tfocusOnMountRef,\n\t\t\t\t\tsetDropZoneElement,\n\t\t\t\t\tlistViewRef,\n\t\t\t\t] ) }\n\t\t\t>\n\t\t\t\t<PrivateListView dropZoneElement={ dropZoneElement } />\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","export default function WelcomeGuideImage( { nonAnimatedSrc, animatedSrc } ) {\n\treturn (\n\t\t<picture className=\"edit-site-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 */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport WelcomeGuideImage from './image';\n\nexport default function WelcomeGuideEditor() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst isActive = useSelect(\n\t\t( select ) =>\n\t\t\t!! select( preferencesStore ).get(\n\t\t\t\t'core/edit-site',\n\t\t\t\t'welcomeGuide'\n\t\t\t),\n\t\t[]\n\t);\n\n\tif ( ! isActive ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-site-welcome-guide guide-editor\"\n\t\t\tcontentLabel={ __( 'Welcome to the site editor' ) }\n\t\t\tfinishButtonText={ __( 'Get started' ) }\n\t\t\tonFinish={ () => toggle( 'core/edit-site', 'welcomeGuide' ) }\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/edit-your-site.svg?1\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/edit-your-site.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=\"edit-site-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Edit your site' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Design everything on your site — from the header right down to the footer — using blocks.'\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 className=\"edit-site-welcome-guide__text\">\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'Click <StylesIconImage /> to start designing your blocks, and choose your typography, layout, and colors.'\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\tStylesIconImage: (\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\talt={ __( 'styles' ) }\n\t\t\t\t\t\t\t\t\t\t\t\tsrc=\"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z' fill='%231E1E1E'/%3E%3C/svg%3E%0A\"\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</>\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 { useDispatch, useSelect } from '@wordpress/data';\nimport { ExternalLink, Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport WelcomeGuideImage from './image';\nimport { store as editSiteStore } from '../../store';\n\nexport default function WelcomeGuideStyles() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst { isActive, isStylesOpen } = useSelect( ( select ) => {\n\t\tconst sidebar = select( interfaceStore ).getActiveComplementaryArea(\n\t\t\teditSiteStore.name\n\t\t);\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=\"edit-site-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=\"edit-site-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=\"edit-site-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 — 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=\"edit-site-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=\"edit-site-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=\"edit-site-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=\"edit-site-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 — 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=\"edit-site-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=\"edit-site-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’s 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","/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\n\nexport default function WelcomeGuidePage() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst isVisible = useSelect( ( select ) => {\n\t\tconst isPageActive = !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\t'welcomeGuidePage'\n\t\t);\n\t\tconst isEditorActive = !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\t'welcomeGuide'\n\t\t);\n\t\tconst { hasPageContentFocus } = select( editSiteStore );\n\t\treturn isPageActive && ! isEditorActive && hasPageContentFocus();\n\t}, [] );\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\tconst heading = __( 'Editing a page' );\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-site-welcome-guide guide-page\"\n\t\t\tcontentLabel={ heading }\n\t\t\tfinishButtonText={ __( 'Continue' ) }\n\t\t\tonFinish={ () => toggle( 'core/edit-site', 'welcomeGuidePage' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<video\n\t\t\t\t\t\t\tclassName=\"edit-site-welcome-guide__video\"\n\t\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\t\tloop\n\t\t\t\t\t\t\tmuted\n\t\t\t\t\t\t\twidth=\"312\"\n\t\t\t\t\t\t\theight=\"240\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<source\n\t\t\t\t\t\t\t\tsrc=\"https://s.w.org/images/block-editor/editing-your-page.mp4\"\n\t\t\t\t\t\t\t\ttype=\"video/mp4\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</video>\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=\"edit-site-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ heading }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'It’s now possible to edit page content in the site editor. To customise other parts of the page like the header and footer switch to editing the template using the settings sidebar.'\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] }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\n\nexport default function WelcomeGuideTemplate() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst isVisible = useSelect( ( select ) => {\n\t\tconst isTemplateActive = !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\t'welcomeGuideTemplate'\n\t\t);\n\t\tconst isEditorActive = !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\t'welcomeGuide'\n\t\t);\n\t\tconst { isPage, hasPageContentFocus } = select( editSiteStore );\n\t\treturn (\n\t\t\tisTemplateActive &&\n\t\t\t! isEditorActive &&\n\t\t\tisPage() &&\n\t\t\t! hasPageContentFocus()\n\t\t);\n\t}, [] );\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\tconst heading = __( 'Editing a template' );\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-site-welcome-guide guide-template\"\n\t\t\tcontentLabel={ heading }\n\t\t\tfinishButtonText={ __( 'Continue' ) }\n\t\t\tonFinish={ () =>\n\t\t\t\ttoggle( 'core/edit-site', 'welcomeGuideTemplate' )\n\t\t\t}\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<video\n\t\t\t\t\t\t\tclassName=\"edit-site-welcome-guide__video\"\n\t\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\t\tloop\n\t\t\t\t\t\t\tmuted\n\t\t\t\t\t\t\twidth=\"312\"\n\t\t\t\t\t\t\theight=\"240\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<source\n\t\t\t\t\t\t\t\tsrc=\"https://s.w.org/images/block-editor/editing-your-template.mp4\"\n\t\t\t\t\t\t\t\ttype=\"video/mp4\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</video>\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=\"edit-site-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ heading }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Note that the same template can be used by multiple pages, so any changes made here may affect other pages on the site. To switch back to editing the page content click the ‘Back’ button in the toolbar.'\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] }\n\t\t/>\n\t);\n}\n","/**\n * Internal dependencies\n */\nimport WelcomeGuideEditor from './editor';\nimport WelcomeGuideStyles from './styles';\nimport WelcomeGuidePage from './page';\nimport WelcomeGuideTemplate from './template';\n\nexport default function WelcomeGuide() {\n\treturn (\n\t\t<>\n\t\t\t<WelcomeGuideEditor />\n\t\t\t<WelcomeGuideStyles />\n\t\t\t<WelcomeGuidePage />\n\t\t\t<WelcomeGuideTemplate />\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { Modal, Flex, FlexItem, Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useEffect, useMemo } from '@wordpress/element';\nimport {\n\t__experimentalBlockPatternsList as BlockPatternsList,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { useAsyncList } from '@wordpress/compose';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { parse } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { store as coreStore, useEntityBlockEditor } from '@wordpress/core-data';\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\n\nfunction useFallbackTemplateContent( slug, isCustom = false ) {\n\tconst [ templateContent, setTemplateContent ] = useState( '' );\n\n\tuseEffect( () => {\n\t\tapiFetch( {\n\t\t\tpath: addQueryArgs( '/wp/v2/templates/lookup', {\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} ).then( ( { content } ) => setTemplateContent( content.raw ) );\n\t}, [ isCustom, slug ] );\n\treturn templateContent;\n}\n\nfunction useStartPatterns( fallbackContent ) {\n\tconst { slug, patterns } = useSelect( ( select ) => {\n\t\tconst { getEditedPostType, getEditedPostId } = select( editSiteStore );\n\t\tconst { getEntityRecord } = select( coreStore );\n\t\tconst postId = getEditedPostId();\n\t\tconst postType = getEditedPostType();\n\t\tconst record = getEntityRecord( 'postType', postType, postId );\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn {\n\t\t\tslug: record.slug,\n\t\t\tpatterns: getSettings().__experimentalBlockPatterns,\n\t\t};\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 { ...pattern, blocks: parse( pattern.content ) };\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\tconst shownBlockPatterns = useAsyncList( blockPatterns );\n\treturn (\n\t\t<BlockPatternsList\n\t\t\tblockPatterns={ blockPatterns }\n\t\t\tshownPatterns={ shownBlockPatterns }\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=\"edit-site-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={ true }\n\t\t>\n\t\t\t<div className=\"edit-site-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=\"edit-site-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 variant=\"tertiary\" onClick={ onClose }>\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\nconst START_TEMPLATE_MODAL_STATES = {\n\tINITIAL: 'INITIAL',\n\tCLOSED: 'CLOSED',\n};\n\nexport default function StartTemplateOptions() {\n\tconst [ modalState, setModalState ] = useState(\n\t\tSTART_TEMPLATE_MODAL_STATES.INITIAL\n\t);\n\tconst { shouldOpenModal, slug, isCustom, postType } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedPostType, getEditedPostId } =\n\t\t\t\tselect( editSiteStore );\n\t\t\tconst _postType = getEditedPostType();\n\t\t\tconst postId = getEditedPostId();\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\tpostId\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\tpostId\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\t'wp_template' === _postType &&\n\t\t\t\t\t! select( preferencesStore ).get(\n\t\t\t\t\t\t'core/edit-site',\n\t\t\t\t\t\t'welcomeGuide'\n\t\t\t\t\t),\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};\n\t\t},\n\t\t[]\n\t);\n\n\tif (\n\t\t( modalState === START_TEMPLATE_MODAL_STATES.INITIAL &&\n\t\t\t! shouldOpenModal ) ||\n\t\tmodalState === START_TEMPLATE_MODAL_STATES.CLOSED\n\t) {\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={ () =>\n\t\t\t\tsetModalState( START_TEMPLATE_MODAL_STATES.CLOSED )\n\t\t\t}\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStylesOutput } = unlock( blockEditorPrivateApis );\n\nfunction useGlobalStylesRenderer() {\n\tconst [ styles, settings ] = useGlobalStylesOutput();\n\tconst { getSettings } = useSelect( editSiteStore );\n\tconst { updateSettings } = useDispatch( editSiteStore );\n\n\tuseEffect( () => {\n\t\tif ( ! styles || ! settings ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentStoreSettings = getSettings();\n\t\tconst nonGlobalStyles = Object.values(\n\t\t\tcurrentStoreSettings.styles ?? []\n\t\t).filter( ( style ) => ! style.isGlobalStyles );\n\t\tupdateSettings( {\n\t\t\t...currentStoreSettings,\n\t\t\tstyles: [ ...nonGlobalStyles, ...styles ],\n\t\t\t__experimentalFeatures: settings,\n\t\t} );\n\t}, [ styles, settings ] );\n}\n\nexport function GlobalStylesRenderer() {\n\tuseGlobalStylesRenderer();\n\n\treturn null;\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { speak } from '@wordpress/a11y';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport default function useTitle( title ) {\n\tconst location = useLocation();\n\tconst siteTitle = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityRecord( 'root', 'site' )?.title,\n\t\t[]\n\t);\n\tconst isInitialLocationRef = useRef( true );\n\n\tuseEffect( () => {\n\t\tisInitialLocationRef.current = false;\n\t}, [ location ] );\n\n\tuseEffect( () => {\n\t\t// Don't update or announce the title for initial page load.\n\t\tif ( isInitialLocationRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( title && siteTitle ) {\n\t\t\t// @see https://github.com/WordPress/wordpress-develop/blob/94849898192d271d533e09756007e176feb80697/src/wp-admin/admin-header.php#L67-L68\n\t\t\tconst formattedTitle = sprintf(\n\t\t\t\t/* translators: Admin screen title. 1: Admin screen name, 2: Network or site name. */\n\t\t\t\t__( '%1$s ‹ %2$s — WordPress' ),\n\t\t\t\tdecodeEntities( title ),\n\t\t\t\tdecodeEntities( siteTitle )\n\t\t\t);\n\n\t\t\tdocument.title = formattedTitle;\n\n\t\t\t// Announce title on route change for screen readers.\n\t\t\tspeak(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: The page title that is currently displaying. */\n\t\t\t\t\t__( 'Now displaying: %s' ),\n\t\t\t\t\tdocument.title\n\t\t\t\t),\n\t\t\t\t'assertive'\n\t\t\t);\n\t\t}\n\t}, [ title, siteTitle, location ] );\n}\n","/**\n * WordPress dependencies\n */\nimport { Spinner } from '@wordpress/components';\n\nexport default function CanvasSpinner() {\n\treturn (\n\t\t<div className=\"edit-site-canvas-spinner\">\n\t\t\t<Spinner />\n\t\t</div>\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { Notice } from '@wordpress/components';\nimport { EntityProvider } from '@wordpress/core-data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tBlockContextProvider,\n\tBlockBreadcrumb,\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport {\n\tInterfaceSkeleton,\n\tComplementaryArea,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport { EditorNotices, EditorSnackbars } from '@wordpress/editor';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { SidebarComplementaryAreaFills } from '../sidebar-edit-mode';\nimport BlockEditor from '../block-editor';\nimport CodeEditor from '../code-editor';\nimport KeyboardShortcutsEditMode from '../keyboard-shortcuts/edit-mode';\nimport InserterSidebar from '../secondary-sidebar/inserter-sidebar';\nimport ListViewSidebar from '../secondary-sidebar/list-view-sidebar';\nimport WelcomeGuide from '../welcome-guide';\nimport StartTemplateOptions from '../start-template-options';\nimport { store as editSiteStore } from '../../store';\nimport { GlobalStylesRenderer } from '../global-styles-renderer';\nimport useTitle from '../routes/use-title';\nimport CanvasSpinner from '../canvas-spinner';\nimport { unlock } from '../../lock-unlock';\nimport useEditedEntityRecord from '../use-edited-entity-record';\nimport { SidebarFixedBottomSlot } from '../sidebar-edit-mode/sidebar-fixed-bottom';\n\nconst { BlockRemovalWarningModal } = unlock( blockEditorPrivateApis );\n\nconst interfaceLabels = {\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\nconst typeLabels = {\n\twp_template: __( 'Template Part' ),\n\twp_template_part: __( 'Template Part' ),\n\twp_block: __( 'Pattern' ),\n};\n\n// Prevent accidental removal of certain blocks, asking the user for\n// confirmation.\nconst blockRemovalRules = {\n\t'core/query': __( 'Query Loop displays a list of posts or pages.' ),\n\t'core/post-content': __(\n\t\t'Post Content displays the content of a post or page.'\n\t),\n};\n\nexport default function Editor( { isLoading } ) {\n\tconst {\n\t\trecord: editedPost,\n\t\tgetTitle,\n\t\tisLoaded: hasLoadedPost,\n\t} = useEditedEntityRecord();\n\n\tconst { id: editedPostId, type: editedPostType } = editedPost;\n\n\tconst {\n\t\tcontext,\n\t\teditorMode,\n\t\tcanvasMode,\n\t\tblockEditorMode,\n\t\tisRightSidebarOpen,\n\t\tisInserterOpen,\n\t\tisListViewOpen,\n\t\tshowIconLabels,\n\t\tshowBlockBreadcrumbs,\n\t\thasPageContentFocus,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEditedPostContext,\n\t\t\tgetEditorMode,\n\t\t\tgetCanvasMode,\n\t\t\tisInserterOpened,\n\t\t\tisListViewOpened,\n\t\t\thasPageContentFocus: _hasPageContentFocus,\n\t\t} = unlock( select( editSiteStore ) );\n\t\tconst { __unstableGetEditorMode } = select( blockEditorStore );\n\t\tconst { getActiveComplementaryArea } = select( interfaceStore );\n\n\t\t// The currently selected entity to display.\n\t\t// Typically template or template part in the site editor.\n\t\treturn {\n\t\t\tcontext: getEditedPostContext(),\n\t\t\teditorMode: getEditorMode(),\n\t\t\tcanvasMode: getCanvasMode(),\n\t\t\tblockEditorMode: __unstableGetEditorMode(),\n\t\t\tisInserterOpen: isInserterOpened(),\n\t\t\tisListViewOpen: isListViewOpened(),\n\t\t\tisRightSidebarOpen: getActiveComplementaryArea(\n\t\t\t\teditSiteStore.name\n\t\t\t),\n\t\t\tshowIconLabels: select( preferencesStore ).get(\n\t\t\t\t'core/edit-site',\n\t\t\t\t'showIconLabels'\n\t\t\t),\n\t\t\tshowBlockBreadcrumbs: select( preferencesStore ).get(\n\t\t\t\t'core/edit-site',\n\t\t\t\t'showBlockBreadcrumbs'\n\t\t\t),\n\t\t\thasPageContentFocus: _hasPageContentFocus(),\n\t\t};\n\t}, [] );\n\tconst { setEditedPostContext } = useDispatch( editSiteStore );\n\n\tconst isViewMode = canvasMode === 'view';\n\tconst isEditMode = canvasMode === 'edit';\n\tconst showVisualEditor = isViewMode || editorMode === 'visual';\n\tconst shouldShowBlockBreadcrumbs =\n\t\tshowBlockBreadcrumbs &&\n\t\tisEditMode &&\n\t\tshowVisualEditor &&\n\t\tblockEditorMode !== 'zoom-out';\n\tconst shouldShowInserter = isEditMode && showVisualEditor && isInserterOpen;\n\tconst shouldShowListView = isEditMode && showVisualEditor && isListViewOpen;\n\tconst secondarySidebarLabel = isListViewOpen\n\t\t? __( 'List View' )\n\t\t: __( 'Block Library' );\n\tconst blockContext = useMemo( () => {\n\t\tconst { postType, postId, ...nonPostFields } = context ?? {};\n\t\treturn {\n\t\t\t...( hasPageContentFocus ? context : nonPostFields ),\n\t\t\tqueryContext: [\n\t\t\t\tcontext?.queryContext || { page: 1 },\n\t\t\t\t( newQueryContext ) =>\n\t\t\t\t\tsetEditedPostContext( {\n\t\t\t\t\t\t...context,\n\t\t\t\t\t\tqueryContext: {\n\t\t\t\t\t\t\t...context?.queryContext,\n\t\t\t\t\t\t\t...newQueryContext,\n\t\t\t\t\t\t},\n\t\t\t\t\t} ),\n\t\t\t],\n\t\t};\n\t}, [ hasPageContentFocus, context, setEditedPostContext ] );\n\n\tlet title;\n\tif ( hasLoadedPost ) {\n\t\tconst type = typeLabels[ editedPostType ] ?? __( 'Template' );\n\t\ttitle = sprintf(\n\t\t\t// translators: A breadcrumb trail in browser tab. %1$s: title of template being edited, %2$s: type of template (Template or Template Part).\n\t\t\t__( '%1$s ‹ %2$s ‹ Editor' ),\n\t\t\tgetTitle(),\n\t\t\ttype\n\t\t);\n\t}\n\n\t// Only announce the title once the editor is ready to prevent \"Replace\"\n\t// action in <URLQueryController> from double-announcing.\n\tuseTitle( hasLoadedPost && title );\n\n\treturn (\n\t\t<>\n\t\t\t{ isLoading ? <CanvasSpinner /> : null }\n\t\t\t{ isEditMode && <WelcomeGuide /> }\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={ editedPostType }\n\t\t\t\t\tid={ editedPostId }\n\t\t\t\t>\n\t\t\t\t\t<BlockContextProvider value={ blockContext }>\n\t\t\t\t\t\t<SidebarComplementaryAreaFills />\n\t\t\t\t\t\t{ isEditMode && <StartTemplateOptions /> }\n\t\t\t\t\t\t<InterfaceSkeleton\n\t\t\t\t\t\t\tisDistractionFree={ true }\n\t\t\t\t\t\t\tenableRegionNavigation={ false }\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t'edit-site-editor__interface-skeleton',\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'show-icon-labels': showIconLabels,\n\t\t\t\t\t\t\t\t\t'is-loading': isLoading,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tnotices={ <EditorSnackbars /> }\n\t\t\t\t\t\t\tcontent={\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<GlobalStylesRenderer />\n\t\t\t\t\t\t\t\t\t{ isEditMode && <EditorNotices /> }\n\t\t\t\t\t\t\t\t\t{ showVisualEditor && editedPost && (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t<BlockEditor />\n\t\t\t\t\t\t\t\t\t\t\t<BlockRemovalWarningModal\n\t\t\t\t\t\t\t\t\t\t\t\trules={ blockRemovalRules }\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{ editorMode === 'text' &&\n\t\t\t\t\t\t\t\t\t\teditedPost &&\n\t\t\t\t\t\t\t\t\t\tisEditMode && <CodeEditor /> }\n\t\t\t\t\t\t\t\t\t{ hasLoadedPost && ! editedPost && (\n\t\t\t\t\t\t\t\t\t\t<Notice\n\t\t\t\t\t\t\t\t\t\t\tstatus=\"warning\"\n\t\t\t\t\t\t\t\t\t\t\tisDismissible={ false }\n\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\t\"You attempted to edit an item that doesn't exist. Perhaps it was deleted?\"\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</Notice>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ isEditMode && (\n\t\t\t\t\t\t\t\t\t\t<KeyboardShortcutsEditMode />\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\tsecondarySidebar={\n\t\t\t\t\t\t\t\tisEditMode &&\n\t\t\t\t\t\t\t\t( ( shouldShowInserter && (\n\t\t\t\t\t\t\t\t\t<InserterSidebar />\n\t\t\t\t\t\t\t\t) ) ||\n\t\t\t\t\t\t\t\t\t( shouldShowListView && (\n\t\t\t\t\t\t\t\t\t\t<ListViewSidebar />\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\tsidebar={\n\t\t\t\t\t\t\t\tisEditMode &&\n\t\t\t\t\t\t\t\tisRightSidebarOpen && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<ComplementaryArea.Slot scope=\"core/edit-site\" />\n\t\t\t\t\t\t\t\t\t\t<SidebarFixedBottomSlot />\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\tfooter={\n\t\t\t\t\t\t\t\tshouldShowBlockBreadcrumbs && (\n\t\t\t\t\t\t\t\t\t<BlockBreadcrumb\n\t\t\t\t\t\t\t\t\t\trootLabelText={\n\t\t\t\t\t\t\t\t\t\t\thasPageContentFocus\n\t\t\t\t\t\t\t\t\t\t\t\t? __( 'Page' )\n\t\t\t\t\t\t\t\t\t\t\t\t: __( 'Template' )\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\tlabels={ {\n\t\t\t\t\t\t\t\t...interfaceLabels,\n\t\t\t\t\t\t\t\tsecondarySidebar: secondarySidebarLabel,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\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 * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { Warning } from '@wordpress/block-editor';\nimport { useCopyToClipboard } from '@wordpress/compose';\n\nfunction CopyButton( { text, children } ) {\n\tconst ref = useCopyToClipboard( text );\n\treturn (\n\t\t<Button variant=\"secondary\" ref={ ref }>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n\nexport default function ErrorBoundaryWarning( { message, error } ) {\n\tconst actions = [\n\t\t<CopyButton key=\"copy-error\" text={ error.stack }>\n\t\t\t{ __( 'Copy Error' ) }\n\t\t</CopyButton>,\n\t];\n\n\treturn (\n\t\t<Warning className=\"editor-error-boundary\" actions={ actions }>\n\t\t\t{ message }\n\t\t</Warning>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { doAction } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport ErrorBoundaryWarning from './warning';\n\nexport default class 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\tif ( ! this.state.error ) {\n\t\t\treturn this.props.children;\n\t\t}\n\n\t\treturn (\n\t\t\t<ErrorBoundaryWarning\n\t\t\t\tmessage={ __(\n\t\t\t\t\t'The editor has encountered an unexpected error.'\n\t\t\t\t) }\n\t\t\t\terror={ this.state.error }\n\t\t\t/>\n\t\t);\n\t}\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst listView = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z\" />\n\t</SVG>\n);\n\nexport default listView;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst chevronUpDown = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"m12 20-4.5-3.6-.9 1.2L12 22l5.5-4.4-.9-1.2L12 20zm0-16 4.5 3.6.9-1.2L12 2 6.5 6.4l.9 1.2L12 4z\" />\n\t</SVG>\n);\n\nexport default chevronUpDown;\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst external = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\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\nexport default external;\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: { modifier: 'access', character: '0' },\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];\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=\"edit-site-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=\"edit-site-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\nexport default function Shortcut( {\n\tdescription,\n\tkeyCombination,\n\taliases = [],\n\tariaLabel,\n} ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"edit-site-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"edit-site-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","/**\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\nexport default function 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","/**\n * External dependencies\n */\nimport classnames from 'classnames';\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 { store as interfaceStore } from '@wordpress/interface';\nimport { useSelect, useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { textFormattingShortcuts } from './config';\nimport Shortcut from './shortcut';\nimport DynamicShortcut from './dynamic-shortcut';\n\nexport const KEYBOARD_SHORTCUT_HELP_MODAL_NAME =\n\t'edit-site/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=\"edit-site-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=\"edit-site-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={ classnames(\n\t\t\t'edit-site-keyboard-shortcut-help-modal__section',\n\t\t\tclassName\n\t\t) }\n\t>\n\t\t{ !! title && (\n\t\t\t<h2 className=\"edit-site-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\nexport default function KeyboardShortcutHelpModal() {\n\tconst isModalActive = useSelect( ( select ) =>\n\t\tselect( interfaceStore ).isModalActive(\n\t\t\tKEYBOARD_SHORTCUT_HELP_MODAL_NAME\n\t\t)\n\t);\n\tconst { closeModal, openModal } = useDispatch( interfaceStore );\n\tconst toggleModal = () =>\n\t\tisModalActive\n\t\t\t? closeModal()\n\t\t\t: openModal( KEYBOARD_SHORTCUT_HELP_MODAL_NAME );\n\tuseShortcut( 'core/edit-site/keyboard-shortcuts', toggleModal );\n\tif ( ! isModalActive ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"edit-site-keyboard-shortcut-help-modal\"\n\t\t\ttitle={ __( 'Keyboard shortcuts' ) }\n\t\t\tonRequestClose={ toggleModal }\n\t\t>\n\t\t\t<ShortcutSection\n\t\t\t\tclassName=\"edit-site-keyboard-shortcut-help-modal__main-shortcuts\"\n\t\t\t\tshortcuts={ [ 'core/edit-site/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</Modal>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { ___unstablePreferencesModalBaseOption as BaseOption } from '@wordpress/interface';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\nexport default function EnableFeature( props ) {\n\tconst { featureName, onToggle = () => {}, ...remainingProps } = props;\n\tconst isChecked = useSelect(\n\t\t( select ) =>\n\t\t\t!! select( preferencesStore ).get( 'core/edit-site', featureName ),\n\t\t[ featureName ]\n\t);\n\tconst { toggle } = useDispatch( preferencesStore );\n\tconst onChange = () => {\n\t\tonToggle();\n\t\ttoggle( 'core/edit-site', featureName );\n\t};\n\treturn (\n\t\t<BaseOption\n\t\t\tonChange={ onChange }\n\t\t\tisChecked={ isChecked }\n\t\t\t{ ...remainingProps }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tPreferencesModal,\n\tPreferencesModalTabs,\n\tPreferencesModalSection,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport { useMemo } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect, useDispatch, useRegistry } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport EnableFeature from './enable-feature';\nimport { store as editSiteStore } from '../../store';\n\nexport const PREFERENCES_MODAL_NAME = 'edit-site/preferences';\n\nexport default function EditSitePreferencesModal() {\n\tconst isModalActive = useSelect( ( select ) =>\n\t\tselect( interfaceStore ).isModalActive( PREFERENCES_MODAL_NAME )\n\t);\n\tconst { closeModal, openModal } = useDispatch( interfaceStore );\n\tconst toggleModal = () =>\n\t\tisModalActive ? closeModal() : openModal( PREFERENCES_MODAL_NAME );\n\tconst registry = useRegistry();\n\tconst { closeGeneralSidebar, setIsListViewOpened, setIsInserterOpened } =\n\t\tuseDispatch( editSiteStore );\n\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\tconst toggleDistractionFree = () => {\n\t\tregistry.batch( () => {\n\t\t\tsetPreference( 'core/edit-site', 'fixedToolbar', false );\n\t\t\tsetIsInserterOpened( false );\n\t\t\tsetIsListViewOpened( false );\n\t\t\tcloseGeneralSidebar();\n\t\t} );\n\t};\n\n\tconst sections = useMemo( () => [\n\t\t{\n\t\t\tname: 'general',\n\t\t\ttabLabel: __( 'General' ),\n\t\t\tcontent: (\n\t\t\t\t<PreferencesModalSection\n\t\t\t\t\ttitle={ __( 'Appearance' ) }\n\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t'Customize options related to the block editor interface and editing flow.'\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t<EnableFeature\n\t\t\t\t\t\tfeatureName=\"distractionFree\"\n\t\t\t\t\t\tonToggle={ toggleDistractionFree }\n\t\t\t\t\t\thelp={ __(\n\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) }\n\t\t\t\t\t\tlabel={ __( 'Distraction free' ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<EnableFeature\n\t\t\t\t\t\tfeatureName=\"focusMode\"\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'Highlights the current block and fades other content.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tlabel={ __( 'Spotlight mode' ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<EnableFeature\n\t\t\t\t\t\tfeatureName=\"showIconLabels\"\n\t\t\t\t\t\tlabel={ __( 'Show button text labels' ) }\n\t\t\t\t\t\thelp={ __( 'Show text instead of icons on buttons.' ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<EnableFeature\n\t\t\t\t\t\tfeatureName=\"showListViewByDefault\"\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'Opens the block list view sidebar by default.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tlabel={ __( 'Always open list view' ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<EnableFeature\n\t\t\t\t\t\tfeatureName=\"showBlockBreadcrumbs\"\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'Shows block breadcrumbs at the bottom of the editor.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tlabel={ __( 'Display block breadcrumbs' ) }\n\t\t\t\t\t/>\n\t\t\t\t</PreferencesModalSection>\n\t\t\t),\n\t\t},\n\t\t{\n\t\t\tname: 'blocks',\n\t\t\ttabLabel: __( 'Blocks' ),\n\t\t\tcontent: (\n\t\t\t\t<PreferencesModalSection\n\t\t\t\t\ttitle={ __( 'Block interactions' ) }\n\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t'Customize how you interact with blocks in the block library and editing canvas.'\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t<EnableFeature\n\t\t\t\t\t\tfeatureName=\"keepCaretInsideBlock\"\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'Aids screen readers by stopping text caret from leaving blocks.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tlabel={ __( 'Contain text cursor inside block' ) }\n\t\t\t\t\t/>\n\t\t\t\t</PreferencesModalSection>\n\t\t\t),\n\t\t},\n\t] );\n\tif ( ! isModalActive ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<PreferencesModal closeModal={ toggleModal }>\n\t\t\t<PreferencesModalTabs sections={ sections } />\n\t\t</PreferencesModal>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\nconst { Fill: ToolsMoreMenuGroup, Slot } = createSlotFill(\n\t'EditSiteToolsMoreMenuGroup'\n);\n\nToolsMoreMenuGroup.Slot = ( { fillProps } ) => (\n\t<Slot fillProps={ fillProps }>\n\t\t{ ( fills ) => fills && fills.length > 0 }\n\t</Slot>\n);\n\nexport default ToolsMoreMenuGroup;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst download = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\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\nexport default download;\n","/**\n * External dependencies\n */\nimport downloadjs from 'downloadjs';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { MenuItem } from '@wordpress/components';\nimport apiFetch from '@wordpress/api-fetch';\nimport { download } from '@wordpress/icons';\nimport { useDispatch } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\n\nexport default function SiteExport() {\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\n\tasync function handleExport() {\n\t\ttry {\n\t\t\tconst response = await apiFetch( {\n\t\t\t\tpath: '/wp-block-editor/v1/export',\n\t\t\t\tparse: false,\n\t\t\t\theaders: {\n\t\t\t\t\tAccept: 'application/zip',\n\t\t\t\t},\n\t\t\t} );\n\t\t\tconst blob = await response.blob();\n\t\t\tconst contentDisposition = response.headers.get(\n\t\t\t\t'content-disposition'\n\t\t\t);\n\t\t\tconst contentDispositionMatches =\n\t\t\t\tcontentDisposition.match( /=(.+)\\.zip/ );\n\t\t\tconst fileName = contentDispositionMatches[ 1 ]\n\t\t\t\t? contentDispositionMatches[ 1 ]\n\t\t\t\t: 'edit-site-export';\n\n\t\t\tdownloadjs( blob, fileName + '.zip', 'application/zip' );\n\t\t} catch ( errorResponse ) {\n\t\t\tlet error = {};\n\t\t\ttry {\n\t\t\t\terror = await errorResponse.json();\n\t\t\t} catch ( e ) {}\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 creating the site export.' );\n\n\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t}\n\t}\n\n\treturn (\n\t\t<MenuItem\n\t\t\trole=\"menuitem\"\n\t\t\ticon={ download }\n\t\t\tonClick={ handleExport }\n\t\t\tinfo={ __(\n\t\t\t\t'Download your theme with updated templates and styles.'\n\t\t\t) }\n\t\t>\n\t\t\t{ _x( 'Export', 'site exporter menu item' ) }\n\t\t</MenuItem>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { MenuItem } from '@wordpress/components';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\nexport default function WelcomeGuideMenuItem() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\treturn (\n\t\t<MenuItem onClick={ () => toggle( 'core/edit-site', 'welcomeGuide' ) }>\n\t\t\t{ __( 'Welcome Guide' ) }\n\t\t</MenuItem>\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 editSiteStore } from '../../../store';\n\nexport default function CopyContentMenuItem() {\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst getText = useSelect( ( select ) => {\n\t\treturn () => {\n\t\t\tconst { getEditedPostId, getEditedPostType } =\n\t\t\t\tselect( editSiteStore );\n\t\t\tconst { getEditedEntityRecord } = select( coreStore );\n\t\t\tconst record = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tgetEditedPostType(),\n\t\t\t\tgetEditedPostId()\n\t\t\t);\n\t\t\tif ( record ) {\n\t\t\t\tif ( typeof record.content === 'function' ) {\n\t\t\t\t\treturn record.content( record );\n\t\t\t\t} else if ( record.blocks ) {\n\t\t\t\t\treturn __unstableSerializeAndClean( record.blocks );\n\t\t\t\t} else if ( record.content ) {\n\t\t\t\t\treturn record.content;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn '';\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 editSiteStore } 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, mode } = useSelect(\n\t\t( select ) => ( {\n\t\t\tshortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getShortcutRepresentation( 'core/edit-site/toggle-mode' ),\n\t\t\tisRichEditingEnabled:\n\t\t\t\tselect( editSiteStore ).getSettings().richEditingEnabled,\n\t\t\tisCodeEditingEnabled:\n\t\t\t\tselect( editSiteStore ).getSettings().codeEditingEnabled,\n\t\t\tmode: select( editSiteStore ).getEditorMode(),\n\t\t} ),\n\t\t[]\n\t);\n\tconst { switchEditorMode } = useDispatch( editSiteStore );\n\n\tconst choices = MODES.map( ( choice ) => {\n\t\tif ( choice.value !== mode ) {\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={ mode }\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 { __, _x } from '@wordpress/i18n';\nimport { useSelect, useDispatch, useRegistry } from '@wordpress/data';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { external } from '@wordpress/icons';\nimport { MenuGroup, MenuItem, VisuallyHidden } from '@wordpress/components';\nimport {\n\tActionItem,\n\tMoreMenuDropdown,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport {\n\tPreferenceToggleMenuItem,\n\tstore as preferencesStore,\n} from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport {\n\tKEYBOARD_SHORTCUT_HELP_MODAL_NAME,\n\tdefault as KeyboardShortcutHelpModal,\n} from '../../keyboard-shortcut-help-modal';\nimport {\n\tPREFERENCES_MODAL_NAME,\n\tdefault as EditSitePreferencesModal,\n} from '../../preferences-modal';\nimport ToolsMoreMenuGroup from '../tools-more-menu-group';\nimport SiteExport from './site-export';\nimport WelcomeGuideMenuItem from './welcome-guide-menu-item';\nimport CopyContentMenuItem from './copy-content-menu-item';\nimport ModeSwitcher from '../mode-switcher';\nimport { store as siteEditorStore } from '../../../store';\n\nexport default function MoreMenu( { showIconLabels } ) {\n\tconst registry = useRegistry();\n\tconst isDistractionFree = useSelect(\n\t\t( select ) =>\n\t\t\tselect( preferencesStore ).get(\n\t\t\t\t'core/edit-site',\n\t\t\t\t'distractionFree'\n\t\t\t),\n\t\t[]\n\t);\n\n\tconst { setIsInserterOpened, setIsListViewOpened, closeGeneralSidebar } =\n\t\tuseDispatch( siteEditorStore );\n\tconst { openModal } = useDispatch( interfaceStore );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\n\tconst toggleDistractionFree = () => {\n\t\tregistry.batch( () => {\n\t\t\tsetPreference( 'core/edit-site', 'fixedToolbar', false );\n\t\t\tsetIsInserterOpened( false );\n\t\t\tsetIsListViewOpened( false );\n\t\t\tcloseGeneralSidebar();\n\t\t} );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<MoreMenuDropdown\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} }\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/edit-site\"\n\t\t\t\t\t\t\t\tname=\"fixedToolbar\"\n\t\t\t\t\t\t\t\tdisabled={ isDistractionFree }\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/edit-site\"\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<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core/edit-site\"\n\t\t\t\t\t\t\t\tname=\"distractionFree\"\n\t\t\t\t\t\t\t\tonToggle={ toggleDistractionFree }\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\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</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/edit-site/plugin-more-menu\"\n\t\t\t\t\t\t\tlabel={ __( 'Plugins' ) }\n\t\t\t\t\t\t\tas={ MenuGroup }\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<SiteExport />\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(\n\t\t\t\t\t\t\t\t\t\tKEYBOARD_SHORTCUT_HELP_MODAL_NAME\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\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<WelcomeGuideMenuItem />\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\trole=\"menuitem\"\n\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/site-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( PREFERENCES_MODAL_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{ __( '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</MoreMenuDropdown>\n\t\t\t<KeyboardShortcutHelpModal />\n\t\t\t<EditSitePreferencesModal />\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst undo = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\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\nexport default undo;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst redo = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\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\nexport default redo;\n","/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { undo as undoIcon, redo as redoIcon } from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { forwardRef } from '@wordpress/element';\n\nfunction UndoButton( props, ref ) {\n\tconst hasUndo = useSelect(\n\t\t( select ) => select( coreStore ).hasUndo(),\n\t\t[]\n\t);\n\tconst { undo } = useDispatch( coreStore );\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ticon={ ! isRTL() ? undoIcon : redoIcon }\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/>\n\t);\n}\n\nexport default forwardRef( UndoButton );\n","/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { redo as redoIcon, undo as undoIcon } from '@wordpress/icons';\nimport { displayShortcut, isAppleOS } from '@wordpress/keycodes';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { forwardRef } from '@wordpress/element';\n\nfunction RedoButton( 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( coreStore ).hasRedo(),\n\t\t[]\n\t);\n\tconst { redo } = useDispatch( coreStore );\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ticon={ ! isRTL() ? redoIcon : undoIcon }\n\t\t\tlabel={ __( 'Redo' ) }\n\t\t\tshortcut={ shortcut }\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={ ! hasRedo }\n\t\t\tonClick={ hasRedo ? redo : undefined }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( RedoButton );\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { sprintf, __ } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tButton,\n\tVisuallyHidden,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { BlockIcon } from '@wordpress/block-editor';\nimport { store as commandsStore } from '@wordpress/commands';\nimport {\n\tchevronLeftSmall as chevronLeftSmallIcon,\n\tpage as pageIcon,\n\tnavigation as navigationIcon,\n\tsymbol,\n} from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { useState, useEffect, useRef } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport useEditedEntityRecord from '../../use-edited-entity-record';\nimport { store as editSiteStore } from '../../../store';\n\nexport default function DocumentActions() {\n\tconst isPage = useSelect( ( select ) => select( editSiteStore ).isPage() );\n\treturn isPage ? <PageDocumentActions /> : <TemplateDocumentActions />;\n}\n\nfunction PageDocumentActions() {\n\tconst { hasPageContentFocus, hasResolved, isFound, title } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\thasPageContentFocus: _hasPageContentFocus,\n\t\t\t\tgetEditedPostContext,\n\t\t\t} = select( editSiteStore );\n\t\t\tconst { getEditedEntityRecord, hasFinishedResolution } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst context = getEditedPostContext();\n\t\t\tconst queryArgs = [ 'postType', context.postType, context.postId ];\n\t\t\tconst page = getEditedEntityRecord( ...queryArgs );\n\t\t\treturn {\n\t\t\t\thasPageContentFocus: _hasPageContentFocus(),\n\t\t\t\thasResolved: hasFinishedResolution(\n\t\t\t\t\t'getEditedEntityRecord',\n\t\t\t\t\tqueryArgs\n\t\t\t\t),\n\t\t\t\tisFound: !! page,\n\t\t\t\ttitle: page?.title,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst { setHasPageContentFocus } = useDispatch( editSiteStore );\n\n\tconst [ hasEditedTemplate, setHasEditedTemplate ] = useState( false );\n\tconst prevHasPageContentFocus = useRef( false );\n\tuseEffect( () => {\n\t\tif ( prevHasPageContentFocus.current && ! hasPageContentFocus ) {\n\t\t\tsetHasEditedTemplate( true );\n\t\t}\n\t\tprevHasPageContentFocus.current = hasPageContentFocus;\n\t}, [ hasPageContentFocus ] );\n\n\tif ( ! hasResolved ) {\n\t\treturn null;\n\t}\n\n\tif ( ! isFound ) {\n\t\treturn (\n\t\t\t<div className=\"edit-site-document-actions\">\n\t\t\t\t{ __( 'Document not found' ) }\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn hasPageContentFocus ? (\n\t\t<BaseDocumentActions\n\t\t\tclassName={ classnames( 'is-page', {\n\t\t\t\t'is-animated': hasEditedTemplate,\n\t\t\t} ) }\n\t\t\ticon={ pageIcon }\n\t\t>\n\t\t\t{ title }\n\t\t</BaseDocumentActions>\n\t) : (\n\t\t<TemplateDocumentActions\n\t\t\tclassName=\"is-animated\"\n\t\t\tonBack={ () => setHasPageContentFocus( true ) }\n\t\t/>\n\t);\n}\n\nfunction TemplateDocumentActions( { className, onBack } ) {\n\tconst { isLoaded, record, getTitle, icon } = useEditedEntityRecord();\n\n\tif ( ! isLoaded ) {\n\t\treturn null;\n\t}\n\n\tif ( ! record ) {\n\t\treturn (\n\t\t\t<div className=\"edit-site-document-actions\">\n\t\t\t\t{ __( 'Document not found' ) }\n\t\t\t</div>\n\t\t);\n\t}\n\n\tconst entityLabel = getEntityLabel( record.type );\n\n\tlet typeIcon = icon;\n\tif ( record.type === 'wp_navigation' ) {\n\t\ttypeIcon = navigationIcon;\n\t} else if ( record.type === 'wp_block' ) {\n\t\ttypeIcon = symbol;\n\t}\n\n\treturn (\n\t\t<BaseDocumentActions\n\t\t\tclassName={ className }\n\t\t\ticon={ typeIcon }\n\t\t\tonBack={ onBack }\n\t\t>\n\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t{ sprintf(\n\t\t\t\t\t/* translators: %s: the entity being edited, like \"template\"*/\n\t\t\t\t\t__( 'Editing %s: ' ),\n\t\t\t\t\tentityLabel\n\t\t\t\t) }\n\t\t\t</VisuallyHidden>\n\t\t\t{ getTitle() }\n\t\t</BaseDocumentActions>\n\t);\n}\n\nfunction BaseDocumentActions( { className, icon, children, onBack } ) {\n\tconst { open: openCommandCenter } = useDispatch( commandsStore );\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames( 'edit-site-document-actions', className ) }\n\t\t>\n\t\t\t{ onBack && (\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"edit-site-document-actions__back\"\n\t\t\t\t\ticon={ chevronLeftSmallIcon }\n\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\tonBack();\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Back' ) }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t\t<Button\n\t\t\t\tclassName=\"edit-site-document-actions__command\"\n\t\t\t\tonClick={ () => openCommandCenter() }\n\t\t\t>\n\t\t\t\t<HStack\n\t\t\t\t\tclassName=\"edit-site-document-actions__title\"\n\t\t\t\t\tspacing={ 1 }\n\t\t\t\t\tjustify=\"center\"\n\t\t\t\t>\n\t\t\t\t\t<BlockIcon icon={ icon } />\n\t\t\t\t\t<Text size=\"body\" as=\"h1\">\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</Text>\n\t\t\t\t</HStack>\n\t\t\t\t<span className=\"edit-site-document-actions__shortcut\">\n\t\t\t\t\t{ displayShortcut.primary( 'k' ) }\n\t\t\t\t</span>\n\t\t\t</Button>\n\t\t</div>\n\t);\n}\n\nfunction getEntityLabel( entityType ) {\n\tlet label = '';\n\tswitch ( entityType ) {\n\t\tcase 'wp_navigation':\n\t\t\tlabel = 'navigation menu';\n\t\t\tbreak;\n\t\tcase 'wp_template_part':\n\t\t\tlabel = 'template part';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tlabel = 'template';\n\t\t\tbreak;\n\t}\n\n\treturn label;\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useRef } from '@wordpress/element';\nimport { useViewportMatch, useReducedMotion } from '@wordpress/compose';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tToolSelector,\n\t__experimentalPreviewOptions as PreviewOptions,\n\tNavigableToolbar,\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { PinnedItems } from '@wordpress/interface';\nimport { _x, __ } from '@wordpress/i18n';\nimport { listView, plus, external, chevronUpDown } from '@wordpress/icons';\nimport {\n\t__unstableMotion as motion,\n\tButton,\n\tToolbarItem,\n\tMenuGroup,\n\tMenuItem,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport MoreMenu from './more-menu';\nimport SaveButton from '../save-button';\nimport UndoButton from './undo-redo/undo';\nimport RedoButton from './undo-redo/redo';\nimport DocumentActions from './document-actions';\nimport { store as editSiteStore } from '../../store';\nimport {\n\tgetEditorCanvasContainerTitle,\n\tuseHasEditorCanvasContainer,\n} from '../editor-canvas-container';\nimport { unlock } from '../../lock-unlock';\n\nconst { useShouldContextualToolbarShow } = unlock( blockEditorPrivateApis );\n\nconst preventDefault = ( event ) => {\n\tevent.preventDefault();\n};\n\nexport default function HeaderEditMode() {\n\tconst inserterButton = useRef();\n\tconst {\n\t\tdeviceType,\n\t\ttemplateType,\n\t\tisInserterOpen,\n\t\tisListViewOpen,\n\t\tlistViewShortcut,\n\t\tisVisualMode,\n\t\tisDistractionFree,\n\t\tblockEditorMode,\n\t\thomeUrl,\n\t\tshowIconLabels,\n\t\teditorCanvasView,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\t__experimentalGetPreviewDeviceType,\n\t\t\tgetEditedPostType,\n\t\t\tisInserterOpened,\n\t\t\tisListViewOpened,\n\t\t\tgetEditorMode,\n\t\t} = select( editSiteStore );\n\t\tconst { getShortcutRepresentation } = select( keyboardShortcutsStore );\n\t\tconst { __unstableGetEditorMode } = select( blockEditorStore );\n\n\t\tconst postType = getEditedPostType();\n\n\t\tconst {\n\t\t\tgetUnstableBase, // Site index.\n\t\t} = select( coreStore );\n\n\t\treturn {\n\t\t\tdeviceType: __experimentalGetPreviewDeviceType(),\n\t\t\ttemplateType: postType,\n\t\t\tisInserterOpen: isInserterOpened(),\n\t\t\tisListViewOpen: isListViewOpened(),\n\t\t\tlistViewShortcut: getShortcutRepresentation(\n\t\t\t\t'core/edit-site/toggle-list-view'\n\t\t\t),\n\t\t\tisVisualMode: getEditorMode() === 'visual',\n\t\t\tblockEditorMode: __unstableGetEditorMode(),\n\t\t\thomeUrl: getUnstableBase()?.home,\n\t\t\tshowIconLabels: select( preferencesStore ).get(\n\t\t\t\t'core/edit-site',\n\t\t\t\t'showIconLabels'\n\t\t\t),\n\t\t\teditorCanvasView: unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t).getEditorCanvasContainerView(),\n\t\t\tisDistractionFree: select( preferencesStore ).get(\n\t\t\t\t'core/edit-site',\n\t\t\t\t'distractionFree'\n\t\t\t),\n\t\t};\n\t}, [] );\n\n\tconst { get: getPreference } = useSelect( preferencesStore );\n\tconst hasFixedToolbar = getPreference( editSiteStore.name, 'fixedToolbar' );\n\n\tconst {\n\t\t__experimentalSetPreviewDeviceType: setPreviewDeviceType,\n\t\tsetIsInserterOpened,\n\t\tsetIsListViewOpened,\n\t} = useDispatch( editSiteStore );\n\tconst { __unstableSetEditorMode } = useDispatch( blockEditorStore );\n\tconst disableMotion = useReducedMotion();\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\n\tconst toggleInserter = useCallback( () => {\n\t\tif ( isInserterOpen ) {\n\t\t\t// Focusing the inserter button should close the inserter popover.\n\t\t\t// However, there are some cases it won't close when the focus is lost.\n\t\t\t// See https://github.com/WordPress/gutenberg/issues/43090 for more details.\n\t\t\tinserterButton.current.focus();\n\t\t\tsetIsInserterOpened( false );\n\t\t} else {\n\t\t\tsetIsInserterOpened( true );\n\t\t}\n\t}, [ isInserterOpen, setIsInserterOpened ] );\n\n\tconst toggleListView = useCallback(\n\t\t() => setIsListViewOpened( ! isListViewOpen ),\n\t\t[ setIsListViewOpened, isListViewOpen ]\n\t);\n\n\tconst {\n\t\tshouldShowContextualToolbar,\n\t\tcanFocusHiddenToolbar,\n\t\tfixedToolbarCanBeFocused,\n\t} = useShouldContextualToolbarShow();\n\t// If there's a block toolbar to be focused, disable the focus shortcut for the document toolbar.\n\t// There's a fixed block toolbar when the fixed toolbar option is enabled or when the browser width is less than the large viewport.\n\tconst blockToolbarCanBeFocused =\n\t\tshouldShowContextualToolbar ||\n\t\tcanFocusHiddenToolbar ||\n\t\tfixedToolbarCanBeFocused;\n\n\tconst hasDefaultEditorCanvasView = ! useHasEditorCanvasContainer();\n\n\tconst isFocusMode =\n\t\ttemplateType === 'wp_template_part' || templateType === 'wp_navigation';\n\n\t/* translators: button label text should, if possible, be under 16 characters. */\n\tconst longLabel = _x(\n\t\t'Toggle block inserter',\n\t\t'Generic label for block inserter button'\n\t);\n\tconst shortLabel = ! isInserterOpen ? __( 'Add' ) : __( 'Close' );\n\n\tconst isZoomedOutViewExperimentEnabled =\n\t\twindow?.__experimentalEnableZoomedOutView && isVisualMode;\n\tconst isZoomedOutView = blockEditorMode === 'zoom-out';\n\n\tconst toolbarVariants = {\n\t\tisDistractionFree: { y: '-50px' },\n\t\tisDistractionFreeHovering: { y: 0 },\n\t\tview: { y: 0 },\n\t\tedit: { y: 0 },\n\t};\n\n\tconst toolbarTransition = {\n\t\ttype: 'tween',\n\t\tduration: disableMotion ? 0 : 0.2,\n\t\tease: 'easeOut',\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames( 'edit-site-header-edit-mode', {\n\t\t\t\t'show-icon-labels': showIconLabels,\n\t\t\t} ) }\n\t\t>\n\t\t\t{ hasDefaultEditorCanvasView && (\n\t\t\t\t<NavigableToolbar\n\t\t\t\t\tas={ motion.div }\n\t\t\t\t\tclassName=\"edit-site-header-edit-mode__start\"\n\t\t\t\t\taria-label={ __( 'Document tools' ) }\n\t\t\t\t\tshouldUseKeyboardFocusShortcut={\n\t\t\t\t\t\t! blockToolbarCanBeFocused\n\t\t\t\t\t}\n\t\t\t\t\tvariants={ toolbarVariants }\n\t\t\t\t\ttransition={ toolbarTransition }\n\t\t\t\t>\n\t\t\t\t\t<div className=\"edit-site-header-edit-mode__toolbar\">\n\t\t\t\t\t\t{ ! isDistractionFree && (\n\t\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\t\tref={ inserterButton }\n\t\t\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\t\t\tclassName=\"edit-site-header-edit-mode__inserter-toggle\"\n\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\tisPressed={ isInserterOpen }\n\t\t\t\t\t\t\t\tonMouseDown={ preventDefault }\n\t\t\t\t\t\t\t\tonClick={ toggleInserter }\n\t\t\t\t\t\t\t\tdisabled={ ! isVisualMode }\n\t\t\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\tshowIconLabels ? shortLabel : longLabel\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{ ! hasFixedToolbar && (\n\t\t\t\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\t\t\t\tas={ ToolSelector }\n\t\t\t\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\tshowIconLabels\n\t\t\t\t\t\t\t\t\t\t\t\t? 'tertiary'\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\tdisabled={ ! isVisualMode }\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<ToolbarItem\n\t\t\t\t\t\t\t\t\tas={ UndoButton }\n\t\t\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\tshowIconLabels ? 'tertiary' : undefined\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<ToolbarItem\n\t\t\t\t\t\t\t\t\tas={ RedoButton }\n\t\t\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\tshowIconLabels ? 'tertiary' : undefined\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{ ! isDistractionFree && (\n\t\t\t\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\t\t\t\t\tclassName=\"edit-site-header-edit-mode__list-view-toggle\"\n\t\t\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\t\t\t! isVisualMode || isZoomedOutView\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\ticon={ listView }\n\t\t\t\t\t\t\t\t\t\tisPressed={ isListViewOpen }\n\t\t\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\t\t\tlabel={ __( 'List View' ) }\n\t\t\t\t\t\t\t\t\t\tonClick={ toggleListView }\n\t\t\t\t\t\t\t\t\t\tshortcut={ listViewShortcut }\n\t\t\t\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\tshowIconLabels\n\t\t\t\t\t\t\t\t\t\t\t\t? 'tertiary'\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/>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ isZoomedOutViewExperimentEnabled &&\n\t\t\t\t\t\t\t\t\t! isDistractionFree &&\n\t\t\t\t\t\t\t\t\t! hasFixedToolbar && (\n\t\t\t\t\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"edit-site-header-edit-mode__zoom-out-view-toggle\"\n\t\t\t\t\t\t\t\t\t\t\ticon={ chevronUpDown }\n\t\t\t\t\t\t\t\t\t\t\tisPressed={ isZoomedOutView }\n\t\t\t\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\t\t\t\tlabel={ __( 'Zoom-out View' ) }\n\t\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\t\tsetPreviewDeviceType(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'desktop'\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__unstableSetEditorMode(\n\t\t\t\t\t\t\t\t\t\t\t\t\tisZoomedOutView\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'edit'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'zoom-out'\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</>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</div>\n\t\t\t\t</NavigableToolbar>\n\t\t\t) }\n\n\t\t\t{ ! isDistractionFree && (\n\t\t\t\t<div className=\"edit-site-header-edit-mode__center\">\n\t\t\t\t\t{ ! hasDefaultEditorCanvasView ? (\n\t\t\t\t\t\tgetEditorCanvasContainerTitle( editorCanvasView )\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<DocumentActions />\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t<div className=\"edit-site-header-edit-mode__end\">\n\t\t\t\t<motion.div\n\t\t\t\t\tclassName=\"edit-site-header-edit-mode__actions\"\n\t\t\t\t\tvariants={ toolbarVariants }\n\t\t\t\t\ttransition={ toolbarTransition }\n\t\t\t\t>\n\t\t\t\t\t{ ! isFocusMode && hasDefaultEditorCanvasView && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t'edit-site-header-edit-mode__preview-options',\n\t\t\t\t\t\t\t\t{ 'is-zoomed-out': isZoomedOutView }\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PreviewOptions\n\t\t\t\t\t\t\t\tdeviceType={ deviceType }\n\t\t\t\t\t\t\t\tsetDeviceType={ setPreviewDeviceType }\n\t\t\t\t\t\t\t\tlabel={ __( 'View' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\thref={ homeUrl }\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ __( 'View site' ) }\n\t\t\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\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: accessibility text */\n\t\t\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\t\t}\n\t\t\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t\t</PreviewOptions>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t\t<SaveButton />\n\t\t\t\t\t{ ! isDistractionFree && (\n\t\t\t\t\t\t<PinnedItems.Slot scope=\"core/edit-site\" />\n\t\t\t\t\t) }\n\t\t\t\t\t<MoreMenu showIconLabels={ showIconLabels } />\n\t\t\t\t</motion.div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst wordpress = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"-2 -2 24 24\">\n\t\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\nexport default wordpress;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { Icon } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { wordpress } from '@wordpress/icons';\nimport { store as coreDataStore } from '@wordpress/core-data';\n\nfunction SiteIcon( { className } ) {\n\tconst { isRequestingSite, siteIconUrl } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord } = select( coreDataStore );\n\t\tconst siteData = getEntityRecord( 'root', '__unstableBase', undefined );\n\n\t\treturn {\n\t\t\tisRequestingSite: ! siteData,\n\t\t\tsiteIconUrl: siteData?.site_icon_url,\n\t\t};\n\t}, [] );\n\n\tif ( isRequestingSite && ! siteIconUrl ) {\n\t\treturn <div className=\"edit-site-site-icon__image\" />;\n\t}\n\n\tconst icon = siteIconUrl ? (\n\t\t<img\n\t\t\tclassName=\"edit-site-site-icon__image\"\n\t\t\talt={ __( 'Site Icon' ) }\n\t\t\tsrc={ siteIconUrl }\n\t\t/>\n\t) : (\n\t\t<Icon\n\t\t\tclassName=\"edit-site-site-icon__icon\"\n\t\t\tsize=\"48px\"\n\t\t\ticon={ wordpress }\n\t\t/>\n\t);\n\n\treturn (\n\t\t<div className={ classnames( className, 'edit-site-site-icon' ) }>\n\t\t\t{ icon }\n\t\t</div>\n\t);\n}\n\nexport default SiteIcon;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tButton,\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { useReducedMotion } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { forwardRef } from '@wordpress/element';\nimport { search, external } from '@wordpress/icons';\nimport { store as commandsStore } from '@wordpress/commands';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport SiteIcon from '../site-icon';\nimport { unlock } from '../../lock-unlock';\n\nconst HUB_ANIMATION_DURATION = 0.3;\n\nconst SiteHub = forwardRef( ( props, ref ) => {\n\tconst { canvasMode, dashboardLink, homeUrl } = useSelect( ( select ) => {\n\t\tconst { getCanvasMode, getSettings } = unlock(\n\t\t\tselect( editSiteStore )\n\t\t);\n\n\t\tconst {\n\t\t\tgetUnstableBase, // Site index.\n\t\t} = select( coreStore );\n\n\t\treturn {\n\t\t\tcanvasMode: getCanvasMode(),\n\t\t\tdashboardLink:\n\t\t\t\tgetSettings().__experimentalDashboardLink || 'index.php',\n\t\t\thomeUrl: getUnstableBase()?.home,\n\t\t};\n\t}, [] );\n\tconst { open: openCommandCenter } = useDispatch( commandsStore );\n\n\tconst disableMotion = useReducedMotion();\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\tconst { clearSelectedBlock } = useDispatch( blockEditorStore );\n\tconst isBackToDashboardButton = canvasMode === 'view';\n\tconst siteIconButtonProps = isBackToDashboardButton\n\t\t? {\n\t\t\t\thref: dashboardLink,\n\t\t\t\tlabel: __( 'Go back to the Dashboard' ),\n\t\t  }\n\t\t: {\n\t\t\t\thref: dashboardLink, // We need to keep the `href` here so the component doesn't remount as a `<button>` and break the animation.\n\t\t\t\trole: 'button',\n\t\t\t\tlabel: __( 'Open Navigation' ),\n\t\t\t\tonClick: ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif ( canvasMode === 'edit' ) {\n\t\t\t\t\t\tclearSelectedBlock();\n\t\t\t\t\t\tsetCanvasMode( 'view' );\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t  };\n\n\tconst siteTitle = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityRecord( 'root', 'site' )?.title,\n\t\t[]\n\t);\n\n\treturn (\n\t\t<motion.div\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t\tclassName={ classnames( 'edit-site-site-hub', props.className ) }\n\t\t\tinitial={ false }\n\t\t\ttransition={ {\n\t\t\t\ttype: 'tween',\n\t\t\t\tduration: disableMotion ? 0 : HUB_ANIMATION_DURATION,\n\t\t\t\tease: 'easeOut',\n\t\t\t} }\n\t\t>\n\t\t\t<HStack\n\t\t\t\tjustify=\"space-between\"\n\t\t\t\talignment=\"center\"\n\t\t\t\tclassName=\"edit-site-site-hub__container\"\n\t\t\t>\n\t\t\t\t<HStack\n\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\tclassName=\"edit-site-site-hub__text-content\"\n\t\t\t\t\tspacing=\"0\"\n\t\t\t\t>\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tclassName=\"edit-site-site-hub__view-mode-toggle-container\"\n\t\t\t\t\t\tlayout\n\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\tduration: disableMotion\n\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t: HUB_ANIMATION_DURATION,\n\t\t\t\t\t\t\tease: 'easeOut',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t{ ...siteIconButtonProps }\n\t\t\t\t\t\t\tclassName=\"edit-site-layout__view-mode-toggle\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\tinitial={ false }\n\t\t\t\t\t\t\t\tanimate={ {\n\t\t\t\t\t\t\t\t\tscale: canvasMode === 'view' ? 0.5 : 1,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\twhileHover={ {\n\t\t\t\t\t\t\t\t\tscale: canvasMode === 'view' ? 0.5 : 0.96,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\t\tduration: disableMotion\n\t\t\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t\t\t: HUB_ANIMATION_DURATION,\n\t\t\t\t\t\t\t\t\tease: 'easeOut',\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<SiteIcon className=\"edit-site-layout__view-mode-toggle-icon\" />\n\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</motion.div>\n\n\t\t\t\t\t<AnimatePresence>\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tlayout={ canvasMode === 'edit' }\n\t\t\t\t\t\t\tanimate={ {\n\t\t\t\t\t\t\t\topacity: canvasMode === 'view' ? 1 : 0,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\texit={ {\n\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tclassName=\"edit-site-site-hub__site-title\"\n\t\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\tduration: disableMotion ? 0 : 0.2,\n\t\t\t\t\t\t\t\tease: 'easeOut',\n\t\t\t\t\t\t\t\tdelay: canvasMode === 'view' ? 0.1 : 0,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ decodeEntities( siteTitle ) }\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t</AnimatePresence>\n\t\t\t\t\t{ canvasMode === 'view' && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\thref={ homeUrl }\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\tlabel={ __( 'View site' ) }\n\t\t\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t\t\t'View site (opens in a new tab)'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\tclassName=\"edit-site-site-hub__site-view-link\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\n\t\t\t\t{ canvasMode === 'view' && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"edit-site-site-hub_toggle-command-center\"\n\t\t\t\t\t\ticon={ search }\n\t\t\t\t\t\tonClick={ () => openCommandCenter() }\n\t\t\t\t\t\tlabel={ __( 'Open command palette' ) }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t</motion.div>\n\t);\n} );\n\nexport default SiteHub;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useRef, useEffect } from '@wordpress/element';\nimport {\n\tResizableBox,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\nimport { useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\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\n// The minimum width of the frame (in px) while resizing.\nconst FRAME_MIN_WIDTH = 340;\n// The reference width of the frame (in px) used to calculate the aspect ratio.\nconst FRAME_REFERENCE_WIDTH = 1300;\n// 9 : 19.5 is the target aspect ratio enforced (when possible) while resizing.\nconst FRAME_TARGET_ASPECT_RATIO = 9 / 19.5;\n// The minimum distance (in px) between the frame resize handle and the\n// viewport's edge. If the frame is resized to be closer to the viewport's edge\n// than this distance, then \"canvas mode\" will be enabled.\nconst SNAP_TO_EDIT_CANVAS_MODE_THRESHOLD = 200;\n\nfunction calculateNewHeight( width, initialAspectRatio ) {\n\tconst lerp = ( a, b, amount ) => {\n\t\treturn a + ( b - a ) * amount;\n\t};\n\n\t// Calculate the intermediate aspect ratio based on the current width.\n\tconst lerpFactor =\n\t\t1 -\n\t\tMath.max(\n\t\t\t0,\n\t\t\tMath.min(\n\t\t\t\t1,\n\t\t\t\t( width - FRAME_MIN_WIDTH ) /\n\t\t\t\t\t( FRAME_REFERENCE_WIDTH - FRAME_MIN_WIDTH )\n\t\t\t)\n\t\t);\n\n\t// Calculate the height based on the intermediate aspect ratio\n\t// ensuring the frame arrives at the target aspect ratio.\n\tconst intermediateAspectRatio = lerp(\n\t\tinitialAspectRatio,\n\t\tFRAME_TARGET_ASPECT_RATIO,\n\t\tlerpFactor\n\t);\n\n\treturn width / intermediateAspectRatio;\n}\n\nfunction ResizableFrame( {\n\tisFullWidth,\n\tisReady,\n\tchildren,\n\toversizedClassName,\n\tinnerContentStyle,\n} ) {\n\tconst [ frameSize, setFrameSize ] = useState( {\n\t\twidth: '100%',\n\t\theight: '100%',\n\t} );\n\t// The width of the resizable frame when a new resize gesture starts.\n\tconst [ startingWidth, setStartingWidth ] = useState();\n\tconst [ isResizing, setIsResizing ] = useState( false );\n\tconst [ isHovering, setIsHovering ] = useState( false );\n\tconst [ isOversized, setIsOversized ] = useState( false );\n\tconst [ resizeRatio, setResizeRatio ] = useState( 1 );\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\tconst initialAspectRatioRef = useRef( null );\n\t// The width of the resizable frame on initial render.\n\tconst initialComputedWidthRef = useRef( null );\n\tconst FRAME_TRANSITION = { type: 'tween', duration: isResizing ? 0 : 0.5 };\n\tconst frameRef = useRef( null );\n\n\t// Remember frame dimensions on initial render.\n\tuseEffect( () => {\n\t\tconst { offsetWidth, offsetHeight } = frameRef.current.resizable;\n\t\tinitialComputedWidthRef.current = offsetWidth;\n\t\tinitialAspectRatioRef.current = offsetWidth / offsetHeight;\n\t}, [] );\n\n\tconst handleResizeStart = ( _event, _direction, ref ) => {\n\t\t// Remember the starting width so we don't have to get `ref.offsetWidth` on\n\t\t// every resize event thereafter, which will cause layout thrashing.\n\t\tsetStartingWidth( ref.offsetWidth );\n\t\tsetIsResizing( true );\n\t};\n\n\t// Calculate the frame size based on the window width as its resized.\n\tconst handleResize = ( _event, _direction, _ref, delta ) => {\n\t\tconst normalizedDelta = delta.width / resizeRatio;\n\t\tconst deltaAbs = Math.abs( normalizedDelta );\n\t\tconst maxDoubledDelta =\n\t\t\tdelta.width < 0 // is shrinking\n\t\t\t\t? deltaAbs\n\t\t\t\t: ( initialComputedWidthRef.current - startingWidth ) / 2;\n\t\tconst deltaToDouble = Math.min( deltaAbs, maxDoubledDelta );\n\t\tconst doubleSegment = deltaAbs === 0 ? 0 : deltaToDouble / deltaAbs;\n\t\tconst singleSegment = 1 - doubleSegment;\n\n\t\tsetResizeRatio( singleSegment + doubleSegment * 2 );\n\n\t\tconst updatedWidth = startingWidth + delta.width;\n\n\t\tsetIsOversized( updatedWidth > initialComputedWidthRef.current );\n\n\t\t// Width will be controlled by the library (via `resizeRatio`),\n\t\t// so we only need to update the height.\n\t\tsetFrameSize( {\n\t\t\theight: isOversized\n\t\t\t\t? '100%'\n\t\t\t\t: calculateNewHeight(\n\t\t\t\t\t\tupdatedWidth,\n\t\t\t\t\t\tinitialAspectRatioRef.current\n\t\t\t\t  ),\n\t\t} );\n\t};\n\n\tconst handleResizeStop = ( _event, _direction, ref ) => {\n\t\tsetIsResizing( false );\n\n\t\tif ( ! isOversized ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetIsOversized( false );\n\n\t\tconst remainingWidth =\n\t\t\tref.ownerDocument.documentElement.offsetWidth - ref.offsetWidth;\n\n\t\tif ( remainingWidth > SNAP_TO_EDIT_CANVAS_MODE_THRESHOLD ) {\n\t\t\t// Reset the initial aspect ratio if the frame is resized slightly\n\t\t\t// above the sidebar but not far enough to trigger full screen.\n\t\t\tsetFrameSize( { width: '100%', height: '100%' } );\n\t\t} else {\n\t\t\t// Trigger full screen if the frame is resized far enough to the left.\n\t\t\tsetCanvasMode( 'edit' );\n\t\t}\n\t};\n\n\tconst frameAnimationVariants = {\n\t\tdefault: {\n\t\t\tflexGrow: 0,\n\t\t\theight: frameSize.height,\n\t\t},\n\t\tfullWidth: {\n\t\t\tflexGrow: 1,\n\t\t\theight: frameSize.height,\n\t\t},\n\t};\n\n\tconst resizeHandleVariants = {\n\t\tdefault: {\n\t\t\topacity: 1,\n\t\t\tleft: -16,\n\t\t},\n\t\tresizing: {\n\t\t\topacity: 1,\n\t\t\tleft: -16,\n\t\t\tscaleY: 1.3,\n\t\t},\n\t};\n\n\treturn (\n\t\t<ResizableBox\n\t\t\tas={ motion.div }\n\t\t\tref={ frameRef }\n\t\t\tinitial={ false }\n\t\t\tvariants={ frameAnimationVariants }\n\t\t\tanimate={ isFullWidth ? 'fullWidth' : 'default' }\n\t\t\tonAnimationComplete={ ( definition ) => {\n\t\t\t\tif ( definition === 'fullWidth' )\n\t\t\t\t\tsetFrameSize( { width: '100%', height: '100%' } );\n\t\t\t} }\n\t\t\ttransition={ FRAME_TRANSITION }\n\t\t\tsize={ frameSize }\n\t\t\tenable={ {\n\t\t\t\ttop: false,\n\t\t\t\tright: false,\n\t\t\t\tbottom: false,\n\t\t\t\t// Resizing will be disabled until the editor content is loaded.\n\t\t\t\tleft: isReady,\n\t\t\t\ttopRight: false,\n\t\t\t\tbottomRight: false,\n\t\t\t\tbottomLeft: false,\n\t\t\t\ttopLeft: false,\n\t\t\t} }\n\t\t\tresizeRatio={ resizeRatio }\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\tminWidth={ FRAME_MIN_WIDTH }\n\t\t\tmaxWidth={ isFullWidth ? '100%' : '150%' }\n\t\t\tmaxHeight={ '100%' }\n\t\t\tonMouseOver={ () => setIsHovering( true ) }\n\t\t\tonMouseOut={ () => setIsHovering( false ) }\n\t\t\thandleComponent={ {\n\t\t\t\tleft:\n\t\t\t\t\tisHovering || isResizing ? (\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tkey=\"handle\"\n\t\t\t\t\t\t\tclassName=\"edit-site-resizable-frame__handle\"\n\t\t\t\t\t\t\tvariants={ resizeHandleVariants }\n\t\t\t\t\t\t\tanimate={ isResizing ? 'resizing' : 'default' }\n\t\t\t\t\t\t\ttitle=\"Drag to resize\"\n\t\t\t\t\t\t\tinitial={ {\n\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\texit={ {\n\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\twhileHover={ { scaleY: 1.3 } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : null,\n\t\t\t} }\n\t\t\tonResizeStart={ handleResizeStart }\n\t\t\tonResize={ handleResize }\n\t\t\tonResizeStop={ handleResizeStop }\n\t\t\tclassName={ classnames( 'edit-site-resizable-frame__inner', {\n\t\t\t\t'is-resizing': isResizing,\n\t\t\t\t[ oversizedClassName ]: isOversized,\n\t\t\t} ) }\n\t\t>\n\t\t\t<motion.div\n\t\t\t\tclassName=\"edit-site-resizable-frame__inner-content\"\n\t\t\t\tanimate={ {\n\t\t\t\t\tborderRadius: isFullWidth ? 0 : 8,\n\t\t\t\t} }\n\t\t\t\ttransition={ FRAME_TRANSITION }\n\t\t\t\tstyle={ innerContentStyle }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</motion.div>\n\t\t</ResizableBox>\n\t);\n}\n\nexport default ResizableFrame;\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nexport default function useSyncCanvasModeWithURL() {\n\tconst history = useHistory();\n\tconst { params } = useLocation();\n\tconst canvasMode = useSelect(\n\t\t( select ) => unlock( select( editSiteStore ) ).getCanvasMode(),\n\t\t[]\n\t);\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\tconst currentCanvasMode = useRef( canvasMode );\n\tconst { canvas: canvasInUrl } = params;\n\tconst currentCanvasInUrl = useRef( canvasInUrl );\n\tconst currentUrlParams = useRef( params );\n\tuseEffect( () => {\n\t\tcurrentUrlParams.current = params;\n\t}, [ params ] );\n\n\tuseEffect( () => {\n\t\tcurrentCanvasMode.current = canvasMode;\n\t\tif ( canvasMode === 'init' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (\n\t\t\tcanvasMode === 'edit' &&\n\t\t\tcurrentCanvasInUrl.current !== canvasMode\n\t\t) {\n\t\t\thistory.push( {\n\t\t\t\t...currentUrlParams.current,\n\t\t\t\tcanvas: 'edit',\n\t\t\t} );\n\t\t}\n\n\t\tif (\n\t\t\tcanvasMode === 'view' &&\n\t\t\tcurrentCanvasInUrl.current !== undefined\n\t\t) {\n\t\t\thistory.push( {\n\t\t\t\t...currentUrlParams.current,\n\t\t\t\tcanvas: undefined,\n\t\t\t} );\n\t\t}\n\t}, [ canvasMode, history ] );\n\n\tuseEffect( () => {\n\t\tcurrentCanvasInUrl.current = canvasInUrl;\n\t\tif (\n\t\t\tcanvasInUrl === undefined &&\n\t\t\tcurrentCanvasMode.current !== 'view'\n\t\t) {\n\t\t\tsetCanvasMode( 'view' );\n\t\t} else if (\n\t\t\tcanvasInUrl === 'edit' &&\n\t\t\tcurrentCanvasMode.current !== 'edit'\n\t\t) {\n\t\t\tsetCanvasMode( 'edit' );\n\t\t}\n\t}, [ canvasInUrl, setCanvasMode ] );\n}\n","/**\n * WordPress dependencies\n */\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport {\n\tisPreviewingTheme,\n\tcurrentlyPreviewingTheme,\n} from './is-previewing-theme';\n\nconst { useHistory, useLocation } = unlock( routerPrivateApis );\n\n/**\n * This should be refactored to use the REST API, once the REST API can activate themes.\n *\n * @return {Function} A function that activates the theme.\n */\nexport function useActivateTheme() {\n\tconst history = useHistory();\n\tconst location = useLocation();\n\n\treturn async () => {\n\t\tif ( isPreviewingTheme() ) {\n\t\t\tconst activationURL =\n\t\t\t\t'themes.php?action=activate&stylesheet=' +\n\t\t\t\tcurrentlyPreviewingTheme() +\n\t\t\t\t'&_wpnonce=' +\n\t\t\t\twindow.WP_BLOCK_THEME_ACTIVATE_NONCE;\n\t\t\tawait window.fetch( activationURL );\n\t\t\tconst { wp_theme_preview: themePreview, ...params } =\n\t\t\t\tlocation.params;\n\t\t\thistory.replace( params );\n\t\t}\n\t};\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Button, Modal } from '@wordpress/components';\nimport {\n\tEntitiesSavedStates,\n\tuseEntitiesSavedStatesIsDirty,\n\tprivateApis,\n} from '@wordpress/editor';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { NavigableRegion } from '@wordpress/interface';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { useActivateTheme } from '../../utils/use-activate-theme';\nimport {\n\tcurrentlyPreviewingTheme,\n\tisPreviewingTheme,\n} from '../../utils/is-previewing-theme';\n\nconst { EntitiesSavedStatesExtensible } = unlock( privateApis );\n\nconst EntitiesSavedStatesForPreview = ( { onClose } ) => {\n\tconst isDirtyProps = useEntitiesSavedStatesIsDirty();\n\tlet activateSaveLabel;\n\tif ( isDirtyProps.isDirty ) {\n\t\tactivateSaveLabel = __( 'Activate & Save' );\n\t} else {\n\t\tactivateSaveLabel = __( 'Activate' );\n\t}\n\n\tconst { getTheme } = useSelect( coreStore );\n\tconst theme = getTheme( currentlyPreviewingTheme() );\n\tconst additionalPrompt = (\n\t\t<p>\n\t\t\t{ sprintf(\n\t\t\t\t'Saving your changes will change your active theme to  %1$s.',\n\t\t\t\ttheme?.name?.rendered\n\t\t\t) }\n\t\t</p>\n\t);\n\n\tconst activateTheme = useActivateTheme();\n\tconst onSave = async ( values ) => {\n\t\tawait activateTheme();\n\t\treturn values;\n\t};\n\n\treturn (\n\t\t<EntitiesSavedStatesExtensible\n\t\t\t{ ...{\n\t\t\t\t...isDirtyProps,\n\t\t\t\tadditionalPrompt,\n\t\t\t\tclose: onClose,\n\t\t\t\tonSave,\n\t\t\t\tsaveEnabled: true,\n\t\t\t\tsaveLabel: activateSaveLabel,\n\t\t\t} }\n\t\t/>\n\t);\n};\n\nconst _EntitiesSavedStates = ( { onClose } ) => {\n\tif ( isPreviewingTheme() ) {\n\t\treturn <EntitiesSavedStatesForPreview onClose={ onClose } />;\n\t}\n\treturn <EntitiesSavedStates close={ onClose } />;\n};\n\nexport default function SavePanel() {\n\tconst { isSaveViewOpen, canvasMode } = useSelect( ( select ) => {\n\t\tconst { isSaveViewOpened, getCanvasMode } = unlock(\n\t\t\tselect( editSiteStore )\n\t\t);\n\n\t\t// The currently selected entity to display.\n\t\t// Typically template or template part in the site editor.\n\t\treturn {\n\t\t\tisSaveViewOpen: isSaveViewOpened(),\n\t\t\tcanvasMode: getCanvasMode(),\n\t\t};\n\t}, [] );\n\tconst { setIsSaveViewOpened } = useDispatch( editSiteStore );\n\tconst onClose = () => setIsSaveViewOpened( false );\n\n\tif ( canvasMode === 'view' ) {\n\t\treturn isSaveViewOpen ? (\n\t\t\t<Modal\n\t\t\t\tclassName=\"edit-site-save-panel__modal\"\n\t\t\t\tonRequestClose={ onClose }\n\t\t\t\t__experimentalHideHeader\n\t\t\t\tcontentLabel={ __(\n\t\t\t\t\t'Save site, content, and template changes'\n\t\t\t\t) }\n\t\t\t>\n\t\t\t\t<_EntitiesSavedStates onClose={ onClose } />\n\t\t\t</Modal>\n\t\t) : null;\n\t}\n\n\treturn (\n\t\t<NavigableRegion\n\t\t\tclassName={ classnames( 'edit-site-layout__actions', {\n\t\t\t\t'is-entity-save-view-open': isSaveViewOpen,\n\t\t\t} ) }\n\t\t\tariaLabel={ __( 'Save panel' ) }\n\t\t>\n\t\t\t{ isSaveViewOpen ? (\n\t\t\t\t<_EntitiesSavedStates onClose={ onClose } />\n\t\t\t) : (\n\t\t\t\t<div className=\"edit-site-editor__toggle-save-panel\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\tclassName=\"edit-site-editor__toggle-save-panel-button\"\n\t\t\t\t\t\tonClick={ () => setIsSaveViewOpened( true ) }\n\t\t\t\t\t\taria-expanded={ false }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Open save panel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</NavigableRegion>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { isAppleOS } from '@wordpress/keycodes';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\nfunction KeyboardShortcutsRegister() {\n\t// Registering the shortcuts.\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/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/edit-site/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/edit-site/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/edit-site/toggle-list-view',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Open the block 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/edit-site/toggle-block-settings-sidebar',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Show or hide the Settings sidebar.' ),\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/edit-site/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/edit-site/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/edit-site/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\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/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/edit-site/transform-heading-to-paragraph',\n\t\t\tcategory: 'block-library',\n\t\t\tdescription: __( 'Transform heading to paragraph.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: `0`,\n\t\t\t},\n\t\t} );\n\n\t\t[ 1, 2, 3, 4, 5, 6 ].forEach( ( level ) => {\n\t\t\tregisterShortcut( {\n\t\t\t\tname: `core/edit-site/transform-paragraph-to-heading-${ level }`,\n\t\t\t\tcategory: 'block-library',\n\t\t\t\tdescription: __( 'Transform paragraph to heading.' ),\n\t\t\t\tkeyCombination: {\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: `${ level }`,\n\t\t\t\t},\n\t\t\t} );\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/toggle-distraction-free',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Toggle 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\t}, [ registerShortcut ] );\n\n\treturn null;\n}\n\nexport default KeyboardShortcutsRegister;\n","/**\n * WordPress dependencies\n */\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\n\nfunction KeyboardShortcutsGlobal() {\n\tconst { __experimentalGetDirtyEntityRecords, isSavingEntityRecord } =\n\t\tuseSelect( coreStore );\n\tconst { setIsSaveViewOpened } = useDispatch( editSiteStore );\n\n\tuseShortcut( 'core/edit-site/save', ( event ) => {\n\t\tevent.preventDefault();\n\n\t\tconst dirtyEntityRecords = __experimentalGetDirtyEntityRecords();\n\t\tconst isDirty = !! dirtyEntityRecords.length;\n\t\tconst isSaving = dirtyEntityRecords.some( ( record ) =>\n\t\t\tisSavingEntityRecord( record.kind, record.name, record.key )\n\t\t);\n\n\t\tif ( ! isSaving && isDirty ) {\n\t\t\tsetIsSaveViewOpened( true );\n\t\t}\n\t} );\n\n\treturn null;\n}\n\nexport default KeyboardShortcutsGlobal;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst trash = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M20 5h-5.7c0-1.3-1-2.3-2.3-2.3S9.7 3.7 9.7 5H4v2h1.5v.3l1.7 11.1c.1 1 1 1.7 2 1.7h5.7c1 0 1.8-.7 2-1.7l1.7-11.1V7H20V5zm-3.2 2l-1.7 11.1c0 .1-.1.2-.3.2H9.1c-.1 0-.3-.1-.3-.2L7.2 7h9.6z\" />\n\t</SVG>\n);\n\nexport default trash;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst help = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zM3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 8.75a1.5 1.5 0 01.167 2.99c-.465.052-.917.44-.917 1.01V14h1.5v-.845A3 3 0 109 10.25h1.5a1.5 1.5 0 011.5-1.5zM11.25 15v1.5h1.5V15h-1.5z\" />\n\t</SVG>\n);\n\nexport default help;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { trash, backup, help, styles, external } from '@wordpress/icons';\nimport { useCommandLoader, useCommand } from '@wordpress/commands';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\nconst { useHistory } = unlock( routerPrivateApis );\n\nfunction useGlobalStylesResetCommands() {\n\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\tconst commands = useMemo( () => {\n\t\tif ( ! canReset ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'core/edit-site/reset-global-styles',\n\t\t\t\tlabel: __( 'Reset styles to defaults' ),\n\t\t\t\ticon: trash,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tonReset();\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t}, [ canReset, onReset ] );\n\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nfunction useGlobalStylesOpenCssCommands() {\n\tconst { openGeneralSidebar, setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst history = useHistory();\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:\n\t\t\t\t!! globalStyles?._links?.[ 'wp:action-edit-css' ] ?? false,\n\t\t};\n\t}, [] );\n\n\tconst commands = useMemo( () => {\n\t\tif ( ! canEditCSS ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'core/edit-site/open-styles-css',\n\t\t\t\tlabel: __( 'Open CSS' ),\n\t\t\t\ticon: styles,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\thistory.push( {\n\t\t\t\t\t\tpath: '/wp_global_styles',\n\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t} );\n\t\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t\t\tsetEditorCanvasContainerView( 'global-styles-css' );\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t}, [\n\t\thistory,\n\t\topenGeneralSidebar,\n\t\tsetEditorCanvasContainerView,\n\t\tcanEditCSS,\n\t] );\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nexport function useCommonCommands() {\n\tconst { openGeneralSidebar, setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { set } = useDispatch( preferencesStore );\n\tconst { createInfoNotice } = useDispatch( noticesStore );\n\tconst history = useHistory();\n\tconst { homeUrl, isDistractionFree } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetUnstableBase, // Site index.\n\t\t} = select( coreStore );\n\n\t\treturn {\n\t\t\thomeUrl: getUnstableBase()?.home,\n\t\t\tisDistractionFree: select( preferencesStore ).get(\n\t\t\t\teditSiteStore.name,\n\t\t\t\t'distractionFree'\n\t\t\t),\n\t\t};\n\t}, [] );\n\n\tuseCommand( {\n\t\tname: 'core/edit-site/open-global-styles-revisions',\n\t\tlabel: __( 'Open styles revisions' ),\n\t\ticon: backup,\n\t\tcallback: ( { close } ) => {\n\t\t\tclose();\n\t\t\thistory.push( {\n\t\t\t\tpath: '/wp_global_styles',\n\t\t\t\tcanvas: 'edit',\n\t\t\t} );\n\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t\t},\n\t} );\n\n\tuseCommand( {\n\t\tname: 'core/edit-site/open-styles',\n\t\tlabel: __( 'Open styles' ),\n\t\tcallback: ( { close } ) => {\n\t\t\tclose();\n\t\t\thistory.push( {\n\t\t\t\tpath: '/wp_global_styles',\n\t\t\t\tcanvas: 'edit',\n\t\t\t} );\n\t\t\tif ( isDistractionFree ) {\n\t\t\t\tset( editSiteStore.name, 'distractionFree', false );\n\t\t\t\tcreateInfoNotice( __( 'Distraction free mode turned off.' ), {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t} );\n\t\t\t}\n\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t},\n\t\ticon: styles,\n\t} );\n\n\tuseCommand( {\n\t\tname: 'core/edit-site/toggle-styles-welcome-guide',\n\t\tlabel: __( 'Learn about styles' ),\n\t\tcallback: ( { close } ) => {\n\t\t\tclose();\n\t\t\thistory.push( {\n\t\t\t\tpath: '/wp_global_styles',\n\t\t\t\tcanvas: 'edit',\n\t\t\t} );\n\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\tset( 'core/edit-site', 'welcomeGuideStyles', true );\n\t\t\t// sometimes there's a focus loss that happens after some time\n\t\t\t// that closes the modal, we need to force reopening it.\n\t\t\tsetTimeout( () => {\n\t\t\t\tset( 'core/edit-site', 'welcomeGuideStyles', true );\n\t\t\t}, 500 );\n\t\t},\n\t\ticon: help,\n\t} );\n\n\tuseCommand( {\n\t\tname: 'core/edit-site/view-site',\n\t\tlabel: __( 'View site' ),\n\t\tcallback: ( { close } ) => {\n\t\t\tclose();\n\t\t\twindow.open( homeUrl, '_blank' );\n\t\t},\n\t\ticon: external,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/reset-global-styles',\n\t\thook: useGlobalStylesResetCommands,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/open-styles-css',\n\t\thook: useGlobalStylesOpenCssCommands,\n\t} );\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst blockDefault = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\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\nexport default blockDefault;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst cog = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\td=\"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z\"\n\t\t\tclipRule=\"evenodd\"\n\t\t/>\n\t</SVG>\n);\n\nexport default cog;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst code = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\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\nexport default code;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst keyboardClose = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"-2 -2 24 24\">\n\t\t<Path d=\"M18,0 L2,0 C0.9,0 0.01,0.9 0.01,2 L0,12 C0,13.1 0.9,14 2,14 L18,14 C19.1,14 20,13.1 20,12 L20,2 C20,0.9 19.1,0 18,0 Z M18,12 L2,12 L2,2 L18,2 L18,12 Z M9,3 L11,3 L11,5 L9,5 L9,3 Z M9,6 L11,6 L11,8 L9,8 L9,6 Z M6,3 L8,3 L8,5 L6,5 L6,3 Z M6,6 L8,6 L8,8 L6,8 L6,6 Z M3,6 L5,6 L5,8 L3,8 L3,6 Z M3,3 L5,3 L5,5 L3,5 L3,3 Z M6,9 L14,9 L14,11 L6,11 L6,9 Z M12,6 L14,6 L14,8 L12,8 L12,6 Z M12,3 L14,3 L14,5 L12,5 L12,3 Z M15,6 L17,6 L17,8 L15,8 L15,6 Z M15,3 L17,3 L17,5 L15,5 L15,3 Z M10,20 L14,16 L6,16 L10,20 Z\" />\n\t</SVG>\n);\n\nexport default keyboardClose;\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, isRTL } from '@wordpress/i18n';\nimport {\n\ttrash,\n\tbackup,\n\tlayout,\n\tpage,\n\tdrawerLeft,\n\tdrawerRight,\n\tblockDefault,\n\tcog,\n\tcode,\n\tkeyboardClose,\n} from '@wordpress/icons';\nimport { useCommandLoader } from '@wordpress/commands';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport useEditedEntityRecord from '../../components/use-edited-entity-record';\nimport isTemplateRemovable from '../../utils/is-template-removable';\nimport isTemplateRevertable from '../../utils/is-template-revertable';\nimport { KEYBOARD_SHORTCUT_HELP_MODAL_NAME } from '../../components/keyboard-shortcut-help-modal';\nimport { PREFERENCES_MODAL_NAME } from '../../components/preferences-modal';\nimport { unlock } from '../../lock-unlock';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nfunction usePageContentFocusCommands() {\n\tconst { isPage, canvasMode, hasPageContentFocus } = useSelect(\n\t\t( select ) => ( {\n\t\t\tisPage: select( editSiteStore ).isPage(),\n\t\t\tcanvasMode: unlock( select( editSiteStore ) ).getCanvasMode(),\n\t\t\thasPageContentFocus: select( editSiteStore ).hasPageContentFocus(),\n\t\t} ),\n\t\t[]\n\t);\n\tconst { setHasPageContentFocus } = useDispatch( editSiteStore );\n\n\tif ( ! isPage || canvasMode !== 'edit' ) {\n\t\treturn { isLoading: false, commands: [] };\n\t}\n\n\tconst commands = [];\n\n\tif ( hasPageContentFocus ) {\n\t\tcommands.push( {\n\t\t\tname: 'core/switch-to-template-focus',\n\t\t\tlabel: __( 'Edit template' ),\n\t\t\ticon: layout,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tsetHasPageContentFocus( false );\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\t} else {\n\t\tcommands.push( {\n\t\t\tname: 'core/switch-to-page-focus',\n\t\t\tlabel: __( 'Back to page' ),\n\t\t\ticon: page,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tsetHasPageContentFocus( true );\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn { isLoading: false, commands };\n}\n\nfunction useManipulateDocumentCommands() {\n\tconst { isLoaded, record: template } = useEditedEntityRecord();\n\tconst { removeTemplate, revertTemplate } = useDispatch( editSiteStore );\n\tconst history = useHistory();\n\tconst hasPageContentFocus = useSelect(\n\t\t( select ) => select( editSiteStore ).hasPageContentFocus(),\n\t\t[]\n\t);\n\n\tif ( ! isLoaded ) {\n\t\treturn { isLoading: true, commands: [] };\n\t}\n\n\tconst commands = [];\n\n\tif ( isTemplateRevertable( template ) && ! hasPageContentFocus ) {\n\t\tconst label =\n\t\t\ttemplate.type === 'wp_template'\n\t\t\t\t? __( 'Reset template' )\n\t\t\t\t: __( 'Reset template part' );\n\t\tcommands.push( {\n\t\t\tname: 'core/reset-template',\n\t\t\tlabel,\n\t\t\ticon: backup,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\trevertTemplate( template );\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\t}\n\n\tif ( isTemplateRemovable( template ) && ! hasPageContentFocus ) {\n\t\tconst label =\n\t\t\ttemplate.type === 'wp_template'\n\t\t\t\t? __( 'Delete template' )\n\t\t\t\t: __( 'Delete template part' );\n\t\tconst path =\n\t\t\ttemplate.type === 'wp_template'\n\t\t\t\t? '/wp_template'\n\t\t\t\t: '/wp_template_part/all';\n\t\tcommands.push( {\n\t\t\tname: 'core/remove-template',\n\t\t\tlabel,\n\t\t\ticon: trash,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tremoveTemplate( template );\n\t\t\t\t// Navigate to the template list\n\t\t\t\thistory.push( {\n\t\t\t\t\tpath,\n\t\t\t\t} );\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn {\n\t\tisLoading: ! isLoaded,\n\t\tcommands,\n\t};\n}\n\nfunction useEditUICommands() {\n\tconst { openGeneralSidebar, closeGeneralSidebar, switchEditorMode } =\n\t\tuseDispatch( editSiteStore );\n\tconst { canvasMode, editorMode, activeSidebar } = useSelect(\n\t\t( select ) => ( {\n\t\t\tcanvasMode: unlock( select( editSiteStore ) ).getCanvasMode(),\n\t\t\teditorMode: select( editSiteStore ).getEditorMode(),\n\t\t\tactiveSidebar: select( interfaceStore ).getActiveComplementaryArea(\n\t\t\t\teditSiteStore.name\n\t\t\t),\n\t\t} ),\n\t\t[]\n\t);\n\tconst { openModal } = useDispatch( interfaceStore );\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tif ( canvasMode !== 'edit' ) {\n\t\treturn { isLoading: false, commands: [] };\n\t}\n\n\tconst commands = [];\n\n\tcommands.push( {\n\t\tname: 'core/open-settings-sidebar',\n\t\tlabel: __( 'Toggle settings sidebar' ),\n\t\ticon: isRTL() ? drawerLeft : drawerRight,\n\t\tcallback: ( { close } ) => {\n\t\t\tclose();\n\t\t\tif ( activeSidebar === 'edit-site/template' ) {\n\t\t\t\tcloseGeneralSidebar();\n\t\t\t} else {\n\t\t\t\topenGeneralSidebar( 'edit-site/template' );\n\t\t\t}\n\t\t},\n\t} );\n\n\tcommands.push( {\n\t\tname: 'core/open-block-inspector',\n\t\tlabel: __( 'Toggle block inspector' ),\n\t\ticon: blockDefault,\n\t\tcallback: ( { close } ) => {\n\t\t\tclose();\n\t\t\tif ( activeSidebar === 'edit-site/block-inspector' ) {\n\t\t\t\tcloseGeneralSidebar();\n\t\t\t} else {\n\t\t\t\topenGeneralSidebar( 'edit-site/block-inspector' );\n\t\t\t}\n\t\t},\n\t} );\n\n\tcommands.push( {\n\t\tname: 'core/toggle-spotlight-mode',\n\t\tlabel: __( 'Toggle spotlight mode' ),\n\t\ticon: cog,\n\t\tcallback: ( { close } ) => {\n\t\t\ttoggle( 'core/edit-site', 'focusMode' );\n\t\t\tclose();\n\t\t},\n\t} );\n\n\tcommands.push( {\n\t\tname: 'core/toggle-top-toolbar',\n\t\tlabel: __( 'Toggle top toolbar' ),\n\t\ticon: cog,\n\t\tcallback: ( { close } ) => {\n\t\t\ttoggle( 'core/edit-site', 'fixedToolbar' );\n\t\t\tclose();\n\t\t},\n\t} );\n\n\tcommands.push( {\n\t\tname: 'core/toggle-code-editor',\n\t\tlabel: __( 'Toggle code editor' ),\n\t\ticon: code,\n\t\tcallback: ( { close } ) => {\n\t\t\tswitchEditorMode( editorMode === 'visual' ? 'text' : 'visual' );\n\t\t\tclose();\n\t\t},\n\t} );\n\n\tcommands.push( {\n\t\tname: 'core/open-preferences',\n\t\tlabel: __( 'Open editor preferences' ),\n\t\ticon: cog,\n\t\tcallback: () => {\n\t\t\topenModal( PREFERENCES_MODAL_NAME );\n\t\t},\n\t} );\n\n\tcommands.push( {\n\t\tname: 'core/open-shortcut-help',\n\t\tlabel: __( 'Open keyboard shortcuts' ),\n\t\ticon: keyboardClose,\n\t\tcallback: () => {\n\t\t\topenModal( KEYBOARD_SHORTCUT_HELP_MODAL_NAME );\n\t\t},\n\t} );\n\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nexport function useEditModeCommands() {\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/page-content-focus',\n\t\thook: usePageContentFocusCommands,\n\t\tcontext: 'site-editor-edit',\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/manipulate-document',\n\t\thook: useManipulateDocumentCommands,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/edit-ui',\n\t\thook: useEditUICommands,\n\t} );\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHeading as Heading,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\tFlexBlock,\n\tFlexItem,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\n\nexport default function Header( { title, subTitle, actions } ) {\n\treturn (\n\t\t<HStack as=\"header\" alignment=\"left\" className=\"edit-site-page-header\">\n\t\t\t<FlexBlock className=\"edit-site-page-header__page-title\">\n\t\t\t\t<Heading\n\t\t\t\t\tas=\"h2\"\n\t\t\t\t\tlevel={ 4 }\n\t\t\t\t\tclassName=\"edit-site-page-header__title\"\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</Heading>\n\t\t\t\t{ subTitle && (\n\t\t\t\t\t<Text as=\"p\" className=\"edit-site-page-header__sub-title\">\n\t\t\t\t\t\t{ subTitle }\n\t\t\t\t\t</Text>\n\t\t\t\t) }\n\t\t\t</FlexBlock>\n\t\t\t<FlexItem className=\"edit-site-page-header__actions\">\n\t\t\t\t{ actions }\n\t\t\t</FlexItem>\n\t\t</HStack>\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { NavigableRegion } from '@wordpress/interface';\nimport { EditorSnackbars } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport Header from './header';\n\nexport default function Page( {\n\ttitle,\n\tsubTitle,\n\tactions,\n\tchildren,\n\tclassName,\n\thideTitleFromUI = false,\n} ) {\n\tconst classes = classnames( 'edit-site-page', className );\n\n\treturn (\n\t\t<NavigableRegion className={ classes } ariaLabel={ title }>\n\t\t\t{ ! hideTitleFromUI && title && (\n\t\t\t\t<Header\n\t\t\t\t\ttitle={ title }\n\t\t\t\t\tsubTitle={ subTitle }\n\t\t\t\t\tactions={ actions }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<div className=\"edit-site-page-content\">\n\t\t\t\t{ children }\n\t\t\t\t<EditorSnackbars />\n\t\t\t</div>\n\t\t</NavigableRegion>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst moreHorizontal = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z\" />\n\t</SVG>\n);\n\nexport default moreHorizontal;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { BlockPreview } from '@wordpress/block-editor';\nimport {\n\t__experimentalConfirmDialog as ConfirmDialog,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n\t__experimentalHStack as HStack,\n\t__unstableCompositeItem as CompositeItem,\n\tTooltip,\n\tFlex,\n\tButton,\n} from '@wordpress/components';\nimport { useDispatch } from '@wordpress/data';\nimport { useState, useId } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tIcon,\n\theader,\n\tfooter,\n\tsymbolFilled,\n\tmoreHorizontal,\n\tlockSmall,\n} from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as reusableBlocksStore } from '@wordpress/reusable-blocks';\nimport { DELETE, BACKSPACE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { PATTERNS, USER_PATTERNS } from './utils';\nimport { useLink } from '../routes/link';\n\nconst THEME_PATTERN_TOOLTIP = __( 'Theme patterns cannot be edited.' );\n\nexport default function GridItem( { categoryId, composite, icon, item } ) {\n\tconst descriptionId = useId();\n\tconst [ isDeleteDialogOpen, setIsDeleteDialogOpen ] = useState( false );\n\n\tconst { __experimentalDeleteReusableBlock } =\n\t\tuseDispatch( reusableBlocksStore );\n\tconst { createErrorNotice, createSuccessNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tconst { onClick } = useLink( {\n\t\tpostType: item.type,\n\t\tpostId: item.type === USER_PATTERNS ? item.id : item.name,\n\t\tcategoryId,\n\t\tcategoryType: item.type,\n\t} );\n\n\tconst onKeyDown = ( event ) => {\n\t\tif ( DELETE === event.keyCode || BACKSPACE === event.keyCode ) {\n\t\t\tsetIsDeleteDialogOpen( true );\n\t\t}\n\t};\n\n\tconst isEmpty = ! item.blocks?.length;\n\tconst patternClassNames = classnames( 'edit-site-patterns__pattern', {\n\t\t'is-placeholder': isEmpty,\n\t} );\n\tconst previewClassNames = classnames( 'edit-site-patterns__preview', {\n\t\t'is-inactive': item.type === PATTERNS,\n\t} );\n\n\tconst deletePattern = async () => {\n\t\ttry {\n\t\t\tawait __experimentalDeleteReusableBlock( item.id );\n\t\t\tcreateSuccessNotice( __( 'Pattern successfully deleted.' ), {\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 deleting the pattern.' );\n\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t}\n\t};\n\n\tconst isUserPattern = item.type === USER_PATTERNS;\n\tconst ariaDescriptions = [];\n\tif ( isUserPattern ) {\n\t\t// User patterns don't have descriptions, but can be edited and deleted, so include some help text.\n\t\tariaDescriptions.push(\n\t\t\t__( 'Press Enter to edit, or Delete to delete the pattern.' )\n\t\t);\n\t} else if ( item.description ) {\n\t\tariaDescriptions.push( item.description );\n\t}\n\tif ( item.type === PATTERNS ) {\n\t\tariaDescriptions.push( THEME_PATTERN_TOOLTIP );\n\t}\n\n\tlet itemIcon = icon;\n\tif ( categoryId === 'header' ) {\n\t\titemIcon = header;\n\t} else if ( categoryId === 'footer' ) {\n\t\titemIcon = footer;\n\t} else if ( categoryId === 'uncategorized' ) {\n\t\titemIcon = symbolFilled;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<div className={ patternClassNames }>\n\t\t\t\t<CompositeItem\n\t\t\t\t\tclassName={ previewClassNames }\n\t\t\t\t\trole=\"option\"\n\t\t\t\t\tas=\"div\"\n\t\t\t\t\t{ ...composite }\n\t\t\t\t\tonClick={ item.type !== PATTERNS ? onClick : undefined }\n\t\t\t\t\tonKeyDown={ isUserPattern ? onKeyDown : undefined }\n\t\t\t\t\taria-label={ item.title }\n\t\t\t\t\taria-describedby={\n\t\t\t\t\t\tariaDescriptions.length\n\t\t\t\t\t\t\t? ariaDescriptions\n\t\t\t\t\t\t\t\t\t.map(\n\t\t\t\t\t\t\t\t\t\t( _, index ) =>\n\t\t\t\t\t\t\t\t\t\t\t`${ descriptionId }-${ index }`\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t.join( ' ' )\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t{ isEmpty && __( 'Empty pattern' ) }\n\t\t\t\t\t{ ! isEmpty && <BlockPreview blocks={ item.blocks } /> }\n\t\t\t\t</CompositeItem>\n\t\t\t\t{ ariaDescriptions.map( ( ariaDescription, index ) => (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\thidden\n\t\t\t\t\t\tid={ `${ descriptionId }-${ index }` }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ariaDescription }\n\t\t\t\t\t</div>\n\t\t\t\t) ) }\n\t\t\t\t<HStack\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclassName=\"edit-site-patterns__footer\"\n\t\t\t\t\tjustify=\"space-between\"\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\talignment=\"center\"\n\t\t\t\t\t\tjustify=\"left\"\n\t\t\t\t\t\tspacing={ 3 }\n\t\t\t\t\t\tclassName=\"edit-site-patterns__pattern-title\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tclassName=\"edit-site-patterns__pattern-icon\"\n\t\t\t\t\t\t\t\ticon={ itemIcon }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<Flex as=\"span\" gap={ 0 } justify=\"left\">\n\t\t\t\t\t\t\t{ item.type === PATTERNS ? (\n\t\t\t\t\t\t\t\titem.title\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\tvariant=\"link\"\n\t\t\t\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t\t\t\t\t// Required for the grid's roving tab index system.\n\t\t\t\t\t\t\t\t\t// See https://github.com/WordPress/gutenberg/pull/51898#discussion_r1243399243.\n\t\t\t\t\t\t\t\t\ttabIndex=\"-1\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ item.title }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ item.type === PATTERNS && (\n\t\t\t\t\t\t\t\t<Tooltip\n\t\t\t\t\t\t\t\t\tposition=\"top center\"\n\t\t\t\t\t\t\t\t\ttext={ __(\n\t\t\t\t\t\t\t\t\t\t'Theme patterns cannot be edited.'\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<span className=\"edit-site-patterns__pattern-lock-icon\">\n\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\tstyle={ { fill: 'currentcolor' } }\n\t\t\t\t\t\t\t\t\t\t\ticon={ lockSmall }\n\t\t\t\t\t\t\t\t\t\t\tsize={ 24 }\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</Tooltip>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Flex>\n\t\t\t\t\t</HStack>\n\t\t\t\t\t{ item.type === USER_PATTERNS && (\n\t\t\t\t\t\t<DropdownMenu\n\t\t\t\t\t\t\ticon={ moreHorizontal }\n\t\t\t\t\t\t\tlabel={ __( 'Actions' ) }\n\t\t\t\t\t\t\tclassName=\"edit-site-patterns__dropdown\"\n\t\t\t\t\t\t\tpopoverProps={ { placement: 'bottom-end' } }\n\t\t\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\t\t\tclassName: 'edit-site-patterns__button',\n\t\t\t\t\t\t\t\tisSmall: true,\n\t\t\t\t\t\t\t\tdescribedBy: sprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %s: pattern name */\n\t\t\t\t\t\t\t\t\t__( 'Action menu for %s pattern' ),\n\t\t\t\t\t\t\t\t\titem.title\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t// The dropdown menu is not focusable using the\n\t\t\t\t\t\t\t\t// keyboard as this would interfere with the grid's\n\t\t\t\t\t\t\t\t// roving tab index system. Instead, keyboard users\n\t\t\t\t\t\t\t\t// use keyboard shortcuts to trigger actions.\n\t\t\t\t\t\t\t\ttabIndex: -1,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ () => (\n\t\t\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t\tsetIsDeleteDialogOpen( true )\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{ __( 'Delete' ) }\n\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</DropdownMenu>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\n\t\t\t</div>\n\t\t\t{ isDeleteDialogOpen && (\n\t\t\t\t<ConfirmDialog\n\t\t\t\t\tonConfirm={ deletePattern }\n\t\t\t\t\tonCancel={ () => setIsDeleteDialogOpen( false ) }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Are you sure you want to delete this pattern?' ) }\n\t\t\t\t</ConfirmDialog>\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\t__unstableComposite as Composite,\n\t__unstableUseCompositeState as useCompositeState,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport GridItem from './grid-item';\n\nexport default function Grid( { categoryId, label, icon, items } ) {\n\tconst composite = useCompositeState( { orientation: 'vertical' } );\n\n\tif ( ! items?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Composite\n\t\t\t{ ...composite }\n\t\t\trole=\"listbox\"\n\t\t\tclassName=\"edit-site-patterns__grid\"\n\t\t\taria-label={ label }\n\t\t>\n\t\t\t{ items.map( ( item ) => (\n\t\t\t\t<GridItem\n\t\t\t\t\tkey={ item.name }\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\titem={ item }\n\t\t\t\t\tcategoryId={ categoryId }\n\t\t\t\t\tcomposite={ composite }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</Composite>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nexport default function NoPatterns() {\n\treturn (\n\t\t<div className=\"edit-site-patterns__no-results\">\n\t\t\t{ __( 'No patterns found.' ) }\n\t\t</div>\n\t);\n}\n","/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\nimport { noCase } from 'change-case';\n\n// Default search helpers.\nconst defaultGetName = ( item ) => item.name || '';\nconst defaultGetTitle = ( item ) => item.title;\nconst defaultGetDescription = ( item ) => item.description || '';\nconst defaultGetKeywords = ( item ) => item.keywords || [];\nconst defaultHasCategory = () => false;\n\n/**\n * Extracts words from an input string.\n *\n * @param {string} input The input string.\n *\n * @return {Array} Words, extracted from the input string.\n */\nfunction extractWords( input = '' ) {\n\treturn noCase( input, {\n\t\tsplitRegexp: [\n\t\t\t/([\\p{Ll}\\p{Lo}\\p{N}])([\\p{Lu}\\p{Lt}])/gu, // One lowercase or digit, followed by one uppercase.\n\t\t\t/([\\p{Lu}\\p{Lt}])([\\p{Lu}\\p{Lt}][\\p{Ll}\\p{Lo}])/gu, // One uppercase followed by one uppercase and one lowercase.\n\t\t],\n\t\tstripRegexp: /(\\p{C}|\\p{P}|\\p{S})+/giu, // Anything that's not a punctuation, symbol or control/format character.\n\t} )\n\t\t.split( ' ' )\n\t\t.filter( Boolean );\n}\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\t//  Input: \"média\"\n\tinput = removeAccents( input );\n\n\t// Accommodate leading slash, matching autocomplete expectations.\n\t//  Input: \"/media\"\n\tinput = input.replace( /^\\//, '' );\n\n\t// Lowercase.\n\t//  Input: \"MEDIA\"\n\tinput = input.toLowerCase();\n\n\treturn input;\n}\n\n/**\n * Converts the search term into a list of normalized terms.\n *\n * @param {string} input The search term to normalize.\n *\n * @return {string[]} The normalized list of search terms.\n */\nexport const getNormalizedSearchTerms = ( input = '' ) => {\n\treturn extractWords( normalizeSearchInput( input ) );\n};\n\nconst removeMatchingTerms = ( unmatchedTerms, unprocessedTerms ) => {\n\treturn unmatchedTerms.filter(\n\t\t( term ) =>\n\t\t\t! getNormalizedSearchTerms( unprocessedTerms ).some(\n\t\t\t\t( unprocessedTerm ) => unprocessedTerm.includes( term )\n\t\t\t)\n\t);\n};\n\n/**\n * Filters an item list given a search term.\n *\n * @param {Array}  items       Item list\n * @param {string} searchInput Search input.\n * @param {Object} config      Search Config.\n *\n * @return {Array} Filtered item list.\n */\nexport const searchItems = ( items = [], searchInput = '', config = {} ) => {\n\tconst normalizedSearchTerms = getNormalizedSearchTerms( searchInput );\n\tconst onlyFilterByCategory = ! normalizedSearchTerms.length;\n\tconst searchRankConfig = { ...config, onlyFilterByCategory };\n\n\t// If we aren't filtering on search terms, matching on category is satisfactory.\n\t// If we are, then we need more than a category match.\n\tconst threshold = onlyFilterByCategory ? 0 : 1;\n\n\tconst rankedItems = items\n\t\t.map( ( item ) => {\n\t\t\treturn [\n\t\t\t\titem,\n\t\t\t\tgetItemSearchRank( item, searchInput, searchRankConfig ),\n\t\t\t];\n\t\t} )\n\t\t.filter( ( [ , rank ] ) => rank > threshold );\n\n\t// If we didn't have terms to search on, there's no point sorting.\n\tif ( normalizedSearchTerms.length === 0 ) {\n\t\treturn rankedItems.map( ( [ item ] ) => item );\n\t}\n\n\trankedItems.sort( ( [ , rank1 ], [ , rank2 ] ) => rank2 - rank1 );\n\treturn rankedItems.map( ( [ item ] ) => item );\n};\n\n/**\n * Get the search rank for a given item and a specific search term.\n * The better the match, the higher the rank.\n * If the rank equals 0, it should be excluded from the results.\n *\n * @param {Object} item       Item to filter.\n * @param {string} searchTerm Search term.\n * @param {Object} config     Search Config.\n *\n * @return {number} Search Rank.\n */\nfunction getItemSearchRank( item, searchTerm, config ) {\n\tconst {\n\t\tcategoryId,\n\t\tgetName = defaultGetName,\n\t\tgetTitle = defaultGetTitle,\n\t\tgetDescription = defaultGetDescription,\n\t\tgetKeywords = defaultGetKeywords,\n\t\thasCategory = defaultHasCategory,\n\t\tonlyFilterByCategory,\n\t} = config;\n\n\tlet rank = hasCategory( item, categoryId ) ? 1 : 0;\n\n\t// If an item doesn't belong to the current category or we don't have\n\t// search terms to filter by, return the initial rank value.\n\tif ( ! rank || onlyFilterByCategory ) {\n\t\treturn rank;\n\t}\n\n\tconst name = getName( item );\n\tconst title = getTitle( item );\n\tconst description = getDescription( item );\n\tconst keywords = getKeywords( item );\n\n\tconst normalizedSearchInput = normalizeSearchInput( searchTerm );\n\tconst normalizedTitle = normalizeSearchInput( title );\n\n\t// Prefers exact matches\n\t// Then prefers if the beginning of the title matches the search term\n\t// name, keywords, description matches come later.\n\tif ( normalizedSearchInput === normalizedTitle ) {\n\t\trank += 30;\n\t} else if ( normalizedTitle.startsWith( normalizedSearchInput ) ) {\n\t\trank += 20;\n\t} else {\n\t\tconst terms = [ name, title, description, ...keywords ].join( ' ' );\n\t\tconst normalizedSearchTerms = extractWords( normalizedSearchInput );\n\t\tconst unmatchedTerms = removeMatchingTerms(\n\t\t\tnormalizedSearchTerms,\n\t\t\tterms\n\t\t);\n\n\t\tif ( unmatchedTerms.length === 0 ) {\n\t\t\trank += 10;\n\t\t}\n\t}\n\n\treturn rank;\n}\n","/**\n * WordPress dependencies\n */\nimport { parse } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport {\n\tCORE_PATTERN_SOURCES,\n\tPATTERNS,\n\tSYNC_TYPES,\n\tTEMPLATE_PARTS,\n\tUSER_PATTERNS,\n\tUSER_PATTERN_CATEGORY,\n\tfilterOutDuplicatesByName,\n} from './utils';\nimport { unlock } from '../../lock-unlock';\nimport { searchItems } from './search-items';\nimport { store as editSiteStore } from '../../store';\n\nconst EMPTY_PATTERN_LIST = [];\n\nconst createTemplatePartId = ( theme, slug ) =>\n\ttheme && slug ? theme + '//' + slug : null;\n\nconst templatePartToPattern = ( templatePart ) => ( {\n\tblocks: parse( templatePart.content.raw ),\n\tcategories: [ templatePart.area ],\n\tdescription: templatePart.description || '',\n\tkeywords: templatePart.keywords || [],\n\tname: createTemplatePartId( templatePart.theme, templatePart.slug ),\n\ttitle: templatePart.title.rendered,\n\ttype: templatePart.type,\n\ttemplatePart,\n} );\n\nconst templatePartCategories = [ 'header', 'footer', 'sidebar' ];\nconst templatePartHasCategory = ( item, category ) => {\n\tif ( category === 'uncategorized' ) {\n\t\treturn ! templatePartCategories.includes( item.templatePart.area );\n\t}\n\n\treturn item.templatePart.area === category;\n};\n\nconst useTemplatePartsAsPatterns = (\n\tcategoryId,\n\tpostType = TEMPLATE_PARTS,\n\tfilterValue = ''\n) => {\n\tconst { templateParts, isResolving } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( postType !== TEMPLATE_PARTS ) {\n\t\t\t\treturn {\n\t\t\t\t\ttemplateParts: EMPTY_PATTERN_LIST,\n\t\t\t\t\tisResolving: false,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst { getEntityRecords, isResolving: _isResolving } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst query = { per_page: -1 };\n\t\t\tconst rawTemplateParts = getEntityRecords(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tquery\n\t\t\t);\n\t\t\tconst partsAsPatterns = rawTemplateParts?.map( ( templatePart ) =>\n\t\t\t\ttemplatePartToPattern( templatePart )\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\ttemplateParts: partsAsPatterns,\n\t\t\t\tisResolving: _isResolving( 'getEntityRecords', [\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_template_part',\n\t\t\t\t\tquery,\n\t\t\t\t] ),\n\t\t\t};\n\t\t},\n\t\t[ postType ]\n\t);\n\n\tconst filteredTemplateParts = useMemo( () => {\n\t\tif ( ! templateParts ) {\n\t\t\treturn EMPTY_PATTERN_LIST;\n\t\t}\n\n\t\treturn searchItems( templateParts, filterValue, {\n\t\t\tcategoryId,\n\t\t\thasCategory: templatePartHasCategory,\n\t\t} );\n\t}, [ templateParts, filterValue, categoryId ] );\n\n\treturn { templateParts: filteredTemplateParts, isResolving };\n};\n\nconst useThemePatterns = (\n\tcategoryId,\n\tpostType = PATTERNS,\n\tfilterValue = ''\n) => {\n\tconst blockPatterns = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\t\tconst settings = getSettings();\n\t\treturn (\n\t\t\tsettings.__experimentalAdditionalBlockPatterns ??\n\t\t\tsettings.__experimentalBlockPatterns\n\t\t);\n\t} );\n\n\tconst restBlockPatterns = useSelect( ( select ) =>\n\t\tselect( coreStore ).getBlockPatterns()\n\t);\n\n\tconst patterns = useMemo(\n\t\t() =>\n\t\t\t[ ...( blockPatterns || [] ), ...( restBlockPatterns || [] ) ]\n\t\t\t\t.filter(\n\t\t\t\t\t( pattern ) =>\n\t\t\t\t\t\t! CORE_PATTERN_SOURCES.includes( pattern.source )\n\t\t\t\t)\n\t\t\t\t.filter( filterOutDuplicatesByName )\n\t\t\t\t.map( ( pattern ) => ( {\n\t\t\t\t\t...pattern,\n\t\t\t\t\tkeywords: pattern.keywords || [],\n\t\t\t\t\ttype: 'pattern',\n\t\t\t\t\tblocks: parse( pattern.content ),\n\t\t\t\t} ) ),\n\t\t[ blockPatterns, restBlockPatterns ]\n\t);\n\n\tconst filteredPatterns = useMemo( () => {\n\t\tif ( postType !== PATTERNS ) {\n\t\t\treturn EMPTY_PATTERN_LIST;\n\t\t}\n\n\t\treturn searchItems( patterns, filterValue, {\n\t\t\tcategoryId,\n\t\t\thasCategory: ( item, currentCategory ) =>\n\t\t\t\titem.categories?.includes( currentCategory ),\n\t\t} );\n\t}, [ patterns, filterValue, categoryId, postType ] );\n\n\treturn filteredPatterns;\n};\n\nconst reusableBlockToPattern = ( reusableBlock ) => ( {\n\tblocks: parse( reusableBlock.content.raw ),\n\tcategories: reusableBlock.wp_pattern,\n\tid: reusableBlock.id,\n\tname: reusableBlock.slug,\n\tsyncStatus: reusableBlock.wp_pattern_sync_status || SYNC_TYPES.full,\n\ttitle: reusableBlock.title.raw,\n\ttype: reusableBlock.type,\n\treusableBlock,\n} );\n\nconst useUserPatterns = (\n\tcategoryId,\n\tcategoryType = PATTERNS,\n\tfilterValue = ''\n) => {\n\tconst postType = categoryType === PATTERNS ? USER_PATTERNS : categoryType;\n\tconst unfilteredPatterns = useSelect(\n\t\t( select ) => {\n\t\t\tif (\n\t\t\t\tpostType !== USER_PATTERNS ||\n\t\t\t\tcategoryId !== USER_PATTERN_CATEGORY\n\t\t\t) {\n\t\t\t\treturn EMPTY_PATTERN_LIST;\n\t\t\t}\n\n\t\t\tconst { getEntityRecords } = select( coreStore );\n\t\t\tconst records = getEntityRecords( 'postType', postType, {\n\t\t\t\tper_page: -1,\n\t\t\t} );\n\n\t\t\tif ( ! records ) {\n\t\t\t\treturn EMPTY_PATTERN_LIST;\n\t\t\t}\n\n\t\t\treturn records.map( ( record ) =>\n\t\t\t\treusableBlockToPattern( record )\n\t\t\t);\n\t\t},\n\t\t[ postType, categoryId ]\n\t);\n\n\tconst filteredPatterns = useMemo( () => {\n\t\tif ( ! unfilteredPatterns.length ) {\n\t\t\treturn EMPTY_PATTERN_LIST;\n\t\t}\n\n\t\treturn searchItems( unfilteredPatterns, filterValue, {\n\t\t\t// We exit user pattern retrieval early if we aren't in the\n\t\t\t// catch-all category for user created patterns, so it has\n\t\t\t// to be in the category.\n\t\t\thasCategory: () => true,\n\t\t} );\n\t}, [ unfilteredPatterns, filterValue ] );\n\n\tconst patterns = { syncedPatterns: [], unsyncedPatterns: [] };\n\n\tfilteredPatterns.forEach( ( pattern ) => {\n\t\tif ( pattern.syncStatus === SYNC_TYPES.full ) {\n\t\t\tpatterns.syncedPatterns.push( pattern );\n\t\t} else {\n\t\t\tpatterns.unsyncedPatterns.push( pattern );\n\t\t}\n\t} );\n\n\treturn patterns;\n};\n\nexport const usePatterns = ( categoryType, categoryId, filterValue ) => {\n\tconst blockPatterns = useThemePatterns(\n\t\tcategoryId,\n\t\tcategoryType,\n\t\tfilterValue\n\t);\n\n\tconst { syncedPatterns = [], unsyncedPatterns = [] } = useUserPatterns(\n\t\tcategoryId,\n\t\tcategoryType,\n\t\tfilterValue\n\t);\n\n\tconst { templateParts, isResolving } = useTemplatePartsAsPatterns(\n\t\tcategoryId,\n\t\tcategoryType,\n\t\tfilterValue\n\t);\n\n\tconst patterns = {\n\t\tsyncedPatterns: [ ...templateParts, ...syncedPatterns ],\n\t\tunsyncedPatterns: [ ...blockPatterns, ...unsyncedPatterns ],\n\t};\n\n\treturn [ patterns, isResolving ];\n};\n\nexport default usePatterns;\n","/**\n * WordPress dependencies\n */\n\nimport {\n\tSearchControl,\n\t__experimentalHeading as Heading,\n\t__experimentalText as Text,\n\t__experimentalVStack as VStack,\n\tFlex,\n\tFlexBlock,\n} from '@wordpress/components';\nimport { __, isRTL } from '@wordpress/i18n';\nimport { symbol, chevronLeft, chevronRight } from '@wordpress/icons';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { useViewportMatch } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Grid from './grid';\nimport NoPatterns from './no-patterns';\nimport usePatterns from './use-patterns';\nimport SidebarButton from '../sidebar-button';\nimport useDebouncedInput from '../../utils/use-debounced-input';\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nexport default function PatternsList( { categoryId, type } ) {\n\tconst location = useLocation();\n\tconst history = useHistory();\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst [ filterValue, setFilterValue, delayedFilterValue ] =\n\t\tuseDebouncedInput( '' );\n\n\tconst [ patterns, isResolving ] = usePatterns(\n\t\ttype,\n\t\tcategoryId,\n\t\tdelayedFilterValue\n\t);\n\n\tconst { syncedPatterns, unsyncedPatterns } = patterns;\n\tconst hasPatterns = !! syncedPatterns.length || !! unsyncedPatterns.length;\n\n\treturn (\n\t\t<VStack spacing={ 6 }>\n\t\t\t<Flex>\n\t\t\t\t{ isMobileViewport && (\n\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\ticon={ isRTL() ? chevronRight : chevronLeft }\n\t\t\t\t\t\tlabel={ __( 'Back' ) }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t// Go back in history if we came from the Patterns page.\n\t\t\t\t\t\t\t// Otherwise push a stack onto the history.\n\t\t\t\t\t\t\tif ( location.state?.backPath === '/patterns' ) {\n\t\t\t\t\t\t\t\thistory.back();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\thistory.push( { path: '/patterns' } );\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<FlexBlock>\n\t\t\t\t\t<SearchControl\n\t\t\t\t\t\tclassName=\"edit-site-patterns__search\"\n\t\t\t\t\t\tonChange={ ( value ) => setFilterValue( value ) }\n\t\t\t\t\t\tplaceholder={ __( 'Search patterns' ) }\n\t\t\t\t\t\tlabel={ __( 'Search patterns' ) }\n\t\t\t\t\t\tvalue={ filterValue }\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t/>\n\t\t\t\t</FlexBlock>\n\t\t\t</Flex>\n\t\t\t{ isResolving && __( 'Loading' ) }\n\t\t\t{ ! isResolving && !! syncedPatterns.length && (\n\t\t\t\t<>\n\t\t\t\t\t<VStack className=\"edit-site-patterns__section-header\">\n\t\t\t\t\t\t<Heading as=\"h2\" level={ 4 }>\n\t\t\t\t\t\t\t{ __( 'Synced' ) }\n\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t<Text variant=\"muted\" as=\"p\">\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Patterns that are kept in sync across your site'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</VStack>\n\t\t\t\t\t<Grid\n\t\t\t\t\t\ticon={ symbol }\n\t\t\t\t\t\tcategoryId={ categoryId }\n\t\t\t\t\t\tlabel={ __( 'Synced' ) }\n\t\t\t\t\t\titems={ syncedPatterns }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t{ ! isResolving && !! unsyncedPatterns.length && (\n\t\t\t\t<>\n\t\t\t\t\t<VStack className=\"edit-site-patterns__section-header\">\n\t\t\t\t\t\t<Heading as=\"h2\" level={ 4 }>\n\t\t\t\t\t\t\t{ __( 'Standard' ) }\n\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t<Text variant=\"muted\" as=\"p\">\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Patterns that can be changed freely without affecting your site'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</VStack>\n\t\t\t\t\t<Grid\n\t\t\t\t\t\tcategoryId={ categoryId }\n\t\t\t\t\t\tlabel={ __( 'Standard patterns' ) }\n\t\t\t\t\t\titems={ unsyncedPatterns }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t{ ! isResolving && ! hasPatterns && <NoPatterns /> }\n\t\t</VStack>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { getQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { DEFAULT_CATEGORY, DEFAULT_TYPE } from './utils';\nimport Page from '../page';\nimport PatternsList from './patterns-list';\nimport usePatternSettings from './use-pattern-settings';\nimport { unlock } from '../../lock-unlock';\n\nconst { ExperimentalBlockEditorProvider } = unlock( blockEditorPrivateApis );\n\nexport default function PagePatterns() {\n\tconst { categoryType, categoryId } = getQueryArgs( window.location.href );\n\tconst type = categoryType || DEFAULT_TYPE;\n\tconst category = categoryId || DEFAULT_CATEGORY;\n\tconst settings = usePatternSettings();\n\n\t// Wrap everything in a block editor provider.\n\t// This ensures 'styles' that are needed for the previews are synced\n\t// from the site editor store to the block editor store.\n\treturn (\n\t\t<ExperimentalBlockEditorProvider settings={ settings }>\n\t\t\t<Page\n\t\t\t\tclassName=\"edit-site-patterns\"\n\t\t\t\ttitle={ __( 'Patterns content' ) }\n\t\t\t\thideTitleFromUI\n\t\t\t>\n\t\t\t\t<PatternsList type={ type } categoryId={ category } />\n\t\t\t</Page>\n\t\t</ExperimentalBlockEditorProvider>\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';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport { filterOutDuplicatesByName } from './utils';\n\nexport default function usePatternSettings() {\n\tconst storedSettings = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\t\treturn getSettings();\n\t}, [] );\n\n\tconst settingsBlockPatterns =\n\t\tstoredSettings.__experimentalAdditionalBlockPatterns ?? // WP 6.0\n\t\tstoredSettings.__experimentalBlockPatterns; // WP 5.9\n\n\tconst restBlockPatterns = useSelect(\n\t\t( select ) => select( coreStore ).getBlockPatterns(),\n\t\t[]\n\t);\n\n\tconst blockPatterns = useMemo(\n\t\t() =>\n\t\t\t[\n\t\t\t\t...( settingsBlockPatterns || [] ),\n\t\t\t\t...( restBlockPatterns || [] ),\n\t\t\t].filter( filterOutDuplicatesByName ),\n\t\t[ settingsBlockPatterns, restBlockPatterns ]\n\t);\n\n\tconst settings = useMemo( () => {\n\t\tconst { __experimentalAdditionalBlockPatterns, ...restStoredSettings } =\n\t\t\tstoredSettings;\n\n\t\treturn {\n\t\t\t...restStoredSettings,\n\t\t\t__experimentalBlockPatterns: blockPatterns,\n\t\t\t__unstableIsPreviewMode: true,\n\t\t};\n\t}, [ storedSettings, blockPatterns ] );\n\n\treturn settings;\n}\n","export default function Table( { data, columns } ) {\n\treturn (\n\t\t<div className=\"edit-site-table-wrapper\">\n\t\t\t<table className=\"edit-site-table\">\n\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t{ columns.map( ( column ) => (\n\t\t\t\t\t\t\t<th key={ column.header }>{ column.header }</th>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>\n\t\t\t\t\t{ data.map( ( row, rowIndex ) => (\n\t\t\t\t\t\t<tr key={ rowIndex }>\n\t\t\t\t\t\t\t{ columns.map( ( column, columnIndex ) => (\n\t\t\t\t\t\t\t\t<td\n\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\tmaxWidth: column.maxWidth\n\t\t\t\t\t\t\t\t\t\t\t? column.maxWidth\n\t\t\t\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tkey={ columnIndex }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ column.cell( row ) }\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t) ) }\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tVisuallyHidden,\n\t__experimentalHeading as Heading,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore, useEntityRecords } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport Page from '../page';\nimport Table from '../table';\nimport Link from '../routes/link';\nimport AddedBy from '../list/added-by';\nimport TemplateActions from '../template-actions';\nimport AddNewTemplate from '../add-new-template';\nimport { store as editSiteStore } from '../../store';\n\nexport default function PageTemplateParts() {\n\tconst { records: templateParts } = useEntityRecords(\n\t\t'postType',\n\t\t'wp_template_part',\n\t\t{\n\t\t\tper_page: -1,\n\t\t}\n\t);\n\n\tconst { canCreate } = useSelect( ( select ) => {\n\t\tconst { supportsTemplatePartsMode } =\n\t\t\tselect( editSiteStore ).getSettings();\n\t\treturn {\n\t\t\tpostType: select( coreStore ).getPostType( 'wp_template_part' ),\n\t\t\tcanCreate: ! supportsTemplatePartsMode,\n\t\t};\n\t} );\n\n\tconst columns = [\n\t\t{\n\t\t\theader: __( 'Template Part' ),\n\t\t\tcell: ( templatePart ) => (\n\t\t\t\t<VStack>\n\t\t\t\t\t<Heading as=\"h3\" level={ 5 }>\n\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\tparams={ {\n\t\t\t\t\t\t\t\tpostId: templatePart.id,\n\t\t\t\t\t\t\t\tpostType: templatePart.type,\n\t\t\t\t\t\t\t\tcanvas: 'view',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tstate={ { backPath: '/wp_template_part/all' } }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ decodeEntities(\n\t\t\t\t\t\t\t\ttemplatePart.title?.rendered ||\n\t\t\t\t\t\t\t\t\ttemplatePart.slug\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t</Heading>\n\t\t\t\t</VStack>\n\t\t\t),\n\t\t\tmaxWidth: 400,\n\t\t},\n\t\t{\n\t\t\theader: __( 'Added by' ),\n\t\t\tcell: ( templatePart ) => (\n\t\t\t\t<AddedBy\n\t\t\t\t\tpostType={ templatePart.type }\n\t\t\t\t\tpostId={ templatePart.id }\n\t\t\t\t/>\n\t\t\t),\n\t\t},\n\t\t{\n\t\t\theader: <VisuallyHidden>{ __( 'Actions' ) }</VisuallyHidden>,\n\t\t\tcell: ( templatePart ) => (\n\t\t\t\t<TemplateActions\n\t\t\t\t\tpostType={ templatePart.type }\n\t\t\t\t\tpostId={ templatePart.id }\n\t\t\t\t/>\n\t\t\t),\n\t\t},\n\t];\n\n\treturn (\n\t\t<Page\n\t\t\ttitle={ __( 'Template Parts' ) }\n\t\t\tactions={\n\t\t\t\tcanCreate && (\n\t\t\t\t\t<AddNewTemplate\n\t\t\t\t\t\ttemplateType={ 'wp_template_part' }\n\t\t\t\t\t\tshowIcon={ false }\n\t\t\t\t\t\ttoggleProps={ { variant: 'primary' } }\n\t\t\t\t\t/>\n\t\t\t\t)\n\t\t\t}\n\t\t>\n\t\t\t{ templateParts && (\n\t\t\t\t<Table data={ templateParts } columns={ columns } />\n\t\t\t) }\n\t\t</Page>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tVisuallyHidden,\n\t__experimentalHeading as Heading,\n\t__experimentalText as Text,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore, useEntityRecords } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport Page from '../page';\nimport Table from '../table';\nimport Link from '../routes/link';\nimport AddedBy from '../list/added-by';\nimport TemplateActions from '../template-actions';\nimport AddNewTemplate from '../add-new-template';\nimport { store as editSiteStore } from '../../store';\n\nexport default function PageTemplates() {\n\tconst { records: templates } = useEntityRecords(\n\t\t'postType',\n\t\t'wp_template',\n\t\t{\n\t\t\tper_page: -1,\n\t\t}\n\t);\n\n\tconst { canCreate } = useSelect( ( select ) => {\n\t\tconst { supportsTemplatePartsMode } =\n\t\t\tselect( editSiteStore ).getSettings();\n\t\treturn {\n\t\t\tpostType: select( coreStore ).getPostType( 'wp_template' ),\n\t\t\tcanCreate: ! supportsTemplatePartsMode,\n\t\t};\n\t} );\n\n\tconst columns = [\n\t\t{\n\t\t\theader: __( 'Template' ),\n\t\t\tcell: ( template ) => (\n\t\t\t\t<VStack>\n\t\t\t\t\t<Heading as=\"h3\" level={ 5 }>\n\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\tparams={ {\n\t\t\t\t\t\t\t\tpostId: template.id,\n\t\t\t\t\t\t\t\tpostType: template.type,\n\t\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ decodeEntities(\n\t\t\t\t\t\t\t\ttemplate.title?.rendered || template.slug\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t</Heading>\n\t\t\t\t\t{ template.description && (\n\t\t\t\t\t\t<Text variant=\"muted\">\n\t\t\t\t\t\t\t{ decodeEntities( template.description ) }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t) }\n\t\t\t\t</VStack>\n\t\t\t),\n\t\t\tmaxWidth: 400,\n\t\t},\n\t\t{\n\t\t\theader: __( 'Added by' ),\n\t\t\tcell: ( template ) => (\n\t\t\t\t<AddedBy postType={ template.type } postId={ template.id } />\n\t\t\t),\n\t\t},\n\t\t{\n\t\t\theader: <VisuallyHidden>{ __( 'Actions' ) }</VisuallyHidden>,\n\t\t\tcell: ( template ) => (\n\t\t\t\t<TemplateActions\n\t\t\t\t\tpostType={ template.type }\n\t\t\t\t\tpostId={ template.id }\n\t\t\t\t/>\n\t\t\t),\n\t\t},\n\t];\n\n\treturn (\n\t\t<Page\n\t\t\ttitle={ __( 'Templates' ) }\n\t\t\tactions={\n\t\t\t\tcanCreate && (\n\t\t\t\t\t<AddNewTemplate\n\t\t\t\t\t\ttemplateType={ 'wp_template' }\n\t\t\t\t\t\tshowIcon={ false }\n\t\t\t\t\t\ttoggleProps={ { variant: 'primary' } }\n\t\t\t\t\t/>\n\t\t\t\t)\n\t\t\t}\n\t\t>\n\t\t\t{ templates && <Table data={ templates } columns={ columns } /> }\n\t\t</Page>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport PagePatterns from '../page-patterns';\nimport PageTemplateParts from '../page-template-parts';\nimport PageTemplates from '../page-templates';\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport default function PageMain() {\n\tconst {\n\t\tparams: { path },\n\t} = useLocation();\n\n\tif ( path === '/wp_template/all' ) {\n\t\treturn <PageTemplates />;\n\t} else if ( path === '/wp_template_part/all' ) {\n\t\treturn <PageTemplateParts />;\n\t} else if ( path === '/patterns' ) {\n\t\treturn <PagePatterns />;\n\t}\n\n\treturn null;\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport useEditedEntityRecord from '../use-edited-entity-record';\n\nconst MAX_LOADING_TIME = 10000; // 10 seconds\n\nexport function useIsSiteEditorLoading() {\n\tconst { isLoaded: hasLoadedPost } = useEditedEntityRecord();\n\tconst [ loaded, setLoaded ] = useState( false );\n\tconst inLoadingPause = useSelect(\n\t\t( select ) => {\n\t\t\tconst hasResolvingSelectors =\n\t\t\t\tselect( coreStore ).hasResolvingSelectors();\n\t\t\treturn ! loaded && ! hasResolvingSelectors;\n\t\t},\n\t\t[ loaded ]\n\t);\n\n\t/*\n\t * If the maximum expected loading time has passed, we're marking the\n\t * editor as loaded, in order to prevent any failed requests from blocking\n\t * the editor canvas from appearing.\n\t */\n\tuseEffect( () => {\n\t\tlet timeout;\n\n\t\tif ( ! loaded ) {\n\t\t\ttimeout = setTimeout( () => {\n\t\t\t\tsetLoaded( true );\n\t\t\t}, MAX_LOADING_TIME );\n\t\t}\n\n\t\treturn () => {\n\t\t\tclearTimeout( timeout );\n\t\t};\n\t}, [ loaded ] );\n\n\tuseEffect( () => {\n\t\tif ( inLoadingPause ) {\n\t\t\t/*\n\t\t\t * We're using an arbitrary 1s timeout here to catch brief moments\n\t\t\t * without any resolving selectors that would result in displaying\n\t\t\t * brief flickers of loading state and loaded state.\n\t\t\t *\n\t\t\t * It's worth experimenting with different values, since this also\n\t\t\t * adds 1s of artificial delay after loading has finished.\n\t\t\t */\n\t\t\tconst timeout = setTimeout( () => {\n\t\t\t\tsetLoaded( true );\n\t\t\t}, 1000 );\n\n\t\t\treturn () => {\n\t\t\t\tclearTimeout( timeout );\n\t\t\t};\n\t\t}\n\t}, [ inLoadingPause ] );\n\n\treturn ! loaded || ! hasLoadedPost;\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n\t__unstableUseNavigateRegions as useNavigateRegions,\n} from '@wordpress/components';\nimport {\n\tuseReducedMotion,\n\tuseViewportMatch,\n\tuseResizeObserver,\n} from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useRef } from '@wordpress/element';\nimport { NavigableRegion } from '@wordpress/interface';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport {\n\tCommandMenu,\n\tprivateApis as commandsPrivateApis,\n} from '@wordpress/commands';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\n\n/**\n * Internal dependencies\n */\nimport Sidebar from '../sidebar';\nimport Editor from '../editor';\nimport ErrorBoundary from '../error-boundary';\nimport { store as editSiteStore } from '../../store';\nimport getIsListPage from '../../utils/get-is-list-page';\nimport Header from '../header-edit-mode';\nimport useInitEditedEntityFromURL from '../sync-state-with-url/use-init-edited-entity-from-url';\nimport SiteHub from '../site-hub';\nimport ResizableFrame from '../resizable-frame';\nimport useSyncCanvasModeWithURL from '../sync-state-with-url/use-sync-canvas-mode-with-url';\nimport { unlock } from '../../lock-unlock';\nimport SavePanel from '../save-panel';\nimport KeyboardShortcutsRegister from '../keyboard-shortcuts/register';\nimport KeyboardShortcutsGlobal from '../keyboard-shortcuts/global';\nimport { useCommonCommands } from '../../hooks/commands/use-common-commands';\nimport { useEditModeCommands } from '../../hooks/commands/use-edit-mode-commands';\nimport PageMain from '../page-main';\nimport { useIsSiteEditorLoading } from './hooks';\n\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\nconst { useLocation } = unlock( routerPrivateApis );\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nconst ANIMATION_DURATION = 0.5;\n\nexport default function Layout() {\n\t// This ensures the edited entity id and type are initialized properly.\n\tuseInitEditedEntityFromURL();\n\tuseSyncCanvasModeWithURL();\n\tuseCommands();\n\tuseEditModeCommands();\n\tuseCommonCommands();\n\n\tconst hubRef = useRef();\n\tconst { params } = useLocation();\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isListPage = getIsListPage( params, isMobileViewport );\n\tconst isEditorPage = ! isListPage;\n\n\tconst {\n\t\tisDistractionFree,\n\t\thasFixedToolbar,\n\t\tcanvasMode,\n\t\tpreviousShortcut,\n\t\tnextShortcut,\n\t} = useSelect( ( select ) => {\n\t\tconst { getAllShortcutKeyCombinations } = select(\n\t\t\tkeyboardShortcutsStore\n\t\t);\n\t\tconst { getCanvasMode } = unlock( select( editSiteStore ) );\n\t\treturn {\n\t\t\tcanvasMode: getCanvasMode(),\n\t\t\tpreviousShortcut: getAllShortcutKeyCombinations(\n\t\t\t\t'core/edit-site/previous-region'\n\t\t\t),\n\t\t\tnextShortcut: getAllShortcutKeyCombinations(\n\t\t\t\t'core/edit-site/next-region'\n\t\t\t),\n\t\t\thasFixedToolbar: select( preferencesStore ).get(\n\t\t\t\t'core/edit-site',\n\t\t\t\t'fixedToolbar'\n\t\t\t),\n\t\t\tisDistractionFree: select( preferencesStore ).get(\n\t\t\t\t'core/edit-site',\n\t\t\t\t'distractionFree'\n\t\t\t),\n\t\t};\n\t}, [] );\n\tconst isEditing = canvasMode === 'edit';\n\tconst navigateRegionsProps = useNavigateRegions( {\n\t\tprevious: previousShortcut,\n\t\tnext: nextShortcut,\n\t} );\n\tconst disableMotion = useReducedMotion();\n\tconst showSidebar =\n\t\t( isMobileViewport && ! isListPage ) ||\n\t\t( ! isMobileViewport && ( canvasMode === 'view' || ! isEditorPage ) );\n\tconst showCanvas =\n\t\t( isMobileViewport && isEditorPage && isEditing ) ||\n\t\t! isMobileViewport ||\n\t\t! isEditorPage;\n\tconst isFullCanvas =\n\t\t( isMobileViewport && isListPage ) || ( isEditorPage && isEditing );\n\tconst [ canvasResizer, canvasSize ] = useResizeObserver();\n\tconst [ fullResizer ] = useResizeObserver();\n\tconst [ isResizing ] = useState( false );\n\tconst isEditorLoading = useIsSiteEditorLoading();\n\n\t// This determines which animation variant should apply to the header.\n\t// There is also a `isDistractionFreeHovering` state that gets priority\n\t// when hovering the `edit-site-layout__header-container` in distraction\n\t// free mode. It's set via framer and trickles down to all the children\n\t// so they can use this variant state too.\n\t//\n\t// TODO: The issue with this is we want to have the hover state stick when hovering\n\t// a popover opened via the header. We'll probably need to lift this state to\n\t// handle it ourselves. Also, focusWithin the header needs to be handled.\n\tlet headerAnimationState;\n\n\tif ( canvasMode === 'view' ) {\n\t\t// We need 'view' to always take priority so 'isDistractionFree'\n\t\t// doesn't bleed over into the view (sidebar) state\n\t\theaderAnimationState = 'view';\n\t} else if ( isDistractionFree ) {\n\t\theaderAnimationState = 'isDistractionFree';\n\t} else {\n\t\theaderAnimationState = canvasMode; // edit, view, init\n\t}\n\n\t// Sets the right context for the command palette\n\tconst commandContext =\n\t\tcanvasMode === 'edit' && isEditorPage\n\t\t\t? 'site-editor-edit'\n\t\t\t: 'site-editor';\n\tuseCommandContext( commandContext );\n\n\tconst [ backgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst [ gradientValue ] = useGlobalStyle( 'color.gradient' );\n\n\t// Synchronizing the URL with the store value of canvasMode happens in an effect\n\t// This condition ensures the component is only rendered after the synchronization happens\n\t// which prevents any animations due to potential canvasMode value change.\n\tif ( canvasMode === 'init' ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<CommandMenu />\n\t\t\t<KeyboardShortcutsRegister />\n\t\t\t<KeyboardShortcutsGlobal />\n\t\t\t{ fullResizer }\n\t\t\t<div\n\t\t\t\t{ ...navigateRegionsProps }\n\t\t\t\tref={ navigateRegionsProps.ref }\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'edit-site-layout',\n\t\t\t\t\tnavigateRegionsProps.className,\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-distraction-free': isDistractionFree && isEditing,\n\t\t\t\t\t\t'is-full-canvas': isFullCanvas,\n\t\t\t\t\t\t'is-edit-mode': isEditing,\n\t\t\t\t\t\t'has-fixed-toolbar': hasFixedToolbar,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t>\n\t\t\t\t<motion.div\n\t\t\t\t\tclassName=\"edit-site-layout__header-container\"\n\t\t\t\t\tvariants={ {\n\t\t\t\t\t\tisDistractionFree: {\n\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\ttransition: {\n\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\tdelay: 0.8,\n\t\t\t\t\t\t\t\tdelayChildren: 0.8,\n\t\t\t\t\t\t\t}, // How long to wait before the header exits\n\t\t\t\t\t\t},\n\t\t\t\t\t\tisDistractionFreeHovering: {\n\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\ttransition: {\n\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\tdelay: 0.2,\n\t\t\t\t\t\t\t\tdelayChildren: 0.2,\n\t\t\t\t\t\t\t}, // How long to wait before the header shows\n\t\t\t\t\t\t},\n\t\t\t\t\t\tview: { opacity: 1 },\n\t\t\t\t\t\tedit: { opacity: 1 },\n\t\t\t\t\t} }\n\t\t\t\t\twhileHover={\n\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t? 'isDistractionFreeHovering'\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t\tanimate={ headerAnimationState }\n\t\t\t\t>\n\t\t\t\t\t<SiteHub\n\t\t\t\t\t\tas={ motion.div }\n\t\t\t\t\t\tvariants={ {\n\t\t\t\t\t\t\tisDistractionFree: { x: '-100%' },\n\t\t\t\t\t\t\tisDistractionFreeHovering: { x: 0 },\n\t\t\t\t\t\t\tview: { x: 0 },\n\t\t\t\t\t\t\tedit: { x: 0 },\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tref={ hubRef }\n\t\t\t\t\t\tclassName=\"edit-site-layout__hub\"\n\t\t\t\t\t/>\n\n\t\t\t\t\t<AnimatePresence initial={ false }>\n\t\t\t\t\t\t{ isEditorPage && isEditing && (\n\t\t\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\t\t\tkey=\"header\"\n\t\t\t\t\t\t\t\tclassName=\"edit-site-layout__header\"\n\t\t\t\t\t\t\t\tariaLabel={ __( 'Editor top bar' ) }\n\t\t\t\t\t\t\t\tas={ motion.div }\n\t\t\t\t\t\t\t\tvariants={ {\n\t\t\t\t\t\t\t\t\tisDistractionFree: { opacity: 0, y: 0 },\n\t\t\t\t\t\t\t\t\tisDistractionFreeHovering: {\n\t\t\t\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\t\t\t\ty: 0,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tview: { opacity: 1, y: '-100%' },\n\t\t\t\t\t\t\t\t\tedit: { opacity: 1, y: 0 },\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\texit={ {\n\t\t\t\t\t\t\t\t\ty: '-100%',\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tinitial={ {\n\t\t\t\t\t\t\t\t\topacity: isDistractionFree ? 1 : 0,\n\t\t\t\t\t\t\t\t\ty: isDistractionFree ? 0 : '-100%',\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\t\tduration: disableMotion ? 0 : 0.2,\n\t\t\t\t\t\t\t\t\tease: 'easeOut',\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<Header />\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</motion.div>\n\n\t\t\t\t<div className=\"edit-site-layout__content\">\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\t// The sidebar is needed for routing on mobile\n\t\t\t\t\t\t// (https://github.com/WordPress/gutenberg/pull/51558/files#r1231763003),\n\t\t\t\t\t\t// so we can't remove the element entirely. Using `inert` will make\n\t\t\t\t\t\t// it inaccessible to screen readers and keyboard navigation.\n\t\t\t\t\t\tinert={ showSidebar ? undefined : 'inert' }\n\t\t\t\t\t\tanimate={ { opacity: showSidebar ? 1 : 0 } }\n\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\tduration:\n\t\t\t\t\t\t\t\t// Disable transition in mobile to emulate a full page transition.\n\t\t\t\t\t\t\t\tdisableMotion || isMobileViewport\n\t\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t\t: ANIMATION_DURATION,\n\t\t\t\t\t\t\tease: 'easeOut',\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tclassName=\"edit-site-layout__sidebar\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<NavigableRegion ariaLabel={ __( 'Navigation' ) }>\n\t\t\t\t\t\t\t<Sidebar />\n\t\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t</motion.div>\n\n\t\t\t\t\t<SavePanel />\n\n\t\t\t\t\t{ showCanvas && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ isListPage && <PageMain /> }\n\t\t\t\t\t\t\t{ isEditorPage && (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t\t\t'edit-site-layout__canvas-container',\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t'is-resizing': isResizing,\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\t{ canvasResizer }\n\t\t\t\t\t\t\t\t\t{ !! canvasSize.width && (\n\t\t\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\t\t\twhileHover={\n\t\t\t\t\t\t\t\t\t\t\t\tisEditorPage &&\n\t\t\t\t\t\t\t\t\t\t\t\tcanvasMode === 'view'\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\tscale: 1.005,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransition: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tduration:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisableMotion ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisResizing\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 0.5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tease: 'easeOut',\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\t: {}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tinitial={ false }\n\t\t\t\t\t\t\t\t\t\t\tlayout=\"position\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"edit-site-layout__canvas\"\n\t\t\t\t\t\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\t\t\t\t\tduration:\n\t\t\t\t\t\t\t\t\t\t\t\t\tdisableMotion || isResizing\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: ANIMATION_DURATION,\n\t\t\t\t\t\t\t\t\t\t\t\tease: 'easeOut',\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<ErrorBoundary>\n\t\t\t\t\t\t\t\t\t\t\t\t<ResizableFrame\n\t\t\t\t\t\t\t\t\t\t\t\t\tisReady={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t! isEditorLoading\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\tisFullWidth={ isEditing }\n\t\t\t\t\t\t\t\t\t\t\t\t\toversizedClassName=\"edit-site-layout__resizable-frame-oversized\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tinnerContentStyle={ {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackground:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgradientValue ??\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackgroundColor,\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\t\t<Editor\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tisLoading={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisEditorLoading\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</ResizableFrame>\n\t\t\t\t\t\t\t\t\t\t\t</ErrorBoundary>\n\t\t\t\t\t\t\t\t\t\t</motion.div>\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) }\n\t\t\t\t\t\t</>\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 * Returns if the params match the list page route.\n *\n * @param {Object}  params                The url params.\n * @param {string}  params.path           The current path.\n * @param {string}  [params.categoryType] The current category type.\n * @param {string}  [params.categoryId]   The current category id.\n * @param {boolean} isMobileViewport      Is mobile viewport.\n *\n * @return {boolean} Is list page or not.\n */\nexport default function getIsListPage(\n\t{ path, categoryType, categoryId },\n\tisMobileViewport\n) {\n\treturn (\n\t\tpath === '/wp_template/all' ||\n\t\tpath === '/wp_template_part/all' ||\n\t\t( path === '/patterns' &&\n\t\t\t// Don't treat \"/patterns\" without categoryType and categoryId as a\n\t\t\t// list page in mobile because the sidebar covers the whole page.\n\t\t\t( ! isMobileViewport || ( !! categoryType && !! categoryId ) ) )\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SlotFillProvider, Popover } from '@wordpress/components';\nimport { UnsavedChangesWarning } from '@wordpress/editor';\nimport { ShortcutProvider } from '@wordpress/keyboard-shortcuts';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { useDispatch } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { PluginArea } from '@wordpress/plugins';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport Layout from '../layout';\nimport { GlobalStylesProvider } from '../global-styles/global-styles-provider';\nimport { unlock } from '../../lock-unlock';\n\nconst { RouterProvider } = unlock( routerPrivateApis );\n\nexport default function App() {\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\n\tfunction onPluginAreaError( name ) {\n\t\tcreateErrorNotice(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: plugin name */\n\t\t\t\t__(\n\t\t\t\t\t'The \"%s\" plugin has encountered an error and cannot be rendered.'\n\t\t\t\t),\n\t\t\t\tname\n\t\t\t)\n\t\t);\n\t}\n\n\treturn (\n\t\t<ShortcutProvider style={ { height: '100%' } }>\n\t\t\t<SlotFillProvider>\n\t\t\t\t<GlobalStylesProvider>\n\t\t\t\t\t<Popover.Slot />\n\t\t\t\t\t<UnsavedChangesWarning />\n\t\t\t\t\t<RouterProvider>\n\t\t\t\t\t\t<Layout />\n\t\t\t\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t\t\t</RouterProvider>\n\t\t\t\t</GlobalStylesProvider>\n\t\t\t</SlotFillProvider>\n\t\t</ShortcutProvider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { ComplementaryArea } from '@wordpress/interface';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../../store';\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-site' ).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 {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 = wp.element.createElement;\n * var PanelBody = wp.components.PanelBody;\n * var PluginSidebar = wp.editSite.PluginSidebar;\n * var moreIcon = wp.element.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/edit-site';\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 PluginSidebarEditSite( { className, ...props } ) {\n\tconst showIconLabels = useSelect(\n\t\t( select ) => select( editSiteStore ).getSettings().showIconLabels,\n\t\t[]\n\t);\n\n\treturn (\n\t\t<ComplementaryArea\n\t\t\tpanelClassName={ className }\n\t\t\tclassName=\"edit-site-sidebar-edit-mode\"\n\t\t\tscope=\"core/edit-site\"\n\t\t\tshowIconLabels={ showIconLabels }\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 {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.editSite.PluginSidebarMoreMenuItem;\n * var moreIcon = wp.element.createElement( 'svg' ); //... svg element.\n *\n * function MySidebarMoreMenuItem() {\n * \treturn wp.element.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/edit-site';\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 {WPComponent} The component to be rendered.\n */\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/edit-site\"\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { ActionItem } from '@wordpress/interface';\nimport { compose } from '@wordpress/compose';\nimport { MenuItem } from '@wordpress/components';\nimport { withPluginContext } from '@wordpress/plugins';\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 {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.editSite.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/edit-site';\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 {WPComponent} The component to be rendered.\n */\nexport default compose(\n\twithPluginContext( ( context, ownProps ) => {\n\t\treturn {\n\t\t\tas: ownProps.as ?? MenuItem,\n\t\t\ticon: ownProps.icon || context.icon,\n\t\t\tname: 'core/edit-site/plugin-more-menu',\n\t\t};\n\t} )\n)( ActionItem );\n","/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { dispatch } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot } from '@wordpress/element';\nimport {\n\t__experimentalFetchLinkSuggestions as fetchLinkSuggestions,\n\t__experimentalFetchUrlData as fetchUrlData,\n} from '@wordpress/core-data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport './hooks';\nimport { store as editSiteStore } from './store';\nimport App from './components/app';\n\n/**\n * Initializes the site editor screen.\n *\n * @param {string} id       ID of the root element to render the screen in.\n * @param {Object} settings Editor settings.\n */\nexport function initializeEditor( id, settings ) {\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tsettings.__experimentalFetchLinkSuggestions = ( search, searchOptions ) =>\n\t\tfetchLinkSuggestions( search, searchOptions, settings );\n\tsettings.__experimentalFetchRichUrlData = fetchUrlData;\n\n\tdispatch( blocksStore ).__experimentalReapplyBlockTypeFilters();\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter(\n\t\t( { name } ) => name !== 'core/freeform'\n\t);\n\tregisterCoreBlocks( coreBlocks );\n\tdispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( process.env.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: true,\n\t\t} );\n\t}\n\n\t// We dispatch actions and update the store synchronously before rendering\n\t// so that we won't trigger unnecessary re-renders with useEffect.\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-site', {\n\t\teditorMode: 'visual',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tdistractionFree: false,\n\t\tkeepCaretInsideBlock: false,\n\t\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t\tshowListViewByDefault: false,\n\t\tshowBlockBreadcrumbs: true,\n\t} );\n\n\tdispatch( interfaceStore ).setDefaultComplementaryArea(\n\t\t'core/edit-site',\n\t\t'edit-site/template'\n\t);\n\n\tdispatch( editSiteStore ).updateSettings( settings );\n\n\t// Keep the defaultTemplateTypes in the core/editor settings too,\n\t// so that they can be selected with core/editor selectors in any editor.\n\t// This is needed because edit-site doesn't initialize with EditorProvider,\n\t// which internally uses updateEditorSettings as well.\n\tdispatch( editorStore ).updateEditorSettings( {\n\t\tdefaultTemplateTypes: settings.defaultTemplateTypes,\n\t\tdefaultTemplatePartAreas: settings.defaultTemplatePartAreas,\n\t} );\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render( <App /> );\n\n\treturn root;\n}\n\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editSite.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as PluginSidebar } from './components/sidebar-edit-mode/plugin-sidebar';\nexport { default as PluginSidebarMoreMenuItem } from './components/header-edit-mode/plugin-sidebar-more-menu-item';\nexport { default as PluginMoreMenuItem } from './components/header-edit-mode/plugin-more-menu-item';\nexport { default as PluginTemplateSettingPanel } from './components/plugin-template-setting-panel';\nexport { store } from './store';\n"],"names":["module","exports","keys","values","map","Map","has","key","indexOf","get","set","value","push","delete","index","splice","createEvent","name","Event","bubbles","e","evt","document","initEvent","assign","ta","nodeName","heightOffset","clientWidth","cachedHeight","pageResize","update","destroy","style","window","removeEventListener","Object","forEach","bind","height","resize","overflowY","overflowX","wordWrap","addEventListener","getComputedStyle","boxSizing","parseFloat","paddingTop","paddingBottom","borderTopWidth","borderBottomWidth","isNaN","changeOverflow","width","offsetWidth","scrollHeight","overflows","el","arr","parentNode","Element","scrollTop","node","getParentOverflows","docTop","documentElement","styleHeight","Math","round","computed","actualHeight","offsetHeight","dispatchEvent","err","methods","autosize","options","Array","prototype","call","length","x","default","hasOwn","hasOwnProperty","classNames","classes","i","arguments","arg","argType","isArray","inner","apply","toString","join","prop","currentStyle","replace","word","letter","toUpperCase","isMergeableObject","isNonNullObject","stringValue","$$typeof","REACT_ELEMENT_TYPE","isReactElement","isSpecial","Symbol","for","cloneUnlessOtherwiseSpecified","clone","deepmerge","val","defaultArrayMerge","target","source","concat","element","getKeys","getOwnPropertySymbols","filter","symbol","propertyIsEnumerable","getEnumerableOwnPropertySymbols","propertyIsOnObject","object","property","_","arrayMerge","sourceIsArray","destination","propertyIsUnsafe","customMerge","getMergeFunction","mergeObject","all","array","Error","reduce","prev","next","deepmerge_1","download","data","strFileName","strMimeType","blob","reader","self","defaultMime","mimeType","payload","url","anchor","createElement","a","String","myBlob","Blob","MozBlob","WebKitBlob","fileName","this","split","pop","href","ajax","XMLHttpRequest","open","responseType","onload","response","setTimeout","send","test","navigator","msSaveBlob","dataUrlToBlob","saver","type","tempUiArr","Uint8Array","mx","charCodeAt","strUrl","parts","binData","atob","decodeURIComponent","uiArr","winMode","setAttribute","className","innerHTML","display","body","appendChild","click","removeChild","URL","revokeObjectURL","userAgent","confirm","location","f","src","createObjectURL","constructor","btoa","y","encodeURIComponent","FileReader","result","readAsDataURL","computedStyle","lnHeightStr","lnHeight","_lnHeightStyle","lineHeight","_node","fontSizeStr","fontSize","padding","border","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","props","propName","componentName","propFullName","secret","getShim","isRequired","ReactPropTypes","bool","func","number","string","any","arrayOf","elementType","instanceOf","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","extendStatics","__extends","setPrototypeOf","__proto__","d","b","p","__","create","__assign","t","s","n","__rest","__esModule","React","getLineHeight","RESIZED","TextareaAutosizeClass","_super","_this","state","textarea","onResize","updateLineHeight","setState","onChange","currentValue","currentTarget","componentDidMount","_a","maxRows","async","componentWillUnmount","render","_b","children","innerRef","maxHeight","ref","current","componentDidUpdate","defaultProps","rows","propTypes","Component","TextareaAutosize","forwardRef","TextareaAutosize_1","characterMap","chars","allAccents","RegExp","firstAccent","removeAccents","match","remove","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","getter","definition","o","defineProperty","enumerable","obj","r","toStringTag","SVG","xmlns","viewBox","Path","fillRule","clipRule","setDefaultComplementaryArea","scope","area","enableComplementaryArea","registry","dispatch","select","preferencesStore","disableComplementaryArea","pinItem","item","pinnedItems","unpinItem","toggleFeature","featureName","deprecated","since","alternative","toggle","setFeatureValue","setFeatureDefaults","defaults","setDefaults","openModal","closeModal","getActiveComplementaryArea","createRegistrySelector","isComplementaryAreaVisible","complementaryAreas","isComplementaryAreaLoading","isVisible","identifier","isItemPinned","isFeatureActive","isModalActive","modalName","activeModal","combineReducers","action","store","createReduxStore","reducer","actions","selectors","register","withPluginContext","context","ownProps","icon","complementaryAreaContext","as","Button","selectedIcon","ComponentToUse","isSelected","useSelect","interfaceStore","useDispatch","onClick","smallScreenTitle","toggleButtonProps","toggleButton","closeSmall","classnames","tabIndex","noop","ActionItem","Fill","fpOnClick","args","Slot","ButtonGroup","fillProps","bubblesVirtually","fills","Children","initializedByPlugins","__unstableExplicitMenuItem","__unstableTarget","child","includes","PluginsMenuItem","restProps","MenuItem","ComplementaryAreaMoreMenuItem","toggleProps","role","check","PinnedItems","ComplementaryAreaFill","ComplementaryAreaWrapped","withComplementaryAreaContext","closeLabel","header","headerClassName","isPinnable","panelClassName","title","toggleShortcut","isActiveByDefault","showIconLabels","isLoading","isActive","isPinned","activeArea","isSmall","isLarge","_activeArea","viewportStore","isViewportMatch","previousIsSmall","useRef","shouldOpenWhenNotSmall","useEffect","useAdjustComplementaryListener","isPressed","label","showTooltip","variant","onClose","shortcut","starFilled","starEmpty","Panel","NavigableRegion","ariaLabel","Tag","headerVariants","hidden","opacity","hover","transition","delay","delayChildren","distractionFreeInactive","isDistractionFree","footer","editorNotices","sidebar","secondarySidebar","notices","content","labels","enableRegionNavigation","shortcuts","navigateRegionsProps","useNavigateRegions","querySelector","classList","useHTMLClass","mergedLabels","useMergeRefs","motion","initial","whileHover","animate","variants","MoreMenuDropdown","DropdownComponent","DropdownMenu","popoverProps","moreVertical","placement","tooltipPosition","PreferencesModal","Modal","onRequestClose","size","cloneElement","PREFERENCES_MENU","PreferencesModalTabs","sections","isLargeViewport","useViewportMatch","activeMenu","setActiveMenu","useState","tabs","sectionsContentMap","useMemo","mappedTabs","accumulator","tabLabel","getCurrentTab","useCallback","tab","modalContent","TabPanel","initialTabName","onSelect","orientation","initialPath","path","Card","isBorderless","CardBody","Item","isAction","justify","FlexItem","isRTL","chevronLeft","chevronRight","section","CardHeader","gap","description","help","isChecked","ToggleControl","__nextHasNoMarginBottom","checked","addFilter","MediaUpload","grad","turn","rad","PI","pow","u","isFinite","g","h","max","min","v","floor","l","c","m","exec","parseInt","substr","Number","N","M","H","$","j","parsed","trim","rgba","isValid","brightness","isDark","isLight","toHex","toRgb","toRgbString","toHsl","toHslString","toHsv","invert","w","saturate","desaturate","grayscale","lighten","darken","rotate","hue","alpha","isEqual","S","lock","unlock","__dangerousOptInToUnstableAPIsOnlyForCoreModules","useGlobalSetting","blockEditorPrivateApis","extend","luminance","contrast","isReadable","level","GlobalStylesContext","useBlockEditingMode","STYLE_PATH_TO_CSS_VAR_INFIX","STYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE","cloneDeep","JSON","parse","stringify","PushChangesToGlobalStylesControl","attributes","setAttributes","changes","supports","supportedPanels","blocksStore","getSupportedStyles","useSupportedStyles","flatMap","STYLE_PROPERTY","presetAttributeKey","presetAttributeValue","useChangesToPush","user","userConfig","setUserConfig","useContext","__unstableMarkNextChangeAsNotPersistent","blockEditorStore","createSuccessNotice","noticesStore","pushChanges","blockStyles","newBlockStyles","newUserConfig","undoIgnore","sprintf","getBlockType","BaseControl","disabled","withPushChangesToGlobalStyles","createHigherOrderComponent","BlockEdit","blockEditingMode","InspectorAdvancedControls","isPreviewingTheme","getQueryArg","currentlyPreviewingTheme","useHistory","routerPrivateApis","useLink","params","shouldReplace","history","currentArgs","getQueryArgs","currentUrlWithoutArgs","removeQueryArgs","wp_theme_preview","addQueryArgs","event","preventDefault","Link","useLocation","EditTemplatePartMenuItem","theme","slug","templatePart","coreStore","getEntityRecord","linkProps","postId","id","postType","canvas","fromTemplateId","BlockControls","group","ToolbarButton","withEditBlockControls","isDisplayed","NavigationMenuEdit","navigationMenu","deviceType","settings","editedPost","blockInserterPanel","isOpen","listViewPanel","saveViewPanel","canvasMode","mode","editorCanvasContainerView","view","hasPageContentFocus","STORE_NAME","TEMPLATE_PART_AREA_GENERAL","isTemplateRevertable","template","has_theme_file","__experimentalSetPreviewDeviceType","setTemplate","templateId","templateSlug","resolveSelect","error","addTemplate","newTemplate","saveEntityRecord","editEntityRecord","blocks","removeTemplate","deleteEntityRecord","force","lastError","getLastEntityDeleteError","templateTitle","rendered","decodeEntities","errorMessage","message","code","createErrorNotice","setTemplatePart","templatePartId","setNavigationMenu","navigationMenuId","setEditedEntity","setHomeTemplateId","version","setEditedPostContext","setPage","page","entity","getPathAndQueryString","link","__experimentalGetTemplateForLink","setNavigationPanelActiveMenu","openNavigationPanelToMenu","setIsNavigationPanelOpened","setIsInserterOpened","updateSettings","setIsListViewOpened","setIsSaveViewOpened","revertTemplate","allowUndo","noticeId","removeNotice","templateEntityConfig","getEntityConfig","fileTemplatePath","baseURL","fileTemplate","apiFetch","serializeBlocks","blocksForSerialization","__unstableSerializeAndClean","edited","getEditedEntityRecord","raw","undoRevert","openGeneralSidebar","editSiteStoreName","closeGeneralSidebar","switchEditorMode","clearSelectedBlock","speak","setHasPageContentFocus","setCanvasMode","__unstableSetEditorMode","setEditorCanvasContainerView","LEAF_KEY","isShallowEqual","fromIndex","EMPTY_ARRAY","memoizedGetFilteredTemplatePartBlocks","fn","head","tail","memoized","len","searchCache","maxSize","clear","memoize","templateParts","templatePartsById","newTemplateParts","part","stack","innerBlocks","block","shift","unshift","isTemplatePart","__unstableGetPreference","__experimentalGetPreviewDeviceType","getCanUserCreateMedia","coreDataStore","canUser","getReusableBlocks","Platform","getEntityRecords","per_page","getSettings","selector","getDependants","rootCache","normalizedGetDependants","getEditedPostType","WeakMap","callSelector","cache","dependants","dependant","caches","isUniqueByDependants","createCache","getCache","lastDependants","createSelector","setIsInserterOpen","outlineMode","focusMode","hasFixedToolbar","keepCaretInsideBlock","__experimentalSetIsInserterOpened","__experimentalReusableBlocks","__experimentalPreferPatternsOnRoot","mediaUpload","onError","rest","uploadMedia","wpAllowedMimeTypes","allowedMimeTypes","getHomeTemplateId","getEditedPostId","getEditedPostContext","getPage","isInserterOpened","__experimentalGetInsertionPoint","rootClientId","insertionIndex","filterValue","postContentClientId","__experimentalGetGlobalBlocksByName","isListViewOpened","isSaveViewOpened","getCurrentTemplateTemplateParts","templateType","getFilteredTemplatePartBlocks","getEditorMode","getCurrentTemplateNavigationPanelSubMenu","getNavigationPanelActiveMenu","isNavigationOpened","isPage","getCanvasMode","getEditorCanvasContainerView","storeConfig","registerPrivateSelectors","privateSelectors","registerPrivateActions","privateActions","SidebarButton","SidebarNavigationScreen","isRoot","meta","backPath","dashboardLink","editSiteStore","__experimentalDashboardLink","getTheme","goTo","useNavigator","spacing","alignment","isBack","color","SidebarNavigationItem","withChevron","suffix","fill","FlexBlock","chevronLeftSmall","chevronRightSmall","isObject","isPlainObject","ctor","prot","cleanEmptyObject","mergeBaseAndUserConfigs","base","GlobalStylesProvider","isUserConfigReady","globalStylesId","isReady","styles","hasFinishedResolution","_globalStylesId","__experimentalGetCurrentGlobalStylesId","record","hasResolved","callback","updatedConfig","useGlobalStylesUserConfig","isBaseConfigReady","baseConfig","__experimentalGetCurrentThemeBaseGlobalStyles","useGlobalStylesBaseConfig","mergedConfig","merged","useGlobalStylesContext","Provider","useGlobalStyle","useGlobalStylesOutput","firstFrame","start","scale","midFrame","secondFrame","isFocused","withHoverView","fontWeight","fontFamily","headingFontFamily","headingFontWeight","textColor","headingColor","backgroundColor","gradientValue","disableMotion","useReducedMotion","coreColors","themeColors","customColors","isHovered","setIsHovered","containerResizeListener","useResizeObserver","ratio","paletteColors","highlightedColors","slice","editorStyles","css","isGlobalStyles","position","onMouseEnter","onMouseLeave","background","cursor","overflow","borderRadius","top","flexGrow","textAlign","areGlobalStyleConfigsEqual","Variation","variation","setIsFocused","selectVariation","onKeyDown","keyCode","ENTER","onFocus","onBlur","StyleVariationsContainer","variations","__experimentalGetCurrentThemeGlobalStylesVariations","withEmptyVariation","columns","ResizeHandle","direction","resizeWidthBy","LEFT","RIGHT","VisuallyHidden","HANDLE_STYLES_OVERRIDE","userSelect","right","bottom","left","enableResizing","setWidth","resizableRef","deltaPixels","ResizableBox","api","resizable","onResizeStop","minWidth","maxWidth","enable","showHandle","resizeRatio","handleComponent","handleClasses","handleStyles","getEditorCanvasContainerTitle","createPrivateSlotFill","componentsPrivateApis","privateKey","EditorCanvasContainerSlot","EditorCanvasContainerFill","EditorCanvasContainer","closeButtonLabel","showListViewByDefault","isClosed","setIsClosed","focusOnMountRef","useFocusOnMount","sectionFocusReturnRef","useFocusReturn","onCloseContainer","childrenWithProps","shouldShowCloseButton","ESCAPE","defaultPrevented","ExperimentalBlockEditorProvider","getExamples","category","createBlock","getBlockTypes","blockType","example","inserter","getBlockFromExample","StyleBookBody","examples","sizes","buttonModeProps","SPACE","readonly","buttonModeStyles","Examples","memo","composite","useCompositeState","Example","originalSettings","__unstableIsPreviewMode","renderedBlocks","Disabled","BlockList","renderAppender","showCloseButton","showTabs","resizeObserver","getCategories","some","SITE_EDITOR_AUTHORS_QUERY","_fields","capabilities","useGlobalStylesRevisions","authors","currentUser","isDirty","revisions","__experimentalGetDirtyEntityRecords","getCurrentUser","getUsers","getCurrentThemeGlobalStylesRevisions","dirtyEntityRecords","_currentUser","_isDirty","globalStylesRevisions","_modifiedRevisions","hasUnsavedChanges","revision","author","find","isLatest","unsavedRevision","avatar_urls","modified","Date","SidebarNavigationItemGlobalStyles","createNotice","setPreference","getPrefference","turnOffDistractionFreeMode","isDismissible","SidebarNavigationScreenGlobalStylesContent","storedSettings","BlockEditorProvider","onInput","SidebarNavigationScreenGlobalStylesFooter","onClickRevisions","revisionsCount","globalStyles","_links","count","hasRevisions","dateTime","humanTimeDiff","Icon","backup","SidebarNavigationScreenGlobalStyles","isMobileViewport","isViewMode","isStyleBookOpened","openGlobalStyles","Promise","openStyleBook","openRevisions","seen","edit","SidebarNavigationScreenMain","navigation","layout","useDebouncedInput","defaultValue","input","setInput","debounced","setter","setDebounced","useDebounce","useExistingTemplates","useDefaultTemplateTypes","editorStore","__experimentalGetDefaultTemplateTypes","usePublicPostTypes","postTypes","getPostTypes","excludedPostTypes","viewable","usePostTypeNeedsUniqueIdentifier","publicPostTypes","postTypeLabels","singularName","singular_name","toLowerCase","usePostTypeArchiveMenuItems","postTypesWithArchives","has_archive","existingTemplates","needsUniqueIdentifier","existingTemplate","startsWith","archive","templatePrefix","usePostTypeMenuItems","onClickMenuItem","defaultTemplateTypes","templatePrefixes","postTypesInfo","useEntitiesInfo","existingTemplateSlugs","menuItems","generalTemplateSlug","defaultTemplateType","_slug","hasGeneralTemplate","_needsUniqueIdentifier","menuItemTitle","menuItem","post","hasEntities","config","recordNamePath","queryArgs","search","orderBy","exclude","existingEntitiesIds","getSpecificTemplate","suggestion","postTypesMenuItems","defaultPostTypesMenuItems","useTaxonomiesMenuItems","publicTaxonomies","taxonomies","getTaxonomies","visibility","publicly_queryable","usePublicTaxonomies","taxonomyLabels","taxonomiesInfo","taxonomy","blockMeta","defaultTaxonomiesMenuItems","taxonomiesMenuItems","USE_AUTHOR_MENU_ITEM_TEMPLATE_PREFIX","USE_AUTHOR_MENU_ITEM_QUERY_PARAMETERS","who","entityName","additionalQueryParameters","recordsToExcludePerEntity","slugsToExcludePerEntity","entries","prefix","slugsWithTemplates","_accumulator","_prefix","substring","useExistingTemplateSlugs","entitiesWithTemplates","useTemplatesToExclude","SuggestionListItem","entityForSuggestions","baseCssClass","weight","TextHighlight","text","highlight","SuggestionList","setSearch","debouncedSearch","suggestions","query","order","records","searchResults","searchHasResolved","useEntityRecords","setSuggestions","newSuggestions","entities","useSearchSuggestions","showSearchControl","setShowSearchControl","SearchControl","search_items","placeholder","not_found","showSearchEntities","setShowSearchEntities","Flex","align","isBlock","all_items","lowerCase","str","DEFAULT_SPLIT_REGEXP","DEFAULT_STRIP_REGEXP","noCase","splitRegexp","stripRegexp","transform","delimiter","end","charAt","re","paramCase","dotCase","createTemplate","setTitle","defaultTitle","isBusy","setIsBusy","onSubmit","kebabCase","TextControl","TemplateActionsLoadingScreen","isFullScreen","shouldCloseOnClickOutside","shouldCloseOnEsc","__experimentalHideHeader","Spinner","DEFAULT_TEMPLATE_SLUGS","TEMPLATE_ICONS","home","verse","single","pin","notFound","list","commentAuthorAvatar","date","calendar","tag","attachment","media","TemplateListItem","modalContentMap","templatesList","customTemplate","customGenericTemplate","NewTemplate","showIcon","showModal","setShowModal","setModalContent","setEntityForSuggestions","isCreatingTemplate","setIsCreatingTemplate","homeUrl","getUnstableBase","TEMPLATE_SHORT_DESCRIPTIONS","getFullYear","isWPSuggestion","status","is_wp_suggestion","throwOnError","onModalClose","missingTemplates","_entityForSuggestions","enhancedMissingDefaultTemplateTypes","authorMenuItem","authorInfo","useAuthorMenuItem","matchIndex","findIndex","sort","template1","template2","useMissingTemplates","Toggle","restToggleProps","modalTitle","plus","add_new_item","overlayClassName","AddNewTemplate","getPostType","TemplateItem","linkInfo","SidebarNavigationScreenTemplates","isTemplatePartsMode","supportsTemplatePartsMode","templates","isResolving","sortedTemplates","localeCompare","browseAllLink","canCreate","useEditedEntityRecord","isLoaded","__experimentalGetTemplateInfo","getTemplateInfo","usedPostType","usedPostId","_record","_isLoaded","templateInfo","getTitle","getDescription","TEMPLATE_POST_TYPE_NAMES","useAddedBy","getPlugin","getMedia","getUser","origin","themeIcon","isCustomized","pluginIcon","siteData","globeIcon","imageUrl","site_logo","source_url","authorIcon","nickname","AvatarImage","isImageLoaded","setIsImageLoaded","onLoad","alt","AddedBy","_x","isTemplateRemovable","RenameMenuItem","isModalOpen","setIsModalOpen","saveEditedEntityRecord","is_custom","required","TemplateActions","onRemove","isRemovable","isRevertable","MenuGroup","DeleteMenuItem","isTemplate","info","revertAndSaveTemplate","isDestructive","isTertiary","onConfirm","onCancel","confirmButtonText","SidebarNavigationScreenDetailsPanelLabel","SidebarNavigationScreenDetailsPanelRow","SidebarNavigationScreenDetailsPanelValue","SidebarNavigationScreenDetailsPanel","EMPTY_OBJECT","TemplateAreaButton","icons","limit","ellipsizeMode","numberOfLines","HomeTemplateDetails","allowCommentsOnNewPosts","templatePartAreas","postsPerPage","postsPageTitle","postsPageId","currentTemplateParts","siteSettings","_currentTemplateParts","siteEditorSettings","_postsPageRecord","page_for_posts","default_comment_status","posts_per_page","defaultTemplatePartAreas","commentsOnNewPostsValue","setCommentsOnNewPostsValue","postsCountValue","setPostsCountValue","postsPageTitleValue","setPostsPageTitleValue","templateAreas","debounce","newValue","spinControls","step","CheckboxControl","SidebarNavigationScreenDetailsFooter","lastModifiedDateTime","createInterpolateElement","time","SidebarNavigationScreenTemplate","currentTheme","getCurrentTheme","addedBy","isAddedByActiveTheme","stylesheet","descriptionText","useTemplateDetails","pencil","DEFAULT_CATEGORY","DEFAULT_TYPE","PATTERNS","TEMPLATE_PARTS","USER_PATTERNS","USER_PATTERN_CATEGORY","CORE_PATTERN_SOURCES","SYNC_TYPES","full","unsynced","filterOutDuplicatesByName","currentItem","items","CreatePatternModal","onCreate","setName","syncType","setSyncType","isSubmitting","setIsSubmitting","pattern","wp_pattern_sync_status","categoryId","createPattern","useExistingTemplateParts","getUniqueTemplatePartTitle","lowercaseTitle","existingTitles","getCleanTemplatePartSlug","CreateTemplatePartModal","existingTemplateParts","setArea","instanceId","useInstanceId","__experimentalGetDefaultTemplatePartAreas","uniqueTitle","cleanSlug","serialize","createTemplatePart","AddNewPattern","showPatternModal","setShowPatternModal","showTemplatePartModal","setShowTemplatePartModal","handleError","controls","symbolFilled","categoryType","CategoryItem","getTemplatePartAreas","uncategorized","templatePartAreaLabels","SidebarNavigationScreenPatterns","currentCategory","currentType","hasTemplateParts","useTemplatePartAreas","patternCategories","hasPatterns","defaultCategories","blockPatternCategories","__experimentalAdditionalBlockPatternCategories","__experimentalBlockPatternCategories","getBlockPatternCategories","useDefaultPatternCategories","themePatterns","blockPatterns","__experimentalAdditionalBlockPatterns","__experimentalBlockPatterns","restBlockPatterns","getBlockPatterns","useThemePatterns","categoryMap","categoriesWithCounts","categories","usePatternCategories","myPatterns","hasMyPatterns","useMyPatterns","templatePartsLink","getTemplatePartIcon","Tooltip","lockSmall","file","useInitEditedEntityFromURL","isRequestingSite","homepageId","getSite","show_on_front","page_on_front","POPOVER_PROPS","LeafMoreMenu","clientId","moveBlocksDown","moveBlocksUp","removeBlocks","removeLabel","BlockTitle","maximumLength","goToLabel","getBlockRootClientId","onGoToPage","selectedBlock","kind","noIcons","chevronUp","chevronDown","PrivateListView","PAGES_QUERY","orderby","NavigationMenuContent","listViewRootClientId","areInnerBlocksControlled","getBlockName","getBlockCount","getBlockOrder","blockClientIds","pageListHasBlocks","isLoadingPages","replaceBlock","offCanvasOnselect","blockSettingsMenu","showAppender","BlockTools","NavigationMenuEditor","TemplatePartNavigationMenu","useEntityProp","upperCase","TemplatePartNavigationMenuListItem","TemplatePartNavigationMenuList","menus","menuId","TemplatePartNavigationMenus","SidebarNavigationScreenPattern","patternDetails","details","navigationBlocks","targetBlockType","findInBlocks","_blocks","innerNavigationBlocks","getBlocksOfTypeFromBlocks","navigationMenuIds","useNavigationMenuContent","usePatternDetails","getPathFromURL","urlParams","PRELOADED_NAVIGATION_MENUS_QUERY","notEmptyString","testString","RenameModal","menuTitle","onSave","editedMenuTitle","setEditedMenuTitle","isEditedMenuTitleValid","ScreenNavigationMoreMenu","onDelete","onDuplicate","renameModalOpen","setRenameModalOpen","deleteModalOpen","setDeleteModalOpen","closeModals","buildNavigationLabel","EditButton","SingleNavigationMenu","handleDelete","handleDuplicate","handleSave","SidebarNavigationScreenWrapper","SidebarNavigationScreenNavigationMenu","useEntityRecord","isSaving","isDeleting","isSavingEntityRecord","isDeletingEntityRecord","useNavigationMenuHandlers","_handleDelete","_handleSave","edits","_handleDuplicate","useDeleteNavigationMenu","useSaveNavigationMenu","getEditedEntityRecordSelector","originalRecord","useDuplicateNavigationMenu","savedRecord","hasCreatedFallback","SidebarNavigationScreenNavigationMenus","navigationMenus","isResolvingNavigationMenus","hasResolvedNavigationMenus","getNavigationFallbackId","firstNavigationMenu","hasNavigationMenus","NavMenuItem","buildMenuLabel","wp_template","wp_template_part","SidebarNavigationScreenTemplatesBrowse","SaveButton","defaultLabel","isSaveViewOpen","activateSaveEnabled","displayShortcut","PUBLISH_ON_SAVE_ENTITIES","SaveHub","__unstableMarkLastChangeAsPersistent","dirtyCurrentEntity","countUnsavedChanges","calcDirtyCurrentEntity","__experimentalSaveSpecifiedEntityEdits","saveSpecifiedEntityEdits","_n","typeToPublish","AddNewPageModal","isCreatingPage","setIsCreatingPage","newPage","autoFocus","PageItem","SidebarNavigationScreenPages","pages","isLoadingTemplates","dynamicPageTemplates","homeTemplate","pagesAndTemplates","frontPage","postsPage","isHomePageBlog","reorderedPages","homePageIndex","homePage","postsPageIndex","blogPage","showAddPage","setShowAddPage","itemIcon","publishedIcon","draftIcon","pendingIcon","StatusLabel","short","relateToNow","statusLabel","statusIcon","formattedDate","dateI18n","getDate","AVERAGE_READING_RATE","PageDetails","parentTitle","isPostsPage","postContext","_templateTitle","_parentTitle","parent","password","safeDecodeURIComponent","wordCountType","wordsCounted","wordCount","readingTime","toLocaleString","getPageDetails","DeletePageMenuItem","PageActions","SidebarNavigationScreenPage","featuredMediaAltText","featuredMediaSourceUrl","attachedMedia","featured_media","media_details","medium","escapeAttribute","alt_text","featureImageAltText","ExternalLink","filterURLForDisplay","excerpt","stripHTML","SidebarScreens","navigatorLocation","navigatorParams","currentUrlParams","currentPath","isMounting","updateUrlParams","newUrlParams","every","updatedParams","useSyncPathWithURL","DefaultSidebar","IconWithCurrentColor","GenericNavigationButton","NavigationButtonAsItem","useHasDimensionsPanel","useHasTypographyPanel","useHasColorPanel","useSettingsForBlockElement","rawSettings","hasTypographyPanel","hasColorPanel","hasLayoutPanel","typography","customCSS","hasVariations","canEditCSS","CardMedia","CardDivider","paddingX","marginBottom","useBlockVariations","getBlockStyles","VariationsPanel","coreBlockStyles","isBordered","isSeparated","isDefault","paddingY","useHasBorderPanel","useBlockHasGlobalStyles","blockName","hasBorderPanel","hasDimensionsPanel","hasVariationsPanel","BlockMenuItem","navigationButtonLabel","BlockIcon","sortedBlockTypes","blockItems","core","coreItems","noncore","nonCoreItems","useSortedBlockTypes","setFilterValue","debouncedSpeak","isMatchingSearchTerm","filteredBlockTypes","blockTypesListRef","childElementCount","resultsFoundMessage","blockExample","blockExampleWithVariation","viewportWidth","previewHeight","marginX","BlockPreview","minHeight","additionalStyles","applyFallbackStyle","hasColorOrWidth","useHasEffectsPanel","useHasFiltersPanel","BorderPanel","StylesBorderPanel","ColorPanel","StylesColorPanel","TypographyPanel","StylesTypographyPanel","DimensionsPanel","StylesDimensionsPanel","EffectsPanel","StylesEffectsPanel","FiltersPanel","StylesFiltersPanel","AdvancedPanel","StylesAdvancedPanel","prefixParts","shouldDecodeEncode","inheritedStyle","setStyle","setSettings","blockVariations","hasEffectsPanel","hasFiltersPanel","currentBlockStyle","inheritedStyleWithLayout","styleWithLayout","inheritedValue","newStyle","updatedStyle","includeLayoutControls","radius","newBorder","hasSplitBorders","applyAllFallbackStyles","updatedBorder","customDuotone","PanelBody","initialOpen","parentMenu","extraStyles","textDecoration","fontStyle","letterSpacing","headingLevel","TypographyPreview","elements","heading","caption","button","setHeadingLevel","hideLabelFromVision","EMPTY_COLORS","defaultColors","defaultPaletteEnabled","randomizeThemeColors","setThemeColors","useColorRandomizer","__experimentalEnableColorRandomizer","randomRotationValue","random","newColors","colorObject","newColor","colord","colors","screenPath","paletteButtonText","isLayered","offset","ColorIndicator","colorValue","shuffle","mobilePopoverProps","ColorPalettePanel","baseThemeColors","setDefaultColors","baseDefaultColors","setCustomColors","canReset","canOnlyChangeValues","paletteLabel","paletteLabelHeadingLevel","emptyMessage","slugPrefix","GradientPalettePanel","themeGradients","setThemeGradients","baseThemeGradients","defaultGradients","setDefaultGradients","baseDefaultGradients","customGradients","setCustomGradients","defaultDuotone","themeDuotone","defaultDuotoneEnabled","duotonePalette","gradients","paletteLabelLevel","margin","DuotonePicker","disableCustomDuotone","disableCustomColors","clearable","DEFAULT_CONTROLS","contentSize","wideSize","blockGap","childLayout","updatedSettings","definitions","defaultControls","__unstableGetEditorMode","shouldRevertInitialMode","back","useGlobalStylesOutputWithConfig","isObjectEmpty","renderedBlocksArray","SidebarFixedBottomSlot","SidebarFixedBottomFill","SidebarFixedBottom","getRevisionLabel","authorDisplayName","formats","datetimeAbbreviated","userRevisions","selectedRevisionId","authorAvatar","isUnsaved","goBack","getBlocks","setSelectedRevisionId","globalStylesRevision","setGlobalStylesRevision","isLoadingRevisionWithUnsavedChanges","setIsLoadingRevisionWithUnsavedChanges","onCloseRevisions","restoreRevision","isLoadButtonEnabled","GlobalStylesMenuSlot","GlobalStylesMenuFill","createSlotFill","GlobalStylesActionMenu","loadCustomCSS","RevisionsCountBadge","GlobalStylesRevisionsMenu","useGlobalStylesReset","onReset","loadRevisions","__experimentalIsFocusable","GlobalStylesNavigationScreen","Boolean","BlockStylesNavigationScreens","ContextScreens","blockStyleVariations","GlobalStylesStyleBook","GlobalStylesBlockLink","selectedBlockName","selectedBlockClientId","getSelectedBlockClientId","blockHasGlobalStyles","newPath","skipFocus","GlobalStylesEditorCanvasContainerLink","GlobalStylesSidebar","shouldClearCanvasContainerView","_isVisualEditorMode","_isEditCanvasMode","_showListViewByDefault","SIDEBAR_TEMPLATE","SIDEBAR_BLOCK","entityLabels","wp_navigation","wp_block","sidebarName","entityType","_hasPageContentFocus","entityLabel","templateAriaLabel","SidebarCard","PAGE_CONTENT_BLOCK_TYPES","BlockQuickNavigation","PageContent","clientIds","STATUS_OPTIONS","PageStatus","showPassword","setShowPassword","popoverAnchor","setPopoverAnchor","saveStatus","newStatus","newPassword","newDate","handleTogglePassword","handleStatus","setDate","Dropdown","contentClassName","focusOnMount","renderToggle","onToggle","renderContent","RadioControl","selected","ChangeStatus","saveDate","currentDate","is12Hour","PageSummary","EditTemplate","_context","blockContext","BlockContextProvider","PagePanels","pageIcon","Actions","TemplateAreaItem","selectBlock","toggleBlockHighlight","templatePartArea","defaultArea","highlightBlock","cancelHighlightBlock","onMouseOver","TemplateAreas","useRevisionData","currentTemplate","lastRevisionId","PostLastRevisionCheck","PostTypeSupportCheck","supportKeys","PostLastRevision","gutenberg","LastRevision","TemplatePanel","navigationIcon","PanelRow","PluginTemplateSettingPanel","InspectorSlot","InspectorFill","SidebarInspectorFill","SidebarComplementaryAreaFills","isEditorSidebarOpened","hasBlockSelection","supportsGlobalStyles","_sidebar","_isEditorSidebarOpened","getBlockSelectionStart","drawerLeft","drawerRight","ConvertToRegularBlocks","replaceBlocks","canRemoveBlock","ConvertToTemplatePart","TemplatePartConverter","BlockSettingsMenuControls","selectedClientIds","TemplatePartConverterMenuItem","getBlocksByClientId","isNavigationMenu","previousTemplateId","arrowLeft","isZoomOutMode","deviceStyles","useResizeCanvas","mouseMoveTypingRef","useMouseMoveTypingReset","viewModeProps","expand","frameSize","getExternalLink","getExternalLinkAttributes","getOpenverseCaption","foreign_landing_url","foreignLandingUrl","creator","creator_url","creatorUrl","license","license_version","licenseVersion","license_url","licenseUrl","fullLicense","licenseName","getOpenverseLicense","_creator","_caption","coreMediaFetch","getMediaItems","mediaItem","previewUrl","mediaType","media_type","finalQuery","mature","excluded_source","mapFromInserterMediaRequest","queryKey","searchParams","fetch","headers","json","results","sourceId","thumbnail","getReportUrl","isExternalResource","useSiteEditorSettings","settingsBlockPatterns","settingsBlockPatternCategories","restBlockPatternCategories","restStoredSettings","inserterMediaCategories","FOCUSABLE_ENTITIES","DisableNonPageContentBlocks","withDisableNonPageContentBlocks","removeFilter","isContent","EditTemplateNotification","contentRef","getNotices","createInfoNotice","isDialogOpen","setIsDialogOpen","lastNoticeId","handleClick","contains","isNoticeAlreadyShowing","notice","handleDblClick","BackToPageNotification","alreadySeen","prevHasPageContentFocus","useBackToPageNotification","PageContentFocusManager","LAYOUT","alignments","SiteEditorCanvas","isFocusMode","_templateType","hasBlocks","mergedRefs","useClipboardHandler","useTypingObserver","isTemplateTypeNavigation","isNavigationFocusMode","showBlockAppender","forceFullHeight","editorCanvasView","__unstableContentRef","BlockEditorKeyboardShortcuts","DefaultBlockEditorProvider","useEntityBlockEditor","useSubRegistry","NavigationBlockEditorProvider","defaultSettings","useEntityId","templateLock","isEditMode","setBlockEditingMode","unsetBlockEditingMode","navigationBlockClientId","BlockEditor","NavigationBlockEditor","DefaultBlockEditor","getBlockEditorProvider","BlockInspector","ReusableBlocksMenuItems","CodeEditorTextArea","stateValue","setStateValue","setIsDirty","valueRef","htmlFor","autoComplete","dir","CodeEditor","getShortcutRepresentation","keyboardShortcutsStore","contentStructure","setContent","Function","newContent","selection","isListViewOpen","isBlockInspectorOpen","redo","undo","getBlockAttributes","handleTextLevelShortcut","destinationBlockName","currentClientId","destinationTextAlign","useShortcut","InserterSidebar","insertionPoint","isMobile","TagName","inserterDialogRef","inserterDialogProps","useDialog","libraryRef","focusSearch","close","showInserterHelpPanel","shouldFocusBlock","__experimentalInsertionIndex","__experimentalFilterValue","ListViewSidebar","headerFocusReturnRef","contentFocusReturnRef","dropZoneElement","setDropZoneElement","sidebarRef","sidebarCloseButtonRef","listViewRef","ownerDocument","activeElement","listViewApplicationFocus","focus","handleSidebarFocus","WelcomeGuideImage","nonAnimatedSrc","animatedSrc","srcSet","WelcomeGuideEditor","Guide","contentLabel","finishButtonText","onFinish","image","StylesIconImage","WelcomeGuideStyles","isStylesOpen","welcomeLabel","WelcomeGuidePage","isPageActive","isEditorActive","autoPlay","loop","muted","WelcomeGuideTemplate","isTemplateActive","WelcomeGuide","PatternSelection","fallbackContent","onChoosePattern","patterns","templateTypes","useStartPatterns","shownBlockPatterns","useAsyncList","shownPatterns","onClickPattern","StartModal","isCustom","templateContent","setTemplateContent","ignore_empty","then","useFallbackTemplateContent","expanded","START_TEMPLATE_MODAL_STATES","INITIAL","CLOSED","StartTemplateOptions","modalState","setModalState","shouldOpenModal","_postType","hasEditsForEntityRecord","templateRecord","GlobalStylesRenderer","currentStoreSettings","nonGlobalStyles","__experimentalFeatures","useGlobalStylesRenderer","CanvasSpinner","BlockRemovalWarningModal","interfaceLabels","typeLabels","blockRemovalRules","Editor","hasLoadedPost","editedPostId","editedPostType","editorMode","blockEditorMode","isRightSidebarOpen","isInserterOpen","showBlockBreadcrumbs","showVisualEditor","shouldShowBlockBreadcrumbs","shouldShowInserter","shouldShowListView","secondarySidebarLabel","nonPostFields","queryContext","newQueryContext","siteTitle","isInitialLocationRef","formattedTitle","useTitle","EntityProvider","EditorSnackbars","EditorNotices","rules","Notice","BlockBreadcrumb","rootLabelText","CopyButton","useCopyToClipboard","ErrorBoundaryWarning","Warning","ErrorBoundary","super","componentDidCatch","doAction","textFormattingShortcuts","keyCombination","modifier","character","KeyCombination","forceAriaLabel","displayShortcutList","shortcutAriaLabel","Fragment","Shortcut","aliases","alias","DynamicShortcut","getShortcutKeyCombination","getShortcutDescription","getShortcutAliases","KEYBOARD_SHORTCUT_HELP_MODAL_NAME","ShortcutList","ShortcutSection","ShortcutCategorySection","categoryName","additionalShortcuts","categoryShortcuts","getCategoryShortcuts","KeyboardShortcutHelpModal","toggleModal","EnableFeature","remainingProps","PREFERENCES_MODAL_NAME","EditSitePreferencesModal","useRegistry","toggleDistractionFree","batch","ToolsMoreMenuGroup","SiteExport","Accept","contentDispositionMatches","downloadjs","errorResponse","WelcomeGuideMenuItem","CopyContentMenuItem","getText","MODES","isRichEditingEnabled","richEditingEnabled","isCodeEditingEnabled","codeEditingEnabled","choices","choice","MenuItemsChoice","MoreMenu","siteEditorStore","PreferenceToggleMenuItem","messageActivated","messageDeactivated","external","rel","hasUndo","redoIcon","undoIcon","isAppleOS","hasRedo","DocumentActions","PageDocumentActions","TemplateDocumentActions","isFound","hasEditedTemplate","setHasEditedTemplate","BaseDocumentActions","onBack","getEntityLabel","typeIcon","openCommandCenter","commandsStore","chevronLeftSmallIcon","stopPropagation","useShouldContextualToolbarShow","HeaderEditMode","inserterButton","listViewShortcut","isVisualMode","getPreference","setPreviewDeviceType","toggleInserter","toggleListView","shouldShowContextualToolbar","canFocusHiddenToolbar","fixedToolbarCanBeFocused","blockToolbarCanBeFocused","hasDefaultEditorCanvasView","useSlotFills","useHasEditorCanvasContainer","longLabel","shortLabel","isZoomedOutViewExperimentEnabled","__experimentalEnableZoomedOutView","isZoomedOutView","toolbarVariants","isDistractionFreeHovering","toolbarTransition","duration","ease","NavigableToolbar","shouldUseKeyboardFocusShortcut","ToolbarItem","onMouseDown","ToolSelector","UndoButton","RedoButton","listView","chevronUpDown","setDeviceType","siteIconUrl","site_icon_url","wordpress","SiteHub","siteIconButtonProps","exit","calculateNewHeight","initialAspectRatio","intermediateAspectRatio","amount","FRAME_TARGET_ASPECT_RATIO","lerp","isFullWidth","oversizedClassName","innerContentStyle","setFrameSize","startingWidth","setStartingWidth","isResizing","setIsResizing","isHovering","setIsHovering","isOversized","setIsOversized","setResizeRatio","initialAspectRatioRef","initialComputedWidthRef","FRAME_TRANSITION","frameRef","frameAnimationVariants","fullWidth","onAnimationComplete","topRight","bottomRight","bottomLeft","topLeft","onMouseOut","resizing","scaleY","onResizeStart","_event","_direction","_ref","delta","normalizedDelta","deltaAbs","abs","maxDoubledDelta","deltaToDouble","doubleSegment","updatedWidth","EntitiesSavedStatesExtensible","privateApis","EntitiesSavedStatesForPreview","isDirtyProps","useEntitiesSavedStatesIsDirty","activateSaveLabel","additionalPrompt","activateTheme","activationURL","WP_BLOCK_THEME_ACTIVATE_NONCE","themePreview","useActivateTheme","saveEnabled","saveLabel","_EntitiesSavedStates","EntitiesSavedStates","SavePanel","registerShortcut","useGlobalStylesResetCommands","commands","trash","useGlobalStylesOpenCssCommands","usePageContentFocusCommands","useManipulateDocumentCommands","useEditUICommands","activeSidebar","blockDefault","cog","keyboardClose","Header","subTitle","Page","hideTitleFromUI","THEME_PATTERN_TOOLTIP","GridItem","descriptionId","useId","isDeleteDialogOpen","setIsDeleteDialogOpen","__experimentalDeleteReusableBlock","reusableBlocksStore","isEmpty","patternClassNames","previewClassNames","isUserPattern","ariaDescriptions","DELETE","BACKSPACE","ariaDescription","moreHorizontal","describedBy","Grid","NoPatterns","defaultGetName","defaultGetTitle","defaultGetDescription","defaultGetKeywords","keywords","defaultHasCategory","extractWords","normalizeSearchInput","getNormalizedSearchTerms","searchItems","searchInput","normalizedSearchTerms","onlyFilterByCategory","searchRankConfig","threshold","rankedItems","getItemSearchRank","rank","rank1","rank2","searchTerm","getName","getKeywords","hasCategory","normalizedSearchInput","normalizedTitle","terms","unmatchedTerms","unprocessedTerms","term","unprocessedTerm","EMPTY_PATTERN_LIST","templatePartCategories","templatePartHasCategory","syncedPatterns","unsyncedPatterns","unfilteredPatterns","reusableBlockToPattern","reusableBlock","wp_pattern","syncStatus","filteredPatterns","useUserPatterns","_isResolving","rawTemplateParts","partsAsPatterns","templatePartToPattern","useTemplatePartsAsPatterns","PatternsList","delayedFilterValue","usePatterns","PagePatterns","usePatternSettings","Table","column","row","rowIndex","columnIndex","cell","PageTemplateParts","PageTemplates","PageMain","MAX_LOADING_TIME","useCommands","coreCommandsPrivateApis","useCommandContext","commandsPrivateApis","ANIMATION_DURATION","Layout","currentCanvasMode","canvasInUrl","currentCanvasInUrl","useSyncCanvasModeWithURL","useCommandLoader","hook","useCommand","useCommonCommands","hubRef","isListPage","getIsListPage","isEditorPage","previousShortcut","nextShortcut","getAllShortcutKeyCombinations","isEditing","previous","showSidebar","showCanvas","isFullCanvas","canvasResizer","canvasSize","fullResizer","isEditorLoading","loaded","setLoaded","inLoadingPause","hasResolvingSelectors","timeout","clearTimeout","useIsSiteEditorLoading","headerAnimationState","CommandMenu","inert","RouterProvider","App","ShortcutProvider","SlotFillProvider","Popover","UnsavedChangesWarning","PluginArea","PluginSidebarEditSite","PluginSidebarMoreMenuItem","compose","initializeEditor","getElementById","root","createRoot","__experimentalFetchLinkSuggestions","searchOptions","fetchLinkSuggestions","__experimentalFetchRichUrlData","fetchUrlData","__experimentalReapplyBlockTypeFilters","coreBlocks","__experimentalGetCoreBlocks","registerCoreBlocks","setFreeformFallbackBlockName","registerLegacyWidgetBlock","registerWidgetGroupBlock","__experimentalRegisterExperimentalCoreBlocks","enableFSEBlocks","fixedToolbar","distractionFree","welcomeGuide","welcomeGuideStyles","welcomeGuidePage","welcomeGuideTemplate","updateEditorSettings","reinitializeEditor"],"sourceRoot":""}

Copyright © 2019 by b0y-101