File "index.min.js.map"

Full Path: /home/pumpbmko/public_html/wp-content/plugins/gutenberg/build/customize-widgets/index.min.js.map
File size: 135.79 KB
MIME-type: application/json
Charset: utf-8

{"version":3,"file":"./build/customize-widgets/index.min.js","mappings":"mCAQAA,EAAOC,QAAU,SAASC,EAAMC,EAAGC,GACjC,GAAID,IAAMC,EAAG,OAAO,EAEpB,GAAID,GAAKC,GAAiB,iBAALD,GAA6B,iBAALC,EAAe,CAC1D,GAAID,EAAEE,cAAgBD,EAAEC,YAAa,OAAO,EAE5C,IAAIC,EAAQC,EAAGC,EACf,GAAIC,MAAMC,QAAQP,GAAI,CAEpB,IADAG,EAASH,EAAEG,SACGF,EAAEE,OAAQ,OAAO,EAC/B,IAAKC,EAAID,EAAgB,GAARC,KACf,IAAKL,EAAMC,EAAEI,GAAIH,EAAEG,IAAK,OAAO,EACjC,OAAO,CACT,CAGA,GAAKJ,aAAaQ,KAASP,aAAaO,IAAM,CAC5C,GAAIR,EAAES,OAASR,EAAEQ,KAAM,OAAO,EAC9B,IAAKL,KAAKJ,EAAEU,UACV,IAAKT,EAAEU,IAAIP,EAAE,IAAK,OAAO,EAC3B,IAAKA,KAAKJ,EAAEU,UACV,IAAKX,EAAMK,EAAE,GAAIH,EAAEW,IAAIR,EAAE,KAAM,OAAO,EACxC,OAAO,CACT,CAEA,GAAKJ,aAAaa,KAASZ,aAAaY,IAAM,CAC5C,GAAIb,EAAES,OAASR,EAAEQ,KAAM,OAAO,EAC9B,IAAKL,KAAKJ,EAAEU,UACV,IAAKT,EAAEU,IAAIP,EAAE,IAAK,OAAO,EAC3B,OAAO,CACT,CAEA,GAAIU,YAAYC,OAAOf,IAAMc,YAAYC,OAAOd,GAAI,CAElD,IADAE,EAASH,EAAEG,SACGF,EAAEE,OAAQ,OAAO,EAC/B,IAAKC,EAAID,EAAgB,GAARC,KACf,GAAIJ,EAAEI,KAAOH,EAAEG,GAAI,OAAO,EAC5B,OAAO,CACT,CAGA,GAAIJ,EAAEE,cAAg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U/L,KAAM,SAAS,KAC3B,MAAMlB,EAAkB,GACxB6K,GAAGoC,UAAUsH,QAAQzC,MAAQyC,IACvBA,aAAmBhD,GACvBvR,EAAgBiO,KAAMsG,EACvB,KAGDS,EAAAA,EAAAA,YAAY3L,GAAYtV,QACvBb,EAAAA,EAAAA,KAAC+hB,EAAAA,WAAU,CAAAliB,UACVG,EAAAA,EAAAA,KAAC4V,GAAgB,CAChB/I,IAAM8K,GAAGoC,UACTjN,gBAAkBA,EAClBqG,oBAAsBA,MAGxB,GAEH,C","sources":["webpack://wp/./node_modules/fast-deep-equal/es6/index.js","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\",\"blockLibrary\"]","webpack://wp/external window [\"wp\",\"widgets\"]","webpack://wp/external window [\"wp\",\"blocks\"]","webpack://wp/external window [\"wp\",\"data\"]","webpack://wp/external window [\"wp\",\"preferences\"]","webpack://wp/external window [\"wp\",\"components\"]","webpack://wp/external window [\"wp\",\"i18n\"]","webpack://wp/external window [\"wp\",\"blockEditor\"]","webpack://wp/external window [\"wp\",\"compose\"]","webpack://wp/external window [\"wp\",\"hooks\"]","webpack://wp/external window \"ReactJSXRuntime\"","../../packages/customize-widgets/src/components/error-boundary/index.js","webpack://wp/external window [\"wp\",\"coreData\"]","webpack://wp/external window [\"wp\",\"mediaUtils\"]","../../packages/customize-widgets/src/components/block-inspector-button/index.js","webpack://wp/./node_modules/clsx/dist/clsx.mjs","webpack://wp/external window [\"wp\",\"keycodes\"]","webpack://wp/external window [\"wp\",\"primitives\"]","../../packages/icons/src/library/undo.js","../../packages/icons/src/library/redo.js","../../packages/icons/src/library/plus.js","../../packages/icons/src/library/close-small.js","../../packages/customize-widgets/src/store/reducer.js","../../packages/customize-widgets/src/store/selectors.js","../../packages/customize-widgets/src/store/actions.js","../../packages/customize-widgets/src/store/constants.js","../../packages/customize-widgets/src/store/index.js","../../packages/customize-widgets/src/components/inserter/index.js","../../packages/icons/src/library/more-vertical.js","../../packages/icons/src/library/external.js","webpack://wp/external window [\"wp\",\"keyboardShortcuts\"]","../../packages/customize-widgets/src/components/keyboard-shortcut-help-modal/config.js","../../packages/customize-widgets/src/components/keyboard-shortcut-help-modal/shortcut.js","../../packages/customize-widgets/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js","../../packages/customize-widgets/src/components/keyboard-shortcut-help-modal/index.js","../../packages/customize-widgets/src/components/more-menu/index.js","../../packages/customize-widgets/src/components/header/index.js","webpack://wp/external window [\"wp\",\"isShallowEqual\"]","../../packages/customize-widgets/src/utils.js","../../packages/customize-widgets/src/components/focus-control/index.js","webpack://wp/external window [\"wp\",\"privateApis\"]","../../packages/customize-widgets/src/lock-unlock.js","../../packages/customize-widgets/src/components/sidebar-block-editor/sidebar-editor-provider.js","../../packages/customize-widgets/src/components/sidebar-block-editor/use-sidebar-block-editor.js","../../packages/customize-widgets/src/components/focus-control/use-blocks-focus-control.js","../../packages/customize-widgets/src/components/welcome-guide/index.js","../../packages/customize-widgets/src/components/keyboard-shortcuts/index.js","../../packages/customize-widgets/src/components/block-appender/index.js","../../packages/customize-widgets/src/components/sidebar-block-editor/index.js","../../packages/customize-widgets/src/components/inserter/use-inserter.js","../../packages/customize-widgets/src/components/sidebar-controls/index.js","../../packages/customize-widgets/src/components/customize-widgets/index.js","../../packages/customize-widgets/src/components/customize-widgets/use-clear-selected-block.js","../../packages/customize-widgets/src/controls/sidebar-section.js","../../packages/customize-widgets/src/components/sidebar-block-editor/sidebar-adapter.js","webpack://wp/external window [\"wp\",\"dom\"]","../../packages/customize-widgets/src/controls/sidebar-control.js","../../packages/customize-widgets/src/filters/move-to-sidebar.js","../../packages/customize-widgets/src/filters/replace-media-upload.js","../../packages/customize-widgets/src/filters/wide-widget-display.js","../../packages/customize-widgets/src/index.js","../../packages/customize-widgets/src/controls/inserter-outer-section.js","../../packages/customize-widgets/src/controls/inspector-section.js"],"sourcesContent":["'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n  var envHasBigInt64Array = typeof BigInt64Array !== 'undefined';\n\n\nmodule.exports = function equal(a, b) {\n  if (a === b) return true;\n\n  if (a && b && typeof a == 'object' && typeof b == 'object') {\n    if (a.constructor !== b.constructor) return false;\n\n    var length, i, keys;\n    if (Array.isArray(a)) {\n      length = a.length;\n      if (length != b.length) return false;\n      for (i = length; i-- !== 0;)\n        if (!equal(a[i], b[i])) return false;\n      return true;\n    }\n\n\n    if ((a instanceof Map) && (b instanceof Map)) {\n      if (a.size !== b.size) return false;\n      for (i of a.entries())\n        if (!b.has(i[0])) return false;\n      for (i of a.entries())\n        if (!equal(i[1], b.get(i[0]))) return false;\n      return true;\n    }\n\n    if ((a instanceof Set) && (b instanceof Set)) {\n      if (a.size !== b.size) return false;\n      for (i of a.entries())\n        if (!b.has(i[0])) return false;\n      return true;\n    }\n\n    if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n      length = a.length;\n      if (length != b.length) return false;\n      for (i = length; i-- !== 0;)\n        if (a[i] !== b[i]) return false;\n      return true;\n    }\n\n\n    if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n    if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n    if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n    keys = Object.keys(a);\n    length = keys.length;\n    if (length !== Object.keys(b).length) return false;\n\n    for (i = length; i-- !== 0;)\n      if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n    for (i = length; i-- !== 0;) {\n      var key = keys[i];\n\n      if (!equal(a[key], b[key])) return false;\n    }\n\n    return true;\n  }\n\n  // true if both NaN, false otherwise\n  return a!==a && b!==b;\n};\n","// 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](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\"][\"blockLibrary\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"widgets\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"blocks\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"data\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"preferences\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"components\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"i18n\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"blockEditor\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"compose\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"hooks\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"ReactJSXRuntime\"];","/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { Warning } from '@wordpress/block-editor';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { doAction } from '@wordpress/hooks';\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 class ErrorBoundary extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.state = {\n\t\t\terror: null,\n\t\t};\n\t}\n\n\tcomponentDidCatch( error ) {\n\t\tthis.setState( { error } );\n\n\t\tdoAction( 'editor.ErrorBoundary.errorLogged', error );\n\t}\n\n\trender() {\n\t\tconst { error } = this.state;\n\t\tif ( ! error ) {\n\t\t\treturn this.props.children;\n\t\t}\n\n\t\treturn (\n\t\t\t<Warning\n\t\t\t\tclassName=\"customize-widgets-error-boundary\"\n\t\t\t\tactions={ [\n\t\t\t\t\t<CopyButton key=\"copy-error\" text={ error.stack }>\n\t\t\t\t\t\t{ __( 'Copy Error' ) }\n\t\t\t\t\t</CopyButton>,\n\t\t\t\t] }\n\t\t\t>\n\t\t\t\t{ __( 'The editor has encountered an unexpected error.' ) }\n\t\t\t</Warning>\n\t\t);\n\t}\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"coreData\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"mediaUtils\"];","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { MenuItem } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\nfunction BlockInspectorButton( { inspector, closeMenu, ...props } ) {\n\tconst selectedBlockClientId = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSelectedBlockClientId(),\n\t\t[]\n\t);\n\n\tconst selectedBlock = useMemo(\n\t\t() => document.getElementById( `block-${ selectedBlockClientId }` ),\n\t\t[ selectedBlockClientId ]\n\t);\n\n\treturn (\n\t\t<MenuItem\n\t\t\tonClick={ () => {\n\t\t\t\t// Open the inspector.\n\t\t\t\tinspector.open( {\n\t\t\t\t\treturnFocusWhenClose: selectedBlock,\n\t\t\t\t} );\n\t\t\t\t// Then close the dropdown menu.\n\t\t\t\tcloseMenu();\n\t\t\t} }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ __( 'Show more settings' ) }\n\t\t</MenuItem>\n\t);\n}\n\nexport default BlockInspectorButton;\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"keycodes\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"primitives\"];","/**\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 { 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=\"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z\" />\n\t</SVG>\n);\n\nexport default plus;\n","/**\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","/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\n/**\n * Reducer tracking whether the inserter is open.\n *\n * @param {boolean|Object} state\n * @param {Object}         action\n */\nfunction blockInserterPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_INSERTER_OPENED':\n\t\t\treturn action.value;\n\t}\n\treturn state;\n}\n\nexport default combineReducers( {\n\tblockInserterPanel,\n} );\n","const EMPTY_INSERTION_POINT = {\n\trootClientId: undefined,\n\tinsertionIndex: undefined,\n};\n\n/**\n * Returns true if the inserter is opened.\n *\n * @param {Object} state Global application state.\n *\n * @example\n * ```js\n * import { store as customizeWidgetsStore } from '@wordpress/customize-widgets';\n * import { __ } from '@wordpress/i18n';\n * import { useSelect } from '@wordpress/data';\n *\n * const ExampleComponent = () => {\n *    const { isInserterOpened } = useSelect(\n *        ( select ) => select( customizeWidgetsStore ),\n *        []\n *    );\n *\n *    return isInserterOpened()\n *        ? __( 'Inserter is open' )\n *        : __( 'Inserter is closed.' );\n * };\n * ```\n *\n * @return {boolean} Whether the inserter is opened.\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 and index to insert at.\n */\nexport function __experimentalGetInsertionPoint( state ) {\n\tif ( typeof state.blockInserterPanel === 'boolean' ) {\n\t\treturn EMPTY_INSERTION_POINT;\n\t}\n\n\treturn state.blockInserterPanel;\n}\n","/**\n * Returns an action object used to open/close the inserter.\n *\n * @param {boolean|Object} value                Whether the inserter should be\n *                                              opened (true) or closed (false).\n *                                              To specify an insertion point,\n *                                              use an object.\n * @param {string}         value.rootClientId   The root client ID to insert at.\n * @param {number}         value.insertionIndex The index to insert at.\n *\n * @example\n * ```js\n * import { useState } from 'react';\n * import { store as customizeWidgetsStore } from '@wordpress/customize-widgets';\n * import { __ } from '@wordpress/i18n';\n * import { useDispatch } from '@wordpress/data';\n * import { Button } from '@wordpress/components';\n *\n * const ExampleComponent = () => {\n *   const { setIsInserterOpened } = useDispatch( customizeWidgetsStore );\n *   const [ isOpen, setIsOpen ] = useState( false );\n *\n *    return (\n *        <Button\n *            onClick={ () => {\n *                setIsInserterOpened( ! isOpen );\n *                setIsOpen( ! isOpen );\n *            } }\n *        >\n *            { __( 'Open/close inserter' ) }\n *        </Button>\n *    );\n * };\n * ```\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 * Module Constants\n */\nexport const STORE_NAME = 'core/customize-widgets';\n","/**\n * WordPress dependencies\n */\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as selectors from './selectors';\nimport * as actions from './actions';\nimport { STORE_NAME } from './constants';\n\n/**\n * Block editor data store configuration.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registering-a-store\n *\n * @type {Object}\n */\nconst storeConfig = {\n\treducer,\n\tselectors,\n\tactions,\n};\n\n/**\n * Store definition for the edit widgets 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, storeConfig );\nregister( store );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalLibrary as Library } from '@wordpress/block-editor';\nimport { Button } from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { store as customizeWidgetsStore } from '../../store';\n\nfunction Inserter( { setIsOpened } ) {\n\tconst inserterTitleId = useInstanceId(\n\t\tInserter,\n\t\t'customize-widget-layout__inserter-panel-title'\n\t);\n\tconst insertionPoint = useSelect(\n\t\t( select ) =>\n\t\t\tselect( customizeWidgetsStore ).__experimentalGetInsertionPoint(),\n\t\t[]\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"customize-widgets-layout__inserter-panel\"\n\t\t\taria-labelledby={ inserterTitleId }\n\t\t>\n\t\t\t<div className=\"customize-widgets-layout__inserter-panel-header\">\n\t\t\t\t<h2\n\t\t\t\t\tid={ inserterTitleId }\n\t\t\t\t\tclassName=\"customize-widgets-layout__inserter-panel-header-title\"\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Add a block' ) }\n\t\t\t\t</h2>\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"customize-widgets-layout__inserter-panel-header-close-button\"\n\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\tonClick={ () => setIsOpened( false ) }\n\t\t\t\t\taria-label={ __( 'Close inserter' ) }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div className=\"customize-widgets-layout__inserter-panel-content\">\n\t\t\t\t<Library\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\tshowInserterHelpPanel\n\t\t\t\t\tonSelect={ () => setIsOpened( false ) }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport default Inserter;\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 * 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","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"keyboardShortcuts\"];","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nexport const textFormattingShortcuts = [\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'b' },\n\t\tdescription: __( 'Make the selected text bold.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'i' },\n\t\tdescription: __( 'Make the selected text italic.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'k' },\n\t\tdescription: __( 'Convert the selected text into a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'k' },\n\t\tdescription: __( 'Remove a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { character: '[[' },\n\t\tdescription: __( 'Insert a link to a post or page.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'u' },\n\t\tdescription: __( 'Underline the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'd' },\n\t\tdescription: __( 'Strikethrough the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'x' },\n\t\tdescription: __( 'Make the selected text inline code.' ),\n\t},\n\t{\n\t\tkeyCombination: {\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: '0',\n\t\t},\n\t\taliases: [\n\t\t\t{\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: '7',\n\t\t\t},\n\t\t],\n\t\tdescription: __( 'Convert the current heading to a paragraph.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: '1-6' },\n\t\tdescription: __(\n\t\t\t'Convert the current paragraph or heading to a heading of level 1 to 6.'\n\t\t),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'SPACE' },\n\t\tdescription: __( 'Add non breaking space.' ),\n\t},\n];\n","/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';\n\nfunction KeyCombination( { keyCombination, forceAriaLabel } ) {\n\tconst shortcut = keyCombination.modifier\n\t\t? displayShortcutList[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t  )\n\t\t: keyCombination.character;\n\tconst ariaLabel = keyCombination.modifier\n\t\t? shortcutAriaLabel[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t  )\n\t\t: keyCombination.character;\n\n\treturn (\n\t\t<kbd\n\t\t\tclassName=\"customize-widgets-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=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-key\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ character }\n\t\t\t\t\t\t</kbd>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t) }\n\t\t</kbd>\n\t);\n}\n\nfunction Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"customize-widgets-keyboard-shortcut-help-modal__shortcut-term\">\n\t\t\t\t<KeyCombination\n\t\t\t\t\tkeyCombination={ keyCombination }\n\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t/>\n\t\t\t\t{ aliases.map( ( alias, index ) => (\n\t\t\t\t\t<KeyCombination\n\t\t\t\t\t\tkeyCombination={ alias }\n\t\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Shortcut;\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from './shortcut';\n\nfunction DynamicShortcut( { name } ) {\n\tconst { keyCombination, description, aliases } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetShortcutKeyCombination,\n\t\t\t\tgetShortcutDescription,\n\t\t\t\tgetShortcutAliases,\n\t\t\t} = select( keyboardShortcutsStore );\n\n\t\t\treturn {\n\t\t\t\tkeyCombination: getShortcutKeyCombination( name ),\n\t\t\t\taliases: getShortcutAliases( name ),\n\t\t\t\tdescription: getShortcutDescription( name ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! keyCombination ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Shortcut\n\t\t\tkeyCombination={ keyCombination }\n\t\t\tdescription={ description }\n\t\t\taliases={ aliases }\n\t\t/>\n\t);\n}\n\nexport default DynamicShortcut;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { textFormattingShortcuts } from './config';\nimport Shortcut from './shortcut';\nimport DynamicShortcut from './dynamic-shortcut';\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=\"customize-widgets-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=\"customize-widgets-keyboard-shortcut-help-modal__shortcut\"\n\t\t\t\tkey={ index }\n\t\t\t>\n\t\t\t\t{ typeof shortcut === 'string' ? (\n\t\t\t\t\t<DynamicShortcut name={ shortcut } />\n\t\t\t\t) : (\n\t\t\t\t\t<Shortcut { ...shortcut } />\n\t\t\t\t) }\n\t\t\t</li>\n\t\t) ) }\n\t</ul>\n\t/* eslint-enable jsx-a11y/no-redundant-roles */\n);\n\nconst ShortcutSection = ( { title, shortcuts, className } ) => (\n\t<section\n\t\tclassName={ clsx(\n\t\t\t'customize-widgets-keyboard-shortcut-help-modal__section',\n\t\t\tclassName\n\t\t) }\n\t>\n\t\t{ !! title && (\n\t\t\t<h2 className=\"customize-widgets-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\tisModalActive,\n\ttoggleModal,\n} ) {\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tregisterShortcut( {\n\t\tname: 'core/customize-widgets/keyboard-shortcuts',\n\t\tcategory: 'main',\n\t\tdescription: __( 'Display these keyboard shortcuts.' ),\n\t\tkeyCombination: {\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: 'h',\n\t\t},\n\t} );\n\n\tuseShortcut( 'core/customize-widgets/keyboard-shortcuts', toggleModal );\n\n\tif ( ! isModalActive ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"customize-widgets-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=\"customize-widgets-keyboard-shortcut-help-modal__main-shortcuts\"\n\t\t\t\tshortcuts={ [ 'core/customize-widgets/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 {\n\tMenuGroup,\n\tMenuItem,\n\tToolbarDropdownMenu,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\nimport { __, _x } from '@wordpress/i18n';\nimport { external, moreVertical } from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { PreferenceToggleMenuItem } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport KeyboardShortcutHelpModal from '../keyboard-shortcut-help-modal';\n\nexport default function MoreMenu() {\n\tconst [\n\t\tisKeyboardShortcutsModalActive,\n\t\tsetIsKeyboardShortcutsModalVisible,\n\t] = useState( false );\n\tconst toggleKeyboardShortcutsModal = () =>\n\t\tsetIsKeyboardShortcutsModalVisible( ! isKeyboardShortcutsModalActive );\n\n\tuseShortcut(\n\t\t'core/customize-widgets/keyboard-shortcuts',\n\t\ttoggleKeyboardShortcutsModal\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<ToolbarDropdownMenu\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tlabel={ __( 'Options' ) }\n\t\t\t\tpopoverProps={ {\n\t\t\t\t\tplacement: 'bottom-end',\n\t\t\t\t\tclassName: 'more-menu-dropdown__content',\n\t\t\t\t} }\n\t\t\t\ttoggleProps={ {\n\t\t\t\t\ttooltipPosition: 'bottom',\n\t\t\t\t\tsize: 'compact',\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ () => (\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/customize-widgets\"\n\t\t\t\t\t\t\t\tname=\"fixedToolbar\"\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</MenuGroup>\n\t\t\t\t\t\t<MenuGroup label={ __( 'Tools' ) }>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tsetIsKeyboardShortcutsModalVisible( true );\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<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core/customize-widgets\"\n\t\t\t\t\t\t\t\tname=\"welcomeGuide\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Welcome Guide' ) }\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\trole=\"menuitem\"\n\t\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/block-based-widgets-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</MenuGroup>\n\t\t\t\t\t\t<MenuGroup label={ __( 'Preferences' ) }>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core/customize-widgets\"\n\t\t\t\t\t\t\t\tname=\"keepCaretInsideBlock\"\n\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t'Contain text cursor inside block'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t'Aids screen readers by stopping text caret from leaving blocks.'\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'Contain text cursor inside block 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'Contain text cursor inside block 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</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</ToolbarDropdownMenu>\n\t\t\t<KeyboardShortcutHelpModal\n\t\t\t\tisModalActive={ isKeyboardShortcutsModalActive }\n\t\t\t\ttoggleModal={ toggleKeyboardShortcutsModal }\n\t\t\t/>\n\t\t</>\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { ToolbarButton } from '@wordpress/components';\nimport { NavigableToolbar } from '@wordpress/block-editor';\nimport { createPortal, useEffect, useState } from '@wordpress/element';\nimport { displayShortcut, isAppleOS } from '@wordpress/keycodes';\nimport { __, _x, isRTL } from '@wordpress/i18n';\nimport { plus, undo as undoIcon, redo as redoIcon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Inserter from '../inserter';\nimport MoreMenu from '../more-menu';\n\nfunction Header( {\n\tsidebar,\n\tinserter,\n\tisInserterOpened,\n\tsetIsInserterOpened,\n\tisFixedToolbarActive,\n} ) {\n\tconst [ [ hasUndo, hasRedo ], setUndoRedo ] = useState( [\n\t\tsidebar.hasUndo(),\n\t\tsidebar.hasRedo(),\n\t] );\n\n\tconst shortcut = isAppleOS()\n\t\t? displayShortcut.primaryShift( 'z' )\n\t\t: displayShortcut.primary( 'y' );\n\n\tuseEffect( () => {\n\t\treturn sidebar.subscribeHistory( () => {\n\t\t\tsetUndoRedo( [ sidebar.hasUndo(), sidebar.hasRedo() ] );\n\t\t} );\n\t}, [ sidebar ] );\n\n\treturn (\n\t\t<>\n\t\t\t<div\n\t\t\t\tclassName={ clsx( 'customize-widgets-header', {\n\t\t\t\t\t'is-fixed-toolbar-active': isFixedToolbarActive,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<NavigableToolbar\n\t\t\t\t\tclassName=\"customize-widgets-header-toolbar\"\n\t\t\t\t\taria-label={ __( 'Document tools' ) }\n\t\t\t\t>\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\ticon={ ! isRTL() ? undoIcon : redoIcon }\n\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\tlabel={ __( 'Undo' ) }\n\t\t\t\t\t\tshortcut={ displayShortcut.primary( 'z' ) }\n\t\t\t\t\t\tdisabled={ ! hasUndo }\n\t\t\t\t\t\tonClick={ sidebar.undo }\n\t\t\t\t\t\tclassName=\"customize-widgets-editor-history-button undo-button\"\n\t\t\t\t\t/>\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\ticon={ ! isRTL() ? redoIcon : undoIcon }\n\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\tlabel={ __( 'Redo' ) }\n\t\t\t\t\t\tshortcut={ shortcut }\n\t\t\t\t\t\tdisabled={ ! hasRedo }\n\t\t\t\t\t\tonClick={ sidebar.redo }\n\t\t\t\t\t\tclassName=\"customize-widgets-editor-history-button redo-button\"\n\t\t\t\t\t/>\n\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tclassName=\"customize-widgets-header-toolbar__inserter-toggle\"\n\t\t\t\t\t\tisPressed={ isInserterOpened }\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\tlabel={ _x(\n\t\t\t\t\t\t\t'Add block',\n\t\t\t\t\t\t\t'Generic label for block inserter button'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetIsInserterOpened( ( isOpen ) => ! isOpen );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<MoreMenu />\n\t\t\t\t</NavigableToolbar>\n\t\t\t</div>\n\n\t\t\t{ createPortal(\n\t\t\t\t<Inserter setIsOpened={ setIsInserterOpened } />,\n\t\t\t\tinserter.contentContainer[ 0 ]\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default Header;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"isShallowEqual\"];","// @ts-check\n/**\n * WordPress dependencies\n */\nimport { serialize, parse, createBlock } from '@wordpress/blocks';\nimport { addWidgetIdToBlock } from '@wordpress/widgets';\n\n/**\n * Convert settingId to widgetId.\n *\n * @param {string} settingId The setting id.\n * @return {string} The widget id.\n */\nexport function settingIdToWidgetId( settingId ) {\n\tconst matches = settingId.match( /^widget_(.+)(?:\\[(\\d+)\\])$/ );\n\n\tif ( matches ) {\n\t\tconst idBase = matches[ 1 ];\n\t\tconst number = parseInt( matches[ 2 ], 10 );\n\n\t\treturn `${ idBase }-${ number }`;\n\t}\n\n\treturn settingId;\n}\n\n/**\n * Transform a block to a customizable widget.\n *\n * @param {WPBlock} block          The block to be transformed from.\n * @param {Object}  existingWidget The widget to be extended from.\n * @return {Object} The transformed widget.\n */\nexport function blockToWidget( block, existingWidget = null ) {\n\tlet widget;\n\n\tconst isValidLegacyWidgetBlock =\n\t\tblock.name === 'core/legacy-widget' &&\n\t\t( block.attributes.id || block.attributes.instance );\n\n\tif ( isValidLegacyWidgetBlock ) {\n\t\tif ( block.attributes.id ) {\n\t\t\t// Widget that does not extend WP_Widget.\n\t\t\twidget = {\n\t\t\t\tid: block.attributes.id,\n\t\t\t};\n\t\t} else {\n\t\t\tconst { encoded, hash, raw, ...rest } = block.attributes.instance;\n\n\t\t\t// Widget that extends WP_Widget.\n\t\t\twidget = {\n\t\t\t\tidBase: block.attributes.idBase,\n\t\t\t\tinstance: {\n\t\t\t\t\t...existingWidget?.instance,\n\t\t\t\t\t// Required only for the customizer.\n\t\t\t\t\tis_widget_customizer_js_value: true,\n\t\t\t\t\tencoded_serialized_instance: encoded,\n\t\t\t\t\tinstance_hash_key: hash,\n\t\t\t\t\traw_instance: raw,\n\t\t\t\t\t...rest,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t} else {\n\t\tconst instance = {\n\t\t\tcontent: serialize( block ),\n\t\t};\n\t\twidget = {\n\t\t\tidBase: 'block',\n\t\t\twidgetClass: 'WP_Widget_Block',\n\t\t\tinstance: {\n\t\t\t\traw_instance: instance,\n\t\t\t},\n\t\t};\n\t}\n\n\tconst { form, rendered, ...restExistingWidget } = existingWidget || {};\n\n\treturn {\n\t\t...restExistingWidget,\n\t\t...widget,\n\t};\n}\n\n/**\n * Transform a widget to a block.\n *\n * @param {Object} widget          The widget to be transformed from.\n * @param {string} widget.id       The widget id.\n * @param {string} widget.idBase   The id base of the widget.\n * @param {number} widget.number   The number/index of the widget.\n * @param {Object} widget.instance The instance of the widget.\n * @return {WPBlock} The transformed block.\n */\nexport function widgetToBlock( { id, idBase, number, instance } ) {\n\tlet block;\n\n\tconst {\n\t\tencoded_serialized_instance: encoded,\n\t\tinstance_hash_key: hash,\n\t\traw_instance: raw,\n\t\t...rest\n\t} = instance;\n\n\tif ( idBase === 'block' ) {\n\t\tconst parsedBlocks = parse( raw.content ?? '', {\n\t\t\t__unstableSkipAutop: true,\n\t\t} );\n\t\tblock = parsedBlocks.length\n\t\t\t? parsedBlocks[ 0 ]\n\t\t\t: createBlock( 'core/paragraph', {} );\n\t} else if ( number ) {\n\t\t// Widget that extends WP_Widget.\n\t\tblock = createBlock( 'core/legacy-widget', {\n\t\t\tidBase,\n\t\t\tinstance: {\n\t\t\t\tencoded,\n\t\t\t\thash,\n\t\t\t\traw,\n\t\t\t\t...rest,\n\t\t\t},\n\t\t} );\n\t} else {\n\t\t// Widget that does not extend WP_Widget.\n\t\tblock = createBlock( 'core/legacy-widget', {\n\t\t\tid,\n\t\t} );\n\t}\n\n\treturn addWidgetIdToBlock( block, id );\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tcreateContext,\n\tuseState,\n\tuseEffect,\n\tuseContext,\n\tuseCallback,\n\tuseMemo,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { settingIdToWidgetId } from '../../utils';\n\nconst FocusControlContext = createContext();\n\nexport default function FocusControl( { api, sidebarControls, children } ) {\n\tconst [ focusedWidgetIdRef, setFocusedWidgetIdRef ] = useState( {\n\t\tcurrent: null,\n\t} );\n\n\tconst focusWidget = useCallback(\n\t\t( widgetId ) => {\n\t\t\tfor ( const sidebarControl of sidebarControls ) {\n\t\t\t\tconst widgets = sidebarControl.setting.get();\n\n\t\t\t\tif ( widgets.includes( widgetId ) ) {\n\t\t\t\t\tsidebarControl.sectionInstance.expand( {\n\t\t\t\t\t\t// Schedule it after the complete callback so that\n\t\t\t\t\t\t// it won't be overridden by the \"Back\" button focus.\n\t\t\t\t\t\tcompleteCallback() {\n\t\t\t\t\t\t\t// Create a \"ref-like\" object every time to ensure\n\t\t\t\t\t\t\t// the same widget id can also triggers the focus control.\n\t\t\t\t\t\t\tsetFocusedWidgetIdRef( { current: widgetId } );\n\t\t\t\t\t\t},\n\t\t\t\t\t} );\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[ sidebarControls ]\n\t);\n\n\tuseEffect( () => {\n\t\tfunction handleFocus( settingId ) {\n\t\t\tconst widgetId = settingIdToWidgetId( settingId );\n\n\t\t\tfocusWidget( widgetId );\n\t\t}\n\n\t\tlet previewBound = false;\n\n\t\tfunction handleReady() {\n\t\t\tapi.previewer.preview.bind(\n\t\t\t\t'focus-control-for-setting',\n\t\t\t\thandleFocus\n\t\t\t);\n\t\t\tpreviewBound = true;\n\t\t}\n\n\t\tapi.previewer.bind( 'ready', handleReady );\n\n\t\treturn () => {\n\t\t\tapi.previewer.unbind( 'ready', handleReady );\n\t\t\tif ( previewBound ) {\n\t\t\t\tapi.previewer.preview.unbind(\n\t\t\t\t\t'focus-control-for-setting',\n\t\t\t\t\thandleFocus\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t}, [ api, focusWidget ] );\n\n\tconst context = useMemo(\n\t\t() => [ focusedWidgetIdRef, focusWidget ],\n\t\t[ focusedWidgetIdRef, focusWidget ]\n\t);\n\n\treturn (\n\t\t<FocusControlContext.Provider value={ context }>\n\t\t\t{ children }\n\t\t</FocusControlContext.Provider>\n\t);\n}\n\nexport const useFocusControl = () => useContext( FocusControlContext );\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 acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',\n\t\t'@wordpress/customize-widgets'\n\t);\n","/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport useSidebarBlockEditor from './use-sidebar-block-editor';\nimport useBlocksFocusControl from '../focus-control/use-blocks-focus-control';\n\nimport { unlock } from '../../lock-unlock';\n\nconst { ExperimentalBlockEditorProvider } = unlock( blockEditorPrivateApis );\n\nexport default function SidebarEditorProvider( {\n\tsidebar,\n\tsettings,\n\tchildren,\n} ) {\n\tconst [ blocks, onInput, onChange ] = useSidebarBlockEditor( sidebar );\n\n\tuseBlocksFocusControl( blocks );\n\n\treturn (\n\t\t<ExperimentalBlockEditorProvider\n\t\t\tvalue={ blocks }\n\t\t\tonInput={ onInput }\n\t\t\tonChange={ onChange }\n\t\t\tsettings={ settings }\n\t\t\tuseSubRegistry={ false }\n\t\t>\n\t\t\t{ children }\n\t\t</ExperimentalBlockEditorProvider>\n\t);\n}\n","/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect, useCallback } from '@wordpress/element';\nimport isShallowEqual from '@wordpress/is-shallow-equal';\nimport { getWidgetIdFromBlock, addWidgetIdToBlock } from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport { blockToWidget, widgetToBlock } from '../../utils';\n\nfunction widgetsToBlocks( widgets ) {\n\treturn widgets.map( ( widget ) => widgetToBlock( widget ) );\n}\n\nexport default function useSidebarBlockEditor( sidebar ) {\n\tconst [ blocks, setBlocks ] = useState( () =>\n\t\twidgetsToBlocks( sidebar.getWidgets() )\n\t);\n\n\tuseEffect( () => {\n\t\treturn sidebar.subscribe( ( prevWidgets, nextWidgets ) => {\n\t\t\tsetBlocks( ( prevBlocks ) => {\n\t\t\t\tconst prevWidgetsMap = new Map(\n\t\t\t\t\tprevWidgets.map( ( widget ) => [ widget.id, widget ] )\n\t\t\t\t);\n\t\t\t\tconst prevBlocksMap = new Map(\n\t\t\t\t\tprevBlocks.map( ( block ) => [\n\t\t\t\t\t\tgetWidgetIdFromBlock( block ),\n\t\t\t\t\t\tblock,\n\t\t\t\t\t] )\n\t\t\t\t);\n\n\t\t\t\tconst nextBlocks = nextWidgets.map( ( nextWidget ) => {\n\t\t\t\t\tconst prevWidget = prevWidgetsMap.get( nextWidget.id );\n\n\t\t\t\t\t// Bail out updates.\n\t\t\t\t\tif ( prevWidget && prevWidget === nextWidget ) {\n\t\t\t\t\t\treturn prevBlocksMap.get( nextWidget.id );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn widgetToBlock( nextWidget );\n\t\t\t\t} );\n\n\t\t\t\t// Bail out updates.\n\t\t\t\tif ( isShallowEqual( prevBlocks, nextBlocks ) ) {\n\t\t\t\t\treturn prevBlocks;\n\t\t\t\t}\n\n\t\t\t\treturn nextBlocks;\n\t\t\t} );\n\t\t} );\n\t}, [ sidebar ] );\n\n\tconst onChangeBlocks = useCallback(\n\t\t( nextBlocks ) => {\n\t\t\tsetBlocks( ( prevBlocks ) => {\n\t\t\t\tif ( isShallowEqual( prevBlocks, nextBlocks ) ) {\n\t\t\t\t\treturn prevBlocks;\n\t\t\t\t}\n\n\t\t\t\tconst prevBlocksMap = new Map(\n\t\t\t\t\tprevBlocks.map( ( block ) => [\n\t\t\t\t\t\tgetWidgetIdFromBlock( block ),\n\t\t\t\t\t\tblock,\n\t\t\t\t\t] )\n\t\t\t\t);\n\n\t\t\t\tconst nextWidgets = nextBlocks.map( ( nextBlock ) => {\n\t\t\t\t\tconst widgetId = getWidgetIdFromBlock( nextBlock );\n\n\t\t\t\t\t// Update existing widgets.\n\t\t\t\t\tif ( widgetId && prevBlocksMap.has( widgetId ) ) {\n\t\t\t\t\t\tconst prevBlock = prevBlocksMap.get( widgetId );\n\t\t\t\t\t\tconst prevWidget = sidebar.getWidget( widgetId );\n\n\t\t\t\t\t\t// Bail out updates by returning the previous widgets.\n\t\t\t\t\t\t// Deep equality is necessary until the block editor's internals changes.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tfastDeepEqual( nextBlock, prevBlock ) &&\n\t\t\t\t\t\t\tprevWidget\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\treturn prevWidget;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn blockToWidget( nextBlock, prevWidget );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Add a new widget.\n\t\t\t\t\treturn blockToWidget( nextBlock );\n\t\t\t\t} );\n\n\t\t\t\t// Bail out updates if the updated widgets are the same.\n\t\t\t\tif ( isShallowEqual( sidebar.getWidgets(), nextWidgets ) ) {\n\t\t\t\t\treturn prevBlocks;\n\t\t\t\t}\n\n\t\t\t\tconst addedWidgetIds = sidebar.setWidgets( nextWidgets );\n\n\t\t\t\treturn nextBlocks.reduce(\n\t\t\t\t\t( updatedNextBlocks, nextBlock, index ) => {\n\t\t\t\t\t\tconst addedWidgetId = addedWidgetIds[ index ];\n\n\t\t\t\t\t\tif ( addedWidgetId !== null ) {\n\t\t\t\t\t\t\t// Only create a new instance if necessary to prevent\n\t\t\t\t\t\t\t// the whole editor from re-rendering on every edit.\n\t\t\t\t\t\t\tif ( updatedNextBlocks === nextBlocks ) {\n\t\t\t\t\t\t\t\tupdatedNextBlocks = nextBlocks.slice();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tupdatedNextBlocks[ index ] = addWidgetIdToBlock(\n\t\t\t\t\t\t\t\tnextBlock,\n\t\t\t\t\t\t\t\taddedWidgetId\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn updatedNextBlocks;\n\t\t\t\t\t},\n\t\t\t\t\tnextBlocks\n\t\t\t\t);\n\t\t\t} );\n\t\t},\n\t\t[ sidebar ]\n\t);\n\n\treturn [ blocks, onChangeBlocks, onChangeBlocks ];\n}\n","/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { getWidgetIdFromBlock } from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport { useFocusControl } from '.';\n\nexport default function useBlocksFocusControl( blocks ) {\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\tconst [ focusedWidgetIdRef ] = useFocusControl();\n\n\tconst blocksRef = useRef( blocks );\n\n\tuseEffect( () => {\n\t\tblocksRef.current = blocks;\n\t}, [ blocks ] );\n\n\tuseEffect( () => {\n\t\tif ( focusedWidgetIdRef.current ) {\n\t\t\tconst focusedBlock = blocksRef.current.find(\n\t\t\t\t( block ) =>\n\t\t\t\t\tgetWidgetIdFromBlock( block ) === focusedWidgetIdRef.current\n\t\t\t);\n\n\t\t\tif ( focusedBlock ) {\n\t\t\t\tselectBlock( focusedBlock.clientId );\n\t\t\t\t// If the block is already being selected, the DOM node won't\n\t\t\t\t// get focused again automatically.\n\t\t\t\t// We select the DOM and focus it manually here.\n\t\t\t\tconst blockNode = document.querySelector(\n\t\t\t\t\t`[data-block=\"${ focusedBlock.clientId }\"]`\n\t\t\t\t);\n\t\t\t\tblockNode?.focus();\n\t\t\t}\n\t\t}\n\t}, [ focusedWidgetIdRef, selectBlock ] );\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button, ExternalLink } from '@wordpress/components';\nimport { useDispatch } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\nexport default function WelcomeGuide( { sidebar } ) {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst isEntirelyBlockWidgets = sidebar\n\t\t.getWidgets()\n\t\t.every( ( widget ) => widget.id.startsWith( 'block-' ) );\n\n\treturn (\n\t\t<div className=\"customize-widgets-welcome-guide\">\n\t\t\t<div className=\"customize-widgets-welcome-guide__image__wrapper\">\n\t\t\t\t<picture>\n\t\t\t\t\t<source\n\t\t\t\t\t\tsrcSet=\"https://s.w.org/images/block-editor/welcome-editor.svg\"\n\t\t\t\t\t\tmedia=\"(prefers-reduced-motion: reduce)\"\n\t\t\t\t\t/>\n\t\t\t\t\t<img\n\t\t\t\t\t\tclassName=\"customize-widgets-welcome-guide__image\"\n\t\t\t\t\t\tsrc=\"https://s.w.org/images/block-editor/welcome-editor.gif\"\n\t\t\t\t\t\twidth=\"312\"\n\t\t\t\t\t\theight=\"240\"\n\t\t\t\t\t\talt=\"\"\n\t\t\t\t\t/>\n\t\t\t\t</picture>\n\t\t\t</div>\n\t\t\t<h1 className=\"customize-widgets-welcome-guide__heading\">\n\t\t\t\t{ __( 'Welcome to block Widgets' ) }\n\t\t\t</h1>\n\t\t\t<p className=\"customize-widgets-welcome-guide__text\">\n\t\t\t\t{ isEntirelyBlockWidgets\n\t\t\t\t\t? __(\n\t\t\t\t\t\t\t'Your theme provides different “block” areas for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.'\n\t\t\t\t\t  )\n\t\t\t\t\t: __(\n\t\t\t\t\t\t\t'You can now add any block to your site’s widget areas. Don’t worry, all of your favorite widgets still work flawlessly.'\n\t\t\t\t\t  ) }\n\t\t\t</p>\n\t\t\t<Button\n\t\t\t\tclassName=\"customize-widgets-welcome-guide__button\"\n\t\t\t\tvariant=\"primary\"\n\t\t\t\tonClick={ () =>\n\t\t\t\t\ttoggle( 'core/customize-widgets', 'welcomeGuide' )\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{ __( 'Got it' ) }\n\t\t\t</Button>\n\t\t\t<hr className=\"customize-widgets-welcome-guide__separator\" />\n\t\t\t{ ! isEntirelyBlockWidgets && (\n\t\t\t\t<p className=\"customize-widgets-welcome-guide__more-info\">\n\t\t\t\t\t{ __( 'Want to stick with the old widgets?' ) }\n\t\t\t\t\t<br />\n\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t'https://wordpress.org/plugins/classic-widgets/'\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Get the Classic Widgets plugin.' ) }\n\t\t\t\t\t</ExternalLink>\n\t\t\t\t</p>\n\t\t\t) }\n\t\t\t<p className=\"customize-widgets-welcome-guide__more-info\">\n\t\t\t\t{ __( 'New to the block editor?' ) }\n\t\t\t\t<br />\n\t\t\t\t<ExternalLink\n\t\t\t\t\thref={ __(\n\t\t\t\t\t\t'https://wordpress.org/documentation/article/wordpress-block-editor/'\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ __( \"Here's a detailed guide.\" ) }\n\t\t\t\t</ExternalLink>\n\t\t\t</p>\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { isAppleOS } from '@wordpress/keycodes';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\nfunction KeyboardShortcuts( { undo, redo, save } ) {\n\tuseShortcut( 'core/customize-widgets/undo', ( event ) => {\n\t\tundo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/customize-widgets/redo', ( event ) => {\n\t\tredo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/customize-widgets/save', ( event ) => {\n\t\tevent.preventDefault();\n\t\tsave();\n\t} );\n\n\treturn null;\n}\n\nfunction KeyboardShortcutsRegister() {\n\tconst { registerShortcut, unregisterShortcut } = useDispatch(\n\t\tkeyboardShortcutsStore\n\t);\n\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/customize-widgets/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/customize-widgets/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/customize-widgets/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\treturn () => {\n\t\t\tunregisterShortcut( 'core/customize-widgets/undo' );\n\t\t\tunregisterShortcut( 'core/customize-widgets/redo' );\n\t\t\tunregisterShortcut( 'core/customize-widgets/save' );\n\t\t};\n\t}, [ registerShortcut ] );\n\n\treturn null;\n}\n\nKeyboardShortcuts.Register = KeyboardShortcutsRegister;\nexport default KeyboardShortcuts;\n","/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\nimport {\n\tButtonBlockAppender,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\n\nexport default function BlockAppender( props ) {\n\tconst ref = useRef();\n\tconst isBlocksListEmpty = useSelect(\n\t\t( select ) => select( blockEditorStore ).getBlockCount() === 0\n\t);\n\n\t// Move the focus to the block appender to prevent focus from\n\t// being lost when emptying the widget area.\n\tuseEffect( () => {\n\t\tif ( isBlocksListEmpty && ref.current ) {\n\t\t\tconst { ownerDocument } = ref.current;\n\n\t\t\tif (\n\t\t\t\t! ownerDocument.activeElement ||\n\t\t\t\townerDocument.activeElement === ownerDocument.body\n\t\t\t) {\n\t\t\t\tref.current.focus();\n\t\t\t}\n\t\t}\n\t}, [ isBlocksListEmpty ] );\n\n\treturn <ButtonBlockAppender { ...props } ref={ ref } />;\n}\n","/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo, createPortal } from '@wordpress/element';\nimport {\n\tBlockList,\n\tBlockToolbar,\n\tBlockInspector,\n\tprivateApis as blockEditorPrivateApis,\n\t__unstableBlockSettingsMenuFirstItem,\n} from '@wordpress/block-editor';\nimport { uploadMedia } from '@wordpress/media-utils';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';\n\n/**\n * Internal dependencies\n */\nimport BlockInspectorButton from '../block-inspector-button';\nimport Header from '../header';\nimport useInserter from '../inserter/use-inserter';\nimport SidebarEditorProvider from './sidebar-editor-provider';\nimport WelcomeGuide from '../welcome-guide';\nimport KeyboardShortcuts from '../keyboard-shortcuts';\nimport BlockAppender from '../block-appender';\nimport { unlock } from '../../lock-unlock';\n\nconst { ExperimentalBlockCanvas: BlockCanvas } = unlock(\n\tblockEditorPrivateApis\n);\n\nconst { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );\n\nexport default function SidebarBlockEditor( {\n\tblockEditorSettings,\n\tsidebar,\n\tinserter,\n\tinspector,\n} ) {\n\tconst [ isInserterOpened, setIsInserterOpened ] = useInserter( inserter );\n\tconst isMediumViewport = useViewportMatch( 'small' );\n\tconst {\n\t\thasUploadPermissions,\n\t\tisFixedToolbarActive,\n\t\tkeepCaretInsideBlock,\n\t\tisWelcomeGuideActive,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\treturn {\n\t\t\thasUploadPermissions:\n\t\t\t\tselect( coreStore ).canUser( 'create', {\n\t\t\t\t\tkind: 'root',\n\t\t\t\t\tname: 'media',\n\t\t\t\t} ) ?? true,\n\t\t\tisFixedToolbarActive: !! get(\n\t\t\t\t'core/customize-widgets',\n\t\t\t\t'fixedToolbar'\n\t\t\t),\n\t\t\tkeepCaretInsideBlock: !! get(\n\t\t\t\t'core/customize-widgets',\n\t\t\t\t'keepCaretInsideBlock'\n\t\t\t),\n\t\t\tisWelcomeGuideActive: !! get(\n\t\t\t\t'core/customize-widgets',\n\t\t\t\t'welcomeGuide'\n\t\t\t),\n\t\t};\n\t}, [] );\n\tconst settings = useMemo( () => {\n\t\tlet mediaUploadBlockEditor;\n\t\tif ( hasUploadPermissions ) {\n\t\t\tmediaUploadBlockEditor = ( { onError, ...argumentsObject } ) => {\n\t\t\t\tuploadMedia( {\n\t\t\t\t\twpAllowedMimeTypes: blockEditorSettings.allowedMimeTypes,\n\t\t\t\t\tonError: ( { message } ) => onError( message ),\n\t\t\t\t\t...argumentsObject,\n\t\t\t\t} );\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\t...blockEditorSettings,\n\t\t\t__experimentalSetIsInserterOpened: setIsInserterOpened,\n\t\t\tmediaUpload: mediaUploadBlockEditor,\n\t\t\thasFixedToolbar: isFixedToolbarActive || ! isMediumViewport,\n\t\t\tkeepCaretInsideBlock,\n\t\t\t__unstableHasCustomAppender: true,\n\t\t};\n\t}, [\n\t\thasUploadPermissions,\n\t\tblockEditorSettings,\n\t\tisFixedToolbarActive,\n\t\tisMediumViewport,\n\t\tkeepCaretInsideBlock,\n\t\tsetIsInserterOpened,\n\t] );\n\n\tif ( isWelcomeGuideActive ) {\n\t\treturn <WelcomeGuide sidebar={ sidebar } />;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<KeyboardShortcuts.Register />\n\t\t\t<BlockKeyboardShortcuts />\n\n\t\t\t<SidebarEditorProvider sidebar={ sidebar } settings={ settings }>\n\t\t\t\t<KeyboardShortcuts\n\t\t\t\t\tundo={ sidebar.undo }\n\t\t\t\t\tredo={ sidebar.redo }\n\t\t\t\t\tsave={ sidebar.save }\n\t\t\t\t/>\n\n\t\t\t\t<Header\n\t\t\t\t\tsidebar={ sidebar }\n\t\t\t\t\tinserter={ inserter }\n\t\t\t\t\tisInserterOpened={ isInserterOpened }\n\t\t\t\t\tsetIsInserterOpened={ setIsInserterOpened }\n\t\t\t\t\tisFixedToolbarActive={\n\t\t\t\t\t\tisFixedToolbarActive || ! isMediumViewport\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t{ ( isFixedToolbarActive || ! isMediumViewport ) && (\n\t\t\t\t\t<BlockToolbar hideDragHandle />\n\t\t\t\t) }\n\t\t\t\t<BlockCanvas\n\t\t\t\t\tshouldIframe={ false }\n\t\t\t\t\tstyles={ settings.defaultEditorStyles }\n\t\t\t\t\theight=\"100%\"\n\t\t\t\t>\n\t\t\t\t\t<BlockList renderAppender={ BlockAppender } />\n\t\t\t\t</BlockCanvas>\n\n\t\t\t\t{ createPortal(\n\t\t\t\t\t// This is a temporary hack to prevent button component inside <BlockInspector>\n\t\t\t\t\t// from submitting form when type=\"button\" is not specified.\n\t\t\t\t\t<form onSubmit={ ( event ) => event.preventDefault() }>\n\t\t\t\t\t\t<BlockInspector />\n\t\t\t\t\t</form>,\n\t\t\t\t\tinspector.contentContainer[ 0 ]\n\t\t\t\t) }\n\t\t\t</SidebarEditorProvider>\n\n\t\t\t<__unstableBlockSettingsMenuFirstItem>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<BlockInspectorButton\n\t\t\t\t\t\tinspector={ inspector }\n\t\t\t\t\t\tcloseMenu={ onClose }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</__unstableBlockSettingsMenuFirstItem>\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useCallback } from '@wordpress/element';\nimport { useSelect, useDispatch, select as selectStore } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as customizeWidgetsStore } from '../../store';\n\nexport default function useInserter( inserter ) {\n\tconst isInserterOpened = useSelect(\n\t\t( select ) => select( customizeWidgetsStore ).isInserterOpened(),\n\t\t[]\n\t);\n\tconst { setIsInserterOpened } = useDispatch( customizeWidgetsStore );\n\n\tuseEffect( () => {\n\t\tif ( isInserterOpened ) {\n\t\t\tinserter.open();\n\t\t} else {\n\t\t\tinserter.close();\n\t\t}\n\t}, [ inserter, isInserterOpened ] );\n\n\treturn [\n\t\tisInserterOpened,\n\t\tuseCallback(\n\t\t\t( updater ) => {\n\t\t\t\tlet isOpen = updater;\n\t\t\t\tif ( typeof updater === 'function' ) {\n\t\t\t\t\tisOpen = updater(\n\t\t\t\t\t\tselectStore( customizeWidgetsStore ).isInserterOpened()\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tsetIsInserterOpened( isOpen );\n\t\t\t},\n\t\t\t[ setIsInserterOpened ]\n\t\t),\n\t];\n}\n","/**\n * WordPress dependencies\n */\nimport { createContext, useMemo, useContext } from '@wordpress/element';\n\nexport const SidebarControlsContext = createContext();\n\nexport default function SidebarControls( {\n\tsidebarControls,\n\tactiveSidebarControl,\n\tchildren,\n} ) {\n\tconst context = useMemo(\n\t\t() => ( {\n\t\t\tsidebarControls,\n\t\t\tactiveSidebarControl,\n\t\t} ),\n\t\t[ sidebarControls, activeSidebarControl ]\n\t);\n\n\treturn (\n\t\t<SidebarControlsContext.Provider value={ context }>\n\t\t\t{ children }\n\t\t</SidebarControlsContext.Provider>\n\t);\n}\n\nexport function useSidebarControls() {\n\tconst { sidebarControls } = useContext( SidebarControlsContext );\n\n\treturn sidebarControls;\n}\n\nexport function useActiveSidebarControl() {\n\tconst { activeSidebarControl } = useContext( SidebarControlsContext );\n\n\treturn activeSidebarControl;\n}\n","/**\n * WordPress dependencies\n */\nimport { useState, useEffect, useRef, createPortal } from '@wordpress/element';\nimport { SlotFillProvider, Popover } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ErrorBoundary from '../error-boundary';\nimport SidebarBlockEditor from '../sidebar-block-editor';\nimport FocusControl from '../focus-control';\nimport SidebarControls from '../sidebar-controls';\nimport useClearSelectedBlock from './use-clear-selected-block';\n\nexport default function CustomizeWidgets( {\n\tapi,\n\tsidebarControls,\n\tblockEditorSettings,\n} ) {\n\tconst [ activeSidebarControl, setActiveSidebarControl ] = useState( null );\n\tconst parentContainer = document.getElementById(\n\t\t'customize-theme-controls'\n\t);\n\tconst popoverRef = useRef();\n\n\tuseClearSelectedBlock( activeSidebarControl, popoverRef );\n\n\tuseEffect( () => {\n\t\tconst unsubscribers = sidebarControls.map( ( sidebarControl ) =>\n\t\t\tsidebarControl.subscribe( ( expanded ) => {\n\t\t\t\tif ( expanded ) {\n\t\t\t\t\tsetActiveSidebarControl( sidebarControl );\n\t\t\t\t}\n\t\t\t} )\n\t\t);\n\n\t\treturn () => {\n\t\t\tunsubscribers.forEach( ( unsubscriber ) => unsubscriber() );\n\t\t};\n\t}, [ sidebarControls ] );\n\n\tconst activeSidebar =\n\t\tactiveSidebarControl &&\n\t\tcreatePortal(\n\t\t\t<ErrorBoundary>\n\t\t\t\t<SidebarBlockEditor\n\t\t\t\t\tkey={ activeSidebarControl.id }\n\t\t\t\t\tblockEditorSettings={ blockEditorSettings }\n\t\t\t\t\tsidebar={ activeSidebarControl.sidebarAdapter }\n\t\t\t\t\tinserter={ activeSidebarControl.inserter }\n\t\t\t\t\tinspector={ activeSidebarControl.inspector }\n\t\t\t\t/>\n\t\t\t</ErrorBoundary>,\n\t\t\tactiveSidebarControl.container[ 0 ]\n\t\t);\n\n\t// We have to portal this to the parent of both the editor and the inspector,\n\t// so that the popovers will appear above both of them.\n\tconst popover =\n\t\tparentContainer &&\n\t\tcreatePortal(\n\t\t\t<div className=\"customize-widgets-popover\" ref={ popoverRef }>\n\t\t\t\t<Popover.Slot />\n\t\t\t</div>,\n\t\t\tparentContainer\n\t\t);\n\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<SidebarControls\n\t\t\t\tsidebarControls={ sidebarControls }\n\t\t\t\tactiveSidebarControl={ activeSidebarControl }\n\t\t\t>\n\t\t\t\t<FocusControl api={ api } sidebarControls={ sidebarControls }>\n\t\t\t\t\t{ activeSidebar }\n\t\t\t\t\t{ popover }\n\t\t\t\t</FocusControl>\n\t\t\t</SidebarControls>\n\t\t</SlotFillProvider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * We can't just use <BlockSelectionClearer> because the customizer has\n * many root nodes rather than just one in the post editor.\n * We need to listen to the focus events in all those roots, and also in\n * the preview iframe.\n * This hook will clear the selected block when focusing outside the editor,\n * with a few exceptions:\n * 1. Focusing on popovers.\n * 2. Focusing on the inspector.\n * 3. Focusing on any modals/dialogs.\n * These cases are normally triggered by user interactions from the editor,\n * not by explicitly focusing outside the editor, hence no need for clearing.\n *\n * @param {Object} sidebarControl The sidebar control instance.\n * @param {Object} popoverRef     The ref object of the popover node container.\n */\nexport default function useClearSelectedBlock( sidebarControl, popoverRef ) {\n\tconst { hasSelectedBlock, hasMultiSelection } =\n\t\tuseSelect( blockEditorStore );\n\tconst { clearSelectedBlock } = useDispatch( blockEditorStore );\n\n\tuseEffect( () => {\n\t\tif ( popoverRef.current && sidebarControl ) {\n\t\t\tconst inspector = sidebarControl.inspector;\n\t\t\tconst container = sidebarControl.container[ 0 ];\n\t\t\tconst ownerDocument = container.ownerDocument;\n\t\t\tconst ownerWindow = ownerDocument.defaultView;\n\n\t\t\tfunction handleClearSelectedBlock( element ) {\n\t\t\t\tif (\n\t\t\t\t\t// 1. Make sure there are blocks being selected.\n\t\t\t\t\t( hasSelectedBlock() || hasMultiSelection() ) &&\n\t\t\t\t\t// 2. The element should exist in the DOM (not deleted).\n\t\t\t\t\telement &&\n\t\t\t\t\townerDocument.contains( element ) &&\n\t\t\t\t\t// 3. It should also not exist in the container, the popover, nor the dialog.\n\t\t\t\t\t! container.contains( element ) &&\n\t\t\t\t\t! popoverRef.current.contains( element ) &&\n\t\t\t\t\t! element.closest( '[role=\"dialog\"]' ) &&\n\t\t\t\t\t// 4. The inspector should not be opened.\n\t\t\t\t\t! inspector.expanded()\n\t\t\t\t) {\n\t\t\t\t\tclearSelectedBlock();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Handle mouse down in the same document.\n\t\t\tfunction handleMouseDown( event ) {\n\t\t\t\thandleClearSelectedBlock( event.target );\n\t\t\t}\n\t\t\t// Handle focusing outside the current document, like to iframes.\n\t\t\tfunction handleBlur() {\n\t\t\t\thandleClearSelectedBlock( ownerDocument.activeElement );\n\t\t\t}\n\n\t\t\townerDocument.addEventListener( 'mousedown', handleMouseDown );\n\t\t\townerWindow.addEventListener( 'blur', handleBlur );\n\n\t\t\treturn () => {\n\t\t\t\townerDocument.removeEventListener(\n\t\t\t\t\t'mousedown',\n\t\t\t\t\thandleMouseDown\n\t\t\t\t);\n\t\t\t\townerWindow.removeEventListener( 'blur', handleBlur );\n\t\t\t};\n\t\t}\n\t}, [\n\t\tpopoverRef,\n\t\tsidebarControl,\n\t\thasSelectedBlock,\n\t\thasMultiSelection,\n\t\tclearSelectedBlock,\n\t] );\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport getInspectorSection from './inspector-section';\n\nconst getInspectorSectionId = ( sidebarId ) =>\n\t`widgets-inspector-${ sidebarId }`;\n\nexport default function getSidebarSection() {\n\tconst {\n\t\twp: { customize },\n\t} = window;\n\n\tconst reduceMotionMediaQuery = window.matchMedia(\n\t\t'(prefers-reduced-motion: reduce)'\n\t);\n\tlet isReducedMotion = reduceMotionMediaQuery.matches;\n\treduceMotionMediaQuery.addEventListener( 'change', ( event ) => {\n\t\tisReducedMotion = event.matches;\n\t} );\n\n\treturn class SidebarSection extends customize.Section {\n\t\tready() {\n\t\t\tconst InspectorSection = getInspectorSection();\n\t\t\tthis.inspector = new InspectorSection(\n\t\t\t\tgetInspectorSectionId( this.id ),\n\t\t\t\t{\n\t\t\t\t\ttitle: __( 'Block Settings' ),\n\t\t\t\t\tparentSection: this,\n\t\t\t\t\tcustomizeAction: [\n\t\t\t\t\t\t__( 'Customizing' ),\n\t\t\t\t\t\t__( 'Widgets' ),\n\t\t\t\t\t\tthis.params.title,\n\t\t\t\t\t].join( ' ▸ ' ),\n\t\t\t\t}\n\t\t\t);\n\t\t\tcustomize.section.add( this.inspector );\n\t\t\tthis.contentContainer[ 0 ].classList.add(\n\t\t\t\t'customize-widgets__sidebar-section'\n\t\t\t);\n\t\t}\n\t\thasSubSectionOpened() {\n\t\t\treturn this.inspector.expanded();\n\t\t}\n\t\tonChangeExpanded( expanded, _args ) {\n\t\t\tconst controls = this.controls();\n\t\t\tconst args = {\n\t\t\t\t..._args,\n\t\t\t\tcompleteCallback() {\n\t\t\t\t\tcontrols.forEach( ( control ) => {\n\t\t\t\t\t\tcontrol.onChangeSectionExpanded?.( expanded, args );\n\t\t\t\t\t} );\n\t\t\t\t\t_args.completeCallback?.();\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tif ( args.manualTransition ) {\n\t\t\t\tif ( expanded ) {\n\t\t\t\t\tthis.contentContainer.addClass( [ 'busy', 'open' ] );\n\t\t\t\t\tthis.contentContainer.removeClass( 'is-sub-section-open' );\n\t\t\t\t\tthis.contentContainer\n\t\t\t\t\t\t.closest( '.wp-full-overlay' )\n\t\t\t\t\t\t.addClass( 'section-open' );\n\t\t\t\t} else {\n\t\t\t\t\tthis.contentContainer.addClass( [\n\t\t\t\t\t\t'busy',\n\t\t\t\t\t\t'is-sub-section-open',\n\t\t\t\t\t] );\n\t\t\t\t\tthis.contentContainer\n\t\t\t\t\t\t.closest( '.wp-full-overlay' )\n\t\t\t\t\t\t.addClass( 'section-open' );\n\t\t\t\t\tthis.contentContainer.removeClass( 'open' );\n\t\t\t\t}\n\n\t\t\t\tconst handleTransitionEnd = () => {\n\t\t\t\t\tthis.contentContainer.removeClass( 'busy' );\n\t\t\t\t\targs.completeCallback();\n\t\t\t\t};\n\n\t\t\t\tif ( isReducedMotion ) {\n\t\t\t\t\thandleTransitionEnd();\n\t\t\t\t} else {\n\t\t\t\t\tthis.contentContainer.one(\n\t\t\t\t\t\t'transitionend',\n\t\t\t\t\t\thandleTransitionEnd\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsuper.onChangeExpanded( expanded, args );\n\t\t\t}\n\t\t}\n\t};\n}\n","/**\n * Internal dependencies\n */\nimport { settingIdToWidgetId } from '../../utils';\n\nconst { wp } = window;\n\nfunction parseWidgetId( widgetId ) {\n\tconst matches = widgetId.match( /^(.+)-(\\d+)$/ );\n\tif ( matches ) {\n\t\treturn {\n\t\t\tidBase: matches[ 1 ],\n\t\t\tnumber: parseInt( matches[ 2 ], 10 ),\n\t\t};\n\t}\n\n\t// Likely an old single widget.\n\treturn { idBase: widgetId };\n}\n\nfunction widgetIdToSettingId( widgetId ) {\n\tconst { idBase, number } = parseWidgetId( widgetId );\n\tif ( number ) {\n\t\treturn `widget_${ idBase }[${ number }]`;\n\t}\n\n\treturn `widget_${ idBase }`;\n}\n\n/**\n * This is a custom debounce function to call different callbacks depending on\n * whether it's the _leading_ call or not.\n *\n * @param {Function} leading  The callback that gets called first.\n * @param {Function} callback The callback that gets called after the first time.\n * @param {number}   timeout  The debounced time in milliseconds.\n * @return {Function} The debounced function.\n */\nfunction debounce( leading, callback, timeout ) {\n\tlet isLeading = false;\n\tlet timerID;\n\n\tfunction debounced( ...args ) {\n\t\tconst result = ( isLeading ? callback : leading ).apply( this, args );\n\n\t\tisLeading = true;\n\n\t\tclearTimeout( timerID );\n\n\t\ttimerID = setTimeout( () => {\n\t\t\tisLeading = false;\n\t\t}, timeout );\n\n\t\treturn result;\n\t}\n\n\tdebounced.cancel = () => {\n\t\tisLeading = false;\n\t\tclearTimeout( timerID );\n\t};\n\n\treturn debounced;\n}\n\nexport default class SidebarAdapter {\n\tconstructor( setting, api ) {\n\t\tthis.setting = setting;\n\t\tthis.api = api;\n\n\t\tthis.locked = false;\n\t\tthis.widgetsCache = new WeakMap();\n\t\tthis.subscribers = new Set();\n\n\t\tthis.history = [\n\t\t\tthis._getWidgetIds().map( ( widgetId ) =>\n\t\t\t\tthis.getWidget( widgetId )\n\t\t\t),\n\t\t];\n\t\tthis.historyIndex = 0;\n\t\tthis.historySubscribers = new Set();\n\t\t// Debounce the input for 1 second.\n\t\tthis._debounceSetHistory = debounce(\n\t\t\tthis._pushHistory,\n\t\t\tthis._replaceHistory,\n\t\t\t1000\n\t\t);\n\n\t\tthis.setting.bind( this._handleSettingChange.bind( this ) );\n\t\tthis.api.bind( 'change', this._handleAllSettingsChange.bind( this ) );\n\n\t\tthis.undo = this.undo.bind( this );\n\t\tthis.redo = this.redo.bind( this );\n\t\tthis.save = this.save.bind( this );\n\t}\n\n\tsubscribe( callback ) {\n\t\tthis.subscribers.add( callback );\n\n\t\treturn () => {\n\t\t\tthis.subscribers.delete( callback );\n\t\t};\n\t}\n\n\tgetWidgets() {\n\t\treturn this.history[ this.historyIndex ];\n\t}\n\n\t_emit( ...args ) {\n\t\tfor ( const callback of this.subscribers ) {\n\t\t\tcallback( ...args );\n\t\t}\n\t}\n\n\t_getWidgetIds() {\n\t\treturn this.setting.get();\n\t}\n\n\t_pushHistory() {\n\t\tthis.history = [\n\t\t\t...this.history.slice( 0, this.historyIndex + 1 ),\n\t\t\tthis._getWidgetIds().map( ( widgetId ) =>\n\t\t\t\tthis.getWidget( widgetId )\n\t\t\t),\n\t\t];\n\t\tthis.historyIndex += 1;\n\n\t\tthis.historySubscribers.forEach( ( listener ) => listener() );\n\t}\n\n\t_replaceHistory() {\n\t\tthis.history[ this.historyIndex ] = this._getWidgetIds().map(\n\t\t\t( widgetId ) => this.getWidget( widgetId )\n\t\t);\n\t}\n\n\t_handleSettingChange() {\n\t\tif ( this.locked ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst prevWidgets = this.getWidgets();\n\n\t\tthis._pushHistory();\n\n\t\tthis._emit( prevWidgets, this.getWidgets() );\n\t}\n\n\t_handleAllSettingsChange( setting ) {\n\t\tif ( this.locked ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! setting.id.startsWith( 'widget_' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst widgetId = settingIdToWidgetId( setting.id );\n\t\tif ( ! this.setting.get().includes( widgetId ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst prevWidgets = this.getWidgets();\n\n\t\tthis._pushHistory();\n\n\t\tthis._emit( prevWidgets, this.getWidgets() );\n\t}\n\n\t_createWidget( widget ) {\n\t\tconst widgetModel = wp.customize.Widgets.availableWidgets.findWhere( {\n\t\t\tid_base: widget.idBase,\n\t\t} );\n\n\t\tlet number = widget.number;\n\t\tif ( widgetModel.get( 'is_multi' ) && ! number ) {\n\t\t\twidgetModel.set(\n\t\t\t\t'multi_number',\n\t\t\t\twidgetModel.get( 'multi_number' ) + 1\n\t\t\t);\n\t\t\tnumber = widgetModel.get( 'multi_number' );\n\t\t}\n\n\t\tconst settingId = number\n\t\t\t? `widget_${ widget.idBase }[${ number }]`\n\t\t\t: `widget_${ widget.idBase }`;\n\n\t\tconst settingArgs = {\n\t\t\ttransport: wp.customize.Widgets.data.selectiveRefreshableWidgets[\n\t\t\t\twidgetModel.get( 'id_base' )\n\t\t\t]\n\t\t\t\t? 'postMessage'\n\t\t\t\t: 'refresh',\n\t\t\tpreviewer: this.setting.previewer,\n\t\t};\n\t\tconst setting = this.api.create(\n\t\t\tsettingId,\n\t\t\tsettingId,\n\t\t\t'',\n\t\t\tsettingArgs\n\t\t);\n\t\tsetting.set( widget.instance );\n\n\t\tconst widgetId = settingIdToWidgetId( settingId );\n\n\t\treturn widgetId;\n\t}\n\n\t_removeWidget( widget ) {\n\t\tconst settingId = widgetIdToSettingId( widget.id );\n\t\tconst setting = this.api( settingId );\n\n\t\tif ( setting ) {\n\t\t\tconst instance = setting.get();\n\t\t\tthis.widgetsCache.delete( instance );\n\t\t}\n\n\t\tthis.api.remove( settingId );\n\t}\n\n\t_updateWidget( widget ) {\n\t\tconst prevWidget = this.getWidget( widget.id );\n\n\t\t// Bail out update if nothing changed.\n\t\tif ( prevWidget === widget ) {\n\t\t\treturn widget.id;\n\t\t}\n\n\t\t// Update existing setting if only the widget's instance changed.\n\t\tif (\n\t\t\tprevWidget.idBase &&\n\t\t\twidget.idBase &&\n\t\t\tprevWidget.idBase === widget.idBase\n\t\t) {\n\t\t\tconst settingId = widgetIdToSettingId( widget.id );\n\t\t\tthis.api( settingId ).set( widget.instance );\n\t\t\treturn widget.id;\n\t\t}\n\n\t\t// Otherwise delete and re-create.\n\t\tthis._removeWidget( widget );\n\t\treturn this._createWidget( widget );\n\t}\n\n\tgetWidget( widgetId ) {\n\t\tif ( ! widgetId ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst { idBase, number } = parseWidgetId( widgetId );\n\t\tconst settingId = widgetIdToSettingId( widgetId );\n\t\tconst setting = this.api( settingId );\n\n\t\tif ( ! setting ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst instance = setting.get();\n\n\t\tif ( this.widgetsCache.has( instance ) ) {\n\t\t\treturn this.widgetsCache.get( instance );\n\t\t}\n\n\t\tconst widget = {\n\t\t\tid: widgetId,\n\t\t\tidBase,\n\t\t\tnumber,\n\t\t\tinstance,\n\t\t};\n\n\t\tthis.widgetsCache.set( instance, widget );\n\n\t\treturn widget;\n\t}\n\n\t_updateWidgets( nextWidgets ) {\n\t\tthis.locked = true;\n\n\t\tconst addedWidgetIds = [];\n\n\t\tconst nextWidgetIds = nextWidgets.map( ( nextWidget ) => {\n\t\t\tif ( nextWidget.id && this.getWidget( nextWidget.id ) ) {\n\t\t\t\taddedWidgetIds.push( null );\n\n\t\t\t\treturn this._updateWidget( nextWidget );\n\t\t\t}\n\n\t\t\tconst widgetId = this._createWidget( nextWidget );\n\n\t\t\taddedWidgetIds.push( widgetId );\n\n\t\t\treturn widgetId;\n\t\t} );\n\n\t\tconst deletedWidgets = this.getWidgets().filter(\n\t\t\t( widget ) => ! nextWidgetIds.includes( widget.id )\n\t\t);\n\t\tdeletedWidgets.forEach( ( widget ) => this._removeWidget( widget ) );\n\n\t\tthis.setting.set( nextWidgetIds );\n\n\t\tthis.locked = false;\n\n\t\treturn addedWidgetIds;\n\t}\n\n\tsetWidgets( nextWidgets ) {\n\t\tconst addedWidgetIds = this._updateWidgets( nextWidgets );\n\n\t\tthis._debounceSetHistory();\n\n\t\treturn addedWidgetIds;\n\t}\n\n\t/**\n\t * Undo/Redo related features\n\t */\n\thasUndo() {\n\t\treturn this.historyIndex > 0;\n\t}\n\n\thasRedo() {\n\t\treturn this.historyIndex < this.history.length - 1;\n\t}\n\n\t_seek( historyIndex ) {\n\t\tconst currentWidgets = this.getWidgets();\n\n\t\tthis.historyIndex = historyIndex;\n\n\t\tconst widgets = this.history[ this.historyIndex ];\n\n\t\tthis._updateWidgets( widgets );\n\n\t\tthis._emit( currentWidgets, this.getWidgets() );\n\n\t\tthis.historySubscribers.forEach( ( listener ) => listener() );\n\t\tthis._debounceSetHistory.cancel();\n\t}\n\n\tundo() {\n\t\tif ( ! this.hasUndo() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._seek( this.historyIndex - 1 );\n\t}\n\n\tredo() {\n\t\tif ( ! this.hasRedo() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._seek( this.historyIndex + 1 );\n\t}\n\n\tsubscribeHistory( listener ) {\n\t\tthis.historySubscribers.add( listener );\n\n\t\treturn () => {\n\t\t\tthis.historySubscribers.delete( listener );\n\t\t};\n\t}\n\n\tsave() {\n\t\tthis.api.previewer.save();\n\t}\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"dom\"];","/**\n * WordPress dependencies\n */\nimport { dispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport SidebarAdapter from '../components/sidebar-block-editor/sidebar-adapter';\nimport getInserterOuterSection from './inserter-outer-section';\nimport { store as customizeWidgetsStore } from '../store';\n\nconst getInserterId = ( controlId ) => `widgets-inserter-${ controlId }`;\n\nexport default function getSidebarControl() {\n\tconst {\n\t\twp: { customize },\n\t} = window;\n\n\treturn class SidebarControl extends customize.Control {\n\t\tconstructor( ...args ) {\n\t\t\tsuper( ...args );\n\n\t\t\tthis.subscribers = new Set();\n\t\t}\n\n\t\tready() {\n\t\t\tconst InserterOuterSection = getInserterOuterSection();\n\t\t\tthis.inserter = new InserterOuterSection(\n\t\t\t\tgetInserterId( this.id ),\n\t\t\t\t{}\n\t\t\t);\n\t\t\tcustomize.section.add( this.inserter );\n\n\t\t\tthis.sectionInstance = customize.section( this.section() );\n\n\t\t\tthis.inspector = this.sectionInstance.inspector;\n\n\t\t\tthis.sidebarAdapter = new SidebarAdapter( this.setting, customize );\n\t\t}\n\n\t\tsubscribe( callback ) {\n\t\t\tthis.subscribers.add( callback );\n\n\t\t\treturn () => {\n\t\t\t\tthis.subscribers.delete( callback );\n\t\t\t};\n\t\t}\n\n\t\tonChangeSectionExpanded( expanded, args ) {\n\t\t\tif ( ! args.unchanged ) {\n\t\t\t\t// Close the inserter when the section collapses.\n\t\t\t\tif ( ! expanded ) {\n\t\t\t\t\tdispatch( customizeWidgetsStore ).setIsInserterOpened(\n\t\t\t\t\t\tfalse\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tthis.subscribers.forEach( ( subscriber ) =>\n\t\t\t\t\tsubscriber( expanded, args )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tBlockControls,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { addFilter } from '@wordpress/hooks';\nimport { MoveToWidgetArea, getWidgetIdFromBlock } from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseSidebarControls,\n\tuseActiveSidebarControl,\n} from '../components/sidebar-controls';\nimport { useFocusControl } from '../components/focus-control';\nimport { blockToWidget } from '../utils';\n\nconst withMoveToSidebarToolbarItem = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tlet widgetId = getWidgetIdFromBlock( props );\n\t\tconst sidebarControls = useSidebarControls();\n\t\tconst activeSidebarControl = useActiveSidebarControl();\n\t\tconst hasMultipleSidebars = sidebarControls?.length > 1;\n\t\tconst blockName = props.name;\n\t\tconst clientId = props.clientId;\n\t\tconst canInsertBlockInSidebar = useSelect(\n\t\t\t( select ) => {\n\t\t\t\t// Use an empty string to represent the root block list, which\n\t\t\t\t// in the customizer editor represents a sidebar/widget area.\n\t\t\t\treturn select( blockEditorStore ).canInsertBlockType(\n\t\t\t\t\tblockName,\n\t\t\t\t\t''\n\t\t\t\t);\n\t\t\t},\n\t\t\t[ blockName ]\n\t\t);\n\t\tconst block = useSelect(\n\t\t\t( select ) => select( blockEditorStore ).getBlock( clientId ),\n\t\t\t[ clientId ]\n\t\t);\n\t\tconst { removeBlock } = useDispatch( blockEditorStore );\n\t\tconst [ , focusWidget ] = useFocusControl();\n\n\t\tfunction moveToSidebar( sidebarControlId ) {\n\t\t\tconst newSidebarControl = sidebarControls.find(\n\t\t\t\t( sidebarControl ) => sidebarControl.id === sidebarControlId\n\t\t\t);\n\n\t\t\tif ( widgetId ) {\n\t\t\t\t/**\n\t\t\t\t * If there's a widgetId, move it to the other sidebar.\n\t\t\t\t */\n\t\t\t\tconst oldSetting = activeSidebarControl.setting;\n\t\t\t\tconst newSetting = newSidebarControl.setting;\n\n\t\t\t\toldSetting( oldSetting().filter( ( id ) => id !== widgetId ) );\n\t\t\t\tnewSetting( [ ...newSetting(), widgetId ] );\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * If there isn't a widgetId, it's most likely a inner block.\n\t\t\t\t * First, remove the block in the original sidebar,\n\t\t\t\t * then, create a new widget in the new sidebar and get back its widgetId.\n\t\t\t\t */\n\t\t\t\tconst sidebarAdapter = newSidebarControl.sidebarAdapter;\n\n\t\t\t\tremoveBlock( clientId );\n\t\t\t\tconst addedWidgetIds = sidebarAdapter.setWidgets( [\n\t\t\t\t\t...sidebarAdapter.getWidgets(),\n\t\t\t\t\tblockToWidget( block ),\n\t\t\t\t] );\n\t\t\t\t// The last non-null id is the added widget's id.\n\t\t\t\twidgetId = addedWidgetIds.reverse().find( ( id ) => !! id );\n\t\t\t}\n\n\t\t\t// Move focus to the moved widget and expand the sidebar.\n\t\t\tfocusWidget( widgetId );\n\t\t}\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockEdit key=\"edit\" { ...props } />\n\t\t\t\t{ hasMultipleSidebars && canInsertBlockInSidebar && (\n\t\t\t\t\t<BlockControls>\n\t\t\t\t\t\t<MoveToWidgetArea\n\t\t\t\t\t\t\twidgetAreas={ sidebarControls.map(\n\t\t\t\t\t\t\t\t( sidebarControl ) => ( {\n\t\t\t\t\t\t\t\t\tid: sidebarControl.id,\n\t\t\t\t\t\t\t\t\tname: sidebarControl.params.label,\n\t\t\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\t\tsidebarControl.params.description,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tcurrentWidgetAreaId={ activeSidebarControl?.id }\n\t\t\t\t\t\t\tonSelect={ moveToSidebar }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</BlockControls>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t},\n\t'withMoveToSidebarToolbarItem'\n);\n\naddFilter(\n\t'editor.BlockEdit',\n\t'core/customize-widgets/block-edit',\n\twithMoveToSidebarToolbarItem\n);\n","/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { MediaUpload } from '@wordpress/media-utils';\n\nconst replaceMediaUpload = () => MediaUpload;\n\naddFilter(\n\t'editor.MediaUpload',\n\t'core/edit-widgets/replace-media-upload',\n\treplaceMediaUpload\n);\n","/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\n\nconst { wp } = window;\n\nconst withWideWidgetDisplay = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst { idBase } = props.attributes;\n\t\tconst isWide =\n\t\t\twp.customize.Widgets.data.availableWidgets.find(\n\t\t\t\t( widget ) => widget.id_base === idBase\n\t\t\t)?.is_wide ?? false;\n\n\t\treturn <BlockEdit key=\"edit\" { ...props } isWide={ isWide } />;\n\t},\n\t'withWideWidgetDisplay'\n);\n\naddFilter(\n\t'editor.BlockEdit',\n\t'core/customize-widgets/wide-widget-display',\n\twithWideWidgetDisplay\n);\n","/**\n * WordPress dependencies\n */\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterLegacyWidgetVariations,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\nimport {\n\tsetFreeformContentHandlerName,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { dispatch } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport CustomizeWidgets from './components/customize-widgets';\nimport getSidebarSection from './controls/sidebar-section';\nimport getSidebarControl from './controls/sidebar-control';\nimport './filters';\n\nconst { wp } = window;\n\nconst DISABLED_BLOCKS = [\n\t'core/more',\n\t'core/block',\n\t'core/freeform',\n\t'core/template-part',\n];\nconst ENABLE_EXPERIMENTAL_FSE_BLOCKS = false;\n\n/**\n * Initializes the widgets block editor in the customizer.\n *\n * @param {string} editorName          The editor name.\n * @param {Object} blockEditorSettings Block editor settings.\n */\nexport function initialize( editorName, blockEditorSettings ) {\n\tdispatch( preferencesStore ).setDefaults( 'core/customize-widgets', {\n\t\tfixedToolbar: false,\n\t\twelcomeGuide: true,\n\t} );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter( ( block ) => {\n\t\treturn ! (\n\t\t\tDISABLED_BLOCKS.includes( block.name ) ||\n\t\t\tblock.name.startsWith( 'core/post' ) ||\n\t\t\tblock.name.startsWith( 'core/query' ) ||\n\t\t\tblock.name.startsWith( 'core/site' ) ||\n\t\t\tblock.name.startsWith( 'core/navigation' )\n\t\t);\n\t} );\n\tregisterCoreBlocks( coreBlocks );\n\tregisterLegacyWidgetBlock();\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: ENABLE_EXPERIMENTAL_FSE_BLOCKS,\n\t\t} );\n\t}\n\tregisterLegacyWidgetVariations( blockEditorSettings );\n\tregisterWidgetGroupBlock();\n\n\t// As we are unregistering `core/freeform` to avoid the Classic block, we must\n\t// replace it with something as the default freeform content handler. Failure to\n\t// do this will result in errors in the default block parser.\n\t// see: https://github.com/WordPress/gutenberg/issues/33097\n\tsetFreeformContentHandlerName( 'core/html' );\n\n\tconst SidebarControl = getSidebarControl( blockEditorSettings );\n\n\twp.customize.sectionConstructor.sidebar = getSidebarSection();\n\twp.customize.controlConstructor.sidebar_block_editor = SidebarControl;\n\n\tconst container = document.createElement( 'div' );\n\tdocument.body.appendChild( container );\n\n\twp.customize.bind( 'ready', () => {\n\t\tconst sidebarControls = [];\n\t\twp.customize.control.each( ( control ) => {\n\t\t\tif ( control instanceof SidebarControl ) {\n\t\t\t\tsidebarControls.push( control );\n\t\t\t}\n\t\t} );\n\n\t\tcreateRoot( container ).render(\n\t\t\t<StrictMode>\n\t\t\t\t<CustomizeWidgets\n\t\t\t\t\tapi={ wp.customize }\n\t\t\t\t\tsidebarControls={ sidebarControls }\n\t\t\t\t\tblockEditorSettings={ blockEditorSettings }\n\t\t\t\t/>\n\t\t\t</StrictMode>\n\t\t);\n\t} );\n}\nexport { store } from './store';\n","/**\n * WordPress dependencies\n */\nimport { ESCAPE } from '@wordpress/keycodes';\nimport { focus } from '@wordpress/dom';\nimport { dispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as customizeWidgetsStore } from '../store';\n\nexport default function getInserterOuterSection() {\n\tconst {\n\t\twp: { customize },\n\t} = window;\n\n\tconst OuterSection = customize.OuterSection;\n\t// Override the OuterSection class to handle multiple outer sections.\n\t// It closes all the other outer sections whenever one is opened.\n\t// The result is that at most one outer section can be opened at the same time.\n\tcustomize.OuterSection = class extends OuterSection {\n\t\tonChangeExpanded( expanded, args ) {\n\t\t\tif ( expanded ) {\n\t\t\t\tcustomize.section.each( ( section ) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\tsection.params.type === 'outer' &&\n\t\t\t\t\t\tsection.id !== this.id\n\t\t\t\t\t) {\n\t\t\t\t\t\tif ( section.expanded() ) {\n\t\t\t\t\t\t\tsection.collapse();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn super.onChangeExpanded( expanded, args );\n\t\t}\n\t};\n\t// Handle constructor so that \"params.type\" can be correctly pointed to \"outer\".\n\tcustomize.sectionConstructor.outer = customize.OuterSection;\n\n\treturn class InserterOuterSection extends customize.OuterSection {\n\t\tconstructor( ...args ) {\n\t\t\tsuper( ...args );\n\n\t\t\t// This is necessary since we're creating a new class which is not identical to the original OuterSection.\n\t\t\t// @See https://github.com/WordPress/wordpress-develop/blob/42b05c397c50d9dc244083eff52991413909d4bd/src/js/_enqueues/wp/customize/controls.js#L1427-L1436\n\t\t\tthis.params.type = 'outer';\n\n\t\t\tthis.activeElementBeforeExpanded = null;\n\n\t\t\tconst ownerWindow =\n\t\t\t\tthis.contentContainer[ 0 ].ownerDocument.defaultView;\n\n\t\t\t// Handle closing the inserter when pressing the Escape key.\n\t\t\townerWindow.addEventListener(\n\t\t\t\t'keydown',\n\t\t\t\t( event ) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\tthis.expanded() &&\n\t\t\t\t\t\t( event.keyCode === ESCAPE ||\n\t\t\t\t\t\t\tevent.code === 'Escape' ) &&\n\t\t\t\t\t\t! event.defaultPrevented\n\t\t\t\t\t) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\tdispatch( customizeWidgetsStore ).setIsInserterOpened(\n\t\t\t\t\t\t\tfalse\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t// Use capture mode to make this run before other event listeners.\n\t\t\t\ttrue\n\t\t\t);\n\n\t\t\tthis.contentContainer.addClass( 'widgets-inserter' );\n\n\t\t\t// Set a flag if the state is being changed from open() or close().\n\t\t\t// Don't propagate the event if it's an internal action to prevent infinite loop.\n\t\t\tthis.isFromInternalAction = false;\n\t\t\tthis.expanded.bind( () => {\n\t\t\t\tif ( ! this.isFromInternalAction ) {\n\t\t\t\t\t// Propagate the event to React to sync the state.\n\t\t\t\t\tdispatch( customizeWidgetsStore ).setIsInserterOpened(\n\t\t\t\t\t\tthis.expanded()\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tthis.isFromInternalAction = false;\n\t\t\t} );\n\t\t}\n\t\topen() {\n\t\t\tif ( ! this.expanded() ) {\n\t\t\t\tconst contentContainer = this.contentContainer[ 0 ];\n\t\t\t\tthis.activeElementBeforeExpanded =\n\t\t\t\t\tcontentContainer.ownerDocument.activeElement;\n\n\t\t\t\tthis.isFromInternalAction = true;\n\n\t\t\t\tthis.expand( {\n\t\t\t\t\tcompleteCallback() {\n\t\t\t\t\t\t// We have to do this in a \"completeCallback\" or else the elements will not yet be visible/tabbable.\n\t\t\t\t\t\t// The first one should be the close button,\n\t\t\t\t\t\t// we want to skip it and choose the second one instead, which is the search box.\n\t\t\t\t\t\tconst searchBox =\n\t\t\t\t\t\t\tfocus.tabbable.find( contentContainer )[ 1 ];\n\t\t\t\t\t\tif ( searchBox ) {\n\t\t\t\t\t\t\tsearchBox.focus();\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\tclose() {\n\t\t\tif ( this.expanded() ) {\n\t\t\t\tconst contentContainer = this.contentContainer[ 0 ];\n\t\t\t\tconst activeElement =\n\t\t\t\t\tcontentContainer.ownerDocument.activeElement;\n\n\t\t\t\tthis.isFromInternalAction = true;\n\n\t\t\t\tthis.collapse( {\n\t\t\t\t\tcompleteCallback() {\n\t\t\t\t\t\t// Return back the focus when closing the inserter.\n\t\t\t\t\t\t// Only do this if the active element which triggers the action is inside the inserter,\n\t\t\t\t\t\t// (the close button for instance). In that case the focus will be lost.\n\t\t\t\t\t\t// Otherwise, we don't hijack the focus when the user is focusing on other elements\n\t\t\t\t\t\t// (like the quick inserter).\n\t\t\t\t\t\tif ( contentContainer.contains( activeElement ) ) {\n\t\t\t\t\t\t\t// Return back the focus when closing the inserter.\n\t\t\t\t\t\t\tif ( this.activeElementBeforeExpanded ) {\n\t\t\t\t\t\t\t\tthis.activeElementBeforeExpanded.focus();\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","export default function getInspectorSection() {\n\tconst {\n\t\twp: { customize },\n\t} = window;\n\n\treturn class InspectorSection extends customize.Section {\n\t\tconstructor( id, options ) {\n\t\t\tsuper( id, options );\n\n\t\t\tthis.parentSection = options.parentSection;\n\n\t\t\tthis.returnFocusWhenClose = null;\n\t\t\tthis._isOpen = false;\n\t\t}\n\t\tget isOpen() {\n\t\t\treturn this._isOpen;\n\t\t}\n\t\tset isOpen( value ) {\n\t\t\tthis._isOpen = value;\n\t\t\tthis.triggerActiveCallbacks();\n\t\t}\n\t\tready() {\n\t\t\tthis.contentContainer[ 0 ].classList.add(\n\t\t\t\t'customize-widgets-layout__inspector'\n\t\t\t);\n\t\t}\n\t\tisContextuallyActive() {\n\t\t\treturn this.isOpen;\n\t\t}\n\t\tonChangeExpanded( expanded, args ) {\n\t\t\tsuper.onChangeExpanded( expanded, args );\n\n\t\t\tif ( this.parentSection && ! args.unchanged ) {\n\t\t\t\tif ( expanded ) {\n\t\t\t\t\tthis.parentSection.collapse( {\n\t\t\t\t\t\tmanualTransition: true,\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tthis.parentSection.expand( {\n\t\t\t\t\t\tmanualTransition: true,\n\t\t\t\t\t\tcompleteCallback: () => {\n\t\t\t\t\t\t\t// Return focus after finishing the transition.\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tthis.returnFocusWhenClose &&\n\t\t\t\t\t\t\t\t! this.contentContainer[ 0 ].contains(\n\t\t\t\t\t\t\t\t\tthis.returnFocusWhenClose\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\tthis.returnFocusWhenClose.focus();\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\topen( { returnFocusWhenClose } = {} ) {\n\t\t\tthis.isOpen = true;\n\t\t\tthis.returnFocusWhenClose = returnFocusWhenClose;\n\n\t\t\tthis.expand( {\n\t\t\t\tallowMultiple: true,\n\t\t\t} );\n\t\t}\n\t\tclose() {\n\t\t\tthis.collapse( {\n\t\t\t\tallowMultiple: true,\n\t\t\t} );\n\t\t}\n\t\tcollapse( options ) {\n\t\t\t// Overridden collapse() function. Mostly call the parent collapse(), but also\n\t\t\t// move our .isOpen to false.\n\t\t\t// Initially, I tried tracking this with onChangeExpanded(), but it doesn't work\n\t\t\t// because the block settings sidebar is a layer \"on top of\" the G editor sidebar.\n\t\t\t//\n\t\t\t// For example, when closing the block settings sidebar, the G\n\t\t\t// editor sidebar would display, and onChangeExpanded in\n\t\t\t// inspector-section would run with expanded=true, but I want\n\t\t\t// isOpen to be false when the block settings is closed.\n\t\t\tthis.isOpen = false;\n\t\t\tsuper.collapse( options );\n\t\t}\n\t\ttriggerActiveCallbacks() {\n\t\t\t// Manually fire the callbacks associated with moving this.active\n\t\t\t// from false to true.  \"active\" is always true for this section,\n\t\t\t// and \"isContextuallyActive\" reflects if the block settings\n\t\t\t// sidebar is currently visible, that is, it has replaced the main\n\t\t\t// Gutenberg view.\n\t\t\t// The WP customizer only checks \".isContextuallyActive()\" when\n\t\t\t// \".active\" changes values. But our \".active\" never changes value.\n\t\t\t// The WP customizer never foresaw a section being used a way we\n\t\t\t// fit the block settings sidebar into a section. By manually\n\t\t\t// triggering the \"this.active\" callbacks, we force the WP\n\t\t\t// customizer to query our .isContextuallyActive() function and\n\t\t\t// update its view of our status.\n\t\t\tthis.active.callbacks.fireWith( this.active, [ false, true ] );\n\t\t}\n\t};\n}\n"],"names":["module","exports","equal","a","b","constructor","length","i","keys","Array","isArray","Map","size","entries","has","get","Set","ArrayBuffer","isView","RegExp","source","flags","valueOf","Object","prototype","toString","hasOwnProperty","call","key","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","definition","o","defineProperty","enumerable","obj","prop","r","Symbol","toStringTag","value","window","CopyButton","text","children","ref","useCopyToClipboard","_jsx","Button","variant","ErrorBoundary","Component","super","arguments","this","state","error","componentDidCatch","setState","doAction","render","Warning","className","actions","stack","__","props","inspector","closeMenu","selectedBlockClientId","useSelect","select","blockEditorStore","getSelectedBlockClientId","selectedBlock","useMemo","document","getElementById","MenuItem","onClick","open","returnFocusWhenClose","e","t","f","SVG","xmlns","viewBox","Path","combineReducers","blockInserterPanel","action","type","EMPTY_INSERTION_POINT","rootClientId","insertionIndex","isInserterOpened","__experimentalGetInsertionPoint","setIsInserterOpened","storeConfig","reducer","selectors","store","createReduxStore","register","Inserter","setIsOpened","inserterTitleId","useInstanceId","insertionPoint","customizeWidgetsStore","_jsxs","id","icon","closeSmall","Library","__experimentalInsertionIndex","showInserterHelpPanel","onSelect","textFormattingShortcuts","keyCombination","modifier","character","description","aliases","KeyCombination","forceAriaLabel","shortcut","displayShortcutList","ariaLabel","shortcutAriaLabel","map","index","Fragment","_Fragment","alias","name","getShortcutKeyCombination","getShortcutDescription","getShortcutAliases","keyboardShortcutsStore","Shortcut","ShortcutList","shortcuts","role","DynamicShortcut","ShortcutSection","title","clsx","ShortcutCategorySection","categoryName","additionalShortcuts","categoryShortcuts","getCategoryShortcuts","concat","KeyboardShortcutHelpModal","isModalActive","toggleModal","registerShortcut","useDispatch","category","useShortcut","Modal","onRequestClose","MoreMenu","isKeyboardShortcutsModalActive","setIsKeyboardShortcutsModalVisible","useState","toggleKeyboardShortcutsModal","ToolbarDropdownMenu","moreVertical","label","popoverProps","placement","toggleProps","tooltipPosition","MenuGroup","_x","PreferenceToggleMenuItem","scope","info","messageActivated","messageDeactivated","displayShortcut","access","external","href","target","rel","VisuallyHidden","as","sidebar","inserter","isFixedToolbarActive","hasUndo","hasRedo","setUndoRedo","isAppleOS","primaryShift","primary","useEffect","subscribeHistory","NavigableToolbar","ToolbarButton","isRTL","redoIcon","undoIcon","disabled","undo","redo","isPressed","plus","isOpen","createPortal","contentContainer","settingIdToWidgetId","settingId","matches","match","parseInt","blockToWidget","block","existingWidget","widget","attributes","instance","encoded","hash","raw","rest","idBase","is_widget_customizer_js_value","encoded_serialized_instance","instance_hash_key","raw_instance","widgetClass","content","serialize","form","rendered","restExistingWidget","widgetToBlock","number","_raw$content","parsedBlocks","parse","__unstableSkipAutop","createBlock","addWidgetIdToBlock","FocusControlContext","createContext","FocusControl","api","sidebarControls","focusedWidgetIdRef","setFocusedWidgetIdRef","current","focusWidget","useCallback","widgetId","sidebarControl","setting","includes","sectionInstance","expand","completeCallback","handleFocus","previewBound","handleReady","previewer","preview","bind","unbind","context","Provider","useFocusControl","useContext","lock","unlock","__dangerousOptInToUnstableAPIsOnlyForCoreModules","ExperimentalBlockEditorProvider","blockEditorPrivateApis","SidebarEditorProvider","settings","blocks","onInput","onChange","setBlocks","getWidgets","subscribe","prevWidgets","nextWidgets","prevBlocks","prevWidgetsMap","prevBlocksMap","getWidgetIdFromBlock","nextBlocks","nextWidget","prevWidget","isShallowEqual","onChangeBlocks","nextBlock","prevBlock","getWidget","fastDeepEqual","addedWidgetIds","setWidgets","reduce","updatedNextBlocks","addedWidgetId","slice","useSidebarBlockEditor","selectBlock","blocksRef","useRef","focusedBlock","find","clientId","blockNode","querySelector","focus","useBlocksFocusControl","useSubRegistry","WelcomeGuide","toggle","preferencesStore","isEntirelyBlockWidgets","every","startsWith","srcSet","media","src","width","height","alt","ExternalLink","KeyboardShortcuts","save","event","preventDefault","Register","unregisterShortcut","BlockAppender","isBlocksListEmpty","getBlockCount","ownerDocument","activeElement","body","ButtonBlockAppender","ExperimentalBlockCanvas","BlockCanvas","BlockKeyboardShortcuts","blockLibraryPrivateApis","SidebarBlockEditor","blockEditorSettings","close","updater","selectStore","useInserter","isMediumViewport","useViewportMatch","hasUploadPermissions","keepCaretInsideBlock","isWelcomeGuideActive","_select$canUser","coreStore","canUser","kind","mediaUploadBlockEditor","onError","argumentsObject","uploadMedia","wpAllowedMimeTypes","allowedMimeTypes","message","__experimentalSetIsInserterOpened","mediaUpload","hasFixedToolbar","__unstableHasCustomAppender","Header","BlockToolbar","hideDragHandle","shouldIframe","styles","defaultEditorStyles","BlockList","renderAppender","onSubmit","BlockInspector","__unstableBlockSettingsMenuFirstItem","onClose","BlockInspectorButton","SidebarControlsContext","SidebarControls","activeSidebarControl","CustomizeWidgets","setActiveSidebarControl","parentContainer","popoverRef","hasSelectedBlock","hasMultiSelection","clearSelectedBlock","container","ownerWindow","defaultView","handleClearSelectedBlock","element","contains","closest","expanded","handleMouseDown","handleBlur","addEventListener","removeEventListener","useClearSelectedBlock","unsubscribers","forEach","unsubscriber","activeSidebar","sidebarAdapter","popover","Popover","Slot","SlotFillProvider","getInspectorSectionId","sidebarId","wp","parseWidgetId","widgetIdToSettingId","SidebarAdapter","locked","widgetsCache","WeakMap","subscribers","history","_getWidgetIds","historyIndex","historySubscribers","_debounceSetHistory","leading","callback","timeout","timerID","isLeading","debounced","args","result","apply","clearTimeout","setTimeout","cancel","debounce","_pushHistory","_replaceHistory","_handleSettingChange","_handleAllSettingsChange","add","delete","_emit","listener","_createWidget","widgetModel","customize","Widgets","availableWidgets","findWhere","id_base","set","settingArgs","transport","data","selectiveRefreshableWidgets","create","_removeWidget","remove","_updateWidget","_updateWidgets","nextWidgetIds","push","filter","_seek","currentWidgets","widgets","getInserterId","controlId","withMoveToSidebarToolbarItem","createHigherOrderComponent","BlockEdit","useSidebarControls","useActiveSidebarControl","hasMultipleSidebars","blockName","canInsertBlockInSidebar","canInsertBlockType","getBlock","removeBlock","BlockControls","MoveToWidgetArea","widgetAreas","params","currentWidgetAreaId","sidebarControlId","newSidebarControl","oldSetting","newSetting","reverse","addFilter","replaceMediaUpload","MediaUpload","withWideWidgetDisplay","_wp$customize$Widgets","isWide","is_wide","DISABLED_BLOCKS","ENABLE_EXPERIMENTAL_FSE_BLOCKS","initialize","editorName","dispatch","setDefaults","fixedToolbar","welcomeGuide","blocksStore","reapplyBlockTypeFilters","coreBlocks","__experimentalGetCoreBlocks","registerCoreBlocks","registerLegacyWidgetBlock","__experimentalRegisterExperimentalCoreBlocks","enableFSEBlocks","registerLegacyWidgetVariations","registerWidgetGroupBlock","setFreeformContentHandlerName","SidebarControl","Control","ready","InserterOuterSection","OuterSection","onChangeExpanded","section","each","collapse","sectionConstructor","outer","activeElementBeforeExpanded","keyCode","ESCAPE","code","defaultPrevented","stopPropagation","addClass","isFromInternalAction","searchBox","tabbable","getInserterOuterSection","onChangeSectionExpanded","unchanged","subscriber","getSidebarControl","reduceMotionMediaQuery","matchMedia","isReducedMotion","Section","InspectorSection","options","parentSection","_isOpen","triggerActiveCallbacks","classList","isContextuallyActive","manualTransition","allowMultiple","active","callbacks","fireWith","getInspectorSection","customizeAction","join","hasSubSectionOpened","_args","controls","control","removeClass","handleTransitionEnd","one","getSidebarSection","controlConstructor","sidebar_block_editor","createElement","appendChild","createRoot","StrictMode"],"sourceRoot":""}