Version Description
Download this release
Release Info
Developer | gutenbergplugin |
Plugin | Gutenberg |
Version | 14.3.0 |
Comparing to | |
See all releases |
Code changes from version 14.2.0 to 14.3.0
- build/a11y/index.min.js.map +1 -1
- build/annotations/index.min.js.map +1 -1
- build/api-fetch/index.min.js.map +1 -1
- build/autop/index.min.js.map +1 -1
- build/blob/index.min.js.map +1 -1
- build/block-directory/index.js +7 -11
- build/block-directory/index.min.asset.php +1 -1
- build/block-directory/index.min.js +11 -11
- build/block-directory/index.min.js.map +1 -1
- build/block-editor/index.js +1358 -507
- build/block-editor/index.min.asset.php +1 -1
- build/block-editor/index.min.js +9 -10
build/a11y/index.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"file":"./build/a11y/index.min.js","mappings":"mBACA,IAAIA,EAAsB,CCA1B,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,GCLR,EAAwB,CAACI,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3E,EAAwB,CAACM,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClF,EAAyBT,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,M,6CCLvD,MAAM,EAA+BC,OAAW,GAAY,S,aCA5D,MAAM,EAA+BA,OAAW,GAAQ,KCOzC,SAASC,IAAoC,IAAtBC,EAAsB,uDAAX,SAChD,MAAMC,EAAYC,SAASC,cAAe,OAC1CF,EAAUG,GAAM,cAAcJ,IAC9BC,EAAUI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://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\",\"domReady\"]","webpack://wp/external window [\"wp\",\"i18n\"]","webpack://wp/./packages/a11y/build-module/@wordpress/a11y/src/add-container.js","webpack://wp/./packages/a11y/build-module/@wordpress/a11y/src/filter-message.js","webpack://wp/./packages/a11y/build-module/@wordpress/a11y/src/index.js","webpack://wp/./packages/a11y/build-module/@wordpress/a11y/src/add-intro-text.js","webpack://wp/./packages/a11y/build-module/@wordpress/a11y/src/clear.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\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\"][\"domReady\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"i18n\"];","/**\n * Build the live regions markup.\n *\n * @param {string} [ariaLive] Value for the 'aria-live' attribute; default: 'polite'.\n *\n * @return {HTMLDivElement} The ARIA live region HTML element.\n */\nexport default function addContainer( ariaLive = 'polite' ) {\n\tconst container = document.createElement( 'div' );\n\tcontainer.id = `a11y-speak-${ ariaLive }`;\n\tcontainer.className = 'a11y-speak-region';\n\n\tcontainer.setAttribute(\n\t\t'style',\n\t\t'position: absolute;' +\n\t\t\t'margin: -1px;' +\n\t\t\t'padding: 0;' +\n\t\t\t'height: 1px;' +\n\t\t\t'width: 1px;' +\n\t\t\t'overflow: hidden;' +\n\t\t\t'clip: rect(1px, 1px, 1px, 1px);' +\n\t\t\t'-webkit-clip-path: inset(50%);' +\n\t\t\t'clip-path: inset(50%);' +\n\t\t\t'border: 0;' +\n\t\t\t'word-wrap: normal !important;'\n\t);\n\tcontainer.setAttribute( 'aria-live', ariaLive );\n\tcontainer.setAttribute( 'aria-relevant', 'additions text' );\n\tcontainer.setAttribute( 'aria-atomic', 'true' );\n\n\tconst { body } = document;\n\tif ( body ) {\n\t\tbody.appendChild( container );\n\t}\n\n\treturn container;\n}\n","let previousMessage = '';\n\n/**\n * Filter the message to be announced to the screenreader.\n *\n * @param {string} message The message to be announced.\n *\n * @return {string} The filtered message.\n */\nexport default function filterMessage( message ) {\n\t/*\n\t * Strip HTML tags (if any) from the message string. Ideally, messages should\n\t * be simple strings, carefully crafted for specific use with A11ySpeak.\n\t * When re-using already existing strings this will ensure simple HTML to be\n\t * stripped out and replaced with a space. Browsers will collapse multiple\n\t * spaces natively.\n\t */\n\tmessage = message.replace( /<[^<>]+>/g, ' ' );\n\n\t/*\n\t * Safari + VoiceOver don't announce repeated, identical strings. We use\n\t * a `no-break space` to force them to think identical strings are different.\n\t */\n\tif ( previousMessage === message ) {\n\t\tmessage += '\\u00A0';\n\t}\n\n\tpreviousMessage = message;\n\n\treturn message;\n}\n","/**\n * WordPress dependencies\n */\nimport domReady from '@wordpress/dom-ready';\n\n/**\n * Internal dependencies\n */\nimport addIntroText from './add-intro-text';\nimport addContainer from './add-container';\nimport clear from './clear';\nimport filterMessage from './filter-message';\n\n/**\n * Create the live regions.\n */\nexport function setup() {\n\tconst introText = document.getElementById( 'a11y-speak-intro-text' );\n\tconst containerAssertive = document.getElementById(\n\t\t'a11y-speak-assertive'\n\t);\n\tconst containerPolite = document.getElementById( 'a11y-speak-polite' );\n\n\tif ( introText === null ) {\n\t\taddIntroText();\n\t}\n\n\tif ( containerAssertive === null ) {\n\t\taddContainer( 'assertive' );\n\t}\n\n\tif ( containerPolite === null ) {\n\t\taddContainer( 'polite' );\n\t}\n}\n\n/**\n * Run setup on domReady.\n */\ndomReady( setup );\n\n/**\n * Allows you to easily announce dynamic interface updates to screen readers using ARIA live regions.\n * This module is inspired by the `speak` function in `wp-a11y.js`.\n *\n * @param {string} message The message to be announced by assistive technologies.\n * @param {string} [ariaLive] The politeness level for aria-live; default: 'polite'.\n *\n * @example\n * ```js\n * import { speak } from '@wordpress/a11y';\n *\n * // For polite messages that shouldn't interrupt what screen readers are currently announcing.\n * speak( 'The message you want to send to the ARIA live region' );\n *\n * // For assertive messages that should interrupt what screen readers are currently announcing.\n * speak( 'The message you want to send to the ARIA live region', 'assertive' );\n * ```\n */\nexport function speak( message, ariaLive ) {\n\t/*\n\t * Clear previous messages to allow repeated strings being read out and hide\n\t * the explanatory text from assistive technologies.\n\t */\n\tclear();\n\n\tmessage = filterMessage( message );\n\n\tconst introText = document.getElementById( 'a11y-speak-intro-text' );\n\tconst containerAssertive = document.getElementById(\n\t\t'a11y-speak-assertive'\n\t);\n\tconst containerPolite = document.getElementById( 'a11y-speak-polite' );\n\n\tif ( containerAssertive && ariaLive === 'assertive' ) {\n\t\tcontainerAssertive.textContent = message;\n\t} else if ( containerPolite ) {\n\t\tcontainerPolite.textContent = message;\n\t}\n\n\t/*\n\t * Make the explanatory text available to assistive technologies by removing\n\t * the 'hidden' HTML attribute.\n\t */\n\tif ( introText ) {\n\t\tintroText.removeAttribute( 'hidden' );\n\t}\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Build the explanatory text to be placed before the aria live regions.\n *\n * This text is initially hidden from assistive technologies by using a `hidden`\n * HTML attribute which is then removed once a message fills the aria-live regions.\n *\n * @return {HTMLParagraphElement} The explanatory text HTML element.\n */\nexport default function addIntroText() {\n\tconst introText = document.createElement( 'p' );\n\n\tintroText.id = 'a11y-speak-intro-text';\n\tintroText.className = 'a11y-speak-intro-text';\n\tintroText.textContent = __( 'Notifications' );\n\n\tintroText.setAttribute(\n\t\t'style',\n\t\t'position: absolute;' +\n\t\t\t'margin: -1px;' +\n\t\t\t'padding: 0;' +\n\t\t\t'height: 1px;' +\n\t\t\t'width: 1px;' +\n\t\t\t'overflow: hidden;' +\n\t\t\t'clip: rect(1px, 1px, 1px, 1px);' +\n\t\t\t'-webkit-clip-path: inset(50%);' +\n\t\t\t'clip-path: inset(50%);' +\n\t\t\t'border: 0;' +\n\t\t\t'word-wrap: normal !important;'\n\t);\n\tintroText.setAttribute( 'hidden', 'hidden' );\n\n\tconst { body } = document;\n\tif ( body ) {\n\t\tbody.appendChild( introText );\n\t}\n\n\treturn introText;\n}\n","/**\n * Clears the a11y-speak-region elements and hides the explanatory text.\n */\nexport default function clear() {\n\tconst regions = document.getElementsByClassName( 'a11y-speak-region' );\n\tconst introText = document.getElementById( 'a11y-speak-intro-text' );\n\n\tfor ( let i = 0; i < regions.length; i++ ) {\n\t\tregions[ i ].textContent = '';\n\t}\n\n\t// Make sure the explanatory text is hidden from assistive technologies.\n\tif ( introText ) {\n\t\tintroText.setAttribute( 'hidden', 'hidden' );\n\t}\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","window","addContainer","ariaLive","container","document","createElement","id","className","setAttribute","body","appendChild","previousMessage","setup","introText","getElementById","containerAssertive","containerPolite","textContent","__","addIntroText","speak","message","regions","getElementsByClassName","i","length","clear","replace","filterMessage","removeAttribute","domReady"],"sourceRoot":""}
|
1 |
+
{"version":3,"file":"./build/a11y/index.min.js","mappings":"mBACA,IAAIA,EAAsB,CCA1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T,QACA,iNAYDK,EAAUL,aAAc,SAAU,UAElC,MAAM,KAAEC,GAASL,SACZK,GACJA,EAAKC,YAAaG,EAInB,CDlBCM,GAG2B,OAAvBJ,GACJd,EAAc,aAGU,OAApBe,GACJf,EAAc,SAEf,CAyBM,SAASmB,EAAOC,EAASnB,IExDjB,WACd,MAAMoB,EAAUlB,SAASmB,uBAAwB,qBAC3CV,EAAYT,SAASU,eAAgB,yBAE3C,IAAM,IAAIU,EAAI,EAAGA,EAAIF,EAAQG,OAAQD,IACpCF,EAASE,GAAIP,YAAc,GAIvBJ,GACJA,EAAUL,aAAc,SAAU,SAEnC,CFiDAkB,GAEAL,EDzDc,SAAwBA,GAoBtC,OAZAA,EAAUA,EAAQM,QAAS,YAAa,KAMnChB,IAAoBU,IACxBA,GAAW,KAGZV,EAAkBU,EAEXA,CACP,CCoCUO,CAAeP,GAEzB,MAAMR,EAAYT,SAASU,eAAgB,yBACrCC,EAAqBX,SAASU,eACnC,wBAEKE,EAAkBZ,SAASU,eAAgB,qBAE5CC,GAAmC,cAAbb,EAC1Ba,EAAmBE,YAAcI,EACtBL,IACXA,EAAgBC,YAAcI,GAO1BR,GACJA,EAAUgB,gBAAiB,SAE5B,CAhDDC,IAAUlB,I","sources":["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\",\"domReady\"]","webpack://wp/external window [\"wp\",\"i18n\"]","webpack://wp/./packages/a11y/build-module/@wordpress/a11y/src/add-container.js","webpack://wp/./packages/a11y/build-module/@wordpress/a11y/src/filter-message.js","webpack://wp/./packages/a11y/build-module/@wordpress/a11y/src/index.js","webpack://wp/./packages/a11y/build-module/@wordpress/a11y/src/add-intro-text.js","webpack://wp/./packages/a11y/build-module/@wordpress/a11y/src/clear.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\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\"][\"domReady\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"i18n\"];","/**\n * Build the live regions markup.\n *\n * @param {string} [ariaLive] Value for the 'aria-live' attribute; default: 'polite'.\n *\n * @return {HTMLDivElement} The ARIA live region HTML element.\n */\nexport default function addContainer( ariaLive = 'polite' ) {\n\tconst container = document.createElement( 'div' );\n\tcontainer.id = `a11y-speak-${ ariaLive }`;\n\tcontainer.className = 'a11y-speak-region';\n\n\tcontainer.setAttribute(\n\t\t'style',\n\t\t'position: absolute;' +\n\t\t\t'margin: -1px;' +\n\t\t\t'padding: 0;' +\n\t\t\t'height: 1px;' +\n\t\t\t'width: 1px;' +\n\t\t\t'overflow: hidden;' +\n\t\t\t'clip: rect(1px, 1px, 1px, 1px);' +\n\t\t\t'-webkit-clip-path: inset(50%);' +\n\t\t\t'clip-path: inset(50%);' +\n\t\t\t'border: 0;' +\n\t\t\t'word-wrap: normal !important;'\n\t);\n\tcontainer.setAttribute( 'aria-live', ariaLive );\n\tcontainer.setAttribute( 'aria-relevant', 'additions text' );\n\tcontainer.setAttribute( 'aria-atomic', 'true' );\n\n\tconst { body } = document;\n\tif ( body ) {\n\t\tbody.appendChild( container );\n\t}\n\n\treturn container;\n}\n","let previousMessage = '';\n\n/**\n * Filter the message to be announced to the screenreader.\n *\n * @param {string} message The message to be announced.\n *\n * @return {string} The filtered message.\n */\nexport default function filterMessage( message ) {\n\t/*\n\t * Strip HTML tags (if any) from the message string. Ideally, messages should\n\t * be simple strings, carefully crafted for specific use with A11ySpeak.\n\t * When re-using already existing strings this will ensure simple HTML to be\n\t * stripped out and replaced with a space. Browsers will collapse multiple\n\t * spaces natively.\n\t */\n\tmessage = message.replace( /<[^<>]+>/g, ' ' );\n\n\t/*\n\t * Safari + VoiceOver don't announce repeated, identical strings. We use\n\t * a `no-break space` to force them to think identical strings are different.\n\t */\n\tif ( previousMessage === message ) {\n\t\tmessage += '\\u00A0';\n\t}\n\n\tpreviousMessage = message;\n\n\treturn message;\n}\n","/**\n * WordPress dependencies\n */\nimport domReady from '@wordpress/dom-ready';\n\n/**\n * Internal dependencies\n */\nimport addIntroText from './add-intro-text';\nimport addContainer from './add-container';\nimport clear from './clear';\nimport filterMessage from './filter-message';\n\n/**\n * Create the live regions.\n */\nexport function setup() {\n\tconst introText = document.getElementById( 'a11y-speak-intro-text' );\n\tconst containerAssertive = document.getElementById(\n\t\t'a11y-speak-assertive'\n\t);\n\tconst containerPolite = document.getElementById( 'a11y-speak-polite' );\n\n\tif ( introText === null ) {\n\t\taddIntroText();\n\t}\n\n\tif ( containerAssertive === null ) {\n\t\taddContainer( 'assertive' );\n\t}\n\n\tif ( containerPolite === null ) {\n\t\taddContainer( 'polite' );\n\t}\n}\n\n/**\n * Run setup on domReady.\n */\ndomReady( setup );\n\n/**\n * Allows you to easily announce dynamic interface updates to screen readers using ARIA live regions.\n * This module is inspired by the `speak` function in `wp-a11y.js`.\n *\n * @param {string} message The message to be announced by assistive technologies.\n * @param {string} [ariaLive] The politeness level for aria-live; default: 'polite'.\n *\n * @example\n * ```js\n * import { speak } from '@wordpress/a11y';\n *\n * // For polite messages that shouldn't interrupt what screen readers are currently announcing.\n * speak( 'The message you want to send to the ARIA live region' );\n *\n * // For assertive messages that should interrupt what screen readers are currently announcing.\n * speak( 'The message you want to send to the ARIA live region', 'assertive' );\n * ```\n */\nexport function speak( message, ariaLive ) {\n\t/*\n\t * Clear previous messages to allow repeated strings being read out and hide\n\t * the explanatory text from assistive technologies.\n\t */\n\tclear();\n\n\tmessage = filterMessage( message );\n\n\tconst introText = document.getElementById( 'a11y-speak-intro-text' );\n\tconst containerAssertive = document.getElementById(\n\t\t'a11y-speak-assertive'\n\t);\n\tconst containerPolite = document.getElementById( 'a11y-speak-polite' );\n\n\tif ( containerAssertive && ariaLive === 'assertive' ) {\n\t\tcontainerAssertive.textContent = message;\n\t} else if ( containerPolite ) {\n\t\tcontainerPolite.textContent = message;\n\t}\n\n\t/*\n\t * Make the explanatory text available to assistive technologies by removing\n\t * the 'hidden' HTML attribute.\n\t */\n\tif ( introText ) {\n\t\tintroText.removeAttribute( 'hidden' );\n\t}\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Build the explanatory text to be placed before the aria live regions.\n *\n * This text is initially hidden from assistive technologies by using a `hidden`\n * HTML attribute which is then removed once a message fills the aria-live regions.\n *\n * @return {HTMLParagraphElement} The explanatory text HTML element.\n */\nexport default function addIntroText() {\n\tconst introText = document.createElement( 'p' );\n\n\tintroText.id = 'a11y-speak-intro-text';\n\tintroText.className = 'a11y-speak-intro-text';\n\tintroText.textContent = __( 'Notifications' );\n\n\tintroText.setAttribute(\n\t\t'style',\n\t\t'position: absolute;' +\n\t\t\t'margin: -1px;' +\n\t\t\t'padding: 0;' +\n\t\t\t'height: 1px;' +\n\t\t\t'width: 1px;' +\n\t\t\t'overflow: hidden;' +\n\t\t\t'clip: rect(1px, 1px, 1px, 1px);' +\n\t\t\t'-webkit-clip-path: inset(50%);' +\n\t\t\t'clip-path: inset(50%);' +\n\t\t\t'border: 0;' +\n\t\t\t'word-wrap: normal !important;'\n\t);\n\tintroText.setAttribute( 'hidden', 'hidden' );\n\n\tconst { body } = document;\n\tif ( body ) {\n\t\tbody.appendChild( introText );\n\t}\n\n\treturn introText;\n}\n","/**\n * Clears the a11y-speak-region elements and hides the explanatory text.\n */\nexport default function clear() {\n\tconst regions = document.getElementsByClassName( 'a11y-speak-region' );\n\tconst introText = document.getElementById( 'a11y-speak-intro-text' );\n\n\tfor ( let i = 0; i < regions.length; i++ ) {\n\t\tregions[ i ].textContent = '';\n\t}\n\n\t// Make sure the explanatory text is hidden from assistive technologies.\n\tif ( introText ) {\n\t\tintroText.setAttribute( 'hidden', 'hidden' );\n\t}\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","window","addContainer","ariaLive","container","document","createElement","id","className","setAttribute","body","appendChild","previousMessage","setup","introText","getElementById","containerAssertive","containerPolite","textContent","__","addIntroText","speak","message","regions","getElementsByClassName","i","length","clear","replace","filterMessage","removeAttribute","domReady"],"sourceRoot":""}
|
build/annotations/index.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"file":"./build/annotations/index.min.js","mappings":"mBACA,IAAIA,EAAsB,CCA1B,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3E,EAAwB,CAACM,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClF,EAAyBT,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,M,4ZCLvD,MAAM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AA2C,UAArBnC,EAAqB,uDAAb,GAAI8B,EAAS,uCACjD,OAASA,EAAO1G,MACf,IAAK,iBACJ,MAAMb,EAAgBuH,EAAOvH,cACvB6H,EAAgB,CACrBlI,GAAI4H,EAAO5H,GACXK,cAAAA,EACAD,mBAAoBwH,EAAOxH,mBAC3BY,OAAQ4G,EAAO5G,OACfiD,SAAU2D,EAAO3D,SACjB+B,MAAO4B,EAAO5B,OAGf,GAC4B,UAA3BkC,EAAcjE,WACZP,EAAwBwE,EAAclC,OAExC,OAAOF,EAGR,MAAMqC,EAA2B,UAAGrC,MAAAA,OAAH,EAAGA,EAASzF,UAAZ,QAA+B,GAEhE,MAAO,IACHyF,EACH,CAAEzF,GAAiB,IACf8H,EACHD,IAIH,IAAK,oBACJ,OAAO7E,EAAWyC,GAASsC,GACnB5F,EACN4F,GACE3I,GACMA,EAAWO,KAAO4H,EAAOC,iBAKpC,IAAK,0BACJ,OAAOxE,EAAWyC,GAASsC,IAC1B,IAAIC,GAAkB,EAEtB,MAAMC,EAAiBF,EAAoBnF,KACxCxD,GACIA,EAAWO,KAAO4H,EAAOC,cAC7BQ,GAAkB,EACX,IACH5I,EACHuG,MAAO,CACNlF,MAAO8G,EAAO9G,MACdC,IAAK6G,EAAO7G,OAKRtB,IAIT,OAAO4I,EAAkBC,EAAiBF,KAG5C,IAAK,2BACJ,OAAO/E,EAAWyC,GAASsC,GACnB5F,EACN4F,GACE3I,GACMA,EAAWuB,SAAW4G,EAAO5G,WAMzC,OAAO8E,GUzGPyC,UAFkD,EAGlDC,QAAOA,KAGRC,EAAAA,EAAAA,UAAUV,I","sources":["webpack://wp/webpack/bootstrap","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\",\"richText\"]","webpack://wp/external window [\"wp\",\"i18n\"]","webpack://wp/./packages/annotations/build-module/store/@wordpress/annotations/src/store/constants.js","webpack://wp/./packages/annotations/build-module/format/@wordpress/annotations/src/format/annotation.js","webpack://wp/./packages/annotations/build-module/format/@wordpress/annotations/src/format/index.js","webpack://wp/external window [\"wp\",\"hooks\"]","webpack://wp/external window [\"wp\",\"data\"]","webpack://wp/./packages/annotations/build-module/store/@wordpress/annotations/src/store/reducer.js","webpack://wp/./packages/annotations/build-module/block/@wordpress/annotations/src/block/index.js","webpack://wp/./node_modules/rememo/es/rememo.js","webpack://wp/./packages/annotations/build-module/store/@wordpress/annotations/src/store/selectors.js","webpack://wp/./node_modules/uuid/dist/esm-browser/rng.js","webpack://wp/./node_modules/uuid/dist/esm-browser/regex.js","webpack://wp/./node_modules/uuid/dist/esm-browser/validate.js","webpack://wp/./node_modules/uuid/dist/esm-browser/stringify.js","webpack://wp/./node_modules/uuid/dist/esm-browser/v4.js","webpack://wp/./packages/annotations/build-module/store/@wordpress/annotations/src/store/actions.js","webpack://wp/./packages/annotations/build-module/store/@wordpress/annotations/src/store/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\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\"][\"richText\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"i18n\"];","/**\n * The identifier for the data store.\n *\n * @type {string}\n */\nexport const STORE_NAME = 'core/annotations';\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { applyFormat, removeFormat } from '@wordpress/rich-text';\n\nconst FORMAT_NAME = 'core/annotation';\n\nconst ANNOTATION_ATTRIBUTE_PREFIX = 'annotation-text-';\n/**\n * Internal dependencies\n */\nimport { STORE_NAME } from '../store/constants';\n\n/**\n * Applies given annotations to the given record.\n *\n * @param {Object} record The record to apply annotations to.\n * @param {Array} annotations The annotation to apply.\n * @return {Object} A record with the annotations applied.\n */\nexport function applyAnnotations( record, annotations = [] ) {\n\tannotations.forEach( ( annotation ) => {\n\t\tlet { start, end } = annotation;\n\n\t\tif ( start > record.text.length ) {\n\t\t\tstart = record.text.length;\n\t\t}\n\n\t\tif ( end > record.text.length ) {\n\t\t\tend = record.text.length;\n\t\t}\n\n\t\tconst className = ANNOTATION_ATTRIBUTE_PREFIX + annotation.source;\n\t\tconst id = ANNOTATION_ATTRIBUTE_PREFIX + annotation.id;\n\n\t\trecord = applyFormat(\n\t\t\trecord,\n\t\t\t{\n\t\t\t\ttype: FORMAT_NAME,\n\t\t\t\tattributes: {\n\t\t\t\t\tclassName,\n\t\t\t\t\tid,\n\t\t\t\t},\n\t\t\t},\n\t\t\tstart,\n\t\t\tend\n\t\t);\n\t} );\n\n\treturn record;\n}\n\n/**\n * Removes annotations from the given record.\n *\n * @param {Object} record Record to remove annotations from.\n * @return {Object} The cleaned record.\n */\nexport function removeAnnotations( record ) {\n\treturn removeFormat( record, 'core/annotation', 0, record.text.length );\n}\n\n/**\n * Retrieves the positions of annotations inside an array of formats.\n *\n * @param {Array} formats Formats with annotations in there.\n * @return {Object} ID keyed positions of annotations.\n */\nfunction retrieveAnnotationPositions( formats ) {\n\tconst positions = {};\n\n\tformats.forEach( ( characterFormats, i ) => {\n\t\tcharacterFormats = characterFormats || [];\n\t\tcharacterFormats = characterFormats.filter(\n\t\t\t( format ) => format.type === FORMAT_NAME\n\t\t);\n\t\tcharacterFormats.forEach( ( format ) => {\n\t\t\tlet { id } = format.attributes;\n\t\t\tid = id.replace( ANNOTATION_ATTRIBUTE_PREFIX, '' );\n\n\t\t\tif ( ! positions.hasOwnProperty( id ) ) {\n\t\t\t\tpositions[ id ] = {\n\t\t\t\t\tstart: i,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Annotations refer to positions between characters.\n\t\t\t// Formats refer to the character themselves.\n\t\t\t// So we need to adjust for that here.\n\t\t\tpositions[ id ].end = i + 1;\n\t\t} );\n\t} );\n\n\treturn positions;\n}\n\n/**\n * Updates annotations in the state based on positions retrieved from RichText.\n *\n * @param {Array} annotations The annotations that are currently applied.\n * @param {Array} positions The current positions of the given annotations.\n * @param {Object} actions\n * @param {Function} actions.removeAnnotation Function to remove an annotation from the state.\n * @param {Function} actions.updateAnnotationRange Function to update an annotation range in the state.\n */\nfunction updateAnnotationsWithPositions(\n\tannotations,\n\tpositions,\n\t{ removeAnnotation, updateAnnotationRange }\n) {\n\tannotations.forEach( ( currentAnnotation ) => {\n\t\tconst position = positions[ currentAnnotation.id ];\n\t\t// If we cannot find an annotation, delete it.\n\t\tif ( ! position ) {\n\t\t\t// Apparently the annotation has been removed, so remove it from the state:\n\t\t\t// Remove...\n\t\t\tremoveAnnotation( currentAnnotation.id );\n\t\t\treturn;\n\t\t}\n\n\t\tconst { start, end } = currentAnnotation;\n\t\tif ( start !== position.start || end !== position.end ) {\n\t\t\tupdateAnnotationRange(\n\t\t\t\tcurrentAnnotation.id,\n\t\t\t\tposition.start,\n\t\t\t\tposition.end\n\t\t\t);\n\t\t}\n\t} );\n}\n\nexport const annotation = {\n\tname: FORMAT_NAME,\n\ttitle: __( 'Annotation' ),\n\ttagName: 'mark',\n\tclassName: 'annotation-text',\n\tattributes: {\n\t\tclassName: 'class',\n\t\tid: 'id',\n\t},\n\tedit() {\n\t\treturn null;\n\t},\n\t__experimentalGetPropsForEditableTreePreparation(\n\t\tselect,\n\t\t{ richTextIdentifier, blockClientId }\n\t) {\n\t\treturn {\n\t\t\tannotations: select(\n\t\t\t\tSTORE_NAME\n\t\t\t).__experimentalGetAnnotationsForRichText(\n\t\t\t\tblockClientId,\n\t\t\t\trichTextIdentifier\n\t\t\t),\n\t\t};\n\t},\n\t__experimentalCreatePrepareEditableTree( { annotations } ) {\n\t\treturn ( formats, text ) => {\n\t\t\tif ( annotations.length === 0 ) {\n\t\t\t\treturn formats;\n\t\t\t}\n\n\t\t\tlet record = { formats, text };\n\t\t\trecord = applyAnnotations( record, annotations );\n\t\t\treturn record.formats;\n\t\t};\n\t},\n\t__experimentalGetPropsForEditableTreeChangeHandler( dispatch ) {\n\t\treturn {\n\t\t\tremoveAnnotation:\n\t\t\t\tdispatch( STORE_NAME ).__experimentalRemoveAnnotation,\n\t\t\tupdateAnnotationRange:\n\t\t\t\tdispatch( STORE_NAME ).__experimentalUpdateAnnotationRange,\n\t\t};\n\t},\n\t__experimentalCreateOnChangeEditableValue( props ) {\n\t\treturn ( formats ) => {\n\t\t\tconst positions = retrieveAnnotationPositions( formats );\n\t\t\tconst { removeAnnotation, updateAnnotationRange, annotations } =\n\t\t\t\tprops;\n\n\t\t\tupdateAnnotationsWithPositions( annotations, positions, {\n\t\t\t\tremoveAnnotation,\n\t\t\t\tupdateAnnotationRange,\n\t\t\t} );\n\t\t};\n\t},\n};\n","/**\n * WordPress dependencies\n */\nimport { registerFormatType } from '@wordpress/rich-text';\n\n/**\n * Internal dependencies\n */\nimport { annotation } from './annotation';\n\nconst { name, ...settings } = annotation;\n\nregisterFormatType( name, settings );\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"hooks\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"data\"];","/**\n * Filters an array based on the predicate, but keeps the reference the same if\n * the array hasn't changed.\n *\n * @param {Array} collection The collection to filter.\n * @param {Function} predicate Function that determines if the item should stay\n * in the array.\n * @return {Array} Filtered array.\n */\nfunction filterWithReference( collection, predicate ) {\n\tconst filteredCollection = collection.filter( predicate );\n\n\treturn collection.length === filteredCollection.length\n\t\t? collection\n\t\t: filteredCollection;\n}\n\n/**\n * Creates a new object with the same keys, but with `callback()` called as\n * a transformer function on each of the values.\n *\n * @param {Object} obj The object to transform.\n * @param {Function} callback The function to transform each object value.\n * @return {Array} Transformed object.\n */\nconst mapValues = ( obj, callback ) =>\n\tObject.entries( obj ).reduce(\n\t\t( acc, [ key, value ] ) => ( {\n\t\t\t...acc,\n\t\t\t[ key ]: callback( value ),\n\t\t} ),\n\t\t{}\n\t);\n\n/**\n * Verifies whether the given annotations is a valid annotation.\n *\n * @param {Object} annotation The annotation to verify.\n * @return {boolean} Whether the given annotation is valid.\n */\nfunction isValidAnnotationRange( annotation ) {\n\treturn (\n\t\ttypeof annotation.start === 'number' &&\n\t\ttypeof annotation.end === 'number' &&\n\t\tannotation.start <= annotation.end\n\t);\n}\n\n/**\n * Reducer managing annotations.\n *\n * @param {Object} state The annotations currently shown in the editor.\n * @param {Object} action Dispatched action.\n *\n * @return {Array} Updated state.\n */\nexport function annotations( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'ANNOTATION_ADD':\n\t\t\tconst blockClientId = action.blockClientId;\n\t\t\tconst newAnnotation = {\n\t\t\t\tid: action.id,\n\t\t\t\tblockClientId,\n\t\t\t\trichTextIdentifier: action.richTextIdentifier,\n\t\t\t\tsource: action.source,\n\t\t\t\tselector: action.selector,\n\t\t\t\trange: action.range,\n\t\t\t};\n\n\t\t\tif (\n\t\t\t\tnewAnnotation.selector === 'range' &&\n\t\t\t\t! isValidAnnotationRange( newAnnotation.range )\n\t\t\t) {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\tconst previousAnnotationsForBlock = state?.[ blockClientId ] ?? [];\n\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ blockClientId ]: [\n\t\t\t\t\t...previousAnnotationsForBlock,\n\t\t\t\t\tnewAnnotation,\n\t\t\t\t],\n\t\t\t};\n\n\t\tcase 'ANNOTATION_REMOVE':\n\t\t\treturn mapValues( state, ( annotationsForBlock ) => {\n\t\t\t\treturn filterWithReference(\n\t\t\t\t\tannotationsForBlock,\n\t\t\t\t\t( annotation ) => {\n\t\t\t\t\t\treturn annotation.id !== action.annotationId;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t} );\n\n\t\tcase 'ANNOTATION_UPDATE_RANGE':\n\t\t\treturn mapValues( state, ( annotationsForBlock ) => {\n\t\t\t\tlet hasChangedRange = false;\n\n\t\t\t\tconst newAnnotations = annotationsForBlock.map(\n\t\t\t\t\t( annotation ) => {\n\t\t\t\t\t\tif ( annotation.id === action.annotationId ) {\n\t\t\t\t\t\t\thasChangedRange = true;\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t...annotation,\n\t\t\t\t\t\t\t\trange: {\n\t\t\t\t\t\t\t\t\tstart: action.start,\n\t\t\t\t\t\t\t\t\tend: action.end,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn annotation;\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\treturn hasChangedRange ? newAnnotations : annotationsForBlock;\n\t\t\t} );\n\n\t\tcase 'ANNOTATION_REMOVE_SOURCE':\n\t\t\treturn mapValues( state, ( annotationsForBlock ) => {\n\t\t\t\treturn filterWithReference(\n\t\t\t\t\tannotationsForBlock,\n\t\t\t\t\t( annotation ) => {\n\t\t\t\t\t\treturn annotation.source !== action.source;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t} );\n\t}\n\n\treturn state;\n}\n\nexport default annotations;\n","/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { STORE_NAME } from '../store/constants';\n/**\n * Adds annotation className to the block-list-block component.\n *\n * @param {Object} OriginalComponent The original BlockListBlock component.\n * @return {Object} The enhanced component.\n */\nconst addAnnotationClassName = ( OriginalComponent ) => {\n\treturn withSelect( ( select, { clientId, className } ) => {\n\t\tconst annotations =\n\t\t\tselect( STORE_NAME ).__experimentalGetAnnotationsForBlock(\n\t\t\t\tclientId\n\t\t\t);\n\n\t\treturn {\n\t\t\tclassName: annotations\n\t\t\t\t.map( ( annotation ) => {\n\t\t\t\t\treturn 'is-annotated-by-' + annotation.source;\n\t\t\t\t} )\n\t\t\t\t.concat( className )\n\t\t\t\t.filter( Boolean )\n\t\t\t\t.join( ' ' ),\n\t\t};\n\t} )( OriginalComponent );\n};\n\naddFilter(\n\t'editor.BlockListBlock',\n\t'core/annotations',\n\taddAnnotationClassName\n);\n","'use strict';\n\n/** @typedef {(...args: any[]) => *[]} GetDependants */\n\n/** @typedef {() => void} Clear */\n\n/**\n * @typedef {{\n * getDependants: GetDependants,\n * clear: Clear\n * }} EnhancedSelector\n */\n\n/**\n * Internal cache entry.\n *\n * @typedef CacheNode\n *\n * @property {?CacheNode|undefined} [prev] Previous node.\n * @property {?CacheNode|undefined} [next] Next node.\n * @property {*[]} args Function arguments for cache entry.\n * @property {*} val Function result.\n */\n\n/**\n * @typedef Cache\n *\n * @property {Clear} clear Function to clear cache.\n * @property {boolean} [isUniqueByDependants] Whether dependants are valid in\n * considering cache uniqueness. A cache is unique if dependents are all arrays\n * or objects.\n * @property {CacheNode?} [head] Cache head.\n * @property {*[]} [lastDependants] Dependants from previous invocation.\n */\n\n/**\n * Arbitrary value used as key for referencing cache object in WeakMap tree.\n *\n * @type {{}}\n */\nvar LEAF_KEY = {};\n\n/**\n * Returns the first argument as the sole entry in an array.\n *\n * @template T\n *\n * @param {T} value Value to return.\n *\n * @return {[T]} Value returned as entry in array.\n */\nfunction arrayOf(value) {\n\treturn [value];\n}\n\n/**\n * Returns true if the value passed is object-like, or false otherwise. A value\n * is object-like if it can support property assignment, e.g. object or array.\n *\n * @param {*} value Value to test.\n *\n * @return {boolean} Whether value is object-like.\n */\nfunction isObjectLike(value) {\n\treturn !!value && 'object' === typeof value;\n}\n\n/**\n * Creates and returns a new cache object.\n *\n * @return {Cache} Cache object.\n */\nfunction createCache() {\n\t/** @type {Cache} */\n\tvar cache = {\n\t\tclear: function () {\n\t\t\tcache.head = null;\n\t\t},\n\t};\n\n\treturn cache;\n}\n\n/**\n * Returns true if entries within the two arrays are strictly equal by\n * reference from a starting index.\n *\n * @param {*[]} a First array.\n * @param {*[]} b Second array.\n * @param {number} fromIndex Index from which to start comparison.\n *\n * @return {boolean} Whether arrays are shallowly equal.\n */\nfunction isShallowEqual(a, b, fromIndex) {\n\tvar i;\n\n\tif (a.length !== b.length) {\n\t\treturn false;\n\t}\n\n\tfor (i = fromIndex; i < a.length; i++) {\n\t\tif (a[i] !== b[i]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\n/**\n * Returns a memoized selector function. The getDependants function argument is\n * called before the memoized selector and is expected to return an immutable\n * reference or array of references on which the selector depends for computing\n * its own return value. The memoize cache is preserved only as long as those\n * dependant references remain the same. If getDependants returns a different\n * reference(s), the cache is cleared and the selector value regenerated.\n *\n * @template {(...args: *[]) => *} S\n *\n * @param {S} selector Selector function.\n * @param {GetDependants=} getDependants Dependant getter returning an array of\n * references used in cache bust consideration.\n */\nexport default function (selector, getDependants) {\n\t/** @type {WeakMap<*,*>} */\n\tvar rootCache;\n\n\t/** @type {GetDependants} */\n\tvar normalizedGetDependants = getDependants ? getDependants : arrayOf;\n\n\t/**\n\t * Returns the cache for a given dependants array. When possible, a WeakMap\n\t * will be used to create a unique cache for each set of dependants. This\n\t * is feasible due to the nature of WeakMap in allowing garbage collection\n\t * to occur on entries where the key object is no longer referenced. Since\n\t * WeakMap requires the key to be an object, this is only possible when the\n\t * dependant is object-like. The root cache is created as a hierarchy where\n\t * each top-level key is the first entry in a dependants set, the value a\n\t * WeakMap where each key is the next dependant, and so on. This continues\n\t * so long as the dependants are object-like. If no dependants are object-\n\t * like, then the cache is shared across all invocations.\n\t *\n\t * @see isObjectLike\n\t *\n\t * @param {*[]} dependants Selector dependants.\n\t *\n\t * @return {Cache} Cache object.\n\t */\n\tfunction getCache(dependants) {\n\t\tvar caches = rootCache,\n\t\t\tisUniqueByDependants = true,\n\t\t\ti,\n\t\t\tdependant,\n\t\t\tmap,\n\t\t\tcache;\n\n\t\tfor (i = 0; i < dependants.length; i++) {\n\t\t\tdependant = dependants[i];\n\n\t\t\t// Can only compose WeakMap from object-like key.\n\t\t\tif (!isObjectLike(dependant)) {\n\t\t\t\tisUniqueByDependants = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Does current segment of cache already have a WeakMap?\n\t\t\tif (caches.has(dependant)) {\n\t\t\t\t// Traverse into nested WeakMap.\n\t\t\t\tcaches = caches.get(dependant);\n\t\t\t} else {\n\t\t\t\t// Create, set, and traverse into a new one.\n\t\t\t\tmap = new WeakMap();\n\t\t\t\tcaches.set(dependant, map);\n\t\t\t\tcaches = map;\n\t\t\t}\n\t\t}\n\n\t\t// We use an arbitrary (but consistent) object as key for the last item\n\t\t// in the WeakMap to serve as our running cache.\n\t\tif (!caches.has(LEAF_KEY)) {\n\t\t\tcache = createCache();\n\t\t\tcache.isUniqueByDependants = isUniqueByDependants;\n\t\t\tcaches.set(LEAF_KEY, cache);\n\t\t}\n\n\t\treturn caches.get(LEAF_KEY);\n\t}\n\n\t/**\n\t * Resets root memoization cache.\n\t */\n\tfunction clear() {\n\t\trootCache = new WeakMap();\n\t}\n\n\t/* eslint-disable jsdoc/check-param-names */\n\t/**\n\t * The augmented selector call, considering first whether dependants have\n\t * changed before passing it to underlying memoize function.\n\t *\n\t * @param {*} source Source object for derivation.\n\t * @param {...*} extraArgs Additional arguments to pass to selector.\n\t *\n\t * @return {*} Selector result.\n\t */\n\t/* eslint-enable jsdoc/check-param-names */\n\tfunction callSelector(/* source, ...extraArgs */) {\n\t\tvar len = arguments.length,\n\t\t\tcache,\n\t\t\tnode,\n\t\t\ti,\n\t\t\targs,\n\t\t\tdependants;\n\n\t\t// Create copy of arguments (avoid leaking deoptimization).\n\t\targs = new Array(len);\n\t\tfor (i = 0; i < len; i++) {\n\t\t\targs[i] = arguments[i];\n\t\t}\n\n\t\tdependants = normalizedGetDependants.apply(null, args);\n\t\tcache = getCache(dependants);\n\n\t\t// If not guaranteed uniqueness by dependants (primitive type), shallow\n\t\t// compare against last dependants and, if references have changed,\n\t\t// destroy cache to recalculate result.\n\t\tif (!cache.isUniqueByDependants) {\n\t\t\tif (\n\t\t\t\tcache.lastDependants &&\n\t\t\t\t!isShallowEqual(dependants, cache.lastDependants, 0)\n\t\t\t) {\n\t\t\t\tcache.clear();\n\t\t\t}\n\n\t\t\tcache.lastDependants = dependants;\n\t\t}\n\n\t\tnode = cache.head;\n\t\twhile (node) {\n\t\t\t// Check whether node arguments match arguments\n\t\t\tif (!isShallowEqual(node.args, args, 1)) {\n\t\t\t\tnode = node.next;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// At this point we can assume we've found a match\n\n\t\t\t// Surface matched node to head if not already\n\t\t\tif (node !== cache.head) {\n\t\t\t\t// Adjust siblings to point to each other.\n\t\t\t\t/** @type {CacheNode} */ (node.prev).next = node.next;\n\t\t\t\tif (node.next) {\n\t\t\t\t\tnode.next.prev = node.prev;\n\t\t\t\t}\n\n\t\t\t\tnode.next = cache.head;\n\t\t\t\tnode.prev = null;\n\t\t\t\t/** @type {CacheNode} */ (cache.head).prev = node;\n\t\t\t\tcache.head = node;\n\t\t\t}\n\n\t\t\t// Return immediately\n\t\t\treturn node.val;\n\t\t}\n\n\t\t// No cached value found. Continue to insertion phase:\n\n\t\tnode = /** @type {CacheNode} */ ({\n\t\t\t// Generate the result from original function\n\t\t\tval: selector.apply(null, args),\n\t\t});\n\n\t\t// Avoid including the source object in the cache.\n\t\targs[0] = null;\n\t\tnode.args = args;\n\n\t\t// Don't need to check whether node is already head, since it would\n\t\t// have been returned above already if it was\n\n\t\t// Shift existing head down list\n\t\tif (cache.head) {\n\t\t\tcache.head.prev = node;\n\t\t\tnode.next = cache.head;\n\t\t}\n\n\t\tcache.head = node;\n\n\t\treturn node.val;\n\t}\n\n\tcallSelector.getDependants = normalizedGetDependants;\n\tcallSelector.clear = clear;\n\tclear();\n\n\treturn /** @type {S & EnhancedSelector} */ (callSelector);\n}\n","/**\n * External dependencies\n */\nimport createSelector from 'rememo';\n\n/**\n * Shared reference to an empty array for cases where it is important to avoid\n * returning a new array reference on every invocation, as in a connected or\n * other pure component which performs `shouldComponentUpdate` check on props.\n * This should be used as a last resort, since the normalized data should be\n * maintained by the reducer result in state.\n *\n * @type {Array}\n */\nconst EMPTY_ARRAY = [];\n\n/**\n * Returns the annotations for a specific client ID.\n *\n * @param {Object} state Editor state.\n * @param {string} clientId The ID of the block to get the annotations for.\n *\n * @return {Array} The annotations applicable to this block.\n */\nexport const __experimentalGetAnnotationsForBlock = createSelector(\n\t( state, blockClientId ) => {\n\t\treturn ( state?.[ blockClientId ] ?? [] ).filter( ( annotation ) => {\n\t\t\treturn annotation.selector === 'block';\n\t\t} );\n\t},\n\t( state, blockClientId ) => [ state?.[ blockClientId ] ?? EMPTY_ARRAY ]\n);\n\nexport function __experimentalGetAllAnnotationsForBlock(\n\tstate,\n\tblockClientId\n) {\n\treturn state?.[ blockClientId ] ?? EMPTY_ARRAY;\n}\n\n/**\n * Returns the annotations that apply to the given RichText instance.\n *\n * Both a blockClientId and a richTextIdentifier are required. This is because\n * a block might have multiple `RichText` components. This does mean that every\n * block needs to implement annotations itself.\n *\n * @param {Object} state Editor state.\n * @param {string} blockClientId The client ID for the block.\n * @param {string} richTextIdentifier Unique identifier that identifies the given RichText.\n * @return {Array} All the annotations relevant for the `RichText`.\n */\nexport const __experimentalGetAnnotationsForRichText = createSelector(\n\t( state, blockClientId, richTextIdentifier ) => {\n\t\treturn ( state?.[ blockClientId ] ?? [] )\n\t\t\t.filter( ( annotation ) => {\n\t\t\t\treturn (\n\t\t\t\t\tannotation.selector === 'range' &&\n\t\t\t\t\trichTextIdentifier === annotation.richTextIdentifier\n\t\t\t\t);\n\t\t\t} )\n\t\t\t.map( ( annotation ) => {\n\t\t\t\tconst { range, ...other } = annotation;\n\n\t\t\t\treturn {\n\t\t\t\t\t...range,\n\t\t\t\t\t...other,\n\t\t\t\t};\n\t\t\t} );\n\t},\n\t( state, blockClientId ) => [ state?.[ blockClientId ] ?? EMPTY_ARRAY ]\n);\n\n/**\n * Returns all annotations in the editor state.\n *\n * @param {Object} state Editor state.\n * @return {Array} All annotations currently applied.\n */\nexport function __experimentalGetAnnotations( state ) {\n\treturn Object.values( state ).flat();\n}\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n// find the complete implementation of crypto (msCrypto) on IE11.\nvar getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n\n return getRandomValues(rnds8);\n}","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","/**\n * External dependencies\n */\nimport { v4 as uuid } from 'uuid';\n\n/**\n * @typedef WPAnnotationRange\n *\n * @property {number} start The offset where the annotation should start.\n * @property {number} end The offset where the annotation should end.\n */\n\n/**\n * Adds an annotation to a block.\n *\n * The `block` attribute refers to a block ID that needs to be annotated.\n * `isBlockAnnotation` controls whether or not the annotation is a block\n * annotation. The `source` is the source of the annotation, this will be used\n * to identity groups of annotations.\n *\n * The `range` property is only relevant if the selector is 'range'.\n *\n * @param {Object} annotation The annotation to add.\n * @param {string} annotation.blockClientId The blockClientId to add the annotation to.\n * @param {string} annotation.richTextIdentifier Identifier for the RichText instance the annotation applies to.\n * @param {WPAnnotationRange} annotation.range The range at which to apply this annotation.\n * @param {string} [annotation.selector=\"range\"] The way to apply this annotation.\n * @param {string} [annotation.source=\"default\"] The source that added the annotation.\n * @param {string} [annotation.id] The ID the annotation should have. Generates a UUID by default.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalAddAnnotation( {\n\tblockClientId,\n\trichTextIdentifier = null,\n\trange = null,\n\tselector = 'range',\n\tsource = 'default',\n\tid = uuid(),\n} ) {\n\tconst action = {\n\t\ttype: 'ANNOTATION_ADD',\n\t\tid,\n\t\tblockClientId,\n\t\trichTextIdentifier,\n\t\tsource,\n\t\tselector,\n\t};\n\n\tif ( selector === 'range' ) {\n\t\taction.range = range;\n\t}\n\n\treturn action;\n}\n\n/**\n * Removes an annotation with a specific ID.\n *\n * @param {string} annotationId The annotation to remove.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalRemoveAnnotation( annotationId ) {\n\treturn {\n\t\ttype: 'ANNOTATION_REMOVE',\n\t\tannotationId,\n\t};\n}\n\n/**\n * Updates the range of an annotation.\n *\n * @param {string} annotationId ID of the annotation to update.\n * @param {number} start The start of the new range.\n * @param {number} end The end of the new range.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalUpdateAnnotationRange(\n\tannotationId,\n\tstart,\n\tend\n) {\n\treturn {\n\t\ttype: 'ANNOTATION_UPDATE_RANGE',\n\t\tannotationId,\n\t\tstart,\n\t\tend,\n\t};\n}\n\n/**\n * Removes all annotations of a specific source.\n *\n * @param {string} source The source to remove.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalRemoveAnnotationsBySource( source ) {\n\treturn {\n\t\ttype: 'ANNOTATION_REMOVE_SOURCE',\n\t\tsource,\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { register, createReduxStore } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as selectors from './selectors';\nimport * as actions from './actions';\n\n/**\n * Module Constants\n */\nimport { STORE_NAME } from './constants';\n\n/**\n * Store definition for the annotations namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n *\n * @type {Object}\n */\nexport const store = createReduxStore( STORE_NAME, {\n\treducer,\n\tselectors,\n\tactions,\n} );\n\nregister( store );\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","window","STORE_NAME","FORMAT_NAME","ANNOTATION_ATTRIBUTE_PREFIX","annotation","name","title","__","tagName","className","attributes","id","edit","__experimentalGetPropsForEditableTreePreparation","select","richTextIdentifier","blockClientId","annotations","__experimentalGetAnnotationsForRichText","__experimentalCreatePrepareEditableTree","formats","text","length","record","forEach","start","end","source","applyFormat","type","applyAnnotations","__experimentalGetPropsForEditableTreeChangeHandler","dispatch","removeAnnotation","__experimentalRemoveAnnotation","updateAnnotationRange","__experimentalUpdateAnnotationRange","__experimentalCreateOnChangeEditableValue","props","positions","characterFormats","i","filter","format","replace","retrieveAnnotationPositions","currentAnnotation","position","updateAnnotationsWithPositions","settings","registerFormatType","filterWithReference","collection","predicate","filteredCollection","addFilter","OriginalComponent","withSelect","clientId","__experimentalGetAnnotationsForBlock","map","concat","Boolean","join","mapValues","callback","entries","reduce","acc","isValidAnnotationRange","LEAF_KEY","arrayOf","isShallowEqual","a","b","fromIndex","selector","getDependants","rootCache","normalizedGetDependants","getCache","dependants","dependant","cache","caches","isUniqueByDependants","has","WeakMap","set","clear","head","createCache","callSelector","node","args","len","arguments","Array","apply","lastDependants","next","prev","val","EMPTY_ARRAY","createSelector","state","__experimentalGetAllAnnotationsForBlock","range","other","__experimentalGetAnnotations","values","flat","getRandomValues","crypto","bind","msCrypto","rnds8","Uint8Array","rng","Error","uuid","byteToHex","push","toString","substr","options","buf","offset","rnds","random","arr","undefined","toLowerCase","TypeError","__experimentalAddAnnotation","action","annotationId","__experimentalRemoveAnnotationsBySource","store","createReduxStore","reducer","newAnnotation","previousAnnotationsForBlock","annotationsForBlock","hasChangedRange","newAnnotations","selectors","actions","register"],"sourceRoot":""}
|
1 |
+
{"version":3,"file":"./build/annotations/index.min.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDH,EAAwB,CAACS,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFV,EAAyBC,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,4ZCL9D,MAAM,EAA+BC,OAAW,GAAY,SCAtD,EAA+BA,OAAW,GAAQ,KCK3CC,EAAa,mBCCpBC,EAAc,kBAEdC,EAA8B,mBA4HvBC,EAAa,CACzBC,KAAMH,EACNI,OAAOC,EAAAA,EAAAA,IAAI,cACXC,QAAS,OACTC,UAAW,kBACXC,WAAY,CACXD,UAAW,QACXE,GAAI,MAELC,KAAI,IACI,KAERC,iDACCC,EAD+C,GAG9C,IADD,mBAAEC,EAAF,cAAsBC,GACrB,EACD,MAAO,CACNC,YAAaH,EACZb,GACCiB,wCACDF,EACAD,GAGF,EACDI,wCAAwC,GAAmB,IAAlB,YAAEF,GAAgB,EAC1D,MAAO,CAAEG,EAASC,KACjB,GAA4B,IAAvBJ,EAAYK,OAChB,OAAOF,EAGR,IAAIG,EAAS,CAAEH,UAASC,QAExB,OADAE,EA/II,SAA2BA,GA6BjC,OA7B4D,uDAAL,IAC3CC,SAAWpB,IACtB,IAAI,MAAEqB,EAAF,IAASC,GAAQtB,EAEhBqB,EAAQF,EAAOF,KAAKC,S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pC,IAAK,0BACJ,OAAOxE,EAAWyC,GAASsC,IAC1B,IAAIC,GAAkB,EAEtB,MAAMC,EAAiBF,EAAoBnF,KACxCxD,GACIA,EAAWO,KAAO4H,EAAOC,cAC7BQ,GAAkB,EACX,IACH5I,EACHuG,MAAO,CACNlF,MAAO8G,EAAO9G,MACdC,IAAK6G,EAAO7G,OAKRtB,IAIT,OAAO4I,EAAkBC,EAAiBF,CAA1C,IAGF,IAAK,2BACJ,OAAO/E,EAAWyC,GAASsC,GACnB5F,EACN4F,GACE3I,GACMA,EAAWuB,SAAW4G,EAAO5G,WAMzC,OAAO8E,CACP,EU1GAyC,UAFkD,EAGlDC,QAAOA,KAGRC,EAAAA,EAAAA,UAAUV,I","sources":["webpack://wp/webpack/bootstrap","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\",\"richText\"]","webpack://wp/external window [\"wp\",\"i18n\"]","webpack://wp/./packages/annotations/build-module/store/@wordpress/annotations/src/store/constants.js","webpack://wp/./packages/annotations/build-module/format/@wordpress/annotations/src/format/annotation.js","webpack://wp/./packages/annotations/build-module/format/@wordpress/annotations/src/format/index.js","webpack://wp/external window [\"wp\",\"hooks\"]","webpack://wp/external window [\"wp\",\"data\"]","webpack://wp/./packages/annotations/build-module/store/@wordpress/annotations/src/store/reducer.js","webpack://wp/./packages/annotations/build-module/block/@wordpress/annotations/src/block/index.js","webpack://wp/./node_modules/rememo/es/rememo.js","webpack://wp/./packages/annotations/build-module/store/@wordpress/annotations/src/store/selectors.js","webpack://wp/./node_modules/uuid/dist/esm-browser/rng.js","webpack://wp/./node_modules/uuid/dist/esm-browser/regex.js","webpack://wp/./node_modules/uuid/dist/esm-browser/validate.js","webpack://wp/./node_modules/uuid/dist/esm-browser/stringify.js","webpack://wp/./node_modules/uuid/dist/esm-browser/v4.js","webpack://wp/./packages/annotations/build-module/store/@wordpress/annotations/src/store/actions.js","webpack://wp/./packages/annotations/build-module/store/@wordpress/annotations/src/store/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\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\"][\"richText\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"i18n\"];","/**\n * The identifier for the data store.\n *\n * @type {string}\n */\nexport const STORE_NAME = 'core/annotations';\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { applyFormat, removeFormat } from '@wordpress/rich-text';\n\nconst FORMAT_NAME = 'core/annotation';\n\nconst ANNOTATION_ATTRIBUTE_PREFIX = 'annotation-text-';\n/**\n * Internal dependencies\n */\nimport { STORE_NAME } from '../store/constants';\n\n/**\n * Applies given annotations to the given record.\n *\n * @param {Object} record The record to apply annotations to.\n * @param {Array} annotations The annotation to apply.\n * @return {Object} A record with the annotations applied.\n */\nexport function applyAnnotations( record, annotations = [] ) {\n\tannotations.forEach( ( annotation ) => {\n\t\tlet { start, end } = annotation;\n\n\t\tif ( start > record.text.length ) {\n\t\t\tstart = record.text.length;\n\t\t}\n\n\t\tif ( end > record.text.length ) {\n\t\t\tend = record.text.length;\n\t\t}\n\n\t\tconst className = ANNOTATION_ATTRIBUTE_PREFIX + annotation.source;\n\t\tconst id = ANNOTATION_ATTRIBUTE_PREFIX + annotation.id;\n\n\t\trecord = applyFormat(\n\t\t\trecord,\n\t\t\t{\n\t\t\t\ttype: FORMAT_NAME,\n\t\t\t\tattributes: {\n\t\t\t\t\tclassName,\n\t\t\t\t\tid,\n\t\t\t\t},\n\t\t\t},\n\t\t\tstart,\n\t\t\tend\n\t\t);\n\t} );\n\n\treturn record;\n}\n\n/**\n * Removes annotations from the given record.\n *\n * @param {Object} record Record to remove annotations from.\n * @return {Object} The cleaned record.\n */\nexport function removeAnnotations( record ) {\n\treturn removeFormat( record, 'core/annotation', 0, record.text.length );\n}\n\n/**\n * Retrieves the positions of annotations inside an array of formats.\n *\n * @param {Array} formats Formats with annotations in there.\n * @return {Object} ID keyed positions of annotations.\n */\nfunction retrieveAnnotationPositions( formats ) {\n\tconst positions = {};\n\n\tformats.forEach( ( characterFormats, i ) => {\n\t\tcharacterFormats = characterFormats || [];\n\t\tcharacterFormats = characterFormats.filter(\n\t\t\t( format ) => format.type === FORMAT_NAME\n\t\t);\n\t\tcharacterFormats.forEach( ( format ) => {\n\t\t\tlet { id } = format.attributes;\n\t\t\tid = id.replace( ANNOTATION_ATTRIBUTE_PREFIX, '' );\n\n\t\t\tif ( ! positions.hasOwnProperty( id ) ) {\n\t\t\t\tpositions[ id ] = {\n\t\t\t\t\tstart: i,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Annotations refer to positions between characters.\n\t\t\t// Formats refer to the character themselves.\n\t\t\t// So we need to adjust for that here.\n\t\t\tpositions[ id ].end = i + 1;\n\t\t} );\n\t} );\n\n\treturn positions;\n}\n\n/**\n * Updates annotations in the state based on positions retrieved from RichText.\n *\n * @param {Array} annotations The annotations that are currently applied.\n * @param {Array} positions The current positions of the given annotations.\n * @param {Object} actions\n * @param {Function} actions.removeAnnotation Function to remove an annotation from the state.\n * @param {Function} actions.updateAnnotationRange Function to update an annotation range in the state.\n */\nfunction updateAnnotationsWithPositions(\n\tannotations,\n\tpositions,\n\t{ removeAnnotation, updateAnnotationRange }\n) {\n\tannotations.forEach( ( currentAnnotation ) => {\n\t\tconst position = positions[ currentAnnotation.id ];\n\t\t// If we cannot find an annotation, delete it.\n\t\tif ( ! position ) {\n\t\t\t// Apparently the annotation has been removed, so remove it from the state:\n\t\t\t// Remove...\n\t\t\tremoveAnnotation( currentAnnotation.id );\n\t\t\treturn;\n\t\t}\n\n\t\tconst { start, end } = currentAnnotation;\n\t\tif ( start !== position.start || end !== position.end ) {\n\t\t\tupdateAnnotationRange(\n\t\t\t\tcurrentAnnotation.id,\n\t\t\t\tposition.start,\n\t\t\t\tposition.end\n\t\t\t);\n\t\t}\n\t} );\n}\n\nexport const annotation = {\n\tname: FORMAT_NAME,\n\ttitle: __( 'Annotation' ),\n\ttagName: 'mark',\n\tclassName: 'annotation-text',\n\tattributes: {\n\t\tclassName: 'class',\n\t\tid: 'id',\n\t},\n\tedit() {\n\t\treturn null;\n\t},\n\t__experimentalGetPropsForEditableTreePreparation(\n\t\tselect,\n\t\t{ richTextIdentifier, blockClientId }\n\t) {\n\t\treturn {\n\t\t\tannotations: select(\n\t\t\t\tSTORE_NAME\n\t\t\t).__experimentalGetAnnotationsForRichText(\n\t\t\t\tblockClientId,\n\t\t\t\trichTextIdentifier\n\t\t\t),\n\t\t};\n\t},\n\t__experimentalCreatePrepareEditableTree( { annotations } ) {\n\t\treturn ( formats, text ) => {\n\t\t\tif ( annotations.length === 0 ) {\n\t\t\t\treturn formats;\n\t\t\t}\n\n\t\t\tlet record = { formats, text };\n\t\t\trecord = applyAnnotations( record, annotations );\n\t\t\treturn record.formats;\n\t\t};\n\t},\n\t__experimentalGetPropsForEditableTreeChangeHandler( dispatch ) {\n\t\treturn {\n\t\t\tremoveAnnotation:\n\t\t\t\tdispatch( STORE_NAME ).__experimentalRemoveAnnotation,\n\t\t\tupdateAnnotationRange:\n\t\t\t\tdispatch( STORE_NAME ).__experimentalUpdateAnnotationRange,\n\t\t};\n\t},\n\t__experimentalCreateOnChangeEditableValue( props ) {\n\t\treturn ( formats ) => {\n\t\t\tconst positions = retrieveAnnotationPositions( formats );\n\t\t\tconst { removeAnnotation, updateAnnotationRange, annotations } =\n\t\t\t\tprops;\n\n\t\t\tupdateAnnotationsWithPositions( annotations, positions, {\n\t\t\t\tremoveAnnotation,\n\t\t\t\tupdateAnnotationRange,\n\t\t\t} );\n\t\t};\n\t},\n};\n","/**\n * WordPress dependencies\n */\nimport { registerFormatType } from '@wordpress/rich-text';\n\n/**\n * Internal dependencies\n */\nimport { annotation } from './annotation';\n\nconst { name, ...settings } = annotation;\n\nregisterFormatType( name, settings );\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"hooks\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"data\"];","/**\n * Filters an array based on the predicate, but keeps the reference the same if\n * the array hasn't changed.\n *\n * @param {Array} collection The collection to filter.\n * @param {Function} predicate Function that determines if the item should stay\n * in the array.\n * @return {Array} Filtered array.\n */\nfunction filterWithReference( collection, predicate ) {\n\tconst filteredCollection = collection.filter( predicate );\n\n\treturn collection.length === filteredCollection.length\n\t\t? collection\n\t\t: filteredCollection;\n}\n\n/**\n * Creates a new object with the same keys, but with `callback()` called as\n * a transformer function on each of the values.\n *\n * @param {Object} obj The object to transform.\n * @param {Function} callback The function to transform each object value.\n * @return {Array} Transformed object.\n */\nconst mapValues = ( obj, callback ) =>\n\tObject.entries( obj ).reduce(\n\t\t( acc, [ key, value ] ) => ( {\n\t\t\t...acc,\n\t\t\t[ key ]: callback( value ),\n\t\t} ),\n\t\t{}\n\t);\n\n/**\n * Verifies whether the given annotations is a valid annotation.\n *\n * @param {Object} annotation The annotation to verify.\n * @return {boolean} Whether the given annotation is valid.\n */\nfunction isValidAnnotationRange( annotation ) {\n\treturn (\n\t\ttypeof annotation.start === 'number' &&\n\t\ttypeof annotation.end === 'number' &&\n\t\tannotation.start <= annotation.end\n\t);\n}\n\n/**\n * Reducer managing annotations.\n *\n * @param {Object} state The annotations currently shown in the editor.\n * @param {Object} action Dispatched action.\n *\n * @return {Array} Updated state.\n */\nexport function annotations( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'ANNOTATION_ADD':\n\t\t\tconst blockClientId = action.blockClientId;\n\t\t\tconst newAnnotation = {\n\t\t\t\tid: action.id,\n\t\t\t\tblockClientId,\n\t\t\t\trichTextIdentifier: action.richTextIdentifier,\n\t\t\t\tsource: action.source,\n\t\t\t\tselector: action.selector,\n\t\t\t\trange: action.range,\n\t\t\t};\n\n\t\t\tif (\n\t\t\t\tnewAnnotation.selector === 'range' &&\n\t\t\t\t! isValidAnnotationRange( newAnnotation.range )\n\t\t\t) {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\tconst previousAnnotationsForBlock = state?.[ blockClientId ] ?? [];\n\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ blockClientId ]: [\n\t\t\t\t\t...previousAnnotationsForBlock,\n\t\t\t\t\tnewAnnotation,\n\t\t\t\t],\n\t\t\t};\n\n\t\tcase 'ANNOTATION_REMOVE':\n\t\t\treturn mapValues( state, ( annotationsForBlock ) => {\n\t\t\t\treturn filterWithReference(\n\t\t\t\t\tannotationsForBlock,\n\t\t\t\t\t( annotation ) => {\n\t\t\t\t\t\treturn annotation.id !== action.annotationId;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t} );\n\n\t\tcase 'ANNOTATION_UPDATE_RANGE':\n\t\t\treturn mapValues( state, ( annotationsForBlock ) => {\n\t\t\t\tlet hasChangedRange = false;\n\n\t\t\t\tconst newAnnotations = annotationsForBlock.map(\n\t\t\t\t\t( annotation ) => {\n\t\t\t\t\t\tif ( annotation.id === action.annotationId ) {\n\t\t\t\t\t\t\thasChangedRange = true;\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t...annotation,\n\t\t\t\t\t\t\t\trange: {\n\t\t\t\t\t\t\t\t\tstart: action.start,\n\t\t\t\t\t\t\t\t\tend: action.end,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn annotation;\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\treturn hasChangedRange ? newAnnotations : annotationsForBlock;\n\t\t\t} );\n\n\t\tcase 'ANNOTATION_REMOVE_SOURCE':\n\t\t\treturn mapValues( state, ( annotationsForBlock ) => {\n\t\t\t\treturn filterWithReference(\n\t\t\t\t\tannotationsForBlock,\n\t\t\t\t\t( annotation ) => {\n\t\t\t\t\t\treturn annotation.source !== action.source;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t} );\n\t}\n\n\treturn state;\n}\n\nexport default annotations;\n","/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { STORE_NAME } from '../store/constants';\n/**\n * Adds annotation className to the block-list-block component.\n *\n * @param {Object} OriginalComponent The original BlockListBlock component.\n * @return {Object} The enhanced component.\n */\nconst addAnnotationClassName = ( OriginalComponent ) => {\n\treturn withSelect( ( select, { clientId, className } ) => {\n\t\tconst annotations =\n\t\t\tselect( STORE_NAME ).__experimentalGetAnnotationsForBlock(\n\t\t\t\tclientId\n\t\t\t);\n\n\t\treturn {\n\t\t\tclassName: annotations\n\t\t\t\t.map( ( annotation ) => {\n\t\t\t\t\treturn 'is-annotated-by-' + annotation.source;\n\t\t\t\t} )\n\t\t\t\t.concat( className )\n\t\t\t\t.filter( Boolean )\n\t\t\t\t.join( ' ' ),\n\t\t};\n\t} )( OriginalComponent );\n};\n\naddFilter(\n\t'editor.BlockListBlock',\n\t'core/annotations',\n\taddAnnotationClassName\n);\n","'use strict';\n\n/** @typedef {(...args: any[]) => *[]} GetDependants */\n\n/** @typedef {() => void} Clear */\n\n/**\n * @typedef {{\n * getDependants: GetDependants,\n * clear: Clear\n * }} EnhancedSelector\n */\n\n/**\n * Internal cache entry.\n *\n * @typedef CacheNode\n *\n * @property {?CacheNode|undefined} [prev] Previous node.\n * @property {?CacheNode|undefined} [next] Next node.\n * @property {*[]} args Function arguments for cache entry.\n * @property {*} val Function result.\n */\n\n/**\n * @typedef Cache\n *\n * @property {Clear} clear Function to clear cache.\n * @property {boolean} [isUniqueByDependants] Whether dependants are valid in\n * considering cache uniqueness. A cache is unique if dependents are all arrays\n * or objects.\n * @property {CacheNode?} [head] Cache head.\n * @property {*[]} [lastDependants] Dependants from previous invocation.\n */\n\n/**\n * Arbitrary value used as key for referencing cache object in WeakMap tree.\n *\n * @type {{}}\n */\nvar LEAF_KEY = {};\n\n/**\n * Returns the first argument as the sole entry in an array.\n *\n * @template T\n *\n * @param {T} value Value to return.\n *\n * @return {[T]} Value returned as entry in array.\n */\nfunction arrayOf(value) {\n\treturn [value];\n}\n\n/**\n * Returns true if the value passed is object-like, or false otherwise. A value\n * is object-like if it can support property assignment, e.g. object or array.\n *\n * @param {*} value Value to test.\n *\n * @return {boolean} Whether value is object-like.\n */\nfunction isObjectLike(value) {\n\treturn !!value && 'object' === typeof value;\n}\n\n/**\n * Creates and returns a new cache object.\n *\n * @return {Cache} Cache object.\n */\nfunction createCache() {\n\t/** @type {Cache} */\n\tvar cache = {\n\t\tclear: function () {\n\t\t\tcache.head = null;\n\t\t},\n\t};\n\n\treturn cache;\n}\n\n/**\n * Returns true if entries within the two arrays are strictly equal by\n * reference from a starting index.\n *\n * @param {*[]} a First array.\n * @param {*[]} b Second array.\n * @param {number} fromIndex Index from which to start comparison.\n *\n * @return {boolean} Whether arrays are shallowly equal.\n */\nfunction isShallowEqual(a, b, fromIndex) {\n\tvar i;\n\n\tif (a.length !== b.length) {\n\t\treturn false;\n\t}\n\n\tfor (i = fromIndex; i < a.length; i++) {\n\t\tif (a[i] !== b[i]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\n/**\n * Returns a memoized selector function. The getDependants function argument is\n * called before the memoized selector and is expected to return an immutable\n * reference or array of references on which the selector depends for computing\n * its own return value. The memoize cache is preserved only as long as those\n * dependant references remain the same. If getDependants returns a different\n * reference(s), the cache is cleared and the selector value regenerated.\n *\n * @template {(...args: *[]) => *} S\n *\n * @param {S} selector Selector function.\n * @param {GetDependants=} getDependants Dependant getter returning an array of\n * references used in cache bust consideration.\n */\nexport default function (selector, getDependants) {\n\t/** @type {WeakMap<*,*>} */\n\tvar rootCache;\n\n\t/** @type {GetDependants} */\n\tvar normalizedGetDependants = getDependants ? getDependants : arrayOf;\n\n\t/**\n\t * Returns the cache for a given dependants array. When possible, a WeakMap\n\t * will be used to create a unique cache for each set of dependants. This\n\t * is feasible due to the nature of WeakMap in allowing garbage collection\n\t * to occur on entries where the key object is no longer referenced. Since\n\t * WeakMap requires the key to be an object, this is only possible when the\n\t * dependant is object-like. The root cache is created as a hierarchy where\n\t * each top-level key is the first entry in a dependants set, the value a\n\t * WeakMap where each key is the next dependant, and so on. This continues\n\t * so long as the dependants are object-like. If no dependants are object-\n\t * like, then the cache is shared across all invocations.\n\t *\n\t * @see isObjectLike\n\t *\n\t * @param {*[]} dependants Selector dependants.\n\t *\n\t * @return {Cache} Cache object.\n\t */\n\tfunction getCache(dependants) {\n\t\tvar caches = rootCache,\n\t\t\tisUniqueByDependants = true,\n\t\t\ti,\n\t\t\tdependant,\n\t\t\tmap,\n\t\t\tcache;\n\n\t\tfor (i = 0; i < dependants.length; i++) {\n\t\t\tdependant = dependants[i];\n\n\t\t\t// Can only compose WeakMap from object-like key.\n\t\t\tif (!isObjectLike(dependant)) {\n\t\t\t\tisUniqueByDependants = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Does current segment of cache already have a WeakMap?\n\t\t\tif (caches.has(dependant)) {\n\t\t\t\t// Traverse into nested WeakMap.\n\t\t\t\tcaches = caches.get(dependant);\n\t\t\t} else {\n\t\t\t\t// Create, set, and traverse into a new one.\n\t\t\t\tmap = new WeakMap();\n\t\t\t\tcaches.set(dependant, map);\n\t\t\t\tcaches = map;\n\t\t\t}\n\t\t}\n\n\t\t// We use an arbitrary (but consistent) object as key for the last item\n\t\t// in the WeakMap to serve as our running cache.\n\t\tif (!caches.has(LEAF_KEY)) {\n\t\t\tcache = createCache();\n\t\t\tcache.isUniqueByDependants = isUniqueByDependants;\n\t\t\tcaches.set(LEAF_KEY, cache);\n\t\t}\n\n\t\treturn caches.get(LEAF_KEY);\n\t}\n\n\t/**\n\t * Resets root memoization cache.\n\t */\n\tfunction clear() {\n\t\trootCache = new WeakMap();\n\t}\n\n\t/* eslint-disable jsdoc/check-param-names */\n\t/**\n\t * The augmented selector call, considering first whether dependants have\n\t * changed before passing it to underlying memoize function.\n\t *\n\t * @param {*} source Source object for derivation.\n\t * @param {...*} extraArgs Additional arguments to pass to selector.\n\t *\n\t * @return {*} Selector result.\n\t */\n\t/* eslint-enable jsdoc/check-param-names */\n\tfunction callSelector(/* source, ...extraArgs */) {\n\t\tvar len = arguments.length,\n\t\t\tcache,\n\t\t\tnode,\n\t\t\ti,\n\t\t\targs,\n\t\t\tdependants;\n\n\t\t// Create copy of arguments (avoid leaking deoptimization).\n\t\targs = new Array(len);\n\t\tfor (i = 0; i < len; i++) {\n\t\t\targs[i] = arguments[i];\n\t\t}\n\n\t\tdependants = normalizedGetDependants.apply(null, args);\n\t\tcache = getCache(dependants);\n\n\t\t// If not guaranteed uniqueness by dependants (primitive type), shallow\n\t\t// compare against last dependants and, if references have changed,\n\t\t// destroy cache to recalculate result.\n\t\tif (!cache.isUniqueByDependants) {\n\t\t\tif (\n\t\t\t\tcache.lastDependants &&\n\t\t\t\t!isShallowEqual(dependants, cache.lastDependants, 0)\n\t\t\t) {\n\t\t\t\tcache.clear();\n\t\t\t}\n\n\t\t\tcache.lastDependants = dependants;\n\t\t}\n\n\t\tnode = cache.head;\n\t\twhile (node) {\n\t\t\t// Check whether node arguments match arguments\n\t\t\tif (!isShallowEqual(node.args, args, 1)) {\n\t\t\t\tnode = node.next;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// At this point we can assume we've found a match\n\n\t\t\t// Surface matched node to head if not already\n\t\t\tif (node !== cache.head) {\n\t\t\t\t// Adjust siblings to point to each other.\n\t\t\t\t/** @type {CacheNode} */ (node.prev).next = node.next;\n\t\t\t\tif (node.next) {\n\t\t\t\t\tnode.next.prev = node.prev;\n\t\t\t\t}\n\n\t\t\t\tnode.next = cache.head;\n\t\t\t\tnode.prev = null;\n\t\t\t\t/** @type {CacheNode} */ (cache.head).prev = node;\n\t\t\t\tcache.head = node;\n\t\t\t}\n\n\t\t\t// Return immediately\n\t\t\treturn node.val;\n\t\t}\n\n\t\t// No cached value found. Continue to insertion phase:\n\n\t\tnode = /** @type {CacheNode} */ ({\n\t\t\t// Generate the result from original function\n\t\t\tval: selector.apply(null, args),\n\t\t});\n\n\t\t// Avoid including the source object in the cache.\n\t\targs[0] = null;\n\t\tnode.args = args;\n\n\t\t// Don't need to check whether node is already head, since it would\n\t\t// have been returned above already if it was\n\n\t\t// Shift existing head down list\n\t\tif (cache.head) {\n\t\t\tcache.head.prev = node;\n\t\t\tnode.next = cache.head;\n\t\t}\n\n\t\tcache.head = node;\n\n\t\treturn node.val;\n\t}\n\n\tcallSelector.getDependants = normalizedGetDependants;\n\tcallSelector.clear = clear;\n\tclear();\n\n\treturn /** @type {S & EnhancedSelector} */ (callSelector);\n}\n","/**\n * External dependencies\n */\nimport createSelector from 'rememo';\n\n/**\n * Shared reference to an empty array for cases where it is important to avoid\n * returning a new array reference on every invocation, as in a connected or\n * other pure component which performs `shouldComponentUpdate` check on props.\n * This should be used as a last resort, since the normalized data should be\n * maintained by the reducer result in state.\n *\n * @type {Array}\n */\nconst EMPTY_ARRAY = [];\n\n/**\n * Returns the annotations for a specific client ID.\n *\n * @param {Object} state Editor state.\n * @param {string} clientId The ID of the block to get the annotations for.\n *\n * @return {Array} The annotations applicable to this block.\n */\nexport const __experimentalGetAnnotationsForBlock = createSelector(\n\t( state, blockClientId ) => {\n\t\treturn ( state?.[ blockClientId ] ?? [] ).filter( ( annotation ) => {\n\t\t\treturn annotation.selector === 'block';\n\t\t} );\n\t},\n\t( state, blockClientId ) => [ state?.[ blockClientId ] ?? EMPTY_ARRAY ]\n);\n\nexport function __experimentalGetAllAnnotationsForBlock(\n\tstate,\n\tblockClientId\n) {\n\treturn state?.[ blockClientId ] ?? EMPTY_ARRAY;\n}\n\n/**\n * Returns the annotations that apply to the given RichText instance.\n *\n * Both a blockClientId and a richTextIdentifier are required. This is because\n * a block might have multiple `RichText` components. This does mean that every\n * block needs to implement annotations itself.\n *\n * @param {Object} state Editor state.\n * @param {string} blockClientId The client ID for the block.\n * @param {string} richTextIdentifier Unique identifier that identifies the given RichText.\n * @return {Array} All the annotations relevant for the `RichText`.\n */\nexport const __experimentalGetAnnotationsForRichText = createSelector(\n\t( state, blockClientId, richTextIdentifier ) => {\n\t\treturn ( state?.[ blockClientId ] ?? [] )\n\t\t\t.filter( ( annotation ) => {\n\t\t\t\treturn (\n\t\t\t\t\tannotation.selector === 'range' &&\n\t\t\t\t\trichTextIdentifier === annotation.richTextIdentifier\n\t\t\t\t);\n\t\t\t} )\n\t\t\t.map( ( annotation ) => {\n\t\t\t\tconst { range, ...other } = annotation;\n\n\t\t\t\treturn {\n\t\t\t\t\t...range,\n\t\t\t\t\t...other,\n\t\t\t\t};\n\t\t\t} );\n\t},\n\t( state, blockClientId ) => [ state?.[ blockClientId ] ?? EMPTY_ARRAY ]\n);\n\n/**\n * Returns all annotations in the editor state.\n *\n * @param {Object} state Editor state.\n * @return {Array} All annotations currently applied.\n */\nexport function __experimentalGetAnnotations( state ) {\n\treturn Object.values( state ).flat();\n}\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n// find the complete implementation of crypto (msCrypto) on IE11.\nvar getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n\n return getRandomValues(rnds8);\n}","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","/**\n * External dependencies\n */\nimport { v4 as uuid } from 'uuid';\n\n/**\n * @typedef WPAnnotationRange\n *\n * @property {number} start The offset where the annotation should start.\n * @property {number} end The offset where the annotation should end.\n */\n\n/**\n * Adds an annotation to a block.\n *\n * The `block` attribute refers to a block ID that needs to be annotated.\n * `isBlockAnnotation` controls whether or not the annotation is a block\n * annotation. The `source` is the source of the annotation, this will be used\n * to identity groups of annotations.\n *\n * The `range` property is only relevant if the selector is 'range'.\n *\n * @param {Object} annotation The annotation to add.\n * @param {string} annotation.blockClientId The blockClientId to add the annotation to.\n * @param {string} annotation.richTextIdentifier Identifier for the RichText instance the annotation applies to.\n * @param {WPAnnotationRange} annotation.range The range at which to apply this annotation.\n * @param {string} [annotation.selector=\"range\"] The way to apply this annotation.\n * @param {string} [annotation.source=\"default\"] The source that added the annotation.\n * @param {string} [annotation.id] The ID the annotation should have. Generates a UUID by default.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalAddAnnotation( {\n\tblockClientId,\n\trichTextIdentifier = null,\n\trange = null,\n\tselector = 'range',\n\tsource = 'default',\n\tid = uuid(),\n} ) {\n\tconst action = {\n\t\ttype: 'ANNOTATION_ADD',\n\t\tid,\n\t\tblockClientId,\n\t\trichTextIdentifier,\n\t\tsource,\n\t\tselector,\n\t};\n\n\tif ( selector === 'range' ) {\n\t\taction.range = range;\n\t}\n\n\treturn action;\n}\n\n/**\n * Removes an annotation with a specific ID.\n *\n * @param {string} annotationId The annotation to remove.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalRemoveAnnotation( annotationId ) {\n\treturn {\n\t\ttype: 'ANNOTATION_REMOVE',\n\t\tannotationId,\n\t};\n}\n\n/**\n * Updates the range of an annotation.\n *\n * @param {string} annotationId ID of the annotation to update.\n * @param {number} start The start of the new range.\n * @param {number} end The end of the new range.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalUpdateAnnotationRange(\n\tannotationId,\n\tstart,\n\tend\n) {\n\treturn {\n\t\ttype: 'ANNOTATION_UPDATE_RANGE',\n\t\tannotationId,\n\t\tstart,\n\t\tend,\n\t};\n}\n\n/**\n * Removes all annotations of a specific source.\n *\n * @param {string} source The source to remove.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalRemoveAnnotationsBySource( source ) {\n\treturn {\n\t\ttype: 'ANNOTATION_REMOVE_SOURCE',\n\t\tsource,\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { register, createReduxStore } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as selectors from './selectors';\nimport * as actions from './actions';\n\n/**\n * Module Constants\n */\nimport { STORE_NAME } from './constants';\n\n/**\n * Store definition for the annotations namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n *\n * @type {Object}\n */\nexport const store = createReduxStore( STORE_NAME, {\n\treducer,\n\tselectors,\n\tactions,\n} );\n\nregister( store );\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","window","STORE_NAME","FORMAT_NAME","ANNOTATION_ATTRIBUTE_PREFIX","annotation","name","title","__","tagName","className","attributes","id","edit","__experimentalGetPropsForEditableTreePreparation","select","richTextIdentifier","blockClientId","annotations","__experimentalGetAnnotationsForRichText","__experimentalCreatePrepareEditableTree","formats","text","length","record","forEach","start","end","source","applyFormat","type","applyAnnotations","__experimentalGetPropsForEditableTreeChangeHandler","dispatch","removeAnnotation","__experimentalRemoveAnnotation","updateAnnotationRange","__experimentalUpdateAnnotationRange","__experimentalCreateOnChangeEditableValue","props","positions","characterFormats","i","filter","format","replace","retrieveAnnotationPositions","currentAnnotation","position","updateAnnotationsWithPositions","settings","registerFormatType","filterWithReference","collection","predicate","filteredCollection","addFilter","OriginalComponent","withSelect","clientId","__experimentalGetAnnotationsForBlock","map","concat","Boolean","join","mapValues","callback","entries","reduce","acc","isValidAnnotationRange","LEAF_KEY","arrayOf","isShallowEqual","a","b","fromIndex","selector","getDependants","rootCache","normalizedGetDependants","getCache","dependants","dependant","cache","caches","isUniqueByDependants","has","WeakMap","set","clear","head","createCache","callSelector","node","args","len","arguments","Array","apply","lastDependants","next","prev","val","EMPTY_ARRAY","createSelector","state","__experimentalGetAllAnnotationsForBlock","range","other","__experimentalGetAnnotations","values","flat","getRandomValues","crypto","bind","msCrypto","rnds8","Uint8Array","rng","Error","uuid","byteToHex","push","toString","substr","options","buf","offset","rnds","random","arr","undefined","toLowerCase","TypeError","__experimentalAddAnnotation","action","annotationId","__experimentalRemoveAnnotationsBySource","store","createReduxStore","reducer","newAnnotation","previousAnnotationsForBlock","annotationsForBlock","hasChangedRange","newAnnotations","selectors","actions","register"],"sourceRoot":""}
|
build/api-fetch/index.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"file":"./build/api-fetch/index.min.js","mappings":"mBACA,IAAIA,EAAsB,CCA1B,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3E,EAAwB,CAACM,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,I,4BCAlF,MAAM,EAA+BI,OAAW,GAAQ,KC6BxD,EA1BuC,CAAEC,EAASC,KACjD,IACIC,EAAkBC,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BwH,iBACvBpD,OAAQ,OACRO,KAAM,CAAE8C,OAAQ,yBAChBnH,OAAO,IACJ+C,OAAO,IACLiE,EAdY,EAeTC,EAAaC,IAErB3H,EAAM,CACLG,KAAO,gBAAgBwH,eACvBpD,OAAQ,WAGF7D,QAAQgB,aAIjB,OAAO1B,EAAM,IAAKD,EAASU,OAAO,IAChC+C,OAAShC,IACT,MAAMmG,EAAenG,EAASN,QAAQ1B,IACrC,6BAED,OACCgC,EAASR,QAAU,KACnBQ,EAASR,OAAS,KAClB2G,EAEOD,EAAaC,GAAenE,OAAO,KAClB,IAAlBzD,EAAQU,MACLC,QAAQgB,OAAQ,CACtB2B,KAAM,eACNC,SAASC,EAAAA,EAAAA,IACR,mGAKI7C,QAAQgB,OAAQF,KAGlBmC,EAAoBnC,EAAUzB,EAAQU,UAE7CmD,MAAQpC,GACRiC,EAAgCjC,EAAUzB,EAAQU,UC2GrD,W","sources":["webpack://wp/webpack/bootstrap","webpack://wp/webpack/runtime/define property getters","webpack://wp/webpack/runtime/hasOwnProperty shorthand","webpack://wp/external window [\"wp\",\"i18n\"]","webpack://wp/./packages/api-fetch/build-module/middlewares/@wordpress/api-fetch/src/middlewares/namespace-endpoint.js","webpack://wp/external window [\"wp\",\"url\"]","webpack://wp/./packages/api-fetch/build-module/middlewares/@wordpress/api-fetch/src/middlewares/preloading.js","webpack://wp/./packages/api-fetch/build-module/middlewares/@wordpress/api-fetch/src/middlewares/fetch-all-middleware.js","webpack://wp/./packages/api-fetch/build-module/middlewares/@wordpress/api-fetch/src/middlewares/http-v1.js","webpack://wp/./packages/api-fetch/build-module/utils/@wordpress/api-fetch/src/utils/response.js","webpack://wp/./packages/api-fetch/build-module/middlewares/@wordpress/api-fetch/src/middlewares/media-upload.js","webpack://wp/./packages/api-fetch/build-module/@wordpress/api-fetch/src/index.js","webpack://wp/./packages/api-fetch/build-module/middlewares/@wordpress/api-fetch/src/middlewares/user-locale.js","webpack://wp/./packages/api-fetch/build-module/middlewares/@wordpress/api-fetch/src/middlewares/nonce.js","webpack://wp/./packages/api-fetch/build-module/middlewares/@wordpress/api-fetch/src/middlewares/root-url.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\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))","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"i18n\"];","/**\n * @type {import('../types').APIFetchMiddleware}\n */\nconst namespaceAndEndpointMiddleware = ( options, next ) => {\n\tlet path = options.path;\n\tlet namespaceTrimmed, endpointTrimmed;\n\n\tif (\n\t\ttypeof options.namespace === 'string' &&\n\t\ttypeof options.endpoint === 'string'\n\t) {\n\t\tnamespaceTrimmed = options.namespace.replace( /^\\/|\\/$/g, '' );\n\t\tendpointTrimmed = options.endpoint.replace( /^\\//, '' );\n\t\tif ( endpointTrimmed ) {\n\t\t\tpath = namespaceTrimmed + '/' + endpointTrimmed;\n\t\t} else {\n\t\t\tpath = namespaceTrimmed;\n\t\t}\n\t}\n\n\tdelete options.namespace;\n\tdelete options.endpoint;\n\n\treturn next( {\n\t\t...options,\n\t\tpath,\n\t} );\n};\n\nexport default namespaceAndEndpointMiddleware;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"url\"];","/**\n * WordPress dependencies\n */\nimport { addQueryArgs, getQueryArgs, normalizePath } from '@wordpress/url';\n\n/**\n * @param {Record<string, any>} preloadedData\n * @return {import('../types').APIFetchMiddleware} Preloading middleware.\n */\nfunction createPreloadingMiddleware( preloadedData ) {\n\tconst cache = Object.fromEntries(\n\t\tObject.entries( preloadedData ).map( ( [ path, data ] ) => [\n\t\t\tnormalizePath( path ),\n\t\t\tdata,\n\t\t] )\n\t);\n\n\treturn ( options, next ) => {\n\t\tconst { parse = true } = options;\n\t\t/** @type {string | void} */\n\t\tlet rawPath = options.path;\n\t\tif ( ! rawPath && options.url ) {\n\t\t\tconst { rest_route: pathFromQuery, ...queryArgs } = getQueryArgs(\n\t\t\t\toptions.url\n\t\t\t);\n\n\t\t\tif ( typeof pathFromQuery === 'string' ) {\n\t\t\t\trawPath = addQueryArgs( pathFromQuery, queryArgs );\n\t\t\t}\n\t\t}\n\n\t\tif ( typeof rawPath !== 'string' ) {\n\t\t\treturn next( options );\n\t\t}\n\n\t\tconst method = options.method || 'GET';\n\t\tconst path = normalizePath( rawPath );\n\n\t\tif ( 'GET' === method && cache[ path ] ) {\n\t\t\tconst cacheData = cache[ path ];\n\n\t\t\t// Unsetting the cache key ensures that the data is only used a single time.\n\t\t\tdelete cache[ path ];\n\n\t\t\treturn prepareResponse( cacheData, !! parse );\n\t\t} else if (\n\t\t\t'OPTIONS' === method &&\n\t\t\tcache[ method ] &&\n\t\t\tcache[ method ][ path ]\n\t\t) {\n\t\t\tconst cacheData = cache[ method ][ path ];\n\n\t\t\t// Unsetting the cache key ensures that the data is only used a single time.\n\t\t\tdelete cache[ method ][ path ];\n\n\t\t\treturn prepareResponse( cacheData, !! parse );\n\t\t}\n\n\t\treturn next( options );\n\t};\n}\n\n/**\n * This is a helper function that sends a success response.\n *\n * @param {Record<string, any>} responseData\n * @param {boolean} parse\n * @return {Promise<any>} Promise with the response.\n */\nfunction prepareResponse( responseData, parse ) {\n\treturn Promise.resolve(\n\t\tparse\n\t\t\t? responseData.body\n\t\t\t: new window.Response( JSON.stringify( responseData.body ), {\n\t\t\t\t\tstatus: 200,\n\t\t\t\t\tstatusText: 'OK',\n\t\t\t\t\theaders: responseData.headers,\n\t\t\t } )\n\t);\n}\n\nexport default createPreloadingMiddleware;\n","/**\n * WordPress dependencies\n */\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport apiFetch from '..';\n\n/**\n * Apply query arguments to both URL and Path, whichever is present.\n *\n * @param {import('../types').APIFetchOptions} props\n * @param {Record<string, string | number>} queryArgs\n * @return {import('../types').APIFetchOptions} The request with the modified query args\n */\nconst modifyQuery = ( { path, url, ...options }, queryArgs ) => ( {\n\t...options,\n\turl: url && addQueryArgs( url, queryArgs ),\n\tpath: path && addQueryArgs( path, queryArgs ),\n} );\n\n/**\n * Duplicates parsing functionality from apiFetch.\n *\n * @param {Response} response\n * @return {Promise<any>} Parsed response json.\n */\nconst parseResponse = ( response ) =>\n\tresponse.json ? response.json() : Promise.reject( response );\n\n/**\n * @param {string | null} linkHeader\n * @return {{ next?: string }} The parsed link header.\n */\nconst parseLinkHeader = ( linkHeader ) => {\n\tif ( ! linkHeader ) {\n\t\treturn {};\n\t}\n\tconst match = linkHeader.match( /<([^>]+)>; rel=\"next\"/ );\n\treturn match\n\t\t? {\n\t\t\t\tnext: match[ 1 ],\n\t\t }\n\t\t: {};\n};\n\n/**\n * @param {Response} response\n * @return {string | undefined} The next page URL.\n */\nconst getNextPageUrl = ( response ) => {\n\tconst { next } = parseLinkHeader( response.headers.get( 'link' ) );\n\treturn next;\n};\n\n/**\n * @param {import('../types').APIFetchOptions} options\n * @return {boolean} True if the request contains an unbounded query.\n */\nconst requestContainsUnboundedQuery = ( options ) => {\n\tconst pathIsUnbounded =\n\t\t!! options.path && options.path.indexOf( 'per_page=-1' ) !== -1;\n\tconst urlIsUnbounded =\n\t\t!! options.url && options.url.indexOf( 'per_page=-1' ) !== -1;\n\treturn pathIsUnbounded || urlIsUnbounded;\n};\n\n/**\n * The REST API enforces an upper limit on the per_page option. To handle large\n * collections, apiFetch consumers can pass `per_page=-1`; this middleware will\n * then recursively assemble a full response array from all available pages.\n *\n * @type {import('../types').APIFetchMiddleware}\n */\nconst fetchAllMiddleware = async ( options, next ) => {\n\tif ( options.parse === false ) {\n\t\t// If a consumer has opted out of parsing, do not apply middleware.\n\t\treturn next( options );\n\t}\n\tif ( ! requestContainsUnboundedQuery( options ) ) {\n\t\t// If neither url nor path is requesting all items, do not apply middleware.\n\t\treturn next( options );\n\t}\n\n\t// Retrieve requested page of results.\n\tconst response = await apiFetch( {\n\t\t...modifyQuery( options, {\n\t\t\tper_page: 100,\n\t\t} ),\n\t\t// Ensure headers are returned for page 1.\n\t\tparse: false,\n\t} );\n\n\tconst results = await parseResponse( response );\n\n\tif ( ! Array.isArray( results ) ) {\n\t\t// We have no reliable way of merging non-array results.\n\t\treturn results;\n\t}\n\n\tlet nextPage = getNextPageUrl( response );\n\n\tif ( ! nextPage ) {\n\t\t// There are no further pages to request.\n\t\treturn results;\n\t}\n\n\t// Iteratively fetch all remaining pages until no \"next\" header is found.\n\tlet mergedResults = /** @type {any[]} */ ( [] ).concat( results );\n\twhile ( nextPage ) {\n\t\tconst nextResponse = await apiFetch( {\n\t\t\t...options,\n\t\t\t// Ensure the URL for the next page is used instead of any provided path.\n\t\t\tpath: undefined,\n\t\t\turl: nextPage,\n\t\t\t// Ensure we still get headers so we can identify the next page.\n\t\t\tparse: false,\n\t\t} );\n\t\tconst nextResults = await parseResponse( nextResponse );\n\t\tmergedResults = mergedResults.concat( nextResults );\n\t\tnextPage = getNextPageUrl( nextResponse );\n\t}\n\treturn mergedResults;\n};\n\nexport default fetchAllMiddleware;\n","/**\n * Set of HTTP methods which are eligible to be overridden.\n *\n * @type {Set<string>}\n */\nconst OVERRIDE_METHODS = new Set( [ 'PATCH', 'PUT', 'DELETE' ] );\n\n/**\n * Default request method.\n *\n * \"A request has an associated method (a method). Unless stated otherwise it\n * is `GET`.\"\n *\n * @see https://fetch.spec.whatwg.org/#requests\n *\n * @type {string}\n */\nconst DEFAULT_METHOD = 'GET';\n\n/**\n * API Fetch middleware which overrides the request method for HTTP v1\n * compatibility leveraging the REST API X-HTTP-Method-Override header.\n *\n * @type {import('../types').APIFetchMiddleware}\n */\nconst httpV1Middleware = ( options, next ) => {\n\tconst { method = DEFAULT_METHOD } = options;\n\tif ( OVERRIDE_METHODS.has( method.toUpperCase() ) ) {\n\t\toptions = {\n\t\t\t...options,\n\t\t\theaders: {\n\t\t\t\t...options.headers,\n\t\t\t\t'X-HTTP-Method-Override': method,\n\t\t\t\t'Content-Type': 'application/json',\n\t\t\t},\n\t\t\tmethod: 'POST',\n\t\t};\n\t}\n\n\treturn next( options );\n};\n\nexport default httpV1Middleware;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Parses the apiFetch response.\n *\n * @param {Response} response\n * @param {boolean} shouldParseResponse\n *\n * @return {Promise<any> | null | Response} Parsed response.\n */\nconst parseResponse = ( response, shouldParseResponse = true ) => {\n\tif ( shouldParseResponse ) {\n\t\tif ( response.status === 204 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn response.json ? response.json() : Promise.reject( response );\n\t}\n\n\treturn response;\n};\n\n/**\n * Calls the `json` function on the Response, throwing an error if the response\n * doesn't have a json function or if parsing the json itself fails.\n *\n * @param {Response} response\n * @return {Promise<any>} Parsed response.\n */\nconst parseJsonAndNormalizeError = ( response ) => {\n\tconst invalidJsonError = {\n\t\tcode: 'invalid_json',\n\t\tmessage: __( 'The response is not a valid JSON response.' ),\n\t};\n\n\tif ( ! response || ! response.json ) {\n\t\tthrow invalidJsonError;\n\t}\n\n\treturn response.json().catch( () => {\n\t\tthrow invalidJsonError;\n\t} );\n};\n\n/**\n * Parses the apiFetch response properly and normalize response errors.\n *\n * @param {Response} response\n * @param {boolean} shouldParseResponse\n *\n * @return {Promise<any>} Parsed response.\n */\nexport const parseResponseAndNormalizeError = (\n\tresponse,\n\tshouldParseResponse = true\n) => {\n\treturn Promise.resolve(\n\t\tparseResponse( response, shouldParseResponse )\n\t).catch( ( res ) => parseAndThrowError( res, shouldParseResponse ) );\n};\n\n/**\n * Parses a response, throwing an error if parsing the response fails.\n *\n * @param {Response} response\n * @param {boolean} shouldParseResponse\n * @return {Promise<any>} Parsed response.\n */\nexport function parseAndThrowError( response, shouldParseResponse = true ) {\n\tif ( ! shouldParseResponse ) {\n\t\tthrow response;\n\t}\n\n\treturn parseJsonAndNormalizeError( response ).then( ( error ) => {\n\t\tconst unknownError = {\n\t\t\tcode: 'unknown_error',\n\t\t\tmessage: __( 'An unknown error occurred.' ),\n\t\t};\n\n\t\tthrow error || unknownError;\n\t} );\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport {\n\tparseAndThrowError,\n\tparseResponseAndNormalizeError,\n} from '../utils/response';\n\n/**\n * @param {import('../types').APIFetchOptions} options\n * @return {boolean} True if the request is for media upload.\n */\nfunction isMediaUploadRequest( options ) {\n\tconst isCreateMethod = !! options.method && options.method === 'POST';\n\tconst isMediaEndpoint =\n\t\t( !! options.path && options.path.indexOf( '/wp/v2/media' ) !== -1 ) ||\n\t\t( !! options.url && options.url.indexOf( '/wp/v2/media' ) !== -1 );\n\n\treturn isMediaEndpoint && isCreateMethod;\n}\n\n/**\n * Middleware handling media upload failures and retries.\n *\n * @type {import('../types').APIFetchMiddleware}\n */\nconst mediaUploadMiddleware = ( options, next ) => {\n\tif ( ! isMediaUploadRequest( options ) ) {\n\t\treturn next( options );\n\t}\n\n\tlet retries = 0;\n\tconst maxRetries = 5;\n\n\t/**\n\t * @param {string} attachmentId\n\t * @return {Promise<any>} Processed post response.\n\t */\n\tconst postProcess = ( attachmentId ) => {\n\t\tretries++;\n\t\treturn next( {\n\t\t\tpath: `/wp/v2/media/${ attachmentId }/post-process`,\n\t\t\tmethod: 'POST',\n\t\t\tdata: { action: 'create-image-subsizes' },\n\t\t\tparse: false,\n\t\t} ).catch( () => {\n\t\t\tif ( retries < maxRetries ) {\n\t\t\t\treturn postProcess( attachmentId );\n\t\t\t}\n\t\t\tnext( {\n\t\t\t\tpath: `/wp/v2/media/${ attachmentId }?force=true`,\n\t\t\t\tmethod: 'DELETE',\n\t\t\t} );\n\n\t\t\treturn Promise.reject();\n\t\t} );\n\t};\n\n\treturn next( { ...options, parse: false } )\n\t\t.catch( ( response ) => {\n\t\t\tconst attachmentId = response.headers.get(\n\t\t\t\t'x-wp-upload-attachment-id'\n\t\t\t);\n\t\t\tif (\n\t\t\t\tresponse.status >= 500 &&\n\t\t\t\tresponse.status < 600 &&\n\t\t\t\tattachmentId\n\t\t\t) {\n\t\t\t\treturn postProcess( attachmentId ).catch( () => {\n\t\t\t\t\tif ( options.parse !== false ) {\n\t\t\t\t\t\treturn Promise.reject( {\n\t\t\t\t\t\t\tcode: 'post_process',\n\t\t\t\t\t\t\tmessage: __(\n\t\t\t\t\t\t\t\t'Media upload failed. If this is a photo or a large image, please scale it down and try again.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Promise.reject( response );\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn parseAndThrowError( response, options.parse );\n\t\t} )\n\t\t.then( ( response ) =>\n\t\t\tparseResponseAndNormalizeError( response, options.parse )\n\t\t);\n};\n\nexport default mediaUploadMiddleware;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport createNonceMiddleware from './middlewares/nonce';\nimport createRootURLMiddleware from './middlewares/root-url';\nimport createPreloadingMiddleware from './middlewares/preloading';\nimport fetchAllMiddleware from './middlewares/fetch-all-middleware';\nimport namespaceEndpointMiddleware from './middlewares/namespace-endpoint';\nimport httpV1Middleware from './middlewares/http-v1';\nimport userLocaleMiddleware from './middlewares/user-locale';\nimport mediaUploadMiddleware from './middlewares/media-upload';\nimport {\n\tparseResponseAndNormalizeError,\n\tparseAndThrowError,\n} from './utils/response';\n\n/**\n * Default set of header values which should be sent with every request unless\n * explicitly provided through apiFetch options.\n *\n * @type {Record<string, string>}\n */\nconst DEFAULT_HEADERS = {\n\t// The backend uses the Accept header as a condition for considering an\n\t// incoming request as a REST request.\n\t//\n\t// See: https://core.trac.wordpress.org/ticket/44534\n\tAccept: 'application/json, */*;q=0.1',\n};\n\n/**\n * Default set of fetch option values which should be sent with every request\n * unless explicitly provided through apiFetch options.\n *\n * @type {Object}\n */\nconst DEFAULT_OPTIONS = {\n\tcredentials: 'include',\n};\n\n/** @typedef {import('./types').APIFetchMiddleware} APIFetchMiddleware */\n/** @typedef {import('./types').APIFetchOptions} APIFetchOptions */\n\n/**\n * @type {import('./types').APIFetchMiddleware[]}\n */\nconst middlewares = [\n\tuserLocaleMiddleware,\n\tnamespaceEndpointMiddleware,\n\thttpV1Middleware,\n\tfetchAllMiddleware,\n];\n\n/**\n * Register a middleware\n *\n * @param {import('./types').APIFetchMiddleware} middleware\n */\nfunction registerMiddleware( middleware ) {\n\tmiddlewares.unshift( middleware );\n}\n\n/**\n * Checks the status of a response, throwing the Response as an error if\n * it is outside the 200 range.\n *\n * @param {Response} response\n * @return {Response} The response if the status is in the 200 range.\n */\nconst checkStatus = ( response ) => {\n\tif ( response.status >= 200 && response.status < 300 ) {\n\t\treturn response;\n\t}\n\n\tthrow response;\n};\n\n/** @typedef {(options: import('./types').APIFetchOptions) => Promise<any>} FetchHandler*/\n\n/**\n * @type {FetchHandler}\n */\nconst defaultFetchHandler = ( nextOptions ) => {\n\tconst { url, path, data, parse = true, ...remainingOptions } = nextOptions;\n\tlet { body, headers } = nextOptions;\n\n\t// Merge explicitly-provided headers with default values.\n\theaders = { ...DEFAULT_HEADERS, ...headers };\n\n\t// The `data` property is a shorthand for sending a JSON body.\n\tif ( data ) {\n\t\tbody = JSON.stringify( data );\n\t\theaders[ 'Content-Type' ] = 'application/json';\n\t}\n\n\tconst responsePromise = window.fetch(\n\t\t// Fall back to explicitly passing `window.location` which is the behavior if `undefined` is passed.\n\t\turl || path || window.location.href,\n\t\t{\n\t\t\t...DEFAULT_OPTIONS,\n\t\t\t...remainingOptions,\n\t\t\tbody,\n\t\t\theaders,\n\t\t}\n\t);\n\n\treturn responsePromise.then(\n\t\t( value ) =>\n\t\t\tPromise.resolve( value )\n\t\t\t\t.then( checkStatus )\n\t\t\t\t.catch( ( response ) => parseAndThrowError( response, parse ) )\n\t\t\t\t.then( ( response ) =>\n\t\t\t\t\tparseResponseAndNormalizeError( response, parse )\n\t\t\t\t),\n\t\t( err ) => {\n\t\t\t// Re-throw AbortError for the users to handle it themselves.\n\t\t\tif ( err && err.name === 'AbortError' ) {\n\t\t\t\tthrow err;\n\t\t\t}\n\n\t\t\t// Otherwise, there is most likely no network connection.\n\t\t\t// Unfortunately the message might depend on the browser.\n\t\t\tthrow {\n\t\t\t\tcode: 'fetch_error',\n\t\t\t\tmessage: __( 'You are probably offline.' ),\n\t\t\t};\n\t\t}\n\t);\n};\n\n/** @type {FetchHandler} */\nlet fetchHandler = defaultFetchHandler;\n\n/**\n * Defines a custom fetch handler for making the requests that will override\n * the default one using window.fetch\n *\n * @param {FetchHandler} newFetchHandler The new fetch handler\n */\nfunction setFetchHandler( newFetchHandler ) {\n\tfetchHandler = newFetchHandler;\n}\n\n/**\n * @template T\n * @param {import('./types').APIFetchOptions} options\n * @return {Promise<T>} A promise representing the request processed via the registered middlewares.\n */\nfunction apiFetch( options ) {\n\t// creates a nested function chain that calls all middlewares and finally the `fetchHandler`,\n\t// converting `middlewares = [ m1, m2, m3 ]` into:\n\t// ```\n\t// opts1 => m1( opts1, opts2 => m2( opts2, opts3 => m3( opts3, fetchHandler ) ) );\n\t// ```\n\tconst enhancedHandler = middlewares.reduceRight(\n\t\t( /** @type {FetchHandler} */ next, middleware ) => {\n\t\t\treturn ( workingOptions ) => middleware( workingOptions, next );\n\t\t},\n\t\tfetchHandler\n\t);\n\n\treturn enhancedHandler( options ).catch( ( error ) => {\n\t\tif ( error.code !== 'rest_cookie_invalid_nonce' ) {\n\t\t\treturn Promise.reject( error );\n\t\t}\n\n\t\t// If the nonce is invalid, refresh it and try again.\n\t\treturn (\n\t\t\twindow\n\t\t\t\t// @ts-ignore\n\t\t\t\t.fetch( apiFetch.nonceEndpoint )\n\t\t\t\t.then( checkStatus )\n\t\t\t\t.then( ( data ) => data.text() )\n\t\t\t\t.then( ( text ) => {\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\tapiFetch.nonceMiddleware.nonce = text;\n\t\t\t\t\treturn apiFetch( options );\n\t\t\t\t} )\n\t\t);\n\t} );\n}\n\napiFetch.use = registerMiddleware;\napiFetch.setFetchHandler = setFetchHandler;\n\napiFetch.createNonceMiddleware = createNonceMiddleware;\napiFetch.createPreloadingMiddleware = createPreloadingMiddleware;\napiFetch.createRootURLMiddleware = createRootURLMiddleware;\napiFetch.fetchAllMiddleware = fetchAllMiddleware;\napiFetch.mediaUploadMiddleware = mediaUploadMiddleware;\n\nexport default apiFetch;\n","/**\n * WordPress dependencies\n */\nimport { addQueryArgs, hasQueryArg } from '@wordpress/url';\n\n/**\n * @type {import('../types').APIFetchMiddleware}\n */\nconst userLocaleMiddleware = ( options, next ) => {\n\tif (\n\t\ttypeof options.url === 'string' &&\n\t\t! hasQueryArg( options.url, '_locale' )\n\t) {\n\t\toptions.url = addQueryArgs( options.url, { _locale: 'user' } );\n\t}\n\n\tif (\n\t\ttypeof options.path === 'string' &&\n\t\t! hasQueryArg( options.path, '_locale' )\n\t) {\n\t\toptions.path = addQueryArgs( options.path, { _locale: 'user' } );\n\t}\n\n\treturn next( options );\n};\n\nexport default userLocaleMiddleware;\n","/**\n * @param {string} nonce\n * @return {import('../types').APIFetchMiddleware & { nonce: string }} A middleware to enhance a request with a nonce.\n */\nfunction createNonceMiddleware( nonce ) {\n\t/**\n\t * @type {import('../types').APIFetchMiddleware & { nonce: string }}\n\t */\n\tconst middleware = ( options, next ) => {\n\t\tconst { headers = {} } = options;\n\n\t\t// If an 'X-WP-Nonce' header (or any case-insensitive variation\n\t\t// thereof) was specified, no need to add a nonce header.\n\t\tfor ( const headerName in headers ) {\n\t\t\tif (\n\t\t\t\theaderName.toLowerCase() === 'x-wp-nonce' &&\n\t\t\t\theaders[ headerName ] === middleware.nonce\n\t\t\t) {\n\t\t\t\treturn next( options );\n\t\t\t}\n\t\t}\n\n\t\treturn next( {\n\t\t\t...options,\n\t\t\theaders: {\n\t\t\t\t...headers,\n\t\t\t\t'X-WP-Nonce': middleware.nonce,\n\t\t\t},\n\t\t} );\n\t};\n\n\tmiddleware.nonce = nonce;\n\n\treturn middleware;\n}\n\nexport default createNonceMiddleware;\n","/**\n * Internal dependencies\n */\nimport namespaceAndEndpointMiddleware from './namespace-endpoint';\n\n/**\n * @param {string} rootURL\n * @return {import('../types').APIFetchMiddleware} Root URL middleware.\n */\nconst createRootURLMiddleware = ( rootURL ) => ( options, next ) => {\n\treturn namespaceAndEndpointMiddleware( options, ( optionsWithPath ) => {\n\t\tlet url = optionsWithPath.url;\n\t\tlet path = optionsWithPath.path;\n\t\tlet apiRoot;\n\n\t\tif ( typeof path === 'string' ) {\n\t\t\tapiRoot = rootURL;\n\n\t\t\tif ( -1 !== rootURL.indexOf( '?' ) ) {\n\t\t\t\tpath = path.replace( '?', '&' );\n\t\t\t}\n\n\t\t\tpath = path.replace( /^\\//, '' );\n\n\t\t\t// API root may already include query parameter prefix if site is\n\t\t\t// configured to use plain permalinks.\n\t\t\tif (\n\t\t\t\t'string' === typeof apiRoot &&\n\t\t\t\t-1 !== apiRoot.indexOf( '?' )\n\t\t\t) {\n\t\t\t\tpath = path.replace( '?', '&' );\n\t\t\t}\n\n\t\t\turl = apiRoot + path;\n\t\t}\n\n\t\treturn next( {\n\t\t\t...optionsWithPath,\n\t\t\turl,\n\t\t} );\n\t} );\n};\n\nexport default createRootURLMiddleware;\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","window","options","next","namespaceTrimmed","endpointTrimmed","path","namespace","endpoint","replace","prepareResponse","responseData","parse","Promise","resolve","body","Response","JSON","stringify","status","statusText","headers","modifyQuery","queryArgs","url","addQueryArgs","parseResponse","response","json","reject","getNextPageUrl","linkHeader","match","parseLinkHeader","async","pathIsUnbounded","indexOf","urlIsUnbounded","requestContainsUnboundedQuery","apiFetch","per_page","results","Array","isArray","nextPage","mergedResults","concat","nextResponse","undefined","nextResults","OVERRIDE_METHODS","Set","DEFAULT_METHOD","shouldParseResponse","parseJsonAndNormalizeError","invalidJsonError","code","message","__","catch","parseResponseAndNormalizeError","res","parseAndThrowError","then","error","unknownError","DEFAULT_HEADERS","Accept","DEFAULT_OPTIONS","credentials","middlewares","hasQueryArg","_locale","namespaceEndpointMiddleware","method","has","toUpperCase","fetchAllMiddleware","checkStatus","fetchHandler","nextOptions","data","remainingOptions","fetch","location","href","value","err","name","reduceRight","middleware","workingOptions","enhancedHandler","nonceEndpoint","text","nonceMiddleware","nonce","use","unshift","setFetchHandler","newFetchHandler","createNonceMiddleware","headerName","toLowerCase","createPreloadingMiddleware","preloadedData","cache","fromEntries","entries","map","normalizePath","rawPath","rest_route","pathFromQuery","getQueryArgs","cacheData","createRootURLMiddleware","rootURL","namespaceAndEndpointMiddleware","optionsWithPath","apiRoot","mediaUploadMiddleware","isCreateMethod","isMediaUploadRequest","retries","postProcess","attachmentId","action"],"sourceRoot":""}
|
1 |
+
{"version":3,"file":"./build/api-fetch/index.min.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDH,EAAwB,CAACS,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,I,4BCAlF,MAAM,EAA+BI,OAAW,GAAQ,KC6BxD,EA1BuC,CAAEC,EAASC,KACjD,IACIC,EAAkBC,EADlBC,EAAOJ,EAAQI,KAmBnB,MAf8B,iBAAtBJ,EAAQK,WACa,iBAArBL,EAAQM,WAEfJ,EAAmBF,EAAQK,UAAUE,QAAS,WAAY,IAC1DJ,EAAkBH,EAAQM,SAASC,QAAS,MAAO,IAElDH,EADID,EACGD,EAAmB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C,OAAQ,yBAChBnH,OAAO,IACJ+C,OAAO,IACLiE,EAdY,EAeTC,EAAaC,IAErB3H,EAAM,CACLG,KAAO,gBAAgBwH,eACvBpD,OAAQ,WAGF7D,QAAQgB,aAIjB,OAAO1B,EAAM,IAAKD,EAASU,OAAO,IAChC+C,OAAShC,IACT,MAAMmG,EAAenG,EAASN,QAAQ1B,IACrC,6BAED,OACCgC,EAASR,QAAU,KACnBQ,EAASR,OAAS,KAClB2G,EAEOD,EAAaC,GAAenE,OAAO,KAClB,IAAlBzD,EAAQU,MACLC,QAAQgB,OAAQ,CACtB2B,KAAM,eACNC,SAASC,EAAAA,EAAAA,IACR,mGAKI7C,QAAQgB,OAAQF,KAGlBmC,EAAoBnC,EAAUzB,EAAQU,MAA7C,IAEAmD,MAAQpC,GACRiC,EAAgCjC,EAAUzB,EAAQU,QA1BpD,ECqID,W","sources":["webpack://wp/webpack/bootstrap","webpack://wp/webpack/runtime/define property getters","webpack://wp/webpack/runtime/hasOwnProperty shorthand","webpack://wp/external window [\"wp\",\"i18n\"]","webpack://wp/./packages/api-fetch/build-module/middlewares/@wordpress/api-fetch/src/middlewares/namespace-endpoint.js","webpack://wp/external window [\"wp\",\"url\"]","webpack://wp/./packages/api-fetch/build-module/middlewares/@wordpress/api-fetch/src/middlewares/preloading.js","webpack://wp/./packages/api-fetch/build-module/middlewares/@wordpress/api-fetch/src/middlewares/fetch-all-middleware.js","webpack://wp/./packages/api-fetch/build-module/middlewares/@wordpress/api-fetch/src/middlewares/http-v1.js","webpack://wp/./packages/api-fetch/build-module/utils/@wordpress/api-fetch/src/utils/response.js","webpack://wp/./packages/api-fetch/build-module/middlewares/@wordpress/api-fetch/src/middlewares/media-upload.js","webpack://wp/./packages/api-fetch/build-module/@wordpress/api-fetch/src/index.js","webpack://wp/./packages/api-fetch/build-module/middlewares/@wordpress/api-fetch/src/middlewares/user-locale.js","webpack://wp/./packages/api-fetch/build-module/middlewares/@wordpress/api-fetch/src/middlewares/nonce.js","webpack://wp/./packages/api-fetch/build-module/middlewares/@wordpress/api-fetch/src/middlewares/root-url.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\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))","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"i18n\"];","/**\n * @type {import('../types').APIFetchMiddleware}\n */\nconst namespaceAndEndpointMiddleware = ( options, next ) => {\n\tlet path = options.path;\n\tlet namespaceTrimmed, endpointTrimmed;\n\n\tif (\n\t\ttypeof options.namespace === 'string' &&\n\t\ttypeof options.endpoint === 'string'\n\t) {\n\t\tnamespaceTrimmed = options.namespace.replace( /^\\/|\\/$/g, '' );\n\t\tendpointTrimmed = options.endpoint.replace( /^\\//, '' );\n\t\tif ( endpointTrimmed ) {\n\t\t\tpath = namespaceTrimmed + '/' + endpointTrimmed;\n\t\t} else {\n\t\t\tpath = namespaceTrimmed;\n\t\t}\n\t}\n\n\tdelete options.namespace;\n\tdelete options.endpoint;\n\n\treturn next( {\n\t\t...options,\n\t\tpath,\n\t} );\n};\n\nexport default namespaceAndEndpointMiddleware;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"url\"];","/**\n * WordPress dependencies\n */\nimport { addQueryArgs, getQueryArgs, normalizePath } from '@wordpress/url';\n\n/**\n * @param {Record<string, any>} preloadedData\n * @return {import('../types').APIFetchMiddleware} Preloading middleware.\n */\nfunction createPreloadingMiddleware( preloadedData ) {\n\tconst cache = Object.fromEntries(\n\t\tObject.entries( preloadedData ).map( ( [ path, data ] ) => [\n\t\t\tnormalizePath( path ),\n\t\t\tdata,\n\t\t] )\n\t);\n\n\treturn ( options, next ) => {\n\t\tconst { parse = true } = options;\n\t\t/** @type {string | void} */\n\t\tlet rawPath = options.path;\n\t\tif ( ! rawPath && options.url ) {\n\t\t\tconst { rest_route: pathFromQuery, ...queryArgs } = getQueryArgs(\n\t\t\t\toptions.url\n\t\t\t);\n\n\t\t\tif ( typeof pathFromQuery === 'string' ) {\n\t\t\t\trawPath = addQueryArgs( pathFromQuery, queryArgs );\n\t\t\t}\n\t\t}\n\n\t\tif ( typeof rawPath !== 'string' ) {\n\t\t\treturn next( options );\n\t\t}\n\n\t\tconst method = options.method || 'GET';\n\t\tconst path = normalizePath( rawPath );\n\n\t\tif ( 'GET' === method && cache[ path ] ) {\n\t\t\tconst cacheData = cache[ path ];\n\n\t\t\t// Unsetting the cache key ensures that the data is only used a single time.\n\t\t\tdelete cache[ path ];\n\n\t\t\treturn prepareResponse( cacheData, !! parse );\n\t\t} else if (\n\t\t\t'OPTIONS' === method &&\n\t\t\tcache[ method ] &&\n\t\t\tcache[ method ][ path ]\n\t\t) {\n\t\t\tconst cacheData = cache[ method ][ path ];\n\n\t\t\t// Unsetting the cache key ensures that the data is only used a single time.\n\t\t\tdelete cache[ method ][ path ];\n\n\t\t\treturn prepareResponse( cacheData, !! parse );\n\t\t}\n\n\t\treturn next( options );\n\t};\n}\n\n/**\n * This is a helper function that sends a success response.\n *\n * @param {Record<string, any>} responseData\n * @param {boolean} parse\n * @return {Promise<any>} Promise with the response.\n */\nfunction prepareResponse( responseData, parse ) {\n\treturn Promise.resolve(\n\t\tparse\n\t\t\t? responseData.body\n\t\t\t: new window.Response( JSON.stringify( responseData.body ), {\n\t\t\t\t\tstatus: 200,\n\t\t\t\t\tstatusText: 'OK',\n\t\t\t\t\theaders: responseData.headers,\n\t\t\t } )\n\t);\n}\n\nexport default createPreloadingMiddleware;\n","/**\n * WordPress dependencies\n */\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport apiFetch from '..';\n\n/**\n * Apply query arguments to both URL and Path, whichever is present.\n *\n * @param {import('../types').APIFetchOptions} props\n * @param {Record<string, string | number>} queryArgs\n * @return {import('../types').APIFetchOptions} The request with the modified query args\n */\nconst modifyQuery = ( { path, url, ...options }, queryArgs ) => ( {\n\t...options,\n\turl: url && addQueryArgs( url, queryArgs ),\n\tpath: path && addQueryArgs( path, queryArgs ),\n} );\n\n/**\n * Duplicates parsing functionality from apiFetch.\n *\n * @param {Response} response\n * @return {Promise<any>} Parsed response json.\n */\nconst parseResponse = ( response ) =>\n\tresponse.json ? response.json() : Promise.reject( response );\n\n/**\n * @param {string | null} linkHeader\n * @return {{ next?: string }} The parsed link header.\n */\nconst parseLinkHeader = ( linkHeader ) => {\n\tif ( ! linkHeader ) {\n\t\treturn {};\n\t}\n\tconst match = linkHeader.match( /<([^>]+)>; rel=\"next\"/ );\n\treturn match\n\t\t? {\n\t\t\t\tnext: match[ 1 ],\n\t\t }\n\t\t: {};\n};\n\n/**\n * @param {Response} response\n * @return {string | undefined} The next page URL.\n */\nconst getNextPageUrl = ( response ) => {\n\tconst { next } = parseLinkHeader( response.headers.get( 'link' ) );\n\treturn next;\n};\n\n/**\n * @param {import('../types').APIFetchOptions} options\n * @return {boolean} True if the request contains an unbounded query.\n */\nconst requestContainsUnboundedQuery = ( options ) => {\n\tconst pathIsUnbounded =\n\t\t!! options.path && options.path.indexOf( 'per_page=-1' ) !== -1;\n\tconst urlIsUnbounded =\n\t\t!! options.url && options.url.indexOf( 'per_page=-1' ) !== -1;\n\treturn pathIsUnbounded || urlIsUnbounded;\n};\n\n/**\n * The REST API enforces an upper limit on the per_page option. To handle large\n * collections, apiFetch consumers can pass `per_page=-1`; this middleware will\n * then recursively assemble a full response array from all available pages.\n *\n * @type {import('../types').APIFetchMiddleware}\n */\nconst fetchAllMiddleware = async ( options, next ) => {\n\tif ( options.parse === false ) {\n\t\t// If a consumer has opted out of parsing, do not apply middleware.\n\t\treturn next( options );\n\t}\n\tif ( ! requestContainsUnboundedQuery( options ) ) {\n\t\t// If neither url nor path is requesting all items, do not apply middleware.\n\t\treturn next( options );\n\t}\n\n\t// Retrieve requested page of results.\n\tconst response = await apiFetch( {\n\t\t...modifyQuery( options, {\n\t\t\tper_page: 100,\n\t\t} ),\n\t\t// Ensure headers are returned for page 1.\n\t\tparse: false,\n\t} );\n\n\tconst results = await parseResponse( response );\n\n\tif ( ! Array.isArray( results ) ) {\n\t\t// We have no reliable way of merging non-array results.\n\t\treturn results;\n\t}\n\n\tlet nextPage = getNextPageUrl( response );\n\n\tif ( ! nextPage ) {\n\t\t// There are no further pages to request.\n\t\treturn results;\n\t}\n\n\t// Iteratively fetch all remaining pages until no \"next\" header is found.\n\tlet mergedResults = /** @type {any[]} */ ( [] ).concat( results );\n\twhile ( nextPage ) {\n\t\tconst nextResponse = await apiFetch( {\n\t\t\t...options,\n\t\t\t// Ensure the URL for the next page is used instead of any provided path.\n\t\t\tpath: undefined,\n\t\t\turl: nextPage,\n\t\t\t// Ensure we still get headers so we can identify the next page.\n\t\t\tparse: false,\n\t\t} );\n\t\tconst nextResults = await parseResponse( nextResponse );\n\t\tmergedResults = mergedResults.concat( nextResults );\n\t\tnextPage = getNextPageUrl( nextResponse );\n\t}\n\treturn mergedResults;\n};\n\nexport default fetchAllMiddleware;\n","/**\n * Set of HTTP methods which are eligible to be overridden.\n *\n * @type {Set<string>}\n */\nconst OVERRIDE_METHODS = new Set( [ 'PATCH', 'PUT', 'DELETE' ] );\n\n/**\n * Default request method.\n *\n * \"A request has an associated method (a method). Unless stated otherwise it\n * is `GET`.\"\n *\n * @see https://fetch.spec.whatwg.org/#requests\n *\n * @type {string}\n */\nconst DEFAULT_METHOD = 'GET';\n\n/**\n * API Fetch middleware which overrides the request method for HTTP v1\n * compatibility leveraging the REST API X-HTTP-Method-Override header.\n *\n * @type {import('../types').APIFetchMiddleware}\n */\nconst httpV1Middleware = ( options, next ) => {\n\tconst { method = DEFAULT_METHOD } = options;\n\tif ( OVERRIDE_METHODS.has( method.toUpperCase() ) ) {\n\t\toptions = {\n\t\t\t...options,\n\t\t\theaders: {\n\t\t\t\t...options.headers,\n\t\t\t\t'X-HTTP-Method-Override': method,\n\t\t\t\t'Content-Type': 'application/json',\n\t\t\t},\n\t\t\tmethod: 'POST',\n\t\t};\n\t}\n\n\treturn next( options );\n};\n\nexport default httpV1Middleware;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Parses the apiFetch response.\n *\n * @param {Response} response\n * @param {boolean} shouldParseResponse\n *\n * @return {Promise<any> | null | Response} Parsed response.\n */\nconst parseResponse = ( response, shouldParseResponse = true ) => {\n\tif ( shouldParseResponse ) {\n\t\tif ( response.status === 204 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn response.json ? response.json() : Promise.reject( response );\n\t}\n\n\treturn response;\n};\n\n/**\n * Calls the `json` function on the Response, throwing an error if the response\n * doesn't have a json function or if parsing the json itself fails.\n *\n * @param {Response} response\n * @return {Promise<any>} Parsed response.\n */\nconst parseJsonAndNormalizeError = ( response ) => {\n\tconst invalidJsonError = {\n\t\tcode: 'invalid_json',\n\t\tmessage: __( 'The response is not a valid JSON response.' ),\n\t};\n\n\tif ( ! response || ! response.json ) {\n\t\tthrow invalidJsonError;\n\t}\n\n\treturn response.json().catch( () => {\n\t\tthrow invalidJsonError;\n\t} );\n};\n\n/**\n * Parses the apiFetch response properly and normalize response errors.\n *\n * @param {Response} response\n * @param {boolean} shouldParseResponse\n *\n * @return {Promise<any>} Parsed response.\n */\nexport const parseResponseAndNormalizeError = (\n\tresponse,\n\tshouldParseResponse = true\n) => {\n\treturn Promise.resolve(\n\t\tparseResponse( response, shouldParseResponse )\n\t).catch( ( res ) => parseAndThrowError( res, shouldParseResponse ) );\n};\n\n/**\n * Parses a response, throwing an error if parsing the response fails.\n *\n * @param {Response} response\n * @param {boolean} shouldParseResponse\n * @return {Promise<any>} Parsed response.\n */\nexport function parseAndThrowError( response, shouldParseResponse = true ) {\n\tif ( ! shouldParseResponse ) {\n\t\tthrow response;\n\t}\n\n\treturn parseJsonAndNormalizeError( response ).then( ( error ) => {\n\t\tconst unknownError = {\n\t\t\tcode: 'unknown_error',\n\t\t\tmessage: __( 'An unknown error occurred.' ),\n\t\t};\n\n\t\tthrow error || unknownError;\n\t} );\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport {\n\tparseAndThrowError,\n\tparseResponseAndNormalizeError,\n} from '../utils/response';\n\n/**\n * @param {import('../types').APIFetchOptions} options\n * @return {boolean} True if the request is for media upload.\n */\nfunction isMediaUploadRequest( options ) {\n\tconst isCreateMethod = !! options.method && options.method === 'POST';\n\tconst isMediaEndpoint =\n\t\t( !! options.path && options.path.indexOf( '/wp/v2/media' ) !== -1 ) ||\n\t\t( !! options.url && options.url.indexOf( '/wp/v2/media' ) !== -1 );\n\n\treturn isMediaEndpoint && isCreateMethod;\n}\n\n/**\n * Middleware handling media upload failures and retries.\n *\n * @type {import('../types').APIFetchMiddleware}\n */\nconst mediaUploadMiddleware = ( options, next ) => {\n\tif ( ! isMediaUploadRequest( options ) ) {\n\t\treturn next( options );\n\t}\n\n\tlet retries = 0;\n\tconst maxRetries = 5;\n\n\t/**\n\t * @param {string} attachmentId\n\t * @return {Promise<any>} Processed post response.\n\t */\n\tconst postProcess = ( attachmentId ) => {\n\t\tretries++;\n\t\treturn next( {\n\t\t\tpath: `/wp/v2/media/${ attachmentId }/post-process`,\n\t\t\tmethod: 'POST',\n\t\t\tdata: { action: 'create-image-subsizes' },\n\t\t\tparse: false,\n\t\t} ).catch( () => {\n\t\t\tif ( retries < maxRetries ) {\n\t\t\t\treturn postProcess( attachmentId );\n\t\t\t}\n\t\t\tnext( {\n\t\t\t\tpath: `/wp/v2/media/${ attachmentId }?force=true`,\n\t\t\t\tmethod: 'DELETE',\n\t\t\t} );\n\n\t\t\treturn Promise.reject();\n\t\t} );\n\t};\n\n\treturn next( { ...options, parse: false } )\n\t\t.catch( ( response ) => {\n\t\t\tconst attachmentId = response.headers.get(\n\t\t\t\t'x-wp-upload-attachment-id'\n\t\t\t);\n\t\t\tif (\n\t\t\t\tresponse.status >= 500 &&\n\t\t\t\tresponse.status < 600 &&\n\t\t\t\tattachmentId\n\t\t\t) {\n\t\t\t\treturn postProcess( attachmentId ).catch( () => {\n\t\t\t\t\tif ( options.parse !== false ) {\n\t\t\t\t\t\treturn Promise.reject( {\n\t\t\t\t\t\t\tcode: 'post_process',\n\t\t\t\t\t\t\tmessage: __(\n\t\t\t\t\t\t\t\t'Media upload failed. If this is a photo or a large image, please scale it down and try again.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Promise.reject( response );\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn parseAndThrowError( response, options.parse );\n\t\t} )\n\t\t.then( ( response ) =>\n\t\t\tparseResponseAndNormalizeError( response, options.parse )\n\t\t);\n};\n\nexport default mediaUploadMiddleware;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport createNonceMiddleware from './middlewares/nonce';\nimport createRootURLMiddleware from './middlewares/root-url';\nimport createPreloadingMiddleware from './middlewares/preloading';\nimport fetchAllMiddleware from './middlewares/fetch-all-middleware';\nimport namespaceEndpointMiddleware from './middlewares/namespace-endpoint';\nimport httpV1Middleware from './middlewares/http-v1';\nimport userLocaleMiddleware from './middlewares/user-locale';\nimport mediaUploadMiddleware from './middlewares/media-upload';\nimport {\n\tparseResponseAndNormalizeError,\n\tparseAndThrowError,\n} from './utils/response';\n\n/**\n * Default set of header values which should be sent with every request unless\n * explicitly provided through apiFetch options.\n *\n * @type {Record<string, string>}\n */\nconst DEFAULT_HEADERS = {\n\t// The backend uses the Accept header as a condition for considering an\n\t// incoming request as a REST request.\n\t//\n\t// See: https://core.trac.wordpress.org/ticket/44534\n\tAccept: 'application/json, */*;q=0.1',\n};\n\n/**\n * Default set of fetch option values which should be sent with every request\n * unless explicitly provided through apiFetch options.\n *\n * @type {Object}\n */\nconst DEFAULT_OPTIONS = {\n\tcredentials: 'include',\n};\n\n/** @typedef {import('./types').APIFetchMiddleware} APIFetchMiddleware */\n/** @typedef {import('./types').APIFetchOptions} APIFetchOptions */\n\n/**\n * @type {import('./types').APIFetchMiddleware[]}\n */\nconst middlewares = [\n\tuserLocaleMiddleware,\n\tnamespaceEndpointMiddleware,\n\thttpV1Middleware,\n\tfetchAllMiddleware,\n];\n\n/**\n * Register a middleware\n *\n * @param {import('./types').APIFetchMiddleware} middleware\n */\nfunction registerMiddleware( middleware ) {\n\tmiddlewares.unshift( middleware );\n}\n\n/**\n * Checks the status of a response, throwing the Response as an error if\n * it is outside the 200 range.\n *\n * @param {Response} response\n * @return {Response} The response if the status is in the 200 range.\n */\nconst checkStatus = ( response ) => {\n\tif ( response.status >= 200 && response.status < 300 ) {\n\t\treturn response;\n\t}\n\n\tthrow response;\n};\n\n/** @typedef {(options: import('./types').APIFetchOptions) => Promise<any>} FetchHandler*/\n\n/**\n * @type {FetchHandler}\n */\nconst defaultFetchHandler = ( nextOptions ) => {\n\tconst { url, path, data, parse = true, ...remainingOptions } = nextOptions;\n\tlet { body, headers } = nextOptions;\n\n\t// Merge explicitly-provided headers with default values.\n\theaders = { ...DEFAULT_HEADERS, ...headers };\n\n\t// The `data` property is a shorthand for sending a JSON body.\n\tif ( data ) {\n\t\tbody = JSON.stringify( data );\n\t\theaders[ 'Content-Type' ] = 'application/json';\n\t}\n\n\tconst responsePromise = window.fetch(\n\t\t// Fall back to explicitly passing `window.location` which is the behavior if `undefined` is passed.\n\t\turl || path || window.location.href,\n\t\t{\n\t\t\t...DEFAULT_OPTIONS,\n\t\t\t...remainingOptions,\n\t\t\tbody,\n\t\t\theaders,\n\t\t}\n\t);\n\n\treturn responsePromise.then(\n\t\t( value ) =>\n\t\t\tPromise.resolve( value )\n\t\t\t\t.then( checkStatus )\n\t\t\t\t.catch( ( response ) => parseAndThrowError( response, parse ) )\n\t\t\t\t.then( ( response ) =>\n\t\t\t\t\tparseResponseAndNormalizeError( response, parse )\n\t\t\t\t),\n\t\t( err ) => {\n\t\t\t// Re-throw AbortError for the users to handle it themselves.\n\t\t\tif ( err && err.name === 'AbortError' ) {\n\t\t\t\tthrow err;\n\t\t\t}\n\n\t\t\t// Otherwise, there is most likely no network connection.\n\t\t\t// Unfortunately the message might depend on the browser.\n\t\t\tthrow {\n\t\t\t\tcode: 'fetch_error',\n\t\t\t\tmessage: __( 'You are probably offline.' ),\n\t\t\t};\n\t\t}\n\t);\n};\n\n/** @type {FetchHandler} */\nlet fetchHandler = defaultFetchHandler;\n\n/**\n * Defines a custom fetch handler for making the requests that will override\n * the default one using window.fetch\n *\n * @param {FetchHandler} newFetchHandler The new fetch handler\n */\nfunction setFetchHandler( newFetchHandler ) {\n\tfetchHandler = newFetchHandler;\n}\n\n/**\n * @template T\n * @param {import('./types').APIFetchOptions} options\n * @return {Promise<T>} A promise representing the request processed via the registered middlewares.\n */\nfunction apiFetch( options ) {\n\t// creates a nested function chain that calls all middlewares and finally the `fetchHandler`,\n\t// converting `middlewares = [ m1, m2, m3 ]` into:\n\t// ```\n\t// opts1 => m1( opts1, opts2 => m2( opts2, opts3 => m3( opts3, fetchHandler ) ) );\n\t// ```\n\tconst enhancedHandler = middlewares.reduceRight(\n\t\t( /** @type {FetchHandler} */ next, middleware ) => {\n\t\t\treturn ( workingOptions ) => middleware( workingOptions, next );\n\t\t},\n\t\tfetchHandler\n\t);\n\n\treturn enhancedHandler( options ).catch( ( error ) => {\n\t\tif ( error.code !== 'rest_cookie_invalid_nonce' ) {\n\t\t\treturn Promise.reject( error );\n\t\t}\n\n\t\t// If the nonce is invalid, refresh it and try again.\n\t\treturn (\n\t\t\twindow\n\t\t\t\t// @ts-ignore\n\t\t\t\t.fetch( apiFetch.nonceEndpoint )\n\t\t\t\t.then( checkStatus )\n\t\t\t\t.then( ( data ) => data.text() )\n\t\t\t\t.then( ( text ) => {\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\tapiFetch.nonceMiddleware.nonce = text;\n\t\t\t\t\treturn apiFetch( options );\n\t\t\t\t} )\n\t\t);\n\t} );\n}\n\napiFetch.use = registerMiddleware;\napiFetch.setFetchHandler = setFetchHandler;\n\napiFetch.createNonceMiddleware = createNonceMiddleware;\napiFetch.createPreloadingMiddleware = createPreloadingMiddleware;\napiFetch.createRootURLMiddleware = createRootURLMiddleware;\napiFetch.fetchAllMiddleware = fetchAllMiddleware;\napiFetch.mediaUploadMiddleware = mediaUploadMiddleware;\n\nexport default apiFetch;\n","/**\n * WordPress dependencies\n */\nimport { addQueryArgs, hasQueryArg } from '@wordpress/url';\n\n/**\n * @type {import('../types').APIFetchMiddleware}\n */\nconst userLocaleMiddleware = ( options, next ) => {\n\tif (\n\t\ttypeof options.url === 'string' &&\n\t\t! hasQueryArg( options.url, '_locale' )\n\t) {\n\t\toptions.url = addQueryArgs( options.url, { _locale: 'user' } );\n\t}\n\n\tif (\n\t\ttypeof options.path === 'string' &&\n\t\t! hasQueryArg( options.path, '_locale' )\n\t) {\n\t\toptions.path = addQueryArgs( options.path, { _locale: 'user' } );\n\t}\n\n\treturn next( options );\n};\n\nexport default userLocaleMiddleware;\n","/**\n * @param {string} nonce\n * @return {import('../types').APIFetchMiddleware & { nonce: string }} A middleware to enhance a request with a nonce.\n */\nfunction createNonceMiddleware( nonce ) {\n\t/**\n\t * @type {import('../types').APIFetchMiddleware & { nonce: string }}\n\t */\n\tconst middleware = ( options, next ) => {\n\t\tconst { headers = {} } = options;\n\n\t\t// If an 'X-WP-Nonce' header (or any case-insensitive variation\n\t\t// thereof) was specified, no need to add a nonce header.\n\t\tfor ( const headerName in headers ) {\n\t\t\tif (\n\t\t\t\theaderName.toLowerCase() === 'x-wp-nonce' &&\n\t\t\t\theaders[ headerName ] === middleware.nonce\n\t\t\t) {\n\t\t\t\treturn next( options );\n\t\t\t}\n\t\t}\n\n\t\treturn next( {\n\t\t\t...options,\n\t\t\theaders: {\n\t\t\t\t...headers,\n\t\t\t\t'X-WP-Nonce': middleware.nonce,\n\t\t\t},\n\t\t} );\n\t};\n\n\tmiddleware.nonce = nonce;\n\n\treturn middleware;\n}\n\nexport default createNonceMiddleware;\n","/**\n * Internal dependencies\n */\nimport namespaceAndEndpointMiddleware from './namespace-endpoint';\n\n/**\n * @param {string} rootURL\n * @return {import('../types').APIFetchMiddleware} Root URL middleware.\n */\nconst createRootURLMiddleware = ( rootURL ) => ( options, next ) => {\n\treturn namespaceAndEndpointMiddleware( options, ( optionsWithPath ) => {\n\t\tlet url = optionsWithPath.url;\n\t\tlet path = optionsWithPath.path;\n\t\tlet apiRoot;\n\n\t\tif ( typeof path === 'string' ) {\n\t\t\tapiRoot = rootURL;\n\n\t\t\tif ( -1 !== rootURL.indexOf( '?' ) ) {\n\t\t\t\tpath = path.replace( '?', '&' );\n\t\t\t}\n\n\t\t\tpath = path.replace( /^\\//, '' );\n\n\t\t\t// API root may already include query parameter prefix if site is\n\t\t\t// configured to use plain permalinks.\n\t\t\tif (\n\t\t\t\t'string' === typeof apiRoot &&\n\t\t\t\t-1 !== apiRoot.indexOf( '?' )\n\t\t\t) {\n\t\t\t\tpath = path.replace( '?', '&' );\n\t\t\t}\n\n\t\t\turl = apiRoot + path;\n\t\t}\n\n\t\treturn next( {\n\t\t\t...optionsWithPath,\n\t\t\turl,\n\t\t} );\n\t} );\n};\n\nexport default createRootURLMiddleware;\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","window","options","next","namespaceTrimmed","endpointTrimmed","path","namespace","endpoint","replace","prepareResponse","responseData","parse","Promise","resolve","body","Response","JSON","stringify","status","statusText","headers","modifyQuery","queryArgs","url","addQueryArgs","parseResponse","response","json","reject","getNextPageUrl","linkHeader","match","parseLinkHeader","async","pathIsUnbounded","indexOf","urlIsUnbounded","requestContainsUnboundedQuery","apiFetch","per_page","results","Array","isArray","nextPage","mergedResults","concat","nextResponse","undefined","nextResults","OVERRIDE_METHODS","Set","DEFAULT_METHOD","shouldParseResponse","parseJsonAndNormalizeError","invalidJsonError","code","message","__","catch","parseResponseAndNormalizeError","res","parseAndThrowError","then","error","unknownError","DEFAULT_HEADERS","Accept","DEFAULT_OPTIONS","credentials","middlewares","hasQueryArg","_locale","namespaceEndpointMiddleware","method","has","toUpperCase","fetchAllMiddleware","checkStatus","fetchHandler","nextOptions","data","remainingOptions","fetch","location","href","value","err","name","reduceRight","middleware","workingOptions","enhancedHandler","nonceEndpoint","text","nonceMiddleware","nonce","use","unshift","setFetchHandler","newFetchHandler","createNonceMiddleware","headerName","toLowerCase","createPreloadingMiddleware","preloadedData","cache","fromEntries","entries","map","normalizePath","rawPath","rest_route","pathFromQuery","getQueryArgs","cacheData","createRootURLMiddleware","rootURL","namespaceAndEndpointMiddleware","optionsWithPath","apiRoot","mediaUploadMiddleware","isCreateMethod","isMediaUploadRequest","retries","postProcess","attachmentId","action"],"sourceRoot":""}
|
build/autop/index.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"file":"./build/autop/index.min.js","mappings":"mBACA,IAAIA,EAAsB,CCA1B,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3E,EAAwB,CAACM,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClF,EAAyBT,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,M,+CCAvD,MAAMC,EAyCE,IAAIC,OATV,4HAoDF,SAASC,EAAmBC,EAAUC,GAErC,MAAMC,EAlCP,SAAoBC,GACnB,MAAMC,EAAQ,GACd,IAEI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Q,YAAciD,EAAa,iBAAkB,KACzD,WAIW5B,QAAS,4BAA6B,YAGtCA,QAAS,yBAA0B,gBAGnCA,QAAS,WAAY,KACrBA,QAAS,gBAAiB,SAG1BA,QAAS,mBAAoB,SAG7BA,QAAS,uBAAuB,CAAEiC,EAAGC,IAC3CA,IAAoC,IAA3BA,EAAMnC,QAAS,MACrB,OAGD,QAIIC,QAAS,WAAY,WACrBA,QAAS,cAAe,aAGxBA,QACX,yCACA,iCAEWA,QAAS,2BAA4B,yBAGrCA,QACX,IAAIrB,OAAQ,YAAckD,EAAa,qBAAsB,KAC7D,WAEW7B,QACX,IAAIrB,OAAQ,UAAYkD,EAAa,SAAU,KAC/C,YAIW7B,QAAS,uBAAwB,YAGnCD,QAAS,aAElB2B,GADAA,EAAOA,EAAK1B,QAAS,cAAe,cACxBA,QAAS,iBAAkB,iBAIR,IAA3B0B,EAAK3B,QAAS,SAClB2B,EAAOA,EAAK1B,QAAS,uBAAwB,oBAIV,IAA/B0B,EAAK3B,QAAS,aAClB2B,EAAOA,EAAK1B,QAAS,8BAAgCqB,GAC7CA,EAAErB,QAAS,WAAY,OAYhC0B,GADAA,GAHAA,GAHAA,EAAOA,EAAK1B,QAAS,UAAW,WAGpBA,QAAS,+BAAgC,SAGzCA,QAAS,OAAQ,KACjBA,QAAS,eAAgB,IAEhC+B,IACJL,EAAOA,EAAK1B,QAAS,mBAAoB,OAGrCgC,IACJN,EAAOA,EAAK1B,QAAS,uBAAwB,WAIzC8B,EAASvC,SACbmC,EAAOA,EAAK1B,QAAS,kBAAkB,IACP8B,EAASK,WAInCT,GArIC,I","sources":["webpack://wp/webpack/bootstrap","webpack://wp/webpack/runtime/define property getters","webpack://wp/webpack/runtime/hasOwnProperty shorthand","webpack://wp/webpack/runtime/make namespace object","webpack://wp/./packages/autop/build-module/@wordpress/autop/src/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\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};","/**\n * The regular expression for an HTML element.\n *\n * @type {RegExp}\n */\nconst htmlSplitRegex = ( () => {\n\t/* eslint-disable no-multi-spaces */\n\tconst comments =\n\t\t'!' + // Start of comment, after the <.\n\t\t'(?:' + // Unroll the loop: Consume everything until --> is found.\n\t\t'-(?!->)' + // Dash not followed by end of comment.\n\t\t'[^\\\\-]*' + // Consume non-dashes.\n\t\t')*' + // Loop possessively.\n\t\t'(?:-->)?'; // End of comment. If not found, match all input.\n\n\tconst cdata =\n\t\t'!\\\\[CDATA\\\\[' + // Start of comment, after the <.\n\t\t'[^\\\\]]*' + // Consume non-].\n\t\t'(?:' + // Unroll the loop: Consume everything until ]]> is found.\n\t\t'](?!]>)' + // One ] not followed by end of comment.\n\t\t'[^\\\\]]*' + // Consume non-].\n\t\t')*?' + // Loop possessively.\n\t\t'(?:]]>)?'; // End of comment. If not found, match all input.\n\n\tconst escaped =\n\t\t'(?=' + // Is the element escaped?\n\t\t'!--' +\n\t\t'|' +\n\t\t'!\\\\[CDATA\\\\[' +\n\t\t')' +\n\t\t'((?=!-)' + // If yes, which type?\n\t\tcomments +\n\t\t'|' +\n\t\tcdata +\n\t\t')';\n\n\tconst regex =\n\t\t'(' + // Capture the entire match.\n\t\t'<' + // Find start of element.\n\t\t'(' + // Conditional expression follows.\n\t\tescaped + // Find end of escaped element.\n\t\t'|' + // ... else ...\n\t\t'[^>]*>?' + // Find end of normal element.\n\t\t')' +\n\t\t')';\n\n\treturn new RegExp( regex );\n\t/* eslint-enable no-multi-spaces */\n} )();\n\n/**\n * Separate HTML elements and comments from the text.\n *\n * @param {string} input The text which has to be formatted.\n *\n * @return {string[]} The formatted text.\n */\nfunction htmlSplit( input ) {\n\tconst parts = [];\n\tlet workingInput = input;\n\n\tlet match;\n\twhile ( ( match = workingInput.match( htmlSplitRegex ) ) ) {\n\t\t// The `match` result, when invoked on a RegExp with the `g` flag (`/foo/g`) will not include `index`.\n\t\t// If the `g` flag is omitted, `index` is included.\n\t\t// `htmlSplitRegex` does not have the `g` flag so we can assert it will have an index number.\n\t\t// Assert `match.index` is a number.\n\t\tconst index = /** @type {number} */ ( match.index );\n\n\t\tparts.push( workingInput.slice( 0, index ) );\n\t\tparts.push( match[ 0 ] );\n\t\tworkingInput = workingInput.slice( index + match[ 0 ].length );\n\t}\n\n\tif ( workingInput.length ) {\n\t\tparts.push( workingInput );\n\t}\n\n\treturn parts;\n}\n\n/**\n * Replace characters or phrases within HTML elements only.\n *\n * @param {string} haystack The text which has to be formatted.\n * @param {Record<string,string>} replacePairs In the form {from: 'to', …}.\n *\n * @return {string} The formatted text.\n */\nfunction replaceInHtmlTags( haystack, replacePairs ) {\n\t// Find all elements.\n\tconst textArr = htmlSplit( haystack );\n\tlet changed = false;\n\n\t// Extract all needles.\n\tconst needles = Object.keys( replacePairs );\n\n\t// Loop through delimiters (elements) only.\n\tfor ( let i = 1; i < textArr.length; i += 2 ) {\n\t\tfor ( let j = 0; j < needles.length; j++ ) {\n\t\t\tconst needle = needles[ j ];\n\t\t\tif ( -1 !== textArr[ i ].indexOf( needle ) ) {\n\t\t\t\ttextArr[ i ] = textArr[ i ].replace(\n\t\t\t\t\tnew RegExp( needle, 'g' ),\n\t\t\t\t\treplacePairs[ needle ]\n\t\t\t\t);\n\t\t\t\tchanged = true;\n\t\t\t\t// After one strtr() break out of the foreach loop and look at next element.\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( changed ) {\n\t\thaystack = textArr.join( '' );\n\t}\n\n\treturn haystack;\n}\n\n/**\n * Replaces double line-breaks with paragraph elements.\n *\n * A group of regex replaces used to identify text formatted with newlines and\n * replace double line-breaks with HTML paragraph tags. The remaining line-\n * breaks after conversion become `<br />` tags, unless br is set to 'false'.\n *\n * @param {string} text The text which has to be formatted.\n * @param {boolean} br Optional. If set, will convert all remaining line-\n * breaks after paragraphing. Default true.\n *\n * @example\n *```js\n * import { autop } from '@wordpress/autop';\n * autop( 'my text' ); // \"<p>my text</p>\"\n * ```\n *\n * @return {string} Text which has been converted into paragraph tags.\n */\nexport function autop( text, br = true ) {\n\tconst preTags = [];\n\n\tif ( text.trim() === '' ) {\n\t\treturn '';\n\t}\n\n\t// Just to make things a little easier, pad the end.\n\ttext = text + '\\n';\n\n\t/*\n\t * Pre tags shouldn't be touched by autop.\n\t * Replace pre tags with placeholders and bring them back after autop.\n\t */\n\tif ( text.indexOf( '<pre' ) !== -1 ) {\n\t\tconst textParts = text.split( '</pre>' );\n\t\tconst lastText = textParts.pop();\n\t\ttext = '';\n\n\t\tfor ( let i = 0; i < textParts.length; i++ ) {\n\t\t\tconst textPart = textParts[ i ];\n\t\t\tconst start = textPart.indexOf( '<pre' );\n\n\t\t\t// Malformed html?\n\t\t\tif ( start === -1 ) {\n\t\t\t\ttext += textPart;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst name = '<pre wp-pre-tag-' + i + '></pre>';\n\t\t\tpreTags.push( [ name, textPart.substr( start ) + '</pre>' ] );\n\n\t\t\ttext += textPart.substr( 0, start ) + name;\n\t\t}\n\n\t\ttext += lastText;\n\t}\n\t// Change multiple <br>s into two line breaks, which will turn into paragraphs.\n\ttext = text.replace( /<br\\s*\\/?>\\s*<br\\s*\\/?>/g, '\\n\\n' );\n\n\tconst allBlocks =\n\t\t'(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)';\n\n\t// Add a double line break above block-level opening tags.\n\ttext = text.replace(\n\t\tnew RegExp( '(<' + allBlocks + '[\\\\s/>])', 'g' ),\n\t\t'\\n\\n$1'\n\t);\n\n\t// Add a double line break below block-level closing tags.\n\ttext = text.replace(\n\t\tnew RegExp( '(</' + allBlocks + '>)', 'g' ),\n\t\t'$1\\n\\n'\n\t);\n\n\t// Standardize newline characters to \"\\n\".\n\ttext = text.replace( /\\r\\n|\\r/g, '\\n' );\n\n\t// Find newlines in all elements and add placeholders.\n\ttext = replaceInHtmlTags( text, { '\\n': ' <!-- wpnl --> ' } );\n\n\t// Collapse line breaks before and after <option> elements so they don't get autop'd.\n\tif ( text.indexOf( '<option' ) !== -1 ) {\n\t\ttext = text.replace( /\\s*<option/g, '<option' );\n\t\ttext = text.replace( /<\\/option>\\s*/g, '</option>' );\n\t}\n\n\t/*\n\t * Collapse line breaks inside <object> elements, before <param> and <embed> elements\n\t * so they don't get autop'd.\n\t */\n\tif ( text.indexOf( '</object>' ) !== -1 ) {\n\t\ttext = text.replace( /(<object[^>]*>)\\s*/g, '$1' );\n\t\ttext = text.replace( /\\s*<\\/object>/g, '</object>' );\n\t\ttext = text.replace( /\\s*(<\\/?(?:param|embed)[^>]*>)\\s*/g, '$1' );\n\t}\n\n\t/*\n\t * Collapse line breaks inside <audio> and <video> elements,\n\t * before and after <source> and <track> elements.\n\t */\n\tif ( text.indexOf( '<source' ) !== -1 || text.indexOf( '<track' ) !== -1 ) {\n\t\ttext = text.replace( /([<\\[](?:audio|video)[^>\\]]*[>\\]])\\s*/g, '$1' );\n\t\ttext = text.replace( /\\s*([<\\[]\\/(?:audio|video)[>\\]])/g, '$1' );\n\t\ttext = text.replace( /\\s*(<(?:source|track)[^>]*>)\\s*/g, '$1' );\n\t}\n\n\t// Collapse line breaks before and after <figcaption> elements.\n\tif ( text.indexOf( '<figcaption' ) !== -1 ) {\n\t\ttext = text.replace( /\\s*(<figcaption[^>]*>)/, '$1' );\n\t\ttext = text.replace( /<\\/figcaption>\\s*/, '</figcaption>' );\n\t}\n\n\t// Remove more than two contiguous line breaks.\n\ttext = text.replace( /\\n\\n+/g, '\\n\\n' );\n\n\t// Split up the contents into an array of strings, separated by double line breaks.\n\tconst texts = text.split( /\\n\\s*\\n/ ).filter( Boolean );\n\n\t// Reset text prior to rebuilding.\n\ttext = '';\n\n\t// Rebuild the content as a string, wrapping every bit with a <p>.\n\ttexts.forEach( ( textPiece ) => {\n\t\ttext += '<p>' + textPiece.replace( /^\\n*|\\n*$/g, '' ) + '</p>\\n';\n\t} );\n\n\t// Under certain strange conditions it could create a P of entirely whitespace.\n\ttext = text.replace( /<p>\\s*<\\/p>/g, '' );\n\n\t// Add a closing <p> inside <div>, <address>, or <form> tag if missing.\n\ttext = text.replace(\n\t\t/<p>([^<]+)<\\/(div|address|form)>/g,\n\t\t'<p>$1</p></$2>'\n\t);\n\n\t// If an opening or closing block element tag is wrapped in a <p>, unwrap it.\n\ttext = text.replace(\n\t\tnew RegExp( '<p>\\\\s*(</?' + allBlocks + '[^>]*>)\\\\s*</p>', 'g' ),\n\t\t'$1'\n\t);\n\n\t// In some cases <li> may get wrapped in <p>, fix them.\n\ttext = text.replace( /<p>(<li.+?)<\\/p>/g, '$1' );\n\n\t// If a <blockquote> is wrapped with a <p>, move it inside the <blockquote>.\n\ttext = text.replace( /<p><blockquote([^>]*)>/gi, '<blockquote$1><p>' );\n\ttext = text.replace( /<\\/blockquote><\\/p>/g, '</p></blockquote>' );\n\n\t// If an opening or closing block element tag is preceded by an opening <p> tag, remove it.\n\ttext = text.replace(\n\t\tnew RegExp( '<p>\\\\s*(</?' + allBlocks + '[^>]*>)', 'g' ),\n\t\t'$1'\n\t);\n\n\t// If an opening or closing block element tag is followed by a closing <p> tag, remove it.\n\ttext = text.replace(\n\t\tnew RegExp( '(</?' + allBlocks + '[^>]*>)\\\\s*</p>', 'g' ),\n\t\t'$1'\n\t);\n\n\t// Optionally insert line breaks.\n\tif ( br ) {\n\t\t// Replace newlines that shouldn't be touched with a placeholder.\n\t\ttext = text.replace( /<(script|style).*?<\\/\\\\1>/g, ( match ) =>\n\t\t\tmatch[ 0 ].replace( /\\n/g, '<WPPreserveNewline />' )\n\t\t);\n\n\t\t// Normalize <br>\n\t\ttext = text.replace( /<br>|<br\\/>/g, '<br />' );\n\n\t\t// Replace any new line characters that aren't preceded by a <br /> with a <br />.\n\t\ttext = text.replace( /(<br \\/>)?\\s*\\n/g, ( a, b ) =>\n\t\t\tb ? a : '<br />\\n'\n\t\t);\n\n\t\t// Replace newline placeholders with newlines.\n\t\ttext = text.replace( /<WPPreserveNewline \\/>/g, '\\n' );\n\t}\n\n\t// If a <br /> tag is after an opening or closing block tag, remove it.\n\ttext = text.replace(\n\t\tnew RegExp( '(</?' + allBlocks + '[^>]*>)\\\\s*<br />', 'g' ),\n\t\t'$1'\n\t);\n\n\t// If a <br /> tag is before a subset of opening or closing block tags, remove it.\n\ttext = text.replace(\n\t\t/<br \\/>(\\s*<\\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g,\n\t\t'$1'\n\t);\n\ttext = text.replace( /\\n<\\/p>$/g, '</p>' );\n\n\t// Replace placeholder <pre> tags with their original content.\n\tpreTags.forEach( ( preTag ) => {\n\t\tconst [ name, original ] = preTag;\n\t\ttext = text.replace( name, original );\n\t} );\n\n\t// Restore newlines in all elements.\n\tif ( -1 !== text.indexOf( '<!-- wpnl -->' ) ) {\n\t\ttext = text.replace( /\\s?<!-- wpnl -->\\s?/g, '\\n' );\n\t}\n\n\treturn text;\n}\n\n/**\n * Replaces `<p>` tags with two line breaks. \"Opposite\" of autop().\n *\n * Replaces `<p>` tags with two line breaks except where the `<p>` has attributes.\n * Unifies whitespace. Indents `<li>`, `<dt>` and `<dd>` for better readability.\n *\n * @param {string} html The content from the editor.\n *\n * @example\n * ```js\n * import { removep } from '@wordpress/autop';\n * removep( '<p>my text</p>' ); // \"my text\"\n * ```\n *\n * @return {string} The content with stripped paragraph tags.\n */\nexport function removep( html ) {\n\tconst blocklist =\n\t\t'blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset|figure';\n\tconst blocklist1 = blocklist + '|div|p';\n\tconst blocklist2 = blocklist + '|pre';\n\t/** @type {string[]} */\n\tconst preserve = [];\n\tlet preserveLinebreaks = false;\n\tlet preserveBr = false;\n\n\tif ( ! html ) {\n\t\treturn '';\n\t}\n\n\t// Protect script and style tags.\n\tif ( html.indexOf( '<script' ) !== -1 || html.indexOf( '<style' ) !== -1 ) {\n\t\thtml = html.replace(\n\t\t\t/<(script|style)[^>]*>[\\s\\S]*?<\\/\\1>/g,\n\t\t\t( match ) => {\n\t\t\t\tpreserve.push( match );\n\t\t\t\treturn '<wp-preserve>';\n\t\t\t}\n\t\t);\n\t}\n\n\t// Protect pre tags.\n\tif ( html.indexOf( '<pre' ) !== -1 ) {\n\t\tpreserveLinebreaks = true;\n\t\thtml = html.replace( /<pre[^>]*>[\\s\\S]+?<\\/pre>/g, ( a ) => {\n\t\t\ta = a.replace( /<br ?\\/?>(\\r\\n|\\n)?/g, '<wp-line-break>' );\n\t\t\ta = a.replace( /<\\/?p( [^>]*)?>(\\r\\n|\\n)?/g, '<wp-line-break>' );\n\t\t\treturn a.replace( /\\r?\\n/g, '<wp-line-break>' );\n\t\t} );\n\t}\n\n\t// Remove line breaks but keep <br> tags inside image captions.\n\tif ( html.indexOf( '[caption' ) !== -1 ) {\n\t\tpreserveBr = true;\n\t\thtml = html.replace( /\\[caption[\\s\\S]+?\\[\\/caption\\]/g, ( a ) => {\n\t\t\treturn a\n\t\t\t\t.replace( /<br([^>]*)>/g, '<wp-temp-br$1>' )\n\t\t\t\t.replace( /[\\r\\n\\t]+/, '' );\n\t\t} );\n\t}\n\n\t// Normalize white space characters before and after block tags.\n\thtml = html.replace(\n\t\tnew RegExp( '\\\\s*</(' + blocklist1 + ')>\\\\s*', 'g' ),\n\t\t'</$1>\\n'\n\t);\n\thtml = html.replace(\n\t\tnew RegExp( '\\\\s*<((?:' + blocklist1 + ')(?: [^>]*)?)>', 'g' ),\n\t\t'\\n<$1>'\n\t);\n\n\t// Mark </p> if it has any attributes.\n\thtml = html.replace( /(<p [^>]+>[\\s\\S]*?)<\\/p>/g, '$1</p#>' );\n\n\t// Preserve the first <p> inside a <div>.\n\thtml = html.replace( /<div( [^>]*)?>\\s*<p>/gi, '<div$1>\\n\\n' );\n\n\t// Remove paragraph tags.\n\thtml = html.replace( /\\s*<p>/gi, '' );\n\thtml = html.replace( /\\s*<\\/p>\\s*/gi, '\\n\\n' );\n\n\t// Normalize white space chars and remove multiple line breaks.\n\thtml = html.replace( /\\n[\\s\\u00a0]+\\n/g, '\\n\\n' );\n\n\t// Replace <br> tags with line breaks.\n\thtml = html.replace( /(\\s*)<br ?\\/?>\\s*/gi, ( _, space ) => {\n\t\tif ( space && space.indexOf( '\\n' ) !== -1 ) {\n\t\t\treturn '\\n\\n';\n\t\t}\n\n\t\treturn '\\n';\n\t} );\n\n\t// Fix line breaks around <div>.\n\thtml = html.replace( /\\s*<div/g, '\\n<div' );\n\thtml = html.replace( /<\\/div>\\s*/g, '</div>\\n' );\n\n\t// Fix line breaks around caption shortcodes.\n\thtml = html.replace(\n\t\t/\\s*\\[caption([^\\[]+)\\[\\/caption\\]\\s*/gi,\n\t\t'\\n\\n[caption$1[/caption]\\n\\n'\n\t);\n\thtml = html.replace( /caption\\]\\n\\n+\\[caption/g, 'caption]\\n\\n[caption' );\n\n\t// Pad block elements tags with a line break.\n\thtml = html.replace(\n\t\tnew RegExp( '\\\\s*<((?:' + blocklist2 + ')(?: [^>]*)?)\\\\s*>', 'g' ),\n\t\t'\\n<$1>'\n\t);\n\thtml = html.replace(\n\t\tnew RegExp( '\\\\s*</(' + blocklist2 + ')>\\\\s*', 'g' ),\n\t\t'</$1>\\n'\n\t);\n\n\t// Indent <li>, <dt> and <dd> tags.\n\thtml = html.replace( /<((li|dt|dd)[^>]*)>/g, ' \\t<$1>' );\n\n\t// Fix line breaks around <select> and <option>.\n\tif ( html.indexOf( '<option' ) !== -1 ) {\n\t\thtml = html.replace( /\\s*<option/g, '\\n<option' );\n\t\thtml = html.replace( /\\s*<\\/select>/g, '\\n</select>' );\n\t}\n\n\t// Pad <hr> with two line breaks.\n\tif ( html.indexOf( '<hr' ) !== -1 ) {\n\t\thtml = html.replace( /\\s*<hr( [^>]*)?>\\s*/g, '\\n\\n<hr$1>\\n\\n' );\n\t}\n\n\t// Remove line breaks in <object> tags.\n\tif ( html.indexOf( '<object' ) !== -1 ) {\n\t\thtml = html.replace( /<object[\\s\\S]+?<\\/object>/g, ( a ) => {\n\t\t\treturn a.replace( /[\\r\\n]+/g, '' );\n\t\t} );\n\t}\n\n\t// Unmark special paragraph closing tags.\n\thtml = html.replace( /<\\/p#>/g, '</p>\\n' );\n\n\t// Pad remaining <p> tags whit a line break.\n\thtml = html.replace( /\\s*(<p [^>]+>[\\s\\S]*?<\\/p>)/g, '\\n$1' );\n\n\t// Trim.\n\thtml = html.replace( /^\\s+/, '' );\n\thtml = html.replace( /[\\s\\u00a0]+$/, '' );\n\n\tif ( preserveLinebreaks ) {\n\t\thtml = html.replace( /<wp-line-break>/g, '\\n' );\n\t}\n\n\tif ( preserveBr ) {\n\t\thtml = html.replace( /<wp-temp-br([^>]*)>/g, '<br$1>' );\n\t}\n\n\t// Restore preserved tags.\n\tif ( preserve.length ) {\n\t\thtml = html.replace( /<wp-preserve>/g, () => {\n\t\t\treturn /** @type {string} */ ( preserve.shift() );\n\t\t} );\n\t}\n\n\treturn html;\n}\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","htmlSplitRegex","RegExp","replaceInHtmlTags","haystack","replacePairs","textArr","input","parts","match","workingInput","index","push","slice","length","htmlSplit","changed","needles","keys","i","j","needle","indexOf","replace","join","autop","text","br","preTags","trim","textParts","split","lastText","pop","textPart","start","name","substr","allBlocks","texts","filter","Boolean","forEach","textPiece","a","b","preTag","original","removep","html","blocklist","blocklist1","blocklist2","preserve","preserveLinebreaks","preserveBr","_","space","shift"],"sourceRoot":""}
|
1 |
+
{"version":3,"file":"./build/autop/index.min.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDH,EAAwB,CAACS,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFV,EAAyBC,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,+CCA9D,MAAMC,EAyCE,IAAIC,OATV,4HAoDF,SAASC,EAAmBC,EAAUC,GAErC,MAAMC,EAlCP,SAAoBC,GACnB,MAAMC,EAAQ,GACd,IAEIC,EAFAC,EAAeH,EAGnB,KAAUE,EAAQC,EAAaD,MAAOR,IAAqB,CAK1D,MAAMU,EAAgCF,EAAME,MAE5CH,EAAMI,KAAMF,EAAaG,MAAO,EAAGF,IACnCH,EAAMI,KAAMH,EAAO,IACnBC,EAAeA,EAAaG,MAAOF,EAAQF,EAAO,GAAIK,OACtD,CAMD,OAJKJ,EAAaI,QACjBN,EAAMI,KAAMF,GAGNF,CACP,CAYgBO,CAAWX,GAC3B,IAAIY,GAAU,EAGd,MAAMC,EAAU5B,OAAO6B,KAAMb,GAG7B,IAAM,IAAIc,EAAI,EAAGA,EAAIb,EAAQQ,OAAQK,GAAK,EACzC,IAAM,IAAIC,EAAI,EAAGA,EAAIH,EAAQH,OAAQM,IA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D,EAAa,SAAU,KAC/C,YAIW7B,QAAS,uBAAwB,YAGnCD,QAAS,aAElB2B,GADAA,EAAOA,EAAK1B,QAAS,cAAe,cACxBA,QAAS,iBAAkB,iBAIR,IAA3B0B,EAAK3B,QAAS,SAClB2B,EAAOA,EAAK1B,QAAS,uBAAwB,oBAIV,IAA/B0B,EAAK3B,QAAS,aAClB2B,EAAOA,EAAK1B,QAAS,8BAAgCqB,GAC7CA,EAAErB,QAAS,WAAY,OAYhC0B,GADAA,GAHAA,GAHAA,EAAOA,EAAK1B,QAAS,UAAW,WAGpBA,QAAS,+BAAgC,SAGzCA,QAAS,OAAQ,KACjBA,QAAS,eAAgB,IAEhC+B,IACJL,EAAOA,EAAK1B,QAAS,mBAAoB,OAGrCgC,IACJN,EAAOA,EAAK1B,QAAS,uBAAwB,WAIzC8B,EAASvC,SACbmC,EAAOA,EAAK1B,QAAS,kBAAkB,IACP8B,EAASK,WAInCT,GArIC,EAsIR,E","sources":["webpack://wp/webpack/bootstrap","webpack://wp/webpack/runtime/define property getters","webpack://wp/webpack/runtime/hasOwnProperty shorthand","webpack://wp/webpack/runtime/make namespace object","webpack://wp/./packages/autop/build-module/@wordpress/autop/src/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\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};","/**\n * The regular expression for an HTML element.\n *\n * @type {RegExp}\n */\nconst htmlSplitRegex = ( () => {\n\t/* eslint-disable no-multi-spaces */\n\tconst comments =\n\t\t'!' + // Start of comment, after the <.\n\t\t'(?:' + // Unroll the loop: Consume everything until --> is found.\n\t\t'-(?!->)' + // Dash not followed by end of comment.\n\t\t'[^\\\\-]*' + // Consume non-dashes.\n\t\t')*' + // Loop possessively.\n\t\t'(?:-->)?'; // End of comment. If not found, match all input.\n\n\tconst cdata =\n\t\t'!\\\\[CDATA\\\\[' + // Start of comment, after the <.\n\t\t'[^\\\\]]*' + // Consume non-].\n\t\t'(?:' + // Unroll the loop: Consume everything until ]]> is found.\n\t\t'](?!]>)' + // One ] not followed by end of comment.\n\t\t'[^\\\\]]*' + // Consume non-].\n\t\t')*?' + // Loop possessively.\n\t\t'(?:]]>)?'; // End of comment. If not found, match all input.\n\n\tconst escaped =\n\t\t'(?=' + // Is the element escaped?\n\t\t'!--' +\n\t\t'|' +\n\t\t'!\\\\[CDATA\\\\[' +\n\t\t')' +\n\t\t'((?=!-)' + // If yes, which type?\n\t\tcomments +\n\t\t'|' +\n\t\tcdata +\n\t\t')';\n\n\tconst regex =\n\t\t'(' + // Capture the entire match.\n\t\t'<' + // Find start of element.\n\t\t'(' + // Conditional expression follows.\n\t\tescaped + // Find end of escaped element.\n\t\t'|' + // ... else ...\n\t\t'[^>]*>?' + // Find end of normal element.\n\t\t')' +\n\t\t')';\n\n\treturn new RegExp( regex );\n\t/* eslint-enable no-multi-spaces */\n} )();\n\n/**\n * Separate HTML elements and comments from the text.\n *\n * @param {string} input The text which has to be formatted.\n *\n * @return {string[]} The formatted text.\n */\nfunction htmlSplit( input ) {\n\tconst parts = [];\n\tlet workingInput = input;\n\n\tlet match;\n\twhile ( ( match = workingInput.match( htmlSplitRegex ) ) ) {\n\t\t// The `match` result, when invoked on a RegExp with the `g` flag (`/foo/g`) will not include `index`.\n\t\t// If the `g` flag is omitted, `index` is included.\n\t\t// `htmlSplitRegex` does not have the `g` flag so we can assert it will have an index number.\n\t\t// Assert `match.index` is a number.\n\t\tconst index = /** @type {number} */ ( match.index );\n\n\t\tparts.push( workingInput.slice( 0, index ) );\n\t\tparts.push( match[ 0 ] );\n\t\tworkingInput = workingInput.slice( index + match[ 0 ].length );\n\t}\n\n\tif ( workingInput.length ) {\n\t\tparts.push( workingInput );\n\t}\n\n\treturn parts;\n}\n\n/**\n * Replace characters or phrases within HTML elements only.\n *\n * @param {string} haystack The text which has to be formatted.\n * @param {Record<string,string>} replacePairs In the form {from: 'to', …}.\n *\n * @return {string} The formatted text.\n */\nfunction replaceInHtmlTags( haystack, replacePairs ) {\n\t// Find all elements.\n\tconst textArr = htmlSplit( haystack );\n\tlet changed = false;\n\n\t// Extract all needles.\n\tconst needles = Object.keys( replacePairs );\n\n\t// Loop through delimiters (elements) only.\n\tfor ( let i = 1; i < textArr.length; i += 2 ) {\n\t\tfor ( let j = 0; j < needles.length; j++ ) {\n\t\t\tconst needle = needles[ j ];\n\t\t\tif ( -1 !== textArr[ i ].indexOf( needle ) ) {\n\t\t\t\ttextArr[ i ] = textArr[ i ].replace(\n\t\t\t\t\tnew RegExp( needle, 'g' ),\n\t\t\t\t\treplacePairs[ needle ]\n\t\t\t\t);\n\t\t\t\tchanged = true;\n\t\t\t\t// After one strtr() break out of the foreach loop and look at next element.\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( changed ) {\n\t\thaystack = textArr.join( '' );\n\t}\n\n\treturn haystack;\n}\n\n/**\n * Replaces double line-breaks with paragraph elements.\n *\n * A group of regex replaces used to identify text formatted with newlines and\n * replace double line-breaks with HTML paragraph tags. The remaining line-\n * breaks after conversion become `<br />` tags, unless br is set to 'false'.\n *\n * @param {string} text The text which has to be formatted.\n * @param {boolean} br Optional. If set, will convert all remaining line-\n * breaks after paragraphing. Default true.\n *\n * @example\n *```js\n * import { autop } from '@wordpress/autop';\n * autop( 'my text' ); // \"<p>my text</p>\"\n * ```\n *\n * @return {string} Text which has been converted into paragraph tags.\n */\nexport function autop( text, br = true ) {\n\tconst preTags = [];\n\n\tif ( text.trim() === '' ) {\n\t\treturn '';\n\t}\n\n\t// Just to make things a little easier, pad the end.\n\ttext = text + '\\n';\n\n\t/*\n\t * Pre tags shouldn't be touched by autop.\n\t * Replace pre tags with placeholders and bring them back after autop.\n\t */\n\tif ( text.indexOf( '<pre' ) !== -1 ) {\n\t\tconst textParts = text.split( '</pre>' );\n\t\tconst lastText = textParts.pop();\n\t\ttext = '';\n\n\t\tfor ( let i = 0; i < textParts.length; i++ ) {\n\t\t\tconst textPart = textParts[ i ];\n\t\t\tconst start = textPart.indexOf( '<pre' );\n\n\t\t\t// Malformed html?\n\t\t\tif ( start === -1 ) {\n\t\t\t\ttext += textPart;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst name = '<pre wp-pre-tag-' + i + '></pre>';\n\t\t\tpreTags.push( [ name, textPart.substr( start ) + '</pre>' ] );\n\n\t\t\ttext += textPart.substr( 0, start ) + name;\n\t\t}\n\n\t\ttext += lastText;\n\t}\n\t// Change multiple <br>s into two line breaks, which will turn into paragraphs.\n\ttext = text.replace( /<br\\s*\\/?>\\s*<br\\s*\\/?>/g, '\\n\\n' );\n\n\tconst allBlocks =\n\t\t'(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)';\n\n\t// Add a double line break above block-level opening tags.\n\ttext = text.replace(\n\t\tnew RegExp( '(<' + allBlocks + '[\\\\s/>])', 'g' ),\n\t\t'\\n\\n$1'\n\t);\n\n\t// Add a double line break below block-level closing tags.\n\ttext = text.replace(\n\t\tnew RegExp( '(</' + allBlocks + '>)', 'g' ),\n\t\t'$1\\n\\n'\n\t);\n\n\t// Standardize newline characters to \"\\n\".\n\ttext = text.replace( /\\r\\n|\\r/g, '\\n' );\n\n\t// Find newlines in all elements and add placeholders.\n\ttext = replaceInHtmlTags( text, { '\\n': ' <!-- wpnl --> ' } );\n\n\t// Collapse line breaks before and after <option> elements so they don't get autop'd.\n\tif ( text.indexOf( '<option' ) !== -1 ) {\n\t\ttext = text.replace( /\\s*<option/g, '<option' );\n\t\ttext = text.replace( /<\\/option>\\s*/g, '</option>' );\n\t}\n\n\t/*\n\t * Collapse line breaks inside <object> elements, before <param> and <embed> elements\n\t * so they don't get autop'd.\n\t */\n\tif ( text.indexOf( '</object>' ) !== -1 ) {\n\t\ttext = text.replace( /(<object[^>]*>)\\s*/g, '$1' );\n\t\ttext = text.replace( /\\s*<\\/object>/g, '</object>' );\n\t\ttext = text.replace( /\\s*(<\\/?(?:param|embed)[^>]*>)\\s*/g, '$1' );\n\t}\n\n\t/*\n\t * Collapse line breaks inside <audio> and <video> elements,\n\t * before and after <source> and <track> elements.\n\t */\n\tif ( text.indexOf( '<source' ) !== -1 || text.indexOf( '<track' ) !== -1 ) {\n\t\ttext = text.replace( /([<\\[](?:audio|video)[^>\\]]*[>\\]])\\s*/g, '$1' );\n\t\ttext = text.replace( /\\s*([<\\[]\\/(?:audio|video)[>\\]])/g, '$1' );\n\t\ttext = text.replace( /\\s*(<(?:source|track)[^>]*>)\\s*/g, '$1' );\n\t}\n\n\t// Collapse line breaks before and after <figcaption> elements.\n\tif ( text.indexOf( '<figcaption' ) !== -1 ) {\n\t\ttext = text.replace( /\\s*(<figcaption[^>]*>)/, '$1' );\n\t\ttext = text.replace( /<\\/figcaption>\\s*/, '</figcaption>' );\n\t}\n\n\t// Remove more than two contiguous line breaks.\n\ttext = text.replace( /\\n\\n+/g, '\\n\\n' );\n\n\t// Split up the contents into an array of strings, separated by double line breaks.\n\tconst texts = text.split( /\\n\\s*\\n/ ).filter( Boolean );\n\n\t// Reset text prior to rebuilding.\n\ttext = '';\n\n\t// Rebuild the content as a string, wrapping every bit with a <p>.\n\ttexts.forEach( ( textPiece ) => {\n\t\ttext += '<p>' + textPiece.replace( /^\\n*|\\n*$/g, '' ) + '</p>\\n';\n\t} );\n\n\t// Under certain strange conditions it could create a P of entirely whitespace.\n\ttext = text.replace( /<p>\\s*<\\/p>/g, '' );\n\n\t// Add a closing <p> inside <div>, <address>, or <form> tag if missing.\n\ttext = text.replace(\n\t\t/<p>([^<]+)<\\/(div|address|form)>/g,\n\t\t'<p>$1</p></$2>'\n\t);\n\n\t// If an opening or closing block element tag is wrapped in a <p>, unwrap it.\n\ttext = text.replace(\n\t\tnew RegExp( '<p>\\\\s*(</?' + allBlocks + '[^>]*>)\\\\s*</p>', 'g' ),\n\t\t'$1'\n\t);\n\n\t// In some cases <li> may get wrapped in <p>, fix them.\n\ttext = text.replace( /<p>(<li.+?)<\\/p>/g, '$1' );\n\n\t// If a <blockquote> is wrapped with a <p>, move it inside the <blockquote>.\n\ttext = text.replace( /<p><blockquote([^>]*)>/gi, '<blockquote$1><p>' );\n\ttext = text.replace( /<\\/blockquote><\\/p>/g, '</p></blockquote>' );\n\n\t// If an opening or closing block element tag is preceded by an opening <p> tag, remove it.\n\ttext = text.replace(\n\t\tnew RegExp( '<p>\\\\s*(</?' + allBlocks + '[^>]*>)', 'g' ),\n\t\t'$1'\n\t);\n\n\t// If an opening or closing block element tag is followed by a closing <p> tag, remove it.\n\ttext = text.replace(\n\t\tnew RegExp( '(</?' + allBlocks + '[^>]*>)\\\\s*</p>', 'g' ),\n\t\t'$1'\n\t);\n\n\t// Optionally insert line breaks.\n\tif ( br ) {\n\t\t// Replace newlines that shouldn't be touched with a placeholder.\n\t\ttext = text.replace( /<(script|style).*?<\\/\\\\1>/g, ( match ) =>\n\t\t\tmatch[ 0 ].replace( /\\n/g, '<WPPreserveNewline />' )\n\t\t);\n\n\t\t// Normalize <br>\n\t\ttext = text.replace( /<br>|<br\\/>/g, '<br />' );\n\n\t\t// Replace any new line characters that aren't preceded by a <br /> with a <br />.\n\t\ttext = text.replace( /(<br \\/>)?\\s*\\n/g, ( a, b ) =>\n\t\t\tb ? a : '<br />\\n'\n\t\t);\n\n\t\t// Replace newline placeholders with newlines.\n\t\ttext = text.replace( /<WPPreserveNewline \\/>/g, '\\n' );\n\t}\n\n\t// If a <br /> tag is after an opening or closing block tag, remove it.\n\ttext = text.replace(\n\t\tnew RegExp( '(</?' + allBlocks + '[^>]*>)\\\\s*<br />', 'g' ),\n\t\t'$1'\n\t);\n\n\t// If a <br /> tag is before a subset of opening or closing block tags, remove it.\n\ttext = text.replace(\n\t\t/<br \\/>(\\s*<\\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g,\n\t\t'$1'\n\t);\n\ttext = text.replace( /\\n<\\/p>$/g, '</p>' );\n\n\t// Replace placeholder <pre> tags with their original content.\n\tpreTags.forEach( ( preTag ) => {\n\t\tconst [ name, original ] = preTag;\n\t\ttext = text.replace( name, original );\n\t} );\n\n\t// Restore newlines in all elements.\n\tif ( -1 !== text.indexOf( '<!-- wpnl -->' ) ) {\n\t\ttext = text.replace( /\\s?<!-- wpnl -->\\s?/g, '\\n' );\n\t}\n\n\treturn text;\n}\n\n/**\n * Replaces `<p>` tags with two line breaks. \"Opposite\" of autop().\n *\n * Replaces `<p>` tags with two line breaks except where the `<p>` has attributes.\n * Unifies whitespace. Indents `<li>`, `<dt>` and `<dd>` for better readability.\n *\n * @param {string} html The content from the editor.\n *\n * @example\n * ```js\n * import { removep } from '@wordpress/autop';\n * removep( '<p>my text</p>' ); // \"my text\"\n * ```\n *\n * @return {string} The content with stripped paragraph tags.\n */\nexport function removep( html ) {\n\tconst blocklist =\n\t\t'blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset|figure';\n\tconst blocklist1 = blocklist + '|div|p';\n\tconst blocklist2 = blocklist + '|pre';\n\t/** @type {string[]} */\n\tconst preserve = [];\n\tlet preserveLinebreaks = false;\n\tlet preserveBr = false;\n\n\tif ( ! html ) {\n\t\treturn '';\n\t}\n\n\t// Protect script and style tags.\n\tif ( html.indexOf( '<script' ) !== -1 || html.indexOf( '<style' ) !== -1 ) {\n\t\thtml = html.replace(\n\t\t\t/<(script|style)[^>]*>[\\s\\S]*?<\\/\\1>/g,\n\t\t\t( match ) => {\n\t\t\t\tpreserve.push( match );\n\t\t\t\treturn '<wp-preserve>';\n\t\t\t}\n\t\t);\n\t}\n\n\t// Protect pre tags.\n\tif ( html.indexOf( '<pre' ) !== -1 ) {\n\t\tpreserveLinebreaks = true;\n\t\thtml = html.replace( /<pre[^>]*>[\\s\\S]+?<\\/pre>/g, ( a ) => {\n\t\t\ta = a.replace( /<br ?\\/?>(\\r\\n|\\n)?/g, '<wp-line-break>' );\n\t\t\ta = a.replace( /<\\/?p( [^>]*)?>(\\r\\n|\\n)?/g, '<wp-line-break>' );\n\t\t\treturn a.replace( /\\r?\\n/g, '<wp-line-break>' );\n\t\t} );\n\t}\n\n\t// Remove line breaks but keep <br> tags inside image captions.\n\tif ( html.indexOf( '[caption' ) !== -1 ) {\n\t\tpreserveBr = true;\n\t\thtml = html.replace( /\\[caption[\\s\\S]+?\\[\\/caption\\]/g, ( a ) => {\n\t\t\treturn a\n\t\t\t\t.replace( /<br([^>]*)>/g, '<wp-temp-br$1>' )\n\t\t\t\t.replace( /[\\r\\n\\t]+/, '' );\n\t\t} );\n\t}\n\n\t// Normalize white space characters before and after block tags.\n\thtml = html.replace(\n\t\tnew RegExp( '\\\\s*</(' + blocklist1 + ')>\\\\s*', 'g' ),\n\t\t'</$1>\\n'\n\t);\n\thtml = html.replace(\n\t\tnew RegExp( '\\\\s*<((?:' + blocklist1 + ')(?: [^>]*)?)>', 'g' ),\n\t\t'\\n<$1>'\n\t);\n\n\t// Mark </p> if it has any attributes.\n\thtml = html.replace( /(<p [^>]+>[\\s\\S]*?)<\\/p>/g, '$1</p#>' );\n\n\t// Preserve the first <p> inside a <div>.\n\thtml = html.replace( /<div( [^>]*)?>\\s*<p>/gi, '<div$1>\\n\\n' );\n\n\t// Remove paragraph tags.\n\thtml = html.replace( /\\s*<p>/gi, '' );\n\thtml = html.replace( /\\s*<\\/p>\\s*/gi, '\\n\\n' );\n\n\t// Normalize white space chars and remove multiple line breaks.\n\thtml = html.replace( /\\n[\\s\\u00a0]+\\n/g, '\\n\\n' );\n\n\t// Replace <br> tags with line breaks.\n\thtml = html.replace( /(\\s*)<br ?\\/?>\\s*/gi, ( _, space ) => {\n\t\tif ( space && space.indexOf( '\\n' ) !== -1 ) {\n\t\t\treturn '\\n\\n';\n\t\t}\n\n\t\treturn '\\n';\n\t} );\n\n\t// Fix line breaks around <div>.\n\thtml = html.replace( /\\s*<div/g, '\\n<div' );\n\thtml = html.replace( /<\\/div>\\s*/g, '</div>\\n' );\n\n\t// Fix line breaks around caption shortcodes.\n\thtml = html.replace(\n\t\t/\\s*\\[caption([^\\[]+)\\[\\/caption\\]\\s*/gi,\n\t\t'\\n\\n[caption$1[/caption]\\n\\n'\n\t);\n\thtml = html.replace( /caption\\]\\n\\n+\\[caption/g, 'caption]\\n\\n[caption' );\n\n\t// Pad block elements tags with a line break.\n\thtml = html.replace(\n\t\tnew RegExp( '\\\\s*<((?:' + blocklist2 + ')(?: [^>]*)?)\\\\s*>', 'g' ),\n\t\t'\\n<$1>'\n\t);\n\thtml = html.replace(\n\t\tnew RegExp( '\\\\s*</(' + blocklist2 + ')>\\\\s*', 'g' ),\n\t\t'</$1>\\n'\n\t);\n\n\t// Indent <li>, <dt> and <dd> tags.\n\thtml = html.replace( /<((li|dt|dd)[^>]*)>/g, ' \\t<$1>' );\n\n\t// Fix line breaks around <select> and <option>.\n\tif ( html.indexOf( '<option' ) !== -1 ) {\n\t\thtml = html.replace( /\\s*<option/g, '\\n<option' );\n\t\thtml = html.replace( /\\s*<\\/select>/g, '\\n</select>' );\n\t}\n\n\t// Pad <hr> with two line breaks.\n\tif ( html.indexOf( '<hr' ) !== -1 ) {\n\t\thtml = html.replace( /\\s*<hr( [^>]*)?>\\s*/g, '\\n\\n<hr$1>\\n\\n' );\n\t}\n\n\t// Remove line breaks in <object> tags.\n\tif ( html.indexOf( '<object' ) !== -1 ) {\n\t\thtml = html.replace( /<object[\\s\\S]+?<\\/object>/g, ( a ) => {\n\t\t\treturn a.replace( /[\\r\\n]+/g, '' );\n\t\t} );\n\t}\n\n\t// Unmark special paragraph closing tags.\n\thtml = html.replace( /<\\/p#>/g, '</p>\\n' );\n\n\t// Pad remaining <p> tags whit a line break.\n\thtml = html.replace( /\\s*(<p [^>]+>[\\s\\S]*?<\\/p>)/g, '\\n$1' );\n\n\t// Trim.\n\thtml = html.replace( /^\\s+/, '' );\n\thtml = html.replace( /[\\s\\u00a0]+$/, '' );\n\n\tif ( preserveLinebreaks ) {\n\t\thtml = html.replace( /<wp-line-break>/g, '\\n' );\n\t}\n\n\tif ( preserveBr ) {\n\t\thtml = html.replace( /<wp-temp-br([^>]*)>/g, '<br$1>' );\n\t}\n\n\t// Restore preserved tags.\n\tif ( preserve.length ) {\n\t\thtml = html.replace( /<wp-preserve>/g, () => {\n\t\t\treturn /** @type {string} */ ( preserve.shift() );\n\t\t} );\n\t}\n\n\treturn html;\n}\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","htmlSplitRegex","RegExp","replaceInHtmlTags","haystack","replacePairs","textArr","input","parts","match","workingInput","index","push","slice","length","htmlSplit","changed","needles","keys","i","j","needle","indexOf","replace","join","autop","text","br","preTags","trim","textParts","split","lastText","pop","textPart","start","name","substr","allBlocks","texts","filter","Boolean","forEach","textPiece","a","b","preTag","original","removep","html","blocklist","blocklist1","blocklist2","preserve","preserveLinebreaks","preserveBr","_","space","shift"],"sourceRoot":""}
|
build/blob/index.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"file":"./build/blob/index.min.js","mappings":"mBACA,IAAIA,EAAsB,
|
1 |
+
{"version":3,"file":"./build/blob/index.min.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDH,EAAwB,CAACS,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFV,EAAyBC,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,uHCF9D,MAAM,gBAAEC,EAAF,gBAAmBC,GAAoBC,OAAOC,IAK9CC,EAAQ,CAAC,EASR,SAASC,EAAeC,GAC9B,MAAMC,EAAMP,EAAiBM,GAI7B,OAFAF,EAAOG,GAAQD,EAERC,CACP,CAWM,SAASC,EAAcD,GAC7B,OAAOH,EAAOG,EACd,CAWM,SAASE,EAAkBF,GAAM,MACvC,iBAAOC,EAAcD,UAArB,aAAO,EAAqBG,KAAKC,MAAO,KAAO,EAC/C,CAOM,SAASC,EAAeL,GACzBH,EAAOG,IACXN,EAAiBM,UAGXH,EAAOG,EACd,CASM,SAASM,EAAWN,GAC1B,SAAOA,IAASA,EAAIO,UAGc,IAA3BP,EAAIO,QAAS,QACpB,E","sources":["webpack://wp/webpack/bootstrap","webpack://wp/webpack/runtime/define property getters","webpack://wp/webpack/runtime/hasOwnProperty shorthand","webpack://wp/webpack/runtime/make namespace object","webpack://wp/./packages/blob/build-module/@wordpress/blob/src/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\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};","/**\n * Browser dependencies\n */\nconst { createObjectURL, revokeObjectURL } = window.URL;\n\n/**\n * @type {Record<string, File|undefined>}\n */\nconst cache = {};\n\n/**\n * Create a blob URL from a file.\n *\n * @param {File} file The file to create a blob URL for.\n *\n * @return {string} The blob URL.\n */\nexport function createBlobURL( file ) {\n\tconst url = createObjectURL( file );\n\n\tcache[ url ] = file;\n\n\treturn url;\n}\n\n/**\n * Retrieve a file based on a blob URL. The file must have been created by\n * `createBlobURL` and not removed by `revokeBlobURL`, otherwise it will return\n * `undefined`.\n *\n * @param {string} url The blob URL.\n *\n * @return {File|undefined} The file for the blob URL.\n */\nexport function getBlobByURL( url ) {\n\treturn cache[ url ];\n}\n\n/**\n * Retrieve a blob type based on URL. The file must have been created by\n * `createBlobURL` and not removed by `revokeBlobURL`, otherwise it will return\n * `undefined`.\n *\n * @param {string} url The blob URL.\n *\n * @return {string|undefined} The blob type.\n */\nexport function getBlobTypeByURL( url ) {\n\treturn getBlobByURL( url )?.type.split( '/' )[ 0 ]; // 0: media type , 1: file extension eg ( type: 'image/jpeg' ).\n}\n\n/**\n * Remove the resource and file cache from memory.\n *\n * @param {string} url The blob URL.\n */\nexport function revokeBlobURL( url ) {\n\tif ( cache[ url ] ) {\n\t\trevokeObjectURL( url );\n\t}\n\n\tdelete cache[ url ];\n}\n\n/**\n * Check whether a url is a blob url.\n *\n * @param {string} url The URL.\n *\n * @return {boolean} Is the url a blob url?\n */\nexport function isBlobURL( url ) {\n\tif ( ! url || ! url.indexOf ) {\n\t\treturn false;\n\t}\n\treturn url.indexOf( 'blob:' ) === 0;\n}\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","createObjectURL","revokeObjectURL","window","URL","cache","createBlobURL","file","url","getBlobByURL","getBlobTypeByURL","type","split","revokeBlobURL","isBlobURL","indexOf"],"sourceRoot":""}
|
build/block-directory/index.js
CHANGED
@@ -366,8 +366,6 @@ function getErrorNoticeForBlock(state, blockId) {
|
|
366 |
return state.errorNotices[blockId];
|
367 |
}
|
368 |
|
369 |
-
;// CONCATENATED MODULE: external "lodash"
|
370 |
-
const external_lodash_namespaceObject = window["lodash"];
|
371 |
;// CONCATENATED MODULE: external ["wp","i18n"]
|
372 |
const external_wp_i18n_namespaceObject = window["wp"]["i18n"];
|
373 |
;// CONCATENATED MODULE: external ["wp","apiFetch"]
|
@@ -473,10 +471,6 @@ function getPluginUrl(block) {
|
|
473 |
}
|
474 |
|
475 |
;// CONCATENATED MODULE: ./packages/block-directory/build-module/store/actions.js
|
476 |
-
/**
|
477 |
-
* External dependencies
|
478 |
-
*/
|
479 |
-
|
480 |
/**
|
481 |
* WordPress dependencies
|
482 |
*/
|
@@ -485,7 +479,6 @@ function getPluginUrl(block) {
|
|
485 |
|
486 |
|
487 |
|
488 |
-
|
489 |
/**
|
490 |
* Internal dependencies
|
491 |
*/
|
@@ -589,7 +582,10 @@ const installBlockType = block => async _ref => {
|
|
589 |
}
|
590 |
|
591 |
(0,external_wp_blocks_namespaceObject.unstable__bootstrapServerSideBlockDefinitions)({
|
592 |
-
[name]: (
|
|
|
|
|
|
|
593 |
});
|
594 |
});
|
595 |
await loadAssets();
|
@@ -637,11 +633,11 @@ const installBlockType = block => async _ref => {
|
|
637 |
* @param {Object} block The blockType object.
|
638 |
*/
|
639 |
|
640 |
-
const uninstallBlockType = block => async
|
641 |
let {
|
642 |
registry,
|
643 |
dispatch
|
644 |
-
} =
|
645 |
|
646 |
try {
|
647 |
const url = getPluginUrl(block);
|
@@ -2110,7 +2106,7 @@ const ModifiedWarning = _ref2 => {
|
|
2110 |
actions.push((0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
|
2111 |
key: "convert",
|
2112 |
onClick: convertToHTML,
|
2113 |
-
variant: "
|
2114 |
}, (0,external_wp_i18n_namespaceObject.__)('Keep as HTML')));
|
2115 |
}
|
2116 |
|
366 |
return state.errorNotices[blockId];
|
367 |
}
|
368 |
|
|
|
|
|
369 |
;// CONCATENATED MODULE: external ["wp","i18n"]
|
370 |
const external_wp_i18n_namespaceObject = window["wp"]["i18n"];
|
371 |
;// CONCATENATED MODULE: external ["wp","apiFetch"]
|
471 |
}
|
472 |
|
473 |
;// CONCATENATED MODULE: ./packages/block-directory/build-module/store/actions.js
|
|
|
|
|
|
|
|
|
474 |
/**
|
475 |
* WordPress dependencies
|
476 |
*/
|
479 |
|
480 |
|
481 |
|
|
|
482 |
/**
|
483 |
* Internal dependencies
|
484 |
*/
|
582 |
}
|
583 |
|
584 |
(0,external_wp_blocks_namespaceObject.unstable__bootstrapServerSideBlockDefinitions)({
|
585 |
+
[name]: Object.fromEntries(Object.entries(response).filter(_ref2 => {
|
586 |
+
let [key] = _ref2;
|
587 |
+
return metadataFields.includes(key);
|
588 |
+
}))
|
589 |
});
|
590 |
});
|
591 |
await loadAssets();
|
633 |
* @param {Object} block The blockType object.
|
634 |
*/
|
635 |
|
636 |
+
const uninstallBlockType = block => async _ref3 => {
|
637 |
let {
|
638 |
registry,
|
639 |
dispatch
|
640 |
+
} = _ref3;
|
641 |
|
642 |
try {
|
643 |
const url = getPluginUrl(block);
|
2106 |
actions.push((0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
|
2107 |
key: "convert",
|
2108 |
onClick: convertToHTML,
|
2109 |
+
variant: "tertiary"
|
2110 |
}, (0,external_wp_i18n_namespaceObject.__)('Keep as HTML')));
|
2111 |
}
|
2112 |
|
build/block-directory/index.min.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('
|
1 |
+
<?php return array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '3d0930c5b489f94f1937');
|
build/block-directory/index.min.js
CHANGED
@@ -1,20 +1,20 @@
|
|
1 |
-
(()=>{"use strict";var e={n:t=>{var l=t&&t.__esModule?()=>t.default:()=>t;return e.d(l,{a:l}),l},d:(t,l)=>{for(var n in l)e.o(l,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:l[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{store:()=>
|
2 |
-
(0,
|
3 |
/* translators: %s: number of stars. */
|
4 |
-
(0,
|
5 |
/* translators: %1$s: block title, %2$s: average rating, %3$s: total ratings count. */
|
6 |
-
(0,
|
7 |
/* translators: %1$s: block title, %2$s: author name. */
|
8 |
-
(0,
|
9 |
/* translators: %d: number of available blocks. */
|
10 |
-
(0,
|
11 |
/* translators: %s: Name of the block author. */
|
12 |
-
(0,
|
13 |
-
(0,
|
14 |
/* translators: %s: block name */
|
15 |
-
(0,
|
16 |
/* translators: %s: block name */
|
17 |
-
(0,
|
18 |
/* translators: %s: block name */
|
19 |
-
(0,
|
20 |
//# sourceMappingURL=index.min.js.map
|
1 |
+
(()=>{"use strict";var e={n:t=>{var l=t&&t.__esModule?()=>t.default:()=>t;return e.d(l,{a:l}),l},d:(t,l)=>{for(var n in l)e.o(l,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:l[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{store:()=>G});var l={};e.r(l),e.d(l,{getDownloadableBlocks:()=>k,getErrorNoticeForBlock:()=>y,getErrorNotices:()=>h,getInstalledBlockTypes:()=>g,getNewBlockTypes:()=>_,getUnusedBlockTypes:()=>w,isInstalling:()=>E,isRequestingDownloadableBlocks:()=>b});var n={};e.r(n),e.d(n,{addInstalledBlockType:()=>D,clearErrorNotice:()=>x,fetchDownloadableBlocks:()=>S,installBlockType:()=>C,receiveDownloadableBlocks:()=>O,removeInstalledBlockType:()=>R,setErrorNotice:()=>M,setIsInstalling:()=>P,uninstallBlockType:()=>A});var o={};e.r(o),e.d(o,{getDownloadableBlocks:()=>Y});const r=window.wp.element,a=window.wp.plugins,s=window.wp.hooks,i=window.wp.blocks,c=window.wp.data,d=window.wp.editor,u=(0,c.combineReducers)({downloadableBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_DOWNLOADABLE_BLOCKS":return{...e,[t.filterValue]:{isRequesting:!0}};case"RECEIVE_DOWNLOADABLE_BLOCKS":return{...e,[t.filterValue]:{results:t.downloadableBlocks,isRequesting:!1}}}return e},blockManagement:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{installedBlockTypes:[],isInstalling:{}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_INSTALLED_BLOCK_TYPE":return{...e,installedBlockTypes:[...e.installedBlockTypes,t.item]};case"REMOVE_INSTALLED_BLOCK_TYPE":return{...e,installedBlockTypes:e.installedBlockTypes.filter((e=>e.name!==t.item.name))};case"SET_INSTALLING_BLOCK":return{...e,isInstalling:{...e.isInstalling,[t.blockId]:t.isInstalling}}}return e},errorNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_ERROR_NOTICE":return{...e,[t.blockId]:{message:t.message,isFatal:t.isFatal}};case"CLEAR_ERROR_NOTICE":const{[t.blockId]:l,...n}=e;return n}return e}}),m=window.wp.blockEditor;function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!t.length)return!1;if(t.some((t=>{let{name:l}=t;return l===e.name})))return!0;for(let l=0;l<t.length;l++)if(p(e,t[l].innerBlocks))return!0;return!1}function b(e,t){var l,n;return null!==(l=null===(n=e.downloadableBlocks[t])||void 0===n?void 0:n.isRequesting)&&void 0!==l&&l}function k(e,t){var l,n;return null!==(l=null===(n=e.downloadableBlocks[t])||void 0===n?void 0:n.results)&&void 0!==l?l:[]}function g(e){return e.blockManagement.installedBlockTypes}const _=(0,c.createRegistrySelector)((e=>t=>{const l=e(m.store).getBlocks();return g(t).filter((e=>p(e,l)))})),w=(0,c.createRegistrySelector)((e=>t=>{const l=e(m.store).getBlocks();return g(t).filter((e=>!p(e,l)))}));function E(e,t){return e.blockManagement.isInstalling[t]||!1}function h(e){return e.errorNotices}function y(e,t){return e.errorNotices[t]}const f=window.wp.i18n,v=window.wp.apiFetch;var B=e.n(v);const I=window.wp.notices,N=window.wp.url,T=e=>new Promise(((t,l)=>{const n=document.createElement(e.nodeName);["id","rel","src","href","type"].forEach((t=>{e[t]&&(n[t]=e[t])})),e.innerHTML&&n.appendChild(document.createTextNode(e.innerHTML)),n.onload=()=>t(!0),n.onerror=()=>l(new Error("Error loading asset.")),document.body.appendChild(n),("link"===n.nodeName.toLowerCase()||"script"===n.nodeName.toLowerCase()&&!n.src)&&t()}));function L(e){if(!e)return!1;const t=e.links["wp:plugin"]||e.links.self;return!(!t||!t.length)&&t[0].href}function S(e){return{type:"FETCH_DOWNLOADABLE_BLOCKS",filterValue:e}}function O(e,t){return{type:"RECEIVE_DOWNLOADABLE_BLOCKS",downloadableBlocks:e,filterValue:t}}const C=e=>async t=>{let{registry:l,dispatch:n}=t;const{id:o,name:r}=e;let a=!1;n.clearErrorNotice(o);try{n.setIsInstalling(o,!0);const t=L(e);let s={};t?await B()({method:"PUT",url:t,data:{status:"active"}}):s=(await B()({method:"POST",path:"wp/v2/plugins",data:{slug:o,status:"active"}}))._links,n.addInstalledBlockType({...e,links:{...e.links,...s}});const c=["api_version","title","category","parent","icon","description","keywords","attributes","provides_context","uses_context","supports","styles","example","variations"];if(await B()({path:(0,N.addQueryArgs)(`/wp/v2/block-types/${r}`,{_fields:c})}).catch((()=>{})).then((e=>{e&&(0,i.unstable__bootstrapServerSideBlockDefinitions)({[r]:Object.fromEntries(Object.entries(e).filter((e=>{let[t]=e;return c.includes(t)})))})})),await async function(){const e=await B()({url:document.location.href,parse:!1}),t=await e.text(),l=(new window.DOMParser).parseFromString(t,"text/html"),n=Array.from(l.querySelectorAll('link[rel="stylesheet"],script')).filter((e=>e.id&&!document.getElementById(e.id)));for(const e of n)await T(e)}(),!l.select(i.store).getBlockTypes().some((e=>e.name===r)))throw new Error((0,f.__)("Error registering block. Try reloading the page."));l.dispatch(I.store).createInfoNotice((0,f.sprintf)(// translators: %s is the block title.
|
2 |
+
(0,f.__)("Block %s installed and added."),e.title),{speak:!0,type:"snackbar"}),a=!0}catch(e){let t=e.message||(0,f.__)("An error occurred."),r=e instanceof Error;const a={folder_exists:(0,f.__)("This block is already installed. Try reloading the page."),unable_to_connect_to_filesystem:(0,f.__)("Error installing block. You can reload the page and try again.")};a[e.code]&&(r=!0,t=a[e.code]),n.setErrorNotice(o,t,r),l.dispatch(I.store).createErrorNotice(t,{speak:!0,isDismissible:!0})}return n.setIsInstalling(o,!1),a},A=e=>async t=>{let{registry:l,dispatch:n}=t;try{const t=L(e);await B()({method:"PUT",url:t,data:{status:"inactive"}}),await B()({method:"DELETE",url:t}),n.removeInstalledBlockType(e)}catch(e){l.dispatch(I.store).createErrorNotice(e.message||(0,f.__)("An error occurred."))}};function D(e){return{type:"ADD_INSTALLED_BLOCK_TYPE",item:e}}function R(e){return{type:"REMOVE_INSTALLED_BLOCK_TYPE",item:e}}function P(e,t){return{type:"SET_INSTALLING_BLOCK",blockId:e,isInstalling:t}}function M(e,t){let l=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"SET_ERROR_NOTICE",blockId:e,message:t,isFatal:l}}function x(e){return{type:"CLEAR_ERROR_NOTICE",blockId:e}}var F=function(){return F=Object.assign||function(e){for(var t,l=1,n=arguments.length;l<n;l++)for(var o in t=arguments[l])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},F.apply(this,arguments)};function V(e){return e.toLowerCase()}Object.create,Object.create;var j=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],H=/[^A-Z0-9]+/gi;function $(e,t,l){return t instanceof RegExp?e.replace(t,l):t.reduce((function(e,t){return e.replace(t,l)}),e)}function z(e,t){var l=e.charAt(0),n=e.substr(1).toLowerCase();return t>0&&l>="0"&&l<="9"?"_"+l+n:""+l.toUpperCase()+n}function K(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var l=t.splitRegexp,n=void 0===l?j:l,o=t.stripRegexp,r=void 0===o?H:o,a=t.transform,s=void 0===a?V:a,i=t.delimiter,c=void 0===i?" ":i,d=$($(e,n,"$1\0$2"),r,"\0"),u=0,m=d.length;"\0"===d.charAt(u);)u++;for(;"\0"===d.charAt(m-1);)m--;return d.slice(u,m).split("\0").map(s).join(c)}(e,F({delimiter:"",transform:z},t))}function U(e,t){return 0===t?e.toLowerCase():z(e,t)}const Y=e=>async t=>{let{dispatch:l}=t;if(e)try{l(S(e));l(O((await B()({path:`wp/v2/block-directory/search?term=${e}`})).map((e=>Object.fromEntries(Object.entries(e).map((e=>{let[t,l]=e;return[(n=t,void 0===o&&(o={}),K(n,F({transform:U},o))),l];var n,o}))))),e))}catch{}},q={reducer:u,selectors:l,actions:n,resolvers:o},G=(0,c.createReduxStore)("core/block-directory",q);function W(){const{uninstallBlockType:e}=(0,c.useDispatch)(G),t=(0,c.useSelect)((e=>{const{isAutosavingPost:t,isSavingPost:l}=e(d.store);return l()&&!t()}),[]),l=(0,c.useSelect)((e=>e(G).getUnusedBlockTypes()),[]);return(0,r.useEffect)((()=>{t&&l.length&&l.forEach((t=>{e(t),(0,i.unregisterBlockType)(t.name)}))}),[t]),null}(0,c.register)(G);const Z=window.wp.compose,Q=window.wp.components,J=window.wp.coreData;function X(){return X=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n])}return e},X.apply(this,arguments)}const ee=window.wp.htmlEntities,te=function(e){let{icon:t,size:l=24,...n}=e;return(0,r.cloneElement)(t,{width:l,height:l,...n})},le=window.wp.primitives,ne=(0,r.createElement)(le.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(le.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"})),oe=(0,r.createElement)(le.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(le.Path,{d:"M9.518 8.783a.25.25 0 00.188-.137l2.069-4.192a.25.25 0 01.448 0l2.07 4.192a.25.25 0 00.187.137l4.626.672a.25.25 0 01.139.427l-3.347 3.262a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.363.264l-4.137-2.176a.25.25 0 00-.233 0l-4.138 2.175a.25.25 0 01-.362-.263l.79-4.607a.25.25 0 00-.072-.222L4.753 9.882a.25.25 0 01.14-.427l4.625-.672zM12 14.533c.28 0 .559.067.814.2l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39v7.143z"})),re=(0,r.createElement)(le.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(le.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"})),ae=function(e){let{rating:t}=e;const l=.5*Math.round(t/.5),n=Math.floor(t),o=Math.ceil(t-n),a=5-(n+o);return(0,r.createElement)("span",{"aria-label":(0,f.sprintf)(
|
3 |
/* translators: %s: number of stars. */
|
4 |
+
(0,f.__)("%s out of 5 stars"),l)},Array.from({length:n}).map(((e,t)=>(0,r.createElement)(te,{key:`full_stars_${t}`,className:"block-directory-block-ratings__star-full",icon:ne,size:16}))),Array.from({length:o}).map(((e,t)=>(0,r.createElement)(te,{key:`half_stars_${t}`,className:"block-directory-block-ratings__star-half-full",icon:oe,size:16}))),Array.from({length:a}).map(((e,t)=>(0,r.createElement)(te,{key:`empty_stars_${t}`,className:"block-directory-block-ratings__star-empty",icon:re,size:16}))))},se=e=>{let{rating:t}=e;return(0,r.createElement)("span",{className:"block-directory-block-ratings"},(0,r.createElement)(ae,{rating:t}))},ie=function(e){let{icon:t}=e;const l="block-directory-downloadable-block-icon";return null!==t.match(/\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/)?(0,r.createElement)("img",{className:l,src:t,alt:""}):(0,r.createElement)(m.BlockIcon,{className:l,icon:t,showColors:!0})},ce=e=>{let{block:t}=e;const l=(0,c.useSelect)((e=>e(G).getErrorNoticeForBlock(t.id)),[t]);return l?(0,r.createElement)("div",{className:"block-directory-downloadable-block-notice"},(0,r.createElement)("div",{className:"block-directory-downloadable-block-notice__content"},l.message,l.isFatal?" "+(0,f.__)("Try reloading the page."):null)):null};function de(e,t){let{title:l,rating:n,ratingCount:o}=e,{hasNotice:r,isInstalled:a,isInstalling:s}=t;const i=.5*Math.round(n/.5);return!a&&r?(0,f.sprintf)("Retry installing %s.",(0,ee.decodeEntities)(l)):a?(0,f.sprintf)("Add %s.",(0,ee.decodeEntities)(l)):s?(0,f.sprintf)("Installing %s.",(0,ee.decodeEntities)(l)):o<1?(0,f.sprintf)("Install %s.",(0,ee.decodeEntities)(l)):(0,f.sprintf)(
|
5 |
/* translators: %1$s: block title, %2$s: average rating, %3$s: total ratings count. */
|
6 |
+
(0,f._n)("Install %1$s. %2$s stars with %3$s review.","Install %1$s. %2$s stars with %3$s reviews.",o),(0,ee.decodeEntities)(l),i,o)}const ue=function(e){let{composite:t,item:l,onClick:n}=e;const{author:o,description:a,icon:s,rating:d,title:u}=l,m=!!(0,i.getBlockType)(l.name),{hasNotice:p,isInstalling:b,isInstallable:k}=(0,c.useSelect)((e=>{const{getErrorNoticeForBlock:t,isInstalling:n}=e(G),o=t(l.id),r=o&&o.isFatal;return{hasNotice:!!o,isInstalling:n(l.id),isInstallable:!r}}),[l]);let g="";return m?g=(0,f.__)("Installed!"):b&&(g=(0,f.__)("Installing…")),(0,r.createElement)(Q.__unstableCompositeItem,X({__experimentalIsFocusable:!0,role:"option",as:Q.Button},t,{className:"block-directory-downloadable-block-list-item",onClick:e=>{e.preventDefault(),n()},isBusy:b,disabled:b||!k,label:de(l,{hasNotice:p,isInstalled:m,isInstalling:b}),showTooltip:!0,tooltipPosition:"top center"}),(0,r.createElement)("div",{className:"block-directory-downloadable-block-list-item__icon"},(0,r.createElement)(ie,{icon:s,title:u}),b?(0,r.createElement)("span",{className:"block-directory-downloadable-block-list-item__spinner"},(0,r.createElement)(Q.Spinner,null)):(0,r.createElement)(se,{rating:d})),(0,r.createElement)("span",{className:"block-directory-downloadable-block-list-item__details"},(0,r.createElement)("span",{className:"block-directory-downloadable-block-list-item__title"},(0,r.createInterpolateElement)((0,f.sprintf)(
|
7 |
/* translators: %1$s: block title, %2$s: author name. */
|
8 |
+
(0,f.__)("%1$s <span>by %2$s</span>"),(0,ee.decodeEntities)(u),o),{span:(0,r.createElement)("span",{className:"block-directory-downloadable-block-list-item__author"})})),p?(0,r.createElement)(ce,{block:l}):(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",{className:"block-directory-downloadable-block-list-item__desc"},g||(0,ee.decodeEntities)(a)),k&&!(m||b)&&(0,r.createElement)(Q.VisuallyHidden,null,(0,f.__)("Install block")))))},me=()=>{},pe=function(e){let{items:t,onHover:l=me,onSelect:n}=e;const o=(0,Q.__unstableUseCompositeState)(),{installBlockType:a}=(0,c.useDispatch)(G);return t.length?(0,r.createElement)(Q.__unstableComposite,X({},o,{role:"listbox",className:"block-directory-downloadable-blocks-list","aria-label":(0,f.__)("Blocks available for install")}),t.map((e=>(0,r.createElement)(ue,{key:e.id,composite:o,onClick:()=>{(0,i.getBlockType)(e.name)?n(e):a(e).then((t=>{t&&n(e)})),l(null)},onHover:l,item:e})))):null},be=window.wp.a11y,ke=function(e){let{children:t,downloadableItems:l,hasLocalBlocks:n}=e;const o=l.length;return(0,r.useEffect)((()=>{(0,be.speak)((0,f.sprintf)(
|
9 |
/* translators: %d: number of available blocks. */
|
10 |
+
(0,f._n)("%d additional block is available to install.","%d additional blocks are available to install.",o),o))}),[o]),(0,r.createElement)(r.Fragment,null,!n&&(0,r.createElement)("p",{className:"block-directory-downloadable-blocks-panel__no-local"},(0,f.__)("No results available from your installed blocks.")),(0,r.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),(0,r.createElement)("div",{className:"block-directory-downloadable-blocks-panel"},(0,r.createElement)("div",{className:"block-directory-downloadable-blocks-panel__header"},(0,r.createElement)("h2",{className:"block-directory-downloadable-blocks-panel__title"},(0,f.__)("Available to install")),(0,r.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description"},(0,f.__)("Select a block to install and add it to your post."))),t))},ge=(0,r.createElement)(le.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(le.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})),_e=function(){return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"block-editor-inserter__no-results"},(0,r.createElement)(te,{className:"block-editor-inserter__no-results-icon",icon:ge}),(0,r.createElement)("p",null,(0,f.__)("No results found."))),(0,r.createElement)("div",{className:"block-editor-inserter__tips"},(0,r.createElement)(Q.Tip,null,(0,f.__)("Interested in creating your own block?"),(0,r.createElement)("br",null),(0,r.createElement)(Q.ExternalLink,{href:"https://developer.wordpress.org/block-editor/"},(0,f.__)("Get started here"),"."))))},we=(0,Z.compose)([(0,c.withSelect)(((e,t)=>{let{filterValue:l,rootClientId:n=null}=t;const{getDownloadableBlocks:o,isRequestingDownloadableBlocks:r}=e(G),{canInsertBlockType:a}=e(m.store),s=e(J.store).canUser("read","block-directory/search");return{downloadableItems:s?o(l).filter((e=>a(e,n,!0))):[],hasPermission:s,isLoading:r(l)}}))])((function(e){let{downloadableItems:t,onSelect:l,onHover:n,hasLocalBlocks:o,hasPermission:a,isLoading:s,isTyping:i}=e;return void 0===a||s||i?(0,r.createElement)(r.Fragment,null,a&&!o&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",{className:"block-directory-downloadable-blocks-panel__no-local"},(0,f.__)("No results available from your installed blocks.")),(0,r.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"})),(0,r.createElement)("div",{className:"block-directory-downloadable-blocks-panel has-blocks-loading"},(0,r.createElement)(Q.Spinner,null))):!1===a?o?null:(0,r.createElement)(_e,null):t.length?(0,r.createElement)(ke,{downloadableItems:t,hasLocalBlocks:o},(0,r.createElement)(pe,{items:t,onSelect:l,onHover:n})):!o&&(0,r.createElement)(_e,null)})),Ee=function(){const[e,t]=(0,r.useState)(""),l=(0,Z.debounce)(t,400);return(0,r.createElement)(m.__unstableInserterMenuExtension,null,(t=>{let{onSelect:n,onHover:o,filterValue:a,hasItems:s,rootClientId:i}=t;return e!==a&&l(a),e?(0,r.createElement)(we,{onSelect:n,onHover:o,rootClientId:i,filterValue:e,hasLocalBlocks:s,isTyping:a!==e}):null}))},he=window.wp.editPost;function ye(e){let{items:t}=e;return t.length?(0,r.createElement)("ul",{className:"block-directory-compact-list"},t.map((e=>{let{icon:t,id:l,title:n,author:o}=e;return(0,r.createElement)("li",{key:l,className:"block-directory-compact-list__item"},(0,r.createElement)(ie,{icon:t,title:n}),(0,r.createElement)("div",{className:"block-directory-compact-list__item-details"},(0,r.createElement)("div",{className:"block-directory-compact-list__item-title"},n),(0,r.createElement)("div",{className:"block-directory-compact-list__item-author"},(0,f.sprintf)(
|
11 |
/* translators: %s: Name of the block author. */
|
12 |
+
(0,f.__)("By %s"),o))))}))):null}function fe(){const e=(0,c.useSelect)((e=>e(G).getNewBlockTypes()),[]);return e.length?(0,r.createElement)(he.PluginPrePublishPanel,{icon:ge,title:(0,f.sprintf)(// translators: %d: number of blocks (number).
|
13 |
+
(0,f._n)("Added: %d block","Added: %d blocks",e.length),e.length),initialOpen:!0},(0,r.createElement)("p",{className:"installed-blocks-pre-publish-panel__copy"},(0,f._n)("The following block has been added to your site.","The following blocks have been added to your site.",e.length)),(0,r.createElement)(ye,{items:e})):null}function ve(e){let{attributes:t,block:l,clientId:n}=e;const o=(0,c.useSelect)((e=>e(G).isInstalling(l.id)),[l.id]),{installBlockType:a}=(0,c.useDispatch)(G),{replaceBlock:s}=(0,c.useDispatch)(m.store);return(0,r.createElement)(Q.Button,{onClick:()=>a(l).then((e=>{if(e){const e=(0,i.getBlockType)(l.name),[o]=(0,i.parse)(t.originalContent);o&&e&&s(n,(0,i.createBlock)(e.name,o.attributes,o.innerBlocks))}})),disabled:o,isBusy:o,variant:"primary"},(0,f.sprintf)(
|
14 |
/* translators: %s: block name */
|
15 |
+
(0,f.__)("Install %s"),l.title))}const Be=e=>{let{originalBlock:t,...l}=e;const{originalName:n,originalUndelimitedContent:o,clientId:a}=l.attributes,{replaceBlock:s}=(0,c.useDispatch)(m.store),d=!!o,u=(0,c.useSelect)((e=>{const{canInsertBlockType:t,getBlockRootClientId:l}=e(m.store);return t("core/html",l(a))}),[a]);let p=(0,f.sprintf)(
|
16 |
/* translators: %s: block name */
|
17 |
+
(0,f.__)("Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely."),t.title||n);const b=[(0,r.createElement)(ve,{key:"install",block:t,attributes:l.attributes,clientId:l.clientId})];return d&&u&&(p=(0,f.sprintf)(
|
18 |
/* translators: %s: block name */
|
19 |
+
(0,f.__)("Your site doesn’t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely."),t.title||n),b.push((0,r.createElement)(Q.Button,{key:"convert",onClick:()=>{s(l.clientId,(0,i.createBlock)("core/html",{content:o}))},variant:"tertiary"},(0,f.__)("Keep as HTML")))),(0,r.createElement)("div",(0,m.useBlockProps)(),(0,r.createElement)(m.Warning,{actions:b},p),(0,r.createElement)(r.RawHTML,null,o))};(0,a.registerPlugin)("block-directory",{render:()=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(W,null),(0,r.createElement)(Ee,null),(0,r.createElement)(fe,null))}),(0,s.addFilter)("blocks.registerBlockType","block-directory/fallback",((e,t)=>{return"core/missing"!==t||(e.edit=(l=e.edit,e=>{const{originalName:t}=e.attributes,{block:n,hasPermission:o}=(0,c.useSelect)((e=>{const{getDownloadableBlocks:l}=e(G),n=l("block:"+t).filter((e=>{let{name:l}=e;return t===l}));return{hasPermission:e(J.store).canUser("read","block-directory/search"),block:n.length&&n[0]}}),[t]);return o&&n?(0,r.createElement)(Be,X({},e,{originalBlock:n})):(0,r.createElement)(l,e)})),e;var l})),(window.wp=window.wp||{}).blockDirectory=t})();
|
20 |
//# sourceMappingURL=index.min.js.map
|
build/block-directory/index.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"file":"./build/block-directory/index.min.js","mappings":"mBACA,IAAIA,EAAsB,CCA1B,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,GCLR,EAAwB,CAACI,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3E,EAAwB,CAACM,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClF,EAAyBT,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,M,wkBCLvD,MAAM,EAA+BC,OAAW,GAAW,QCArD,EAA+BA,OAAW,GAAW,QCArD,EAA+BA,OAAW,GAAS,MCAnD,EAA+BA,OAAW,GAAU,OCApD,EAA+BA,OAAW,GAAQ,KCAlD,EAA+BA,OAAW,GAAU,OCsG1D,GAAeC,EAAAA,EAAAA,iBAAiB,CAC/BC,mBA1FiC,WAA0B,IAAxBC,EAAwB,uDAAhB,GAAIC,EAAY,uCAC3D,OAASA,EA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,IACC,mJAEDqL,EAAcjL,OAASsL,GAExB5H,EAAQkI,MACP,mBAAC,EAAA7D,OAAD,CAAQ7P,IAAI,UAAUiP,QAhDF,KACrB6D,EACCjG,EAAM+F,UACNK,EAAAA,EAAAA,aAAa,YAAa,CACzBU,QAASN,MA4CsCH,QAAQ,SACrDxL,EAAAA,EAAAA,IAAI,oBAMR,0BAAUkM,EAAAA,EAAAA,kBACT,mBAAC,EAAAC,QAAD,CAASrI,QAAUA,GAAYiI,IAC/B,mBAAC,EAAAK,QAAD,KAAWT,MCjGdU,EAAAA,EAAAA,gBAAgB,kBAAmB,CAClCC,OAAM,KAEJ,oCACC,mBAACpI,EAAD,OACA,mBAAC,GAAD,OACA,mBAAC0G,GAAD,UAMJ2B,EAAAA,EAAAA,WACC,2BACA,4BACA,CAAEC,EAAUrS,KACX,MAAc,iBAATA,IAGLqS,EAASC,MDZiBC,ECYSF,EAASC,KDZOtH,IACpD,MAAM,aAAEuG,GAAiBvG,EAAM8F,YAGzB,MAAEjO,EAAF,cAAS+M,IAAkBzF,EAAAA,EAAAA,YAC9BlJ,IACD,MAAM,sBAAEJ,GAA0BI,EAAQgJ,GACpC1J,EAASM,EACd,SAAW0Q,GACVzR,QAAQ,QAAE,KAAEE,GAAJ,SAAgBuR,IAAiBvR,KAC3C,MAAO,CACN4P,cAAe3O,EAAQ4O,EAAAA,OAAYC,QAClC,OACA,0BAEDjN,MAAOtC,EAAOC,QAAUD,EAAQ,MAGlC,CAAEgR,IAIH,OAAO3B,GAAmB/M,GAInB,mBAACyO,GAAD,MAAsBtG,EAAtB,CAA8BkG,cAAgBrO,MAH7C,mBAAC0P,EAAuBvH,MCbvBqH,EDVkBE,IAAAA,M","sources":["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\",\"plugins\"]","webpack://wp/external window [\"wp\",\"hooks\"]","webpack://wp/external window [\"wp\",\"blocks\"]","webpack://wp/external window [\"wp\",\"data\"]","webpack://wp/external window [\"wp\",\"editor\"]","webpack://wp/./packages/block-directory/build-module/store/@wordpress/block-directory/src/store/reducer.js","webpack://wp/external window [\"wp\",\"blockEditor\"]","webpack://wp/./packages/block-directory/build-module/store/utils/@wordpress/block-directory/src/store/utils/has-block-type.js","webpack://wp/./packages/block-directory/build-module/store/@wordpress/block-directory/src/store/selectors.js","webpack://wp/external window \"lodash\"","webpack://wp/external window [\"wp\",\"i18n\"]","webpack://wp/external window [\"wp\",\"apiFetch\"]","webpack://wp/external window [\"wp\",\"notices\"]","webpack://wp/external window [\"wp\",\"url\"]","webpack://wp/./packages/block-directory/build-module/store/@wordpress/block-directory/src/store/load-assets.js","webpack://wp/./packages/block-directory/build-module/store/utils/@wordpress/block-directory/src/store/utils/get-plugin-url.js","webpack://wp/./packages/block-directory/build-module/store/@wordpress/block-directory/src/store/actions.js","webpack://wp/./node_modules/tslib/tslib.es6.js","webpack://wp/./node_modules/lower-case/src/index.ts","webpack://wp/./node_modules/no-case/src/index.ts","webpack://wp/./node_modules/pascal-case/src/index.ts","webpack://wp/./node_modules/camel-case/src/index.ts","webpack://wp/./packages/block-directory/build-module/store/@wordpress/block-directory/src/store/resolvers.js","webpack://wp/./packages/block-directory/build-module/store/@wordpress/block-directory/src/store/index.js","webpack://wp/./packages/block-directory/build-module/components/auto-block-uninstaller/@wordpress/block-directory/src/components/auto-block-uninstaller/index.js","webpack://wp/external window [\"wp\",\"compose\"]","webpack://wp/external window [\"wp\",\"components\"]","webpack://wp/external window [\"wp\",\"coreData\"]","webpack://wp/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://wp/external window [\"wp\",\"htmlEntities\"]","webpack://wp/./packages/icons/build-module/icon/@wordpress/icons/src/icon/index.js","webpack://wp/external window [\"wp\",\"primitives\"]","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/star-filled.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/star-half.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/star-empty.js","webpack://wp/./packages/block-directory/build-module/components/block-ratings/@wordpress/block-directory/src/components/block-ratings/stars.js","webpack://wp/./packages/block-directory/build-module/components/block-ratings/@wordpress/block-directory/src/components/block-ratings/index.js","webpack://wp/./packages/block-directory/build-module/components/downloadable-block-icon/@wordpress/block-directory/src/components/downloadable-block-icon/index.js","webpack://wp/./packages/block-directory/build-module/components/downloadable-block-notice/@wordpress/block-directory/src/components/downloadable-block-notice/index.js","webpack://wp/./packages/block-directory/build-module/components/downloadable-block-list-item/@wordpress/block-directory/src/components/downloadable-block-list-item/index.js","webpack://wp/./packages/block-directory/build-module/components/downloadable-blocks-list/@wordpress/block-directory/src/components/downloadable-blocks-list/index.js","webpack://wp/external window [\"wp\",\"a11y\"]","webpack://wp/./packages/block-directory/build-module/components/downloadable-blocks-panel/@wordpress/block-directory/src/components/downloadable-blocks-panel/inserter-panel.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/block-default.js","webpack://wp/./packages/block-directory/build-module/components/downloadable-blocks-panel/@wordpress/block-directory/src/components/downloadable-blocks-panel/no-results.js","webpack://wp/./packages/block-directory/build-module/components/downloadable-blocks-panel/@wordpress/block-directory/src/components/downloadable-blocks-panel/index.js","webpack://wp/./packages/block-directory/build-module/plugins/inserter-menu-downloadable-blocks-panel/@wordpress/block-directory/src/plugins/inserter-menu-downloadable-blocks-panel/index.js","webpack://wp/external window [\"wp\",\"editPost\"]","webpack://wp/./packages/block-directory/build-module/components/compact-list/@wordpress/block-directory/src/components/compact-list/index.js","webpack://wp/./packages/block-directory/build-module/plugins/installed-blocks-pre-publish-panel/@wordpress/block-directory/src/plugins/installed-blocks-pre-publish-panel/index.js","webpack://wp/./packages/block-directory/build-module/plugins/get-install-missing/@wordpress/block-directory/src/plugins/get-install-missing/install-button.js","webpack://wp/./packages/block-directory/build-module/plugins/get-install-missing/@wordpress/block-directory/src/plugins/get-install-missing/index.js","webpack://wp/./packages/block-directory/build-module/plugins/@wordpress/block-directory/src/plugins/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\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\"][\"plugins\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"hooks\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"blocks\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"data\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"editor\"];","/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\n/**\n * Reducer returning an array of downloadable blocks.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport const downloadableBlocks = ( state = {}, action ) => {\n\tswitch ( action.type ) {\n\t\tcase 'FETCH_DOWNLOADABLE_BLOCKS':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.filterValue ]: {\n\t\t\t\t\tisRequesting: true,\n\t\t\t\t},\n\t\t\t};\n\t\tcase 'RECEIVE_DOWNLOADABLE_BLOCKS':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.filterValue ]: {\n\t\t\t\t\tresults: action.downloadableBlocks,\n\t\t\t\t\tisRequesting: false,\n\t\t\t\t},\n\t\t\t};\n\t}\n\treturn state;\n};\n\n/**\n * Reducer managing the installation and deletion of blocks.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport const blockManagement = (\n\tstate = {\n\t\tinstalledBlockTypes: [],\n\t\tisInstalling: {},\n\t},\n\taction\n) => {\n\tswitch ( action.type ) {\n\t\tcase 'ADD_INSTALLED_BLOCK_TYPE':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tinstalledBlockTypes: [\n\t\t\t\t\t...state.installedBlockTypes,\n\t\t\t\t\taction.item,\n\t\t\t\t],\n\t\t\t};\n\t\tcase 'REMOVE_INSTALLED_BLOCK_TYPE':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tinstalledBlockTypes: state.installedBlockTypes.filter(\n\t\t\t\t\t( blockType ) => blockType.name !== action.item.name\n\t\t\t\t),\n\t\t\t};\n\t\tcase 'SET_INSTALLING_BLOCK':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisInstalling: {\n\t\t\t\t\t...state.isInstalling,\n\t\t\t\t\t[ action.blockId ]: action.isInstalling,\n\t\t\t\t},\n\t\t\t};\n\t}\n\treturn state;\n};\n\n/**\n * Reducer returning an object of error notices.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport const errorNotices = ( state = {}, action ) => {\n\tswitch ( action.type ) {\n\t\tcase 'SET_ERROR_NOTICE':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.blockId ]: {\n\t\t\t\t\tmessage: action.message,\n\t\t\t\t\tisFatal: action.isFatal,\n\t\t\t\t},\n\t\t\t};\n\t\tcase 'CLEAR_ERROR_NOTICE':\n\t\t\tconst { [ action.blockId ]: blockId, ...restState } = state;\n\t\t\treturn restState;\n\t}\n\treturn state;\n};\n\nexport default combineReducers( {\n\tdownloadableBlocks,\n\tblockManagement,\n\terrorNotices,\n} );\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"blockEditor\"];","/**\n * Check if a block list contains a specific block type. Recursively searches\n * through `innerBlocks` if they exist.\n *\n * @param {Object} blockType A block object to search for.\n * @param {Object[]} blocks The list of blocks to look through.\n *\n * @return {boolean} Whether the blockType is found.\n */\nexport default function hasBlockType( blockType, blocks = [] ) {\n\tif ( ! blocks.length ) {\n\t\treturn false;\n\t}\n\tif ( blocks.some( ( { name } ) => name === blockType.name ) ) {\n\t\treturn true;\n\t}\n\tfor ( let i = 0; i < blocks.length; i++ ) {\n\t\tif ( hasBlockType( blockType, blocks[ i ].innerBlocks ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n","/**\n * WordPress dependencies\n */\nimport { createRegistrySelector } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport hasBlockType from './utils/has-block-type';\n\n/**\n * Returns true if application is requesting for downloadable blocks.\n *\n * @param {Object} state Global application state.\n * @param {string} filterValue Search string.\n *\n * @return {boolean} Whether a request is in progress for the blocks list.\n */\nexport function isRequestingDownloadableBlocks( state, filterValue ) {\n\treturn state.downloadableBlocks[ filterValue ]?.isRequesting ?? false;\n}\n\n/**\n * Returns the available uninstalled blocks.\n *\n * @param {Object} state Global application state.\n * @param {string} filterValue Search string.\n *\n * @return {Array} Downloadable blocks.\n */\nexport function getDownloadableBlocks( state, filterValue ) {\n\treturn state.downloadableBlocks[ filterValue ]?.results ?? [];\n}\n\n/**\n * Returns the block types that have been installed on the server in this\n * session.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} Block type items\n */\nexport function getInstalledBlockTypes( state ) {\n\treturn state.blockManagement.installedBlockTypes;\n}\n\n/**\n * Returns block types that have been installed on the server and used in the\n * current post.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} Block type items.\n */\nexport const getNewBlockTypes = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst usedBlockTree = select( blockEditorStore ).getBlocks();\n\t\tconst installedBlockTypes = getInstalledBlockTypes( state );\n\n\t\treturn installedBlockTypes.filter( ( blockType ) =>\n\t\t\thasBlockType( blockType, usedBlockTree )\n\t\t);\n\t}\n);\n\n/**\n * Returns the block types that have been installed on the server but are not\n * used in the current post.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} Block type items.\n */\nexport const getUnusedBlockTypes = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst usedBlockTree = select( blockEditorStore ).getBlocks();\n\t\tconst installedBlockTypes = getInstalledBlockTypes( state );\n\n\t\treturn installedBlockTypes.filter(\n\t\t\t( blockType ) => ! hasBlockType( blockType, usedBlockTree )\n\t\t);\n\t}\n);\n\n/**\n * Returns true if a block plugin install is in progress.\n *\n * @param {Object} state Global application state.\n * @param {string} blockId Id of the block.\n *\n * @return {boolean} Whether this block is currently being installed.\n */\nexport function isInstalling( state, blockId ) {\n\treturn state.blockManagement.isInstalling[ blockId ] || false;\n}\n\n/**\n * Returns all block error notices.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Object with error notices.\n */\nexport function getErrorNotices( state ) {\n\treturn state.errorNotices;\n}\n\n/**\n * Returns the error notice for a given block.\n *\n * @param {Object} state Global application state.\n * @param {string} blockId The ID of the block plugin. eg: my-block\n *\n * @return {string|boolean} The error text, or false if no error.\n */\nexport function getErrorNoticeForBlock( state, blockId ) {\n\treturn state.errorNotices[ blockId ];\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"lodash\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"i18n\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"apiFetch\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"notices\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"url\"];","/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\n\n/**\n * Load an asset for a block.\n *\n * This function returns a Promise that will resolve once the asset is loaded,\n * or in the case of Stylesheets and Inline JavaScript, will resolve immediately.\n *\n * @param {HTMLElement} el A HTML Element asset to inject.\n *\n * @return {Promise} Promise which will resolve when the asset is loaded.\n */\nexport const loadAsset = ( el ) => {\n\treturn new Promise( ( resolve, reject ) => {\n\t\t/*\n\t\t * Reconstruct the passed element, this is required as inserting the Node directly\n\t\t * won't always fire the required onload events, even if the asset wasn't already loaded.\n\t\t */\n\t\tconst newNode = document.createElement( el.nodeName );\n\n\t\t[ 'id', 'rel', 'src', 'href', 'type' ].forEach( ( attr ) => {\n\t\t\tif ( el[ attr ] ) {\n\t\t\t\tnewNode[ attr ] = el[ attr ];\n\t\t\t}\n\t\t} );\n\n\t\t// Append inline <script> contents.\n\t\tif ( el.innerHTML ) {\n\t\t\tnewNode.appendChild( document.createTextNode( el.innerHTML ) );\n\t\t}\n\n\t\tnewNode.onload = () => resolve( true );\n\t\tnewNode.onerror = () => reject( new Error( 'Error loading asset.' ) );\n\n\t\tdocument.body.appendChild( newNode );\n\n\t\t// Resolve Stylesheets and Inline JavaScript immediately.\n\t\tif (\n\t\t\t'link' === newNode.nodeName.toLowerCase() ||\n\t\t\t( 'script' === newNode.nodeName.toLowerCase() && ! newNode.src )\n\t\t) {\n\t\t\tresolve();\n\t\t}\n\t} );\n};\n\n/**\n * Load the asset files for a block\n */\nexport async function loadAssets() {\n\t/*\n\t * Fetch the current URL (post-new.php, or post.php?post=1&action=edit) and compare the\n\t * JavaScript and CSS assets loaded between the pages. This imports the required assets\n\t * for the block into the current page while not requiring that we know them up-front.\n\t * In the future this can be improved by reliance upon block.json and/or a script-loader\n\t * dependency API.\n\t */\n\tconst response = await apiFetch( {\n\t\turl: document.location.href,\n\t\tparse: false,\n\t} );\n\n\tconst data = await response.text();\n\n\tconst doc = new window.DOMParser().parseFromString( data, 'text/html' );\n\n\tconst newAssets = Array.from(\n\t\tdoc.querySelectorAll( 'link[rel=\"stylesheet\"],script' )\n\t).filter( ( asset ) => asset.id && ! document.getElementById( asset.id ) );\n\n\t/*\n\t * Load each asset in order, as they may depend upon an earlier loaded script.\n\t * Stylesheets and Inline Scripts will resolve immediately upon insertion.\n\t */\n\tfor ( const newAsset of newAssets ) {\n\t\tawait loadAsset( newAsset );\n\t}\n}\n","/**\n * Get the plugin's direct API link out of a block-directory response.\n *\n * @param {Object} block The block object\n *\n * @return {string} The plugin URL, if exists.\n */\nexport default function getPluginUrl( block ) {\n\tif ( ! block ) {\n\t\treturn false;\n\t}\n\tconst link = block.links[ 'wp:plugin' ] || block.links.self;\n\tif ( link && link.length ) {\n\t\treturn link[ 0 ].href;\n\t}\n\treturn false;\n}\n","/**\n * External dependencies\n */\nimport { pick } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tstore as blocksStore,\n\tunstable__bootstrapServerSideBlockDefinitions, // eslint-disable-line camelcase\n} from '@wordpress/blocks';\nimport { __, sprintf } from '@wordpress/i18n';\nimport apiFetch from '@wordpress/api-fetch';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { loadAssets } from './load-assets';\nimport getPluginUrl from './utils/get-plugin-url';\n\n/**\n * Returns an action object used in signalling that the downloadable blocks\n * have been requested and are loading.\n *\n * @param {string} filterValue Search string.\n *\n * @return {Object} Action object.\n */\nexport function fetchDownloadableBlocks( filterValue ) {\n\treturn { type: 'FETCH_DOWNLOADABLE_BLOCKS', filterValue };\n}\n\n/**\n * Returns an action object used in signalling that the downloadable blocks\n * have been updated.\n *\n * @param {Array} downloadableBlocks Downloadable blocks.\n * @param {string} filterValue Search string.\n *\n * @return {Object} Action object.\n */\nexport function receiveDownloadableBlocks( downloadableBlocks, filterValue ) {\n\treturn {\n\t\ttype: 'RECEIVE_DOWNLOADABLE_BLOCKS',\n\t\tdownloadableBlocks,\n\t\tfilterValue,\n\t};\n}\n\n/**\n * Action triggered to install a block plugin.\n *\n * @param {Object} block The block item returned by search.\n *\n * @return {boolean} Whether the block was successfully installed & loaded.\n */\nexport const installBlockType =\n\t( block ) =>\n\tasync ( { registry, dispatch } ) => {\n\t\tconst { id, name } = block;\n\t\tlet success = false;\n\t\tdispatch.clearErrorNotice( id );\n\t\ttry {\n\t\t\tdispatch.setIsInstalling( id, true );\n\n\t\t\t// If we have a wp:plugin link, the plugin is installed but inactive.\n\t\t\tconst url = getPluginUrl( block );\n\t\t\tlet links = {};\n\t\t\tif ( url ) {\n\t\t\t\tawait apiFetch( {\n\t\t\t\t\tmethod: 'PUT',\n\t\t\t\t\turl,\n\t\t\t\t\tdata: { status: 'active' },\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tconst response = await apiFetch( {\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\tpath: 'wp/v2/plugins',\n\t\t\t\t\tdata: { slug: id, status: 'active' },\n\t\t\t\t} );\n\t\t\t\t// Add the `self` link for newly-installed blocks.\n\t\t\t\tlinks = response._links;\n\t\t\t}\n\n\t\t\tdispatch.addInstalledBlockType( {\n\t\t\t\t...block,\n\t\t\t\tlinks: { ...block.links, ...links },\n\t\t\t} );\n\n\t\t\t// Ensures that the block metadata is propagated to the editor when registered on the server.\n\t\t\tconst metadataFields = [\n\t\t\t\t'api_version',\n\t\t\t\t'title',\n\t\t\t\t'category',\n\t\t\t\t'parent',\n\t\t\t\t'icon',\n\t\t\t\t'description',\n\t\t\t\t'keywords',\n\t\t\t\t'attributes',\n\t\t\t\t'provides_context',\n\t\t\t\t'uses_context',\n\t\t\t\t'supports',\n\t\t\t\t'styles',\n\t\t\t\t'example',\n\t\t\t\t'variations',\n\t\t\t];\n\t\t\tawait apiFetch( {\n\t\t\t\tpath: addQueryArgs( `/wp/v2/block-types/${ name }`, {\n\t\t\t\t\t_fields: metadataFields,\n\t\t\t\t} ),\n\t\t\t} )\n\t\t\t\t// Ignore when the block is not registered on the server.\n\t\t\t\t.catch( () => {} )\n\t\t\t\t.then( ( response ) => {\n\t\t\t\t\tif ( ! response ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tunstable__bootstrapServerSideBlockDefinitions( {\n\t\t\t\t\t\t[ name ]: pick( response, metadataFields ),\n\t\t\t\t\t} );\n\t\t\t\t} );\n\n\t\t\tawait loadAssets();\n\t\t\tconst registeredBlocks = registry\n\t\t\t\t.select( blocksStore )\n\t\t\t\t.getBlockTypes();\n\t\t\tif ( ! registeredBlocks.some( ( i ) => i.name === name ) ) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t__( 'Error registering block. Try reloading the page.' )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tregistry.dispatch( noticesStore ).createInfoNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t// translators: %s is the block title.\n\t\t\t\t\t__( 'Block %s installed and added.' ),\n\t\t\t\t\tblock.title\n\t\t\t\t),\n\t\t\t\t{\n\t\t\t\t\tspeak: true,\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t\tsuccess = true;\n\t\t} catch ( error ) {\n\t\t\tlet message = error.message || __( 'An error occurred.' );\n\n\t\t\t// Errors we throw are fatal.\n\t\t\tlet isFatal = error instanceof Error;\n\n\t\t\t// Specific API errors that are fatal.\n\t\t\tconst fatalAPIErrors = {\n\t\t\t\tfolder_exists: __(\n\t\t\t\t\t'This block is already installed. Try reloading the page.'\n\t\t\t\t),\n\t\t\t\tunable_to_connect_to_filesystem: __(\n\t\t\t\t\t'Error installing block. You can reload the page and try again.'\n\t\t\t\t),\n\t\t\t};\n\n\t\t\tif ( fatalAPIErrors[ error.code ] ) {\n\t\t\t\tisFatal = true;\n\t\t\t\tmessage = fatalAPIErrors[ error.code ];\n\t\t\t}\n\n\t\t\tdispatch.setErrorNotice( id, message, isFatal );\n\t\t\tregistry.dispatch( noticesStore ).createErrorNotice( message, {\n\t\t\t\tspeak: true,\n\t\t\t\tisDismissible: true,\n\t\t\t} );\n\t\t}\n\t\tdispatch.setIsInstalling( id, false );\n\t\treturn success;\n\t};\n\n/**\n * Action triggered to uninstall a block plugin.\n *\n * @param {Object} block The blockType object.\n */\nexport const uninstallBlockType =\n\t( block ) =>\n\tasync ( { registry, dispatch } ) => {\n\t\ttry {\n\t\t\tconst url = getPluginUrl( block );\n\t\t\tawait apiFetch( {\n\t\t\t\tmethod: 'PUT',\n\t\t\t\turl,\n\t\t\t\tdata: { status: 'inactive' },\n\t\t\t} );\n\t\t\tawait apiFetch( {\n\t\t\t\tmethod: 'DELETE',\n\t\t\t\turl,\n\t\t\t} );\n\t\t\tdispatch.removeInstalledBlockType( block );\n\t\t} catch ( error ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice(\n\t\t\t\t\terror.message || __( 'An error occurred.' )\n\t\t\t\t);\n\t\t}\n\t};\n\n/**\n * Returns an action object used to add a block type to the \"newly installed\"\n * tracking list.\n *\n * @param {Object} item The block item with the block id and name.\n *\n * @return {Object} Action object.\n */\nexport function addInstalledBlockType( item ) {\n\treturn {\n\t\ttype: 'ADD_INSTALLED_BLOCK_TYPE',\n\t\titem,\n\t};\n}\n\n/**\n * Returns an action object used to remove a block type from the \"newly installed\"\n * tracking list.\n *\n * @param {string} item The block item with the block id and name.\n *\n * @return {Object} Action object.\n */\nexport function removeInstalledBlockType( item ) {\n\treturn {\n\t\ttype: 'REMOVE_INSTALLED_BLOCK_TYPE',\n\t\titem,\n\t};\n}\n\n/**\n * Returns an action object used to indicate install in progress.\n *\n * @param {string} blockId\n * @param {boolean} isInstalling\n *\n * @return {Object} Action object.\n */\nexport function setIsInstalling( blockId, isInstalling ) {\n\treturn {\n\t\ttype: 'SET_INSTALLING_BLOCK',\n\t\tblockId,\n\t\tisInstalling,\n\t};\n}\n\n/**\n * Sets an error notice to be displayed to the user for a given block.\n *\n * @param {string} blockId The ID of the block plugin. eg: my-block\n * @param {string} message The message shown in the notice.\n * @param {boolean} isFatal Whether the user can recover from the error.\n *\n * @return {Object} Action object.\n */\nexport function setErrorNotice( blockId, message, isFatal = false ) {\n\treturn {\n\t\ttype: 'SET_ERROR_NOTICE',\n\t\tblockId,\n\t\tmessage,\n\t\tisFatal,\n\t};\n}\n\n/**\n * Sets the error notice to empty for specific block.\n *\n * @param {string} blockId The ID of the block plugin. eg: my-block\n *\n * @return {Object} Action object.\n */\nexport function clearErrorNotice( blockId ) {\n\treturn {\n\t\ttype: 'CLEAR_ERROR_NOTICE',\n\t\tblockId,\n\t};\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || from);\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","/**\n * Locale character mapping rules.\n */\ninterface Locale {\n regexp: RegExp;\n map: Record<string, string>;\n}\n\n/**\n * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt\n */\nconst SUPPORTED_LOCALE: Record<string, Locale> = {\n tr: {\n regexp: /\\u0130|\\u0049|\\u0049\\u0307/g,\n map: {\n İ: \"\\u0069\",\n I: \"\\u0131\",\n İ: \"\\u0069\",\n },\n },\n az: {\n regexp: /\\u0130/g,\n map: {\n İ: \"\\u0069\",\n I: \"\\u0131\",\n İ: \"\\u0069\",\n },\n },\n lt: {\n regexp: /\\u0049|\\u004A|\\u012E|\\u00CC|\\u00CD|\\u0128/g,\n map: {\n I: \"\\u0069\\u0307\",\n J: \"\\u006A\\u0307\",\n Į: \"\\u012F\\u0307\",\n Ì: \"\\u0069\\u0307\\u0300\",\n Í: \"\\u0069\\u0307\\u0301\",\n Ĩ: \"\\u0069\\u0307\\u0303\",\n },\n },\n};\n\n/**\n * Localized lower case.\n */\nexport function localeLowerCase(str: string, locale: string) {\n const lang = SUPPORTED_LOCALE[locale.toLowerCase()];\n if (lang) return lowerCase(str.replace(lang.regexp, (m) => lang.map[m]));\n return lowerCase(str);\n}\n\n/**\n * Lower case as a function.\n */\nexport function lowerCase(str: string) {\n return str.toLowerCase();\n}\n","import { lowerCase } from \"lower-case\";\n\nexport interface Options {\n splitRegexp?: RegExp | RegExp[];\n stripRegexp?: RegExp | RegExp[];\n delimiter?: string;\n transform?: (part: string, index: number, parts: string[]) => string;\n}\n\n// Support camel case (\"camelCase\" -> \"camel Case\" and \"CAMELCase\" -> \"CAMEL Case\").\nconst DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];\n\n// Remove all non-word characters.\nconst DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;\n\n/**\n * Normalize the string into something other libraries can manipulate easier.\n */\nexport function noCase(input: string, options: Options = {}) {\n const {\n splitRegexp = DEFAULT_SPLIT_REGEXP,\n stripRegexp = DEFAULT_STRIP_REGEXP,\n transform = lowerCase,\n delimiter = \" \",\n } = options;\n\n let result = replace(\n replace(input, splitRegexp, \"$1\\0$2\"),\n stripRegexp,\n \"\\0\"\n );\n let start = 0;\n let end = result.length;\n\n // Trim the delimiter from around the output string.\n while (result.charAt(start) === \"\\0\") start++;\n while (result.charAt(end - 1) === \"\\0\") end--;\n\n // Transform each token independently.\n return result.slice(start, end).split(\"\\0\").map(transform).join(delimiter);\n}\n\n/**\n * Replace `re` in the input string with the replacement value.\n */\nfunction replace(input: string, re: RegExp | RegExp[], value: string) {\n if (re instanceof RegExp) return input.replace(re, value);\n return re.reduce((input, re) => input.replace(re, value), input);\n}\n","import { noCase, Options } from \"no-case\";\n\nexport { Options };\n\nexport function pascalCaseTransform(input: string, index: number) {\n const firstChar = input.charAt(0);\n const lowerChars = input.substr(1).toLowerCase();\n if (index > 0 && firstChar >= \"0\" && firstChar <= \"9\") {\n return `_${firstChar}${lowerChars}`;\n }\n return `${firstChar.toUpperCase()}${lowerChars}`;\n}\n\nexport function pascalCaseTransformMerge(input: string) {\n return input.charAt(0).toUpperCase() + input.slice(1).toLowerCase();\n}\n\nexport function pascalCase(input: string, options: Options = {}) {\n return noCase(input, {\n delimiter: \"\",\n transform: pascalCaseTransform,\n ...options,\n });\n}\n","import {\n pascalCase,\n pascalCaseTransform,\n pascalCaseTransformMerge,\n Options,\n} from \"pascal-case\";\n\nexport { Options };\n\nexport function camelCaseTransform(input: string, index: number) {\n if (index === 0) return input.toLowerCase();\n return pascalCaseTransform(input, index);\n}\n\nexport function camelCaseTransformMerge(input: string, index: number) {\n if (index === 0) return input.toLowerCase();\n return pascalCaseTransformMerge(input);\n}\n\nexport function camelCase(input: string, options: Options = {}) {\n return pascalCase(input, {\n transform: camelCaseTransform,\n ...options,\n });\n}\n","/**\n * External dependencies\n */\nimport { camelCase } from 'change-case';\n\n/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\n\n/**\n * Internal dependencies\n */\nimport { fetchDownloadableBlocks, receiveDownloadableBlocks } from './actions';\n\nexport const getDownloadableBlocks =\n\t( filterValue ) =>\n\tasync ( { dispatch } ) => {\n\t\tif ( ! filterValue ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tdispatch( fetchDownloadableBlocks( filterValue ) );\n\t\t\tconst results = await apiFetch( {\n\t\t\t\tpath: `wp/v2/block-directory/search?term=${ filterValue }`,\n\t\t\t} );\n\t\t\tconst blocks = results.map( ( result ) =>\n\t\t\t\tObject.fromEntries(\n\t\t\t\t\tObject.entries( result ).map( ( [ key, value ] ) => [\n\t\t\t\t\t\tcamelCase( key ),\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t] )\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tdispatch( receiveDownloadableBlocks( blocks, filterValue ) );\n\t\t} catch {}\n\t};\n","/**\n * WordPress dependencies\n */\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as selectors from './selectors';\nimport * as actions from './actions';\nimport * as resolvers from './resolvers';\n\n/**\n * Module Constants\n */\nconst STORE_NAME = 'core/block-directory';\n\n/**\n * Block editor data store configuration.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore\n *\n * @type {Object}\n */\nexport const storeConfig = {\n\treducer,\n\tselectors,\n\tactions,\n\tresolvers,\n};\n\n/**\n * Store definition for the block directory 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 );\n\nregister( store );\n","/**\n * WordPress dependencies\n */\nimport { unregisterBlockType } from '@wordpress/blocks';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { store as blockDirectoryStore } from '../../store';\n\nexport default function AutoBlockUninstaller() {\n\tconst { uninstallBlockType } = useDispatch( blockDirectoryStore );\n\n\tconst shouldRemoveBlockTypes = useSelect( ( select ) => {\n\t\tconst { isAutosavingPost, isSavingPost } = select( editorStore );\n\t\treturn isSavingPost() && ! isAutosavingPost();\n\t}, [] );\n\n\tconst unusedBlockTypes = useSelect(\n\t\t( select ) => select( blockDirectoryStore ).getUnusedBlockTypes(),\n\t\t[]\n\t);\n\n\tuseEffect( () => {\n\t\tif ( shouldRemoveBlockTypes && unusedBlockTypes.length ) {\n\t\t\tunusedBlockTypes.forEach( ( blockType ) => {\n\t\t\t\tuninstallBlockType( blockType );\n\t\t\t\tunregisterBlockType( blockType.name );\n\t\t\t} );\n\t\t}\n\t}, [ shouldRemoveBlockTypes ] );\n\n\treturn null;\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"compose\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"components\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"coreData\"];","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"htmlEntities\"];","/**\n * WordPress dependencies\n */\nimport { cloneElement } from '@wordpress/element';\n\n/** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */\n\n/**\n * Return an SVG icon.\n *\n * @param {IconProps} props icon is the SVG component to render\n * size is a number specifiying the icon size in pixels\n * Other props will be passed to wrapped SVG component\n *\n * @return {JSX.Element} Icon component\n */\nfunction Icon( { icon, size = 24, ...props } ) {\n\treturn cloneElement( icon, {\n\t\twidth: size,\n\t\theight: size,\n\t\t...props,\n\t} );\n}\n\nexport default Icon;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"primitives\"];","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst starFilled = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z\" />\n\t</SVG>\n);\n\nexport default starFilled;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst starHalf = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M9.518 8.783a.25.25 0 00.188-.137l2.069-4.192a.25.25 0 01.448 0l2.07 4.192a.25.25 0 00.187.137l4.626.672a.25.25 0 01.139.427l-3.347 3.262a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.363.264l-4.137-2.176a.25.25 0 00-.233 0l-4.138 2.175a.25.25 0 01-.362-.263l.79-4.607a.25.25 0 00-.072-.222L4.753 9.882a.25.25 0 01.14-.427l4.625-.672zM12 14.533c.28 0 .559.067.814.2l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39v7.143z\" />\n\t</SVG>\n);\n\nexport default starHalf;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst starEmpty = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\td=\"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z\"\n\t\t\tclipRule=\"evenodd\"\n\t\t/>\n\t</SVG>\n);\n\nexport default starEmpty;\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Icon, starEmpty, starFilled, starHalf } from '@wordpress/icons';\n\nfunction Stars( { rating } ) {\n\tconst stars = Math.round( rating / 0.5 ) * 0.5;\n\n\tconst fullStarCount = Math.floor( rating );\n\tconst halfStarCount = Math.ceil( rating - fullStarCount );\n\tconst emptyStarCount = 5 - ( fullStarCount + halfStarCount );\n\n\treturn (\n\t\t<span\n\t\t\taria-label={ sprintf(\n\t\t\t\t/* translators: %s: number of stars. */\n\t\t\t\t__( '%s out of 5 stars' ),\n\t\t\t\tstars\n\t\t\t) }\n\t\t>\n\t\t\t{ Array.from( { length: fullStarCount } ).map( ( _, i ) => (\n\t\t\t\t<Icon\n\t\t\t\t\tkey={ `full_stars_${ i }` }\n\t\t\t\t\tclassName=\"block-directory-block-ratings__star-full\"\n\t\t\t\t\ticon={ starFilled }\n\t\t\t\t\tsize={ 16 }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t\t{ Array.from( { length: halfStarCount } ).map( ( _, i ) => (\n\t\t\t\t<Icon\n\t\t\t\t\tkey={ `half_stars_${ i }` }\n\t\t\t\t\tclassName=\"block-directory-block-ratings__star-half-full\"\n\t\t\t\t\ticon={ starHalf }\n\t\t\t\t\tsize={ 16 }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t\t{ Array.from( { length: emptyStarCount } ).map( ( _, i ) => (\n\t\t\t\t<Icon\n\t\t\t\t\tkey={ `empty_stars_${ i }` }\n\t\t\t\t\tclassName=\"block-directory-block-ratings__star-empty\"\n\t\t\t\t\ticon={ starEmpty }\n\t\t\t\t\tsize={ 16 }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</span>\n\t);\n}\n\nexport default Stars;\n","/**\n * Internal dependencies\n */\nimport Stars from './stars';\n\nexport const BlockRatings = ( { rating } ) => (\n\t<span className=\"block-directory-block-ratings\">\n\t\t<Stars rating={ rating } />\n\t</span>\n);\n\nexport default BlockRatings;\n","/**\n * WordPress dependencies\n */\nimport { BlockIcon } from '@wordpress/block-editor';\n\nfunction DownloadableBlockIcon( { icon } ) {\n\tconst className = 'block-directory-downloadable-block-icon';\n\treturn icon.match( /\\.(jpeg|jpg|gif|png|svg)(?:\\?.*)?$/ ) !== null ? (\n\t\t<img className={ className } src={ icon } alt=\"\" />\n\t) : (\n\t\t<BlockIcon className={ className } icon={ icon } showColors />\n\t);\n}\n\nexport default DownloadableBlockIcon;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockDirectoryStore } from '../../store';\n\nexport const DownloadableBlockNotice = ( { block } ) => {\n\tconst errorNotice = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blockDirectoryStore ).getErrorNoticeForBlock( block.id ),\n\t\t[ block ]\n\t);\n\n\tif ( ! errorNotice ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div className=\"block-directory-downloadable-block-notice\">\n\t\t\t<div className=\"block-directory-downloadable-block-notice__content\">\n\t\t\t\t{ errorNotice.message }\n\t\t\t\t{ errorNotice.isFatal\n\t\t\t\t\t? ' ' + __( 'Try reloading the page.' )\n\t\t\t\t\t: null }\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default DownloadableBlockNotice;\n","/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport {\n\tButton,\n\tSpinner,\n\tVisuallyHidden,\n\t__unstableCompositeItem as CompositeItem,\n} from '@wordpress/components';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { getBlockType } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport BlockRatings from '../block-ratings';\nimport DownloadableBlockIcon from '../downloadable-block-icon';\nimport DownloadableBlockNotice from '../downloadable-block-notice';\nimport { store as blockDirectoryStore } from '../../store';\n\n// Return the appropriate block item label, given the block data and status.\nfunction getDownloadableBlockLabel(\n\t{ title, rating, ratingCount },\n\t{ hasNotice, isInstalled, isInstalling }\n) {\n\tconst stars = Math.round( rating / 0.5 ) * 0.5;\n\n\tif ( ! isInstalled && hasNotice ) {\n\t\t/* translators: %1$s: block title */\n\t\treturn sprintf( 'Retry installing %s.', decodeEntities( title ) );\n\t}\n\n\tif ( isInstalled ) {\n\t\t/* translators: %1$s: block title */\n\t\treturn sprintf( 'Add %s.', decodeEntities( title ) );\n\t}\n\n\tif ( isInstalling ) {\n\t\t/* translators: %1$s: block title */\n\t\treturn sprintf( 'Installing %s.', decodeEntities( title ) );\n\t}\n\n\t// No ratings yet, just use the title.\n\tif ( ratingCount < 1 ) {\n\t\t/* translators: %1$s: block title */\n\t\treturn sprintf( 'Install %s.', decodeEntities( title ) );\n\t}\n\n\treturn sprintf(\n\t\t/* translators: %1$s: block title, %2$s: average rating, %3$s: total ratings count. */\n\t\t_n(\n\t\t\t'Install %1$s. %2$s stars with %3$s review.',\n\t\t\t'Install %1$s. %2$s stars with %3$s reviews.',\n\t\t\tratingCount\n\t\t),\n\t\tdecodeEntities( title ),\n\t\tstars,\n\t\tratingCount\n\t);\n}\n\nfunction DownloadableBlockListItem( { composite, item, onClick } ) {\n\tconst { author, description, icon, rating, title } = item;\n\t// getBlockType returns a block object if this block exists, or null if not.\n\tconst isInstalled = !! getBlockType( item.name );\n\n\tconst { hasNotice, isInstalling, isInstallable } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getErrorNoticeForBlock, isInstalling: isBlockInstalling } =\n\t\t\t\tselect( blockDirectoryStore );\n\t\t\tconst notice = getErrorNoticeForBlock( item.id );\n\t\t\tconst hasFatal = notice && notice.isFatal;\n\t\t\treturn {\n\t\t\t\thasNotice: !! notice,\n\t\t\t\tisInstalling: isBlockInstalling( item.id ),\n\t\t\t\tisInstallable: ! hasFatal,\n\t\t\t};\n\t\t},\n\t\t[ item ]\n\t);\n\n\tlet statusText = '';\n\tif ( isInstalled ) {\n\t\tstatusText = __( 'Installed!' );\n\t} else if ( isInstalling ) {\n\t\tstatusText = __( 'Installing…' );\n\t}\n\n\treturn (\n\t\t<CompositeItem\n\t\t\t__experimentalIsFocusable\n\t\t\trole=\"option\"\n\t\t\tas={ Button }\n\t\t\t{ ...composite }\n\t\t\tclassName=\"block-directory-downloadable-block-list-item\"\n\t\t\tonClick={ ( event ) => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tonClick();\n\t\t\t} }\n\t\t\tisBusy={ isInstalling }\n\t\t\tdisabled={ isInstalling || ! isInstallable }\n\t\t\tlabel={ getDownloadableBlockLabel( item, {\n\t\t\t\thasNotice,\n\t\t\t\tisInstalled,\n\t\t\t\tisInstalling,\n\t\t\t} ) }\n\t\t\tshowTooltip={ true }\n\t\t\ttooltipPosition=\"top center\"\n\t\t>\n\t\t\t<div className=\"block-directory-downloadable-block-list-item__icon\">\n\t\t\t\t<DownloadableBlockIcon icon={ icon } title={ title } />\n\t\t\t\t{ isInstalling ? (\n\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__spinner\">\n\t\t\t\t\t\t<Spinner />\n\t\t\t\t\t</span>\n\t\t\t\t) : (\n\t\t\t\t\t<BlockRatings rating={ rating } />\n\t\t\t\t) }\n\t\t\t</div>\n\t\t\t<span className=\"block-directory-downloadable-block-list-item__details\">\n\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__title\">\n\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t/* translators: %1$s: block title, %2$s: author name. */\n\t\t\t\t\t\t\t__( '%1$s <span>by %2$s</span>' ),\n\t\t\t\t\t\t\tdecodeEntities( title ),\n\t\t\t\t\t\t\tauthor\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tspan: (\n\t\t\t\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__author\" />\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</span>\n\t\t\t\t{ hasNotice ? (\n\t\t\t\t\t<DownloadableBlockNotice block={ item } />\n\t\t\t\t) : (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__desc\">\n\t\t\t\t\t\t\t{ !! statusText\n\t\t\t\t\t\t\t\t? statusText\n\t\t\t\t\t\t\t\t: decodeEntities( description ) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t{ isInstallable &&\n\t\t\t\t\t\t\t! ( isInstalled || isInstalling ) && (\n\t\t\t\t\t\t\t\t<VisuallyHidden>\n\t\t\t\t\t\t\t\t\t{ __( 'Install block' ) }\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</span>\n\t\t</CompositeItem>\n\t);\n}\n\nexport default DownloadableBlockListItem;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__unstableComposite as Composite,\n\t__unstableUseCompositeState as useCompositeState,\n} from '@wordpress/components';\nimport { getBlockType } from '@wordpress/blocks';\nimport { useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport DownloadableBlockListItem from '../downloadable-block-list-item';\nimport { store as blockDirectoryStore } from '../../store';\n\nconst noop = () => {};\n\nfunction DownloadableBlocksList( { items, onHover = noop, onSelect } ) {\n\tconst composite = useCompositeState();\n\tconst { installBlockType } = useDispatch( blockDirectoryStore );\n\n\tif ( ! items.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Composite\n\t\t\t{ ...composite }\n\t\t\trole=\"listbox\"\n\t\t\tclassName=\"block-directory-downloadable-blocks-list\"\n\t\t\taria-label={ __( 'Blocks available for install' ) }\n\t\t>\n\t\t\t{ items.map( ( item ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<DownloadableBlockListItem\n\t\t\t\t\t\tkey={ item.id }\n\t\t\t\t\t\tcomposite={ composite }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t// Check if the block is registered (`getBlockType`\n\t\t\t\t\t\t\t// will return an object). If so, insert the block.\n\t\t\t\t\t\t\t// This prevents installing existing plugins.\n\t\t\t\t\t\t\tif ( getBlockType( item.name ) ) {\n\t\t\t\t\t\t\t\tonSelect( item );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tinstallBlockType( item ).then( ( success ) => {\n\t\t\t\t\t\t\t\t\tif ( success ) {\n\t\t\t\t\t\t\t\t\t\tonSelect( item );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonHover( null );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\titem={ item }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Composite>\n\t);\n}\n\nexport default DownloadableBlocksList;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"a11y\"];","/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\nimport { speak } from '@wordpress/a11y';\n\nfunction DownloadableBlocksInserterPanel( {\n\tchildren,\n\tdownloadableItems,\n\thasLocalBlocks,\n} ) {\n\tconst count = downloadableItems.length;\n\tuseEffect( () => {\n\t\tspeak(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %d: number of available blocks. */\n\t\t\t\t_n(\n\t\t\t\t\t'%d additional block is available to install.',\n\t\t\t\t\t'%d additional blocks are available to install.',\n\t\t\t\t\tcount\n\t\t\t\t),\n\t\t\t\tcount\n\t\t\t)\n\t\t);\n\t}, [ count ] );\n\n\treturn (\n\t\t<>\n\t\t\t{ ! hasLocalBlocks && (\n\t\t\t\t<p className=\"block-directory-downloadable-blocks-panel__no-local\">\n\t\t\t\t\t{ __( 'No results available from your installed blocks.' ) }\n\t\t\t\t</p>\n\t\t\t) }\n\n\t\t\t<div className=\"block-editor-inserter__quick-inserter-separator\" />\n\n\t\t\t<div className=\"block-directory-downloadable-blocks-panel\">\n\t\t\t\t<div className=\"block-directory-downloadable-blocks-panel__header\">\n\t\t\t\t\t<h2 className=\"block-directory-downloadable-blocks-panel__title\">\n\t\t\t\t\t\t{ __( 'Available to install' ) }\n\t\t\t\t\t</h2>\n\t\t\t\t\t<p className=\"block-directory-downloadable-blocks-panel__description\">\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'Select a block to install and add it to your post.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default DownloadableBlocksInserterPanel;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst blockDefault = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z\" />\n\t</SVG>\n);\n\nexport default blockDefault;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Icon, blockDefault } from '@wordpress/icons';\nimport { Tip, ExternalLink } from '@wordpress/components';\n\nfunction DownloadableBlocksNoResults() {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"block-editor-inserter__no-results\">\n\t\t\t\t<Icon\n\t\t\t\t\tclassName=\"block-editor-inserter__no-results-icon\"\n\t\t\t\t\ticon={ blockDefault }\n\t\t\t\t/>\n\t\t\t\t<p>{ __( 'No results found.' ) }</p>\n\t\t\t</div>\n\t\t\t<div className=\"block-editor-inserter__tips\">\n\t\t\t\t<Tip>\n\t\t\t\t\t{ __( 'Interested in creating your own block?' ) }\n\t\t\t\t\t<br />\n\t\t\t\t\t<ExternalLink href=\"https://developer.wordpress.org/block-editor/\">\n\t\t\t\t\t\t{ __( 'Get started here' ) }.\n\t\t\t\t\t</ExternalLink>\n\t\t\t\t</Tip>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default DownloadableBlocksNoResults;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Spinner } from '@wordpress/components';\nimport { compose } from '@wordpress/compose';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport DownloadableBlocksList from '../downloadable-blocks-list';\nimport DownloadableBlocksInserterPanel from './inserter-panel';\nimport DownloadableBlocksNoResults from './no-results';\nimport { store as blockDirectoryStore } from '../../store';\n\nfunction DownloadableBlocksPanel( {\n\tdownloadableItems,\n\tonSelect,\n\tonHover,\n\thasLocalBlocks,\n\thasPermission,\n\tisLoading,\n\tisTyping,\n} ) {\n\tif ( typeof hasPermission === 'undefined' || isLoading || isTyping ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ hasPermission && ! hasLocalBlocks && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<p className=\"block-directory-downloadable-blocks-panel__no-local\">\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'No results available from your installed blocks.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<div className=\"block-editor-inserter__quick-inserter-separator\" />\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t\t<div className=\"block-directory-downloadable-blocks-panel has-blocks-loading\">\n\t\t\t\t\t<Spinner />\n\t\t\t\t</div>\n\t\t\t</>\n\t\t);\n\t}\n\n\tif ( false === hasPermission ) {\n\t\tif ( ! hasLocalBlocks ) {\n\t\t\treturn <DownloadableBlocksNoResults />;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\treturn !! downloadableItems.length ? (\n\t\t<DownloadableBlocksInserterPanel\n\t\t\tdownloadableItems={ downloadableItems }\n\t\t\thasLocalBlocks={ hasLocalBlocks }\n\t\t>\n\t\t\t<DownloadableBlocksList\n\t\t\t\titems={ downloadableItems }\n\t\t\t\tonSelect={ onSelect }\n\t\t\t\tonHover={ onHover }\n\t\t\t/>\n\t\t</DownloadableBlocksInserterPanel>\n\t) : (\n\t\t! hasLocalBlocks && <DownloadableBlocksNoResults />\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select, { filterValue, rootClientId = null } ) => {\n\t\tconst { getDownloadableBlocks, isRequestingDownloadableBlocks } =\n\t\t\tselect( blockDirectoryStore );\n\t\tconst { canInsertBlockType } = select( blockEditorStore );\n\n\t\tconst hasPermission = select( coreStore ).canUser(\n\t\t\t'read',\n\t\t\t'block-directory/search'\n\t\t);\n\n\t\tfunction getInstallableBlocks( term ) {\n\t\t\treturn getDownloadableBlocks( term ).filter( ( block ) =>\n\t\t\t\tcanInsertBlockType( block, rootClientId, true )\n\t\t\t);\n\t\t}\n\n\t\tconst downloadableItems = hasPermission\n\t\t\t? getInstallableBlocks( filterValue )\n\t\t\t: [];\n\t\tconst isLoading = isRequestingDownloadableBlocks( filterValue );\n\n\t\treturn {\n\t\t\tdownloadableItems,\n\t\t\thasPermission,\n\t\t\tisLoading,\n\t\t};\n\t} ),\n] )( DownloadableBlocksPanel );\n","/**\n * WordPress dependencies\n */\nimport { __unstableInserterMenuExtension } from '@wordpress/block-editor';\nimport { debounce } from '@wordpress/compose';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport DownloadableBlocksPanel from '../../components/downloadable-blocks-panel';\n\nfunction InserterMenuDownloadableBlocksPanel() {\n\tconst [ debouncedFilterValue, setFilterValue ] = useState( '' );\n\tconst debouncedSetFilterValue = debounce( setFilterValue, 400 );\n\n\treturn (\n\t\t<__unstableInserterMenuExtension>\n\t\t\t{ ( {\n\t\t\t\tonSelect,\n\t\t\t\tonHover,\n\t\t\t\tfilterValue,\n\t\t\t\thasItems,\n\t\t\t\trootClientId,\n\t\t\t} ) => {\n\t\t\t\tif ( debouncedFilterValue !== filterValue ) {\n\t\t\t\t\tdebouncedSetFilterValue( filterValue );\n\t\t\t\t}\n\n\t\t\t\tif ( ! debouncedFilterValue ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<DownloadableBlocksPanel\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\t\tfilterValue={ debouncedFilterValue }\n\t\t\t\t\t\thasLocalBlocks={ hasItems }\n\t\t\t\t\t\tisTyping={ filterValue !== debouncedFilterValue }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} }\n\t\t</__unstableInserterMenuExtension>\n\t);\n}\n\nexport default InserterMenuDownloadableBlocksPanel;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"editPost\"];","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport DownloadableBlockIcon from '../downloadable-block-icon';\n\nexport default function CompactList( { items } ) {\n\tif ( ! items.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<ul className=\"block-directory-compact-list\">\n\t\t\t{ items.map( ( { icon, id, title, author } ) => (\n\t\t\t\t<li key={ id } className=\"block-directory-compact-list__item\">\n\t\t\t\t\t<DownloadableBlockIcon icon={ icon } title={ title } />\n\n\t\t\t\t\t<div className=\"block-directory-compact-list__item-details\">\n\t\t\t\t\t\t<div className=\"block-directory-compact-list__item-title\">\n\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"block-directory-compact-list__item-author\">\n\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: Name of the block author. */\n\t\t\t\t\t\t\t\t__( 'By %s' ),\n\t\t\t\t\t\t\t\tauthor\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t) ) }\n\t\t</ul>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { _n, sprintf } from '@wordpress/i18n';\nimport { PluginPrePublishPanel } from '@wordpress/edit-post';\nimport { useSelect } from '@wordpress/data';\nimport { blockDefault } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport CompactList from '../../components/compact-list';\nimport { store as blockDirectoryStore } from '../../store';\n\nexport default function InstalledBlocksPrePublishPanel() {\n\tconst newBlockTypes = useSelect(\n\t\t( select ) => select( blockDirectoryStore ).getNewBlockTypes(),\n\t\t[]\n\t);\n\n\tif ( ! newBlockTypes.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PluginPrePublishPanel\n\t\t\ticon={ blockDefault }\n\t\t\ttitle={ sprintf(\n\t\t\t\t// translators: %d: number of blocks (number).\n\t\t\t\t_n(\n\t\t\t\t\t'Added: %d block',\n\t\t\t\t\t'Added: %d blocks',\n\t\t\t\t\tnewBlockTypes.length\n\t\t\t\t),\n\t\t\t\tnewBlockTypes.length\n\t\t\t) }\n\t\t\tinitialOpen={ true }\n\t\t>\n\t\t\t<p className=\"installed-blocks-pre-publish-panel__copy\">\n\t\t\t\t{ _n(\n\t\t\t\t\t'The following block has been added to your site.',\n\t\t\t\t\t'The following blocks have been added to your site.',\n\t\t\t\t\tnewBlockTypes.length\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<CompactList items={ newBlockTypes } />\n\t\t</PluginPrePublishPanel>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { createBlock, getBlockType, parse } from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as blockDirectoryStore } from '../../store';\n\nexport default function InstallButton( { attributes, block, clientId } ) {\n\tconst isInstallingBlock = useSelect(\n\t\t( select ) => select( blockDirectoryStore ).isInstalling( block.id ),\n\t\t[ block.id ]\n\t);\n\tconst { installBlockType } = useDispatch( blockDirectoryStore );\n\tconst { replaceBlock } = useDispatch( blockEditorStore );\n\n\treturn (\n\t\t<Button\n\t\t\tonClick={ () =>\n\t\t\t\tinstallBlockType( block ).then( ( success ) => {\n\t\t\t\t\tif ( success ) {\n\t\t\t\t\t\tconst blockType = getBlockType( block.name );\n\t\t\t\t\t\tconst [ originalBlock ] = parse(\n\t\t\t\t\t\t\tattributes.originalContent\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif ( originalBlock && blockType ) {\n\t\t\t\t\t\t\treplaceBlock(\n\t\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\t\tcreateBlock(\n\t\t\t\t\t\t\t\t\tblockType.name,\n\t\t\t\t\t\t\t\t\toriginalBlock.attributes,\n\t\t\t\t\t\t\t\t\toriginalBlock.innerBlocks\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} )\n\t\t\t}\n\t\t\tdisabled={ isInstallingBlock }\n\t\t\tisBusy={ isInstallingBlock }\n\t\t\tvariant=\"primary\"\n\t\t>\n\t\t\t{ sprintf(\n\t\t\t\t/* translators: %s: block name */\n\t\t\t\t__( 'Install %s' ),\n\t\t\t\tblock.title\n\t\t\t) }\n\t\t</Button>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { createBlock } from '@wordpress/blocks';\nimport { RawHTML } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tWarning,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport InstallButton from './install-button';\nimport { store as blockDirectoryStore } from '../../store';\n\nconst getInstallMissing = ( OriginalComponent ) => ( props ) => {\n\tconst { originalName } = props.attributes;\n\t// Disable reason: This is a valid component, but it's mistaken for a callback.\n\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\tconst { block, hasPermission } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getDownloadableBlocks } = select( blockDirectoryStore );\n\t\t\tconst blocks = getDownloadableBlocks(\n\t\t\t\t'block:' + originalName\n\t\t\t).filter( ( { name } ) => originalName === name );\n\t\t\treturn {\n\t\t\t\thasPermission: select( coreStore ).canUser(\n\t\t\t\t\t'read',\n\t\t\t\t\t'block-directory/search'\n\t\t\t\t),\n\t\t\t\tblock: blocks.length && blocks[ 0 ],\n\t\t\t};\n\t\t},\n\t\t[ originalName ]\n\t);\n\n\t// The user can't install blocks, or the block isn't available for download.\n\tif ( ! hasPermission || ! block ) {\n\t\treturn <OriginalComponent { ...props } />;\n\t}\n\n\treturn <ModifiedWarning { ...props } originalBlock={ block } />;\n};\n\nconst ModifiedWarning = ( { originalBlock, ...props } ) => {\n\tconst { originalName, originalUndelimitedContent, clientId } =\n\t\tprops.attributes;\n\tconst { replaceBlock } = useDispatch( blockEditorStore );\n\tconst convertToHTML = () => {\n\t\treplaceBlock(\n\t\t\tprops.clientId,\n\t\t\tcreateBlock( 'core/html', {\n\t\t\t\tcontent: originalUndelimitedContent,\n\t\t\t} )\n\t\t);\n\t};\n\n\tconst hasContent = !! originalUndelimitedContent;\n\tconst hasHTMLBlock = useSelect(\n\t\t( select ) => {\n\t\t\tconst { canInsertBlockType, getBlockRootClientId } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\treturn canInsertBlockType(\n\t\t\t\t'core/html',\n\t\t\t\tgetBlockRootClientId( clientId )\n\t\t\t);\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tlet messageHTML = sprintf(\n\t\t/* translators: %s: block name */\n\t\t__(\n\t\t\t'Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely.'\n\t\t),\n\t\toriginalBlock.title || originalName\n\t);\n\tconst actions = [\n\t\t<InstallButton\n\t\t\tkey=\"install\"\n\t\t\tblock={ originalBlock }\n\t\t\tattributes={ props.attributes }\n\t\t\tclientId={ props.clientId }\n\t\t/>,\n\t];\n\n\tif ( hasContent && hasHTMLBlock ) {\n\t\tmessageHTML = sprintf(\n\t\t\t/* translators: %s: block name */\n\t\t\t__(\n\t\t\t\t'Your site doesn’t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely.'\n\t\t\t),\n\t\t\toriginalBlock.title || originalName\n\t\t);\n\t\tactions.push(\n\t\t\t<Button key=\"convert\" onClick={ convertToHTML } variant=\"link\">\n\t\t\t\t{ __( 'Keep as HTML' ) }\n\t\t\t</Button>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div { ...useBlockProps() }>\n\t\t\t<Warning actions={ actions }>{ messageHTML }</Warning>\n\t\t\t<RawHTML>{ originalUndelimitedContent }</RawHTML>\n\t\t</div>\n\t);\n};\n\nexport default getInstallMissing;\n","/**\n * WordPress dependencies\n */\nimport { registerPlugin } from '@wordpress/plugins';\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport AutoBlockUninstaller from '../components/auto-block-uninstaller';\nimport InserterMenuDownloadableBlocksPanel from './inserter-menu-downloadable-blocks-panel';\nimport InstalledBlocksPrePublishPanel from './installed-blocks-pre-publish-panel';\nimport getInstallMissing from './get-install-missing';\n\nregisterPlugin( 'block-directory', {\n\trender() {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<AutoBlockUninstaller />\n\t\t\t\t<InserterMenuDownloadableBlocksPanel />\n\t\t\t\t<InstalledBlocksPrePublishPanel />\n\t\t\t</>\n\t\t);\n\t},\n} );\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'block-directory/fallback',\n\t( settings, name ) => {\n\t\tif ( name !== 'core/missing' ) {\n\t\t\treturn settings;\n\t\t}\n\t\tsettings.edit = getInstallMissing( settings.edit );\n\n\t\treturn settings;\n\t}\n);\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","window","combineReducers","downloadableBlocks","state","action","type","filterValue","isRequesting","results","blockManagement","installedBlockTypes","isInstalling","item","filter","blockType","name","blockId","errorNotices","message","isFatal","restState","hasBlockType","blocks","length","some","i","innerBlocks","isRequestingDownloadableBlocks","getDownloadableBlocks","getInstalledBlockTypes","getNewBlockTypes","createRegistrySelector","select","usedBlockTree","blockEditorStore","getBlocks","getUnusedBlockTypes","getErrorNotices","getErrorNoticeForBlock","loadAsset","el","Promise","resolve","reject","newNode","document","createElement","nodeName","forEach","attr","innerHTML","appendChild","createTextNode","onload","onerror","Error","body","toLowerCase","src","getPluginUrl","block","link","links","self","href","fetchDownloadableBlocks","receiveDownloadableBlocks","installBlockType","async","registry","dispatch","id","success","clearErrorNotice","setIsInstalling","url","apiFetch","method","data","status","path","slug","_links","addInstalledBlockType","metadataFields","addQueryArgs","_fields","catch","then","response","unstable__bootstrapServerSideBlockDefinitions","pick","location","parse","text","doc","DOMParser","parseFromString","newAssets","Array","from","querySelectorAll","asset","getElementById","newAsset","loadAssets","blocksStore","getBlockTypes","__","noticesStore","createInfoNotice","sprintf","title","speak","error","fatalAPIErrors","folder_exists","unable_to_connect_to_filesystem","code","setErrorNotice","createErrorNotice","isDismissible","uninstallBlockType","removeInstalledBlockType","__assign","assign","t","s","n","arguments","p","apply","this","lowerCase","str","create","DEFAULT_SPLIT_REGEXP","DEFAULT_STRIP_REGEXP","replace","input","re","RegExp","reduce","pascalCaseTransform","index","firstChar","charAt","lowerChars","substr","toUpperCase","pascalCase","options","splitRegexp","stripRegexp","transform","delimiter","result","start","end","slice","split","map","join","noCase","camelCaseTransform","fromEntries","entries","storeConfig","reducer","selectors","actions","resolvers","store","createReduxStore","AutoBlockUninstaller","useDispatch","blockDirectoryStore","shouldRemoveBlockTypes","useSelect","isAutosavingPost","isSavingPost","editorStore","unusedBlockTypes","useEffect","unregisterBlockType","register","_extends","target","source","icon","size","props","cloneElement","width","height","SVG","xmlns","viewBox","Path","fillRule","clipRule","rating","stars","Math","round","fullStarCount","floor","halfStarCount","ceil","emptyStarCount","_","className","starFilled","starHalf","starEmpty","match","alt","BlockIcon","showColors","errorNotice","getDownloadableBlockLabel","ratingCount","hasNotice","isInstalled","decodeEntities","_n","composite","onClick","author","description","getBlockType","isInstallable","isBlockInstalling","notice","hasFatal","statusText","__experimentalIsFocusable","role","as","Button","event","preventDefault","isBusy","disabled","label","showTooltip","tooltipPosition","Spinner","createInterpolateElement","span","VisuallyHidden","noop","items","onHover","onSelect","useCompositeState","children","downloadableItems","hasLocalBlocks","count","blockDefault","Tip","ExternalLink","compose","withSelect","rootClientId","canInsertBlockType","hasPermission","coreStore","canUser","isLoading","isTyping","debouncedFilterValue","setFilterValue","useState","debouncedSetFilterValue","debounce","__unstableInserterMenuExtension","hasItems","CompactList","InstalledBlocksPrePublishPanel","newBlockTypes","PluginPrePublishPanel","initialOpen","InstallButton","attributes","clientId","isInstallingBlock","replaceBlock","originalBlock","originalContent","createBlock","variant","ModifiedWarning","originalName","originalUndelimitedContent","hasContent","hasHTMLBlock","getBlockRootClientId","messageHTML","push","content","useBlockProps","Warning","RawHTML","registerPlugin","render","addFilter","settings","edit","OriginalComponent"],"sourceRoot":""}
|
1 |
+
{"version":3,"file":"./build/block-directory/index.min.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,wkBCL9D,MAAM,EAA+BC,OAAW,GAAW,QCArD,EAA+BA,OAAW,GAAW,QCArD,EAA+BA,OAAW,GAAS,MCAnD,EAA+BA,OAAW,GAAU,OCApD,EAA+BA,OAAW,GAAQ,KCAlD,EAA+BA,OAAW,GAAU,OCsG1D,GAAeC,EAAAA,EAAAA,iBAAiB,CAC/BC,mBA1FiC,WAA0B,IAAxBC,EAAwB,uDAAhB,CAAC,EAAGC,EAAY,uCAC3D,OAASA,EAAOC,MACf,IAAK,4BACJ,MAAO,IACHF,EACH,CAAEC,EAAOE,a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,CAA8BkG,cAAgBrO,MAH7C,mBAAC0P,EAAuBvH,EAGhC,IChBSqH,EDVkBE,KCc1B,K","sources":["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\",\"plugins\"]","webpack://wp/external window [\"wp\",\"hooks\"]","webpack://wp/external window [\"wp\",\"blocks\"]","webpack://wp/external window [\"wp\",\"data\"]","webpack://wp/external window [\"wp\",\"editor\"]","webpack://wp/./packages/block-directory/build-module/store/@wordpress/block-directory/src/store/reducer.js","webpack://wp/external window [\"wp\",\"blockEditor\"]","webpack://wp/./packages/block-directory/build-module/store/utils/@wordpress/block-directory/src/store/utils/has-block-type.js","webpack://wp/./packages/block-directory/build-module/store/@wordpress/block-directory/src/store/selectors.js","webpack://wp/external window [\"wp\",\"i18n\"]","webpack://wp/external window [\"wp\",\"apiFetch\"]","webpack://wp/external window [\"wp\",\"notices\"]","webpack://wp/external window [\"wp\",\"url\"]","webpack://wp/./packages/block-directory/build-module/store/@wordpress/block-directory/src/store/load-assets.js","webpack://wp/./packages/block-directory/build-module/store/utils/@wordpress/block-directory/src/store/utils/get-plugin-url.js","webpack://wp/./packages/block-directory/build-module/store/@wordpress/block-directory/src/store/actions.js","webpack://wp/./node_modules/tslib/tslib.es6.js","webpack://wp/./node_modules/lower-case/src/index.ts","webpack://wp/./node_modules/no-case/src/index.ts","webpack://wp/./node_modules/pascal-case/src/index.ts","webpack://wp/./node_modules/camel-case/src/index.ts","webpack://wp/./packages/block-directory/build-module/store/@wordpress/block-directory/src/store/resolvers.js","webpack://wp/./packages/block-directory/build-module/store/@wordpress/block-directory/src/store/index.js","webpack://wp/./packages/block-directory/build-module/components/auto-block-uninstaller/@wordpress/block-directory/src/components/auto-block-uninstaller/index.js","webpack://wp/external window [\"wp\",\"compose\"]","webpack://wp/external window [\"wp\",\"components\"]","webpack://wp/external window [\"wp\",\"coreData\"]","webpack://wp/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://wp/external window [\"wp\",\"htmlEntities\"]","webpack://wp/./packages/icons/build-module/icon/@wordpress/icons/src/icon/index.js","webpack://wp/external window [\"wp\",\"primitives\"]","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/star-filled.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/star-half.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/star-empty.js","webpack://wp/./packages/block-directory/build-module/components/block-ratings/@wordpress/block-directory/src/components/block-ratings/stars.js","webpack://wp/./packages/block-directory/build-module/components/block-ratings/@wordpress/block-directory/src/components/block-ratings/index.js","webpack://wp/./packages/block-directory/build-module/components/downloadable-block-icon/@wordpress/block-directory/src/components/downloadable-block-icon/index.js","webpack://wp/./packages/block-directory/build-module/components/downloadable-block-notice/@wordpress/block-directory/src/components/downloadable-block-notice/index.js","webpack://wp/./packages/block-directory/build-module/components/downloadable-block-list-item/@wordpress/block-directory/src/components/downloadable-block-list-item/index.js","webpack://wp/./packages/block-directory/build-module/components/downloadable-blocks-list/@wordpress/block-directory/src/components/downloadable-blocks-list/index.js","webpack://wp/external window [\"wp\",\"a11y\"]","webpack://wp/./packages/block-directory/build-module/components/downloadable-blocks-panel/@wordpress/block-directory/src/components/downloadable-blocks-panel/inserter-panel.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/block-default.js","webpack://wp/./packages/block-directory/build-module/components/downloadable-blocks-panel/@wordpress/block-directory/src/components/downloadable-blocks-panel/no-results.js","webpack://wp/./packages/block-directory/build-module/components/downloadable-blocks-panel/@wordpress/block-directory/src/components/downloadable-blocks-panel/index.js","webpack://wp/./packages/block-directory/build-module/plugins/inserter-menu-downloadable-blocks-panel/@wordpress/block-directory/src/plugins/inserter-menu-downloadable-blocks-panel/index.js","webpack://wp/external window [\"wp\",\"editPost\"]","webpack://wp/./packages/block-directory/build-module/components/compact-list/@wordpress/block-directory/src/components/compact-list/index.js","webpack://wp/./packages/block-directory/build-module/plugins/installed-blocks-pre-publish-panel/@wordpress/block-directory/src/plugins/installed-blocks-pre-publish-panel/index.js","webpack://wp/./packages/block-directory/build-module/plugins/get-install-missing/@wordpress/block-directory/src/plugins/get-install-missing/install-button.js","webpack://wp/./packages/block-directory/build-module/plugins/get-install-missing/@wordpress/block-directory/src/plugins/get-install-missing/index.js","webpack://wp/./packages/block-directory/build-module/plugins/@wordpress/block-directory/src/plugins/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\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\"][\"plugins\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"hooks\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"blocks\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"data\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"editor\"];","/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\n/**\n * Reducer returning an array of downloadable blocks.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport const downloadableBlocks = ( state = {}, action ) => {\n\tswitch ( action.type ) {\n\t\tcase 'FETCH_DOWNLOADABLE_BLOCKS':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.filterValue ]: {\n\t\t\t\t\tisRequesting: true,\n\t\t\t\t},\n\t\t\t};\n\t\tcase 'RECEIVE_DOWNLOADABLE_BLOCKS':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.filterValue ]: {\n\t\t\t\t\tresults: action.downloadableBlocks,\n\t\t\t\t\tisRequesting: false,\n\t\t\t\t},\n\t\t\t};\n\t}\n\treturn state;\n};\n\n/**\n * Reducer managing the installation and deletion of blocks.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport const blockManagement = (\n\tstate = {\n\t\tinstalledBlockTypes: [],\n\t\tisInstalling: {},\n\t},\n\taction\n) => {\n\tswitch ( action.type ) {\n\t\tcase 'ADD_INSTALLED_BLOCK_TYPE':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tinstalledBlockTypes: [\n\t\t\t\t\t...state.installedBlockTypes,\n\t\t\t\t\taction.item,\n\t\t\t\t],\n\t\t\t};\n\t\tcase 'REMOVE_INSTALLED_BLOCK_TYPE':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tinstalledBlockTypes: state.installedBlockTypes.filter(\n\t\t\t\t\t( blockType ) => blockType.name !== action.item.name\n\t\t\t\t),\n\t\t\t};\n\t\tcase 'SET_INSTALLING_BLOCK':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisInstalling: {\n\t\t\t\t\t...state.isInstalling,\n\t\t\t\t\t[ action.blockId ]: action.isInstalling,\n\t\t\t\t},\n\t\t\t};\n\t}\n\treturn state;\n};\n\n/**\n * Reducer returning an object of error notices.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport const errorNotices = ( state = {}, action ) => {\n\tswitch ( action.type ) {\n\t\tcase 'SET_ERROR_NOTICE':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.blockId ]: {\n\t\t\t\t\tmessage: action.message,\n\t\t\t\t\tisFatal: action.isFatal,\n\t\t\t\t},\n\t\t\t};\n\t\tcase 'CLEAR_ERROR_NOTICE':\n\t\t\tconst { [ action.blockId ]: blockId, ...restState } = state;\n\t\t\treturn restState;\n\t}\n\treturn state;\n};\n\nexport default combineReducers( {\n\tdownloadableBlocks,\n\tblockManagement,\n\terrorNotices,\n} );\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"blockEditor\"];","/**\n * Check if a block list contains a specific block type. Recursively searches\n * through `innerBlocks` if they exist.\n *\n * @param {Object} blockType A block object to search for.\n * @param {Object[]} blocks The list of blocks to look through.\n *\n * @return {boolean} Whether the blockType is found.\n */\nexport default function hasBlockType( blockType, blocks = [] ) {\n\tif ( ! blocks.length ) {\n\t\treturn false;\n\t}\n\tif ( blocks.some( ( { name } ) => name === blockType.name ) ) {\n\t\treturn true;\n\t}\n\tfor ( let i = 0; i < blocks.length; i++ ) {\n\t\tif ( hasBlockType( blockType, blocks[ i ].innerBlocks ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n","/**\n * WordPress dependencies\n */\nimport { createRegistrySelector } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport hasBlockType from './utils/has-block-type';\n\n/**\n * Returns true if application is requesting for downloadable blocks.\n *\n * @param {Object} state Global application state.\n * @param {string} filterValue Search string.\n *\n * @return {boolean} Whether a request is in progress for the blocks list.\n */\nexport function isRequestingDownloadableBlocks( state, filterValue ) {\n\treturn state.downloadableBlocks[ filterValue ]?.isRequesting ?? false;\n}\n\n/**\n * Returns the available uninstalled blocks.\n *\n * @param {Object} state Global application state.\n * @param {string} filterValue Search string.\n *\n * @return {Array} Downloadable blocks.\n */\nexport function getDownloadableBlocks( state, filterValue ) {\n\treturn state.downloadableBlocks[ filterValue ]?.results ?? [];\n}\n\n/**\n * Returns the block types that have been installed on the server in this\n * session.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} Block type items\n */\nexport function getInstalledBlockTypes( state ) {\n\treturn state.blockManagement.installedBlockTypes;\n}\n\n/**\n * Returns block types that have been installed on the server and used in the\n * current post.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} Block type items.\n */\nexport const getNewBlockTypes = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst usedBlockTree = select( blockEditorStore ).getBlocks();\n\t\tconst installedBlockTypes = getInstalledBlockTypes( state );\n\n\t\treturn installedBlockTypes.filter( ( blockType ) =>\n\t\t\thasBlockType( blockType, usedBlockTree )\n\t\t);\n\t}\n);\n\n/**\n * Returns the block types that have been installed on the server but are not\n * used in the current post.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} Block type items.\n */\nexport const getUnusedBlockTypes = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst usedBlockTree = select( blockEditorStore ).getBlocks();\n\t\tconst installedBlockTypes = getInstalledBlockTypes( state );\n\n\t\treturn installedBlockTypes.filter(\n\t\t\t( blockType ) => ! hasBlockType( blockType, usedBlockTree )\n\t\t);\n\t}\n);\n\n/**\n * Returns true if a block plugin install is in progress.\n *\n * @param {Object} state Global application state.\n * @param {string} blockId Id of the block.\n *\n * @return {boolean} Whether this block is currently being installed.\n */\nexport function isInstalling( state, blockId ) {\n\treturn state.blockManagement.isInstalling[ blockId ] || false;\n}\n\n/**\n * Returns all block error notices.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Object with error notices.\n */\nexport function getErrorNotices( state ) {\n\treturn state.errorNotices;\n}\n\n/**\n * Returns the error notice for a given block.\n *\n * @param {Object} state Global application state.\n * @param {string} blockId The ID of the block plugin. eg: my-block\n *\n * @return {string|boolean} The error text, or false if no error.\n */\nexport function getErrorNoticeForBlock( state, blockId ) {\n\treturn state.errorNotices[ blockId ];\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"i18n\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"apiFetch\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"notices\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"url\"];","/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\n\n/**\n * Load an asset for a block.\n *\n * This function returns a Promise that will resolve once the asset is loaded,\n * or in the case of Stylesheets and Inline JavaScript, will resolve immediately.\n *\n * @param {HTMLElement} el A HTML Element asset to inject.\n *\n * @return {Promise} Promise which will resolve when the asset is loaded.\n */\nexport const loadAsset = ( el ) => {\n\treturn new Promise( ( resolve, reject ) => {\n\t\t/*\n\t\t * Reconstruct the passed element, this is required as inserting the Node directly\n\t\t * won't always fire the required onload events, even if the asset wasn't already loaded.\n\t\t */\n\t\tconst newNode = document.createElement( el.nodeName );\n\n\t\t[ 'id', 'rel', 'src', 'href', 'type' ].forEach( ( attr ) => {\n\t\t\tif ( el[ attr ] ) {\n\t\t\t\tnewNode[ attr ] = el[ attr ];\n\t\t\t}\n\t\t} );\n\n\t\t// Append inline <script> contents.\n\t\tif ( el.innerHTML ) {\n\t\t\tnewNode.appendChild( document.createTextNode( el.innerHTML ) );\n\t\t}\n\n\t\tnewNode.onload = () => resolve( true );\n\t\tnewNode.onerror = () => reject( new Error( 'Error loading asset.' ) );\n\n\t\tdocument.body.appendChild( newNode );\n\n\t\t// Resolve Stylesheets and Inline JavaScript immediately.\n\t\tif (\n\t\t\t'link' === newNode.nodeName.toLowerCase() ||\n\t\t\t( 'script' === newNode.nodeName.toLowerCase() && ! newNode.src )\n\t\t) {\n\t\t\tresolve();\n\t\t}\n\t} );\n};\n\n/**\n * Load the asset files for a block\n */\nexport async function loadAssets() {\n\t/*\n\t * Fetch the current URL (post-new.php, or post.php?post=1&action=edit) and compare the\n\t * JavaScript and CSS assets loaded between the pages. This imports the required assets\n\t * for the block into the current page while not requiring that we know them up-front.\n\t * In the future this can be improved by reliance upon block.json and/or a script-loader\n\t * dependency API.\n\t */\n\tconst response = await apiFetch( {\n\t\turl: document.location.href,\n\t\tparse: false,\n\t} );\n\n\tconst data = await response.text();\n\n\tconst doc = new window.DOMParser().parseFromString( data, 'text/html' );\n\n\tconst newAssets = Array.from(\n\t\tdoc.querySelectorAll( 'link[rel=\"stylesheet\"],script' )\n\t).filter( ( asset ) => asset.id && ! document.getElementById( asset.id ) );\n\n\t/*\n\t * Load each asset in order, as they may depend upon an earlier loaded script.\n\t * Stylesheets and Inline Scripts will resolve immediately upon insertion.\n\t */\n\tfor ( const newAsset of newAssets ) {\n\t\tawait loadAsset( newAsset );\n\t}\n}\n","/**\n * Get the plugin's direct API link out of a block-directory response.\n *\n * @param {Object} block The block object\n *\n * @return {string} The plugin URL, if exists.\n */\nexport default function getPluginUrl( block ) {\n\tif ( ! block ) {\n\t\treturn false;\n\t}\n\tconst link = block.links[ 'wp:plugin' ] || block.links.self;\n\tif ( link && link.length ) {\n\t\treturn link[ 0 ].href;\n\t}\n\treturn false;\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tstore as blocksStore,\n\tunstable__bootstrapServerSideBlockDefinitions, // eslint-disable-line camelcase\n} from '@wordpress/blocks';\nimport { __, sprintf } from '@wordpress/i18n';\nimport apiFetch from '@wordpress/api-fetch';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { loadAssets } from './load-assets';\nimport getPluginUrl from './utils/get-plugin-url';\n\n/**\n * Returns an action object used in signalling that the downloadable blocks\n * have been requested and are loading.\n *\n * @param {string} filterValue Search string.\n *\n * @return {Object} Action object.\n */\nexport function fetchDownloadableBlocks( filterValue ) {\n\treturn { type: 'FETCH_DOWNLOADABLE_BLOCKS', filterValue };\n}\n\n/**\n * Returns an action object used in signalling that the downloadable blocks\n * have been updated.\n *\n * @param {Array} downloadableBlocks Downloadable blocks.\n * @param {string} filterValue Search string.\n *\n * @return {Object} Action object.\n */\nexport function receiveDownloadableBlocks( downloadableBlocks, filterValue ) {\n\treturn {\n\t\ttype: 'RECEIVE_DOWNLOADABLE_BLOCKS',\n\t\tdownloadableBlocks,\n\t\tfilterValue,\n\t};\n}\n\n/**\n * Action triggered to install a block plugin.\n *\n * @param {Object} block The block item returned by search.\n *\n * @return {boolean} Whether the block was successfully installed & loaded.\n */\nexport const installBlockType =\n\t( block ) =>\n\tasync ( { registry, dispatch } ) => {\n\t\tconst { id, name } = block;\n\t\tlet success = false;\n\t\tdispatch.clearErrorNotice( id );\n\t\ttry {\n\t\t\tdispatch.setIsInstalling( id, true );\n\n\t\t\t// If we have a wp:plugin link, the plugin is installed but inactive.\n\t\t\tconst url = getPluginUrl( block );\n\t\t\tlet links = {};\n\t\t\tif ( url ) {\n\t\t\t\tawait apiFetch( {\n\t\t\t\t\tmethod: 'PUT',\n\t\t\t\t\turl,\n\t\t\t\t\tdata: { status: 'active' },\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tconst response = await apiFetch( {\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\tpath: 'wp/v2/plugins',\n\t\t\t\t\tdata: { slug: id, status: 'active' },\n\t\t\t\t} );\n\t\t\t\t// Add the `self` link for newly-installed blocks.\n\t\t\t\tlinks = response._links;\n\t\t\t}\n\n\t\t\tdispatch.addInstalledBlockType( {\n\t\t\t\t...block,\n\t\t\t\tlinks: { ...block.links, ...links },\n\t\t\t} );\n\n\t\t\t// Ensures that the block metadata is propagated to the editor when registered on the server.\n\t\t\tconst metadataFields = [\n\t\t\t\t'api_version',\n\t\t\t\t'title',\n\t\t\t\t'category',\n\t\t\t\t'parent',\n\t\t\t\t'icon',\n\t\t\t\t'description',\n\t\t\t\t'keywords',\n\t\t\t\t'attributes',\n\t\t\t\t'provides_context',\n\t\t\t\t'uses_context',\n\t\t\t\t'supports',\n\t\t\t\t'styles',\n\t\t\t\t'example',\n\t\t\t\t'variations',\n\t\t\t];\n\t\t\tawait apiFetch( {\n\t\t\t\tpath: addQueryArgs( `/wp/v2/block-types/${ name }`, {\n\t\t\t\t\t_fields: metadataFields,\n\t\t\t\t} ),\n\t\t\t} )\n\t\t\t\t// Ignore when the block is not registered on the server.\n\t\t\t\t.catch( () => {} )\n\t\t\t\t.then( ( response ) => {\n\t\t\t\t\tif ( ! response ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tunstable__bootstrapServerSideBlockDefinitions( {\n\t\t\t\t\t\t[ name ]: Object.fromEntries(\n\t\t\t\t\t\t\tObject.entries( response ).filter( ( [ key ] ) =>\n\t\t\t\t\t\t\t\tmetadataFields.includes( key )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t} );\n\t\t\t\t} );\n\n\t\t\tawait loadAssets();\n\t\t\tconst registeredBlocks = registry\n\t\t\t\t.select( blocksStore )\n\t\t\t\t.getBlockTypes();\n\t\t\tif ( ! registeredBlocks.some( ( i ) => i.name === name ) ) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t__( 'Error registering block. Try reloading the page.' )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tregistry.dispatch( noticesStore ).createInfoNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t// translators: %s is the block title.\n\t\t\t\t\t__( 'Block %s installed and added.' ),\n\t\t\t\t\tblock.title\n\t\t\t\t),\n\t\t\t\t{\n\t\t\t\t\tspeak: true,\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t\tsuccess = true;\n\t\t} catch ( error ) {\n\t\t\tlet message = error.message || __( 'An error occurred.' );\n\n\t\t\t// Errors we throw are fatal.\n\t\t\tlet isFatal = error instanceof Error;\n\n\t\t\t// Specific API errors that are fatal.\n\t\t\tconst fatalAPIErrors = {\n\t\t\t\tfolder_exists: __(\n\t\t\t\t\t'This block is already installed. Try reloading the page.'\n\t\t\t\t),\n\t\t\t\tunable_to_connect_to_filesystem: __(\n\t\t\t\t\t'Error installing block. You can reload the page and try again.'\n\t\t\t\t),\n\t\t\t};\n\n\t\t\tif ( fatalAPIErrors[ error.code ] ) {\n\t\t\t\tisFatal = true;\n\t\t\t\tmessage = fatalAPIErrors[ error.code ];\n\t\t\t}\n\n\t\t\tdispatch.setErrorNotice( id, message, isFatal );\n\t\t\tregistry.dispatch( noticesStore ).createErrorNotice( message, {\n\t\t\t\tspeak: true,\n\t\t\t\tisDismissible: true,\n\t\t\t} );\n\t\t}\n\t\tdispatch.setIsInstalling( id, false );\n\t\treturn success;\n\t};\n\n/**\n * Action triggered to uninstall a block plugin.\n *\n * @param {Object} block The blockType object.\n */\nexport const uninstallBlockType =\n\t( block ) =>\n\tasync ( { registry, dispatch } ) => {\n\t\ttry {\n\t\t\tconst url = getPluginUrl( block );\n\t\t\tawait apiFetch( {\n\t\t\t\tmethod: 'PUT',\n\t\t\t\turl,\n\t\t\t\tdata: { status: 'inactive' },\n\t\t\t} );\n\t\t\tawait apiFetch( {\n\t\t\t\tmethod: 'DELETE',\n\t\t\t\turl,\n\t\t\t} );\n\t\t\tdispatch.removeInstalledBlockType( block );\n\t\t} catch ( error ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice(\n\t\t\t\t\terror.message || __( 'An error occurred.' )\n\t\t\t\t);\n\t\t}\n\t};\n\n/**\n * Returns an action object used to add a block type to the \"newly installed\"\n * tracking list.\n *\n * @param {Object} item The block item with the block id and name.\n *\n * @return {Object} Action object.\n */\nexport function addInstalledBlockType( item ) {\n\treturn {\n\t\ttype: 'ADD_INSTALLED_BLOCK_TYPE',\n\t\titem,\n\t};\n}\n\n/**\n * Returns an action object used to remove a block type from the \"newly installed\"\n * tracking list.\n *\n * @param {string} item The block item with the block id and name.\n *\n * @return {Object} Action object.\n */\nexport function removeInstalledBlockType( item ) {\n\treturn {\n\t\ttype: 'REMOVE_INSTALLED_BLOCK_TYPE',\n\t\titem,\n\t};\n}\n\n/**\n * Returns an action object used to indicate install in progress.\n *\n * @param {string} blockId\n * @param {boolean} isInstalling\n *\n * @return {Object} Action object.\n */\nexport function setIsInstalling( blockId, isInstalling ) {\n\treturn {\n\t\ttype: 'SET_INSTALLING_BLOCK',\n\t\tblockId,\n\t\tisInstalling,\n\t};\n}\n\n/**\n * Sets an error notice to be displayed to the user for a given block.\n *\n * @param {string} blockId The ID of the block plugin. eg: my-block\n * @param {string} message The message shown in the notice.\n * @param {boolean} isFatal Whether the user can recover from the error.\n *\n * @return {Object} Action object.\n */\nexport function setErrorNotice( blockId, message, isFatal = false ) {\n\treturn {\n\t\ttype: 'SET_ERROR_NOTICE',\n\t\tblockId,\n\t\tmessage,\n\t\tisFatal,\n\t};\n}\n\n/**\n * Sets the error notice to empty for specific block.\n *\n * @param {string} blockId The ID of the block plugin. eg: my-block\n *\n * @return {Object} Action object.\n */\nexport function clearErrorNotice( blockId ) {\n\treturn {\n\t\ttype: 'CLEAR_ERROR_NOTICE',\n\t\tblockId,\n\t};\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || from);\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","/**\n * Locale character mapping rules.\n */\ninterface Locale {\n regexp: RegExp;\n map: Record<string, string>;\n}\n\n/**\n * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt\n */\nconst SUPPORTED_LOCALE: Record<string, Locale> = {\n tr: {\n regexp: /\\u0130|\\u0049|\\u0049\\u0307/g,\n map: {\n İ: \"\\u0069\",\n I: \"\\u0131\",\n İ: \"\\u0069\",\n },\n },\n az: {\n regexp: /\\u0130/g,\n map: {\n İ: \"\\u0069\",\n I: \"\\u0131\",\n İ: \"\\u0069\",\n },\n },\n lt: {\n regexp: /\\u0049|\\u004A|\\u012E|\\u00CC|\\u00CD|\\u0128/g,\n map: {\n I: \"\\u0069\\u0307\",\n J: \"\\u006A\\u0307\",\n Į: \"\\u012F\\u0307\",\n Ì: \"\\u0069\\u0307\\u0300\",\n Í: \"\\u0069\\u0307\\u0301\",\n Ĩ: \"\\u0069\\u0307\\u0303\",\n },\n },\n};\n\n/**\n * Localized lower case.\n */\nexport function localeLowerCase(str: string, locale: string) {\n const lang = SUPPORTED_LOCALE[locale.toLowerCase()];\n if (lang) return lowerCase(str.replace(lang.regexp, (m) => lang.map[m]));\n return lowerCase(str);\n}\n\n/**\n * Lower case as a function.\n */\nexport function lowerCase(str: string) {\n return str.toLowerCase();\n}\n","import { lowerCase } from \"lower-case\";\n\nexport interface Options {\n splitRegexp?: RegExp | RegExp[];\n stripRegexp?: RegExp | RegExp[];\n delimiter?: string;\n transform?: (part: string, index: number, parts: string[]) => string;\n}\n\n// Support camel case (\"camelCase\" -> \"camel Case\" and \"CAMELCase\" -> \"CAMEL Case\").\nconst DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];\n\n// Remove all non-word characters.\nconst DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;\n\n/**\n * Normalize the string into something other libraries can manipulate easier.\n */\nexport function noCase(input: string, options: Options = {}) {\n const {\n splitRegexp = DEFAULT_SPLIT_REGEXP,\n stripRegexp = DEFAULT_STRIP_REGEXP,\n transform = lowerCase,\n delimiter = \" \",\n } = options;\n\n let result = replace(\n replace(input, splitRegexp, \"$1\\0$2\"),\n stripRegexp,\n \"\\0\"\n );\n let start = 0;\n let end = result.length;\n\n // Trim the delimiter from around the output string.\n while (result.charAt(start) === \"\\0\") start++;\n while (result.charAt(end - 1) === \"\\0\") end--;\n\n // Transform each token independently.\n return result.slice(start, end).split(\"\\0\").map(transform).join(delimiter);\n}\n\n/**\n * Replace `re` in the input string with the replacement value.\n */\nfunction replace(input: string, re: RegExp | RegExp[], value: string) {\n if (re instanceof RegExp) return input.replace(re, value);\n return re.reduce((input, re) => input.replace(re, value), input);\n}\n","import { noCase, Options } from \"no-case\";\n\nexport { Options };\n\nexport function pascalCaseTransform(input: string, index: number) {\n const firstChar = input.charAt(0);\n const lowerChars = input.substr(1).toLowerCase();\n if (index > 0 && firstChar >= \"0\" && firstChar <= \"9\") {\n return `_${firstChar}${lowerChars}`;\n }\n return `${firstChar.toUpperCase()}${lowerChars}`;\n}\n\nexport function pascalCaseTransformMerge(input: string) {\n return input.charAt(0).toUpperCase() + input.slice(1).toLowerCase();\n}\n\nexport function pascalCase(input: string, options: Options = {}) {\n return noCase(input, {\n delimiter: \"\",\n transform: pascalCaseTransform,\n ...options,\n });\n}\n","import {\n pascalCase,\n pascalCaseTransform,\n pascalCaseTransformMerge,\n Options,\n} from \"pascal-case\";\n\nexport { Options };\n\nexport function camelCaseTransform(input: string, index: number) {\n if (index === 0) return input.toLowerCase();\n return pascalCaseTransform(input, index);\n}\n\nexport function camelCaseTransformMerge(input: string, index: number) {\n if (index === 0) return input.toLowerCase();\n return pascalCaseTransformMerge(input);\n}\n\nexport function camelCase(input: string, options: Options = {}) {\n return pascalCase(input, {\n transform: camelCaseTransform,\n ...options,\n });\n}\n","/**\n * External dependencies\n */\nimport { camelCase } from 'change-case';\n\n/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\n\n/**\n * Internal dependencies\n */\nimport { fetchDownloadableBlocks, receiveDownloadableBlocks } from './actions';\n\nexport const getDownloadableBlocks =\n\t( filterValue ) =>\n\tasync ( { dispatch } ) => {\n\t\tif ( ! filterValue ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tdispatch( fetchDownloadableBlocks( filterValue ) );\n\t\t\tconst results = await apiFetch( {\n\t\t\t\tpath: `wp/v2/block-directory/search?term=${ filterValue }`,\n\t\t\t} );\n\t\t\tconst blocks = results.map( ( result ) =>\n\t\t\t\tObject.fromEntries(\n\t\t\t\t\tObject.entries( result ).map( ( [ key, value ] ) => [\n\t\t\t\t\t\tcamelCase( key ),\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t] )\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tdispatch( receiveDownloadableBlocks( blocks, filterValue ) );\n\t\t} catch {}\n\t};\n","/**\n * WordPress dependencies\n */\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as selectors from './selectors';\nimport * as actions from './actions';\nimport * as resolvers from './resolvers';\n\n/**\n * Module Constants\n */\nconst STORE_NAME = 'core/block-directory';\n\n/**\n * Block editor data store configuration.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore\n *\n * @type {Object}\n */\nexport const storeConfig = {\n\treducer,\n\tselectors,\n\tactions,\n\tresolvers,\n};\n\n/**\n * Store definition for the block directory 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 );\n\nregister( store );\n","/**\n * WordPress dependencies\n */\nimport { unregisterBlockType } from '@wordpress/blocks';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { store as blockDirectoryStore } from '../../store';\n\nexport default function AutoBlockUninstaller() {\n\tconst { uninstallBlockType } = useDispatch( blockDirectoryStore );\n\n\tconst shouldRemoveBlockTypes = useSelect( ( select ) => {\n\t\tconst { isAutosavingPost, isSavingPost } = select( editorStore );\n\t\treturn isSavingPost() && ! isAutosavingPost();\n\t}, [] );\n\n\tconst unusedBlockTypes = useSelect(\n\t\t( select ) => select( blockDirectoryStore ).getUnusedBlockTypes(),\n\t\t[]\n\t);\n\n\tuseEffect( () => {\n\t\tif ( shouldRemoveBlockTypes && unusedBlockTypes.length ) {\n\t\t\tunusedBlockTypes.forEach( ( blockType ) => {\n\t\t\t\tuninstallBlockType( blockType );\n\t\t\t\tunregisterBlockType( blockType.name );\n\t\t\t} );\n\t\t}\n\t}, [ shouldRemoveBlockTypes ] );\n\n\treturn null;\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"compose\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"components\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"coreData\"];","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"htmlEntities\"];","/**\n * WordPress dependencies\n */\nimport { cloneElement } from '@wordpress/element';\n\n/** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */\n\n/**\n * Return an SVG icon.\n *\n * @param {IconProps} props icon is the SVG component to render\n * size is a number specifiying the icon size in pixels\n * Other props will be passed to wrapped SVG component\n *\n * @return {JSX.Element} Icon component\n */\nfunction Icon( { icon, size = 24, ...props } ) {\n\treturn cloneElement( icon, {\n\t\twidth: size,\n\t\theight: size,\n\t\t...props,\n\t} );\n}\n\nexport default Icon;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"primitives\"];","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst starFilled = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z\" />\n\t</SVG>\n);\n\nexport default starFilled;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst starHalf = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M9.518 8.783a.25.25 0 00.188-.137l2.069-4.192a.25.25 0 01.448 0l2.07 4.192a.25.25 0 00.187.137l4.626.672a.25.25 0 01.139.427l-3.347 3.262a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.363.264l-4.137-2.176a.25.25 0 00-.233 0l-4.138 2.175a.25.25 0 01-.362-.263l.79-4.607a.25.25 0 00-.072-.222L4.753 9.882a.25.25 0 01.14-.427l4.625-.672zM12 14.533c.28 0 .559.067.814.2l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39v7.143z\" />\n\t</SVG>\n);\n\nexport default starHalf;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst starEmpty = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\td=\"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z\"\n\t\t\tclipRule=\"evenodd\"\n\t\t/>\n\t</SVG>\n);\n\nexport default starEmpty;\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Icon, starEmpty, starFilled, starHalf } from '@wordpress/icons';\n\nfunction Stars( { rating } ) {\n\tconst stars = Math.round( rating / 0.5 ) * 0.5;\n\n\tconst fullStarCount = Math.floor( rating );\n\tconst halfStarCount = Math.ceil( rating - fullStarCount );\n\tconst emptyStarCount = 5 - ( fullStarCount + halfStarCount );\n\n\treturn (\n\t\t<span\n\t\t\taria-label={ sprintf(\n\t\t\t\t/* translators: %s: number of stars. */\n\t\t\t\t__( '%s out of 5 stars' ),\n\t\t\t\tstars\n\t\t\t) }\n\t\t>\n\t\t\t{ Array.from( { length: fullStarCount } ).map( ( _, i ) => (\n\t\t\t\t<Icon\n\t\t\t\t\tkey={ `full_stars_${ i }` }\n\t\t\t\t\tclassName=\"block-directory-block-ratings__star-full\"\n\t\t\t\t\ticon={ starFilled }\n\t\t\t\t\tsize={ 16 }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t\t{ Array.from( { length: halfStarCount } ).map( ( _, i ) => (\n\t\t\t\t<Icon\n\t\t\t\t\tkey={ `half_stars_${ i }` }\n\t\t\t\t\tclassName=\"block-directory-block-ratings__star-half-full\"\n\t\t\t\t\ticon={ starHalf }\n\t\t\t\t\tsize={ 16 }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t\t{ Array.from( { length: emptyStarCount } ).map( ( _, i ) => (\n\t\t\t\t<Icon\n\t\t\t\t\tkey={ `empty_stars_${ i }` }\n\t\t\t\t\tclassName=\"block-directory-block-ratings__star-empty\"\n\t\t\t\t\ticon={ starEmpty }\n\t\t\t\t\tsize={ 16 }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</span>\n\t);\n}\n\nexport default Stars;\n","/**\n * Internal dependencies\n */\nimport Stars from './stars';\n\nexport const BlockRatings = ( { rating } ) => (\n\t<span className=\"block-directory-block-ratings\">\n\t\t<Stars rating={ rating } />\n\t</span>\n);\n\nexport default BlockRatings;\n","/**\n * WordPress dependencies\n */\nimport { BlockIcon } from '@wordpress/block-editor';\n\nfunction DownloadableBlockIcon( { icon } ) {\n\tconst className = 'block-directory-downloadable-block-icon';\n\treturn icon.match( /\\.(jpeg|jpg|gif|png|svg)(?:\\?.*)?$/ ) !== null ? (\n\t\t<img className={ className } src={ icon } alt=\"\" />\n\t) : (\n\t\t<BlockIcon className={ className } icon={ icon } showColors />\n\t);\n}\n\nexport default DownloadableBlockIcon;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockDirectoryStore } from '../../store';\n\nexport const DownloadableBlockNotice = ( { block } ) => {\n\tconst errorNotice = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blockDirectoryStore ).getErrorNoticeForBlock( block.id ),\n\t\t[ block ]\n\t);\n\n\tif ( ! errorNotice ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div className=\"block-directory-downloadable-block-notice\">\n\t\t\t<div className=\"block-directory-downloadable-block-notice__content\">\n\t\t\t\t{ errorNotice.message }\n\t\t\t\t{ errorNotice.isFatal\n\t\t\t\t\t? ' ' + __( 'Try reloading the page.' )\n\t\t\t\t\t: null }\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default DownloadableBlockNotice;\n","/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport {\n\tButton,\n\tSpinner,\n\tVisuallyHidden,\n\t__unstableCompositeItem as CompositeItem,\n} from '@wordpress/components';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { getBlockType } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport BlockRatings from '../block-ratings';\nimport DownloadableBlockIcon from '../downloadable-block-icon';\nimport DownloadableBlockNotice from '../downloadable-block-notice';\nimport { store as blockDirectoryStore } from '../../store';\n\n// Return the appropriate block item label, given the block data and status.\nfunction getDownloadableBlockLabel(\n\t{ title, rating, ratingCount },\n\t{ hasNotice, isInstalled, isInstalling }\n) {\n\tconst stars = Math.round( rating / 0.5 ) * 0.5;\n\n\tif ( ! isInstalled && hasNotice ) {\n\t\t/* translators: %1$s: block title */\n\t\treturn sprintf( 'Retry installing %s.', decodeEntities( title ) );\n\t}\n\n\tif ( isInstalled ) {\n\t\t/* translators: %1$s: block title */\n\t\treturn sprintf( 'Add %s.', decodeEntities( title ) );\n\t}\n\n\tif ( isInstalling ) {\n\t\t/* translators: %1$s: block title */\n\t\treturn sprintf( 'Installing %s.', decodeEntities( title ) );\n\t}\n\n\t// No ratings yet, just use the title.\n\tif ( ratingCount < 1 ) {\n\t\t/* translators: %1$s: block title */\n\t\treturn sprintf( 'Install %s.', decodeEntities( title ) );\n\t}\n\n\treturn sprintf(\n\t\t/* translators: %1$s: block title, %2$s: average rating, %3$s: total ratings count. */\n\t\t_n(\n\t\t\t'Install %1$s. %2$s stars with %3$s review.',\n\t\t\t'Install %1$s. %2$s stars with %3$s reviews.',\n\t\t\tratingCount\n\t\t),\n\t\tdecodeEntities( title ),\n\t\tstars,\n\t\tratingCount\n\t);\n}\n\nfunction DownloadableBlockListItem( { composite, item, onClick } ) {\n\tconst { author, description, icon, rating, title } = item;\n\t// getBlockType returns a block object if this block exists, or null if not.\n\tconst isInstalled = !! getBlockType( item.name );\n\n\tconst { hasNotice, isInstalling, isInstallable } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getErrorNoticeForBlock, isInstalling: isBlockInstalling } =\n\t\t\t\tselect( blockDirectoryStore );\n\t\t\tconst notice = getErrorNoticeForBlock( item.id );\n\t\t\tconst hasFatal = notice && notice.isFatal;\n\t\t\treturn {\n\t\t\t\thasNotice: !! notice,\n\t\t\t\tisInstalling: isBlockInstalling( item.id ),\n\t\t\t\tisInstallable: ! hasFatal,\n\t\t\t};\n\t\t},\n\t\t[ item ]\n\t);\n\n\tlet statusText = '';\n\tif ( isInstalled ) {\n\t\tstatusText = __( 'Installed!' );\n\t} else if ( isInstalling ) {\n\t\tstatusText = __( 'Installing…' );\n\t}\n\n\treturn (\n\t\t<CompositeItem\n\t\t\t__experimentalIsFocusable\n\t\t\trole=\"option\"\n\t\t\tas={ Button }\n\t\t\t{ ...composite }\n\t\t\tclassName=\"block-directory-downloadable-block-list-item\"\n\t\t\tonClick={ ( event ) => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tonClick();\n\t\t\t} }\n\t\t\tisBusy={ isInstalling }\n\t\t\tdisabled={ isInstalling || ! isInstallable }\n\t\t\tlabel={ getDownloadableBlockLabel( item, {\n\t\t\t\thasNotice,\n\t\t\t\tisInstalled,\n\t\t\t\tisInstalling,\n\t\t\t} ) }\n\t\t\tshowTooltip={ true }\n\t\t\ttooltipPosition=\"top center\"\n\t\t>\n\t\t\t<div className=\"block-directory-downloadable-block-list-item__icon\">\n\t\t\t\t<DownloadableBlockIcon icon={ icon } title={ title } />\n\t\t\t\t{ isInstalling ? (\n\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__spinner\">\n\t\t\t\t\t\t<Spinner />\n\t\t\t\t\t</span>\n\t\t\t\t) : (\n\t\t\t\t\t<BlockRatings rating={ rating } />\n\t\t\t\t) }\n\t\t\t</div>\n\t\t\t<span className=\"block-directory-downloadable-block-list-item__details\">\n\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__title\">\n\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t/* translators: %1$s: block title, %2$s: author name. */\n\t\t\t\t\t\t\t__( '%1$s <span>by %2$s</span>' ),\n\t\t\t\t\t\t\tdecodeEntities( title ),\n\t\t\t\t\t\t\tauthor\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tspan: (\n\t\t\t\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__author\" />\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</span>\n\t\t\t\t{ hasNotice ? (\n\t\t\t\t\t<DownloadableBlockNotice block={ item } />\n\t\t\t\t) : (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<span className=\"block-directory-downloadable-block-list-item__desc\">\n\t\t\t\t\t\t\t{ !! statusText\n\t\t\t\t\t\t\t\t? statusText\n\t\t\t\t\t\t\t\t: decodeEntities( description ) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t{ isInstallable &&\n\t\t\t\t\t\t\t! ( isInstalled || isInstalling ) && (\n\t\t\t\t\t\t\t\t<VisuallyHidden>\n\t\t\t\t\t\t\t\t\t{ __( 'Install block' ) }\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</span>\n\t\t</CompositeItem>\n\t);\n}\n\nexport default DownloadableBlockListItem;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__unstableComposite as Composite,\n\t__unstableUseCompositeState as useCompositeState,\n} from '@wordpress/components';\nimport { getBlockType } from '@wordpress/blocks';\nimport { useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport DownloadableBlockListItem from '../downloadable-block-list-item';\nimport { store as blockDirectoryStore } from '../../store';\n\nconst noop = () => {};\n\nfunction DownloadableBlocksList( { items, onHover = noop, onSelect } ) {\n\tconst composite = useCompositeState();\n\tconst { installBlockType } = useDispatch( blockDirectoryStore );\n\n\tif ( ! items.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Composite\n\t\t\t{ ...composite }\n\t\t\trole=\"listbox\"\n\t\t\tclassName=\"block-directory-downloadable-blocks-list\"\n\t\t\taria-label={ __( 'Blocks available for install' ) }\n\t\t>\n\t\t\t{ items.map( ( item ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<DownloadableBlockListItem\n\t\t\t\t\t\tkey={ item.id }\n\t\t\t\t\t\tcomposite={ composite }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t// Check if the block is registered (`getBlockType`\n\t\t\t\t\t\t\t// will return an object). If so, insert the block.\n\t\t\t\t\t\t\t// This prevents installing existing plugins.\n\t\t\t\t\t\t\tif ( getBlockType( item.name ) ) {\n\t\t\t\t\t\t\t\tonSelect( item );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tinstallBlockType( item ).then( ( success ) => {\n\t\t\t\t\t\t\t\t\tif ( success ) {\n\t\t\t\t\t\t\t\t\t\tonSelect( item );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonHover( null );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\titem={ item }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Composite>\n\t);\n}\n\nexport default DownloadableBlocksList;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"a11y\"];","/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\nimport { speak } from '@wordpress/a11y';\n\nfunction DownloadableBlocksInserterPanel( {\n\tchildren,\n\tdownloadableItems,\n\thasLocalBlocks,\n} ) {\n\tconst count = downloadableItems.length;\n\tuseEffect( () => {\n\t\tspeak(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %d: number of available blocks. */\n\t\t\t\t_n(\n\t\t\t\t\t'%d additional block is available to install.',\n\t\t\t\t\t'%d additional blocks are available to install.',\n\t\t\t\t\tcount\n\t\t\t\t),\n\t\t\t\tcount\n\t\t\t)\n\t\t);\n\t}, [ count ] );\n\n\treturn (\n\t\t<>\n\t\t\t{ ! hasLocalBlocks && (\n\t\t\t\t<p className=\"block-directory-downloadable-blocks-panel__no-local\">\n\t\t\t\t\t{ __( 'No results available from your installed blocks.' ) }\n\t\t\t\t</p>\n\t\t\t) }\n\n\t\t\t<div className=\"block-editor-inserter__quick-inserter-separator\" />\n\n\t\t\t<div className=\"block-directory-downloadable-blocks-panel\">\n\t\t\t\t<div className=\"block-directory-downloadable-blocks-panel__header\">\n\t\t\t\t\t<h2 className=\"block-directory-downloadable-blocks-panel__title\">\n\t\t\t\t\t\t{ __( 'Available to install' ) }\n\t\t\t\t\t</h2>\n\t\t\t\t\t<p className=\"block-directory-downloadable-blocks-panel__description\">\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'Select a block to install and add it to your post.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default DownloadableBlocksInserterPanel;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst blockDefault = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z\" />\n\t</SVG>\n);\n\nexport default blockDefault;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Icon, blockDefault } from '@wordpress/icons';\nimport { Tip, ExternalLink } from '@wordpress/components';\n\nfunction DownloadableBlocksNoResults() {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"block-editor-inserter__no-results\">\n\t\t\t\t<Icon\n\t\t\t\t\tclassName=\"block-editor-inserter__no-results-icon\"\n\t\t\t\t\ticon={ blockDefault }\n\t\t\t\t/>\n\t\t\t\t<p>{ __( 'No results found.' ) }</p>\n\t\t\t</div>\n\t\t\t<div className=\"block-editor-inserter__tips\">\n\t\t\t\t<Tip>\n\t\t\t\t\t{ __( 'Interested in creating your own block?' ) }\n\t\t\t\t\t<br />\n\t\t\t\t\t<ExternalLink href=\"https://developer.wordpress.org/block-editor/\">\n\t\t\t\t\t\t{ __( 'Get started here' ) }.\n\t\t\t\t\t</ExternalLink>\n\t\t\t\t</Tip>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default DownloadableBlocksNoResults;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Spinner } from '@wordpress/components';\nimport { compose } from '@wordpress/compose';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport DownloadableBlocksList from '../downloadable-blocks-list';\nimport DownloadableBlocksInserterPanel from './inserter-panel';\nimport DownloadableBlocksNoResults from './no-results';\nimport { store as blockDirectoryStore } from '../../store';\n\nfunction DownloadableBlocksPanel( {\n\tdownloadableItems,\n\tonSelect,\n\tonHover,\n\thasLocalBlocks,\n\thasPermission,\n\tisLoading,\n\tisTyping,\n} ) {\n\tif ( typeof hasPermission === 'undefined' || isLoading || isTyping ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ hasPermission && ! hasLocalBlocks && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<p className=\"block-directory-downloadable-blocks-panel__no-local\">\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'No results available from your installed blocks.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<div className=\"block-editor-inserter__quick-inserter-separator\" />\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t\t<div className=\"block-directory-downloadable-blocks-panel has-blocks-loading\">\n\t\t\t\t\t<Spinner />\n\t\t\t\t</div>\n\t\t\t</>\n\t\t);\n\t}\n\n\tif ( false === hasPermission ) {\n\t\tif ( ! hasLocalBlocks ) {\n\t\t\treturn <DownloadableBlocksNoResults />;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\treturn !! downloadableItems.length ? (\n\t\t<DownloadableBlocksInserterPanel\n\t\t\tdownloadableItems={ downloadableItems }\n\t\t\thasLocalBlocks={ hasLocalBlocks }\n\t\t>\n\t\t\t<DownloadableBlocksList\n\t\t\t\titems={ downloadableItems }\n\t\t\t\tonSelect={ onSelect }\n\t\t\t\tonHover={ onHover }\n\t\t\t/>\n\t\t</DownloadableBlocksInserterPanel>\n\t) : (\n\t\t! hasLocalBlocks && <DownloadableBlocksNoResults />\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select, { filterValue, rootClientId = null } ) => {\n\t\tconst { getDownloadableBlocks, isRequestingDownloadableBlocks } =\n\t\t\tselect( blockDirectoryStore );\n\t\tconst { canInsertBlockType } = select( blockEditorStore );\n\n\t\tconst hasPermission = select( coreStore ).canUser(\n\t\t\t'read',\n\t\t\t'block-directory/search'\n\t\t);\n\n\t\tfunction getInstallableBlocks( term ) {\n\t\t\treturn getDownloadableBlocks( term ).filter( ( block ) =>\n\t\t\t\tcanInsertBlockType( block, rootClientId, true )\n\t\t\t);\n\t\t}\n\n\t\tconst downloadableItems = hasPermission\n\t\t\t? getInstallableBlocks( filterValue )\n\t\t\t: [];\n\t\tconst isLoading = isRequestingDownloadableBlocks( filterValue );\n\n\t\treturn {\n\t\t\tdownloadableItems,\n\t\t\thasPermission,\n\t\t\tisLoading,\n\t\t};\n\t} ),\n] )( DownloadableBlocksPanel );\n","/**\n * WordPress dependencies\n */\nimport { __unstableInserterMenuExtension } from '@wordpress/block-editor';\nimport { debounce } from '@wordpress/compose';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport DownloadableBlocksPanel from '../../components/downloadable-blocks-panel';\n\nfunction InserterMenuDownloadableBlocksPanel() {\n\tconst [ debouncedFilterValue, setFilterValue ] = useState( '' );\n\tconst debouncedSetFilterValue = debounce( setFilterValue, 400 );\n\n\treturn (\n\t\t<__unstableInserterMenuExtension>\n\t\t\t{ ( {\n\t\t\t\tonSelect,\n\t\t\t\tonHover,\n\t\t\t\tfilterValue,\n\t\t\t\thasItems,\n\t\t\t\trootClientId,\n\t\t\t} ) => {\n\t\t\t\tif ( debouncedFilterValue !== filterValue ) {\n\t\t\t\t\tdebouncedSetFilterValue( filterValue );\n\t\t\t\t}\n\n\t\t\t\tif ( ! debouncedFilterValue ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<DownloadableBlocksPanel\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\t\tfilterValue={ debouncedFilterValue }\n\t\t\t\t\t\thasLocalBlocks={ hasItems }\n\t\t\t\t\t\tisTyping={ filterValue !== debouncedFilterValue }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} }\n\t\t</__unstableInserterMenuExtension>\n\t);\n}\n\nexport default InserterMenuDownloadableBlocksPanel;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"editPost\"];","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport DownloadableBlockIcon from '../downloadable-block-icon';\n\nexport default function CompactList( { items } ) {\n\tif ( ! items.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<ul className=\"block-directory-compact-list\">\n\t\t\t{ items.map( ( { icon, id, title, author } ) => (\n\t\t\t\t<li key={ id } className=\"block-directory-compact-list__item\">\n\t\t\t\t\t<DownloadableBlockIcon icon={ icon } title={ title } />\n\n\t\t\t\t\t<div className=\"block-directory-compact-list__item-details\">\n\t\t\t\t\t\t<div className=\"block-directory-compact-list__item-title\">\n\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"block-directory-compact-list__item-author\">\n\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: Name of the block author. */\n\t\t\t\t\t\t\t\t__( 'By %s' ),\n\t\t\t\t\t\t\t\tauthor\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t) ) }\n\t\t</ul>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { _n, sprintf } from '@wordpress/i18n';\nimport { PluginPrePublishPanel } from '@wordpress/edit-post';\nimport { useSelect } from '@wordpress/data';\nimport { blockDefault } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport CompactList from '../../components/compact-list';\nimport { store as blockDirectoryStore } from '../../store';\n\nexport default function InstalledBlocksPrePublishPanel() {\n\tconst newBlockTypes = useSelect(\n\t\t( select ) => select( blockDirectoryStore ).getNewBlockTypes(),\n\t\t[]\n\t);\n\n\tif ( ! newBlockTypes.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PluginPrePublishPanel\n\t\t\ticon={ blockDefault }\n\t\t\ttitle={ sprintf(\n\t\t\t\t// translators: %d: number of blocks (number).\n\t\t\t\t_n(\n\t\t\t\t\t'Added: %d block',\n\t\t\t\t\t'Added: %d blocks',\n\t\t\t\t\tnewBlockTypes.length\n\t\t\t\t),\n\t\t\t\tnewBlockTypes.length\n\t\t\t) }\n\t\t\tinitialOpen={ true }\n\t\t>\n\t\t\t<p className=\"installed-blocks-pre-publish-panel__copy\">\n\t\t\t\t{ _n(\n\t\t\t\t\t'The following block has been added to your site.',\n\t\t\t\t\t'The following blocks have been added to your site.',\n\t\t\t\t\tnewBlockTypes.length\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<CompactList items={ newBlockTypes } />\n\t\t</PluginPrePublishPanel>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { createBlock, getBlockType, parse } from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as blockDirectoryStore } from '../../store';\n\nexport default function InstallButton( { attributes, block, clientId } ) {\n\tconst isInstallingBlock = useSelect(\n\t\t( select ) => select( blockDirectoryStore ).isInstalling( block.id ),\n\t\t[ block.id ]\n\t);\n\tconst { installBlockType } = useDispatch( blockDirectoryStore );\n\tconst { replaceBlock } = useDispatch( blockEditorStore );\n\n\treturn (\n\t\t<Button\n\t\t\tonClick={ () =>\n\t\t\t\tinstallBlockType( block ).then( ( success ) => {\n\t\t\t\t\tif ( success ) {\n\t\t\t\t\t\tconst blockType = getBlockType( block.name );\n\t\t\t\t\t\tconst [ originalBlock ] = parse(\n\t\t\t\t\t\t\tattributes.originalContent\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif ( originalBlock && blockType ) {\n\t\t\t\t\t\t\treplaceBlock(\n\t\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\t\tcreateBlock(\n\t\t\t\t\t\t\t\t\tblockType.name,\n\t\t\t\t\t\t\t\t\toriginalBlock.attributes,\n\t\t\t\t\t\t\t\t\toriginalBlock.innerBlocks\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} )\n\t\t\t}\n\t\t\tdisabled={ isInstallingBlock }\n\t\t\tisBusy={ isInstallingBlock }\n\t\t\tvariant=\"primary\"\n\t\t>\n\t\t\t{ sprintf(\n\t\t\t\t/* translators: %s: block name */\n\t\t\t\t__( 'Install %s' ),\n\t\t\t\tblock.title\n\t\t\t) }\n\t\t</Button>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { createBlock } from '@wordpress/blocks';\nimport { RawHTML } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tWarning,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport InstallButton from './install-button';\nimport { store as blockDirectoryStore } from '../../store';\n\nconst getInstallMissing = ( OriginalComponent ) => ( props ) => {\n\tconst { originalName } = props.attributes;\n\t// Disable reason: This is a valid component, but it's mistaken for a callback.\n\t// eslint-disable-next-line react-hooks/rules-of-hooks\n\tconst { block, hasPermission } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getDownloadableBlocks } = select( blockDirectoryStore );\n\t\t\tconst blocks = getDownloadableBlocks(\n\t\t\t\t'block:' + originalName\n\t\t\t).filter( ( { name } ) => originalName === name );\n\t\t\treturn {\n\t\t\t\thasPermission: select( coreStore ).canUser(\n\t\t\t\t\t'read',\n\t\t\t\t\t'block-directory/search'\n\t\t\t\t),\n\t\t\t\tblock: blocks.length && blocks[ 0 ],\n\t\t\t};\n\t\t},\n\t\t[ originalName ]\n\t);\n\n\t// The user can't install blocks, or the block isn't available for download.\n\tif ( ! hasPermission || ! block ) {\n\t\treturn <OriginalComponent { ...props } />;\n\t}\n\n\treturn <ModifiedWarning { ...props } originalBlock={ block } />;\n};\n\nconst ModifiedWarning = ( { originalBlock, ...props } ) => {\n\tconst { originalName, originalUndelimitedContent, clientId } =\n\t\tprops.attributes;\n\tconst { replaceBlock } = useDispatch( blockEditorStore );\n\tconst convertToHTML = () => {\n\t\treplaceBlock(\n\t\t\tprops.clientId,\n\t\t\tcreateBlock( 'core/html', {\n\t\t\t\tcontent: originalUndelimitedContent,\n\t\t\t} )\n\t\t);\n\t};\n\n\tconst hasContent = !! originalUndelimitedContent;\n\tconst hasHTMLBlock = useSelect(\n\t\t( select ) => {\n\t\t\tconst { canInsertBlockType, getBlockRootClientId } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\treturn canInsertBlockType(\n\t\t\t\t'core/html',\n\t\t\t\tgetBlockRootClientId( clientId )\n\t\t\t);\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tlet messageHTML = sprintf(\n\t\t/* translators: %s: block name */\n\t\t__(\n\t\t\t'Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely.'\n\t\t),\n\t\toriginalBlock.title || originalName\n\t);\n\tconst actions = [\n\t\t<InstallButton\n\t\t\tkey=\"install\"\n\t\t\tblock={ originalBlock }\n\t\t\tattributes={ props.attributes }\n\t\t\tclientId={ props.clientId }\n\t\t/>,\n\t];\n\n\tif ( hasContent && hasHTMLBlock ) {\n\t\tmessageHTML = sprintf(\n\t\t\t/* translators: %s: block name */\n\t\t\t__(\n\t\t\t\t'Your site doesn’t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely.'\n\t\t\t),\n\t\t\toriginalBlock.title || originalName\n\t\t);\n\t\tactions.push(\n\t\t\t<Button key=\"convert\" onClick={ convertToHTML } variant=\"tertiary\">\n\t\t\t\t{ __( 'Keep as HTML' ) }\n\t\t\t</Button>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div { ...useBlockProps() }>\n\t\t\t<Warning actions={ actions }>{ messageHTML }</Warning>\n\t\t\t<RawHTML>{ originalUndelimitedContent }</RawHTML>\n\t\t</div>\n\t);\n};\n\nexport default getInstallMissing;\n","/**\n * WordPress dependencies\n */\nimport { registerPlugin } from '@wordpress/plugins';\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport AutoBlockUninstaller from '../components/auto-block-uninstaller';\nimport InserterMenuDownloadableBlocksPanel from './inserter-menu-downloadable-blocks-panel';\nimport InstalledBlocksPrePublishPanel from './installed-blocks-pre-publish-panel';\nimport getInstallMissing from './get-install-missing';\n\nregisterPlugin( 'block-directory', {\n\trender() {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<AutoBlockUninstaller />\n\t\t\t\t<InserterMenuDownloadableBlocksPanel />\n\t\t\t\t<InstalledBlocksPrePublishPanel />\n\t\t\t</>\n\t\t);\n\t},\n} );\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'block-directory/fallback',\n\t( settings, name ) => {\n\t\tif ( name !== 'core/missing' ) {\n\t\t\treturn settings;\n\t\t}\n\t\tsettings.edit = getInstallMissing( settings.edit );\n\n\t\treturn settings;\n\t}\n);\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","window","combineReducers","downloadableBlocks","state","action","type","filterValue","isRequesting","results","blockManagement","installedBlockTypes","isInstalling","item","filter","blockType","name","blockId","errorNotices","message","isFatal","restState","hasBlockType","blocks","length","some","i","innerBlocks","isRequestingDownloadableBlocks","getDownloadableBlocks","getInstalledBlockTypes","getNewBlockTypes","createRegistrySelector","select","usedBlockTree","blockEditorStore","getBlocks","getUnusedBlockTypes","getErrorNotices","getErrorNoticeForBlock","loadAsset","el","Promise","resolve","reject","newNode","document","createElement","nodeName","forEach","attr","innerHTML","appendChild","createTextNode","onload","onerror","Error","body","toLowerCase","src","getPluginUrl","block","link","links","self","href","fetchDownloadableBlocks","receiveDownloadableBlocks","installBlockType","async","registry","dispatch","id","success","clearErrorNotice","setIsInstalling","url","apiFetch","method","data","status","path","slug","_links","addInstalledBlockType","metadataFields","addQueryArgs","_fields","catch","then","response","unstable__bootstrapServerSideBlockDefinitions","fromEntries","entries","includes","location","parse","text","doc","DOMParser","parseFromString","newAssets","Array","from","querySelectorAll","asset","getElementById","newAsset","loadAssets","blocksStore","getBlockTypes","__","noticesStore","createInfoNotice","sprintf","title","speak","error","fatalAPIErrors","folder_exists","unable_to_connect_to_filesystem","code","setErrorNotice","createErrorNotice","isDismissible","uninstallBlockType","removeInstalledBlockType","__assign","assign","t","s","n","arguments","p","apply","this","lowerCase","str","create","DEFAULT_SPLIT_REGEXP","DEFAULT_STRIP_REGEXP","replace","input","re","RegExp","reduce","pascalCaseTransform","index","firstChar","charAt","lowerChars","substr","toUpperCase","pascalCase","options","splitRegexp","stripRegexp","transform","delimiter","result","start","end","slice","split","map","join","noCase","camelCaseTransform","storeConfig","reducer","selectors","actions","resolvers","store","createReduxStore","AutoBlockUninstaller","useDispatch","blockDirectoryStore","shouldRemoveBlockTypes","useSelect","isAutosavingPost","isSavingPost","editorStore","unusedBlockTypes","useEffect","unregisterBlockType","register","_extends","target","source","icon","size","props","cloneElement","width","height","SVG","xmlns","viewBox","Path","fillRule","clipRule","rating","stars","Math","round","fullStarCount","floor","halfStarCount","ceil","emptyStarCount","_","className","starFilled","starHalf","starEmpty","match","alt","BlockIcon","showColors","errorNotice","getDownloadableBlockLabel","ratingCount","hasNotice","isInstalled","decodeEntities","_n","composite","onClick","author","description","getBlockType","isInstallable","isBlockInstalling","notice","hasFatal","statusText","__experimentalIsFocusable","role","as","Button","event","preventDefault","isBusy","disabled","label","showTooltip","tooltipPosition","Spinner","createInterpolateElement","span","VisuallyHidden","noop","items","onHover","onSelect","useCompositeState","children","downloadableItems","hasLocalBlocks","count","blockDefault","Tip","ExternalLink","compose","withSelect","rootClientId","canInsertBlockType","hasPermission","coreStore","canUser","isLoading","isTyping","debouncedFilterValue","setFilterValue","useState","debouncedSetFilterValue","debounce","__unstableInserterMenuExtension","hasItems","CompactList","InstalledBlocksPrePublishPanel","newBlockTypes","PluginPrePublishPanel","initialOpen","InstallButton","attributes","clientId","isInstallingBlock","replaceBlock","originalBlock","originalContent","createBlock","variant","ModifiedWarning","originalName","originalUndelimitedContent","hasContent","hasHTMLBlock","getBlockRootClientId","messageHTML","push","content","useBlockProps","Warning","RawHTML","registerPlugin","render","addFilter","settings","edit","OriginalComponent"],"sourceRoot":""}
|
build/block-editor/index.js
CHANGED
@@ -1473,6 +1473,614 @@ function lineHeight(node) {
|
|
1473 |
module.exports = lineHeight;
|
1474 |
|
1475 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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Gradient),
|
2681 |
"__experimentalUseHasRecursion": () => (/* reexport */ useHasRecursion),
|
2682 |
"__experimentalUseMultipleOriginColorsAndGradients": () => (/* reexport */ useMultipleOriginColorsAndGradients),
|
|
|
2683 |
"__experimentalUseResizeCanvas": () => (/* reexport */ useResizeCanvas),
|
|
|
|
|
2684 |
"__unstableBlockNameContext": () => (/* reexport */ block_name_context),
|
2685 |
"__unstableBlockSettingsMenuFirstItem": () => (/* reexport */ block_settings_menu_first_item),
|
2686 |
"__unstableBlockToolbarLastItem": () => (/* reexport */ block_toolbar_last_item),
|
@@ -3225,6 +3836,7 @@ function moveTo(array, from, to) {
|
|
3225 |
|
3226 |
|
3227 |
|
|
|
3228 |
/**
|
3229 |
* Internal dependencies
|
3230 |
*/
|
@@ -3907,7 +4519,7 @@ const withResetControlledBlocks = reducer => (state, action) => {
|
|
3907 |
*/
|
3908 |
|
3909 |
|
3910 |
-
const blocks = (0,
|
3911 |
withBlockTree, // Needs to be before withInnerBlocksRemoveCascade.
|
3912 |
withInnerBlocksRemoveCascade, withReplaceInnerBlocks, // Needs to be after withInnerBlocksRemoveCascade.
|
3913 |
withBlockReset, withPersistentBlockChange, withIgnoredBlockChange, withResetControlledBlocks)({
|
@@ -4130,7 +4742,7 @@ withBlockReset, withPersistentBlockChange, withIgnoredBlockChange, withResetCont
|
|
4130 |
}
|
4131 |
|
4132 |
const mappedBlocks = mapBlockOrder(action.blocks);
|
4133 |
-
return (0,
|
4134 |
...(0,external_lodash_namespaceObject.omit)(mappedBlocks, '')
|
4135 |
}), nextState => (0,external_lodash_namespaceObject.mapValues)(nextState, subState => (0,external_lodash_namespaceObject.reduce)(subState, (result, clientId) => {
|
4136 |
if (clientId === clientIds[0]) {
|
@@ -4146,7 +4758,7 @@ withBlockReset, withPersistentBlockChange, withIgnoredBlockChange, withResetCont
|
|
4146 |
}
|
4147 |
|
4148 |
case 'REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN':
|
4149 |
-
return (0,
|
4150 |
nextState => (0,external_lodash_namespaceObject.omit)(nextState, action.removedClientIds), // Remove deleted blocks from other blocks' orderings.
|
4151 |
nextState => (0,external_lodash_namespaceObject.mapValues)(nextState, subState => (0,external_lodash_namespaceObject.without)(subState, ...action.removedClientIds))])(state);
|
4152 |
}
|
@@ -7778,7 +8390,7 @@ function __unstableHasActiveBlockOverlayActive(state, clientId) {
|
|
7778 |
const editorMode = __unstableGetEditorMode(state); // In zoom-out mode, the block overlay is always active for top level blocks.
|
7779 |
|
7780 |
|
7781 |
-
if (editorMode === 'zoom-out' && !getBlockRootClientId(state, clientId)) {
|
7782 |
return true;
|
7783 |
} // In navigation mode, the block overlay is active when the block is not
|
7784 |
// selected (and doesn't contain a selected child). The same behavior is
|
@@ -9619,8 +10231,8 @@ function BlockControlsSlot(_ref) {
|
|
9619 |
} = _ref;
|
9620 |
const accessibleToolbarState = (0,external_wp_element_namespaceObject.useContext)(external_wp_components_namespaceObject.__experimentalToolbarContext);
|
9621 |
const Slot = block_controls_groups[group].Slot;
|
9622 |
-
const
|
9623 |
-
const hasFills = Boolean(
|
9624 |
|
9625 |
if (!hasFills) {
|
9626 |
return null;
|
@@ -10484,11 +11096,11 @@ function SpacingInputControl(_ref) {
|
|
10484 |
const showHint = showRangeControl && !showCustomValueControl && currentValueHint !== undefined;
|
10485 |
return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, side !== 'all' && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
|
10486 |
className: "components-spacing-sizes-control__side-labels"
|
10487 |
-
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.
|
10488 |
className: "components-spacing-sizes-control__side-label"
|
10489 |
-
}, LABELS[side]), showHint && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.
|
10490 |
className: "components-spacing-sizes-control__hint-single"
|
10491 |
-
}, currentValueHint)), side === 'all' && showHint && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.
|
10492 |
className: "components-spacing-sizes-control__hint-all"
|
10493 |
}, currentValueHint), !disableCustomSpacingSizes && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
|
10494 |
label: showCustomValueControl ? (0,external_wp_i18n_namespaceObject.__)('Use size preset') : (0,external_wp_i18n_namespaceObject.__)('Set custom size'),
|
@@ -10544,7 +11156,8 @@ function SpacingInputControl(_ref) {
|
|
10544 |
max: spacingSizes.length - 1,
|
10545 |
marks: marks,
|
10546 |
label: ariaLabel,
|
10547 |
-
hideLabelFromVision: true
|
|
|
10548 |
}), !showRangeControl && !showCustomValueControl && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.CustomSelectControl, {
|
10549 |
className: "components-spacing-sizes-control__custom-select-control",
|
10550 |
value: options.find(option => option.key === currentValue) || '' // passing undefined here causes a downshift controlled/uncontrolled warning
|
@@ -10763,12 +11376,17 @@ function LinkedButton(_ref) {
|
|
10763 |
|
10764 |
|
10765 |
|
|
|
|
|
|
|
|
|
10766 |
/**
|
10767 |
* WordPress dependencies
|
10768 |
*/
|
10769 |
|
10770 |
|
10771 |
|
|
|
10772 |
/**
|
10773 |
* Internal dependencies
|
10774 |
*/
|
@@ -10832,8 +11450,10 @@ function SpacingSizesControl(_ref) {
|
|
10832 |
};
|
10833 |
return (0,external_wp_element_namespaceObject.createElement)("fieldset", {
|
10834 |
role: "region",
|
10835 |
-
className:
|
10836 |
-
|
|
|
|
|
10837 |
as: "legend"
|
10838 |
}, label), !hasOneSide && (0,external_wp_element_namespaceObject.createElement)(LinkedButton, {
|
10839 |
onClick: toggleLinked,
|
@@ -11137,13 +11757,14 @@ function InspectorControlsSlot(_ref) {
|
|
11137 |
} = _ref;
|
11138 |
const Slot = (_groups$group = inspector_controls_groups[group]) === null || _groups$group === void 0 ? void 0 : _groups$group.Slot;
|
11139 |
const slot = (0,external_wp_components_namespaceObject.__experimentalUseSlot)(Slot === null || Slot === void 0 ? void 0 : Slot.__unstableName);
|
|
|
11140 |
|
11141 |
if (!Slot || !slot) {
|
11142 |
typeof process !== "undefined" && process.env && "production" !== "production" ? 0 : void 0;
|
11143 |
return null;
|
11144 |
}
|
11145 |
|
11146 |
-
const hasFills = Boolean(
|
11147 |
|
11148 |
if (!hasFills) {
|
11149 |
return null;
|
@@ -11275,18 +11896,7 @@ function BlockPopover(_ref, ref) {
|
|
11275 |
const selectedElement = useBlockElement(clientId);
|
11276 |
const lastSelectedElement = useBlockElement(bottomClientId !== null && bottomClientId !== void 0 ? bottomClientId : clientId);
|
11277 |
const mergedRefs = (0,external_wp_compose_namespaceObject.useMergeRefs)([ref, use_popover_scroll(__unstableContentRef)]);
|
11278 |
-
const
|
11279 |
-
if (!selectedElement || lastSelectedElement !== selectedElement) {
|
11280 |
-
return {};
|
11281 |
-
}
|
11282 |
-
|
11283 |
-
return {
|
11284 |
-
position: 'absolute',
|
11285 |
-
width: selectedElement.offsetWidth,
|
11286 |
-
height: selectedElement.offsetHeight
|
11287 |
-
};
|
11288 |
-
}, [selectedElement, lastSelectedElement, __unstableRefreshSize]);
|
11289 |
-
const [popoverAnchorRecomputeCounter, forceRecomputePopoverAnchor] = (0,external_wp_element_namespaceObject.useReducer)( // Module is there to make sure that the counter doesn't overflow.
|
11290 |
s => (s + 1) % MAX_POPOVER_RECOMPUTE_COUNTER, 0); // When blocks are moved up/down, they are animated to their new position by
|
11291 |
// updating the `transform` property manually (i.e. without using CSS
|
11292 |
// transitions or animations). The animation, which can also scroll the block
|
@@ -11300,7 +11910,7 @@ function BlockPopover(_ref, ref) {
|
|
11300 |
return;
|
11301 |
}
|
11302 |
|
11303 |
-
const observer = new window.MutationObserver(
|
11304 |
observer.observe(selectedElement, {
|
11305 |
attributes: true
|
11306 |
});
|
@@ -11308,11 +11918,25 @@ function BlockPopover(_ref, ref) {
|
|
11308 |
observer.disconnect();
|
11309 |
};
|
11310 |
}, [selectedElement]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11311 |
const popoverAnchor = (0,external_wp_element_namespaceObject.useMemo)(() => {
|
11312 |
-
if ( //
|
11313 |
// than 0. This check is only there to satisfy the correctness of the
|
11314 |
// exhaustive-deps rule for the `useMemo` hook.
|
11315 |
-
|
11316 |
return undefined;
|
11317 |
}
|
11318 |
|
@@ -11337,7 +11961,7 @@ function BlockPopover(_ref, ref) {
|
|
11337 |
|
11338 |
ownerDocument: selectedElement.ownerDocument
|
11339 |
};
|
11340 |
-
}, [bottomClientId, lastSelectedElement, selectedElement,
|
11341 |
|
11342 |
if (!selectedElement || bottomClientId && !lastSelectedElement) {
|
11343 |
return null;
|
@@ -11346,12 +11970,12 @@ function BlockPopover(_ref, ref) {
|
|
11346 |
return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Popover, _extends({
|
11347 |
ref: mergedRefs,
|
11348 |
animate: false,
|
11349 |
-
position: "top right left",
|
11350 |
focusOnMount: false,
|
11351 |
anchor: popoverAnchor // Render in the old slot if needed for backward compatibility,
|
11352 |
// otherwise render in place (not in the default popover slot).
|
11353 |
,
|
11354 |
__unstableSlotName: __unstablePopoverSlot || null,
|
|
|
11355 |
resize: false,
|
11356 |
flip: false,
|
11357 |
shift: true
|
@@ -14746,7 +15370,7 @@ function BlockHTML(_ref) {
|
|
14746 |
|
14747 |
/* harmony default export */ const block_html = (BlockHTML);
|
14748 |
|
14749 |
-
;// CONCATENATED MODULE: ./
|
14750 |
let updateQueue = makeQueue();
|
14751 |
const raf = fn => schedule(fn, updateQueue);
|
14752 |
let writeQueue = makeQueue();
|
@@ -14792,9 +15416,9 @@ let findTimeout = time => ~(~timeouts.findIndex(t => t.time > time) || ~timeouts
|
|
14792 |
raf.cancel = fn => {
|
14793 |
onStartQueue.delete(fn);
|
14794 |
onFrameQueue.delete(fn);
|
|
|
14795 |
updateQueue.delete(fn);
|
14796 |
writeQueue.delete(fn);
|
14797 |
-
onFinishQueue.delete(fn);
|
14798 |
};
|
14799 |
|
14800 |
raf.sync = fn => {
|
@@ -14893,15 +15517,16 @@ function update() {
|
|
14893 |
pendingCount -= count;
|
14894 |
}
|
14895 |
|
|
|
|
|
|
|
|
|
|
|
14896 |
onStartQueue.flush();
|
14897 |
updateQueue.flush(prevTs ? Math.min(64, ts - prevTs) : 16.667);
|
14898 |
onFrameQueue.flush();
|
14899 |
writeQueue.flush();
|
14900 |
onFinishQueue.flush();
|
14901 |
-
|
14902 |
-
if (!pendingCount) {
|
14903 |
-
stop();
|
14904 |
-
}
|
14905 |
}
|
14906 |
|
14907 |
function makeQueue() {
|
@@ -14968,8 +15593,7 @@ const __raf = {
|
|
14968 |
// EXTERNAL MODULE: external "React"
|
14969 |
var external_React_ = __webpack_require__(9196);
|
14970 |
var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_);
|
14971 |
-
;// CONCATENATED MODULE: ./
|
14972 |
-
|
14973 |
|
14974 |
|
14975 |
|
@@ -15462,7 +16086,7 @@ function findRange(input, inputRange) {
|
|
15462 |
}
|
15463 |
|
15464 |
function react_spring_shared_esm_extends() {
|
15465 |
-
react_spring_shared_esm_extends = Object.assign
|
15466 |
for (var i = 1; i < arguments.length; i++) {
|
15467 |
var source = arguments[i];
|
15468 |
|
@@ -15475,7 +16099,6 @@ function react_spring_shared_esm_extends() {
|
|
15475 |
|
15476 |
return target;
|
15477 |
};
|
15478 |
-
|
15479 |
return react_spring_shared_esm_extends.apply(this, arguments);
|
15480 |
}
|
15481 |
|
@@ -15667,11 +16290,11 @@ function isAnimatedString(value) {
|
|
15667 |
return react_spring_shared_esm_is.str(value) && (value[0] == '#' || /\d/.test(value) || !isSSR() && cssVariableRegex.test(value) || value in (colors$1 || {}));
|
15668 |
}
|
15669 |
|
15670 |
-
const
|
15671 |
|
15672 |
const useIsMounted = () => {
|
15673 |
const isMounted = (0,external_React_.useRef)(false);
|
15674 |
-
|
15675 |
isMounted.current = true;
|
15676 |
return () => {
|
15677 |
isMounted.current = false;
|
@@ -15747,9 +16370,30 @@ function react_spring_shared_esm_usePrev(value) {
|
|
15747 |
return prevRef.current;
|
15748 |
}
|
15749 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15750 |
|
15751 |
|
15752 |
-
|
|
|
15753 |
|
15754 |
|
15755 |
|
@@ -15981,7 +16625,7 @@ function getAnimatedType(value) {
|
|
15981 |
}
|
15982 |
|
15983 |
function react_spring_animated_esm_extends() {
|
15984 |
-
react_spring_animated_esm_extends = Object.assign
|
15985 |
for (var i = 1; i < arguments.length; i++) {
|
15986 |
var source = arguments[i];
|
15987 |
|
@@ -15994,7 +16638,6 @@ function react_spring_animated_esm_extends() {
|
|
15994 |
|
15995 |
return target;
|
15996 |
};
|
15997 |
-
|
15998 |
return react_spring_animated_esm_extends.apply(this, arguments);
|
15999 |
}
|
16000 |
|
@@ -16024,7 +16667,7 @@ const withAnimated = (Component, host) => {
|
|
16024 |
|
16025 |
const observer = new PropsObserver(callback, deps);
|
16026 |
const observerRef = (0,external_React_.useRef)();
|
16027 |
-
|
16028 |
observerRef.current = observer;
|
16029 |
react_spring_shared_esm_each(deps, dep => addFluidObserver(dep, observer));
|
16030 |
return () => {
|
@@ -16120,7 +16763,7 @@ const getDisplayName = arg => react_spring_shared_esm_is.str(arg) ? arg : arg &&
|
|
16120 |
|
16121 |
|
16122 |
|
16123 |
-
;// CONCATENATED MODULE: ./
|
16124 |
|
16125 |
|
16126 |
|
@@ -16130,7 +16773,7 @@ const getDisplayName = arg => react_spring_shared_esm_is.str(arg) ? arg : arg &&
|
|
16130 |
|
16131 |
|
16132 |
function react_spring_core_esm_extends() {
|
16133 |
-
react_spring_core_esm_extends = Object.assign
|
16134 |
for (var i = 1; i < arguments.length; i++) {
|
16135 |
var source = arguments[i];
|
16136 |
|
@@ -16143,7 +16786,6 @@ function react_spring_core_esm_extends() {
|
|
16143 |
|
16144 |
return target;
|
16145 |
};
|
16146 |
-
|
16147 |
return react_spring_core_esm_extends.apply(this, arguments);
|
16148 |
}
|
16149 |
|
@@ -16272,7 +16914,7 @@ function replaceRef(ctrl, ref) {
|
|
16272 |
}
|
16273 |
|
16274 |
function useChain(refs, timeSteps, timeFrame = 1000) {
|
16275 |
-
|
16276 |
if (timeSteps) {
|
16277 |
let prevDelay = 0;
|
16278 |
each(refs, (ref, i) => {
|
@@ -16667,8 +17309,8 @@ function runAsync(to, props, state, target) {
|
|
16667 |
}
|
16668 |
})(to);
|
16669 |
} else {
|
16670 |
-
|
16671 |
-
|
16672 |
|
16673 |
await Promise.all([animating.then(preventBail), bailPromise]);
|
16674 |
result = getFinishedResult(target.get(), true, false);
|
@@ -16897,6 +17539,7 @@ class SpringValue extends FrameValue {
|
|
16897 |
const from = anim.fromValues[i];
|
16898 |
const v0 = node.v0 != null ? node.v0 : node.v0 = react_spring_shared_esm_is.arr(config.velocity) ? config.velocity[i] : config.velocity;
|
16899 |
let velocity;
|
|
|
16900 |
|
16901 |
if (!react_spring_shared_esm_is.und(config.duration)) {
|
16902 |
let p = 1;
|
@@ -16920,51 +17563,50 @@ class SpringValue extends FrameValue {
|
|
16920 |
velocity = (position - node.lastPosition) / dt;
|
16921 |
finished = p == 1;
|
16922 |
} else if (config.decay) {
|
16923 |
-
|
16924 |
-
|
16925 |
-
|
16926 |
-
|
16927 |
-
|
16928 |
-
|
16929 |
-
|
16930 |
-
|
16931 |
-
|
16932 |
-
|
16933 |
-
|
16934 |
-
|
16935 |
-
|
16936 |
-
|
16937 |
-
|
16938 |
-
|
16939 |
-
|
16940 |
-
|
16941 |
-
|
16942 |
-
|
16943 |
-
|
16944 |
-
|
16945 |
-
|
16946 |
-
|
16947 |
-
|
16948 |
-
|
16949 |
-
}
|
16950 |
-
|
16951 |
-
if (canBounce) {
|
16952 |
-
isBouncing = position == to || position > to == isGrowing;
|
16953 |
|
16954 |
-
|
16955 |
-
|
16956 |
-
position = to;
|
16957 |
-
}
|
16958 |
-
}
|
16959 |
|
16960 |
-
|
16961 |
-
|
16962 |
-
|
16963 |
-
velocity = velocity + acceleration * step;
|
16964 |
-
position = position + velocity * step;
|
16965 |
}
|
16966 |
}
|
16967 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16968 |
node.lastVelocity = velocity;
|
16969 |
|
16970 |
if (Number.isNaN(position)) {
|
@@ -17131,8 +17773,8 @@ class SpringValue extends FrameValue {
|
|
17131 |
if (!react_spring_shared_esm_is.und(from)) {
|
17132 |
this._set(from);
|
17133 |
} else if (!getAnimated(this)) {
|
17134 |
-
|
17135 |
-
|
17136 |
}
|
17137 |
|
17138 |
return range;
|
@@ -17305,8 +17947,8 @@ class SpringValue extends FrameValue {
|
|
17305 |
if (anim.changed && !reset) {
|
17306 |
started = true;
|
17307 |
} else if (!started) {
|
17308 |
-
|
17309 |
-
|
17310 |
}
|
17311 |
|
17312 |
if (!hasAsyncTo) {
|
@@ -17340,8 +17982,8 @@ class SpringValue extends FrameValue {
|
|
17340 |
if (reset) {
|
17341 |
callProp(defaultProps.onRest, result);
|
17342 |
} else {
|
17343 |
-
|
17344 |
-
|
17345 |
});
|
17346 |
}
|
17347 |
}
|
@@ -17353,12 +17995,12 @@ class SpringValue extends FrameValue {
|
|
17353 |
if (hasAsyncTo) {
|
17354 |
resolve(runAsync(props.to, props, this._state, this));
|
17355 |
} else if (started) {
|
17356 |
-
|
17357 |
-
|
17358 |
-
|
17359 |
-
|
17360 |
-
|
17361 |
-
|
17362 |
}
|
17363 |
|
17364 |
_focus(value) {
|
@@ -17788,36 +18430,36 @@ async function flushUpdate(ctrl, props, isLoop) {
|
|
17788 |
defaults.onRest = undefined;
|
17789 |
}
|
17790 |
} else {
|
17791 |
-
|
17792 |
-
|
17793 |
-
|
17794 |
-
|
17795 |
-
|
17796 |
-
|
17797 |
-
props[key] = ({
|
17798 |
-
finished,
|
17799 |
-
cancelled
|
17800 |
-
}) => {
|
17801 |
-
const result = queue.get(handler);
|
17802 |
-
|
17803 |
-
if (result) {
|
17804 |
-
if (!finished) result.finished = false;
|
17805 |
-
if (cancelled) result.cancelled = true;
|
17806 |
-
} else {
|
17807 |
-
queue.set(handler, {
|
17808 |
-
value: null,
|
17809 |
-
finished: finished || false,
|
17810 |
-
cancelled: cancelled || false
|
17811 |
-
});
|
17812 |
-
}
|
17813 |
-
};
|
17814 |
|
17815 |
-
|
17816 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17817 |
}
|
|
|
|
|
|
|
|
|
17818 |
}
|
17819 |
-
}
|
17820 |
-
}
|
|
|
17821 |
|
17822 |
const state = ctrl['_state'];
|
17823 |
|
@@ -17825,8 +18467,8 @@ async function flushUpdate(ctrl, props, isLoop) {
|
|
17825 |
state.paused = props.pause;
|
17826 |
flushCalls(props.pause ? state.pauseQueue : state.resumeQueue);
|
17827 |
} else if (state.paused) {
|
17828 |
-
|
17829 |
-
|
17830 |
|
17831 |
const promises = (keys || Object.keys(ctrl.springs)).map(key => ctrl.springs[key].start(props));
|
17832 |
const cancel = props.cancel === true || getDefaultProp(props, 'cancel') === true;
|
@@ -18118,7 +18760,7 @@ function useSprings(length, props, deps) {
|
|
18118 |
const context = (0,external_React_.useContext)(SpringContext);
|
18119 |
const prevContext = react_spring_shared_esm_usePrev(context);
|
18120 |
const hasContext = context !== prevContext && hasProps(context);
|
18121 |
-
|
18122 |
layoutId.current++;
|
18123 |
state.ctrls = ctrls.current;
|
18124 |
const {
|
@@ -18183,7 +18825,7 @@ function useTrail(length, propsArg, deps) {
|
|
18183 |
return props;
|
18184 |
}, deps || [{}]);
|
18185 |
const ref = (_passedRef = passedRef) != null ? _passedRef : result[1];
|
18186 |
-
|
18187 |
each(ref.current, (ctrl, i) => {
|
18188 |
const parent = ref.current[i + (reverse ? 1 : -1)];
|
18189 |
|
@@ -18257,19 +18899,13 @@ function useTransition(data, props, deps) {
|
|
18257 |
const transitions = [];
|
18258 |
const usedTransitions = useRef(null);
|
18259 |
const prevTransitions = reset ? null : usedTransitions.current;
|
18260 |
-
|
18261 |
usedTransitions.current = transitions;
|
18262 |
});
|
18263 |
useOnce(() => {
|
18264 |
-
each(
|
18265 |
-
|
18266 |
-
|
18267 |
-
(_t$ctrl$ref = t.ctrl.ref) == null ? void 0 : _t$ctrl$ref.add(t.ctrl);
|
18268 |
-
const change = changes.get(t);
|
18269 |
-
|
18270 |
-
if (change) {
|
18271 |
-
t.ctrl.start(change.payload);
|
18272 |
-
}
|
18273 |
});
|
18274 |
return () => {
|
18275 |
each(usedTransitions.current, t => {
|
@@ -18284,7 +18920,7 @@ function useTransition(data, props, deps) {
|
|
18284 |
});
|
18285 |
const keys = getKeys(items, propsFn ? propsFn() : props, prevTransitions);
|
18286 |
const expired = reset && usedTransitions.current || [];
|
18287 |
-
|
18288 |
ctrl,
|
18289 |
item,
|
18290 |
key
|
@@ -18458,7 +19094,7 @@ function useTransition(data, props, deps) {
|
|
18458 |
const context = useContext(SpringContext);
|
18459 |
const prevContext = usePrev(context);
|
18460 |
const hasContext = context !== prevContext && hasProps(context);
|
18461 |
-
|
18462 |
if (hasContext) {
|
18463 |
each(transitions, t => {
|
18464 |
t.ctrl.start({
|
@@ -18473,7 +19109,7 @@ function useTransition(data, props, deps) {
|
|
18473 |
transitions.splice(ind, 1);
|
18474 |
}
|
18475 |
});
|
18476 |
-
|
18477 |
each(exitingTransitions.current.size ? exitingTransitions.current : changes, ({
|
18478 |
phase,
|
18479 |
payload
|
@@ -18493,7 +19129,7 @@ function useTransition(data, props, deps) {
|
|
18493 |
if (payload) {
|
18494 |
replaceRef(ctrl, payload.ref);
|
18495 |
|
18496 |
-
if (ctrl.ref && !forceChange.current) {
|
18497 |
ctrl.update(payload);
|
18498 |
} else {
|
18499 |
ctrl.start(payload);
|
@@ -18673,10 +19309,10 @@ class Interpolation extends FrameValue {
|
|
18673 |
this._start();
|
18674 |
}
|
18675 |
} else if (event.type == 'idle') {
|
18676 |
-
|
18677 |
-
|
18678 |
-
|
18679 |
-
|
18680 |
}
|
18681 |
|
18682 |
}
|
@@ -18715,7 +19351,7 @@ const react_spring_core_esm_update = frameLoop.advance;
|
|
18715 |
|
18716 |
;// CONCATENATED MODULE: external "ReactDOM"
|
18717 |
const external_ReactDOM_namespaceObject = window["ReactDOM"];
|
18718 |
-
;// CONCATENATED MODULE: ./
|
18719 |
|
18720 |
|
18721 |
|
@@ -21285,7 +21921,11 @@ function useArrowNav() {
|
|
21285 |
function onKeyDown(event) {
|
21286 |
const {
|
21287 |
keyCode,
|
21288 |
-
target
|
|
|
|
|
|
|
|
|
21289 |
} = event;
|
21290 |
const isUp = keyCode === external_wp_keycodes_namespaceObject.UP;
|
21291 |
const isDown = keyCode === external_wp_keycodes_namespaceObject.DOWN;
|
@@ -21295,8 +21935,7 @@ function useArrowNav() {
|
|
21295 |
const isHorizontal = isLeft || isRight;
|
21296 |
const isVertical = isUp || isDown;
|
21297 |
const isNav = isHorizontal || isVertical;
|
21298 |
-
const
|
21299 |
-
const hasModifier = isShift || event.ctrlKey || event.altKey || event.metaKey;
|
21300 |
const isNavEdge = isVertical ? external_wp_dom_namespaceObject.isVerticalEdge : external_wp_dom_namespaceObject.isHorizontalEdge;
|
21301 |
const {
|
21302 |
ownerDocument
|
@@ -21321,7 +21960,7 @@ function useArrowNav() {
|
|
21321 |
return;
|
21322 |
}
|
21323 |
|
21324 |
-
if (
|
21325 |
return;
|
21326 |
}
|
21327 |
|
@@ -21372,17 +22011,21 @@ function useArrowNav() {
|
|
21372 |
keepCaretInsideBlock
|
21373 |
} = getSettings();
|
21374 |
|
21375 |
-
if (
|
21376 |
if (isClosestTabbableABlock(target, isReverse) && isNavEdge(target, isReverse)) {
|
21377 |
node.contentEditable = true; // Firefox doesn't automatically move focus.
|
21378 |
|
21379 |
node.focus();
|
21380 |
}
|
21381 |
-
} else if (isVertical && (0,external_wp_dom_namespaceObject.isVerticalEdge)(target, isReverse) &&
|
|
|
|
|
21382 |
const closestTabbable = getClosestTabbable(target, isReverse, node, true);
|
21383 |
|
21384 |
if (closestTabbable) {
|
21385 |
-
(0,external_wp_dom_namespaceObject.placeCaretAtVerticalEdge)(closestTabbable,
|
|
|
|
|
21386 |
event.preventDefault();
|
21387 |
}
|
21388 |
} else if (isHorizontal && defaultView.getSelection().isCollapsed && (0,external_wp_dom_namespaceObject.isHorizontalEdge)(target, isReverseDir) && !keepCaretInsideBlock) {
|
@@ -22358,13 +23001,13 @@ function Iframe(_ref3, ref) {
|
|
22358 |
|
22359 |
/* harmony default export */ const iframe = ((0,external_wp_element_namespaceObject.forwardRef)(Iframe));
|
22360 |
|
22361 |
-
;// CONCATENATED MODULE: ./
|
22362 |
var r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},n=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*r)/n+0},e=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),r>n?n:r>t?r:t},u=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},a=function(r){return{r:e(r.r,0,255),g:e(r.g,0,255),b:e(r.b,0,255),a:e(r.a)}},o=function(r){return{r:n(r.r),g:n(r.g),b:n(r.b),a:n(r.a,3)}},i=/^#([0-9a-f]{3,8})$/i,s=function(r){var t=r.toString(16);return t.length<2?"0"+t:t},h=function(r){var t=r.r,n=r.g,e=r.b,u=r.a,a=Math.max(t,n,e),o=a-Math.min(t,n,e),i=o?a===t?(n-e)/o:a===n?2+(e-t)/o:4+(t-n)/o:0;return{h:60*(i<0?i+6:i),s:a?o/a*100:0,v:a/255*100,a:u}},b=function(r){var t=r.h,n=r.s,e=r.v,u=r.a;t=t/360*6,n/=100,e/=100;var a=Math.floor(t),o=e*(1-n),i=e*(1-(t-a)*n),s=e*(1-(1-t+a)*n),h=a%6;return{r:255*[e,i,o,o,s,e][h],g:255*[s,e,e,i,o,o][h],b:255*[o,o,s,e,e,i][h],a:u}},g=function(r){return{h:u(r.h),s:e(r.s,0,100),l:e(r.l,0,100),a:e(r.a)}},d=function(r){return{h:n(r.h),s:n(r.s),l:n(r.l),a:n(r.a,3)}},f=function(r){return b((n=(t=r).s,{h:t.h,s:(n*=((e=t.l)<50?e:100-e)/100)>0?2*n/(e+n)*100:0,v:e+n,a:t.a}));var t,n,e},c=function(r){return{h:(t=h(r)).h,s:(u=(200-(n=t.s))*(e=t.v)/100)>0&&u<200?n*e/100/(u<=100?u:200-u)*100:0,l:u/2,a:t.a};var t,n,e,u},l=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,p=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,v=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,m=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y={string:[[function(r){var t=i.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:4===r.length?n(parseInt(r[3]+r[3],16)/255,2):1}:6===r.length||8===r.length?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:8===r.length?n(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var t=v.exec(r)||m.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:a({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(t){var n=l.exec(t)||p.exec(t);if(!n)return null;var e,u,a=g({h:(e=n[1],u=n[2],void 0===u&&(u="deg"),Number(e)*(r[u]||1)),s:Number(n[3]),l:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)});return f(a)},"hsl"]],object:[[function(r){var n=r.r,e=r.g,u=r.b,o=r.a,i=void 0===o?1:o;return t(n)&&t(e)&&t(u)?a({r:Number(n),g:Number(e),b:Number(u),a:Number(i)}):null},"rgb"],[function(r){var n=r.h,e=r.s,u=r.l,a=r.a,o=void 0===a?1:a;if(!t(n)||!t(e)||!t(u))return null;var i=g({h:Number(n),s:Number(e),l:Number(u),a:Number(o)});return f(i)},"hsl"],[function(r){var n=r.h,a=r.s,o=r.v,i=r.a,s=void 0===i?1:i;if(!t(n)||!t(a)||!t(o))return null;var h=function(r){return{h:u(r.h),s:e(r.s,0,100),v:e(r.v,0,100),a:e(r.a)}}({h:Number(n),s:Number(a),v:Number(o),a:Number(s)});return b(h)},"hsv"]]},N=function(r,t){for(var n=0;n<t.length;n++){var e=t[n][0](r);if(e)return[e,t[n][1]]}return[null,void 0]},x=function(r){return"string"==typeof r?N(r.trim(),y.string):"object"==typeof r&&null!==r?N(r,y.object):[null,void 0]},I=function(r){return x(r)[1]},M=function(r,t){var n=c(r);return{h:n.h,s:e(n.s+100*t,0,100),l:n.l,a:n.a}},H=function(r){return(299*r.r+587*r.g+114*r.b)/1e3/255},$=function(r,t){var n=c(r);return{h:n.h,s:n.s,l:e(n.l+100*t,0,100),a:n.a}},j=function(){function r(r){this.parsed=x(r)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return r.prototype.isValid=function(){return null!==this.parsed},r.prototype.brightness=function(){return n(H(this.rgba),2)},r.prototype.isDark=function(){return H(this.rgba)<.5},r.prototype.isLight=function(){return H(this.rgba)>=.5},r.prototype.toHex=function(){return r=o(this.rgba),t=r.r,e=r.g,u=r.b,i=(a=r.a)<1?s(n(255*a)):"","#"+s(t)+s(e)+s(u)+i;var r,t,e,u,a,i},r.prototype.toRgb=function(){return o(this.rgba)},r.prototype.toRgbString=function(){return r=o(this.rgba),t=r.r,n=r.g,e=r.b,(u=r.a)<1?"rgba("+t+", "+n+", "+e+", "+u+")":"rgb("+t+", "+n+", "+e+")";var r,t,n,e,u},r.prototype.toHsl=function(){return d(c(this.rgba))},r.prototype.toHslString=function(){return r=d(c(this.rgba)),t=r.h,n=r.s,e=r.l,(u=r.a)<1?"hsla("+t+", "+n+"%, "+e+"%, "+u+")":"hsl("+t+", "+n+"%, "+e+"%)";var r,t,n,e,u},r.prototype.toHsv=function(){return r=h(this.rgba),{h:n(r.h),s:n(r.s),v:n(r.v),a:n(r.a,3)};var r},r.prototype.invert=function(){return w({r:255-(r=this.rgba).r,g:255-r.g,b:255-r.b,a:r.a});var r},r.prototype.saturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,r))},r.prototype.desaturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,-r))},r.prototype.grayscale=function(){return w(M(this.rgba,-1))},r.prototype.lighten=function(r){return void 0===r&&(r=.1),w($(this.rgba,r))},r.prototype.darken=function(r){return void 0===r&&(r=.1),w($(this.rgba,-r))},r.prototype.rotate=function(r){return void 0===r&&(r=15),this.hue(this.hue()+r)},r.prototype.alpha=function(r){return"number"==typeof r?w({r:(t=this.rgba).r,g:t.g,b:t.b,a:r}):n(this.rgba.a,3);var t},r.prototype.hue=function(r){var t=c(this.rgba);return"number"==typeof r?w({h:r,s:t.s,l:t.l,a:t.a}):n(t.h)},r.prototype.isEqual=function(r){return this.toHex()===w(r).toHex()},r}(),w=function(r){return r instanceof j?r:new j(r)},S=[],k=function(r){r.forEach(function(r){S.indexOf(r)<0&&(r(j,y),S.push(r))})},E=function(){return new j({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})};
|
22363 |
|
22364 |
-
;// CONCATENATED MODULE: ./
|
22365 |
/* harmony default export */ function names(e,f){var a={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var d in a)r[a[d]]=d;var l={};e.prototype.toName=function(f){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var d,i,n=r[this.toHex()];if(n)return n;if(null==f?void 0:f.closest){var o=this.toRgb(),t=1/0,b="black";if(!l.length)for(var c in a)l[c]=new e(a[c]).toRgb();for(var g in a){var u=(d=o,i=l[g],Math.pow(d.r-i.r,2)+Math.pow(d.g-i.g,2)+Math.pow(d.b-i.b,2));u<t&&(t=u,b=g)}return b}};f.string.push([function(f){var r=f.toLowerCase(),d="transparent"===r?"#0000":a[r];return d?new e(d).toRgb():null},"name"])}
|
22366 |
|
22367 |
-
;// CONCATENATED MODULE: ./
|
22368 |
var a11y_o=function(o){var t=o/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},a11y_t=function(t){return.2126*a11y_o(t.r)+.7152*a11y_o(t.g)+.0722*a11y_o(t.b)};/* harmony default export */ function a11y(o){o.prototype.luminance=function(){return o=a11y_t(this.rgba),void 0===(r=2)&&(r=0),void 0===n&&(n=Math.pow(10,r)),Math.round(n*o)/n+0;var o,r,n},o.prototype.contrast=function(r){void 0===r&&(r="#FFF");var n,a,i,e,v,u,d,c=r instanceof o?r:new o(r);return e=this.rgba,v=c.toRgb(),u=a11y_t(e),d=a11y_t(v),n=u>d?(u+.05)/(d+.05):(d+.05)/(u+.05),void 0===(a=2)&&(a=0),void 0===i&&(i=Math.pow(10,a)),Math.floor(i*n)/i+0},o.prototype.isReadable=function(o,t){return void 0===o&&(o="#FFF"),void 0===t&&(t={}),this.contrast(o)>=(e=void 0===(i=(r=t).size)?"normal":i,"AAA"===(a=void 0===(n=r.level)?"AA":n)&&"normal"===e?7:"AA"===a&&"large"===e?3:4.5);var r,n,a,i,e}}
|
22369 |
|
22370 |
// EXTERNAL MODULE: ./node_modules/traverse/index.js
|
@@ -24877,7 +25520,7 @@ function BlockTypesTab(_ref) {
|
|
24877 |
return items.filter(item => !item.category);
|
24878 |
}, [items]);
|
24879 |
const itemsPerCategory = (0,external_wp_element_namespaceObject.useMemo)(() => {
|
24880 |
-
return (0,
|
24881 |
}, [items]);
|
24882 |
const itemsPerCollection = (0,external_wp_element_namespaceObject.useMemo)(() => {
|
24883 |
// Create a new Object to avoid mutating collection.
|
@@ -25414,87 +26057,6 @@ function useInsertionPoint(_ref) {
|
|
25414 |
|
25415 |
/* harmony default export */ const use_insertion_point = (useInsertionPoint);
|
25416 |
|
25417 |
-
;// CONCATENATED MODULE: ./node_modules/lower-case/dist.es2015/index.js
|
25418 |
-
/**
|
25419 |
-
* Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
|
25420 |
-
*/
|
25421 |
-
var SUPPORTED_LOCALE = {
|
25422 |
-
tr: {
|
25423 |
-
regexp: /\u0130|\u0049|\u0049\u0307/g,
|
25424 |
-
map: {
|
25425 |
-
İ: "\u0069",
|
25426 |
-
I: "\u0131",
|
25427 |
-
İ: "\u0069",
|
25428 |
-
},
|
25429 |
-
},
|
25430 |
-
az: {
|
25431 |
-
regexp: /\u0130/g,
|
25432 |
-
map: {
|
25433 |
-
İ: "\u0069",
|
25434 |
-
I: "\u0131",
|
25435 |
-
İ: "\u0069",
|
25436 |
-
},
|
25437 |
-
},
|
25438 |
-
lt: {
|
25439 |
-
regexp: /\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g,
|
25440 |
-
map: {
|
25441 |
-
I: "\u0069\u0307",
|
25442 |
-
J: "\u006A\u0307",
|
25443 |
-
Į: "\u012F\u0307",
|
25444 |
-
Ì: "\u0069\u0307\u0300",
|
25445 |
-
Í: "\u0069\u0307\u0301",
|
25446 |
-
Ĩ: "\u0069\u0307\u0303",
|
25447 |
-
},
|
25448 |
-
},
|
25449 |
-
};
|
25450 |
-
/**
|
25451 |
-
* Localized lower case.
|
25452 |
-
*/
|
25453 |
-
function localeLowerCase(str, locale) {
|
25454 |
-
var lang = SUPPORTED_LOCALE[locale.toLowerCase()];
|
25455 |
-
if (lang)
|
25456 |
-
return lowerCase(str.replace(lang.regexp, function (m) { return lang.map[m]; }));
|
25457 |
-
return lowerCase(str);
|
25458 |
-
}
|
25459 |
-
/**
|
25460 |
-
* Lower case as a function.
|
25461 |
-
*/
|
25462 |
-
function lowerCase(str) {
|
25463 |
-
return str.toLowerCase();
|
25464 |
-
}
|
25465 |
-
|
25466 |
-
;// CONCATENATED MODULE: ./node_modules/no-case/dist.es2015/index.js
|
25467 |
-
|
25468 |
-
// Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case").
|
25469 |
-
var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
|
25470 |
-
// Remove all non-word characters.
|
25471 |
-
var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
|
25472 |
-
/**
|
25473 |
-
* Normalize the string into something other libraries can manipulate easier.
|
25474 |
-
*/
|
25475 |
-
function noCase(input, options) {
|
25476 |
-
if (options === void 0) { options = {}; }
|
25477 |
-
var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d;
|
25478 |
-
var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
|
25479 |
-
var start = 0;
|
25480 |
-
var end = result.length;
|
25481 |
-
// Trim the delimiter from around the output string.
|
25482 |
-
while (result.charAt(start) === "\0")
|
25483 |
-
start++;
|
25484 |
-
while (result.charAt(end - 1) === "\0")
|
25485 |
-
end--;
|
25486 |
-
// Transform each token independently.
|
25487 |
-
return result.slice(start, end).split("\0").map(transform).join(delimiter);
|
25488 |
-
}
|
25489 |
-
/**
|
25490 |
-
* Replace `re` in the input string with the replacement value.
|
25491 |
-
*/
|
25492 |
-
function replace(input, re, value) {
|
25493 |
-
if (re instanceof RegExp)
|
25494 |
-
return input.replace(re, value);
|
25495 |
-
return re.reduce(function (input, re) { return input.replace(re, value); }, input);
|
25496 |
-
}
|
25497 |
-
|
25498 |
// EXTERNAL MODULE: ./node_modules/remove-accents/index.js
|
25499 |
var remove_accents = __webpack_require__(4793);
|
25500 |
var remove_accents_default = /*#__PURE__*/__webpack_require__.n(remove_accents);
|
@@ -25503,7 +26065,6 @@ var remove_accents_default = /*#__PURE__*/__webpack_require__.n(remove_accents);
|
|
25503 |
* External dependencies
|
25504 |
*/
|
25505 |
|
25506 |
-
|
25507 |
// Default search helpers.
|
25508 |
|
25509 |
const defaultGetName = item => item.name || '';
|
@@ -25539,19 +26100,6 @@ function normalizeSearchInput() {
|
|
25539 |
input = input.toLowerCase();
|
25540 |
return input;
|
25541 |
}
|
25542 |
-
/**
|
25543 |
-
* Extracts words from an input string.
|
25544 |
-
*
|
25545 |
-
* @param {string} input The input string.
|
25546 |
-
*
|
25547 |
-
* @return {Array} Words, extracted from the input string.
|
25548 |
-
*/
|
25549 |
-
|
25550 |
-
|
25551 |
-
function extractWords() {
|
25552 |
-
let input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
25553 |
-
return noCase(input).split(' ').filter(Boolean);
|
25554 |
-
}
|
25555 |
/**
|
25556 |
* Converts the search term into a list of normalized terms.
|
25557 |
*
|
@@ -25563,7 +26111,7 @@ function extractWords() {
|
|
25563 |
|
25564 |
const getNormalizedSearchTerms = function () {
|
25565 |
let input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
25566 |
-
return
|
25567 |
};
|
25568 |
|
25569 |
const removeMatchingTerms = (unmatchedTerms, unprocessedTerms) => {
|
@@ -25669,7 +26217,7 @@ function getItemSearchRank(item, searchTerm) {
|
|
25669 |
rank += 20;
|
25670 |
} else {
|
25671 |
const terms = [name, title, description, ...keywords, category, collection].join(' ');
|
25672 |
-
const normalizedSearchTerms =
|
25673 |
const unmatchedTerms = removeMatchingTerms(normalizedSearchTerms, terms);
|
25674 |
|
25675 |
if (unmatchedTerms.length === 0) {
|
@@ -27438,7 +27986,9 @@ function BlockPopoverInbetween(_ref) {
|
|
27438 |
|
27439 |
previousElement.ownerDocument.defaultView.addEventListener('resize', forcePopoverRecompute);
|
27440 |
return () => {
|
27441 |
-
|
|
|
|
|
27442 |
};
|
27443 |
}, [previousElement]); // If there's either a previous or a next element, show the inbetween popover.
|
27444 |
// Note that drag and drop uses the inbetween popover to show the drop indicator
|
@@ -27781,12 +28331,12 @@ function useInBetweenInserter() {
|
|
27781 |
}
|
27782 |
|
27783 |
const orientation = ((_getBlockListSettings = getBlockListSettings(rootClientId)) === null || _getBlockListSettings === void 0 ? void 0 : _getBlockListSettings.orientation) || 'vertical';
|
27784 |
-
const
|
27785 |
-
const
|
27786 |
-
const offsetLeft = event.clientX - rect.left;
|
27787 |
const children = Array.from(event.target.children);
|
27788 |
let element = children.find(blockEl => {
|
27789 |
-
|
|
|
27790 |
});
|
27791 |
|
27792 |
if (!element) {
|
@@ -28250,7 +28800,7 @@ const BlockDraggable = _ref => {
|
|
28250 |
|
28251 |
if (!isDraggable) {
|
28252 |
return children({
|
28253 |
-
|
28254 |
});
|
28255 |
}
|
28256 |
|
@@ -29522,10 +30072,10 @@ function BlockParentSelector() {
|
|
29522 |
onClick: () => selectBlock(firstParentClientId),
|
29523 |
label: (0,external_wp_i18n_namespaceObject.sprintf)(
|
29524 |
/* translators: %s: Name of the block's parent. */
|
29525 |
-
(0,external_wp_i18n_namespaceObject.__)('Select %s'), blockInformation.title),
|
29526 |
showTooltip: true,
|
29527 |
icon: (0,external_wp_element_namespaceObject.createElement)(block_icon, {
|
29528 |
-
icon: blockInformation.icon
|
29529 |
})
|
29530 |
}));
|
29531 |
}
|
@@ -31826,16 +32376,16 @@ function BlockSettingsDropdown(_ref2) {
|
|
31826 |
blocks: blocks,
|
31827 |
onCopy: onCopy
|
31828 |
}), canDuplicate && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
|
31829 |
-
onClick: (0,
|
31830 |
shortcut: shortcuts.duplicate
|
31831 |
}, (0,external_wp_i18n_namespaceObject.__)('Duplicate')), canInsertDefaultBlock && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
|
31832 |
-
onClick: (0,
|
31833 |
shortcut: shortcuts.insertBefore
|
31834 |
}, (0,external_wp_i18n_namespaceObject.__)('Insert before')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
|
31835 |
-
onClick: (0,
|
31836 |
shortcut: shortcuts.insertAfter
|
31837 |
}, (0,external_wp_i18n_namespaceObject.__)('Insert after'))), canMove && !onlyBlock && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
|
31838 |
-
onClick: (0,
|
31839 |
}, (0,external_wp_i18n_namespaceObject.__)('Move to')), count === 1 && (0,external_wp_element_namespaceObject.createElement)(block_mode_toggle, {
|
31840 |
clientId: firstBlockClientId,
|
31841 |
onToggle: onClose
|
@@ -31850,7 +32400,7 @@ function BlockSettingsDropdown(_ref2) {
|
|
31850 |
}) : external_wp_element_namespaceObject.Children.map(child => (0,external_wp_element_namespaceObject.cloneElement)(child, {
|
31851 |
onClose
|
31852 |
})), canRemove && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
|
31853 |
-
onClick: (0,
|
31854 |
shortcut: shortcuts.remove
|
31855 |
}, removeBlockLabel)));
|
31856 |
});
|
@@ -32386,11 +32936,14 @@ function BlockContextualToolbar(_ref) {
|
|
32386 |
*/
|
32387 |
|
32388 |
|
32389 |
-
|
|
|
|
|
|
|
32390 |
// down the toolbar will stay on screen by adopting a sticky position at the
|
32391 |
// top of the viewport.
|
32392 |
|
32393 |
-
const use_block_toolbar_popover_props_DEFAULT_PROPS = {
|
32394 |
flip: false,
|
32395 |
shift: true
|
32396 |
}; // When there isn't enough height between the top of the block and the editor
|
@@ -32399,7 +32952,7 @@ const use_block_toolbar_popover_props_DEFAULT_PROPS = {
|
|
32399 |
// the block. This only happens if the block is smaller than the viewport, as
|
32400 |
// otherwise the toolbar will be off-screen.
|
32401 |
|
32402 |
-
const RESTRICTED_HEIGHT_PROPS = {
|
32403 |
flip: true,
|
32404 |
shift: false
|
32405 |
};
|
@@ -33069,6 +33622,7 @@ function getBlockContext(attributes, blockType) {
|
|
33069 |
|
33070 |
|
33071 |
|
|
|
33072 |
/**
|
33073 |
* Internal dependencies
|
33074 |
*/
|
@@ -33112,13 +33666,13 @@ function parseDropEvent(event) {
|
|
33112 |
* @param {number} targetBlockIndex The index where the block(s) will be inserted.
|
33113 |
* @param {Function} getBlockIndex A function that gets the index of a block.
|
33114 |
* @param {Function} getClientIdsOfDescendants A function that gets the client ids of descendant blocks.
|
33115 |
-
* @param {Function}
|
33116 |
-
* @param {Function}
|
33117 |
* @param {Function} clearSelectedBlock A function that clears block selection.
|
33118 |
* @return {Function} The event handler for a block drop event.
|
33119 |
*/
|
33120 |
|
33121 |
-
function onBlockDrop(targetRootClientId, targetBlockIndex, getBlockIndex, getClientIdsOfDescendants,
|
33122 |
return event => {
|
33123 |
const {
|
33124 |
srcRootClientId: sourceRootClientId,
|
@@ -33130,7 +33684,7 @@ function onBlockDrop(targetRootClientId, targetBlockIndex, getBlockIndex, getCli
|
|
33130 |
if (dropType === 'inserter') {
|
33131 |
clearSelectedBlock();
|
33132 |
const blocksToInsert = blocks.map(block => (0,external_wp_blocks_namespaceObject.cloneBlock)(block));
|
33133 |
-
|
33134 |
} // If the user is moving a block.
|
33135 |
|
33136 |
|
@@ -33154,7 +33708,7 @@ function onBlockDrop(targetRootClientId, targetBlockIndex, getBlockIndex, getCli
|
|
33154 |
// were removed from the block list above the insertion point.
|
33155 |
|
33156 |
const insertIndex = isAtSameLevel && sourceBlockIndex < targetBlockIndex ? targetBlockIndex - draggedBlockCount : targetBlockIndex;
|
33157 |
-
|
33158 |
}
|
33159 |
};
|
33160 |
}
|
@@ -33166,12 +33720,12 @@ function onBlockDrop(targetRootClientId, targetBlockIndex, getBlockIndex, getCli
|
|
33166 |
* @param {boolean} hasUploadPermissions Whether the user has upload permissions.
|
33167 |
* @param {Function} updateBlockAttributes A function that updates a block's attributes.
|
33168 |
* @param {Function} canInsertBlockType A function that returns checks whether a block type can be inserted.
|
33169 |
-
* @param {Function}
|
33170 |
*
|
33171 |
* @return {Function} The event handler for a block-related file drop event.
|
33172 |
*/
|
33173 |
|
33174 |
-
function onFilesDrop(targetRootClientId, targetBlockIndex, hasUploadPermissions, updateBlockAttributes, canInsertBlockType,
|
33175 |
return files => {
|
33176 |
if (!hasUploadPermissions) {
|
33177 |
return;
|
@@ -33181,21 +33735,21 @@ function onFilesDrop(targetRootClientId, targetBlockIndex, hasUploadPermissions,
|
|
33181 |
|
33182 |
if (transformation) {
|
33183 |
const blocks = transformation.transform(files, updateBlockAttributes);
|
33184 |
-
|
33185 |
}
|
33186 |
};
|
33187 |
}
|
33188 |
/**
|
33189 |
* A function that returns an event handler function for block-related HTML drop events.
|
33190 |
*
|
33191 |
-
* @param {string} targetRootClientId
|
33192 |
-
* @param {number} targetBlockIndex
|
33193 |
-
* @param {Function}
|
33194 |
*
|
33195 |
* @return {Function} The event handler for a block-related HTML drop event.
|
33196 |
*/
|
33197 |
|
33198 |
-
function onHTMLDrop(targetRootClientId, targetBlockIndex,
|
33199 |
return HTML => {
|
33200 |
const blocks = (0,external_wp_blocks_namespaceObject.pasteHandler)({
|
33201 |
HTML,
|
@@ -33203,38 +33757,78 @@ function onHTMLDrop(targetRootClientId, targetBlockIndex, insertBlocks) {
|
|
33203 |
});
|
33204 |
|
33205 |
if (blocks.length) {
|
33206 |
-
|
33207 |
}
|
33208 |
};
|
33209 |
}
|
33210 |
/**
|
33211 |
* A React hook for handling block drop events.
|
33212 |
*
|
33213 |
-
* @
|
33214 |
-
*
|
|
|
|
|
|
|
|
|
33215 |
*
|
33216 |
* @return {Object} An object that contains the event handlers `onDrop`, `onFilesDrop` and `onHTMLDrop`.
|
33217 |
*/
|
33218 |
|
33219 |
function useOnBlockDrop(targetRootClientId, targetBlockIndex) {
|
|
|
|
|
|
|
|
|
33220 |
const hasUploadPermissions = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).getSettings().mediaUpload, []);
|
33221 |
const {
|
33222 |
canInsertBlockType,
|
33223 |
getBlockIndex,
|
33224 |
-
getClientIdsOfDescendants
|
|
|
|
|
33225 |
} = (0,external_wp_data_namespaceObject.useSelect)(store);
|
33226 |
const {
|
33227 |
insertBlocks,
|
33228 |
moveBlocksToPosition,
|
33229 |
updateBlockAttributes,
|
33230 |
-
clearSelectedBlock
|
|
|
|
|
33231 |
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33232 |
|
33233 |
-
const _onDrop = onBlockDrop(targetRootClientId, targetBlockIndex, getBlockIndex, getClientIdsOfDescendants,
|
33234 |
|
33235 |
-
const _onFilesDrop = onFilesDrop(targetRootClientId, targetBlockIndex, hasUploadPermissions, updateBlockAttributes, canInsertBlockType,
|
33236 |
|
33237 |
-
const _onHTMLDrop = onHTMLDrop(targetRootClientId, targetBlockIndex,
|
33238 |
|
33239 |
return event => {
|
33240 |
const files = (0,external_wp_dom_namespaceObject.getFilesFromDataTransfer)(event.dataTransfer);
|
@@ -33396,6 +33990,16 @@ function getNearestBlockIndex(elements, position, orientation) {
|
|
33396 |
});
|
33397 |
return candidateIndex;
|
33398 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33399 |
/**
|
33400 |
* @typedef {Object} WPBlockDropZoneConfig
|
33401 |
* @property {string} rootClientId The root client id for the block list.
|
@@ -33407,6 +34011,7 @@ function getNearestBlockIndex(elements, position, orientation) {
|
|
33407 |
* @param {WPBlockDropZoneConfig} dropZoneConfig configuration data for the drop zone.
|
33408 |
*/
|
33409 |
|
|
|
33410 |
function useBlockDropZone() {
|
33411 |
let {
|
33412 |
// An undefined value represents a top-level block. Default to an empty
|
@@ -33444,7 +34049,14 @@ function useBlockDropZone() {
|
|
33444 |
}, (_getBlockListSettings = getBlockListSettings(targetRootClientId)) === null || _getBlockListSettings === void 0 ? void 0 : _getBlockListSettings.orientation);
|
33445 |
setTargetBlockIndex(targetIndex === undefined ? 0 : targetIndex);
|
33446 |
|
33447 |
-
if (targetIndex !==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33448 |
showInsertionPoint(targetRootClientId, targetIndex);
|
33449 |
}
|
33450 |
}, []), 200);
|
@@ -38743,22 +39355,17 @@ const withDuotoneStyles = (0,external_wp_compose_namespaceObject.createHigherOrd
|
|
38743 |
|
38744 |
const layoutBlockSupportKey = '__experimentalLayout';
|
38745 |
/**
|
38746 |
-
* Generates the utility classnames for the given
|
38747 |
-
* This method was primarily added to reintroduce classnames that were removed
|
38748 |
-
* in the 5.9 release (https://github.com/WordPress/gutenberg/issues/38719), rather
|
38749 |
-
* than providing an extensive list of all possible layout classes. The plan is to
|
38750 |
-
* have the style engine generate a more extensive list of utility classnames which
|
38751 |
-
* will then replace this method.
|
38752 |
*
|
38753 |
-
* @param { Object }
|
38754 |
-
* @param { Object } layoutDefinitions An object containing layout definitions, stored in theme.json.
|
38755 |
*
|
38756 |
* @return { Array } Array of CSS classname strings.
|
38757 |
*/
|
38758 |
|
38759 |
-
function useLayoutClasses(
|
38760 |
-
var
|
38761 |
|
|
|
38762 |
const rootPaddingAlignment = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
38763 |
var _getSettings$__experi;
|
38764 |
|
@@ -38767,32 +39374,86 @@ function useLayoutClasses(layout, layoutDefinitions) {
|
|
38767 |
} = select(store);
|
38768 |
return (_getSettings$__experi = getSettings().__experimentalFeatures) === null || _getSettings$__experi === void 0 ? void 0 : _getSettings$__experi.useRootPaddingAwareAlignments;
|
38769 |
}, []);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38770 |
const layoutClassnames = [];
|
38771 |
|
38772 |
-
if (
|
38773 |
-
var
|
38774 |
|
38775 |
-
layoutClassnames.push(
|
38776 |
}
|
38777 |
|
38778 |
-
if ((
|
38779 |
layoutClassnames.push('has-global-padding');
|
38780 |
}
|
38781 |
|
38782 |
-
if (
|
38783 |
-
layoutClassnames.push(`is-${(0,external_lodash_namespaceObject.kebabCase)(
|
38784 |
}
|
38785 |
|
38786 |
-
if (
|
38787 |
-
layoutClassnames.push(`is-content-justification-${(0,external_lodash_namespaceObject.kebabCase)(
|
38788 |
}
|
38789 |
|
38790 |
-
if (
|
38791 |
layoutClassnames.push('is-nowrap');
|
38792 |
}
|
38793 |
|
38794 |
return layoutClassnames;
|
38795 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38796 |
|
38797 |
function LayoutPanel(_ref) {
|
38798 |
let {
|
@@ -38960,7 +39621,8 @@ const withInspectorControls = (0,external_wp_compose_namespaceObject.createHighe
|
|
38960 |
const withLayoutStyles = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(BlockListBlock => props => {
|
38961 |
const {
|
38962 |
name,
|
38963 |
-
attributes
|
|
|
38964 |
} = props;
|
38965 |
const hasLayoutBlockSupport = (0,external_wp_blocks_namespaceObject.hasBlockSupport)(name, layoutBlockSupportKey);
|
38966 |
const disableLayoutStyles = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
@@ -38982,7 +39644,7 @@ const withLayoutStyles = (0,external_wp_compose_namespaceObject.createHigherOrde
|
|
38982 |
const usedLayout = layout !== null && layout !== void 0 && layout.inherit || layout !== null && layout !== void 0 && layout.contentSize || layout !== null && layout !== void 0 && layout.wideSize ? { ...layout,
|
38983 |
type: 'constrained'
|
38984 |
} : layout || defaultBlockLayout || {};
|
38985 |
-
const layoutClasses = hasLayoutBlockSupport ? useLayoutClasses(
|
38986 |
const selector = `.${(0,external_wp_blocks_namespaceObject.getBlockDefaultClassName)(name)}.wp-container-${id}`;
|
38987 |
const blockGapSupport = useSetting('spacing.blockGap');
|
38988 |
const hasBlockGapSupport = blockGapSupport !== null; // Get CSS string for the current layout type.
|
@@ -38991,10 +39653,10 @@ const withLayoutStyles = (0,external_wp_compose_namespaceObject.createHigherOrde
|
|
38991 |
let css;
|
38992 |
|
38993 |
if (shouldRenderLayoutStyles) {
|
38994 |
-
var _fullLayoutType$
|
38995 |
|
38996 |
const fullLayoutType = getLayoutType((usedLayout === null || usedLayout === void 0 ? void 0 : usedLayout.type) || 'default');
|
38997 |
-
css = fullLayoutType === null || fullLayoutType === void 0 ? void 0 : (_fullLayoutType$
|
38998 |
blockName: name,
|
38999 |
selector,
|
39000 |
layout: usedLayout,
|
@@ -39542,6 +40204,7 @@ function useCachedTruthy(value) {
|
|
39542 |
|
39543 |
|
39544 |
|
|
|
39545 |
|
39546 |
|
39547 |
|
@@ -43322,7 +43985,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
43322 |
var extendStatics = function(d, b) {
|
43323 |
extendStatics = Object.setPrototypeOf ||
|
43324 |
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
43325 |
-
function (d, b) { for (var p in b) if (
|
43326 |
return extendStatics(d, b);
|
43327 |
};
|
43328 |
|
@@ -43408,8 +44071,16 @@ function __generator(thisArg, body) {
|
|
43408 |
}
|
43409 |
}
|
43410 |
|
43411 |
-
function
|
43412 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43413 |
}
|
43414 |
|
43415 |
function __values(o) {
|
@@ -43490,11 +44161,17 @@ function __makeTemplateObject(cooked, raw) {
|
|
43490 |
return cooked;
|
43491 |
};
|
43492 |
|
|
|
|
|
|
|
|
|
|
|
|
|
43493 |
function __importStar(mod) {
|
43494 |
if (mod && mod.__esModule) return mod;
|
43495 |
var result = {};
|
43496 |
-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result
|
43497 |
-
result
|
43498 |
return result;
|
43499 |
}
|
43500 |
|
@@ -43517,50 +44194,52 @@ function __classPrivateFieldSet(receiver, privateMap, value) {
|
|
43517 |
return value;
|
43518 |
}
|
43519 |
|
|
|
|
|
|
|
43520 |
;// CONCATENATED MODULE: ./node_modules/react-easy-crop/index.module.js
|
43521 |
|
43522 |
|
43523 |
|
|
|
43524 |
/**
|
43525 |
* Compute the dimension of the crop area based on media size,
|
43526 |
-
* aspect ratio and optionally
|
43527 |
*/
|
43528 |
|
43529 |
-
function getCropSize(mediaWidth, mediaHeight, aspect, rotation) {
|
43530 |
if (rotation === void 0) {
|
43531 |
rotation = 0;
|
43532 |
}
|
43533 |
|
43534 |
-
var _a =
|
43535 |
width = _a.width,
|
43536 |
height = _a.height;
|
43537 |
|
43538 |
-
|
43539 |
-
|
43540 |
-
width: mediaHeight * aspect,
|
43541 |
-
height: mediaHeight
|
43542 |
-
};
|
43543 |
-
}
|
43544 |
-
|
43545 |
-
if (width > mediaHeight * aspect) {
|
43546 |
-
return {
|
43547 |
-
width: mediaWidth,
|
43548 |
-
height: mediaWidth / aspect
|
43549 |
-
};
|
43550 |
-
}
|
43551 |
|
43552 |
-
if (
|
43553 |
return {
|
43554 |
-
width:
|
43555 |
-
height:
|
43556 |
};
|
43557 |
}
|
43558 |
|
43559 |
return {
|
43560 |
-
width:
|
43561 |
-
height:
|
43562 |
};
|
43563 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43564 |
/**
|
43565 |
* Ensure a new media position stays in the crop area.
|
43566 |
*/
|
@@ -43570,7 +44249,7 @@ function restrictPosition(position, mediaSize, cropSize, zoom, rotation) {
|
|
43570 |
rotation = 0;
|
43571 |
}
|
43572 |
|
43573 |
-
var _a =
|
43574 |
width = _a.width,
|
43575 |
height = _a.height;
|
43576 |
|
@@ -43582,7 +44261,7 @@ function restrictPosition(position, mediaSize, cropSize, zoom, rotation) {
|
|
43582 |
|
43583 |
function restrictPositionCoord(position, mediaSize, cropSize, zoom) {
|
43584 |
var maxPosition = mediaSize * zoom / 2 - cropSize / 2;
|
43585 |
-
return
|
43586 |
}
|
43587 |
|
43588 |
function getDistanceBetweenPoints(pointA, pointB) {
|
@@ -43607,18 +44286,22 @@ function computeCroppedArea(crop, mediaSize, cropSize, aspect, zoom, rotation, r
|
|
43607 |
// as it might need to be negative.
|
43608 |
|
43609 |
|
43610 |
-
var limitAreaFn = restrictPosition
|
|
|
|
|
|
|
|
|
43611 |
var croppedAreaPercentages = {
|
43612 |
-
x: limitAreaFn(100, ((
|
43613 |
-
y: limitAreaFn(100, ((
|
43614 |
-
width: limitAreaFn(100, cropSize.width /
|
43615 |
-
height: limitAreaFn(100, cropSize.height /
|
43616 |
}; // we compute the pixels size naively
|
43617 |
|
43618 |
-
var widthInPixels = Math.round(limitAreaFn(
|
43619 |
-
var heightInPixels = Math.round(limitAreaFn(
|
43620 |
-
var isImgWiderThanHigh =
|
43621 |
-
// if the media is wider than high, when zoom is 0, the crop height will be equals to
|
43622 |
// thus we want to compute the width from the height and aspect for accuracy.
|
43623 |
// Otherwise, we compute the height from width and aspect.
|
43624 |
|
@@ -43631,8 +44314,8 @@ function computeCroppedArea(crop, mediaSize, cropSize, aspect, zoom, rotation, r
|
|
43631 |
};
|
43632 |
|
43633 |
var croppedAreaPixels = __assign(__assign({}, sizePixels), {
|
43634 |
-
x: Math.round(limitAreaFn(
|
43635 |
-
y: Math.round(limitAreaFn(
|
43636 |
});
|
43637 |
|
43638 |
return {
|
@@ -43652,34 +44335,47 @@ function noOp(_max, value) {
|
|
43652 |
return value;
|
43653 |
}
|
43654 |
/**
|
43655 |
-
* Compute
|
43656 |
*/
|
43657 |
|
43658 |
|
43659 |
-
function
|
43660 |
-
var
|
43661 |
|
43662 |
-
|
43663 |
-
|
43664 |
-
|
43665 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43666 |
|
43667 |
-
|
43668 |
-
var
|
43669 |
-
return
|
43670 |
}
|
43671 |
/**
|
43672 |
-
* Compute
|
43673 |
*/
|
43674 |
|
43675 |
|
43676 |
-
function getInitialCropFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize) {
|
43677 |
-
|
43678 |
-
|
43679 |
-
|
|
|
|
|
|
|
|
|
43680 |
var crop = {
|
43681 |
-
x: ((
|
43682 |
-
y: ((
|
43683 |
};
|
43684 |
return {
|
43685 |
crop: crop,
|
@@ -43696,47 +44392,27 @@ function getCenter(a, b) {
|
|
43696 |
y: (b.y + a.y) / 2
|
43697 |
};
|
43698 |
}
|
43699 |
-
|
43700 |
-
*
|
43701 |
-
* Returns an x,y point once rotated around xMid,yMid
|
43702 |
-
*/
|
43703 |
-
|
43704 |
-
function rotateAroundMidPoint(x, y, xMid, yMid, degrees) {
|
43705 |
-
var cos = Math.cos;
|
43706 |
-
var sin = Math.sin;
|
43707 |
-
var radian = degrees * Math.PI / 180; // Convert to radians
|
43708 |
-
// Subtract midpoints, so that midpoint is translated to origin
|
43709 |
-
// and add it in the end again
|
43710 |
-
|
43711 |
-
var xr = (x - xMid) * cos(radian) - (y - yMid) * sin(radian) + xMid;
|
43712 |
-
var yr = (x - xMid) * sin(radian) + (y - yMid) * cos(radian) + yMid;
|
43713 |
-
return [xr, yr];
|
43714 |
}
|
43715 |
/**
|
43716 |
* Returns the new bounding area of a rotated rectangle.
|
43717 |
*/
|
43718 |
|
43719 |
-
function
|
43720 |
-
var
|
43721 |
-
var centerY = height / 2;
|
43722 |
-
var outerBounds = [rotateAroundMidPoint(0, 0, centerX, centerY, rotation), rotateAroundMidPoint(width, 0, centerX, centerY, rotation), rotateAroundMidPoint(width, height, centerX, centerY, rotation), rotateAroundMidPoint(0, height, centerX, centerY, rotation)];
|
43723 |
-
var minX = Math.min.apply(Math, outerBounds.map(function (p) {
|
43724 |
-
return p[0];
|
43725 |
-
}));
|
43726 |
-
var maxX = Math.max.apply(Math, outerBounds.map(function (p) {
|
43727 |
-
return p[0];
|
43728 |
-
}));
|
43729 |
-
var minY = Math.min.apply(Math, outerBounds.map(function (p) {
|
43730 |
-
return p[1];
|
43731 |
-
}));
|
43732 |
-
var maxY = Math.max.apply(Math, outerBounds.map(function (p) {
|
43733 |
-
return p[1];
|
43734 |
-
}));
|
43735 |
return {
|
43736 |
-
width:
|
43737 |
-
height:
|
43738 |
};
|
43739 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43740 |
/**
|
43741 |
* Combine multiple class names into a single string.
|
43742 |
*/
|
@@ -43757,7 +44433,7 @@ function classNames() {
|
|
43757 |
}).join(' ').trim();
|
43758 |
}
|
43759 |
|
43760 |
-
var
|
43761 |
|
43762 |
var MIN_ZOOM = 1;
|
43763 |
var MAX_ZOOM = 3;
|
@@ -43770,8 +44446,8 @@ function (_super) {
|
|
43770 |
function Cropper() {
|
43771 |
var _this = _super !== null && _super.apply(this, arguments) || this;
|
43772 |
|
43773 |
-
_this.imageRef =
|
43774 |
-
_this.videoRef =
|
43775 |
_this.containerRef = null;
|
43776 |
_this.styleRef = null;
|
43777 |
_this.containerRect = null;
|
@@ -43794,6 +44470,8 @@ function (_super) {
|
|
43794 |
_this.rafDragTimeout = null;
|
43795 |
_this.rafPinchTimeout = null;
|
43796 |
_this.wheelTimer = null;
|
|
|
|
|
43797 |
_this.state = {
|
43798 |
cropSize: null,
|
43799 |
hasWheelJustStarted: false
|
@@ -43804,10 +44482,13 @@ function (_super) {
|
|
43804 |
};
|
43805 |
|
43806 |
_this.cleanEvents = function () {
|
43807 |
-
|
43808 |
-
|
43809 |
-
|
43810 |
-
|
|
|
|
|
|
|
43811 |
};
|
43812 |
|
43813 |
_this.clearScrollEvent = function () {
|
@@ -43819,63 +44500,137 @@ function (_super) {
|
|
43819 |
};
|
43820 |
|
43821 |
_this.onMediaLoad = function () {
|
43822 |
-
_this.computeSizes();
|
43823 |
|
43824 |
-
|
|
|
43825 |
|
43826 |
-
|
|
|
43827 |
|
43828 |
if (_this.props.onMediaLoaded) {
|
43829 |
_this.props.onMediaLoaded(_this.mediaSize);
|
43830 |
}
|
43831 |
};
|
43832 |
|
43833 |
-
_this.setInitialCrop = function () {
|
43834 |
-
|
43835 |
-
|
43836 |
-
|
|
|
43837 |
|
43838 |
-
|
43839 |
-
return;
|
43840 |
-
}
|
43841 |
|
43842 |
-
|
43843 |
-
|
43844 |
-
|
|
|
|
|
43845 |
|
43846 |
-
|
43847 |
|
43848 |
-
|
|
|
43849 |
};
|
43850 |
|
43851 |
_this.computeSizes = function () {
|
43852 |
-
var _a, _b, _c, _d;
|
43853 |
|
43854 |
-
var mediaRef = _this.imageRef || _this.videoRef;
|
43855 |
|
43856 |
-
if (mediaRef) {
|
43857 |
-
_this.
|
43858 |
-
|
43859 |
-
|
43860 |
-
|
43861 |
-
|
43862 |
-
|
43863 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43864 |
|
43865 |
_this.setState({
|
43866 |
cropSize: cropSize
|
43867 |
-
}, _this.recomputeCropPosition);
|
43868 |
-
}
|
43869 |
|
43870 |
-
|
43871 |
-
|
|
|
|
|
|
|
|
|
43872 |
}
|
43873 |
};
|
43874 |
|
43875 |
_this.onMouseDown = function (e) {
|
43876 |
e.preventDefault();
|
43877 |
-
|
43878 |
-
|
|
|
|
|
43879 |
|
43880 |
_this.onDragStart(Cropper.getMousePoint(e));
|
43881 |
};
|
@@ -43885,12 +44640,16 @@ function (_super) {
|
|
43885 |
};
|
43886 |
|
43887 |
_this.onTouchStart = function (e) {
|
43888 |
-
|
43889 |
-
|
|
|
|
|
|
|
43890 |
passive: false
|
43891 |
}); // iOS 11 now defaults to passive: true
|
43892 |
|
43893 |
-
|
|
|
43894 |
|
43895 |
if (e.touches.length === 2) {
|
43896 |
_this.onPinchStart(e);
|
@@ -43911,11 +44670,10 @@ function (_super) {
|
|
43911 |
};
|
43912 |
|
43913 |
_this.onDragStart = function (_a) {
|
43914 |
-
var x = _a.x,
|
43915 |
-
y = _a.y;
|
43916 |
-
|
43917 |
var _b, _c;
|
43918 |
|
|
|
|
|
43919 |
_this.dragStartPosition = {
|
43920 |
x: x,
|
43921 |
y: y
|
@@ -43927,8 +44685,8 @@ function (_super) {
|
|
43927 |
_this.onDrag = function (_a) {
|
43928 |
var x = _a.x,
|
43929 |
y = _a.y;
|
43930 |
-
if (_this.rafDragTimeout)
|
43931 |
-
_this.rafDragTimeout =
|
43932 |
if (!_this.state.cropSize) return;
|
43933 |
if (x === undefined || y === undefined) return;
|
43934 |
var offsetX = x - _this.dragStartPosition.x;
|
@@ -43954,11 +44712,18 @@ function (_super) {
|
|
43954 |
};
|
43955 |
|
43956 |
_this.onWheel = function (e) {
|
|
|
|
|
|
|
|
|
43957 |
e.preventDefault();
|
43958 |
var point = Cropper.getMousePoint(e);
|
43959 |
-
var
|
|
|
43960 |
|
43961 |
-
_this.setNewZoom(newZoom, point
|
|
|
|
|
43962 |
|
43963 |
if (!_this.state.hasWheelJustStarted) {
|
43964 |
_this.setState({
|
@@ -43974,7 +44739,7 @@ function (_super) {
|
|
43974 |
clearTimeout(_this.wheelTimer);
|
43975 |
}
|
43976 |
|
43977 |
-
_this.wheelTimer =
|
43978 |
return _this.setState({
|
43979 |
hasWheelJustStarted: false
|
43980 |
}, function () {
|
@@ -44011,35 +44776,66 @@ function (_super) {
|
|
44011 |
};
|
44012 |
};
|
44013 |
|
44014 |
-
_this.setNewZoom = function (zoom, point) {
|
|
|
|
|
44015 |
if (!_this.state.cropSize || !_this.props.onZoomChange) return;
|
44016 |
|
44017 |
var zoomPoint = _this.getPointOnContainer(point);
|
44018 |
|
44019 |
var zoomTarget = _this.getPointOnMedia(zoomPoint);
|
44020 |
|
44021 |
-
var newZoom =
|
44022 |
var requestedPosition = {
|
44023 |
x: zoomTarget.x * newZoom - zoomPoint.x,
|
44024 |
y: zoomTarget.y * newZoom - zoomPoint.y
|
44025 |
};
|
44026 |
-
var newPosition = _this.props.restrictPosition ? restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, newZoom, _this.props.rotation) : requestedPosition;
|
44027 |
|
44028 |
-
|
|
|
|
|
|
|
|
|
44029 |
|
44030 |
_this.props.onZoomChange(newZoom);
|
44031 |
};
|
44032 |
|
44033 |
-
_this.
|
44034 |
-
if (!_this.state.cropSize)
|
|
|
|
|
|
|
44035 |
|
44036 |
var restrictedPosition = _this.props.restrictPosition ? restrictPosition(_this.props.crop, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : _this.props.crop;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44037 |
|
44038 |
-
|
44039 |
-
|
44040 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44041 |
|
44042 |
-
|
|
|
|
|
44043 |
};
|
44044 |
|
44045 |
_this.recomputeCropPosition = function () {
|
@@ -44055,9 +44851,16 @@ function (_super) {
|
|
44055 |
}
|
44056 |
|
44057 |
Cropper.prototype.componentDidMount = function () {
|
44058 |
-
window.addEventListener('resize', this.computeSizes);
|
44059 |
-
|
44060 |
if (this.containerRef) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44061 |
this.props.zoomWithScroll && this.containerRef.addEventListener('wheel', this.onWheel, {
|
44062 |
passive: false
|
44063 |
});
|
@@ -44066,20 +44869,36 @@ function (_super) {
|
|
44066 |
}
|
44067 |
|
44068 |
if (!this.props.disableAutomaticStylesInjection) {
|
44069 |
-
this.styleRef =
|
44070 |
this.styleRef.setAttribute('type', 'text/css');
|
44071 |
-
|
44072 |
-
|
|
|
|
|
|
|
|
|
|
|
44073 |
} // when rendered via SSR, the image can already be loaded and its onLoad callback will never be called
|
44074 |
|
44075 |
|
44076 |
-
if (this.imageRef && this.imageRef.complete) {
|
44077 |
this.onMediaLoad();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44078 |
}
|
44079 |
};
|
44080 |
|
44081 |
Cropper.prototype.componentWillUnmount = function () {
|
44082 |
-
|
|
|
|
|
44083 |
|
44084 |
if (this.containerRef) {
|
44085 |
this.containerRef.removeEventListener('gesturestart', this.preventZoomSafari);
|
@@ -44087,7 +44906,7 @@ function (_super) {
|
|
44087 |
}
|
44088 |
|
44089 |
if (this.styleRef) {
|
44090 |
-
this.styleRef.
|
44091 |
}
|
44092 |
|
44093 |
this.cleanEvents();
|
@@ -44095,6 +44914,8 @@ function (_super) {
|
|
44095 |
};
|
44096 |
|
44097 |
Cropper.prototype.componentDidUpdate = function (prevProps) {
|
|
|
|
|
44098 |
if (prevProps.rotation !== this.props.rotation) {
|
44099 |
this.computeSizes();
|
44100 |
this.recomputeCropPosition();
|
@@ -44102,8 +44923,10 @@ function (_super) {
|
|
44102 |
this.computeSizes();
|
44103 |
} else if (prevProps.zoom !== this.props.zoom) {
|
44104 |
this.recomputeCropPosition();
|
44105 |
-
} else if (prevProps.cropSize !== this.props.cropSize) {
|
44106 |
this.computeSizes();
|
|
|
|
|
44107 |
}
|
44108 |
|
44109 |
if (prevProps.zoomWithScroll !== this.props.zoomWithScroll && this.containerRef) {
|
@@ -44111,6 +44934,10 @@ function (_super) {
|
|
44111 |
passive: false
|
44112 |
}) : this.clearScrollEvent();
|
44113 |
}
|
|
|
|
|
|
|
|
|
44114 |
};
|
44115 |
|
44116 |
Cropper.prototype.getAspect = function () {
|
@@ -44140,12 +44967,14 @@ function (_super) {
|
|
44140 |
var pointB = Cropper.getTouchPoint(e.touches[1]);
|
44141 |
var center = getCenter(pointA, pointB);
|
44142 |
this.onDrag(center);
|
44143 |
-
if (this.rafPinchTimeout)
|
44144 |
-
this.rafPinchTimeout =
|
44145 |
var distance = getDistanceBetweenPoints(pointA, pointB);
|
44146 |
var newZoom = _this.props.zoom * (distance / _this.lastPinchDistance);
|
44147 |
|
44148 |
-
_this.setNewZoom(newZoom, center
|
|
|
|
|
44149 |
|
44150 |
_this.lastPinchDistance = distance;
|
44151 |
var rotation = getRotationBetweenPoints(pointA, pointB);
|
@@ -44162,6 +44991,7 @@ function (_super) {
|
|
44162 |
image = _a.image,
|
44163 |
video = _a.video,
|
44164 |
mediaProps = _a.mediaProps,
|
|
|
44165 |
_b = _a.crop,
|
44166 |
x = _b.x,
|
44167 |
y = _b.y,
|
@@ -44176,8 +45006,9 @@ function (_super) {
|
|
44176 |
_d = _a.classes,
|
44177 |
containerClassName = _d.containerClassName,
|
44178 |
cropAreaClassName = _d.cropAreaClassName,
|
44179 |
-
mediaClassName = _d.mediaClassName
|
44180 |
-
|
|
|
44181 |
onMouseDown: this.onMouseDown,
|
44182 |
onTouchStart: this.onTouchStart,
|
44183 |
ref: function ref(el) {
|
@@ -44186,34 +45017,35 @@ function (_super) {
|
|
44186 |
"data-testid": "container",
|
44187 |
style: containerStyle,
|
44188 |
className: classNames('reactEasyCrop_Container', containerClassName)
|
44189 |
-
}, image ? external_React_default().createElement("img", __assign({
|
44190 |
alt: "",
|
44191 |
-
className: classNames('reactEasyCrop_Image', mediaClassName)
|
44192 |
}, mediaProps, {
|
44193 |
src: image,
|
44194 |
-
ref:
|
44195 |
-
return _this.imageRef = el;
|
44196 |
-
},
|
44197 |
style: __assign(__assign({}, mediaStyle), {
|
44198 |
-
transform: "translate(" + x + "px, " + y + "px) rotate(" + rotation + "deg) scale(" + zoom + ")"
|
44199 |
}),
|
44200 |
onLoad: this.onMediaLoad
|
44201 |
-
})) : video && external_React_default().createElement("video", __assign({
|
44202 |
autoPlay: true,
|
44203 |
loop: true,
|
44204 |
muted: true,
|
44205 |
-
className: classNames('reactEasyCrop_Video', mediaClassName)
|
44206 |
}, mediaProps, {
|
44207 |
-
|
44208 |
-
ref: function ref(el) {
|
44209 |
-
return _this.videoRef = el;
|
44210 |
-
},
|
44211 |
onLoadedMetadata: this.onMediaLoad,
|
44212 |
style: __assign(__assign({}, mediaStyle), {
|
44213 |
-
transform: "translate(" + x + "px, " + y + "px) rotate(" + rotation + "deg) scale(" + zoom + ")"
|
44214 |
}),
|
44215 |
controls: false
|
44216 |
-
})
|
|
|
|
|
|
|
|
|
|
|
|
|
44217 |
style: __assign(__assign({}, cropAreaStyle), {
|
44218 |
width: this.state.cropSize.width,
|
44219 |
height: this.state.cropSize.height
|
@@ -44230,6 +45062,7 @@ function (_super) {
|
|
44230 |
maxZoom: MAX_ZOOM,
|
44231 |
minZoom: MIN_ZOOM,
|
44232 |
cropShape: 'rect',
|
|
|
44233 |
showGrid: true,
|
44234 |
style: {},
|
44235 |
classes: {},
|
@@ -44258,6 +45091,7 @@ function (_super) {
|
|
44258 |
|
44259 |
/* harmony default export */ const index_module = (Cropper);
|
44260 |
|
|
|
44261 |
;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/image-editor/constants.js
|
44262 |
const constants_MIN_ZOOM = 100;
|
44263 |
const constants_MAX_ZOOM = 300;
|
@@ -44383,7 +45217,7 @@ function useTransformState(_ref) {
|
|
44383 |
if (angle === 0) {
|
44384 |
setEditedUrl();
|
44385 |
setRotation(angle);
|
44386 |
-
setAspect(
|
44387 |
setPosition({
|
44388 |
x: -(position.y * naturalAspectRatio),
|
44389 |
y: position.x * naturalAspectRatio
|
@@ -44419,7 +45253,7 @@ function useTransformState(_ref) {
|
|
44419 |
canvas.toBlob(blob => {
|
44420 |
setEditedUrl(URL.createObjectURL(blob));
|
44421 |
setRotation(angle);
|
44422 |
-
setAspect(
|
44423 |
setPosition({
|
44424 |
x: -(position.y * naturalAspectRatio),
|
44425 |
y: position.x * naturalAspectRatio
|
@@ -49408,6 +50242,11 @@ function RichTextWrapper(_ref, forwardedRef) {
|
|
49408 |
selectionEnd,
|
49409 |
isSelected
|
49410 |
} = (0,external_wp_data_namespaceObject.useSelect)(selector);
|
|
|
|
|
|
|
|
|
|
|
49411 |
const {
|
49412 |
selectionChange
|
49413 |
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
|
@@ -49438,6 +50277,14 @@ function RichTextWrapper(_ref, forwardedRef) {
|
|
49438 |
const unset = start === undefined && end === undefined;
|
49439 |
|
49440 |
if (typeof start === 'number' || unset) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49441 |
selection.start = {
|
49442 |
clientId,
|
49443 |
attributeKey: identifier,
|
@@ -49446,6 +50293,10 @@ function RichTextWrapper(_ref, forwardedRef) {
|
|
49446 |
}
|
49447 |
|
49448 |
if (typeof end === 'number' || unset) {
|
|
|
|
|
|
|
|
|
49449 |
selection.end = {
|
49450 |
clientId,
|
49451 |
attributeKey: identifier,
|
@@ -50429,7 +51280,7 @@ const ImageURLInputUI = _ref => {
|
|
50429 |
onChange: onSetNewTab,
|
50430 |
checked: linkTarget === '_blank'
|
50431 |
}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
|
50432 |
-
label: (0,external_wp_i18n_namespaceObject.__)('Link
|
50433 |
value: rel !== null && rel !== void 0 ? rel : '',
|
50434 |
onChange: onSetLinkRel
|
50435 |
}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
|
@@ -50920,8 +51771,7 @@ const BlockInspector = _ref5 => {
|
|
50920 |
getSelectedBlockClientId,
|
50921 |
getSelectedBlockCount,
|
50922 |
getBlockName,
|
50923 |
-
__unstableGetContentLockingParent
|
50924 |
-
getTemplateLock
|
50925 |
} = select(store);
|
50926 |
|
50927 |
const _selectedBlockClientId = getSelectedBlockClientId();
|
@@ -50935,7 +51785,7 @@ const BlockInspector = _ref5 => {
|
|
50935 |
selectedBlockClientId: _selectedBlockClientId,
|
50936 |
selectedBlockName: _selectedBlockName,
|
50937 |
blockType: _blockType,
|
50938 |
-
topLevelLockedBlock:
|
50939 |
};
|
50940 |
}, []);
|
50941 |
|
@@ -51029,8 +51879,8 @@ const BlockInspectorSingleBlock = _ref6 => {
|
|
51029 |
};
|
51030 |
|
51031 |
const AdvancedControls = () => {
|
51032 |
-
const
|
51033 |
-
const hasFills = Boolean(
|
51034 |
|
51035 |
if (!hasFills) {
|
51036 |
return null;
|
@@ -51250,7 +52100,7 @@ function BlockTools(_ref) {
|
|
51250 |
onKeyDown: onKeyDown
|
51251 |
}), (0,external_wp_element_namespaceObject.createElement)(insertion_point_InsertionPointOpenRef.Provider, {
|
51252 |
value: (0,external_wp_element_namespaceObject.useRef)(false)
|
51253 |
-
}, !isTyping &&
|
51254 |
__unstableContentRef: __unstableContentRef
|
51255 |
}), !isZoomOutMode && (hasFixedToolbar || !isLargeViewport) && (0,external_wp_element_namespaceObject.createElement)(block_contextual_toolbar, {
|
51256 |
isFixed: true
|
@@ -52235,6 +53085,7 @@ function PublishDateTimePicker(_ref, ref) {
|
|
52235 |
|
52236 |
|
52237 |
|
|
|
52238 |
|
52239 |
|
52240 |
|
1473 |
module.exports = lineHeight;
|
1474 |
|
1475 |
|
1476 |
+
/***/ }),
|
1477 |
+
|
1478 |
+
/***/ 7970:
|
1479 |
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
1480 |
+
|
1481 |
+
module.exports = __webpack_require__(195);
|
1482 |
+
|
1483 |
+
|
1484 |
+
/***/ }),
|
1485 |
+
|
1486 |
+
/***/ 3110:
|
1487 |
+
/***/ ((module) => {
|
1488 |
+
|
1489 |
+
"use strict";
|
1490 |
+
/**
|
1491 |
+
* Copyright (c) 2015, Facebook, Inc.
|
1492 |
+
* All rights reserved.
|
1493 |
+
*
|
1494 |
+
* This source code is licensed under the BSD-style license found in the
|
1495 |
+
* LICENSE file in the root directory of this source tree. An additional grant
|
1496 |
+
* of patent rights can be found in the PATENTS file in the same directory.
|
1497 |
+
*
|
1498 |
+
* @providesModule ExecutionEnvironment
|
1499 |
+
*/
|
1500 |
+
|
1501 |
+
/*jslint evil: true */
|
1502 |
+
|
1503 |
+
|
1504 |
+
|
1505 |
+
var canUseDOM = !!(
|
1506 |
+
typeof window !== 'undefined' &&
|
1507 |
+
window.document &&
|
1508 |
+
window.document.createElement
|
1509 |
+
);
|
1510 |
+
|
1511 |
+
/**
|
1512 |
+
* Simple, lightweight module assisting with the detection and context of
|
1513 |
+
* Worker. Helps avoid circular dependencies and allows code to reason about
|
1514 |
+
* whether or not they are in a Worker, even if they never include the main
|
1515 |
+
* `ReactWorker` dependency.
|
1516 |
+
*/
|
1517 |
+
var ExecutionEnvironment = {
|
1518 |
+
|
1519 |
+
canUseDOM: canUseDOM,
|
1520 |
+
|
1521 |
+
canUseWorkers: typeof Worker !== 'undefined',
|
1522 |
+
|
1523 |
+
canUseEventListeners:
|
1524 |
+
canUseDOM && !!(window.addEventListener || window.attachEvent),
|
1525 |
+
|
1526 |
+
canUseViewport: canUseDOM && !!window.screen,
|
1527 |
+
|
1528 |
+
isInWorker: !canUseDOM // For now, this is true - might change in the future.
|
1529 |
+
|
1530 |
+
};
|
1531 |
+
|
1532 |
+
module.exports = ExecutionEnvironment;
|
1533 |
+
|
1534 |
+
|
1535 |
+
/***/ }),
|
1536 |
+
|
1537 |
+
/***/ 3812:
|
1538 |
+
/***/ ((module) => {
|
1539 |
+
|
1540 |
+
/**
|
1541 |
+
* Copyright 2004-present Facebook. All Rights Reserved.
|
1542 |
+
*
|
1543 |
+
* @providesModule UserAgent_DEPRECATED
|
1544 |
+
*/
|
1545 |
+
|
1546 |
+
/**
|
1547 |
+
* Provides entirely client-side User Agent and OS detection. You should prefer
|
1548 |
+
* the non-deprecated UserAgent module when possible, which exposes our
|
1549 |
+
* authoritative server-side PHP-based detection to the client.
|
1550 |
+
*
|
1551 |
+
* Usage is straightforward:
|
1552 |
+
*
|
1553 |
+
* if (UserAgent_DEPRECATED.ie()) {
|
1554 |
+
* // IE
|
1555 |
+
* }
|
1556 |
+
*
|
1557 |
+
* You can also do version checks:
|
1558 |
+
*
|
1559 |
+
* if (UserAgent_DEPRECATED.ie() >= 7) {
|
1560 |
+
* // IE7 or better
|
1561 |
+
* }
|
1562 |
+
*
|
1563 |
+
* The browser functions will return NaN if the browser does not match, so
|
1564 |
+
* you can also do version compares the other way:
|
1565 |
+
*
|
1566 |
+
* if (UserAgent_DEPRECATED.ie() < 7) {
|
1567 |
+
* // IE6 or worse
|
1568 |
+
* }
|
1569 |
+
*
|
1570 |
+
* Note that the version is a float and may include a minor version number,
|
1571 |
+
* so you should always use range operators to perform comparisons, not
|
1572 |
+
* strict equality.
|
1573 |
+
*
|
1574 |
+
* **Note:** You should **strongly** prefer capability detection to browser
|
1575 |
+
* version detection where it's reasonable:
|
1576 |
+
*
|
1577 |
+
* http://www.quirksmode.org/js/support.html
|
1578 |
+
*
|
1579 |
+
* Further, we have a large number of mature wrapper functions and classes
|
1580 |
+
* which abstract away many browser irregularities. Check the documentation,
|
1581 |
+
* grep for things, or ask on javascript@lists.facebook.com before writing yet
|
1582 |
+
* another copy of "event || window.event".
|
1583 |
+
*
|
1584 |
+
*/
|
1585 |
+
|
1586 |
+
var _populated = false;
|
1587 |
+
|
1588 |
+
// Browsers
|
1589 |
+
var _ie, _firefox, _opera, _webkit, _chrome;
|
1590 |
+
|
1591 |
+
// Actual IE browser for compatibility mode
|
1592 |
+
var _ie_real_version;
|
1593 |
+
|
1594 |
+
// Platforms
|
1595 |
+
var _osx, _windows, _linux, _android;
|
1596 |
+
|
1597 |
+
// Architectures
|
1598 |
+
var _win64;
|
1599 |
+
|
1600 |
+
// Devices
|
1601 |
+
var _iphone, _ipad, _native;
|
1602 |
+
|
1603 |
+
var _mobile;
|
1604 |
+
|
1605 |
+
function _populate() {
|
1606 |
+
if (_populated) {
|
1607 |
+
return;
|
1608 |
+
}
|
1609 |
+
|
1610 |
+
_populated = true;
|
1611 |
+
|
1612 |
+
// To work around buggy JS libraries that can't handle multi-digit
|
1613 |
+
// version numbers, Opera 10's user agent string claims it's Opera
|
1614 |
+
// 9, then later includes a Version/X.Y field:
|
1615 |
+
//
|
1616 |
+
// Opera/9.80 (foo) Presto/2.2.15 Version/10.10
|
1617 |
+
var uas = navigator.userAgent;
|
1618 |
+
var agent = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(uas);
|
1619 |
+
var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);
|
1620 |
+
|
1621 |
+
_iphone = /\b(iPhone|iP[ao]d)/.exec(uas);
|
1622 |
+
_ipad = /\b(iP[ao]d)/.exec(uas);
|
1623 |
+
_android = /Android/i.exec(uas);
|
1624 |
+
_native = /FBAN\/\w+;/i.exec(uas);
|
1625 |
+
_mobile = /Mobile/i.exec(uas);
|
1626 |
+
|
1627 |
+
// Note that the IE team blog would have you believe you should be checking
|
1628 |
+
// for 'Win64; x64'. But MSDN then reveals that you can actually be coming
|
1629 |
+
// from either x64 or ia64; so ultimately, you should just check for Win64
|
1630 |
+
// as in indicator of whether you're in 64-bit IE. 32-bit IE on 64-bit
|
1631 |
+
// Windows will send 'WOW64' instead.
|
1632 |
+
_win64 = !!(/Win64/.exec(uas));
|
1633 |
+
|
1634 |
+
if (agent) {
|
1635 |
+
_ie = agent[1] ? parseFloat(agent[1]) : (
|
1636 |
+
agent[5] ? parseFloat(agent[5]) : NaN);
|
1637 |
+
// IE compatibility mode
|
1638 |
+
if (_ie && document && document.documentMode) {
|
1639 |
+
_ie = document.documentMode;
|
1640 |
+
}
|
1641 |
+
// grab the "true" ie version from the trident token if available
|
1642 |
+
var trident = /(?:Trident\/(\d+.\d+))/.exec(uas);
|
1643 |
+
_ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;
|
1644 |
+
|
1645 |
+
_firefox = agent[2] ? parseFloat(agent[2]) : NaN;
|
1646 |
+
_opera = agent[3] ? parseFloat(agent[3]) : NaN;
|
1647 |
+
_webkit = agent[4] ? parseFloat(agent[4]) : NaN;
|
1648 |
+
if (_webkit) {
|
1649 |
+
// We do not add the regexp to the above test, because it will always
|
1650 |
+
// match 'safari' only since 'AppleWebKit' appears before 'Chrome' in
|
1651 |
+
// the userAgent string.
|
1652 |
+
agent = /(?:Chrome\/(\d+\.\d+))/.exec(uas);
|
1653 |
+
_chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;
|
1654 |
+
} else {
|
1655 |
+
_chrome = NaN;
|
1656 |
+
}
|
1657 |
+
} else {
|
1658 |
+
_ie = _firefox = _opera = _chrome = _webkit = NaN;
|
1659 |
+
}
|
1660 |
+
|
1661 |
+
if (os) {
|
1662 |
+
if (os[1]) {
|
1663 |
+
// Detect OS X version. If no version number matches, set _osx to true.
|
1664 |
+
// Version examples: 10, 10_6_1, 10.7
|
1665 |
+
// Parses version number as a float, taking only first two sets of
|
1666 |
+
// digits. If only one set of digits is found, returns just the major
|
1667 |
+
// version number.
|
1668 |
+
var ver = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(uas);
|
1669 |
+
|
1670 |
+
_osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;
|
1671 |
+
} else {
|
1672 |
+
_osx = false;
|
1673 |
+
}
|
1674 |
+
_windows = !!os[2];
|
1675 |
+
_linux = !!os[3];
|
1676 |
+
} else {
|
1677 |
+
_osx = _windows = _linux = false;
|
1678 |
+
}
|
1679 |
+
}
|
1680 |
+
|
1681 |
+
var UserAgent_DEPRECATED = {
|
1682 |
+
|
1683 |
+
/**
|
1684 |
+
* Check if the UA is Internet Explorer.
|
1685 |
+
*
|
1686 |
+
*
|
1687 |
+
* @return float|NaN Version number (if match) or NaN.
|
1688 |
+
*/
|
1689 |
+
ie: function() {
|
1690 |
+
return _populate() || _ie;
|
1691 |
+
},
|
1692 |
+
|
1693 |
+
/**
|
1694 |
+
* Check if we're in Internet Explorer compatibility mode.
|
1695 |
+
*
|
1696 |
+
* @return bool true if in compatibility mode, false if
|
1697 |
+
* not compatibility mode or not ie
|
1698 |
+
*/
|
1699 |
+
ieCompatibilityMode: function() {
|
1700 |
+
return _populate() || (_ie_real_version > _ie);
|
1701 |
+
},
|
1702 |
+
|
1703 |
+
|
1704 |
+
/**
|
1705 |
+
* Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we
|
1706 |
+
* only need this because Skype can't handle 64-bit IE yet. We need to remove
|
1707 |
+
* this when we don't need it -- tracked by #601957.
|
1708 |
+
*/
|
1709 |
+
ie64: function() {
|
1710 |
+
return UserAgent_DEPRECATED.ie() && _win64;
|
1711 |
+
},
|
1712 |
+
|
1713 |
+
/**
|
1714 |
+
* Check if the UA is Firefox.
|
1715 |
+
*
|
1716 |
+
*
|
1717 |
+
* @return float|NaN Version number (if match) or NaN.
|
1718 |
+
*/
|
1719 |
+
firefox: function() {
|
1720 |
+
return _populate() || _firefox;
|
1721 |
+
},
|
1722 |
+
|
1723 |
+
|
1724 |
+
/**
|
1725 |
+
* Check if the UA is Opera.
|
1726 |
+
*
|
1727 |
+
*
|
1728 |
+
* @return float|NaN Version number (if match) or NaN.
|
1729 |
+
*/
|
1730 |
+
opera: function() {
|
1731 |
+
return _populate() || _opera;
|
1732 |
+
},
|
1733 |
+
|
1734 |
+
|
1735 |
+
/**
|
1736 |
+
* Check if the UA is WebKit.
|
1737 |
+
*
|
1738 |
+
*
|
1739 |
+
* @return float|NaN Version number (if match) or NaN.
|
1740 |
+
*/
|
1741 |
+
webkit: function() {
|
1742 |
+
return _populate() || _webkit;
|
1743 |
+
},
|
1744 |
+
|
1745 |
+
/**
|
1746 |
+
* For Push
|
1747 |
+
* WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit
|
1748 |
+
*/
|
1749 |
+
safari: function() {
|
1750 |
+
return UserAgent_DEPRECATED.webkit();
|
1751 |
+
},
|
1752 |
+
|
1753 |
+
/**
|
1754 |
+
* Check if the UA is a Chrome browser.
|
1755 |
+
*
|
1756 |
+
*
|
1757 |
+
* @return float|NaN Version number (if match) or NaN.
|
1758 |
+
*/
|
1759 |
+
chrome : function() {
|
1760 |
+
return _populate() || _chrome;
|
1761 |
+
},
|
1762 |
+
|
1763 |
+
|
1764 |
+
/**
|
1765 |
+
* Check if the user is running Windows.
|
1766 |
+
*
|
1767 |
+
* @return bool `true' if the user's OS is Windows.
|
1768 |
+
*/
|
1769 |
+
windows: function() {
|
1770 |
+
return _populate() || _windows;
|
1771 |
+
},
|
1772 |
+
|
1773 |
+
|
1774 |
+
/**
|
1775 |
+
* Check if the user is running Mac OS X.
|
1776 |
+
*
|
1777 |
+
* @return float|bool Returns a float if a version number is detected,
|
1778 |
+
* otherwise true/false.
|
1779 |
+
*/
|
1780 |
+
osx: function() {
|
1781 |
+
return _populate() || _osx;
|
1782 |
+
},
|
1783 |
+
|
1784 |
+
/**
|
1785 |
+
* Check if the user is running Linux.
|
1786 |
+
*
|
1787 |
+
* @return bool `true' if the user's OS is some flavor of Linux.
|
1788 |
+
*/
|
1789 |
+
linux: function() {
|
1790 |
+
return _populate() || _linux;
|
1791 |
+
},
|
1792 |
+
|
1793 |
+
/**
|
1794 |
+
* Check if the user is running on an iPhone or iPod platform.
|
1795 |
+
*
|
1796 |
+
* @return bool `true' if the user is running some flavor of the
|
1797 |
+
* iPhone OS.
|
1798 |
+
*/
|
1799 |
+
iphone: function() {
|
1800 |
+
return _populate() || _iphone;
|
1801 |
+
},
|
1802 |
+
|
1803 |
+
mobile: function() {
|
1804 |
+
return _populate() || (_iphone || _ipad || _android || _mobile);
|
1805 |
+
},
|
1806 |
+
|
1807 |
+
nativeApp: function() {
|
1808 |
+
// webviews inside of the native apps
|
1809 |
+
return _populate() || _native;
|
1810 |
+
},
|
1811 |
+
|
1812 |
+
android: function() {
|
1813 |
+
return _populate() || _android;
|
1814 |
+
},
|
1815 |
+
|
1816 |
+
ipad: function() {
|
1817 |
+
return _populate() || _ipad;
|
1818 |
+
}
|
1819 |
+
};
|
1820 |
+
|
1821 |
+
module.exports = UserAgent_DEPRECATED;
|
1822 |
+
|
1823 |
+
|
1824 |
+
/***/ }),
|
1825 |
+
|
1826 |
+
/***/ 7939:
|
1827 |
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
1828 |
+
|
1829 |
+
"use strict";
|
1830 |
+
/**
|
1831 |
+
* Copyright 2013-2015, Facebook, Inc.
|
1832 |
+
* All rights reserved.
|
1833 |
+
*
|
1834 |
+
* This source code is licensed under the BSD-style license found in the
|
1835 |
+
* LICENSE file in the root directory of this source tree. An additional grant
|
1836 |
+
* of patent rights can be found in the PATENTS file in the same directory.
|
1837 |
+
*
|
1838 |
+
* @providesModule isEventSupported
|
1839 |
+
*/
|
1840 |
+
|
1841 |
+
|
1842 |
+
|
1843 |
+
var ExecutionEnvironment = __webpack_require__(3110);
|
1844 |
+
|
1845 |
+
var useHasFeature;
|
1846 |
+
if (ExecutionEnvironment.canUseDOM) {
|
1847 |
+
useHasFeature =
|
1848 |
+
document.implementation &&
|
1849 |
+
document.implementation.hasFeature &&
|
1850 |
+
// always returns true in newer browsers as per the standard.
|
1851 |
+
// @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
|
1852 |
+
document.implementation.hasFeature('', '') !== true;
|
1853 |
+
}
|
1854 |
+
|
1855 |
+
/**
|
1856 |
+
* Checks if an event is supported in the current execution environment.
|
1857 |
+
*
|
1858 |
+
* NOTE: This will not work correctly for non-generic events such as `change`,
|
1859 |
+
* `reset`, `load`, `error`, and `select`.
|
1860 |
+
*
|
1861 |
+
* Borrows from Modernizr.
|
1862 |
+
*
|
1863 |
+
* @param {string} eventNameSuffix Event name, e.g. "click".
|
1864 |
+
* @param {?boolean} capture Check if the capture phase is supported.
|
1865 |
+
* @return {boolean} True if the event is supported.
|
1866 |
+
* @internal
|
1867 |
+
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
1868 |
+
*/
|
1869 |
+
function isEventSupported(eventNameSuffix, capture) {
|
1870 |
+
if (!ExecutionEnvironment.canUseDOM ||
|
1871 |
+
capture && !('addEventListener' in document)) {
|
1872 |
+
return false;
|
1873 |
+
}
|
1874 |
+
|
1875 |
+
var eventName = 'on' + eventNameSuffix;
|
1876 |
+
var isSupported = eventName in document;
|
1877 |
+
|
1878 |
+
if (!isSupported) {
|
1879 |
+
var element = document.createElement('div');
|
1880 |
+
element.setAttribute(eventName, 'return;');
|
1881 |
+
isSupported = typeof element[eventName] === 'function';
|
1882 |
+
}
|
1883 |
+
|
1884 |
+
if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
|
1885 |
+
// This is the only way to test support for the `wheel` event in IE9+.
|
1886 |
+
isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
|
1887 |
+
}
|
1888 |
+
|
1889 |
+
return isSupported;
|
1890 |
+
}
|
1891 |
+
|
1892 |
+
module.exports = isEventSupported;
|
1893 |
+
|
1894 |
+
|
1895 |
+
/***/ }),
|
1896 |
+
|
1897 |
+
/***/ 195:
|
1898 |
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
1899 |
+
|
1900 |
+
"use strict";
|
1901 |
+
/**
|
1902 |
+
* Copyright (c) 2015, Facebook, Inc.
|
1903 |
+
* All rights reserved.
|
1904 |
+
*
|
1905 |
+
* This source code is licensed under the BSD-style license found in the
|
1906 |
+
* LICENSE file in the root directory of this source tree. An additional grant
|
1907 |
+
* of patent rights can be found in the PATENTS file in the same directory.
|
1908 |
+
*
|
1909 |
+
* @providesModule normalizeWheel
|
1910 |
+
* @typechecks
|
1911 |
+
*/
|
1912 |
+
|
1913 |
+
|
1914 |
+
|
1915 |
+
var UserAgent_DEPRECATED = __webpack_require__(3812);
|
1916 |
+
|
1917 |
+
var isEventSupported = __webpack_require__(7939);
|
1918 |
+
|
1919 |
+
|
1920 |
+
// Reasonable defaults
|
1921 |
+
var PIXEL_STEP = 10;
|
1922 |
+
var LINE_HEIGHT = 40;
|
1923 |
+
var PAGE_HEIGHT = 800;
|
1924 |
+
|
1925 |
+
/**
|
1926 |
+
* Mouse wheel (and 2-finger trackpad) support on the web sucks. It is
|
1927 |
+
* complicated, thus this doc is long and (hopefully) detailed enough to answer
|
1928 |
+
* your questions.
|
1929 |
+
*
|
1930 |
+
* If you need to react to the mouse wheel in a predictable way, this code is
|
1931 |
+
* like your bestest friend. * hugs *
|
1932 |
+
*
|
1933 |
+
* As of today, there are 4 DOM event types you can listen to:
|
1934 |
+
*
|
1935 |
+
* 'wheel' -- Chrome(31+), FF(17+), IE(9+)
|
1936 |
+
* 'mousewheel' -- Chrome, IE(6+), Opera, Safari
|
1937 |
+
* 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!
|
1938 |
+
* 'DOMMouseScroll' -- FF(0.9.7+) since 2003
|
1939 |
+
*
|
1940 |
+
* So what to do? The is the best:
|
1941 |
+
*
|
1942 |
+
* normalizeWheel.getEventType();
|
1943 |
+
*
|
1944 |
+
* In your event callback, use this code to get sane interpretation of the
|
1945 |
+
* deltas. This code will return an object with properties:
|
1946 |
+
*
|
1947 |
+
* spinX -- normalized spin speed (use for zoom) - x plane
|
1948 |
+
* spinY -- " - y plane
|
1949 |
+
* pixelX -- normalized distance (to pixels) - x plane
|
1950 |
+
* pixelY -- " - y plane
|
1951 |
+
*
|
1952 |
+
* Wheel values are provided by the browser assuming you are using the wheel to
|
1953 |
+
* scroll a web page by a number of lines or pixels (or pages). Values can vary
|
1954 |
+
* significantly on different platforms and browsers, forgetting that you can
|
1955 |
+
* scroll at different speeds. Some devices (like trackpads) emit more events
|
1956 |
+
* at smaller increments with fine granularity, and some emit massive jumps with
|
1957 |
+
* linear speed or acceleration.
|
1958 |
+
*
|
1959 |
+
* This code does its best to normalize the deltas for you:
|
1960 |
+
*
|
1961 |
+
* - spin is trying to normalize how far the wheel was spun (or trackpad
|
1962 |
+
* dragged). This is super useful for zoom support where you want to
|
1963 |
+
* throw away the chunky scroll steps on the PC and make those equal to
|
1964 |
+
* the slow and smooth tiny steps on the Mac. Key data: This code tries to
|
1965 |
+
* resolve a single slow step on a wheel to 1.
|
1966 |
+
*
|
1967 |
+
* - pixel is normalizing the desired scroll delta in pixel units. You'll
|
1968 |
+
* get the crazy differences between browsers, but at least it'll be in
|
1969 |
+
* pixels!
|
1970 |
+
*
|
1971 |
+
* - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This
|
1972 |
+
* should translate to positive value zooming IN, negative zooming OUT.
|
1973 |
+
* This matches the newer 'wheel' event.
|
1974 |
+
*
|
1975 |
+
* Why are there spinX, spinY (or pixels)?
|
1976 |
+
*
|
1977 |
+
* - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn
|
1978 |
+
* with a mouse. It results in side-scrolling in the browser by default.
|
1979 |
+
*
|
1980 |
+
* - spinY is what you expect -- it's the classic axis of a mouse wheel.
|
1981 |
+
*
|
1982 |
+
* - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and
|
1983 |
+
* probably is by browsers in conjunction with fancy 3D controllers .. but
|
1984 |
+
* you know.
|
1985 |
+
*
|
1986 |
+
* Implementation info:
|
1987 |
+
*
|
1988 |
+
* Examples of 'wheel' event if you scroll slowly (down) by one step with an
|
1989 |
+
* average mouse:
|
1990 |
+
*
|
1991 |
+
* OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)
|
1992 |
+
* OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)
|
1993 |
+
* OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)
|
1994 |
+
* Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)
|
1995 |
+
* Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)
|
1996 |
+
*
|
1997 |
+
* On the trackpad:
|
1998 |
+
*
|
1999 |
+
* OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)
|
2000 |
+
* OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)
|
2001 |
+
*
|
2002 |
+
* On other/older browsers.. it's more complicated as there can be multiple and
|
2003 |
+
* also missing delta values.
|
2004 |
+
*
|
2005 |
+
* The 'wheel' event is more standard:
|
2006 |
+
*
|
2007 |
+
* http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents
|
2008 |
+
*
|
2009 |
+
* The basics is that it includes a unit, deltaMode (pixels, lines, pages), and
|
2010 |
+
* deltaX, deltaY and deltaZ. Some browsers provide other values to maintain
|
2011 |
+
* backward compatibility with older events. Those other values help us
|
2012 |
+
* better normalize spin speed. Example of what the browsers provide:
|
2013 |
+
*
|
2014 |
+
* | event.wheelDelta | event.detail
|
2015 |
+
* ------------------+------------------+--------------
|
2016 |
+
* Safari v5/OS X | -120 | 0
|
2017 |
+
* Safari v5/Win7 | -120 | 0
|
2018 |
+
* Chrome v17/OS X | -120 | 0
|
2019 |
+
* Chrome v17/Win7 | -120 | 0
|
2020 |
+
* IE9/Win7 | -120 | undefined
|
2021 |
+
* Firefox v4/OS X | undefined | 1
|
2022 |
+
* Firefox v4/Win7 | undefined | 3
|
2023 |
+
*
|
2024 |
+
*/
|
2025 |
+
function normalizeWheel(/*object*/ event) /*object*/ {
|
2026 |
+
var sX = 0, sY = 0, // spinX, spinY
|
2027 |
+
pX = 0, pY = 0; // pixelX, pixelY
|
2028 |
+
|
2029 |
+
// Legacy
|
2030 |
+
if ('detail' in event) { sY = event.detail; }
|
2031 |
+
if ('wheelDelta' in event) { sY = -event.wheelDelta / 120; }
|
2032 |
+
if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; }
|
2033 |
+
if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; }
|
2034 |
+
|
2035 |
+
// side scrolling on FF with DOMMouseScroll
|
2036 |
+
if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {
|
2037 |
+
sX = sY;
|
2038 |
+
sY = 0;
|
2039 |
+
}
|
2040 |
+
|
2041 |
+
pX = sX * PIXEL_STEP;
|
2042 |
+
pY = sY * PIXEL_STEP;
|
2043 |
+
|
2044 |
+
if ('deltaY' in event) { pY = event.deltaY; }
|
2045 |
+
if ('deltaX' in event) { pX = event.deltaX; }
|
2046 |
+
|
2047 |
+
if ((pX || pY) && event.deltaMode) {
|
2048 |
+
if (event.deltaMode == 1) { // delta in LINE units
|
2049 |
+
pX *= LINE_HEIGHT;
|
2050 |
+
pY *= LINE_HEIGHT;
|
2051 |
+
} else { // delta in PAGE units
|
2052 |
+
pX *= PAGE_HEIGHT;
|
2053 |
+
pY *= PAGE_HEIGHT;
|
2054 |
+
}
|
2055 |
+
}
|
2056 |
+
|
2057 |
+
// Fall-back if spin cannot be determined
|
2058 |
+
if (pX && !sX) { sX = (pX < 1) ? -1 : 1; }
|
2059 |
+
if (pY && !sY) { sY = (pY < 1) ? -1 : 1; }
|
2060 |
+
|
2061 |
+
return { spinX : sX,
|
2062 |
+
spinY : sY,
|
2063 |
+
pixelX : pX,
|
2064 |
+
pixelY : pY };
|
2065 |
+
}
|
2066 |
+
|
2067 |
+
|
2068 |
+
/**
|
2069 |
+
* The best combination if you prefer spinX + spinY normalization. It favors
|
2070 |
+
* the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with
|
2071 |
+
* 'wheel' event, making spin speed determination impossible.
|
2072 |
+
*/
|
2073 |
+
normalizeWheel.getEventType = function() /*string*/ {
|
2074 |
+
return (UserAgent_DEPRECATED.firefox())
|
2075 |
+
? 'DOMMouseScroll'
|
2076 |
+
: (isEventSupported('wheel'))
|
2077 |
+
? 'wheel'
|
2078 |
+
: 'mousewheel';
|
2079 |
+
};
|
2080 |
+
|
2081 |
+
module.exports = normalizeWheel;
|
2082 |
+
|
2083 |
+
|
2084 |
/***/ }),
|
2085 |
|
2086 |
/***/ 5372:
|
3288 |
"__experimentalUseGradient": () => (/* reexport */ __experimentalUseGradient),
|
3289 |
"__experimentalUseHasRecursion": () => (/* reexport */ useHasRecursion),
|
3290 |
"__experimentalUseMultipleOriginColorsAndGradients": () => (/* reexport */ useMultipleOriginColorsAndGradients),
|
3291 |
+
"__experimentalUseOnBlockDrop": () => (/* reexport */ useOnBlockDrop),
|
3292 |
"__experimentalUseResizeCanvas": () => (/* reexport */ useResizeCanvas),
|
3293 |
+
"__experimentaluseLayoutClasses": () => (/* reexport */ useLayoutClasses),
|
3294 |
+
"__experimentaluseLayoutStyles": () => (/* reexport */ useLayoutStyles),
|
3295 |
"__unstableBlockNameContext": () => (/* reexport */ block_name_context),
|
3296 |
"__unstableBlockSettingsMenuFirstItem": () => (/* reexport */ block_settings_menu_first_item),
|
3297 |
"__unstableBlockToolbarLastItem": () => (/* reexport */ block_toolbar_last_item),
|
3836 |
|
3837 |
|
3838 |
|
3839 |
+
|
3840 |
/**
|
3841 |
* Internal dependencies
|
3842 |
*/
|
4519 |
*/
|
4520 |
|
4521 |
|
4522 |
+
const blocks = (0,external_wp_compose_namespaceObject.pipe)(external_wp_data_namespaceObject.combineReducers, withSaveReusableBlock, // Needs to be before withBlockCache.
|
4523 |
withBlockTree, // Needs to be before withInnerBlocksRemoveCascade.
|
4524 |
withInnerBlocksRemoveCascade, withReplaceInnerBlocks, // Needs to be after withInnerBlocksRemoveCascade.
|
4525 |
withBlockReset, withPersistentBlockChange, withIgnoredBlockChange, withResetControlledBlocks)({
|
4742 |
}
|
4743 |
|
4744 |
const mappedBlocks = mapBlockOrder(action.blocks);
|
4745 |
+
return (0,external_wp_compose_namespaceObject.pipe)([nextState => (0,external_lodash_namespaceObject.omit)(nextState, action.replacedClientIds), nextState => ({ ...nextState,
|
4746 |
...(0,external_lodash_namespaceObject.omit)(mappedBlocks, '')
|
4747 |
}), nextState => (0,external_lodash_namespaceObject.mapValues)(nextState, subState => (0,external_lodash_namespaceObject.reduce)(subState, (result, clientId) => {
|
4748 |
if (clientId === clientIds[0]) {
|
4758 |
}
|
4759 |
|
4760 |
case 'REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN':
|
4761 |
+
return (0,external_wp_compose_namespaceObject.pipe)([// Remove inner block ordering for removed blocks.
|
4762 |
nextState => (0,external_lodash_namespaceObject.omit)(nextState, action.removedClientIds), // Remove deleted blocks from other blocks' orderings.
|
4763 |
nextState => (0,external_lodash_namespaceObject.mapValues)(nextState, subState => (0,external_lodash_namespaceObject.without)(subState, ...action.removedClientIds))])(state);
|
4764 |
}
|
8390 |
const editorMode = __unstableGetEditorMode(state); // In zoom-out mode, the block overlay is always active for top level blocks.
|
8391 |
|
8392 |
|
8393 |
+
if (editorMode === 'zoom-out' && clientId && !getBlockRootClientId(state, clientId)) {
|
8394 |
return true;
|
8395 |
} // In navigation mode, the block overlay is active when the block is not
|
8396 |
// selected (and doesn't contain a selected child). The same behavior is
|
10231 |
} = _ref;
|
10232 |
const accessibleToolbarState = (0,external_wp_element_namespaceObject.useContext)(external_wp_components_namespaceObject.__experimentalToolbarContext);
|
10233 |
const Slot = block_controls_groups[group].Slot;
|
10234 |
+
const fills = (0,external_wp_components_namespaceObject.__experimentalUseSlotFills)(Slot.__unstableName);
|
10235 |
+
const hasFills = Boolean(fills && fills.length);
|
10236 |
|
10237 |
if (!hasFills) {
|
10238 |
return null;
|
11096 |
const showHint = showRangeControl && !showCustomValueControl && currentValueHint !== undefined;
|
11097 |
return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, side !== 'all' && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalHStack, {
|
11098 |
className: "components-spacing-sizes-control__side-labels"
|
11099 |
+
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl.VisualLabel, {
|
11100 |
className: "components-spacing-sizes-control__side-label"
|
11101 |
+
}, LABELS[side]), showHint && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl.VisualLabel, {
|
11102 |
className: "components-spacing-sizes-control__hint-single"
|
11103 |
+
}, currentValueHint)), side === 'all' && showHint && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl.VisualLabel, {
|
11104 |
className: "components-spacing-sizes-control__hint-all"
|
11105 |
}, currentValueHint), !disableCustomSpacingSizes && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
|
11106 |
label: showCustomValueControl ? (0,external_wp_i18n_namespaceObject.__)('Use size preset') : (0,external_wp_i18n_namespaceObject.__)('Set custom size'),
|
11156 |
max: spacingSizes.length - 1,
|
11157 |
marks: marks,
|
11158 |
label: ariaLabel,
|
11159 |
+
hideLabelFromVision: true,
|
11160 |
+
__nextHasNoMarginBottom: true
|
11161 |
}), !showRangeControl && !showCustomValueControl && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.CustomSelectControl, {
|
11162 |
className: "components-spacing-sizes-control__custom-select-control",
|
11163 |
value: options.find(option => option.key === currentValue) || '' // passing undefined here causes a downshift controlled/uncontrolled warning
|
11376 |
|
11377 |
|
11378 |
|
11379 |
+
/**
|
11380 |
+
* External dependencies
|
11381 |
+
*/
|
11382 |
+
|
11383 |
/**
|
11384 |
* WordPress dependencies
|
11385 |
*/
|
11386 |
|
11387 |
|
11388 |
|
11389 |
+
|
11390 |
/**
|
11391 |
* Internal dependencies
|
11392 |
*/
|
11450 |
};
|
11451 |
return (0,external_wp_element_namespaceObject.createElement)("fieldset", {
|
11452 |
role: "region",
|
11453 |
+
className: classnames_default()('component-spacing-sizes-control', {
|
11454 |
+
'is-unlinked': !isLinked
|
11455 |
+
})
|
11456 |
+
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.BaseControl.VisualLabel, {
|
11457 |
as: "legend"
|
11458 |
}, label), !hasOneSide && (0,external_wp_element_namespaceObject.createElement)(LinkedButton, {
|
11459 |
onClick: toggleLinked,
|
11757 |
} = _ref;
|
11758 |
const Slot = (_groups$group = inspector_controls_groups[group]) === null || _groups$group === void 0 ? void 0 : _groups$group.Slot;
|
11759 |
const slot = (0,external_wp_components_namespaceObject.__experimentalUseSlot)(Slot === null || Slot === void 0 ? void 0 : Slot.__unstableName);
|
11760 |
+
const fills = (0,external_wp_components_namespaceObject.__experimentalUseSlotFills)(Slot === null || Slot === void 0 ? void 0 : Slot.__unstableName);
|
11761 |
|
11762 |
if (!Slot || !slot) {
|
11763 |
typeof process !== "undefined" && process.env && "production" !== "production" ? 0 : void 0;
|
11764 |
return null;
|
11765 |
}
|
11766 |
|
11767 |
+
const hasFills = Boolean(fills && fills.length);
|
11768 |
|
11769 |
if (!hasFills) {
|
11770 |
return null;
|
11896 |
const selectedElement = useBlockElement(clientId);
|
11897 |
const lastSelectedElement = useBlockElement(bottomClientId !== null && bottomClientId !== void 0 ? bottomClientId : clientId);
|
11898 |
const mergedRefs = (0,external_wp_compose_namespaceObject.useMergeRefs)([ref, use_popover_scroll(__unstableContentRef)]);
|
11899 |
+
const [popoverDimensionsRecomputeCounter, forceRecomputePopoverDimensions] = (0,external_wp_element_namespaceObject.useReducer)( // Module is there to make sure that the counter doesn't overflow.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11900 |
s => (s + 1) % MAX_POPOVER_RECOMPUTE_COUNTER, 0); // When blocks are moved up/down, they are animated to their new position by
|
11901 |
// updating the `transform` property manually (i.e. without using CSS
|
11902 |
// transitions or animations). The animation, which can also scroll the block
|
11910 |
return;
|
11911 |
}
|
11912 |
|
11913 |
+
const observer = new window.MutationObserver(forceRecomputePopoverDimensions);
|
11914 |
observer.observe(selectedElement, {
|
11915 |
attributes: true
|
11916 |
});
|
11918 |
observer.disconnect();
|
11919 |
};
|
11920 |
}, [selectedElement]);
|
11921 |
+
const style = (0,external_wp_element_namespaceObject.useMemo)(() => {
|
11922 |
+
if ( // popoverDimensionsRecomputeCounter is by definition always equal or greater
|
11923 |
+
// than 0. This check is only there to satisfy the correctness of the
|
11924 |
+
// exhaustive-deps rule for the `useMemo` hook.
|
11925 |
+
popoverDimensionsRecomputeCounter < 0 || !selectedElement || lastSelectedElement !== selectedElement) {
|
11926 |
+
return {};
|
11927 |
+
}
|
11928 |
+
|
11929 |
+
return {
|
11930 |
+
position: 'absolute',
|
11931 |
+
width: selectedElement.offsetWidth,
|
11932 |
+
height: selectedElement.offsetHeight
|
11933 |
+
};
|
11934 |
+
}, [selectedElement, lastSelectedElement, __unstableRefreshSize, popoverDimensionsRecomputeCounter]);
|
11935 |
const popoverAnchor = (0,external_wp_element_namespaceObject.useMemo)(() => {
|
11936 |
+
if ( // popoverDimensionsRecomputeCounter is by definition always equal or greater
|
11937 |
// than 0. This check is only there to satisfy the correctness of the
|
11938 |
// exhaustive-deps rule for the `useMemo` hook.
|
11939 |
+
popoverDimensionsRecomputeCounter < 0 || !selectedElement || bottomClientId && !lastSelectedElement) {
|
11940 |
return undefined;
|
11941 |
}
|
11942 |
|
11961 |
|
11962 |
ownerDocument: selectedElement.ownerDocument
|
11963 |
};
|
11964 |
+
}, [bottomClientId, lastSelectedElement, selectedElement, popoverDimensionsRecomputeCounter]);
|
11965 |
|
11966 |
if (!selectedElement || bottomClientId && !lastSelectedElement) {
|
11967 |
return null;
|
11970 |
return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Popover, _extends({
|
11971 |
ref: mergedRefs,
|
11972 |
animate: false,
|
|
|
11973 |
focusOnMount: false,
|
11974 |
anchor: popoverAnchor // Render in the old slot if needed for backward compatibility,
|
11975 |
// otherwise render in place (not in the default popover slot).
|
11976 |
,
|
11977 |
__unstableSlotName: __unstablePopoverSlot || null,
|
11978 |
+
placement: "top-start",
|
11979 |
resize: false,
|
11980 |
flip: false,
|
11981 |
shift: true
|
15370 |
|
15371 |
/* harmony default export */ const block_html = (BlockHTML);
|
15372 |
|
15373 |
+
;// CONCATENATED MODULE: ./node_modules/@react-spring/rafz/dist/react-spring-rafz.esm.js
|
15374 |
let updateQueue = makeQueue();
|
15375 |
const raf = fn => schedule(fn, updateQueue);
|
15376 |
let writeQueue = makeQueue();
|
15416 |
raf.cancel = fn => {
|
15417 |
onStartQueue.delete(fn);
|
15418 |
onFrameQueue.delete(fn);
|
15419 |
+
onFinishQueue.delete(fn);
|
15420 |
updateQueue.delete(fn);
|
15421 |
writeQueue.delete(fn);
|
|
|
15422 |
};
|
15423 |
|
15424 |
raf.sync = fn => {
|
15517 |
pendingCount -= count;
|
15518 |
}
|
15519 |
|
15520 |
+
if (!pendingCount) {
|
15521 |
+
stop();
|
15522 |
+
return;
|
15523 |
+
}
|
15524 |
+
|
15525 |
onStartQueue.flush();
|
15526 |
updateQueue.flush(prevTs ? Math.min(64, ts - prevTs) : 16.667);
|
15527 |
onFrameQueue.flush();
|
15528 |
writeQueue.flush();
|
15529 |
onFinishQueue.flush();
|
|
|
|
|
|
|
|
|
15530 |
}
|
15531 |
|
15532 |
function makeQueue() {
|
15593 |
// EXTERNAL MODULE: external "React"
|
15594 |
var external_React_ = __webpack_require__(9196);
|
15595 |
var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_);
|
15596 |
+
;// CONCATENATED MODULE: ./node_modules/@react-spring/shared/dist/react-spring-shared.esm.js
|
|
|
15597 |
|
15598 |
|
15599 |
|
16086 |
}
|
16087 |
|
16088 |
function react_spring_shared_esm_extends() {
|
16089 |
+
react_spring_shared_esm_extends = Object.assign ? Object.assign.bind() : function (target) {
|
16090 |
for (var i = 1; i < arguments.length; i++) {
|
16091 |
var source = arguments[i];
|
16092 |
|
16099 |
|
16100 |
return target;
|
16101 |
};
|
|
|
16102 |
return react_spring_shared_esm_extends.apply(this, arguments);
|
16103 |
}
|
16104 |
|
16290 |
return react_spring_shared_esm_is.str(value) && (value[0] == '#' || /\d/.test(value) || !isSSR() && cssVariableRegex.test(value) || value in (colors$1 || {}));
|
16291 |
}
|
16292 |
|
16293 |
+
const react_spring_shared_esm_useIsomorphicLayoutEffect = isSSR() ? external_React_.useEffect : external_React_.useLayoutEffect;
|
16294 |
|
16295 |
const useIsMounted = () => {
|
16296 |
const isMounted = (0,external_React_.useRef)(false);
|
16297 |
+
react_spring_shared_esm_useIsomorphicLayoutEffect(() => {
|
16298 |
isMounted.current = true;
|
16299 |
return () => {
|
16300 |
isMounted.current = false;
|
16370 |
return prevRef.current;
|
16371 |
}
|
16372 |
|
16373 |
+
const useReducedMotion = () => {
|
16374 |
+
const [reducedMotion, setReducedMotion] = useState(null);
|
16375 |
+
react_spring_shared_esm_useIsomorphicLayoutEffect(() => {
|
16376 |
+
const mql = window.matchMedia('(prefers-reduced-motion)');
|
16377 |
+
|
16378 |
+
const handleMediaChange = e => {
|
16379 |
+
setReducedMotion(e.matches);
|
16380 |
+
react_spring_shared_esm_assign({
|
16381 |
+
skipAnimation: e.matches
|
16382 |
+
});
|
16383 |
+
};
|
16384 |
+
|
16385 |
+
handleMediaChange(mql);
|
16386 |
+
mql.addEventListener('change', handleMediaChange);
|
16387 |
+
return () => {
|
16388 |
+
mql.removeEventListener('change', handleMediaChange);
|
16389 |
+
};
|
16390 |
+
}, []);
|
16391 |
+
return reducedMotion;
|
16392 |
+
};
|
16393 |
|
16394 |
|
16395 |
+
|
16396 |
+
;// CONCATENATED MODULE: ./node_modules/@react-spring/animated/dist/react-spring-animated.esm.js
|
16397 |
|
16398 |
|
16399 |
|
16625 |
}
|
16626 |
|
16627 |
function react_spring_animated_esm_extends() {
|
16628 |
+
react_spring_animated_esm_extends = Object.assign ? Object.assign.bind() : function (target) {
|
16629 |
for (var i = 1; i < arguments.length; i++) {
|
16630 |
var source = arguments[i];
|
16631 |
|
16638 |
|
16639 |
return target;
|
16640 |
};
|
|
|
16641 |
return react_spring_animated_esm_extends.apply(this, arguments);
|
16642 |
}
|
16643 |
|
16667 |
|
16668 |
const observer = new PropsObserver(callback, deps);
|
16669 |
const observerRef = (0,external_React_.useRef)();
|
16670 |
+
react_spring_shared_esm_useIsomorphicLayoutEffect(() => {
|
16671 |
observerRef.current = observer;
|
16672 |
react_spring_shared_esm_each(deps, dep => addFluidObserver(dep, observer));
|
16673 |
return () => {
|
16763 |
|
16764 |
|
16765 |
|
16766 |
+
;// CONCATENATED MODULE: ./node_modules/@react-spring/core/dist/react-spring-core.esm.js
|
16767 |
|
16768 |
|
16769 |
|
16773 |
|
16774 |
|
16775 |
function react_spring_core_esm_extends() {
|
16776 |
+
react_spring_core_esm_extends = Object.assign ? Object.assign.bind() : function (target) {
|
16777 |
for (var i = 1; i < arguments.length; i++) {
|
16778 |
var source = arguments[i];
|
16779 |
|
16786 |
|
16787 |
return target;
|
16788 |
};
|
|
|
16789 |
return react_spring_core_esm_extends.apply(this, arguments);
|
16790 |
}
|
16791 |
|
16914 |
}
|
16915 |
|
16916 |
function useChain(refs, timeSteps, timeFrame = 1000) {
|
16917 |
+
useIsomorphicLayoutEffect(() => {
|
16918 |
if (timeSteps) {
|
16919 |
let prevDelay = 0;
|
16920 |
each(refs, (ref, i) => {
|
17309 |
}
|
17310 |
})(to);
|
17311 |
} else {
|
17312 |
+
animating = Promise.resolve(to(animate, target.stop.bind(target)));
|
17313 |
+
}
|
17314 |
|
17315 |
await Promise.all([animating.then(preventBail), bailPromise]);
|
17316 |
result = getFinishedResult(target.get(), true, false);
|
17539 |
const from = anim.fromValues[i];
|
17540 |
const v0 = node.v0 != null ? node.v0 : node.v0 = react_spring_shared_esm_is.arr(config.velocity) ? config.velocity[i] : config.velocity;
|
17541 |
let velocity;
|
17542 |
+
const precision = config.precision || (from == to ? 0.005 : Math.min(1, Math.abs(to - from) * 0.001));
|
17543 |
|
17544 |
if (!react_spring_shared_esm_is.und(config.duration)) {
|
17545 |
let p = 1;
|
17563 |
velocity = (position - node.lastPosition) / dt;
|
17564 |
finished = p == 1;
|
17565 |
} else if (config.decay) {
|
17566 |
+
const decay = config.decay === true ? 0.998 : config.decay;
|
17567 |
+
const e = Math.exp(-(1 - decay) * elapsed);
|
17568 |
+
position = from + v0 / (1 - decay) * (1 - e);
|
17569 |
+
finished = Math.abs(node.lastPosition - position) <= precision;
|
17570 |
+
velocity = v0 * e;
|
17571 |
+
} else {
|
17572 |
+
velocity = node.lastVelocity == null ? v0 : node.lastVelocity;
|
17573 |
+
const restVelocity = config.restVelocity || precision / 10;
|
17574 |
+
const bounceFactor = config.clamp ? 0 : config.bounce;
|
17575 |
+
const canBounce = !react_spring_shared_esm_is.und(bounceFactor);
|
17576 |
+
const isGrowing = from == to ? node.v0 > 0 : from < to;
|
17577 |
+
let isMoving;
|
17578 |
+
let isBouncing = false;
|
17579 |
+
const step = 1;
|
17580 |
+
const numSteps = Math.ceil(dt / step);
|
17581 |
+
|
17582 |
+
for (let n = 0; n < numSteps; ++n) {
|
17583 |
+
isMoving = Math.abs(velocity) > restVelocity;
|
17584 |
+
|
17585 |
+
if (!isMoving) {
|
17586 |
+
finished = Math.abs(to - position) <= precision;
|
17587 |
+
|
17588 |
+
if (finished) {
|
17589 |
+
break;
|
17590 |
+
}
|
17591 |
+
}
|
|
|
|
|
|
|
|
|
17592 |
|
17593 |
+
if (canBounce) {
|
17594 |
+
isBouncing = position == to || position > to == isGrowing;
|
|
|
|
|
|
|
17595 |
|
17596 |
+
if (isBouncing) {
|
17597 |
+
velocity = -velocity * bounceFactor;
|
17598 |
+
position = to;
|
|
|
|
|
17599 |
}
|
17600 |
}
|
17601 |
|
17602 |
+
const springForce = -config.tension * 0.000001 * (position - to);
|
17603 |
+
const dampingForce = -config.friction * 0.001 * velocity;
|
17604 |
+
const acceleration = (springForce + dampingForce) / config.mass;
|
17605 |
+
velocity = velocity + acceleration * step;
|
17606 |
+
position = position + velocity * step;
|
17607 |
+
}
|
17608 |
+
}
|
17609 |
+
|
17610 |
node.lastVelocity = velocity;
|
17611 |
|
17612 |
if (Number.isNaN(position)) {
|
17773 |
if (!react_spring_shared_esm_is.und(from)) {
|
17774 |
this._set(from);
|
17775 |
} else if (!getAnimated(this)) {
|
17776 |
+
this._set(to);
|
17777 |
+
}
|
17778 |
}
|
17779 |
|
17780 |
return range;
|
17947 |
if (anim.changed && !reset) {
|
17948 |
started = true;
|
17949 |
} else if (!started) {
|
17950 |
+
this._stop(prevTo);
|
17951 |
+
}
|
17952 |
}
|
17953 |
|
17954 |
if (!hasAsyncTo) {
|
17982 |
if (reset) {
|
17983 |
callProp(defaultProps.onRest, result);
|
17984 |
} else {
|
17985 |
+
anim.onStart == null ? void 0 : anim.onStart(result, this);
|
17986 |
+
}
|
17987 |
});
|
17988 |
}
|
17989 |
}
|
17995 |
if (hasAsyncTo) {
|
17996 |
resolve(runAsync(props.to, props, this._state, this));
|
17997 |
} else if (started) {
|
17998 |
+
this._start();
|
17999 |
+
} else if (isAnimating(this) && !hasToChanged) {
|
18000 |
+
this._pendingCalls.add(resolve);
|
18001 |
+
} else {
|
18002 |
+
resolve(getNoopResult(value));
|
18003 |
+
}
|
18004 |
}
|
18005 |
|
18006 |
_focus(value) {
|
18430 |
defaults.onRest = undefined;
|
18431 |
}
|
18432 |
} else {
|
18433 |
+
react_spring_shared_esm_each(BATCHED_EVENTS, key => {
|
18434 |
+
const handler = props[key];
|
18435 |
+
|
18436 |
+
if (react_spring_shared_esm_is.fun(handler)) {
|
18437 |
+
const queue = ctrl['_events'][key];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18438 |
|
18439 |
+
props[key] = ({
|
18440 |
+
finished,
|
18441 |
+
cancelled
|
18442 |
+
}) => {
|
18443 |
+
const result = queue.get(handler);
|
18444 |
+
|
18445 |
+
if (result) {
|
18446 |
+
if (!finished) result.finished = false;
|
18447 |
+
if (cancelled) result.cancelled = true;
|
18448 |
+
} else {
|
18449 |
+
queue.set(handler, {
|
18450 |
+
value: null,
|
18451 |
+
finished: finished || false,
|
18452 |
+
cancelled: cancelled || false
|
18453 |
+
});
|
18454 |
}
|
18455 |
+
};
|
18456 |
+
|
18457 |
+
if (defaults) {
|
18458 |
+
defaults[key] = props[key];
|
18459 |
}
|
18460 |
+
}
|
18461 |
+
});
|
18462 |
+
}
|
18463 |
|
18464 |
const state = ctrl['_state'];
|
18465 |
|
18467 |
state.paused = props.pause;
|
18468 |
flushCalls(props.pause ? state.pauseQueue : state.resumeQueue);
|
18469 |
} else if (state.paused) {
|
18470 |
+
props.pause = true;
|
18471 |
+
}
|
18472 |
|
18473 |
const promises = (keys || Object.keys(ctrl.springs)).map(key => ctrl.springs[key].start(props));
|
18474 |
const cancel = props.cancel === true || getDefaultProp(props, 'cancel') === true;
|
18760 |
const context = (0,external_React_.useContext)(SpringContext);
|
18761 |
const prevContext = react_spring_shared_esm_usePrev(context);
|
18762 |
const hasContext = context !== prevContext && hasProps(context);
|
18763 |
+
react_spring_shared_esm_useIsomorphicLayoutEffect(() => {
|
18764 |
layoutId.current++;
|
18765 |
state.ctrls = ctrls.current;
|
18766 |
const {
|
18825 |
return props;
|
18826 |
}, deps || [{}]);
|
18827 |
const ref = (_passedRef = passedRef) != null ? _passedRef : result[1];
|
18828 |
+
useIsomorphicLayoutEffect(() => {
|
18829 |
each(ref.current, (ctrl, i) => {
|
18830 |
const parent = ref.current[i + (reverse ? 1 : -1)];
|
18831 |
|
18899 |
const transitions = [];
|
18900 |
const usedTransitions = useRef(null);
|
18901 |
const prevTransitions = reset ? null : usedTransitions.current;
|
18902 |
+
useIsomorphicLayoutEffect(() => {
|
18903 |
usedTransitions.current = transitions;
|
18904 |
});
|
18905 |
useOnce(() => {
|
18906 |
+
each(transitions, t => {
|
18907 |
+
ref == null ? void 0 : ref.add(t.ctrl);
|
18908 |
+
t.ctrl.ref = ref;
|
|
|
|
|
|
|
|
|
|
|
|
|
18909 |
});
|
18910 |
return () => {
|
18911 |
each(usedTransitions.current, t => {
|
18920 |
});
|
18921 |
const keys = getKeys(items, propsFn ? propsFn() : props, prevTransitions);
|
18922 |
const expired = reset && usedTransitions.current || [];
|
18923 |
+
useIsomorphicLayoutEffect(() => each(expired, ({
|
18924 |
ctrl,
|
18925 |
item,
|
18926 |
key
|
19094 |
const context = useContext(SpringContext);
|
19095 |
const prevContext = usePrev(context);
|
19096 |
const hasContext = context !== prevContext && hasProps(context);
|
19097 |
+
useIsomorphicLayoutEffect(() => {
|
19098 |
if (hasContext) {
|
19099 |
each(transitions, t => {
|
19100 |
t.ctrl.start({
|
19109 |
transitions.splice(ind, 1);
|
19110 |
}
|
19111 |
});
|
19112 |
+
useIsomorphicLayoutEffect(() => {
|
19113 |
each(exitingTransitions.current.size ? exitingTransitions.current : changes, ({
|
19114 |
phase,
|
19115 |
payload
|
19129 |
if (payload) {
|
19130 |
replaceRef(ctrl, payload.ref);
|
19131 |
|
19132 |
+
if ((ctrl.ref || ref) && !forceChange.current) {
|
19133 |
ctrl.update(payload);
|
19134 |
} else {
|
19135 |
ctrl.start(payload);
|
19309 |
this._start();
|
19310 |
}
|
19311 |
} else if (event.type == 'idle') {
|
19312 |
+
this._active.delete(event.parent);
|
19313 |
+
} else if (event.type == 'priority') {
|
19314 |
+
this.priority = react_spring_shared_esm_toArray(this.source).reduce((highest, parent) => Math.max(highest, (isFrameValue(parent) ? parent.priority : 0) + 1), 0);
|
19315 |
+
}
|
19316 |
}
|
19317 |
|
19318 |
}
|
19351 |
|
19352 |
;// CONCATENATED MODULE: external "ReactDOM"
|
19353 |
const external_ReactDOM_namespaceObject = window["ReactDOM"];
|
19354 |
+
;// CONCATENATED MODULE: ./node_modules/@react-spring/web/dist/react-spring-web.esm.js
|
19355 |
|
19356 |
|
19357 |
|
21921 |
function onKeyDown(event) {
|
21922 |
const {
|
21923 |
keyCode,
|
21924 |
+
target,
|
21925 |
+
shiftKey,
|
21926 |
+
ctrlKey,
|
21927 |
+
altKey,
|
21928 |
+
metaKey
|
21929 |
} = event;
|
21930 |
const isUp = keyCode === external_wp_keycodes_namespaceObject.UP;
|
21931 |
const isDown = keyCode === external_wp_keycodes_namespaceObject.DOWN;
|
21935 |
const isHorizontal = isLeft || isRight;
|
21936 |
const isVertical = isUp || isDown;
|
21937 |
const isNav = isHorizontal || isVertical;
|
21938 |
+
const hasModifier = shiftKey || ctrlKey || altKey || metaKey;
|
|
|
21939 |
const isNavEdge = isVertical ? external_wp_dom_namespaceObject.isVerticalEdge : external_wp_dom_namespaceObject.isHorizontalEdge;
|
21940 |
const {
|
21941 |
ownerDocument
|
21960 |
return;
|
21961 |
}
|
21962 |
|
21963 |
+
if (shiftKey) {
|
21964 |
return;
|
21965 |
}
|
21966 |
|
22011 |
keepCaretInsideBlock
|
22012 |
} = getSettings();
|
22013 |
|
22014 |
+
if (shiftKey) {
|
22015 |
if (isClosestTabbableABlock(target, isReverse) && isNavEdge(target, isReverse)) {
|
22016 |
node.contentEditable = true; // Firefox doesn't automatically move focus.
|
22017 |
|
22018 |
node.focus();
|
22019 |
}
|
22020 |
+
} else if (isVertical && (0,external_wp_dom_namespaceObject.isVerticalEdge)(target, isReverse) && ( // When Alt is pressed, only intercept if the caret is also at
|
22021 |
+
// the horizontal edge.
|
22022 |
+
altKey ? (0,external_wp_dom_namespaceObject.isHorizontalEdge)(target, isReverseDir) : true) && !keepCaretInsideBlock) {
|
22023 |
const closestTabbable = getClosestTabbable(target, isReverse, node, true);
|
22024 |
|
22025 |
if (closestTabbable) {
|
22026 |
+
(0,external_wp_dom_namespaceObject.placeCaretAtVerticalEdge)(closestTabbable, // When Alt is pressed, place the caret at the furthest
|
22027 |
+
// horizontal edge and the furthest vertical edge.
|
22028 |
+
altKey ? !isReverse : isReverse, altKey ? undefined : verticalRect);
|
22029 |
event.preventDefault();
|
22030 |
}
|
22031 |
} else if (isHorizontal && defaultView.getSelection().isCollapsed && (0,external_wp_dom_namespaceObject.isHorizontalEdge)(target, isReverseDir) && !keepCaretInsideBlock) {
|
23001 |
|
23002 |
/* harmony default export */ const iframe = ((0,external_wp_element_namespaceObject.forwardRef)(Iframe));
|
23003 |
|
23004 |
+
;// CONCATENATED MODULE: ./node_modules/colord/index.mjs
|
23005 |
var r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},n=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*r)/n+0},e=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),r>n?n:r>t?r:t},u=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},a=function(r){return{r:e(r.r,0,255),g:e(r.g,0,255),b:e(r.b,0,255),a:e(r.a)}},o=function(r){return{r:n(r.r),g:n(r.g),b:n(r.b),a:n(r.a,3)}},i=/^#([0-9a-f]{3,8})$/i,s=function(r){var t=r.toString(16);return t.length<2?"0"+t:t},h=function(r){var t=r.r,n=r.g,e=r.b,u=r.a,a=Math.max(t,n,e),o=a-Math.min(t,n,e),i=o?a===t?(n-e)/o:a===n?2+(e-t)/o:4+(t-n)/o:0;return{h:60*(i<0?i+6:i),s:a?o/a*100:0,v:a/255*100,a:u}},b=function(r){var t=r.h,n=r.s,e=r.v,u=r.a;t=t/360*6,n/=100,e/=100;var a=Math.floor(t),o=e*(1-n),i=e*(1-(t-a)*n),s=e*(1-(1-t+a)*n),h=a%6;return{r:255*[e,i,o,o,s,e][h],g:255*[s,e,e,i,o,o][h],b:255*[o,o,s,e,e,i][h],a:u}},g=function(r){return{h:u(r.h),s:e(r.s,0,100),l:e(r.l,0,100),a:e(r.a)}},d=function(r){return{h:n(r.h),s:n(r.s),l:n(r.l),a:n(r.a,3)}},f=function(r){return b((n=(t=r).s,{h:t.h,s:(n*=((e=t.l)<50?e:100-e)/100)>0?2*n/(e+n)*100:0,v:e+n,a:t.a}));var t,n,e},c=function(r){return{h:(t=h(r)).h,s:(u=(200-(n=t.s))*(e=t.v)/100)>0&&u<200?n*e/100/(u<=100?u:200-u)*100:0,l:u/2,a:t.a};var t,n,e,u},l=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,p=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,v=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,m=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y={string:[[function(r){var t=i.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:4===r.length?n(parseInt(r[3]+r[3],16)/255,2):1}:6===r.length||8===r.length?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:8===r.length?n(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var t=v.exec(r)||m.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:a({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(t){var n=l.exec(t)||p.exec(t);if(!n)return null;var e,u,a=g({h:(e=n[1],u=n[2],void 0===u&&(u="deg"),Number(e)*(r[u]||1)),s:Number(n[3]),l:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)});return f(a)},"hsl"]],object:[[function(r){var n=r.r,e=r.g,u=r.b,o=r.a,i=void 0===o?1:o;return t(n)&&t(e)&&t(u)?a({r:Number(n),g:Number(e),b:Number(u),a:Number(i)}):null},"rgb"],[function(r){var n=r.h,e=r.s,u=r.l,a=r.a,o=void 0===a?1:a;if(!t(n)||!t(e)||!t(u))return null;var i=g({h:Number(n),s:Number(e),l:Number(u),a:Number(o)});return f(i)},"hsl"],[function(r){var n=r.h,a=r.s,o=r.v,i=r.a,s=void 0===i?1:i;if(!t(n)||!t(a)||!t(o))return null;var h=function(r){return{h:u(r.h),s:e(r.s,0,100),v:e(r.v,0,100),a:e(r.a)}}({h:Number(n),s:Number(a),v:Number(o),a:Number(s)});return b(h)},"hsv"]]},N=function(r,t){for(var n=0;n<t.length;n++){var e=t[n][0](r);if(e)return[e,t[n][1]]}return[null,void 0]},x=function(r){return"string"==typeof r?N(r.trim(),y.string):"object"==typeof r&&null!==r?N(r,y.object):[null,void 0]},I=function(r){return x(r)[1]},M=function(r,t){var n=c(r);return{h:n.h,s:e(n.s+100*t,0,100),l:n.l,a:n.a}},H=function(r){return(299*r.r+587*r.g+114*r.b)/1e3/255},$=function(r,t){var n=c(r);return{h:n.h,s:n.s,l:e(n.l+100*t,0,100),a:n.a}},j=function(){function r(r){this.parsed=x(r)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return r.prototype.isValid=function(){return null!==this.parsed},r.prototype.brightness=function(){return n(H(this.rgba),2)},r.prototype.isDark=function(){return H(this.rgba)<.5},r.prototype.isLight=function(){return H(this.rgba)>=.5},r.prototype.toHex=function(){return r=o(this.rgba),t=r.r,e=r.g,u=r.b,i=(a=r.a)<1?s(n(255*a)):"","#"+s(t)+s(e)+s(u)+i;var r,t,e,u,a,i},r.prototype.toRgb=function(){return o(this.rgba)},r.prototype.toRgbString=function(){return r=o(this.rgba),t=r.r,n=r.g,e=r.b,(u=r.a)<1?"rgba("+t+", "+n+", "+e+", "+u+")":"rgb("+t+", "+n+", "+e+")";var r,t,n,e,u},r.prototype.toHsl=function(){return d(c(this.rgba))},r.prototype.toHslString=function(){return r=d(c(this.rgba)),t=r.h,n=r.s,e=r.l,(u=r.a)<1?"hsla("+t+", "+n+"%, "+e+"%, "+u+")":"hsl("+t+", "+n+"%, "+e+"%)";var r,t,n,e,u},r.prototype.toHsv=function(){return r=h(this.rgba),{h:n(r.h),s:n(r.s),v:n(r.v),a:n(r.a,3)};var r},r.prototype.invert=function(){return w({r:255-(r=this.rgba).r,g:255-r.g,b:255-r.b,a:r.a});var r},r.prototype.saturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,r))},r.prototype.desaturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,-r))},r.prototype.grayscale=function(){return w(M(this.rgba,-1))},r.prototype.lighten=function(r){return void 0===r&&(r=.1),w($(this.rgba,r))},r.prototype.darken=function(r){return void 0===r&&(r=.1),w($(this.rgba,-r))},r.prototype.rotate=function(r){return void 0===r&&(r=15),this.hue(this.hue()+r)},r.prototype.alpha=function(r){return"number"==typeof r?w({r:(t=this.rgba).r,g:t.g,b:t.b,a:r}):n(this.rgba.a,3);var t},r.prototype.hue=function(r){var t=c(this.rgba);return"number"==typeof r?w({h:r,s:t.s,l:t.l,a:t.a}):n(t.h)},r.prototype.isEqual=function(r){return this.toHex()===w(r).toHex()},r}(),w=function(r){return r instanceof j?r:new j(r)},S=[],k=function(r){r.forEach(function(r){S.indexOf(r)<0&&(r(j,y),S.push(r))})},E=function(){return new j({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})};
|
23006 |
|
23007 |
+
;// CONCATENATED MODULE: ./node_modules/colord/plugins/names.mjs
|
23008 |
/* harmony default export */ function names(e,f){var a={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var d in a)r[a[d]]=d;var l={};e.prototype.toName=function(f){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var d,i,n=r[this.toHex()];if(n)return n;if(null==f?void 0:f.closest){var o=this.toRgb(),t=1/0,b="black";if(!l.length)for(var c in a)l[c]=new e(a[c]).toRgb();for(var g in a){var u=(d=o,i=l[g],Math.pow(d.r-i.r,2)+Math.pow(d.g-i.g,2)+Math.pow(d.b-i.b,2));u<t&&(t=u,b=g)}return b}};f.string.push([function(f){var r=f.toLowerCase(),d="transparent"===r?"#0000":a[r];return d?new e(d).toRgb():null},"name"])}
|
23009 |
|
23010 |
+
;// CONCATENATED MODULE: ./node_modules/colord/plugins/a11y.mjs
|
23011 |
var a11y_o=function(o){var t=o/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},a11y_t=function(t){return.2126*a11y_o(t.r)+.7152*a11y_o(t.g)+.0722*a11y_o(t.b)};/* harmony default export */ function a11y(o){o.prototype.luminance=function(){return o=a11y_t(this.rgba),void 0===(r=2)&&(r=0),void 0===n&&(n=Math.pow(10,r)),Math.round(n*o)/n+0;var o,r,n},o.prototype.contrast=function(r){void 0===r&&(r="#FFF");var n,a,i,e,v,u,d,c=r instanceof o?r:new o(r);return e=this.rgba,v=c.toRgb(),u=a11y_t(e),d=a11y_t(v),n=u>d?(u+.05)/(d+.05):(d+.05)/(u+.05),void 0===(a=2)&&(a=0),void 0===i&&(i=Math.pow(10,a)),Math.floor(i*n)/i+0},o.prototype.isReadable=function(o,t){return void 0===o&&(o="#FFF"),void 0===t&&(t={}),this.contrast(o)>=(e=void 0===(i=(r=t).size)?"normal":i,"AAA"===(a=void 0===(n=r.level)?"AA":n)&&"normal"===e?7:"AA"===a&&"large"===e?3:4.5);var r,n,a,i,e}}
|
23012 |
|
23013 |
// EXTERNAL MODULE: ./node_modules/traverse/index.js
|
25520 |
return items.filter(item => !item.category);
|
25521 |
}, [items]);
|
25522 |
const itemsPerCategory = (0,external_wp_element_namespaceObject.useMemo)(() => {
|
25523 |
+
return (0,external_wp_compose_namespaceObject.pipe)(itemList => itemList.filter(item => item.category && item.category !== 'reusable'), itemList => (0,external_lodash_namespaceObject.groupBy)(itemList, 'category'))(items);
|
25524 |
}, [items]);
|
25525 |
const itemsPerCollection = (0,external_wp_element_namespaceObject.useMemo)(() => {
|
25526 |
// Create a new Object to avoid mutating collection.
|
26057 |
|
26058 |
/* harmony default export */ const use_insertion_point = (useInsertionPoint);
|
26059 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26060 |
// EXTERNAL MODULE: ./node_modules/remove-accents/index.js
|
26061 |
var remove_accents = __webpack_require__(4793);
|
26062 |
var remove_accents_default = /*#__PURE__*/__webpack_require__.n(remove_accents);
|
26065 |
* External dependencies
|
26066 |
*/
|
26067 |
|
|
|
26068 |
// Default search helpers.
|
26069 |
|
26070 |
const defaultGetName = item => item.name || '';
|
26100 |
input = input.toLowerCase();
|
26101 |
return input;
|
26102 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26103 |
/**
|
26104 |
* Converts the search term into a list of normalized terms.
|
26105 |
*
|
26111 |
|
26112 |
const getNormalizedSearchTerms = function () {
|
26113 |
let input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
26114 |
+
return (0,external_lodash_namespaceObject.words)(normalizeSearchInput(input));
|
26115 |
};
|
26116 |
|
26117 |
const removeMatchingTerms = (unmatchedTerms, unprocessedTerms) => {
|
26217 |
rank += 20;
|
26218 |
} else {
|
26219 |
const terms = [name, title, description, ...keywords, category, collection].join(' ');
|
26220 |
+
const normalizedSearchTerms = (0,external_lodash_namespaceObject.words)(normalizedSearchInput);
|
26221 |
const unmatchedTerms = removeMatchingTerms(normalizedSearchTerms, terms);
|
26222 |
|
26223 |
if (unmatchedTerms.length === 0) {
|
27986 |
|
27987 |
previousElement.ownerDocument.defaultView.addEventListener('resize', forcePopoverRecompute);
|
27988 |
return () => {
|
27989 |
+
var _previousElement$owne;
|
27990 |
+
|
27991 |
+
(_previousElement$owne = previousElement.ownerDocument.defaultView) === null || _previousElement$owne === void 0 ? void 0 : _previousElement$owne.removeEventListener('resize', forcePopoverRecompute);
|
27992 |
};
|
27993 |
}, [previousElement]); // If there's either a previous or a next element, show the inbetween popover.
|
27994 |
// Note that drag and drop uses the inbetween popover to show the drop indicator
|
28331 |
}
|
28332 |
|
28333 |
const orientation = ((_getBlockListSettings = getBlockListSettings(rootClientId)) === null || _getBlockListSettings === void 0 ? void 0 : _getBlockListSettings.orientation) || 'vertical';
|
28334 |
+
const offsetTop = event.clientY;
|
28335 |
+
const offsetLeft = event.clientX;
|
|
|
28336 |
const children = Array.from(event.target.children);
|
28337 |
let element = children.find(blockEl => {
|
28338 |
+
const blockElRect = blockEl.getBoundingClientRect();
|
28339 |
+
return blockEl.classList.contains('wp-block') && orientation === 'vertical' && blockElRect.top > offsetTop || blockEl.classList.contains('wp-block') && orientation === 'horizontal' && blockElRect.left > offsetLeft;
|
28340 |
});
|
28341 |
|
28342 |
if (!element) {
|
28800 |
|
28801 |
if (!isDraggable) {
|
28802 |
return children({
|
28803 |
+
draggable: false
|
28804 |
});
|
28805 |
}
|
28806 |
|
30072 |
onClick: () => selectBlock(firstParentClientId),
|
30073 |
label: (0,external_wp_i18n_namespaceObject.sprintf)(
|
30074 |
/* translators: %s: Name of the block's parent. */
|
30075 |
+
(0,external_wp_i18n_namespaceObject.__)('Select %s'), blockInformation === null || blockInformation === void 0 ? void 0 : blockInformation.title),
|
30076 |
showTooltip: true,
|
30077 |
icon: (0,external_wp_element_namespaceObject.createElement)(block_icon, {
|
30078 |
+
icon: blockInformation === null || blockInformation === void 0 ? void 0 : blockInformation.icon
|
30079 |
})
|
30080 |
}));
|
30081 |
}
|
32376 |
blocks: blocks,
|
32377 |
onCopy: onCopy
|
32378 |
}), canDuplicate && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
|
32379 |
+
onClick: (0,external_wp_compose_namespaceObject.pipe)(onClose, onDuplicate, updateSelectionAfterDuplicate),
|
32380 |
shortcut: shortcuts.duplicate
|
32381 |
}, (0,external_wp_i18n_namespaceObject.__)('Duplicate')), canInsertDefaultBlock && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
|
32382 |
+
onClick: (0,external_wp_compose_namespaceObject.pipe)(onClose, onInsertBefore),
|
32383 |
shortcut: shortcuts.insertBefore
|
32384 |
}, (0,external_wp_i18n_namespaceObject.__)('Insert before')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
|
32385 |
+
onClick: (0,external_wp_compose_namespaceObject.pipe)(onClose, onInsertAfter),
|
32386 |
shortcut: shortcuts.insertAfter
|
32387 |
}, (0,external_wp_i18n_namespaceObject.__)('Insert after'))), canMove && !onlyBlock && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
|
32388 |
+
onClick: (0,external_wp_compose_namespaceObject.pipe)(onClose, onMoveTo)
|
32389 |
}, (0,external_wp_i18n_namespaceObject.__)('Move to')), count === 1 && (0,external_wp_element_namespaceObject.createElement)(block_mode_toggle, {
|
32390 |
clientId: firstBlockClientId,
|
32391 |
onToggle: onClose
|
32400 |
}) : external_wp_element_namespaceObject.Children.map(child => (0,external_wp_element_namespaceObject.cloneElement)(child, {
|
32401 |
onClose
|
32402 |
})), canRemove && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
|
32403 |
+
onClick: (0,external_wp_compose_namespaceObject.pipe)(onClose, onRemove, updateSelectionAfterRemove),
|
32404 |
shortcut: shortcuts.remove
|
32405 |
}, removeBlockLabel)));
|
32406 |
});
|
32936 |
*/
|
32937 |
|
32938 |
|
32939 |
+
|
32940 |
+
const COMMON_PROPS = {
|
32941 |
+
placement: 'top-start'
|
32942 |
+
}; // By default the toolbar sets the `shift` prop. If the user scrolls the page
|
32943 |
// down the toolbar will stay on screen by adopting a sticky position at the
|
32944 |
// top of the viewport.
|
32945 |
|
32946 |
+
const use_block_toolbar_popover_props_DEFAULT_PROPS = { ...COMMON_PROPS,
|
32947 |
flip: false,
|
32948 |
shift: true
|
32949 |
}; // When there isn't enough height between the top of the block and the editor
|
32952 |
// the block. This only happens if the block is smaller than the viewport, as
|
32953 |
// otherwise the toolbar will be off-screen.
|
32954 |
|
32955 |
+
const RESTRICTED_HEIGHT_PROPS = { ...COMMON_PROPS,
|
32956 |
flip: true,
|
32957 |
shift: false
|
32958 |
};
|
33622 |
|
33623 |
|
33624 |
|
33625 |
+
|
33626 |
/**
|
33627 |
* Internal dependencies
|
33628 |
*/
|
33666 |
* @param {number} targetBlockIndex The index where the block(s) will be inserted.
|
33667 |
* @param {Function} getBlockIndex A function that gets the index of a block.
|
33668 |
* @param {Function} getClientIdsOfDescendants A function that gets the client ids of descendant blocks.
|
33669 |
+
* @param {Function} moveBlocks A function that moves blocks.
|
33670 |
+
* @param {Function} insertOrReplaceBlocks A function that inserts or replaces blocks.
|
33671 |
* @param {Function} clearSelectedBlock A function that clears block selection.
|
33672 |
* @return {Function} The event handler for a block drop event.
|
33673 |
*/
|
33674 |
|
33675 |
+
function onBlockDrop(targetRootClientId, targetBlockIndex, getBlockIndex, getClientIdsOfDescendants, moveBlocks, insertOrReplaceBlocks, clearSelectedBlock) {
|
33676 |
return event => {
|
33677 |
const {
|
33678 |
srcRootClientId: sourceRootClientId,
|
33684 |
if (dropType === 'inserter') {
|
33685 |
clearSelectedBlock();
|
33686 |
const blocksToInsert = blocks.map(block => (0,external_wp_blocks_namespaceObject.cloneBlock)(block));
|
33687 |
+
insertOrReplaceBlocks(blocksToInsert, true, null);
|
33688 |
} // If the user is moving a block.
|
33689 |
|
33690 |
|
33708 |
// were removed from the block list above the insertion point.
|
33709 |
|
33710 |
const insertIndex = isAtSameLevel && sourceBlockIndex < targetBlockIndex ? targetBlockIndex - draggedBlockCount : targetBlockIndex;
|
33711 |
+
moveBlocks(sourceClientIds, sourceRootClientId, insertIndex);
|
33712 |
}
|
33713 |
};
|
33714 |
}
|
33720 |
* @param {boolean} hasUploadPermissions Whether the user has upload permissions.
|
33721 |
* @param {Function} updateBlockAttributes A function that updates a block's attributes.
|
33722 |
* @param {Function} canInsertBlockType A function that returns checks whether a block type can be inserted.
|
33723 |
+
* @param {Function} insertOrReplaceBlocks A function that inserts or replaces blocks.
|
33724 |
*
|
33725 |
* @return {Function} The event handler for a block-related file drop event.
|
33726 |
*/
|
33727 |
|
33728 |
+
function onFilesDrop(targetRootClientId, targetBlockIndex, hasUploadPermissions, updateBlockAttributes, canInsertBlockType, insertOrReplaceBlocks) {
|
33729 |
return files => {
|
33730 |
if (!hasUploadPermissions) {
|
33731 |
return;
|
33735 |
|
33736 |
if (transformation) {
|
33737 |
const blocks = transformation.transform(files, updateBlockAttributes);
|
33738 |
+
insertOrReplaceBlocks(blocks);
|
33739 |
}
|
33740 |
};
|
33741 |
}
|
33742 |
/**
|
33743 |
* A function that returns an event handler function for block-related HTML drop events.
|
33744 |
*
|
33745 |
+
* @param {string} targetRootClientId The root client id where the block(s) will be inserted.
|
33746 |
+
* @param {number} targetBlockIndex The index where the block(s) will be inserted.
|
33747 |
+
* @param {Function} insertOrReplaceBlocks A function that inserts or replaces blocks.
|
33748 |
*
|
33749 |
* @return {Function} The event handler for a block-related HTML drop event.
|
33750 |
*/
|
33751 |
|
33752 |
+
function onHTMLDrop(targetRootClientId, targetBlockIndex, insertOrReplaceBlocks) {
|
33753 |
return HTML => {
|
33754 |
const blocks = (0,external_wp_blocks_namespaceObject.pasteHandler)({
|
33755 |
HTML,
|
33757 |
});
|
33758 |
|
33759 |
if (blocks.length) {
|
33760 |
+
insertOrReplaceBlocks(blocks);
|
33761 |
}
|
33762 |
};
|
33763 |
}
|
33764 |
/**
|
33765 |
* A React hook for handling block drop events.
|
33766 |
*
|
33767 |
+
* @typedef {'insert'|'replace'} DropAction The type of action to perform on drop.
|
33768 |
+
*
|
33769 |
+
* @param {string} targetRootClientId The root client id where the block(s) will be inserted.
|
33770 |
+
* @param {number} targetBlockIndex The index where the block(s) will be inserted.
|
33771 |
+
* @param {Object} options The optional options.
|
33772 |
+
* @param {DropAction} options.action The type of action to perform on drop. Could be `insert` or `replace` for now.
|
33773 |
*
|
33774 |
* @return {Object} An object that contains the event handlers `onDrop`, `onFilesDrop` and `onHTMLDrop`.
|
33775 |
*/
|
33776 |
|
33777 |
function useOnBlockDrop(targetRootClientId, targetBlockIndex) {
|
33778 |
+
let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
33779 |
+
const {
|
33780 |
+
action = 'insert'
|
33781 |
+
} = options;
|
33782 |
const hasUploadPermissions = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).getSettings().mediaUpload, []);
|
33783 |
const {
|
33784 |
canInsertBlockType,
|
33785 |
getBlockIndex,
|
33786 |
+
getClientIdsOfDescendants,
|
33787 |
+
getBlockOrder,
|
33788 |
+
getBlocksByClientId
|
33789 |
} = (0,external_wp_data_namespaceObject.useSelect)(store);
|
33790 |
const {
|
33791 |
insertBlocks,
|
33792 |
moveBlocksToPosition,
|
33793 |
updateBlockAttributes,
|
33794 |
+
clearSelectedBlock,
|
33795 |
+
replaceBlocks,
|
33796 |
+
removeBlocks
|
33797 |
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
|
33798 |
+
const registry = (0,external_wp_data_namespaceObject.useRegistry)();
|
33799 |
+
const insertOrReplaceBlocks = (0,external_wp_element_namespaceObject.useCallback)(function (blocks) {
|
33800 |
+
let updateSelection = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
33801 |
+
let initialPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
33802 |
+
|
33803 |
+
if (action === 'replace') {
|
33804 |
+
const clientIds = getBlockOrder(targetRootClientId);
|
33805 |
+
const clientId = clientIds[targetBlockIndex];
|
33806 |
+
replaceBlocks(clientId, blocks, undefined, initialPosition);
|
33807 |
+
} else {
|
33808 |
+
insertBlocks(blocks, targetBlockIndex, targetRootClientId, updateSelection, initialPosition);
|
33809 |
+
}
|
33810 |
+
}, [action, getBlockOrder, insertBlocks, replaceBlocks, targetBlockIndex, targetRootClientId]);
|
33811 |
+
const moveBlocks = (0,external_wp_element_namespaceObject.useCallback)((sourceClientIds, sourceRootClientId, insertIndex) => {
|
33812 |
+
if (action === 'replace') {
|
33813 |
+
const sourceBlocks = getBlocksByClientId(sourceClientIds);
|
33814 |
+
const targetBlockClientIds = getBlockOrder(targetRootClientId);
|
33815 |
+
const targetBlockClientId = targetBlockClientIds[targetBlockIndex];
|
33816 |
+
registry.batch(() => {
|
33817 |
+
// Remove the source blocks.
|
33818 |
+
removeBlocks(sourceClientIds, false); // Replace the target block with the source blocks.
|
33819 |
+
|
33820 |
+
replaceBlocks(targetBlockClientId, sourceBlocks, undefined, 0);
|
33821 |
+
});
|
33822 |
+
} else {
|
33823 |
+
moveBlocksToPosition(sourceClientIds, sourceRootClientId, targetRootClientId, insertIndex);
|
33824 |
+
}
|
33825 |
+
}, [action, getBlockOrder, getBlocksByClientId, insertBlocks, moveBlocksToPosition, removeBlocks, targetBlockIndex, targetRootClientId]);
|
33826 |
|
33827 |
+
const _onDrop = onBlockDrop(targetRootClientId, targetBlockIndex, getBlockIndex, getClientIdsOfDescendants, moveBlocks, insertOrReplaceBlocks, clearSelectedBlock);
|
33828 |
|
33829 |
+
const _onFilesDrop = onFilesDrop(targetRootClientId, targetBlockIndex, hasUploadPermissions, updateBlockAttributes, canInsertBlockType, insertOrReplaceBlocks);
|
33830 |
|
33831 |
+
const _onHTMLDrop = onHTMLDrop(targetRootClientId, targetBlockIndex, insertOrReplaceBlocks);
|
33832 |
|
33833 |
return event => {
|
33834 |
const files = (0,external_wp_dom_namespaceObject.getFilesFromDataTransfer)(event.dataTransfer);
|
33990 |
});
|
33991 |
return candidateIndex;
|
33992 |
}
|
33993 |
+
/**
|
33994 |
+
* Determine if the element is an empty paragraph block.
|
33995 |
+
*
|
33996 |
+
* @param {?HTMLElement} element The element being tested.
|
33997 |
+
* @return {boolean} True or False.
|
33998 |
+
*/
|
33999 |
+
|
34000 |
+
function isEmptyParagraph(element) {
|
34001 |
+
return !!element && element.dataset.type === 'core/paragraph' && element.dataset.empty === 'true';
|
34002 |
+
}
|
34003 |
/**
|
34004 |
* @typedef {Object} WPBlockDropZoneConfig
|
34005 |
* @property {string} rootClientId The root client id for the block list.
|
34011 |
* @param {WPBlockDropZoneConfig} dropZoneConfig configuration data for the drop zone.
|
34012 |
*/
|
34013 |
|
34014 |
+
|
34015 |
function useBlockDropZone() {
|
34016 |
let {
|
34017 |
// An undefined value represents a top-level block. Default to an empty
|
34049 |
}, (_getBlockListSettings = getBlockListSettings(targetRootClientId)) === null || _getBlockListSettings === void 0 ? void 0 : _getBlockListSettings.orientation);
|
34050 |
setTargetBlockIndex(targetIndex === undefined ? 0 : targetIndex);
|
34051 |
|
34052 |
+
if (targetIndex !== undefined) {
|
34053 |
+
const nextBlock = blockElements[targetIndex];
|
34054 |
+
const previousBlock = blockElements[targetIndex - 1]; // Don't show the insertion point when it's near an empty paragraph block.
|
34055 |
+
|
34056 |
+
if (isEmptyParagraph(nextBlock) || isEmptyParagraph(previousBlock)) {
|
34057 |
+
return;
|
34058 |
+
}
|
34059 |
+
|
34060 |
showInsertionPoint(targetRootClientId, targetIndex);
|
34061 |
}
|
34062 |
}, []), 200);
|
39355 |
|
39356 |
const layoutBlockSupportKey = '__experimentalLayout';
|
39357 |
/**
|
39358 |
+
* Generates the utility classnames for the given block's layout attributes.
|
|
|
|
|
|
|
|
|
|
|
39359 |
*
|
39360 |
+
* @param { Object } block Block object.
|
|
|
39361 |
*
|
39362 |
* @return { Array } Array of CSS classname strings.
|
39363 |
*/
|
39364 |
|
39365 |
+
function useLayoutClasses() {
|
39366 |
+
var _globalLayoutSettings, _globalLayoutSettings2;
|
39367 |
|
39368 |
+
let block = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
39369 |
const rootPaddingAlignment = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
39370 |
var _getSettings$__experi;
|
39371 |
|
39374 |
} = select(store);
|
39375 |
return (_getSettings$__experi = getSettings().__experimentalFeatures) === null || _getSettings$__experi === void 0 ? void 0 : _getSettings$__experi.useRootPaddingAwareAlignments;
|
39376 |
}, []);
|
39377 |
+
const globalLayoutSettings = useSetting('layout') || {};
|
39378 |
+
const {
|
39379 |
+
attributes = {},
|
39380 |
+
name
|
39381 |
+
} = block;
|
39382 |
+
const {
|
39383 |
+
layout
|
39384 |
+
} = attributes;
|
39385 |
+
const {
|
39386 |
+
default: defaultBlockLayout
|
39387 |
+
} = (0,external_wp_blocks_namespaceObject.getBlockSupport)(name, layoutBlockSupportKey) || {};
|
39388 |
+
const usedLayout = layout !== null && layout !== void 0 && layout.inherit || layout !== null && layout !== void 0 && layout.contentSize || layout !== null && layout !== void 0 && layout.wideSize ? { ...layout,
|
39389 |
+
type: 'constrained'
|
39390 |
+
} : layout || defaultBlockLayout || {};
|
39391 |
const layoutClassnames = [];
|
39392 |
|
39393 |
+
if (globalLayoutSettings !== null && globalLayoutSettings !== void 0 && (_globalLayoutSettings = globalLayoutSettings.definitions) !== null && _globalLayoutSettings !== void 0 && (_globalLayoutSettings2 = _globalLayoutSettings[(usedLayout === null || usedLayout === void 0 ? void 0 : usedLayout.type) || 'default']) !== null && _globalLayoutSettings2 !== void 0 && _globalLayoutSettings2.className) {
|
39394 |
+
var _globalLayoutSettings3, _globalLayoutSettings4;
|
39395 |
|
39396 |
+
layoutClassnames.push(globalLayoutSettings === null || globalLayoutSettings === void 0 ? void 0 : (_globalLayoutSettings3 = globalLayoutSettings.definitions) === null || _globalLayoutSettings3 === void 0 ? void 0 : (_globalLayoutSettings4 = _globalLayoutSettings3[(usedLayout === null || usedLayout === void 0 ? void 0 : usedLayout.type) || 'default']) === null || _globalLayoutSettings4 === void 0 ? void 0 : _globalLayoutSettings4.className);
|
39397 |
}
|
39398 |
|
39399 |
+
if ((usedLayout !== null && usedLayout !== void 0 && usedLayout.inherit || usedLayout !== null && usedLayout !== void 0 && usedLayout.contentSize || (usedLayout === null || usedLayout === void 0 ? void 0 : usedLayout.type) === 'constrained') && rootPaddingAlignment) {
|
39400 |
layoutClassnames.push('has-global-padding');
|
39401 |
}
|
39402 |
|
39403 |
+
if (usedLayout !== null && usedLayout !== void 0 && usedLayout.orientation) {
|
39404 |
+
layoutClassnames.push(`is-${(0,external_lodash_namespaceObject.kebabCase)(usedLayout.orientation)}`);
|
39405 |
}
|
39406 |
|
39407 |
+
if (usedLayout !== null && usedLayout !== void 0 && usedLayout.justifyContent) {
|
39408 |
+
layoutClassnames.push(`is-content-justification-${(0,external_lodash_namespaceObject.kebabCase)(usedLayout.justifyContent)}`);
|
39409 |
}
|
39410 |
|
39411 |
+
if (usedLayout !== null && usedLayout !== void 0 && usedLayout.flexWrap && usedLayout.flexWrap === 'nowrap') {
|
39412 |
layoutClassnames.push('is-nowrap');
|
39413 |
}
|
39414 |
|
39415 |
return layoutClassnames;
|
39416 |
}
|
39417 |
+
/**
|
39418 |
+
* Generates a CSS rule with the given block's layout styles.
|
39419 |
+
*
|
39420 |
+
* @param { Object } block Block object.
|
39421 |
+
* @param { string } selector A selector to use in generating the CSS rule.
|
39422 |
+
*
|
39423 |
+
* @return { string } CSS rule.
|
39424 |
+
*/
|
39425 |
+
|
39426 |
+
function useLayoutStyles() {
|
39427 |
+
var _fullLayoutType$getLa;
|
39428 |
+
|
39429 |
+
let block = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
39430 |
+
let selector = arguments.length > 1 ? arguments[1] : undefined;
|
39431 |
+
const {
|
39432 |
+
attributes = {},
|
39433 |
+
name
|
39434 |
+
} = block;
|
39435 |
+
const {
|
39436 |
+
layout = {},
|
39437 |
+
style = {}
|
39438 |
+
} = attributes; // Update type for blocks using legacy layouts.
|
39439 |
+
|
39440 |
+
const usedLayout = layout !== null && layout !== void 0 && layout.inherit || layout !== null && layout !== void 0 && layout.contentSize || layout !== null && layout !== void 0 && layout.wideSize ? { ...layout,
|
39441 |
+
type: 'constrained'
|
39442 |
+
} : layout || {};
|
39443 |
+
const fullLayoutType = getLayoutType((usedLayout === null || usedLayout === void 0 ? void 0 : usedLayout.type) || 'default');
|
39444 |
+
const globalLayoutSettings = useSetting('layout') || {};
|
39445 |
+
const blockGapSupport = useSetting('spacing.blockGap');
|
39446 |
+
const hasBlockGapSupport = blockGapSupport !== null;
|
39447 |
+
const css = fullLayoutType === null || fullLayoutType === void 0 ? void 0 : (_fullLayoutType$getLa = fullLayoutType.getLayoutStyle) === null || _fullLayoutType$getLa === void 0 ? void 0 : _fullLayoutType$getLa.call(fullLayoutType, {
|
39448 |
+
blockName: name,
|
39449 |
+
selector,
|
39450 |
+
layout,
|
39451 |
+
layoutDefinitions: globalLayoutSettings === null || globalLayoutSettings === void 0 ? void 0 : globalLayoutSettings.definitions,
|
39452 |
+
style,
|
39453 |
+
hasBlockGapSupport
|
39454 |
+
});
|
39455 |
+
return css;
|
39456 |
+
}
|
39457 |
|
39458 |
function LayoutPanel(_ref) {
|
39459 |
let {
|
39621 |
const withLayoutStyles = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(BlockListBlock => props => {
|
39622 |
const {
|
39623 |
name,
|
39624 |
+
attributes,
|
39625 |
+
block
|
39626 |
} = props;
|
39627 |
const hasLayoutBlockSupport = (0,external_wp_blocks_namespaceObject.hasBlockSupport)(name, layoutBlockSupportKey);
|
39628 |
const disableLayoutStyles = (0,external_wp_data_namespaceObject.useSelect)(select => {
|
39644 |
const usedLayout = layout !== null && layout !== void 0 && layout.inherit || layout !== null && layout !== void 0 && layout.contentSize || layout !== null && layout !== void 0 && layout.wideSize ? { ...layout,
|
39645 |
type: 'constrained'
|
39646 |
} : layout || defaultBlockLayout || {};
|
39647 |
+
const layoutClasses = hasLayoutBlockSupport ? useLayoutClasses(block) : null;
|
39648 |
const selector = `.${(0,external_wp_blocks_namespaceObject.getBlockDefaultClassName)(name)}.wp-container-${id}`;
|
39649 |
const blockGapSupport = useSetting('spacing.blockGap');
|
39650 |
const hasBlockGapSupport = blockGapSupport !== null; // Get CSS string for the current layout type.
|
39653 |
let css;
|
39654 |
|
39655 |
if (shouldRenderLayoutStyles) {
|
39656 |
+
var _fullLayoutType$getLa2;
|
39657 |
|
39658 |
const fullLayoutType = getLayoutType((usedLayout === null || usedLayout === void 0 ? void 0 : usedLayout.type) || 'default');
|
39659 |
+
css = fullLayoutType === null || fullLayoutType === void 0 ? void 0 : (_fullLayoutType$getLa2 = fullLayoutType.getLayoutStyle) === null || _fullLayoutType$getLa2 === void 0 ? void 0 : _fullLayoutType$getLa2.call(fullLayoutType, {
|
39660 |
blockName: name,
|
39661 |
selector,
|
39662 |
layout: usedLayout,
|
40204 |
|
40205 |
|
40206 |
|
40207 |
+
|
40208 |
|
40209 |
|
40210 |
|
43985 |
var extendStatics = function(d, b) {
|
43986 |
extendStatics = Object.setPrototypeOf ||
|
43987 |
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
43988 |
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
43989 |
return extendStatics(d, b);
|
43990 |
};
|
43991 |
|
44071 |
}
|
44072 |
}
|
44073 |
|
44074 |
+
var __createBinding = Object.create ? (function(o, m, k, k2) {
|
44075 |
+
if (k2 === undefined) k2 = k;
|
44076 |
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
44077 |
+
}) : (function(o, m, k, k2) {
|
44078 |
+
if (k2 === undefined) k2 = k;
|
44079 |
+
o[k2] = m[k];
|
44080 |
+
});
|
44081 |
+
|
44082 |
+
function __exportStar(m, o) {
|
44083 |
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
|
44084 |
}
|
44085 |
|
44086 |
function __values(o) {
|
44161 |
return cooked;
|
44162 |
};
|
44163 |
|
44164 |
+
var __setModuleDefault = Object.create ? (function(o, v) {
|
44165 |
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
44166 |
+
}) : function(o, v) {
|
44167 |
+
o["default"] = v;
|
44168 |
+
};
|
44169 |
+
|
44170 |
function __importStar(mod) {
|
44171 |
if (mod && mod.__esModule) return mod;
|
44172 |
var result = {};
|
44173 |
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
44174 |
+
__setModuleDefault(result, mod);
|
44175 |
return result;
|
44176 |
}
|
44177 |
|
44194 |
return value;
|
44195 |
}
|
44196 |
|
44197 |
+
// EXTERNAL MODULE: ./node_modules/normalize-wheel/index.js
|
44198 |
+
var normalize_wheel = __webpack_require__(7970);
|
44199 |
+
var normalize_wheel_default = /*#__PURE__*/__webpack_require__.n(normalize_wheel);
|
44200 |
;// CONCATENATED MODULE: ./node_modules/react-easy-crop/index.module.js
|
44201 |
|
44202 |
|
44203 |
|
44204 |
+
|
44205 |
/**
|
44206 |
* Compute the dimension of the crop area based on media size,
|
44207 |
+
* aspect ratio and optionally rotation
|
44208 |
*/
|
44209 |
|
44210 |
+
function getCropSize(mediaWidth, mediaHeight, containerWidth, containerHeight, aspect, rotation) {
|
44211 |
if (rotation === void 0) {
|
44212 |
rotation = 0;
|
44213 |
}
|
44214 |
|
44215 |
+
var _a = rotateSize(mediaWidth, mediaHeight, rotation),
|
44216 |
width = _a.width,
|
44217 |
height = _a.height;
|
44218 |
|
44219 |
+
var fittingWidth = Math.min(width, containerWidth);
|
44220 |
+
var fittingHeight = Math.min(height, containerHeight);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44221 |
|
44222 |
+
if (fittingWidth > fittingHeight * aspect) {
|
44223 |
return {
|
44224 |
+
width: fittingHeight * aspect,
|
44225 |
+
height: fittingHeight
|
44226 |
};
|
44227 |
}
|
44228 |
|
44229 |
return {
|
44230 |
+
width: fittingWidth,
|
44231 |
+
height: fittingWidth / aspect
|
44232 |
};
|
44233 |
}
|
44234 |
+
/**
|
44235 |
+
* Compute media zoom.
|
44236 |
+
* We fit the media into the container with "max-width: 100%; max-height: 100%;"
|
44237 |
+
*/
|
44238 |
+
|
44239 |
+
function getMediaZoom(mediaSize) {
|
44240 |
+
// Take the axis with more pixels to improve accuracy
|
44241 |
+
return mediaSize.width > mediaSize.height ? mediaSize.width / mediaSize.naturalWidth : mediaSize.height / mediaSize.naturalHeight;
|
44242 |
+
}
|
44243 |
/**
|
44244 |
* Ensure a new media position stays in the crop area.
|
44245 |
*/
|
44249 |
rotation = 0;
|
44250 |
}
|
44251 |
|
44252 |
+
var _a = rotateSize(mediaSize.width, mediaSize.height, rotation),
|
44253 |
width = _a.width,
|
44254 |
height = _a.height;
|
44255 |
|
44261 |
|
44262 |
function restrictPositionCoord(position, mediaSize, cropSize, zoom) {
|
44263 |
var maxPosition = mediaSize * zoom / 2 - cropSize / 2;
|
44264 |
+
return clamp(position, -maxPosition, maxPosition);
|
44265 |
}
|
44266 |
|
44267 |
function getDistanceBetweenPoints(pointA, pointB) {
|
44286 |
// as it might need to be negative.
|
44287 |
|
44288 |
|
44289 |
+
var limitAreaFn = restrictPosition ? limitArea : noOp;
|
44290 |
+
var mediaBBoxSize = rotateSize(mediaSize.width, mediaSize.height, rotation);
|
44291 |
+
var mediaNaturalBBoxSize = rotateSize(mediaSize.naturalWidth, mediaSize.naturalHeight, rotation); // calculate the crop area in percentages
|
44292 |
+
// in the rotated space
|
44293 |
+
|
44294 |
var croppedAreaPercentages = {
|
44295 |
+
x: limitAreaFn(100, ((mediaBBoxSize.width - cropSize.width / zoom) / 2 - crop.x / zoom) / mediaBBoxSize.width * 100),
|
44296 |
+
y: limitAreaFn(100, ((mediaBBoxSize.height - cropSize.height / zoom) / 2 - crop.y / zoom) / mediaBBoxSize.height * 100),
|
44297 |
+
width: limitAreaFn(100, cropSize.width / mediaBBoxSize.width * 100 / zoom),
|
44298 |
+
height: limitAreaFn(100, cropSize.height / mediaBBoxSize.height * 100 / zoom)
|
44299 |
}; // we compute the pixels size naively
|
44300 |
|
44301 |
+
var widthInPixels = Math.round(limitAreaFn(mediaNaturalBBoxSize.width, croppedAreaPercentages.width * mediaNaturalBBoxSize.width / 100));
|
44302 |
+
var heightInPixels = Math.round(limitAreaFn(mediaNaturalBBoxSize.height, croppedAreaPercentages.height * mediaNaturalBBoxSize.height / 100));
|
44303 |
+
var isImgWiderThanHigh = mediaNaturalBBoxSize.width >= mediaNaturalBBoxSize.height * aspect; // then we ensure the width and height exactly match the aspect (to avoid rounding approximations)
|
44304 |
+
// if the media is wider than high, when zoom is 0, the crop height will be equals to image height
|
44305 |
// thus we want to compute the width from the height and aspect for accuracy.
|
44306 |
// Otherwise, we compute the height from width and aspect.
|
44307 |
|
44314 |
};
|
44315 |
|
44316 |
var croppedAreaPixels = __assign(__assign({}, sizePixels), {
|
44317 |
+
x: Math.round(limitAreaFn(mediaNaturalBBoxSize.width - sizePixels.width, croppedAreaPercentages.x * mediaNaturalBBoxSize.width / 100)),
|
44318 |
+
y: Math.round(limitAreaFn(mediaNaturalBBoxSize.height - sizePixels.height, croppedAreaPercentages.y * mediaNaturalBBoxSize.height / 100))
|
44319 |
});
|
44320 |
|
44321 |
return {
|
44335 |
return value;
|
44336 |
}
|
44337 |
/**
|
44338 |
+
* Compute crop and zoom from the croppedAreaPercentages.
|
44339 |
*/
|
44340 |
|
44341 |
|
44342 |
+
function getInitialCropFromCroppedAreaPercentages(croppedAreaPercentages, mediaSize, rotation, cropSize, minZoom, maxZoom) {
|
44343 |
+
var mediaBBoxSize = rotateSize(mediaSize.width, mediaSize.height, rotation); // This is the inverse process of computeCroppedArea
|
44344 |
|
44345 |
+
var zoom = clamp(cropSize.width / mediaBBoxSize.width * (100 / croppedAreaPercentages.width), minZoom, maxZoom);
|
44346 |
+
var crop = {
|
44347 |
+
x: zoom * mediaBBoxSize.width / 2 - cropSize.width / 2 - mediaBBoxSize.width * zoom * (croppedAreaPercentages.x / 100),
|
44348 |
+
y: zoom * mediaBBoxSize.height / 2 - cropSize.height / 2 - mediaBBoxSize.height * zoom * (croppedAreaPercentages.y / 100)
|
44349 |
+
};
|
44350 |
+
return {
|
44351 |
+
crop: crop,
|
44352 |
+
zoom: zoom
|
44353 |
+
};
|
44354 |
+
}
|
44355 |
+
/**
|
44356 |
+
* Compute zoom from the croppedAreaPixels
|
44357 |
+
*/
|
44358 |
|
44359 |
+
function getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize) {
|
44360 |
+
var mediaZoom = getMediaZoom(mediaSize);
|
44361 |
+
return cropSize.height > cropSize.width ? cropSize.height / (croppedAreaPixels.height * mediaZoom) : cropSize.width / (croppedAreaPixels.width * mediaZoom);
|
44362 |
}
|
44363 |
/**
|
44364 |
+
* Compute crop and zoom from the croppedAreaPixels
|
44365 |
*/
|
44366 |
|
44367 |
|
44368 |
+
function getInitialCropFromCroppedAreaPixels(croppedAreaPixels, mediaSize, rotation, cropSize, minZoom, maxZoom) {
|
44369 |
+
if (rotation === void 0) {
|
44370 |
+
rotation = 0;
|
44371 |
+
}
|
44372 |
+
|
44373 |
+
var mediaNaturalBBoxSize = rotateSize(mediaSize.naturalWidth, mediaSize.naturalHeight, rotation);
|
44374 |
+
var zoom = clamp(getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize), minZoom, maxZoom);
|
44375 |
+
var cropZoom = cropSize.height > cropSize.width ? cropSize.height / croppedAreaPixels.height : cropSize.width / croppedAreaPixels.width;
|
44376 |
var crop = {
|
44377 |
+
x: ((mediaNaturalBBoxSize.width - croppedAreaPixels.width) / 2 - croppedAreaPixels.x) * cropZoom,
|
44378 |
+
y: ((mediaNaturalBBoxSize.height - croppedAreaPixels.height) / 2 - croppedAreaPixels.y) * cropZoom
|
44379 |
};
|
44380 |
return {
|
44381 |
crop: crop,
|
44392 |
y: (b.y + a.y) / 2
|
44393 |
};
|
44394 |
}
|
44395 |
+
function getRadianAngle(degreeValue) {
|
44396 |
+
return degreeValue * Math.PI / 180;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44397 |
}
|
44398 |
/**
|
44399 |
* Returns the new bounding area of a rotated rectangle.
|
44400 |
*/
|
44401 |
|
44402 |
+
function rotateSize(width, height, rotation) {
|
44403 |
+
var rotRad = getRadianAngle(rotation);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44404 |
return {
|
44405 |
+
width: Math.abs(Math.cos(rotRad) * width) + Math.abs(Math.sin(rotRad) * height),
|
44406 |
+
height: Math.abs(Math.sin(rotRad) * width) + Math.abs(Math.cos(rotRad) * height)
|
44407 |
};
|
44408 |
}
|
44409 |
+
/**
|
44410 |
+
* Clamp value between min and max
|
44411 |
+
*/
|
44412 |
+
|
44413 |
+
function clamp(value, min, max) {
|
44414 |
+
return Math.min(Math.max(value, min), max);
|
44415 |
+
}
|
44416 |
/**
|
44417 |
* Combine multiple class names into a single string.
|
44418 |
*/
|
44433 |
}).join(' ').trim();
|
44434 |
}
|
44435 |
|
44436 |
+
var css_248z = ".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n";
|
44437 |
|
44438 |
var MIN_ZOOM = 1;
|
44439 |
var MAX_ZOOM = 3;
|
44446 |
function Cropper() {
|
44447 |
var _this = _super !== null && _super.apply(this, arguments) || this;
|
44448 |
|
44449 |
+
_this.imageRef = /*#__PURE__*/external_React_default().createRef();
|
44450 |
+
_this.videoRef = /*#__PURE__*/external_React_default().createRef();
|
44451 |
_this.containerRef = null;
|
44452 |
_this.styleRef = null;
|
44453 |
_this.containerRect = null;
|
44470 |
_this.rafDragTimeout = null;
|
44471 |
_this.rafPinchTimeout = null;
|
44472 |
_this.wheelTimer = null;
|
44473 |
+
_this.currentDoc = document;
|
44474 |
+
_this.currentWindow = window;
|
44475 |
_this.state = {
|
44476 |
cropSize: null,
|
44477 |
hasWheelJustStarted: false
|
44482 |
};
|
44483 |
|
44484 |
_this.cleanEvents = function () {
|
44485 |
+
_this.currentDoc.removeEventListener('mousemove', _this.onMouseMove);
|
44486 |
+
|
44487 |
+
_this.currentDoc.removeEventListener('mouseup', _this.onDragStopped);
|
44488 |
+
|
44489 |
+
_this.currentDoc.removeEventListener('touchmove', _this.onTouchMove);
|
44490 |
+
|
44491 |
+
_this.currentDoc.removeEventListener('touchend', _this.onDragStopped);
|
44492 |
};
|
44493 |
|
44494 |
_this.clearScrollEvent = function () {
|
44500 |
};
|
44501 |
|
44502 |
_this.onMediaLoad = function () {
|
44503 |
+
var cropSize = _this.computeSizes();
|
44504 |
|
44505 |
+
if (cropSize) {
|
44506 |
+
_this.emitCropData();
|
44507 |
|
44508 |
+
_this.setInitialCrop(cropSize);
|
44509 |
+
}
|
44510 |
|
44511 |
if (_this.props.onMediaLoaded) {
|
44512 |
_this.props.onMediaLoaded(_this.mediaSize);
|
44513 |
}
|
44514 |
};
|
44515 |
|
44516 |
+
_this.setInitialCrop = function (cropSize) {
|
44517 |
+
if (_this.props.initialCroppedAreaPercentages) {
|
44518 |
+
var _a = getInitialCropFromCroppedAreaPercentages(_this.props.initialCroppedAreaPercentages, _this.mediaSize, _this.props.rotation, cropSize, _this.props.minZoom, _this.props.maxZoom),
|
44519 |
+
crop = _a.crop,
|
44520 |
+
zoom = _a.zoom;
|
44521 |
|
44522 |
+
_this.props.onCropChange(crop);
|
|
|
|
|
44523 |
|
44524 |
+
_this.props.onZoomChange && _this.props.onZoomChange(zoom);
|
44525 |
+
} else if (_this.props.initialCroppedAreaPixels) {
|
44526 |
+
var _b = getInitialCropFromCroppedAreaPixels(_this.props.initialCroppedAreaPixels, _this.mediaSize, _this.props.rotation, cropSize, _this.props.minZoom, _this.props.maxZoom),
|
44527 |
+
crop = _b.crop,
|
44528 |
+
zoom = _b.zoom;
|
44529 |
|
44530 |
+
_this.props.onCropChange(crop);
|
44531 |
|
44532 |
+
_this.props.onZoomChange && _this.props.onZoomChange(zoom);
|
44533 |
+
}
|
44534 |
};
|
44535 |
|
44536 |
_this.computeSizes = function () {
|
44537 |
+
var _a, _b, _c, _d, _e, _f;
|
44538 |
|
44539 |
+
var mediaRef = _this.imageRef.current || _this.videoRef.current;
|
44540 |
|
44541 |
+
if (mediaRef && _this.containerRef) {
|
44542 |
+
_this.containerRect = _this.containerRef.getBoundingClientRect();
|
44543 |
+
var containerAspect = _this.containerRect.width / _this.containerRect.height;
|
44544 |
+
var naturalWidth = ((_a = _this.imageRef.current) === null || _a === void 0 ? void 0 : _a.naturalWidth) || ((_b = _this.videoRef.current) === null || _b === void 0 ? void 0 : _b.videoWidth) || 0;
|
44545 |
+
var naturalHeight = ((_c = _this.imageRef.current) === null || _c === void 0 ? void 0 : _c.naturalHeight) || ((_d = _this.videoRef.current) === null || _d === void 0 ? void 0 : _d.videoHeight) || 0;
|
44546 |
+
var isMediaScaledDown = mediaRef.offsetWidth < naturalWidth || mediaRef.offsetHeight < naturalHeight;
|
44547 |
+
var mediaAspect = naturalWidth / naturalHeight; // We do not rely on the offsetWidth/offsetHeight if the media is scaled down
|
44548 |
+
// as the values they report are rounded. That will result in precision losses
|
44549 |
+
// when calculating zoom. We use the fact that the media is positionned relative
|
44550 |
+
// to the container. That allows us to use the container's dimensions
|
44551 |
+
// and natural aspect ratio of the media to calculate accurate media size.
|
44552 |
+
// However, for this to work, the container should not be rotated
|
44553 |
+
|
44554 |
+
var renderedMediaSize = void 0;
|
44555 |
+
|
44556 |
+
if (isMediaScaledDown) {
|
44557 |
+
switch (_this.props.objectFit) {
|
44558 |
+
default:
|
44559 |
+
case 'contain':
|
44560 |
+
renderedMediaSize = containerAspect > mediaAspect ? {
|
44561 |
+
width: _this.containerRect.height * mediaAspect,
|
44562 |
+
height: _this.containerRect.height
|
44563 |
+
} : {
|
44564 |
+
width: _this.containerRect.width,
|
44565 |
+
height: _this.containerRect.width / mediaAspect
|
44566 |
+
};
|
44567 |
+
break;
|
44568 |
+
|
44569 |
+
case 'horizontal-cover':
|
44570 |
+
renderedMediaSize = {
|
44571 |
+
width: _this.containerRect.width,
|
44572 |
+
height: _this.containerRect.width / mediaAspect
|
44573 |
+
};
|
44574 |
+
break;
|
44575 |
+
|
44576 |
+
case 'vertical-cover':
|
44577 |
+
renderedMediaSize = {
|
44578 |
+
width: _this.containerRect.height * mediaAspect,
|
44579 |
+
height: _this.containerRect.height
|
44580 |
+
};
|
44581 |
+
break;
|
44582 |
+
|
44583 |
+
case 'auto-cover':
|
44584 |
+
renderedMediaSize = naturalWidth > naturalHeight ? {
|
44585 |
+
width: _this.containerRect.width,
|
44586 |
+
height: _this.containerRect.width / mediaAspect
|
44587 |
+
} : {
|
44588 |
+
width: _this.containerRect.height * mediaAspect,
|
44589 |
+
height: _this.containerRect.height
|
44590 |
+
};
|
44591 |
+
break;
|
44592 |
+
}
|
44593 |
+
} else {
|
44594 |
+
renderedMediaSize = {
|
44595 |
+
width: mediaRef.offsetWidth,
|
44596 |
+
height: mediaRef.offsetHeight
|
44597 |
+
};
|
44598 |
+
}
|
44599 |
+
|
44600 |
+
_this.mediaSize = __assign(__assign({}, renderedMediaSize), {
|
44601 |
+
naturalWidth: naturalWidth,
|
44602 |
+
naturalHeight: naturalHeight
|
44603 |
+
}); // set media size in the parent
|
44604 |
+
|
44605 |
+
if (_this.props.setMediaSize) {
|
44606 |
+
_this.props.setMediaSize(_this.mediaSize);
|
44607 |
+
}
|
44608 |
+
|
44609 |
+
var cropSize = _this.props.cropSize ? _this.props.cropSize : getCropSize(_this.mediaSize.width, _this.mediaSize.height, _this.containerRect.width, _this.containerRect.height, _this.props.aspect, _this.props.rotation);
|
44610 |
+
|
44611 |
+
if (((_e = _this.state.cropSize) === null || _e === void 0 ? void 0 : _e.height) !== cropSize.height || ((_f = _this.state.cropSize) === null || _f === void 0 ? void 0 : _f.width) !== cropSize.width) {
|
44612 |
+
_this.props.onCropSizeChange && _this.props.onCropSizeChange(cropSize);
|
44613 |
+
}
|
44614 |
|
44615 |
_this.setState({
|
44616 |
cropSize: cropSize
|
44617 |
+
}, _this.recomputeCropPosition); // pass crop size to parent
|
|
|
44618 |
|
44619 |
+
|
44620 |
+
if (_this.props.setCropSize) {
|
44621 |
+
_this.props.setCropSize(cropSize);
|
44622 |
+
}
|
44623 |
+
|
44624 |
+
return cropSize;
|
44625 |
}
|
44626 |
};
|
44627 |
|
44628 |
_this.onMouseDown = function (e) {
|
44629 |
e.preventDefault();
|
44630 |
+
|
44631 |
+
_this.currentDoc.addEventListener('mousemove', _this.onMouseMove);
|
44632 |
+
|
44633 |
+
_this.currentDoc.addEventListener('mouseup', _this.onDragStopped);
|
44634 |
|
44635 |
_this.onDragStart(Cropper.getMousePoint(e));
|
44636 |
};
|
44640 |
};
|
44641 |
|
44642 |
_this.onTouchStart = function (e) {
|
44643 |
+
if (_this.props.onTouchRequest && !_this.props.onTouchRequest(e)) {
|
44644 |
+
return;
|
44645 |
+
}
|
44646 |
+
|
44647 |
+
_this.currentDoc.addEventListener('touchmove', _this.onTouchMove, {
|
44648 |
passive: false
|
44649 |
}); // iOS 11 now defaults to passive: true
|
44650 |
|
44651 |
+
|
44652 |
+
_this.currentDoc.addEventListener('touchend', _this.onDragStopped);
|
44653 |
|
44654 |
if (e.touches.length === 2) {
|
44655 |
_this.onPinchStart(e);
|
44670 |
};
|
44671 |
|
44672 |
_this.onDragStart = function (_a) {
|
|
|
|
|
|
|
44673 |
var _b, _c;
|
44674 |
|
44675 |
+
var x = _a.x,
|
44676 |
+
y = _a.y;
|
44677 |
_this.dragStartPosition = {
|
44678 |
x: x,
|
44679 |
y: y
|
44685 |
_this.onDrag = function (_a) {
|
44686 |
var x = _a.x,
|
44687 |
y = _a.y;
|
44688 |
+
if (_this.rafDragTimeout) _this.currentWindow.cancelAnimationFrame(_this.rafDragTimeout);
|
44689 |
+
_this.rafDragTimeout = _this.currentWindow.requestAnimationFrame(function () {
|
44690 |
if (!_this.state.cropSize) return;
|
44691 |
if (x === undefined || y === undefined) return;
|
44692 |
var offsetX = x - _this.dragStartPosition.x;
|
44712 |
};
|
44713 |
|
44714 |
_this.onWheel = function (e) {
|
44715 |
+
if (_this.props.onWheelRequest && !_this.props.onWheelRequest(e)) {
|
44716 |
+
return;
|
44717 |
+
}
|
44718 |
+
|
44719 |
e.preventDefault();
|
44720 |
var point = Cropper.getMousePoint(e);
|
44721 |
+
var pixelY = normalize_wheel_default()(e).pixelY;
|
44722 |
+
var newZoom = _this.props.zoom - pixelY * _this.props.zoomSpeed / 200;
|
44723 |
|
44724 |
+
_this.setNewZoom(newZoom, point, {
|
44725 |
+
shouldUpdatePosition: true
|
44726 |
+
});
|
44727 |
|
44728 |
if (!_this.state.hasWheelJustStarted) {
|
44729 |
_this.setState({
|
44739 |
clearTimeout(_this.wheelTimer);
|
44740 |
}
|
44741 |
|
44742 |
+
_this.wheelTimer = _this.currentWindow.setTimeout(function () {
|
44743 |
return _this.setState({
|
44744 |
hasWheelJustStarted: false
|
44745 |
}, function () {
|
44776 |
};
|
44777 |
};
|
44778 |
|
44779 |
+
_this.setNewZoom = function (zoom, point, _a) {
|
44780 |
+
var _b = (_a === void 0 ? {} : _a).shouldUpdatePosition,
|
44781 |
+
shouldUpdatePosition = _b === void 0 ? true : _b;
|
44782 |
if (!_this.state.cropSize || !_this.props.onZoomChange) return;
|
44783 |
|
44784 |
var zoomPoint = _this.getPointOnContainer(point);
|
44785 |
|
44786 |
var zoomTarget = _this.getPointOnMedia(zoomPoint);
|
44787 |
|
44788 |
+
var newZoom = clamp(zoom, _this.props.minZoom, _this.props.maxZoom);
|
44789 |
var requestedPosition = {
|
44790 |
x: zoomTarget.x * newZoom - zoomPoint.x,
|
44791 |
y: zoomTarget.y * newZoom - zoomPoint.y
|
44792 |
};
|
|
|
44793 |
|
44794 |
+
if (shouldUpdatePosition) {
|
44795 |
+
var newPosition = _this.props.restrictPosition ? restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, newZoom, _this.props.rotation) : requestedPosition;
|
44796 |
+
|
44797 |
+
_this.props.onCropChange(newPosition);
|
44798 |
+
}
|
44799 |
|
44800 |
_this.props.onZoomChange(newZoom);
|
44801 |
};
|
44802 |
|
44803 |
+
_this.getCropData = function () {
|
44804 |
+
if (!_this.state.cropSize) {
|
44805 |
+
return null;
|
44806 |
+
} // this is to ensure the crop is correctly restricted after a zoom back (https://github.com/ValentinH/react-easy-crop/issues/6)
|
44807 |
+
|
44808 |
|
44809 |
var restrictedPosition = _this.props.restrictPosition ? restrictPosition(_this.props.crop, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : _this.props.crop;
|
44810 |
+
return computeCroppedArea(restrictedPosition, _this.mediaSize, _this.state.cropSize, _this.getAspect(), _this.props.zoom, _this.props.rotation, _this.props.restrictPosition);
|
44811 |
+
};
|
44812 |
+
|
44813 |
+
_this.emitCropData = function () {
|
44814 |
+
var cropData = _this.getCropData();
|
44815 |
+
|
44816 |
+
if (!cropData) return;
|
44817 |
+
var croppedAreaPercentages = cropData.croppedAreaPercentages,
|
44818 |
+
croppedAreaPixels = cropData.croppedAreaPixels;
|
44819 |
+
|
44820 |
+
if (_this.props.onCropComplete) {
|
44821 |
+
_this.props.onCropComplete(croppedAreaPercentages, croppedAreaPixels);
|
44822 |
+
}
|
44823 |
|
44824 |
+
if (_this.props.onCropAreaChange) {
|
44825 |
+
_this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels);
|
44826 |
+
}
|
44827 |
+
};
|
44828 |
+
|
44829 |
+
_this.emitCropAreaChange = function () {
|
44830 |
+
var cropData = _this.getCropData();
|
44831 |
+
|
44832 |
+
if (!cropData) return;
|
44833 |
+
var croppedAreaPercentages = cropData.croppedAreaPercentages,
|
44834 |
+
croppedAreaPixels = cropData.croppedAreaPixels;
|
44835 |
|
44836 |
+
if (_this.props.onCropAreaChange) {
|
44837 |
+
_this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels);
|
44838 |
+
}
|
44839 |
};
|
44840 |
|
44841 |
_this.recomputeCropPosition = function () {
|
44851 |
}
|
44852 |
|
44853 |
Cropper.prototype.componentDidMount = function () {
|
|
|
|
|
44854 |
if (this.containerRef) {
|
44855 |
+
if (this.containerRef.ownerDocument) {
|
44856 |
+
this.currentDoc = this.containerRef.ownerDocument;
|
44857 |
+
}
|
44858 |
+
|
44859 |
+
if (this.currentDoc.defaultView) {
|
44860 |
+
this.currentWindow = this.currentDoc.defaultView;
|
44861 |
+
}
|
44862 |
+
|
44863 |
+
this.currentWindow.addEventListener('resize', this.computeSizes);
|
44864 |
this.props.zoomWithScroll && this.containerRef.addEventListener('wheel', this.onWheel, {
|
44865 |
passive: false
|
44866 |
});
|
44869 |
}
|
44870 |
|
44871 |
if (!this.props.disableAutomaticStylesInjection) {
|
44872 |
+
this.styleRef = this.currentDoc.createElement('style');
|
44873 |
this.styleRef.setAttribute('type', 'text/css');
|
44874 |
+
|
44875 |
+
if (this.props.nonce) {
|
44876 |
+
this.styleRef.setAttribute('nonce', this.props.nonce);
|
44877 |
+
}
|
44878 |
+
|
44879 |
+
this.styleRef.innerHTML = css_248z;
|
44880 |
+
this.currentDoc.head.appendChild(this.styleRef);
|
44881 |
} // when rendered via SSR, the image can already be loaded and its onLoad callback will never be called
|
44882 |
|
44883 |
|
44884 |
+
if (this.imageRef.current && this.imageRef.current.complete) {
|
44885 |
this.onMediaLoad();
|
44886 |
+
} // set image and video refs in the parent if the callbacks exist
|
44887 |
+
|
44888 |
+
|
44889 |
+
if (this.props.setImageRef) {
|
44890 |
+
this.props.setImageRef(this.imageRef);
|
44891 |
+
}
|
44892 |
+
|
44893 |
+
if (this.props.setVideoRef) {
|
44894 |
+
this.props.setVideoRef(this.videoRef);
|
44895 |
}
|
44896 |
};
|
44897 |
|
44898 |
Cropper.prototype.componentWillUnmount = function () {
|
44899 |
+
var _a;
|
44900 |
+
|
44901 |
+
this.currentWindow.removeEventListener('resize', this.computeSizes);
|
44902 |
|
44903 |
if (this.containerRef) {
|
44904 |
this.containerRef.removeEventListener('gesturestart', this.preventZoomSafari);
|
44906 |
}
|
44907 |
|
44908 |
if (this.styleRef) {
|
44909 |
+
(_a = this.styleRef.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this.styleRef);
|
44910 |
}
|
44911 |
|
44912 |
this.cleanEvents();
|
44914 |
};
|
44915 |
|
44916 |
Cropper.prototype.componentDidUpdate = function (prevProps) {
|
44917 |
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
44918 |
+
|
44919 |
if (prevProps.rotation !== this.props.rotation) {
|
44920 |
this.computeSizes();
|
44921 |
this.recomputeCropPosition();
|
44923 |
this.computeSizes();
|
44924 |
} else if (prevProps.zoom !== this.props.zoom) {
|
44925 |
this.recomputeCropPosition();
|
44926 |
+
} else if (((_a = prevProps.cropSize) === null || _a === void 0 ? void 0 : _a.height) !== ((_b = this.props.cropSize) === null || _b === void 0 ? void 0 : _b.height) || ((_c = prevProps.cropSize) === null || _c === void 0 ? void 0 : _c.width) !== ((_d = this.props.cropSize) === null || _d === void 0 ? void 0 : _d.width)) {
|
44927 |
this.computeSizes();
|
44928 |
+
} else if (((_e = prevProps.crop) === null || _e === void 0 ? void 0 : _e.x) !== ((_f = this.props.crop) === null || _f === void 0 ? void 0 : _f.x) || ((_g = prevProps.crop) === null || _g === void 0 ? void 0 : _g.y) !== ((_h = this.props.crop) === null || _h === void 0 ? void 0 : _h.y)) {
|
44929 |
+
this.emitCropAreaChange();
|
44930 |
}
|
44931 |
|
44932 |
if (prevProps.zoomWithScroll !== this.props.zoomWithScroll && this.containerRef) {
|
44934 |
passive: false
|
44935 |
}) : this.clearScrollEvent();
|
44936 |
}
|
44937 |
+
|
44938 |
+
if (prevProps.video !== this.props.video) {
|
44939 |
+
(_j = this.videoRef.current) === null || _j === void 0 ? void 0 : _j.load();
|
44940 |
+
}
|
44941 |
};
|
44942 |
|
44943 |
Cropper.prototype.getAspect = function () {
|
44967 |
var pointB = Cropper.getTouchPoint(e.touches[1]);
|
44968 |
var center = getCenter(pointA, pointB);
|
44969 |
this.onDrag(center);
|
44970 |
+
if (this.rafPinchTimeout) this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout);
|
44971 |
+
this.rafPinchTimeout = this.currentWindow.requestAnimationFrame(function () {
|
44972 |
var distance = getDistanceBetweenPoints(pointA, pointB);
|
44973 |
var newZoom = _this.props.zoom * (distance / _this.lastPinchDistance);
|
44974 |
|
44975 |
+
_this.setNewZoom(newZoom, center, {
|
44976 |
+
shouldUpdatePosition: false
|
44977 |
+
});
|
44978 |
|
44979 |
_this.lastPinchDistance = distance;
|
44980 |
var rotation = getRotationBetweenPoints(pointA, pointB);
|
44991 |
image = _a.image,
|
44992 |
video = _a.video,
|
44993 |
mediaProps = _a.mediaProps,
|
44994 |
+
transform = _a.transform,
|
44995 |
_b = _a.crop,
|
44996 |
x = _b.x,
|
44997 |
y = _b.y,
|
45006 |
_d = _a.classes,
|
45007 |
containerClassName = _d.containerClassName,
|
45008 |
cropAreaClassName = _d.cropAreaClassName,
|
45009 |
+
mediaClassName = _d.mediaClassName,
|
45010 |
+
objectFit = _a.objectFit;
|
45011 |
+
return /*#__PURE__*/external_React_default().createElement("div", {
|
45012 |
onMouseDown: this.onMouseDown,
|
45013 |
onTouchStart: this.onTouchStart,
|
45014 |
ref: function ref(el) {
|
45017 |
"data-testid": "container",
|
45018 |
style: containerStyle,
|
45019 |
className: classNames('reactEasyCrop_Container', containerClassName)
|
45020 |
+
}, image ? /*#__PURE__*/external_React_default().createElement("img", __assign({
|
45021 |
alt: "",
|
45022 |
+
className: classNames('reactEasyCrop_Image', objectFit === 'contain' && 'reactEasyCrop_Contain', objectFit === 'horizontal-cover' && 'reactEasyCrop_Cover_Horizontal', objectFit === 'vertical-cover' && 'reactEasyCrop_Cover_Vertical', objectFit === 'auto-cover' && (this.mediaSize.naturalWidth > this.mediaSize.naturalHeight ? 'reactEasyCrop_Cover_Horizontal' : 'reactEasyCrop_Cover_Vertical'), mediaClassName)
|
45023 |
}, mediaProps, {
|
45024 |
src: image,
|
45025 |
+
ref: this.imageRef,
|
|
|
|
|
45026 |
style: __assign(__assign({}, mediaStyle), {
|
45027 |
+
transform: transform || "translate(" + x + "px, " + y + "px) rotate(" + rotation + "deg) scale(" + zoom + ")"
|
45028 |
}),
|
45029 |
onLoad: this.onMediaLoad
|
45030 |
+
})) : video && /*#__PURE__*/external_React_default().createElement("video", __assign({
|
45031 |
autoPlay: true,
|
45032 |
loop: true,
|
45033 |
muted: true,
|
45034 |
+
className: classNames('reactEasyCrop_Video', objectFit === 'contain' && 'reactEasyCrop_Contain', objectFit === 'horizontal-cover' && 'reactEasyCrop_Cover_Horizontal', objectFit === 'vertical-cover' && 'reactEasyCrop_Cover_Vertical', objectFit === 'auto-cover' && (this.mediaSize.naturalWidth > this.mediaSize.naturalHeight ? 'reactEasyCrop_Cover_Horizontal' : 'reactEasyCrop_Cover_Vertical'), mediaClassName)
|
45035 |
}, mediaProps, {
|
45036 |
+
ref: this.videoRef,
|
|
|
|
|
|
|
45037 |
onLoadedMetadata: this.onMediaLoad,
|
45038 |
style: __assign(__assign({}, mediaStyle), {
|
45039 |
+
transform: transform || "translate(" + x + "px, " + y + "px) rotate(" + rotation + "deg) scale(" + zoom + ")"
|
45040 |
}),
|
45041 |
controls: false
|
45042 |
+
}), (Array.isArray(video) ? video : [{
|
45043 |
+
src: video
|
45044 |
+
}]).map(function (item) {
|
45045 |
+
return /*#__PURE__*/external_React_default().createElement("source", __assign({
|
45046 |
+
key: item.src
|
45047 |
+
}, item));
|
45048 |
+
})), this.state.cropSize && /*#__PURE__*/external_React_default().createElement("div", {
|
45049 |
style: __assign(__assign({}, cropAreaStyle), {
|
45050 |
width: this.state.cropSize.width,
|
45051 |
height: this.state.cropSize.height
|
45062 |
maxZoom: MAX_ZOOM,
|
45063 |
minZoom: MIN_ZOOM,
|
45064 |
cropShape: 'rect',
|
45065 |
+
objectFit: 'contain',
|
45066 |
showGrid: true,
|
45067 |
style: {},
|
45068 |
classes: {},
|
45091 |
|
45092 |
/* harmony default export */ const index_module = (Cropper);
|
45093 |
|
45094 |
+
|
45095 |
;// CONCATENATED MODULE: ./packages/block-editor/build-module/components/image-editor/constants.js
|
45096 |
const constants_MIN_ZOOM = 100;
|
45097 |
const constants_MAX_ZOOM = 300;
|
45217 |
if (angle === 0) {
|
45218 |
setEditedUrl();
|
45219 |
setRotation(angle);
|
45220 |
+
setAspect(naturalWidth / naturalHeight);
|
45221 |
setPosition({
|
45222 |
x: -(position.y * naturalAspectRatio),
|
45223 |
y: position.x * naturalAspectRatio
|
45253 |
canvas.toBlob(blob => {
|
45254 |
setEditedUrl(URL.createObjectURL(blob));
|
45255 |
setRotation(angle);
|
45256 |
+
setAspect(canvas.width / canvas.height);
|
45257 |
setPosition({
|
45258 |
x: -(position.y * naturalAspectRatio),
|
45259 |
y: position.x * naturalAspectRatio
|
50242 |
selectionEnd,
|
50243 |
isSelected
|
50244 |
} = (0,external_wp_data_namespaceObject.useSelect)(selector);
|
50245 |
+
const {
|
50246 |
+
getSelectionStart,
|
50247 |
+
getSelectionEnd,
|
50248 |
+
getBlockRootClientId
|
50249 |
+
} = (0,external_wp_data_namespaceObject.useSelect)(store);
|
50250 |
const {
|
50251 |
selectionChange
|
50252 |
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
|
50277 |
const unset = start === undefined && end === undefined;
|
50278 |
|
50279 |
if (typeof start === 'number' || unset) {
|
50280 |
+
// If we are only setting the start (or the end below), which
|
50281 |
+
// means a partial selection, and we're not updating a selection
|
50282 |
+
// with the same client ID, abort. This means the selected block
|
50283 |
+
// is a parent block.
|
50284 |
+
if (end === undefined && getBlockRootClientId(clientId) !== getBlockRootClientId(getSelectionEnd().clientId)) {
|
50285 |
+
return;
|
50286 |
+
}
|
50287 |
+
|
50288 |
selection.start = {
|
50289 |
clientId,
|
50290 |
attributeKey: identifier,
|
50293 |
}
|
50294 |
|
50295 |
if (typeof end === 'number' || unset) {
|
50296 |
+
if (start === undefined && getBlockRootClientId(clientId) !== getBlockRootClientId(getSelectionStart().clientId)) {
|
50297 |
+
return;
|
50298 |
+
}
|
50299 |
+
|
50300 |
selection.end = {
|
50301 |
clientId,
|
50302 |
attributeKey: identifier,
|
51280 |
onChange: onSetNewTab,
|
51281 |
checked: linkTarget === '_blank'
|
51282 |
}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
|
51283 |
+
label: (0,external_wp_i18n_namespaceObject.__)('Link rel'),
|
51284 |
value: rel !== null && rel !== void 0 ? rel : '',
|
51285 |
onChange: onSetLinkRel
|
51286 |
}), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.TextControl, {
|
51771 |
getSelectedBlockClientId,
|
51772 |
getSelectedBlockCount,
|
51773 |
getBlockName,
|
51774 |
+
__unstableGetContentLockingParent
|
|
|
51775 |
} = select(store);
|
51776 |
|
51777 |
const _selectedBlockClientId = getSelectedBlockClientId();
|
51785 |
selectedBlockClientId: _selectedBlockClientId,
|
51786 |
selectedBlockName: _selectedBlockName,
|
51787 |
blockType: _blockType,
|
51788 |
+
topLevelLockedBlock: __unstableGetContentLockingParent(_selectedBlockClientId)
|
51789 |
};
|
51790 |
}, []);
|
51791 |
|
51879 |
};
|
51880 |
|
51881 |
const AdvancedControls = () => {
|
51882 |
+
const fills = (0,external_wp_components_namespaceObject.__experimentalUseSlotFills)(InspectorAdvancedControls.slotName);
|
51883 |
+
const hasFills = Boolean(fills && fills.length);
|
51884 |
|
51885 |
if (!hasFills) {
|
51886 |
return null;
|
52100 |
onKeyDown: onKeyDown
|
52101 |
}), (0,external_wp_element_namespaceObject.createElement)(insertion_point_InsertionPointOpenRef.Provider, {
|
52102 |
value: (0,external_wp_element_namespaceObject.useRef)(false)
|
52103 |
+
}, !isTyping && (0,external_wp_element_namespaceObject.createElement)(InsertionPoint, {
|
52104 |
__unstableContentRef: __unstableContentRef
|
52105 |
}), !isZoomOutMode && (hasFixedToolbar || !isLargeViewport) && (0,external_wp_element_namespaceObject.createElement)(block_contextual_toolbar, {
|
52106 |
isFixed: true
|
53085 |
|
53086 |
|
53087 |
|
53088 |
+
|
53089 |
|
53090 |
|
53091 |
|
build/block-editor/index.min.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '2f4c1e4447db3935a8bc');
|
build/block-editor/index.min.js
CHANGED
@@ -1,116 +1,116 @@
|
|
1 |
-
(()=>{var e={6411:function(e,t){var n,o;void 0===(o="function"==typeof(n=function(e,t){"use strict";var n,o,l="function"==typeof Map?new Map:(n=[],o=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return o[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),o.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),o.splice(t,1))}}),r=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){r=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!l.has(e)){var t=null,n=null,o=null,i=function(){e.clientWidth!==n&&d()},s=function(t){window.removeEventListener("resize",i,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",s,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),l.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",s,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",i,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",l.set(e,{destroy:s,update:d}),"vertical"===(a=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===a.resize&&(e.style.resize="horizontal"),t="content-box"===a.boxSizing?-(parseFloat(a.paddingTop)+parseFloat(a.paddingBottom)):parseFloat(a.borderTopWidth)+parseFloat(a.borderBottomWidth),isNaN(t)&&(t=0),d()}var a;function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var o=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),l=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,o.forEach((function(e){e.node.scrollTop=e.scrollTop})),l&&(document.documentElement.scrollTop=l)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),l="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(l<t?"hidden"===n.overflowY&&(c("scroll"),u(),l="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(c("hidden"),u(),l="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),o!==l){o=l;var i=r("autosize:resized");try{e.dispatchEvent(i)}catch(e){}}}}function s(e){var t=l.get(e);t&&t.destroy()}function a(e){var t=l.get(e);t&&t.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(e){return e}).destroy=function(e){return e},c.update=function(e){return e}):((c=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return i(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],s),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e}),t.default=c,e.exports=t.default})?n.apply(t,[e,t]):n)||(e.exports=o)},4403:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function l(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var i=l.apply(null,n);i&&e.push(i)}}else if("object"===r)if(n.toString===Object.prototype.toString)for(var s in n)o.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(l.default=l,e.exports=l):void 0===(n=function(){return l}.apply(t,[]))||(e.exports=n)}()},4827:e=>{e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},1198:(e,t)=>{"use strict";function n(){}function o(e,t,n,o,l){for(var r=0,i=t.length,s=0,a=0;r<i;r++){var c=t[r];if(c.removed){if(c.value=e.join(o.slice(a,a+c.count)),a+=c.count,r&&t[r-1].added){var u=t[r-1];t[r-1]=t[r],t[r]=u}}else{if(!c.added&&l){var d=n.slice(s,s+c.count);d=d.map((function(e,t){var n=o[a+t];return n.length>e.length?n:e})),c.value=e.join(d)}else c.value=e.join(n.slice(s,s+c.count));s+=c.count,c.added||(a+=c.count)}}var p=t[i-1];return i>1&&"string"==typeof p.value&&(p.added||p.removed)&&e.equals("",p.value)&&(t[i-2].value+=p.value,t.pop()),t}function l(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.callback;"function"==typeof n&&(r=n,n={}),this.options=n;var i=this;function s(e){return r?(setTimeout((function(){r(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var a=(t=this.removeEmpty(this.tokenize(t))).length,c=e.length,u=1,d=a+c,p=[{newPos:-1,components:[]}],m=this.extractCommon(p[0],t,e,0);if(p[0].newPos+1>=a&&m+1>=c)return s([{value:this.join(t),count:t.length}]);function g(){for(var n=-1*u;n<=u;n+=2){var r=void 0,d=p[n-1],m=p[n+1],g=(m?m.newPos:0)-n;d&&(p[n-1]=void 0);var h=d&&d.newPos+1<a,f=m&&0<=g&&g<c;if(h||f){if(!h||f&&d.newPos<m.newPos?(r=l(m),i.pushComponent(r.components,void 0,!0)):((r=d).newPos++,i.pushComponent(r.components,!0,void 0)),g=i.extractCommon(r,t,e,n),r.newPos+1>=a&&g+1>=c)return s(o(i,r.components,t,e,i.useLongestToken));p[n]=r}else p[n]=void 0}u++}if(r)!function e(){setTimeout((function(){if(u>d)return r();g()||e()}),0)}();else for(;u<=d;){var h=g();if(h)return h}},pushComponent:function(e,t,n){var o=e[e.length-1];o&&o.added===t&&o.removed===n?e[e.length-1]={count:o.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,o){for(var l=t.length,r=n.length,i=e.newPos,s=i-o,a=0;i+1<l&&s+1<r&&this.equals(t[i+1],n[s+1]);)i++,s++,a++;return a&&e.components.push({count:a}),e.newPos=i,s},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}},1973:(e,t,n)=>{"use strict";var o;t.Kx=function(e,t,n){return l.diff(e,t,n)};var l=new(((o=n(1198))&&o.__esModule?o:{default:o}).default)},1345:(e,t,n)=>{"use strict";var o=n(5022);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=o.getWindow(t));var l=n.allowHorizontalScroll,r=n.onlyScrollIfNeeded,i=n.alignWithTop,s=n.alignWithLeft,a=n.offsetTop||0,c=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;l=void 0===l||l;var p=o.isWindow(t),m=!(!p||!t.frameElement),g=o.offset(e),h=o.outerHeight(e),f=o.outerWidth(e),v=void 0,b=void 0,_=void 0,k=void 0,y=void 0,E=void 0,C=void 0,S=void 0,w=void 0,B=void 0;m&&(t=t.document.scrollingElement||t.document.body),p||m?(C=t,B=o.height(C),w=o.width(C),S={left:o.scrollLeft(C),top:o.scrollTop(C)},y={left:g.left-S.left-c,top:g.top-S.top-a},E={left:g.left+f-(S.left+w)+d,top:g.top+h-(S.top+B)+u},k=S):(v=o.offset(t),b=t.clientHeight,_=t.clientWidth,k={left:t.scrollLeft,top:t.scrollTop},y={left:g.left-(v.left+(parseFloat(o.css(t,"borderLeftWidth"))||0))-c,top:g.top-(v.top+(parseFloat(o.css(t,"borderTopWidth"))||0))-a},E={left:g.left+f-(v.left+_+(parseFloat(o.css(t,"borderRightWidth"))||0))+d,top:g.top+h-(v.top+b+(parseFloat(o.css(t,"borderBottomWidth"))||0))+u}),y.top<0||E.top>0?!0===i?o.scrollTop(t,k.top+y.top):!1===i?o.scrollTop(t,k.top+E.top):y.top<0?o.scrollTop(t,k.top+y.top):o.scrollTop(t,k.top+E.top):r||((i=void 0===i||!!i)?o.scrollTop(t,k.top+y.top):o.scrollTop(t,k.top+E.top)),l&&(y.left<0||E.left>0?!0===s?o.scrollLeft(t,k.left+y.left):!1===s?o.scrollLeft(t,k.left+E.left):y.left<0?o.scrollLeft(t,k.left+y.left):o.scrollLeft(t,k.left+E.left):r||((s=void 0===s||!!s)?o.scrollLeft(t,k.left+y.left):o.scrollLeft(t,k.left+E.left)))}},5425:(e,t,n)=>{"use strict";e.exports=n(1345)},5022:e=>{"use strict";var t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function o(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],o="scroll"+(t?"Top":"Left");if("number"!=typeof n){var l=e.document;"number"!=typeof(n=l.documentElement[o])&&(n=l.body[o])}return n}function l(e){return o(e)}function r(e){return o(e,!0)}function i(e){var t=function(e){var t,n=void 0,o=void 0,l=e.ownerDocument,r=l.body,i=l&&l.documentElement;return n=(t=e.getBoundingClientRect()).left,o=t.top,{left:n-=i.clientLeft||r.clientLeft||0,top:o-=i.clientTop||r.clientTop||0}}(e),n=e.ownerDocument,o=n.defaultView||n.parentWindow;return t.left+=l(o),t.top+=r(o),t}var s=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),a=/^(top|right|bottom|left)$/,c=void 0;function u(e,t){for(var n=0;n<e.length;n++)t(e[n])}function d(e){return"border-box"===c(e,"boxSizing")}"undefined"!=typeof window&&(c=window.getComputedStyle?function(e,t,n){var o="",l=e.ownerDocument,r=n||l.defaultView.getComputedStyle(e,null);return r&&(o=r.getPropertyValue(t)||r[t]),o}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(s.test(n)&&!a.test(t)){var o=e.style,l=o.left,r=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left,o.left="fontSize"===t?"1em":n||0,n=o.pixelLeft+"px",o.left=l,e.runtimeStyle.left=r}return""===n?"auto":n});var p=["margin","border","padding"];function m(e,t,n){var o={},l=e.style,r=void 0;for(r in t)t.hasOwnProperty(r)&&(o[r]=l[r],l[r]=t[r]);for(r in n.call(e),t)t.hasOwnProperty(r)&&(l[r]=o[r])}function g(e,t,n){var o=0,l=void 0,r=void 0,i=void 0;for(r=0;r<t.length;r++)if(l=t[r])for(i=0;i<n.length;i++){var s;s="border"===l?l+n[i]+"Width":l+n[i],o+=parseFloat(c(e,s))||0}return o}function h(e){return null!=e&&e==e.window}var f={};function v(e,t,n){if(h(e))return"width"===t?f.viewportWidth(e):f.viewportHeight(e);if(9===e.nodeType)return"width"===t?f.docWidth(e):f.docHeight(e);var o="width"===t?["Left","Right"]:["Top","Bottom"],l="width"===t?e.offsetWidth:e.offsetHeight,r=(c(e),d(e)),i=0;(null==l||l<=0)&&(l=void 0,(null==(i=c(e,t))||Number(i)<0)&&(i=e.style[t]||0),i=parseFloat(i)||0),void 0===n&&(n=r?1:-1);var s=void 0!==l||r,a=l||i;if(-1===n)return s?a-g(e,["border","padding"],o):i;if(s){var u=2===n?-g(e,["border"],o):g(e,["margin"],o);return a+(1===n?0:u)}return i+g(e,p.slice(n),o)}u(["Width","Height"],(function(e){f["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],f["viewport"+e](n))},f["viewport"+e]=function(t){var n="client"+e,o=t.document,l=o.body,r=o.documentElement[n];return"CSS1Compat"===o.compatMode&&r||l&&l[n]||r}}));var b={position:"absolute",visibility:"hidden",display:"block"};function _(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=v.apply(void 0,n):m(e,b,(function(){t=v.apply(void 0,n)})),t}function k(e,t,o){var l=o;if("object"!==(void 0===t?"undefined":n(t)))return void 0!==l?("number"==typeof l&&(l+="px"),void(e.style[t]=l)):c(e,t);for(var r in t)t.hasOwnProperty(r)&&k(e,r,t[r])}u(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);f["outer"+t]=function(t,n){return t&&_(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];f[e]=function(t,o){return void 0===o?t&&_(t,e,-1):t?(c(t),d(t)&&(o+=g(t,["padding","border"],n)),k(t,e,o)):void 0}})),e.exports=t({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return i(e);!function(e,t){"static"===k(e,"position")&&(e.style.position="relative");var n=i(e),o={},l=void 0,r=void 0;for(r in t)t.hasOwnProperty(r)&&(l=parseFloat(k(e,r))||0,o[r]=l+t[r]-n[r]);k(e,o)}(e,t)},isWindow:h,each:u,css:k,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var n in e)e.hasOwnProperty(n)&&(t.overflow[n]=e.overflow[n]);return t},scrollLeft:function(e,t){if(h(e)){if(void 0===t)return l(e);window.scrollTo(t,r(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(h(e)){if(void 0===t)return r(e);window.scrollTo(l(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},f)},8575:e=>{"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},9894:(e,t,n)=>{var o=n(4827);e.exports=function(e){var t=o(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var l=e.style.lineHeight;e.style.lineHeight=t+"em",t=o(e,"line-height"),n=parseFloat(t,10),l?e.style.lineHeight=l:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var r=e.nodeName,i=document.createElement(r);i.innerHTML=" ","TEXTAREA"===r.toUpperCase()&&i.setAttribute("rows","1");var s=o(e,"font-size");i.style.fontSize=s,i.style.padding="0px",i.style.border="0px";var a=document.body;a.appendChild(i),n=i.offsetHeight,a.removeChild(i)}return n}},5372:(e,t,n)=>{"use strict";var o=n(9567);function l(){}function r(){}r.resetWarningCache=l,e.exports=function(){function e(e,t,n,l,r,i){if(i!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:l};return n.PropTypes=n,n}},2652:(e,t,n)=>{e.exports=n(5372)()},9567:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5438:function(e,t,n){"use strict";var o,l=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var l in t=arguments[n])Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l]);return e},i=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(o=Object.getOwnPropertySymbols(e);l<o.length;l++)t.indexOf(o[l])<0&&(n[o[l]]=e[o[l]])}return n};t.__esModule=!0;var s=n(9196),a=n(2652),c=n(6411),u=n(9894),d="autosize:resized",p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return l(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,o=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||o?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(d,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(d,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),o=(t.onChange,t.style),l=(t.innerRef,t.children),a=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return s.createElement("textarea",r({},a,{onChange:this.onChange,style:u?r({},o,{maxHeight:u}):o,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),l)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:a.number,maxRows:a.number,onResize:a.func,innerRef:a.any,async:a.bool},t}(s.Component);t.TextareaAutosize=s.forwardRef((function(e,t){return s.createElement(p,r({},e,{innerRef:t}))}))},773:(e,t,n)=>{"use strict";var o=n(5438);t.Z=o.TextareaAutosize},4793:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",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ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z"},n=Object.keys(t).join("|"),o=new RegExp(n,"g"),l=new RegExp(n,""),r=function(e){return e.replace(o,(function(e){return t[e]}))};e.exports=r,e.exports.has=function(e){return!!e.match(l)},e.exports.remove=r},3124:e=>{var t=e.exports=function(e){return new n(e)};function n(e){this.value=e}function o(e,t,n){var o=[],i=[],u=!0;return function e(d){var p=n?l(d):d,m={},g=!0,h={node:p,node_:d,path:[].concat(o),parent:i[i.length-1],parents:i,key:o.slice(-1)[0],isRoot:0===o.length,level:o.length,circular:null,update:function(e,t){h.isRoot||(h.parent.node[h.key]=e),h.node=e,t&&(g=!1)},delete:function(e){delete h.parent.node[h.key],e&&(g=!1)},remove:function(e){s(h.parent.node)?h.parent.node.splice(h.key,1):delete h.parent.node[h.key],e&&(g=!1)},keys:null,before:function(e){m.before=e},after:function(e){m.after=e},pre:function(e){m.pre=e},post:function(e){m.post=e},stop:function(){u=!1},block:function(){g=!1}};if(!u)return h;function f(){if("object"==typeof h.node&&null!==h.node){h.keys&&h.node_===h.node||(h.keys=r(h.node)),h.isLeaf=0==h.keys.length;for(var e=0;e<i.length;e++)if(i[e].node_===d){h.circular=i[e];break}}else h.isLeaf=!0,h.keys=null;h.notLeaf=!h.isLeaf,h.notRoot=!h.isRoot}f();var v=t.call(h,h.node);return void 0!==v&&h.update&&h.update(v),m.before&&m.before.call(h,h.node),g?("object"!=typeof h.node||null===h.node||h.circular||(i.push(h),f(),a(h.keys,(function(t,l){o.push(t),m.pre&&m.pre.call(h,h.node[t],t);var r=e(h.node[t]);n&&c.call(h.node,t)&&(h.node[t]=r.node),r.isLast=l==h.keys.length-1,r.isFirst=0==l,m.post&&m.post.call(h,r),o.pop()})),i.pop()),m.after&&m.after.call(h,h.node),h):h}(e).node}function l(e){if("object"==typeof e&&null!==e){var t;if(s(e))t=[];else if("[object Date]"===i(e))t=new Date(e.getTime?e.getTime():e);else if("[object RegExp]"===i(e))t=new RegExp(e);else if(function(e){return"[object Error]"===i(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===i(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===i(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===i(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},o=function(){};o.prototype=n,t=new o}return a(r(e),(function(n){t[n]=e[n]})),t}return e}n.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var o=e[n];if(!t||!c.call(t,o)){t=void 0;break}t=t[o]}return t},n.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var o=e[n];if(!t||!c.call(t,o))return!1;t=t[o]}return!0},n.prototype.set=function(e,t){for(var n=this.value,o=0;o<e.length-1;o++){var l=e[o];c.call(n,l)||(n[l]={}),n=n[l]}return n[e[o]]=t,t},n.prototype.map=function(e){return o(this.value,e,!0)},n.prototype.forEach=function(e){return this.value=o(this.value,e,!1),this.value},n.prototype.reduce=function(e,t){var n=1===arguments.length,o=n?this.value:t;return this.forEach((function(t){this.isRoot&&n||(o=e.call(this,o,t))})),o},n.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},n.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},n.prototype.clone=function(){var e=[],t=[];return function n(o){for(var i=0;i<e.length;i++)if(e[i]===o)return t[i];if("object"==typeof o&&null!==o){var s=l(o);return e.push(o),t.push(s),a(r(o),(function(e){s[e]=n(o[e])})),e.pop(),t.pop(),s}return o}(this.value)};var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function i(e){return Object.prototype.toString.call(e)}var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},a=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};a(r(n.prototype),(function(e){t[e]=function(t){var o=[].slice.call(arguments,1),l=new n(t);return l[e].apply(l,o)}}));var c=Object.hasOwnProperty||function(e,t){return t in e}},9196:e=>{"use strict";e.exports=window.React}},t={};function n(o){var l=t[o];if(void 0!==l)return l.exports;var r=t[o]={exports:{}};return e[o].call(r.exports,r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{AlignmentControl:()=>e_,AlignmentToolbar:()=>t_,Autocomplete:()=>d_,BlockAlignmentControl:()=>Lr,BlockAlignmentToolbar:()=>Mr,BlockBreadcrumb:()=>v_,BlockColorsStyleSelector:()=>E_,BlockContextProvider:()=>jr,BlockControls:()=>ko,BlockEdit:()=>Zr,BlockEditorKeyboardShortcuts:()=>_C,BlockEditorProvider:()=>Nu,BlockFormatControls:()=>_o,BlockIcon:()=>wu,BlockInspector:()=>pC,BlockList:()=>Kh,BlockMover:()=>Xm,BlockNavigationDropdown:()=>U_,BlockPreview:()=>ap,BlockSelectionClearer:()=>Mu,BlockSettingsMenu:()=>ch,BlockSettingsMenuControls:()=>lh,BlockStyles:()=>q_,BlockTitle:()=>Vm,BlockToolbar:()=>bh,BlockTools:()=>hC,BlockVerticalAlignmentControl:()=>Yl,BlockVerticalAlignmentToolbar:()=>Zl,ButtonBlockAppender:()=>xm,ButtonBlockerAppender:()=>Im,ColorPalette:()=>dk,ColorPaletteControl:()=>pk,ContrastChecker:()=>Uf,CopyHandler:()=>Fg,DefaultBlockAppender:()=>wm,FontSizePicker:()=>Tv,InnerBlocks:()=>Gh,Inserter:()=>Sm,InspectorAdvancedControls:()=>fl,InspectorControls:()=>vl,JustifyContentControl:()=>Jl,JustifyToolbar:()=>er,LineHeightControl:()=>dv,MediaPlaceholder:()=>Jy,MediaReplaceFlow:()=>Ky,MediaUpload:()=>Uy,MediaUploadCheck:()=>Wy,MultiSelectScrollIntoView:()=>kC,NavigableToolbar:()=>tg,ObserveTyping:()=>SC,PanelColorSettings:()=>eE,PlainText:()=>RE,RichText:()=>PE,RichTextShortcut:()=>OE,RichTextToolbarButton:()=>zE,SETTINGS_DEFAULTS:()=>v,SkipToSelectedBlock:()=>nC,ToolSelector:()=>HE,Typewriter:()=>xC,URLInput:()=>ay,URLInputButton:()=>$E,URLPopover:()=>Zy,Warning:()=>Xr,WritingFlow:()=>Ku,__experimentalBlockAlignmentMatrixControl:()=>h_,__experimentalBlockFullHeightAligmentControl:()=>m_,__experimentalBlockPatternSetup:()=>ik,__experimentalBlockPatternsList:()=>Np,__experimentalBlockVariationPicker:()=>Z_,__experimentalBlockVariationTransforms:()=>ck,__experimentalBorderRadiusControl:()=>af,__experimentalColorGradientControl:()=>zf,__experimentalColorGradientSettingsDropdown:()=>Gf,__experimentalDateFormatPicker:()=>hk,__experimentalDuotoneControl:()=>fb,__experimentalFontAppearanceControl:()=>uv,__experimentalFontFamilyControl:()=>yv,__experimentalGetBorderClassesAndStyles:()=>Pb,__experimentalGetColorClassesAndStyles:()=>Mb,__experimentalGetElementClassName:()=>DC,__experimentalGetGapCSSValue:()=>Vl,__experimentalGetGradientClass:()=>If,__experimentalGetGradientObjectByGradientValue:()=>Tf,__experimentalGetMatchingVariation:()=>zC,__experimentalGetSpacingClassesAndStyles:()=>Db,__experimentalImageEditingProvider:()=>Hk,__experimentalImageEditor:()=>Qk,__experimentalImageSizeControl:()=>ey,__experimentalImageURLInputUI:()=>JE,__experimentalInspectorPopoverHeader:()=>MC,__experimentalLayoutStyle:()=>yr,__experimentalLetterSpacingControl:()=>Xv,__experimentalLibrary:()=>vC,__experimentalLinkControl:()=>Fy,__experimentalLinkControlSearchInput:()=>Ny,__experimentalLinkControlSearchItem:()=>vy,__experimentalLinkControlSearchResults:()=>Cy,__experimentalListView:()=>H_,__experimentalPanelColorGradientSettings:()=>yk,__experimentalPreviewOptions:()=>eC,__experimentalPublishDateTimePicker:()=>RC,__experimentalRecursionProvider:()=>NC,__experimentalResponsiveBlockControl:()=>DE,__experimentalSpacingSizesControl:()=>ll,__experimentalTextDecorationControl:()=>Vv,__experimentalTextTransformControl:()=>qv,__experimentalUnitControl:()=>GE,__experimentalUseBlockOverlayActive:()=>mu,__experimentalUseBlockPreview:()=>cp,__experimentalUseBorderProps:()=>Lb,__experimentalUseColorProps:()=>Ab,__experimentalUseCustomSides:()=>Dl,__experimentalUseGradient:()=>Pf,__experimentalUseHasRecursion:()=>PC,__experimentalUseMultipleOriginColorsAndGradients:()=>gf,__experimentalUseResizeCanvas:()=>tC,__unstableBlockNameContext:()=>vh,__unstableBlockSettingsMenuFirstItem:()=>jg,__unstableBlockToolbarLastItem:()=>Mg,__unstableDuotoneFilter:()=>np,__unstableDuotoneStylesheet:()=>ep,__unstableDuotoneUnsetStylesheet:()=>tp,__unstableEditorStyles:()=>Xd,__unstableGetValuesFromColors:()=>Jd,__unstableIframe:()=>Zu,__unstableInserterMenuExtension:()=>mm,__unstablePresetDuotoneFilter:()=>op,__unstableRichTextInputEvent:()=>FE,__unstableUseBlockSelectionClearer:()=>Lu,__unstableUseClipboardHandler:()=>zg,__unstableUseMouseMoveTypingReset:()=>EC,__unstableUseTypewriter:()=>IC,__unstableUseTypingObserver:()=>CC,createCustomColorsHOC:()=>Ub,getColorClassName:()=>pf,getColorObjectByAttributeValues:()=>uf,getColorObjectByColorValue:()=>df,getFontSize:()=>Bv,getFontSizeClass:()=>xv,getFontSizeObjectByValue:()=>Iv,getGradientSlugByValue:()=>Nf,getGradientValueBySlug:()=>xf,getPxFromCssUnit:()=>qC,getTypographyClassesAndStyles:()=>Ob,store:()=>co,storeConfig:()=>ao,transformStyles:()=>Yd,useBlockDisplayInformation:()=>zm,useBlockEditContext:()=>go,useBlockProps:()=>gu,useCachedTruthy:()=>zb,useInnerBlocksProps:()=>Hh,useSetting:()=>Yo,withColorContext:()=>uk,withColors:()=>Wb,withFontSizes:()=>Kb});var e={};n.r(e),n.d(e,{__experimentalGetActiveBlockIdByBlockNames:()=>Vt,__experimentalGetAllowedBlocks:()=>_t,__experimentalGetAllowedPatterns:()=>Ct,__experimentalGetBlockListSettingsForBlocks:()=>Tt,__experimentalGetDirectInsertBlock:()=>kt,__experimentalGetGlobalBlocksByName:()=>ee,__experimentalGetLastBlockAttributeChanges:()=>Lt,__experimentalGetParsedPattern:()=>yt,__experimentalGetPatternTransformItems:()=>wt,__experimentalGetPatternsByBlockTypes:()=>St,__experimentalGetReusableBlockTitle:()=>Nt,__unstableGetBlockWithoutInnerBlocks:()=>K,__unstableGetClientIdWithClientIdsTree:()=>Y,__unstableGetClientIdsTree:()=>Z,__unstableGetContentLockingParent:()=>Wt,__unstableGetEditorMode:()=>At,__unstableGetSelectedBlocksWithPartialSelection:()=>Re,__unstableGetTemporarilyEditingAsBlocks:()=>$t,__unstableGetVisibleBlocks:()=>Ut,__unstableHasActiveBlockOverlayActive:()=>jt,__unstableIsFullySelected:()=>Ne,__unstableIsLastBlockChangeIgnored:()=>Pt,__unstableIsSelectionCollapsed:()=>Pe,__unstableIsSelectionMergeable:()=>Me,__unstableIsWithinBlockOverlay:()=>Kt,__unstableSelectionHasUnmergeableBlock:()=>Le,areInnerBlocksControlled:()=>Ft,canEditBlock:()=>ct,canInsertBlockType:()=>ot,canInsertBlocks:()=>lt,canLockBlockType:()=>ut,canMoveBlock:()=>st,canMoveBlocks:()=>at,canRemoveBlock:()=>rt,canRemoveBlocks:()=>it,didAutomaticChange:()=>Ot,getAdjacentBlockClientId:()=>fe,getBlock:()=>j,getBlockAttributes:()=>$,getBlockCount:()=>ne,getBlockHierarchyRootClientId:()=>ge,getBlockIndex:()=>De,getBlockInsertionPoint:()=>Ze,getBlockListSettings:()=>Bt,getBlockMode:()=>Ue,getBlockName:()=>U,getBlockOrder:()=>Ae,getBlockParents:()=>pe,getBlockParentsByBlockName:()=>me,getBlockRootClientId:()=>de,getBlockSelectionEnd:()=>ie,getBlockSelectionStart:()=>re,getBlockTransformItems:()=>vt,getBlocks:()=>q,getBlocksByClientId:()=>te,getClientIdsOfDescendants:()=>Q,getClientIdsWithDescendants:()=>X,getDraggedBlockClientIds:()=>je,getFirstMultiSelectedBlockClientId:()=>Ce,getGlobalBlockCount:()=>J,getInserterItems:()=>ft,getLastMultiSelectedBlockClientId:()=>Se,getLowestCommonAncestorWithSelectedBlock:()=>he,getMultiSelectedBlockClientIds:()=>ye,getMultiSelectedBlocks:()=>Ee,getMultiSelectedBlocksEndClientId:()=>Te,getMultiSelectedBlocksStartClientId:()=>xe,getNextBlockClientId:()=>be,getPreviousBlockClientId:()=>ve,getSelectedBlock:()=>ue,getSelectedBlockClientId:()=>ce,getSelectedBlockClientIds:()=>ke,getSelectedBlockCount:()=>se,getSelectedBlocksInitialCaretPosition:()=>_e,getSelectionEnd:()=>le,getSelectionStart:()=>oe,getSettings:()=>It,getTemplate:()=>Je,getTemplateLock:()=>et,hasBlockMovingClientId:()=>Dt,hasInserterItems:()=>bt,hasMultiSelection:()=>Ve,hasSelectedBlock:()=>ae,hasSelectedInnerBlock:()=>ze,isAncestorBeingDragged:()=>qe,isAncestorMultiSelected:()=>Ie,isBlockBeingDragged:()=>Ke,isBlockHighlighted:()=>zt,isBlockInsertionPointVisible:()=>Qe,isBlockMultiSelected:()=>Be,isBlockSelected:()=>Oe,isBlockValid:()=>W,isBlockVisible:()=>Gt,isBlockWithinSelection:()=>Fe,isCaretWithinFormattedText:()=>Ye,isDraggingBlocks:()=>$e,isFirstMultiSelectedBlock:()=>we,isLastBlockChangePersistent:()=>xt,isMultiSelecting:()=>He,isNavigationMode:()=>Rt,isSelectionEnabled:()=>Ge,isTyping:()=>We,isValidTemplate:()=>Xe,wasBlockJustInserted:()=>Ht});var t={};n.r(t),n.d(t,{__unstableDeleteSelection:()=>xn,__unstableExpandSelection:()=>Nn,__unstableMarkAutomaticChange:()=>Yn,__unstableMarkLastChangeAsPersistent:()=>Kn,__unstableMarkNextChangeAsNotPersistent:()=>qn,__unstableSaveReusableBlock:()=>jn,__unstableSetEditorMode:()=>Qn,__unstableSetTemporarilyEditingAsBlocks:()=>io,__unstableSplitSelection:()=>Tn,clearSelectedBlock:()=>dn,duplicateBlocks:()=>Jn,enterFormattedText:()=>Vn,exitFormattedText:()=>Hn,flashBlock:()=>oo,hideInsertionPoint:()=>wn,insertAfterBlock:()=>to,insertBeforeBlock:()=>eo,insertBlock:()=>En,insertBlocks:()=>Cn,insertDefaultBlock:()=>Un,mergeBlocks:()=>Pn,moveBlockToPosition:()=>yn,moveBlocksDown:()=>vn,moveBlocksToPosition:()=>kn,moveBlocksUp:()=>bn,multiSelect:()=>un,receiveBlocks:()=>tn,removeBlock:()=>Mn,removeBlocks:()=>Ln,replaceBlock:()=>hn,replaceBlocks:()=>gn,replaceInnerBlocks:()=>Rn,resetBlocks:()=>Xt,resetSelection:()=>en,selectBlock:()=>ln,selectNextBlock:()=>sn,selectPreviousBlock:()=>rn,selectionChange:()=>Gn,setBlockMovingClientId:()=>Xn,setBlockVisibility:()=>ro,setHasControlledInnerBlocks:()=>lo,setNavigationMode:()=>Zn,setTemplateValidity:()=>Bn,showInsertionPoint:()=>Sn,startDraggingBlocks:()=>zn,startMultiSelect:()=>an,startTyping:()=>Dn,stopDraggingBlocks:()=>Fn,stopMultiSelect:()=>cn,stopTyping:()=>On,synchronizeTemplate:()=>In,toggleBlockHighlight:()=>no,toggleBlockMode:()=>An,toggleSelection:()=>pn,updateBlock:()=>on,updateBlockAttributes:()=>nn,updateBlockListSettings:()=>Wn,updateSettings:()=>$n,validateBlocksToTemplate:()=>Jt});const l=window.wp.blocks,r=window.wp.hooks;function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}(0,r.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",(function(e){const{apiVersion:t=1}=e;return t<2&&(0,l.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}));const s=window.wp.element;var a=n(4403),c=n.n(a);const u=window.lodash,d=window.wp.compose,p=window.wp.data,m=window.wp.components,g={default:(0,m.createSlotFill)("BlockControls"),block:(0,m.createSlotFill)("BlockControlsBlock"),inline:(0,m.createSlotFill)("BlockFormatControls"),other:(0,m.createSlotFill)("BlockControlsOther"),parent:(0,m.createSlotFill)("BlockControlsParent")},h=window.wp.i18n,f={insertUsage:{}},v={alignWide:!1,supportsLayout:!0,colors:[{name:(0,h.__)("Black"),slug:"black",color:"#000000"},{name:(0,h.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,h.__)("White"),slug:"white",color:"#ffffff"},{name:(0,h.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,h.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,h.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,h.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,h.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,h.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,h.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,h.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,h.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,h._x)("Small","font size name"),size:13,slug:"small"},{name:(0,h._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,h._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,h._x)("Large","font size name"),size:36,slug:"large"},{name:(0,h._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,h.__)("Thumbnail")},{slug:"medium",name:(0,h.__)("Medium")},{slug:"large",name:(0,h.__)("Large")},{slug:"full",name:(0,h.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,canLockBlocks:!0,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__unstableGalleryWithImageBlocks:!1,generateAnchors:!1,gradients:[{name:(0,h.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:(0,h.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:(0,h.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:(0,h.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:(0,h.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:(0,h.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:(0,h.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,h.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:(0,h.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:(0,h.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:(0,h.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,h.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function b(e,t,n){return[...e.slice(0,n),...(0,u.castArray)(t),...e.slice(n)]}function _(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const l=[...e];return l.splice(t,o),b(l,e.slice(t,t+o),n)}const k=e=>e;function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n={[t]:[]};return e.forEach((e=>{const{clientId:o,innerBlocks:l}=e;n[t].push(o),Object.assign(n,y(l,o))})),n}function E(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce(((e,n)=>Object.assign(e,{[n.clientId]:t},E(n.innerBlocks,n.clientId))),{})}function C(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:k;const n={},o=[...e];for(;o.length;){const{innerBlocks:e,...l}=o.shift();o.push(...e),n[l.clientId]=t(l)}return n}function S(e){return C(e,(e=>(0,u.omit)(e,"attributes")))}function w(e){return C(e,(e=>e.attributes))}function B(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&(0,u.isEqual)(e.clientIds,t.clientIds)&&function(e,t){return(0,u.isEqual)(Object.keys(e),Object.keys(t))}(e.attributes,t.attributes)}function I(e,t){const n={},o=[...t],l=[...t];for(;o.length;){const e=o.shift();o.push(...e.innerBlocks),l.push(...e.innerBlocks)}for(const e of l)n[e.clientId]={};for(const t of l)n[t.clientId]=Object.assign(n[t.clientId],{...e.byClientId[t.clientId],attributes:e.attributes[t.clientId],innerBlocks:t.innerBlocks.map((e=>n[e.clientId]))});return n}function x(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const l=new Set([]),r=new Set;for(const t of n){let n=o?t:e.parents[t];do{if(e.controlledInnerBlocks[n]){r.add(n);break}l.add(n),n=e.parents[n]}while(void 0!==n)}for(const e of l)t[e]={...t[e]};for(const n of l)t[n].innerBlocks=(e.order[n]||[]).map((e=>t[e]));for(const n of r)t["controlled||"+n]={innerBlocks:(e.order[n]||[]).map((e=>t[e]))};return t}const T=(0,u.flow)(p.combineReducers,(e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:o}=n;if(e===o)return t;(t={...t}).attributes=(0,u.mapValues)(t.attributes,((n,l)=>{const{name:r}=t.byClientId[l];return"core/block"===r&&n.ref===e?{...n,ref:o}:n}))}return e(t,n)}),(e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const o=e(t,n);if(o===t)return t;switch(o.tree=t.tree?t.tree:{},n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const e=I(o,n.blocks);o.tree=x(o,{...o.tree,...e},n.rootClientId?[n.rootClientId]:[""],!0);break}case"UPDATE_BLOCK":o.tree=x(o,{...o.tree,[n.clientId]:{...o.tree[n.clientId],...o.byClientId[n.clientId],attributes:o.attributes[n.clientId]}},[n.clientId],!1);break;case"UPDATE_BLOCK_ATTRIBUTES":{const e=n.clientIds.reduce(((e,t)=>(e[t]={...o.tree[t],attributes:o.attributes[t]},e)),{});o.tree=x(o,{...o.tree,...e},n.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=I(o,n.blocks);o.tree=x(o,{...(0,u.omit)(o.tree,n.replacedClientIds.concat(n.replacedClientIds.filter((t=>!e[t])).map((e=>"controlled||"+e)))),...e},n.blocks.map((e=>e.clientId)),!1);const l=[];for(const e of n.clientIds)void 0===t.parents[e]||""!==t.parents[e]&&!o.byClientId[t.parents[e]]||l.push(t.parents[e]);o.tree=x(o,o.tree,l,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const l of n.clientIds)void 0===t.parents[l]||""!==t.parents[l]&&!o.byClientId[t.parents[l]]||e.push(t.parents[l]);o.tree=x(o,(0,u.omit)(o.tree,n.removedClientIds.concat(n.removedClientIds.map((e=>"controlled||"+e)))),e,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const e=[];n.fromRootClientId?e.push(n.fromRootClientId):e.push(""),n.toRootClientId&&e.push(n.toRootClientId),o.tree=x(o,o.tree,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];o.tree=x(o,o.tree,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=Object.keys((0,u.omitBy)(o.attributes,((e,t)=>"core/block"!==o.byClientId[t].name||e.ref!==n.updatedId)));o.tree=x(o,{...o.tree,...e.reduce(((e,t)=>(e[t]={...o.byClientId[t],attributes:o.attributes[t],innerBlocks:o.tree[t].innerBlocks},e)),{})},e,!1)}}return o}),(e=>(t,n)=>{const o=e=>{let o=e;for(let l=0;l<o.length;l++)!t.order[o[l]]||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[o[l]]||(o===e&&(o=[...o]),o.push(...t.order[o[l]]));return o};if(t)switch(n.type){case"REMOVE_BLOCKS":n={...n,type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:o(n.clientIds)};break;case"REPLACE_BLOCKS":n={...n,type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:o(n.clientIds)}}return e(t,n)}),(e=>(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const o={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...l}=e.shift();e.push(...n),t.controlledInnerBlocks[l.clientId]&&(o[l.clientId]=!0)}}let l=t;t.order[n.rootClientId]&&(l=e(l,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:o,clientIds:t.order[n.rootClientId]}));let r=l;return n.blocks.length&&(r=e(r,{...n,type:"INSERT_BLOCKS",index:0}),r.order={...r.order,...(0,u.reduce)(o,((e,n,o)=>(t.order[o]&&(e[o]=t.order[o]),e)),{})},r.tree={...r.tree,...(0,u.reduce)(o,((e,n,o)=>{const l=`controlled||${o}`;return t.tree[l]&&(e[l]=t.tree[l]),e}),{})}),r}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:S(n.blocks),attributes:w(n.blocks),order:y(n.blocks),parents:E(n.blocks),controlledInnerBlocks:{}},o=I(e,n.blocks);return e.tree={...o,"":{innerBlocks:n.blocks.map((e=>o[e.clientId]))}},e}return e(t,n)}),(function(e){let t,n=!1;return(o,l)=>{let r=e(o,l);const i="MARK_LAST_CHANGE_AS_PERSISTENT"===l.type||n;if(o===r&&!i){var s;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===l.type;const e=null===(s=null==o?void 0:o.isPersistentChange)||void 0===s||s;return o.isPersistentChange===e?o:{...r,isPersistentChange:e}}return r={...r,isPersistentChange:i?!n:!B(l,t)},t=l,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===l.type,r}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,o)=>{const l=e(n,o);return l!==n&&(l.isIgnoredChange=t.has(o.type)),l}}),(e=>(t,n)=>{if("SET_HAS_CONTROLLED_INNER_BLOCKS"===n.type){const o=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:n.clientId,blocks:[]});return e(o,n)}return e(t,n)}))({byClientId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...S(t.blocks)};case"UPDATE_BLOCK":if(!e[t.clientId])return e;const n=(0,u.omit)(t.updates,"attributes");return(0,u.isEmpty)(n)?e:{...e,[t.clientId]:{...e[t.clientId],...n}};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,u.omit)(e,t.replacedClientIds),...S(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},attributes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...w(t.blocks)};case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?{...e,[t.clientId]:{...e[t.clientId],...t.updates.attributes}}:e;case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e[t])))return e;const n=t.clientIds.reduce(((n,o)=>({...n,[o]:(0,u.reduce)(t.uniqueByBlock?t.attributes[o]:t.attributes,((t,n,l)=>{var r,i;return n!==t[l]&&((t=(r=e[o])===(i=t)?{...r}:i)[l]=n),t}),e[o])})),{});return t.clientIds.every((t=>n[t]===e[t]))?e:{...e,...n}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,u.omit)(e,t.replacedClientIds),...w(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},order(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":{const n=y(t.blocks);return{...e,...(0,u.omit)(n,""),"":((null==e?void 0:e[""])||[]).concat(n[""])}}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,o=e[n]||[],l=y(t.blocks,n),{index:r=o.length}=t;return{...e,...l,[n]:b(o,l[n],r)}}case"MOVE_BLOCKS_TO_POSITION":{const{fromRootClientId:n="",toRootClientId:o="",clientIds:l}=t,{index:r=e[o].length}=t;if(n===o){const t=e[o].indexOf(l[0]);return{...e,[o]:_(e[o],t,r,l.length)}}return{...e,[n]:(0,u.without)(e[n],...l),[o]:b(e[o],l,r)}}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:o=""}=t,l=n[0],r=e[o];if(!r.length||l===r[0])return e;const i=r.indexOf(l);return{...e,[o]:_(r,i,i-1,n.length)}}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:o=""}=t,l=n[0],r=n[n.length-1],i=e[o];if(!i.length||r===i[i.length-1])return e;const s=i.indexOf(l);return{...e,[o]:_(i,s,s+1,n.length)}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const o=y(t.blocks);return(0,u.flow)([e=>(0,u.omit)(e,t.replacedClientIds),e=>({...e,...(0,u.omit)(o,"")}),e=>(0,u.mapValues)(e,(e=>(0,u.reduce)(e,((e,t)=>t===n[0]?[...e,...o[""]]:(-1===n.indexOf(t)&&e.push(t),e)),[])))])(e)}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.flow)([e=>(0,u.omit)(e,t.removedClientIds),e=>(0,u.mapValues)(e,(e=>(0,u.without)(e,...t.removedClientIds)))])(e)}return e},parents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":return{...e,...E(t.blocks)};case"INSERT_BLOCKS":return{...e,...E(t.blocks,t.rootClientId||"")};case"MOVE_BLOCKS_TO_POSITION":return{...e,...t.clientIds.reduce(((e,n)=>(e[n]=t.toRootClientId||"",e)),{})};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return{...(0,u.omit)(e,t.replacedClientIds),...E(t.blocks,e[t.clientIds[0]])};case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,clientId:n,hasControlledInnerBlocks:o}=arguments.length>1?arguments[1]:void 0;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:o}:e}});function N(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":{if(-1===t.clientIds.indexOf(e.clientId))return e;const n=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return n?n.clientId===e.clientId?e:{clientId:n.clientId}:{}}}return e}const P=(0,p.combineReducers)({blocks:T,isTyping:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},selection:function(){var e,t,n,o;let l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"SELECTION_CHANGE":return r.clientId?{selectionStart:{clientId:r.clientId,attributeKey:r.attributeKey,offset:r.startOffset},selectionEnd:{clientId:r.clientId,attributeKey:r.attributeKey,offset:r.endOffset}}:{selectionStart:r.start||l.selectionStart,selectionEnd:r.end||l.selectionEnd};case"RESET_SELECTION":const{selectionStart:i,selectionEnd:s}=r;return{selectionStart:i,selectionEnd:s};case"MULTI_SELECT":const{start:a,end:c}=r;return a===(null===(e=l.selectionStart)||void 0===e?void 0:e.clientId)&&c===(null===(t=l.selectionEnd)||void 0===t?void 0:t.clientId)?l:{selectionStart:{clientId:a},selectionEnd:{clientId:c}};case"RESET_BLOCKS":const u=null==l||null===(n=l.selectionStart)||void 0===n?void 0:n.clientId,d=null==l||null===(o=l.selectionEnd)||void 0===o?void 0:o.clientId;if(!u&&!d)return l;if(!r.blocks.some((e=>e.clientId===u)))return{selectionStart:{},selectionEnd:{}};if(!r.blocks.some((e=>e.clientId===d)))return{...l,selectionEnd:l.selectionStart}}return{selectionStart:N(l.selectionStart,r),selectionEnd:N(l.selectionEnd,r)}},isMultiSelecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_SELECTION":return t.isSelectionEnabled}return e},initialPosition:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["MULTI_SELECT","SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return(0,u.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;return t.settings?(0,u.isEqual)(e[n],t.settings)?e:{...e,[n]:t.settings}:e.hasOwnProperty(n)?(0,u.omit)(e,n):e}}return e},insertionPoint:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":const{rootClientId:e,index:n,__unstableWithInserter:o}=t;return{rootClientId:e,index:n,__unstableWithInserter:o};case"HIDE_INSERTION_POINT":return null}return e},template:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE_VALIDITY":return{...e,isValid:t.isValid}}return e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return{...e,...t.settings}}return e},preferences:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(((e,n)=>{const{attributes:o,name:r}=n,i=(0,p.select)(l.store).getActiveBlockVariation(r,o);let s=null!=i&&i.name?`${r}/${i.name}`:r;const a={name:s};return"core/block"===r&&(a.ref=o.ref,s+="/"+o.ref),{...e,insertUsage:{...e.insertUsage,[s]:{time:t.time,count:e.insertUsage[s]?e.insertUsage[s].count+1:1,insert:a}}}}),e)}return e},lastBlockAttributesChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return{[t.clientId]:t.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce(((e,n)=>({...e,[n]:t.uniqueByBlock?t.attributes[n]:t.attributes})),{})}return e},editorMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"edit",t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"===t.type&&"navigation"===e?"edit":"SET_EDITOR_MODE"===t.type?t.mode:e},hasBlockMovingClientId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_EDITOR_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"SET_BLOCK_VISIBILITY":case"START_TYPING":case"STOP_TYPING":case"UPDATE_BLOCK_LIST_SETTINGS":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:o}=t;return o?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INSERT_BLOCKS":return n.blocks.length?{clientId:n.blocks[0].clientId,source:null===(e=n.meta)||void 0===e?void 0:e.source}:t;case"RESET_BLOCKS":return{}}return t},temporarilyEditingAsBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.temporarilyEditingAsBlocks:e},blockVisibility:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_VISIBILITY"===t.type?{...e,...t.updates}:e}});var L={};function M(e){return[e]}function R(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}function A(e,t){var n,o=t||M;function l(e){var t,o,l,r,i,s=n,a=!0;for(t=0;t<e.length;t++){if(!(i=o=e[t])||"object"!=typeof i){a=!1;break}s.has(o)?s=s.get(o):(l=new WeakMap,s.set(o,l),s=l)}return s.has(L)||((r=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=a,s.set(L,r)),s.get(L)}function r(){n=new WeakMap}function i(){var t,n,r,i,s,a=arguments.length;for(i=new Array(a),r=0;r<a;r++)i[r]=arguments[r];for((t=l(s=o.apply(null,i))).isUniqueByDependants||(t.lastDependants&&!R(s,t.lastDependants,0)&&t.clear(),t.lastDependants=s),n=t.head;n;){if(R(n.args,i,1))return n!==t.head&&(n.prev.next=n.next,n.next&&(n.next.prev=n.prev),n.next=t.head,n.prev=null,t.head.prev=n,t.head=n),n.val;n=n.next}return n={val:e.apply(null,i)},i[0]=null,n.args=i,t.head&&(t.head.prev=n,n.next=t.head),t.head=n,n.val}return i.getDependants=o,i.clear=r,r(),i}const D=window.wp.primitives,O=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})),z=window.wp.richText,F=window.wp.deprecated;var V=n.n(F);function H(e){const{multiline:t,__unstableMultilineWrapperTags:n,__unstablePreserveWhiteSpace:o}=e;return{multilineTag:t,multilineWrapperTags:n,preserveWhiteSpace:o}}const G=[];function U(e,t){const n=e.blocks.byClientId[t],o="core/social-link";if("web"!==s.Platform.OS&&(null==n?void 0:n.name)===o){const n=e.blocks.attributes[t],{service:l}=n;return l?`core/social-link-${l}`:o}return n?n.name:null}function W(e,t){const n=e.blocks.byClientId[t];return!!n&&n.isValid}function $(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}function j(e,t){return e.blocks.byClientId[t]?e.blocks.tree[t]:null}const K=A(((e,t)=>{const n=e.blocks.byClientId[t];return n?{...n,attributes:$(e,t)}:null}),((e,t)=>[e.blocks.byClientId[t],e.blocks.attributes[t]]));function q(e,t){var n;const o=t&&Ft(e,t)?"controlled||"+t:t||"";return(null===(n=e.blocks.tree[o])||void 0===n?void 0:n.innerBlocks)||G}const Y=A(((e,t)=>({clientId:t,innerBlocks:Z(e,t)})),(e=>[e.blocks.order])),Z=A((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,u.map)(Ae(e,t),(t=>Y(e,t)))}),(e=>[e.blocks.order])),Q=A(((e,t)=>{const n=[];for(const o of t)for(const t of Ae(e,o))n.push(t,...Q(e,[t]));return n}),(e=>[e.blocks.order])),X=A((e=>{const t=[];for(const n of Ae(e))t.push(n,...Q(e,[n]));return t}),(e=>[e.blocks.order])),J=A(((e,t)=>{const n=X(e);return t?(0,u.reduce)(n,((n,o)=>e.blocks.byClientId[o].name===t?n+1:n),0):n.length}),(e=>[e.blocks.order,e.blocks.byClientId])),ee=A(((e,t)=>{if(!t)return G;const n=X(e).filter((n=>e.blocks.byClientId[n].name===t));return n.length>0?n:G}),(e=>[e.blocks.order,e.blocks.byClientId])),te=A(((e,t)=>(0,u.map)((0,u.castArray)(t),(t=>j(e,t)))),((e,t)=>(0,u.map)((0,u.castArray)(t),(t=>e.blocks.tree[t]))));function ne(e,t){return Ae(e,t).length}function oe(e){return e.selection.selectionStart}function le(e){return e.selection.selectionEnd}function re(e){return e.selection.selectionStart.clientId}function ie(e){return e.selection.selectionEnd.clientId}function se(e){return ye(e).length||(e.selection.selectionStart.clientId?1:0)}function ae(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function ce(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function ue(e){const t=ce(e);return t?j(e,t):null}function de(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}const pe=A((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=[];let l=t;for(;e.blocks.parents[l];)l=e.blocks.parents[l],o.push(l);return n?o:o.reverse()}),(e=>[e.blocks.parents])),me=A((function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const l=pe(e,t,o);return(0,u.map)((0,u.filter)((0,u.map)(l,(t=>({id:t,name:U(e,t)}))),(e=>{let{name:t}=e;return Array.isArray(n)?n.includes(t):t===n})),(e=>{let{id:t}=e;return t}))}),(e=>[e.blocks.parents]));function ge(e,t){let n,o=t;do{n=o,o=e.blocks.parents[o]}while(o);return n}function he(e,t){const n=ce(e),o=[...pe(e,t),t],l=[...pe(e,n),n];let r;const i=Math.min(o.length,l.length);for(let e=0;e<i&&o[e]===l[e];e++)r=o[e];return r}function fe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=ce(e)),void 0===t&&(t=n<0?Ce(e):Se(e)),!t)return null;const o=de(e,t);if(null===o)return null;const{order:l}=e.blocks,r=l[o],i=r.indexOf(t),s=i+1*n;return s<0||s===r.length?null:r[s]}function ve(e,t){return fe(e,t,-1)}function be(e,t){return fe(e,t,1)}function _e(e){return e.initialPosition}const ke=A((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(void 0===t.clientId||void 0===n.clientId)return G;if(t.clientId===n.clientId)return[t.clientId];const o=de(e,t.clientId);if(null===o)return G;const l=Ae(e,o),r=l.indexOf(t.clientId),i=l.indexOf(n.clientId);return r>i?l.slice(i,r+1):l.slice(r,i+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function ye(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?G:ke(e)}const Ee=A((e=>{const t=ye(e);return t.length?t.map((t=>j(e,t))):G}),(e=>[...ke.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function Ce(e){return ye(e)[0]||null}function Se(e){const t=ye(e);return t[t.length-1]||null}function we(e,t){return Ce(e)===t}function Be(e,t){return-1!==ye(e).indexOf(t)}const Ie=A(((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=de(e,n),o=Be(e,n);return o}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function xe(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function Te(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Ne(e){const t=oe(e),n=le(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function Pe(e){const t=oe(e),n=le(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function Le(e){return ke(e).some((t=>{const n=U(e,t);return!(0,l.getBlockType)(n).merge}))}function Me(e,t){const n=oe(e),o=le(e);if(n.clientId===o.clientId)return!1;if(!n.attributeKey||!o.attributeKey||void 0===n.offset||void 0===o.offset)return!1;const r=de(e,n.clientId);if(r!==de(e,o.clientId))return!1;const i=Ae(e,r);let s,a;i.indexOf(n.clientId)>i.indexOf(o.clientId)?(s=o,a=n):(s=n,a=o);const c=t?a.clientId:s.clientId,u=t?s.clientId:a.clientId,d=U(e,c);if(!(0,l.getBlockType)(d).merge)return!1;const p=j(e,u);if(p.name===d)return!0;const m=(0,l.switchToBlockType)(p,d);return m&&m.length}const Re=e=>{const t=oe(e),n=le(e);if(t.clientId===n.clientId)return G;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return G;const o=de(e,t.clientId);if(o!==de(e,n.clientId))return G;const r=Ae(e,o),i=r.indexOf(t.clientId),s=r.indexOf(n.clientId),[a,c]=i>s?[n,t]:[t,n],u=j(e,a.clientId),d=(0,l.getBlockType)(u.name),p=j(e,c.clientId),m=(0,l.getBlockType)(p.name),g=u.attributes[a.attributeKey],h=p.attributes[c.attributeKey],f=d.attributes[a.attributeKey],v=m.attributes[c.attributeKey];let b=(0,z.create)({html:g,...H(f)}),_=(0,z.create)({html:h,...H(v)});return b=(0,z.remove)(b,0,a.offset),_=(0,z.remove)(_,c.offset,_.text.length),[{...u,attributes:{...u.attributes,[a.attributeKey]:(0,z.toHTMLString)({value:b,...H(f)})}},{...p,attributes:{...p.attributes,[c.attributeKey]:(0,z.toHTMLString)({value:_,...H(v)})}}]};function Ae(e,t){return e.blocks.order[t||""]||G}function De(e,t){return Ae(e,de(e,t)).indexOf(t)}function Oe(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function ze(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,u.some)(Ae(e,t),(t=>Oe(e,t)||Be(e,t)||n&&ze(e,t,n)))}function Fe(e,t){if(!t)return!1;const n=ye(e),o=n.indexOf(t);return o>-1&&o<n.length-1}function Ve(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId!==n.clientId}function He(e){return e.isMultiSelecting}function Ge(e){return e.isSelectionEnabled}function Ue(e,t){return e.blocksMode[t]||"visual"}function We(e){return e.isTyping}function $e(e){return!!e.draggedBlocks.length}function je(e){return e.draggedBlocks}function Ke(e,t){return e.draggedBlocks.includes(t)}function qe(e,t){if(!$e(e))return!1;const n=pe(e,t);return(0,u.some)(n,(t=>Ke(e,t)))}function Ye(){return V()('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}function Ze(e){let t,n;const{insertionPoint:o,selection:{selectionEnd:l}}=e;if(null!==o)return o;const{clientId:r}=l;return r?(t=de(e,r)||void 0,n=De(e,l.clientId)+1):n=Ae(e).length,{rootClientId:t,index:n}}function Qe(e){return null!==e.insertionPoint}function Xe(e){return e.template.isValid}function Je(e){return e.settings.template}function et(e,t){if(!t)return e.settings.templateLock;const n=Bt(e,t);return n?n.templateLock:void 0}const tt=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return"boolean"==typeof e?e:Array.isArray(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},nt=function(e,t){let n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t&&"object"==typeof t?(n=t,t=n.name):n=(0,l.getBlockType)(t),!n)return!1;const{allowedBlockTypes:i}=It(e),s=tt(i,t,!0);if(!s)return!1;const a=!!et(e,o);if(a)return!1;const c=Bt(e,o);if(o&&void 0===c)return!1;const d=null==c?void 0:c.allowedBlocks,p=tt(d,t),m=n.parent,g=U(e,o),h=tt(m,g);let f=!0;const v=n.ancestor;if(v){const t=[o,...pe(e,o)];f=(0,u.some)(t,(t=>tt(v,U(e,t))))}const b=f&&(null===p&&null===h||!0===p||!0===h);return b?(0,r.applyFilters)("blockEditor.__unstableCanInsertBlockType",b,n,o,{getBlock:j.bind(null,e),getBlockParentsByBlockName:me.bind(null,e)}):b},ot=A(nt,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]));function lt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>ot(e,U(e,t),n)))}function rt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=$(e,t);if(null===o)return!0;const{lock:l}=o,r=!!et(e,n);return void 0===l||void 0===(null==l?void 0:l.remove)?!r:!(null!=l&&l.remove)}function it(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>rt(e,t,n)))}function st(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=$(e,t);if(null===o)return;const{lock:l}=o,r="all"===et(e,n);return void 0===l||void 0===(null==l?void 0:l.move)?!r:!(null!=l&&l.move)}function at(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>st(e,t,n)))}function ct(e,t){const n=$(e,t);if(null===n)return!0;const{lock:o}=n;return!(null!=o&&o.edit)}function ut(e,t){var n;return!!(0,l.hasBlockSupport)(t,"lock",!0)&&!(null===(n=e.settings)||void 0===n||!n.canLockBlocks)}function dt(e,t){var n,o;return null!==(n=null===(o=e.preferences.insertUsage)||void 0===o?void 0:o[t])&&void 0!==n?n:null}const pt=(e,t,n)=>!!(0,l.hasBlockSupport)(t,"inserter",!0)&&nt(e,t.name,n),mt=(e,t)=>n=>{const o=`${t.id}/${n.name}`,{time:l,count:r=0}=dt(e,o)||{};return{...t,id:o,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:{...t.initialAttributes,...n.attributes},innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:gt(l,r)}},gt=(e,t)=>{if(!e)return t;const n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},ht=(e,t)=>{let{buildScope:n="inserter"}=t;return t=>{const o=t.name;let r=!1;(0,l.hasBlockSupport)(t.name,"multiple",!0)||(r=(0,u.some)(te(e,X(e)),{name:t.name}));const{time:i,count:s=0}=dt(e,o)||{},a={id:o,name:t.name,title:t.title,icon:t.icon,isDisabled:r,frecency:gt(i,s)};if("transform"===n)return a;const c=(0,l.getBlockVariations)(t.name,"inserter");return{...a,initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:c,example:t.example,utility:1}}},ft=A((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=ht(e,{buildScope:"inserter"}),o=/^\s*<!--\s+(\/)?wp:([a-z][a-z0-9_-]*\/)?([a-z][a-z0-9_-]*)\s+({(?:(?=([^}]+|}+(?=})|(?!}\s+\/?-->)[^])*)\5|[^]*?)}\s+)?(\/)?-->/,r=t=>{let n=O;if("web"===s.Platform.OS){const e=("string"==typeof t.content.raw?t.content.raw:t.content).match(o);if(e){const[,,t="core/",o]=e,r=(0,l.getBlockType)(t+o);r&&(n=r.icon)}}const r=`core/block/${t.id}`,{time:i,count:a=0}=dt(e,r)||{},c=gt(i,a);return{id:r,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:c}},i=(0,l.getBlockTypes)().filter((n=>pt(e,n,t))).map(n),a=nt(e,"core/block",t)?Mt(e).map(r):[],c=i.reduce(((t,n)=>{const{variations:o=[]}=n;if(o.some((e=>{let{isDefault:t}=e;return t}))||t.push(n),o.length){const l=mt(e,n);t.push(...o.map(l))}return t}),[]),u=(e,t)=>{const{core:n,noncore:o}=e;return(t.name.startsWith("core/")?n:o).push(t),e},{core:d,noncore:p}=c.reduce(u,{core:[],noncore:[]}),m=[...d,...p];return[...m,...a]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Mt(e),(0,l.getBlockTypes)()])),vt=A((function(e,t){var n;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=(0,u.castArray)(t),[i]=r,s=ht(e,{buildScope:"transform"}),a=(0,l.getBlockTypes)().filter((t=>pt(e,t,o))).map(s),c=Object.fromEntries(Object.entries(a).map((e=>{let[,t]=e;return[t.name,t]})));c["*"]={frecency:1/0,id:"*",isDisabled:!1,name:"*",title:(0,h.__)("Unwrap"),icon:null===(n=c[null==i?void 0:i.name])||void 0===n?void 0:n.icon};const d=(0,l.getPossibleBlockTransformations)(r).reduce(((e,t)=>("*"===t?e.push(c["*"]):c[null==t?void 0:t.name]&&e.push(c[t.name]),e)),[]);return(0,u.orderBy)(d,(e=>c[e.name].frecency),"desc")}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,(0,l.getBlockTypes)()])),bt=A((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(0,u.some)((0,l.getBlockTypes)(),(n=>pt(e,n,t)));if(n)return!0;const o=nt(e,"core/block",t)&&Mt(e).length>0;return o}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Mt(e),(0,l.getBlockTypes)()])),_t=A((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return(0,u.filter)((0,l.getBlockTypes)(),(n=>pt(e,n,t)))}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,(0,l.getBlockTypes)()])),kt=A((function(e){var t,n;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!o)return;const l=null===(t=e.blockListSettings[o])||void 0===t?void 0:t.__experimentalDefaultBlock,r=null===(n=e.blockListSettings[o])||void 0===n?void 0:n.__experimentalDirectInsert;return l&&r?"function"==typeof r?r(j(e,o))?l:null:l:void 0}),((e,t)=>[e.blockListSettings[t],e.blocks.tree[t]])),yt=A(((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find((e=>{let{name:n}=e;return n===t}));return n?{...n,blocks:(0,l.parse)(n.content,{__unstableSkipMigrationLogs:!0})}:null}),(e=>[e.settings.__experimentalBlockPatterns])),Et=A((e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=It(e);return t.filter((e=>{let{inserter:t=!0}=e;return!!t})).map((t=>{let{name:n}=t;return yt(e,n)})).filter((e=>{let{blocks:t}=e;return((e,t)=>{if("boolean"==typeof t)return t;const n=[...e];for(;n.length>0;){var o;const e=n.shift();if(!tt(t,e.name||e.blockName,!0))return!1;null===(o=e.innerBlocks)||void 0===o||o.forEach((e=>{n.push(e)}))}return!0})(t,n)}))}),(e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes])),Ct=A((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=Et(e),o=(0,u.filter)(n,(n=>{let{blocks:o}=n;return o.every((n=>{let{name:o}=n;return ot(e,o,t)}))}));return o}),((e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId[t]])),St=A((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return G;const o=Ct(e,n),l=Array.isArray(t)?t:[t];return o.filter((e=>{var t,n;return null==e||null===(t=e.blockTypes)||void 0===t||null===(n=t.some)||void 0===n?void 0:n.call(t,(e=>l.includes(e)))}))}),((e,t)=>[...Ct.getDependants(e,t)])),wt=A((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return G;if(t.some((t=>{let{clientId:n,innerBlocks:o}=t;return o.length||Ft(e,n)})))return G;const o=Array.from(new Set(t.map((e=>{let{name:t}=e;return t}))));return St(e,o,n)}),((e,t)=>[...St.getDependants(e,t)]));function Bt(e,t){return e.blockListSettings[t]}function It(e){return e.settings}function xt(e){return e.blocks.isPersistentChange}const Tt=A((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})}),(e=>[e.blockListSettings])),Nt=A(((e,t)=>{var n;const o=(0,u.find)(Mt(e),(e=>e.id===t));return o?null===(n=o.title)||void 0===n?void 0:n.raw:null}),(e=>[Mt(e)]));function Pt(e){return e.blocks.isIgnoredChange}function Lt(e){return e.lastBlockAttributesChange}function Mt(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:G}function Rt(e){return"navigation"===e.editorMode}function At(e){return e.editorMode}function Dt(e){return e.hasBlockMovingClientId}function Ot(e){return!!e.automaticChangeStatus}function zt(e,t){return e.highlightedBlock===t}function Ft(e,t){return!!e.blocks.controlledInnerBlocks[t]}const Vt=A(((e,t)=>{if(!t.length)return null;const n=ce(e);if(t.includes(U(e,n)))return n;const o=ye(e),l=me(e,n||o[0],t);return l?l[l.length-1]:null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function Ht(e,t,n){const{lastBlockInserted:o}=e;return o.clientId===t&&o.source===n}function Gt(e,t){var n,o;return null===(n=null===(o=e.blockVisibility)||void 0===o?void 0:o[t])||void 0===n||n}const Ut=A((e=>new Set(Object.keys(e.blockVisibility).filter((t=>e.blockVisibility[t])))),(e=>[e.blockVisibility])),Wt=A(((e,t)=>{let n,o=t;for(;e.blocks.parents[o];)o=e.blocks.parents[o],"contentOnly"===et(e,o)&&(n=o);return n}),(e=>[e.blocks.parents,e.blockListSettings]));function $t(e){return e.temporarilyEditingAsBlocks}function jt(e,t){if(!ct(e,t))return!0;const n=At(e);if("zoom-out"===n&&!de(e,t))return!0;const o=(0,l.hasBlockSupport)(U(e,t),"__experimentalDisableBlockOverlay",!1);return("navigation"===n||!o&&Ft(e,t))&&!Oe(e,t)&&!ze(e,t,!0)}function Kt(e,t){let n=e.blocks.parents[t];for(;n;){if(jt(e,n))return!0;n=e.blocks.parents[n]}return!1}const qt=window.wp.a11y,Yt="";function Zt(e){if(e)return Object.keys(e).find((t=>{const n=e[t];return"string"==typeof n&&-1!==n.indexOf(Yt)}))}const Qt=e=>Array.isArray(e)?e:[e],Xt=e=>t=>{let{dispatch:n}=t;n({type:"RESET_BLOCKS",blocks:e}),n(Jt(e))},Jt=e=>t=>{let{select:n,dispatch:o}=t;const r=n.getTemplate(),i=n.getTemplateLock(),s=!r||"all"!==i||(0,l.doBlocksMatchTemplate)(e,r);if(s!==n.isValidTemplate())return o.setTemplateValidity(s),s};function en(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function tn(e){return V()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function nn(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Qt(e),attributes:t,uniqueByBlock:n}}function on(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function ln(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}const rn=e=>t=>{let{select:n,dispatch:o}=t;const l=n.getPreviousBlockClientId(e);l&&o.selectBlock(l,-1)},sn=e=>t=>{let{select:n,dispatch:o}=t;const l=n.getNextBlockClientId(e);l&&o.selectBlock(l)};function an(){return{type:"START_MULTI_SELECT"}}function cn(){return{type:"STOP_MULTI_SELECT"}}const un=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return o=>{let{select:l,dispatch:r}=o;if(l.getBlockRootClientId(e)!==l.getBlockRootClientId(t))return;r({type:"MULTI_SELECT",start:e,end:t,initialPosition:n});const i=l.getSelectedBlockCount();(0,qt.speak)((0,h.sprintf)(
|
2 |
/* translators: %s: number of selected blocks */
|
3 |
-
(0,h._n)("%s block selected.","%s blocks selected.",i),i),"assertive")}};function dn(){return{type:"CLEAR_SELECTED_BLOCK"}}function pn(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function mn(e,t){var n,o;const r=null!==(n=null==t||null===(o=t.__experimentalPreferredStyleVariations)||void 0===o?void 0:o.value)&&void 0!==n?n:{};return e.map((e=>{var t;const n=e.name;if(!(0,l.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!r[n])return e;const o=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=o&&o.includes("is-style-"))return e;const{attributes:i={}}=e,s=r[n];return{...e,attributes:{...i,className:`${o||""} is-style-${s}`.trim()}}}))}const gn=function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,l=arguments.length>4?arguments[4]:void 0;return r=>{let{select:i,dispatch:s}=r;e=Qt(e),t=mn(Qt(t),i.getSettings());const a=i.getBlockRootClientId(e[0]);for(let e=0;e<t.length;e++){const n=t[e];if(!i.canInsertBlockType(n.name,a))return}s({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:o,meta:l}),s((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:o}=t.getSettings();o||n.insertDefaultBlock()}))}};function hn(e,t){return gn(e,t)}const fn=e=>(t,n)=>o=>{let{select:l,dispatch:r}=o;l.canMoveBlocks(t,n)&&r({type:e,clientIds:Qt(t),rootClientId:n})},vn=fn("MOVE_BLOCKS_DOWN"),bn=fn("MOVE_BLOCKS_UP"),kn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3?arguments[3]:void 0;return l=>{let{select:r,dispatch:i}=l;if(r.canMoveBlocks(e,t)){if(t!==n){if(!r.canRemoveBlocks(e,t))return;if(!r.canInsertBlocks(e,n))return}i({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:o})}}};function yn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3?arguments[3]:void 0;return kn([e],t,n,o)}function En(e,t,n,o,l){return Cn([e],t,n,o,0,l)}const Cn=function(e,t,n){let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5?arguments[5]:void 0;return i=>{let{select:s,dispatch:a}=i;null!==l&&"object"==typeof l&&(r=l,l=0,V()("meta argument in wp.data.dispatch('core/block-editor')",{since:"5.8",hint:"The meta argument is now the 6th argument of the function"})),e=mn(Qt(e),s.getSettings());const c=[];for(const t of e)s.canInsertBlockType(t.name,n)&&c.push(t);c.length&&a({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?l:null,meta:r})}};function Sn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{__unstableWithInserter:o}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:o}}function wn(){return{type:"HIDE_INSERTION_POINT"}}function Bn(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const In=()=>e=>{let{select:t,dispatch:n}=e;n({type:"SYNCHRONIZE_TEMPLATE"});const o=t.getBlocks(),r=t.getTemplate(),i=(0,l.synchronizeBlocksWithTemplate)(o,r);n.resetBlocks(i)},xn=e=>t=>{let{registry:n,select:o,dispatch:r}=t;const i=o.getSelectionStart(),s=o.getSelectionEnd();if(i.clientId===s.clientId)return;if(!i.attributeKey||!s.attributeKey||void 0===i.offset||void 0===s.offset)return!1;const a=o.getBlockRootClientId(i.clientId);if(a!==o.getBlockRootClientId(s.clientId))return;const c=o.getBlockOrder(a);let u,d;c.indexOf(i.clientId)>c.indexOf(s.clientId)?(u=s,d=i):(u=i,d=s);const p=e?d:u,m=o.getBlock(p.clientId),g=(0,l.getBlockType)(m.name);if(!g.merge)return;const h=u,f=d,v=o.getBlock(h.clientId),b=(0,l.getBlockType)(v.name),_=o.getBlock(f.clientId),k=(0,l.getBlockType)(_.name),y=v.attributes[h.attributeKey],E=_.attributes[f.attributeKey],C=b.attributes[h.attributeKey],S=k.attributes[f.attributeKey];let w=(0,z.create)({html:y,...H(C)}),B=(0,z.create)({html:E,...H(S)});w=(0,z.remove)(w,h.offset,w.text.length),B=(0,z.insert)(B,Yt,0,f.offset);const I=(0,l.cloneBlock)(v,{[h.attributeKey]:(0,z.toHTMLString)({value:w,...H(C)})}),x=(0,l.cloneBlock)(_,{[f.attributeKey]:(0,z.toHTMLString)({value:B,...H(S)})}),T=e?I:x,N=v.name===_.name?[T]:(0,l.switchToBlockType)(T,g.name);if(!N||!N.length)return;let P;if(e){const e=N.pop();P=g.merge(e.attributes,x.attributes)}else{const e=N.shift();P=g.merge(I.attributes,e.attributes)}const L=Zt(P),M=P[L],R=(0,z.create)({html:M,...H(g.attributes[L])}),A=R.text.indexOf(Yt),D=(0,z.remove)(R,A,A+1),O=(0,z.toHTMLString)({value:D,...H(g.attributes[L])});P[L]=O;const F=o.getSelectedBlockClientIds(),V=[...e?N:[],{...m,attributes:{...m.attributes,...P}},...e?[]:N];n.batch((()=>{r.selectionChange(m.clientId,L,A,A),r.replaceBlocks(F,V,0,o.getSelectedBlocksInitialCaretPosition())}))},Tn=()=>e=>{let{select:t,dispatch:n}=e;const o=t.getSelectionStart(),r=t.getSelectionEnd();if(o.clientId===r.clientId)return;if(!o.attributeKey||!r.attributeKey||void 0===o.offset||void 0===r.offset)return;const i=t.getBlockRootClientId(o.clientId);if(i!==t.getBlockRootClientId(r.clientId))return;const s=t.getBlockOrder(i);let a,c;s.indexOf(o.clientId)>s.indexOf(r.clientId)?(a=r,c=o):(a=o,c=r);const u=a,d=c,p=t.getBlock(u.clientId),m=(0,l.getBlockType)(p.name),g=t.getBlock(d.clientId),h=(0,l.getBlockType)(g.name),f=p.attributes[u.attributeKey],v=g.attributes[d.attributeKey],b=m.attributes[u.attributeKey],_=h.attributes[d.attributeKey];let k=(0,z.create)({html:f,...H(b)}),y=(0,z.create)({html:v,...H(_)});k=(0,z.remove)(k,u.offset,k.text.length),y=(0,z.remove)(y,0,d.offset),n.replaceBlocks(t.getSelectedBlockClientIds(),[{...p,attributes:{...p.attributes,[u.attributeKey]:(0,z.toHTMLString)({value:k,...H(b)})}},(0,l.createBlock)((0,l.getDefaultBlockName)()),{...g,attributes:{...g.attributes,[d.attributeKey]:(0,z.toHTMLString)({value:y,...H(_)})}}],1,t.getSelectedBlocksInitialCaretPosition())},Nn=()=>e=>{let{select:t,dispatch:n}=e;const o=t.getSelectionStart(),l=t.getSelectionEnd();n.selectionChange({start:{clientId:o.clientId},end:{clientId:l.clientId}})},Pn=(e,t)=>n=>{let{registry:o,select:r,dispatch:i}=n;const s=[e,t];i({type:"MERGE_BLOCKS",blocks:s});const[a,c]=s,u=r.getBlock(a),d=(0,l.getBlockType)(u.name);if(!d)return;const p=r.getBlock(c);if(d&&!d.merge){const e=(0,l.switchToBlockType)(p,d.name);if(1!==(null==e?void 0:e.length))return void i.selectBlock(u.clientId);const[t]=e;return t.innerBlocks.length<1?void i.selectBlock(u.clientId):void o.batch((()=>{i.insertBlocks(t.innerBlocks,void 0,a),i.removeBlock(c),i.selectBlock(t.innerBlocks[0].clientId)}))}const m=(0,l.getBlockType)(p.name),{clientId:g,attributeKey:h,offset:f}=r.getSelectionStart(),v=(g===a?d:m).attributes[h],b=(g===a||g===c)&&void 0!==h&&void 0!==f&&!!v;v||("number"==typeof h?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was "+typeof h):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const _=(0,l.cloneBlock)(u),k=(0,l.cloneBlock)(p);if(b){const e=g===a?_:k,t=e.attributes[h],n=(0,z.insert)((0,z.create)({html:t,...H(v)}),Yt,f,f);e.attributes[h]=(0,z.toHTMLString)({value:n,...H(v)})}const y=u.name===p.name?[k]:(0,l.switchToBlockType)(k,u.name);if(!y||!y.length)return;const E=d.merge(_.attributes,y[0].attributes);if(b){const e=Zt(E),t=E[e],n=(0,z.create)({html:t,...H(d.attributes[e])}),o=n.text.indexOf(Yt),l=(0,z.remove)(n,o,o+1),r=(0,z.toHTMLString)({value:l,...H(d.attributes[e])});E[e]=r,i.selectionChange(u.clientId,e,o,o)}i.replaceBlocks([u.clientId,p.clientId],[{...u,attributes:{...u.attributes,...E}},...y.slice(1)],0)},Ln=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:o,dispatch:l}=n;if(!e||!e.length)return;e=Qt(e);const r=o.getBlockRootClientId(e[0]);o.canRemoveBlocks(e,r)&&(t&&l.selectPreviousBlock(e[0]),l({type:"REMOVE_BLOCKS",clientIds:e}),l((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:o}=t.getSettings();o||n.insertDefaultBlock()})))}};function Mn(e,t){return Ln([e],t)}function Rn(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?o:null,time:Date.now()}}function An(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Dn(){return{type:"START_TYPING"}}function On(){return{type:"STOP_TYPING"}}function zn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function Fn(){return{type:"STOP_DRAGGING_BLOCKS"}}function Vn(){return V()('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function Hn(){return V()('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function Gn(e,t,n,o){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:o}:{type:"SELECTION_CHANGE",...e}}const Un=(e,t,n)=>o=>{let{dispatch:r}=o;const i=(0,l.getDefaultBlockName)();if(!i)return;const s=(0,l.createBlock)(i,e);return r.insertBlock(s,n,t)};function Wn(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function $n(e){return{type:"UPDATE_SETTINGS",settings:e}}function jn(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function Kn(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function qn(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const Yn=()=>e=>{let{dispatch:t}=e;t({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:n=(e=>setTimeout(e,100))}=window;n((()=>{t({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},Zn=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t=>{let{dispatch:n}=t;n.__unstableSetEditorMode(e?"navigation":"edit")}},Qn=e=>t=>{let{dispatch:n,select:o}=t;if("zoom-out"===e){const e=o.getBlockSelectionStart();e&&n.selectBlock(o.getBlockHierarchyRootClientId(e))}n({type:"SET_EDITOR_MODE",mode:e}),"navigation"===e?(0,qt.speak)((0,h.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.")):"edit"===e?(0,qt.speak)((0,h.__)("You are currently in edit mode. To return to the navigation mode, press Escape.")):"zoom-out"===e&&(0,qt.speak)((0,h.__)("You are currently in zoom-out mode."))},Xn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>{let{dispatch:n}=t;n({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e}),e&&(0,qt.speak)((0,h.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."))}},Jn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:o,dispatch:r}=n;if(!e||!e.length)return;const i=o.getBlocksByClientId(e);if(i.some((e=>!e)))return;if(i.map((e=>e.name)).some((e=>!(0,l.hasBlockSupport)(e,"multiple",!0))))return;const s=o.getBlockRootClientId(e[0]),a=Qt(e),c=o.getBlockIndex(a[a.length-1]),u=i.map((e=>(0,l.__experimentalCloneSanitizedBlock)(e)));return r.insertBlocks(u,c+1,s,t),u.length>1&&t&&r.multiSelect(u[0].clientId,u[u.length-1].clientId),u.map((e=>e.clientId))}},eo=e=>t=>{let{select:n,dispatch:o}=t;if(!e)return;const l=n.getBlockRootClientId(e);if(n.getTemplateLock(l))return;const r=n.getBlockIndex(e);return o.insertDefaultBlock({},l,r)},to=e=>t=>{let{select:n,dispatch:o}=t;if(!e)return;const l=n.getBlockRootClientId(e);if(n.getTemplateLock(l))return;const r=n.getBlockIndex(e);return o.insertDefaultBlock({},l,r+1)};function no(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const oo=e=>async t=>{let{dispatch:n}=t;n(no(e,!0)),await new Promise((e=>setTimeout(e,150))),n(no(e,!1))};function lo(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function ro(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function io(e){return{type:"SET_TEMPORARILY_EDITING_AS_BLOCKS",temporarilyEditingAsBlocks:e}}const so="core/block-editor",ao={reducer:P,selectors:e,actions:t},co=(0,p.createReduxStore)(so,{...ao,persist:["preferences"]});(0,p.registerStore)(so,{...ao,persist:["preferences"]});const uo={name:"",isSelected:!1},po=(0,s.createContext)(uo),{Provider:mo}=po;function go(){return(0,s.useContext)(po)}function ho(){const{isSelected:e,clientId:t,name:n}=go();return(0,p.useSelect)((o=>{if(e)return!0;const{getBlockName:l,isFirstMultiSelectedBlock:r,getMultiSelectedBlockClientIds:i}=o(co);return!!r(t)&&i().every((e=>l(e)===n))}),[t,e,n])}function fo(e){let{group:t="default",controls:n,children:o,__experimentalShareWithChildBlocks:r=!1}=e;const i=function(e,t){const n=ho(),{clientId:o}=go(),r=(0,p.useSelect)((e=>{const{getBlockName:n,hasSelectedInnerBlock:r}=e(co),{hasBlockSupport:i}=e(l.store);return t&&i(n(o),"__experimentalExposeControlsToChildren",!1)&&r(o)}),[t,o]);var i;return n?null===(i=g[e])||void 0===i?void 0:i.Fill:r?g.parent.Fill:null}(t,r);return i?(0,s.createElement)(m.__experimentalStyleProvider,{document},(0,s.createElement)(i,null,(e=>{const l=(0,u.isEmpty)(e)?null:e;return(0,s.createElement)(m.__experimentalToolbarContext.Provider,{value:l},"default"===t&&(0,s.createElement)(m.ToolbarGroup,{controls:n}),o)}))):null}function vo(e){let{group:t="default",...n}=e;const o=(0,s.useContext)(m.__experimentalToolbarContext),l=g[t].Slot,r=(0,m.__experimentalUseSlot)(l.__unstableName);return Boolean(r.fills&&r.fills.length)?"default"===t?(0,s.createElement)(l,i({},n,{bubblesVirtually:!0,fillProps:o})):(0,s.createElement)(m.ToolbarGroup,null,(0,s.createElement)(l,i({},n,{bubblesVirtually:!0,fillProps:o}))):null}const bo=fo;bo.Slot=vo;const _o=e=>(0,s.createElement)(fo,i({group:"inline"},e));_o.Slot=e=>(0,s.createElement)(vo,i({group:"inline"},e));const ko=bo,yo=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})),Eo=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"})),Co=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})),So=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})),wo=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M14.3 6.7l-1.1 1.1 4 4H4v1.5h13.3l-4.1 4.4 1.1 1.1 5.8-6.3z"})),Bo=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M16.2 13.2l-4 4V4h-1.5v13.3l-4.5-4.1-1 1.1 6.2 5.8 5.8-5.8-1-1.1z"}));function Io(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.split(",").map((e=>`.editor-styles-wrapper ${e}${t?` ${t}`:""}`)).join(",")}function xo(e,t,n,o){var l,r;let i="";return null!=t&&null!==(l=t[n])&&void 0!==l&&null!==(r=l.spacingStyles)&&void 0!==r&&r.length&&o&&t[n].spacingStyles.forEach((t=>{i+=`${Io(e,t.selector.trim())} { `,i+=Object.entries(t.rules).map((e=>{let[t,n]=e;return`${t}: ${n||o}`})).join("; "),i+="; }"})),i}function To(e){const{contentSize:t,wideSize:n}=e,o={},l=/^(?!0)\d+(px|em|rem|vw|vh|%)?$/i;return l.test(t)&&(
|
4 |
// translators: %s: container size (i.e. 600px etc)
|
5 |
-
o.none=(0,h.sprintf)((0,h.__)("Max %s wide"),t)),
|
6 |
// translators: %s: container size (i.e. 600px etc)
|
7 |
-
o.wide=(0,h.sprintf)((0,h.__)("Max %s wide"),n)),o}const No=(0,s.createContext)({refs:new Map,callbacks:new Map});function Po(e){let{children:t}=e;const n=(0,s.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,s.createElement)(No.Provider,{value:n},t)}function
|
8 |
-
(0,h.sprintf)((0,h.__)("Custom (%s)"),o),slug:"custom",size:o}],k=d.length-1);const y=(0,s.useMemo)((()=>(0,m.__experimentalParseQuantityAndUnitFromRawValue)(k)),[k])[1]||_[0].value,E=e=>{var t;return void 0===o||null===(t=n[e])||void 0===t?void 0:t.name},C=parseInt(k,10),S=(e,t)=>{var o;const
|
9 |
-
(0,h.__)("%1$s %2$s"),Fo[l],null==a?void 0:a.toLowerCase()),N=g&&!v&&void 0!==B;return(0,s.createElement)(s.Fragment,null,"all"!==l&&(0,s.createElement)(m.__experimentalHStack,{className:"components-spacing-sizes-control__side-labels"},(0,s.createElement)(m.__experimentalText,{className:"components-spacing-sizes-control__side-label"},Fo[l]),N&&(0,s.createElement)(m.__experimentalText,{className:"components-spacing-sizes-control__hint-single"},B)),"all"===l&&N&&(0,s.createElement)(m.__experimentalText,{className:"components-spacing-sizes-control__hint-all"},B),!f&&(0,s.createElement)(m.Button,{label:v?(0,h.__)("Use size preset"):(0,h.__)("Set custom size"),icon:$o,onClick:()=>{b(!v)},isPressed:v,isSmall:!0,className:c()({"components-spacing-sizes-control__custom-toggle-all":"all"===l,"components-spacing-sizes-control__custom-toggle-single":"all"!==l}),iconSize:24}),v&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(m.__experimentalUnitControl,{onChange:e=>r((e=>isNaN(parseFloat(e))?void 0:e)(e)),value:k,units:_,min:u,placeholder:w,disableUnits:i,label:T,hideLabelFromVision:!0,className:"components-spacing-sizes-control__custom-value-input",style:{gridColumn:"1"}}),(0,s.createElement)(m.RangeControl,{value:C,min:0,max:100,withInputField:!1,onChange:e=>{r([e,y].join(""))},className:"components-spacing-sizes-control__custom-value-range"})),g&&!v&&(0,s.createElement)(m.RangeControl,{className:"components-spacing-sizes-control__range-control",value:k,onChange:e=>r(S(e)),onMouseDown:e=>{var t;(null==e||null===(t=e.nativeEvent)||void 0===t?void 0:t.offsetX)<35&&void 0===o&&r("0")},withInputField:!1,"aria-valuenow":k,"aria-valuetext":null===(t=n[k])||void 0===t?void 0:t.name,renderTooltipContent:E,min:0,max:n.length-1,marks:x,label:T,hideLabelFromVision:!0}),!g&&!v&&(0,s.createElement)(m.CustomSelectControl,{className:"components-spacing-sizes-control__custom-select-control",value:I.find((e=>e.key===k))||"",onChange:e=>{r(S(e.selectedItem.key,"selectList"))},options:I,label:T,hideLabelFromVision:!0,__nextUnconstrainedWidth:!0}))}function Qo(e){let{onChange:t,values:n,sides:o,spacingSizes:l,type:r,minimumCustomValue:i}=e;const a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Go(Object.values(e))}(n),c=Wo(n)&&Uo(n,o);return(0,s.createElement)(Zo,{value:a,onChange:e=>{const l=(0,m.__experimentalApplyValueToSides)(n,e,o);t(l)},side:"all",spacingSizes:l,isMixed:c,type:r,minimumCustomValue:i})}function Xo(e){let{values:t,sides:n,onChange:o,spacingSizes:l,type:r,minimumCustomValue:i}=e;const a=null!=n&&n.length?Ho.filter((e=>n.includes(e))):Ho,c=e=>n=>{const l={...t};l[e]=n,o(l)};return(0,s.createElement)(s.Fragment,null,a.map((e=>(0,s.createElement)(Zo,{value:t[e],label:Fo[e],key:`spacing-sizes-control-${e}`,withInputField:!1,side:e,onChange:c(e),spacingSizes:l,type:r,minimumCustomValue:i}))))}const Jo=["vertical","horizontal"];function el(e){let{onChange:t,values:n,sides:o,spacingSizes:l,type:r,minimumCustomValue:i}=e;const a=e=>o=>{if(!t)return;const l={...n};"vertical"===e&&(l.top=o,l.bottom=o),"horizontal"===e&&(l.left=o,l.right=o),t(l)},c=null!=o&&o.length?Jo.filter((e=>o.includes(e))):Jo;return(0,s.createElement)(s.Fragment,null,c.map((e=>{const t="vertical"===e?n.top:n.left;return(0,s.createElement)(Zo,{value:t,onChange:a(e),label:Fo[e],key:`spacing-sizes-control-${e}`,withInputField:!1,side:e,spacingSizes:l,type:r,minimumCustomValue:i})})))}const tl=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"})),nl=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"}));function ol(e){let{isLinked:t,onClick:n}=e;const o=t?(0,h.__)("Unlink sides"):(0,h.__)("Link sides");return(0,s.createElement)(m.Tooltip,{text:o},(0,s.createElement)("span",{className:"component-spacing-sizes-control__linked-button"},(0,s.createElement)(m.Button,{isSmall:!0,icon:t?tl:nl,iconSize:24,"aria-label":o,onClick:n})))}function ll(e){let{inputProps:t,onChange:n,label:o=(0,h.__)("Spacing Control"),values:l,sides:r,splitOnAxis:a=!1,useSelect:c,minimumCustomValue:u=0}=e;const d=[{name:0,slug:"0",size:0},...Yo("spacing.spacingSizes")||[]];d.length>8&&d.unshift({name:(0,h.__)("Default"),slug:"default",size:void 0});const p=l||Vo,g=Wo(l),f=1===(null==r?void 0:r.length),[v,b]=(0,s.useState)(!g||!Uo(p,r)||f),_={...t,onChange:e=>{const t={...l,...e};n(t)},isLinked:v,sides:r,values:p,spacingSizes:d,useSelect:c,type:o,minimumCustomValue:u};return(0,s.createElement)("fieldset",{role:"region",className:"component-spacing-sizes-control"},(0,s.createElement)(m.__experimentalText,{as:"legend"},o),!f&&(0,s.createElement)(ol,{onClick:()=>{b(!v)},isLinked:v}),v&&(0,s.createElement)(Qo,i({"aria-label":o},_)),!v&&a&&(0,s.createElement)(el,_),!v&&!a&&(0,s.createElement)(Xo,_))}window.wp.warning;const rl={default:(0,m.createSlotFill)("InspectorControls"),advanced:(0,m.createSlotFill)("InspectorAdvancedControls"),border:(0,m.createSlotFill)("InspectorControlsBorder"),color:(0,m.createSlotFill)("InspectorControlsColor"),dimensions:(0,m.createSlotFill)("InspectorControlsDimensions"),typography:(0,m.createSlotFill)("InspectorControlsTypography")};function il(e){var t;let{__experimentalGroup:n="default",children:o}=e;const l=ho(),r=null===(t=rl[n])||void 0===t?void 0:t.Fill;return r?l?(0,s.createElement)(m.__experimentalStyleProvider,{document},(0,s.createElement)(r,null,(e=>{const t=(0,u.isEmpty)(e)?null:e;return(0,s.createElement)(m.__experimentalToolsPanelContext.Provider,{value:t},o)}))):null:("undefined"!=typeof process&&process.env,null)}const sl=e=>e,al=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=(0,u.pickBy)((0,u.mapValues)(e,al),sl);return(0,u.isEmpty)(t)?void 0:t};function cl(e,t,n){return(0,u.setWith)(e?(0,u.clone)(e):{},t,n,u.clone)}function ul(e,t,n,o,l,r){var i;if((0,u.every)(e,(e=>!e)))return n;if(1===r.length&&n.innerBlocks.length===o.length)return n;let s=null===(i=o[0])||void 0===i?void 0:i.attributes;if(r.length>1&&o.length>1){if(!o[l])return n;var a;s=null===(a=o[l])||void 0===a?void 0:a.attributes}let c=n;return Object.entries(e).forEach((e=>{let[n,o]=e;o&&t[n].forEach((e=>{const t=(0,u.get)(s,e);t&&(c={...c,attributes:cl(c.attributes,e,t)})}))})),c}function dl(e,t,n){const o=(0,l.getBlockSupport)(e,t),r=null==o?void 0:o.__experimentalSkipSerialization;return Array.isArray(r)?r.includes(n):r}function pl(e){let{children:t,group:n,label:o}=e;const{updateBlockAttributes:l}=(0,p.useDispatch)(co),{getBlockAttributes:r,getMultiSelectedBlockClientIds:i,getSelectedBlockClientId:a,hasMultiSelection:c}=(0,p.useSelect)(co),u=a(),d=(0,s.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},n=c()?i():[u];n.forEach((n=>{const{style:o}=r(n);let l={style:o};e.forEach((e=>{l={...l,...e(l)}})),l={...l,style:al(l.style)},t[n]=l})),l(n,t,!0)}),[al,r,i,c,u,l]);return(0,s.createElement)(m.__experimentalToolsPanel,{className:`${n}-block-support-panel`,label:o,resetAll:d,key:u,panelId:u,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},t)}function ml(e){let{Slot:t,...n}=e;const o=(0,s.useContext)(m.__experimentalToolsPanelContext);return(0,s.createElement)(t,i({},n,{fillProps:o,bubblesVirtually:!0}))}function gl(e){var t;let{__experimentalGroup:n="default",label:o,...l}=e;const r=null===(t=rl[n])||void 0===t?void 0:t.Slot,a=(0,m.__experimentalUseSlot)(null==r?void 0:r.__unstableName);return r&&a?Boolean(a.fills&&a.fills.length)?o?(0,s.createElement)(pl,{group:n,label:o},(0,s.createElement)(ml,i({},l,{Slot:r}))):(0,s.createElement)(r,i({},l,{bubblesVirtually:!0})):null:("undefined"!=typeof process&&process.env,null)}const hl=il;hl.Slot=gl;const fl=e=>(0,s.createElement)(il,i({},e,{__experimentalGroup:"advanced"}));fl.Slot=e=>(0,s.createElement)(gl,i({},e,{__experimentalGroup:"advanced"})),fl.slotName="InspectorAdvancedControls";const vl=hl,bl=window.wp.isShallowEqual;var _l=n.n(bl);const kl=function(e){return(0,d.useRefEffect)((t=>{if(!e)return;function n(t){const{deltaX:n,deltaY:o}=t;e.current.scrollBy(n,o)}const o={passive:!0};return t.addEventListener("wheel",n,o),()=>{t.removeEventListener("wheel",n,o)}}),[e])},yl=Number.MAX_SAFE_INTEGER,El=(0,s.forwardRef)((function(e,t){let{clientId:n,bottomClientId:o,children:l,__unstableRefreshSize:r,__unstableCoverTarget:a=!1,__unstablePopoverSlot:u,__unstableContentRef:p,...g}=e;const h=Ro(n),f=Ro(null!=o?o:n),v=(0,d.useMergeRefs)([t,kl(p)]),b=(0,s.useMemo)((()=>h&&f===h?{position:"absolute",width:h.offsetWidth,height:h.offsetHeight}:{}),[h,f,r]),[_,k]=(0,s.useReducer)((e=>(e+1)%yl),0);(0,s.useLayoutEffect)((()=>{if(!h)return;const e=new window.MutationObserver(k);return e.observe(h,{attributes:!0}),()=>{e.disconnect()}}),[h]);const y=(0,s.useMemo)((()=>{if(!(_<0||!h||o&&!f))return{getBoundingClientRect(){var e,t,n,o;const l=h.getBoundingClientRect(),r=null==f?void 0:f.getBoundingClientRect(),i=Math.min(l.left,null!==(e=null==r?void 0:r.left)&&void 0!==e?e:1/0),s=Math.min(l.top,null!==(t=null==r?void 0:r.top)&&void 0!==t?t:1/0),a=Math.max(l.right,null!==(n=r.right)&&void 0!==n?n:-1/0)-i,c=Math.max(l.bottom,null!==(o=r.bottom)&&void 0!==o?o:-1/0)-s;return new window.DOMRect(i,s,a,c)},ownerDocument:h.ownerDocument}}),[o,f,h,_]);return!h||o&&!f?null:(0,s.createElement)(m.Popover,i({ref:v,animate:!1,position:"top right left",focusOnMount:!1,anchor:y,__unstableSlotName:u||null,resize:!1,flip:!1,shift:!0},g,{className:c()("block-editor-block-popover",g.className)}),a&&(0,s.createElement)("div",{style:b},l),!a&&l)}));function Cl(e){const t=(0,l.getBlockSupport)(e,Pl);return!!(!0===t||null!=t&&t.margin)}function Sl(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Yo("spacing.margin"),n=!Ol(e,"margin");return!Cl(e)||t||n}function wl(e){var t,n;const{name:o,attributes:{style:l},setAttributes:r}=e,i=Yo("spacing.spacingSizes"),a=(0,m.__experimentalUseCustomUnits)({availableUnits:Yo("spacing.units")||["%","px","em","rem","vw"]}),c=Dl(o,"margin"),u=c&&c.some((e=>Ml.includes(e)));if(Sl(e))return null;const d=e=>{const t={...l,spacing:{...null==l?void 0:l.spacing,margin:e}};r({style:al(t)})};return s.Platform.select({web:(0,s.createElement)(s.Fragment,null,(!i||0===(null==i?void 0:i.length))&&(0,s.createElement)(m.__experimentalBoxControl,{values:null==l||null===(t=l.spacing)||void 0===t?void 0:t.margin,onChange:d,label:(0,h.__)("Margin"),sides:c,units:a,allowReset:!1,splitOnAxis:u}),(null==i?void 0:i.length)>0&&(0,s.createElement)(ll,{values:null==l||null===(n=l.spacing)||void 0===n?void 0:n.margin,onChange:d,label:(0,h.__)("Margin"),sides:c,units:a,allowReset:!1,splitOnAxis:!1})),native:null})}function Bl(e){var t,n;let{clientId:o,attributes:l}=e;const r=null==l||null===(t=l.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin,i=Yo("spacing.spacingSizes"),a=(0,s.useMemo)((()=>{const e=null!=r&&r.top?Do(null==r?void 0:r.top,i):0,t=null!=r&&r.right?Do(null==r?void 0:r.right,i):0,n=null!=r&&r.bottom?Do(null==r?void 0:r.bottom,i):0,o=null!=r&&r.left?Do(null==r?void 0:r.left,i):0;return{borderTopWidth:e,borderRightWidth:t,borderBottomWidth:n,borderLeftWidth:o,top:0!==e?`-${e}`:0,right:0!==t?`-${t}`:0,bottom:0!==n?`-${n}`:0,left:0!==o?`-${o}`:0}}),[r]),[c,u]=(0,s.useState)(!1),d=(0,s.useRef)(r),p=(0,s.useRef)(),m=()=>{p.current&&window.clearTimeout(p.current)};return(0,s.useEffect)((()=>(_l()(r,d.current)||(u(!0),d.current=r,m(),p.current=setTimeout((()=>{u(!1)}),400)),()=>m())),[r]),c?(0,s.createElement)(El,{clientId:o,__unstableCoverTarget:!0,__unstableRefreshSize:r},(0,s.createElement)("div",{className:"block-editor__padding-visualizer",style:a})):null}function Il(e){const t=(0,l.getBlockSupport)(e,Pl);return!!(!0===t||null!=t&&t.padding)}function xl(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Yo("spacing.padding"),n=!Ol(e,"padding");return!Il(e)||t||n}function Tl(e){var t,n;const{name:o,attributes:{style:l},setAttributes:r}=e,i=Yo("spacing.spacingSizes"),a=(0,m.__experimentalUseCustomUnits)({availableUnits:Yo("spacing.units")||["%","px","em","rem","vw"]}),c=Dl(o,"padding"),u=c&&c.some((e=>Ml.includes(e)));if(xl(e))return null;const d=e=>{const t={...l,spacing:{...null==l?void 0:l.spacing,padding:e}};r({style:al(t)})};return s.Platform.select({web:(0,s.createElement)(s.Fragment,null,(!i||0===(null==i?void 0:i.length))&&(0,s.createElement)(m.__experimentalBoxControl,{values:null==l||null===(t=l.spacing)||void 0===t?void 0:t.padding,onChange:d,label:(0,h.__)("Padding"),sides:c,units:a,allowReset:!1,splitOnAxis:u}),(null==i?void 0:i.length)>0&&(0,s.createElement)(ll,{values:null==l||null===(n=l.spacing)||void 0===n?void 0:n.padding,onChange:d,label:(0,h.__)("Padding"),sides:c,units:a,allowReset:!1,splitOnAxis:u})),native:null})}function Nl(e){var t,n;let{clientId:o,attributes:l}=e;const r=null==l||null===(t=l.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding,i=(0,s.useMemo)((()=>({borderTopWidth:Ao(null==r?void 0:r.top)?Oo(null==r?void 0:r.top):null==r?void 0:r.top,borderRightWidth:Ao(null==r?void 0:r.right)?Oo(null==r?void 0:r.right):null==r?void 0:r.right,borderBottomWidth:Ao(null==r?void 0:r.bottom)?Oo(null==r?void 0:r.bottom):null==r?void 0:r.bottom,borderLeftWidth:Ao(null==r?void 0:r.left)?Oo(null==r?void 0:r.left):null==r?void 0:r.left})),[r]),[a,c]=(0,s.useState)(!1),u=(0,s.useRef)(r),d=(0,s.useRef)(),p=()=>{d.current&&window.clearTimeout(d.current)};return(0,s.useEffect)((()=>(_l()(r,u.current)||(c(!0),u.current=r,p(),d.current=setTimeout((()=>{c(!1)}),400)),()=>p())),[r]),a?(0,s.createElement)(El,{clientId:o,__unstableCoverTarget:!0,__unstableRefreshSize:r},(0,s.createElement)("div",{className:"block-editor__padding-visualizer",style:i})):null}const Pl="spacing",Ll=["top","right","bottom","left"],Ml=["vertical","horizontal"];function Rl(e){const t=Hl(e),n=xl(e),o=Sl(e),r=Al(e),i=(u=e.name,"web"===s.Platform.OS&&(zl(u)||Il(u)||Cl(u))),a=Yo("spacing.spacingSizes");var u;if(r||!i)return null;const d=(0,l.getBlockSupport)(e.name,[Pl,"__experimentalDefaultControls"]),p=e=>t=>{var n;return{...t,style:{...t.style,spacing:{...null===(n=t.style)||void 0===n?void 0:n.spacing,[e]:void 0}}}},g=c()({"tools-panel-item-spacing":a&&a.length>0});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(vl,{__experimentalGroup:"dimensions"},!n&&(0,s.createElement)(m.__experimentalToolsPanelItem,{className:g,hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding)}(e),label:(0,h.__)("Padding"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:al({...o,spacing:{...null==o?void 0:o.spacing,padding:void 0}})})}(e),resetAllFilter:p("padding"),isShownByDefault:null==d?void 0:d.padding,panelId:e.clientId},(0,s.createElement)(Tl,e)),!o&&(0,s.createElement)(m.__experimentalToolsPanelItem,{className:g,hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin)}(e),label:(0,h.__)("Margin"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:al({...o,spacing:{...null==o?void 0:o.spacing,margin:void 0}})})}(e),resetAllFilter:p("margin"),isShownByDefault:null==d?void 0:d.margin,panelId:e.clientId},(0,s.createElement)(wl,e)),!t&&(0,s.createElement)(m.__experimentalToolsPanelItem,{className:g,hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.blockGap)}(e),label:(0,h.__)("Block spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:{...o,spacing:{...null==o?void 0:o.spacing,blockGap:void 0}}})}(e),resetAllFilter:p("blockGap"),isShownByDefault:null==d?void 0:d.blockGap,panelId:e.clientId},(0,s.createElement)(Gl,e))),!n&&(0,s.createElement)(Nl,e),!o&&(0,s.createElement)(Bl,e))}const Al=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Hl(e),n=xl(e),o=Sl(e);return t&&n&&o};function Dl(e,t){var n;const o=(0,l.getBlockSupport)(e,Pl);if(o&&"boolean"!=typeof o[t])return Array.isArray(o[t])?o[t]:null!==(n=o[t])&&void 0!==n&&n.sides?o[t].sides:void 0}function Ol(e,t){const n=Dl(e,t);return!(n&&n.some((e=>Ll.includes(e)))&&n.some((e=>Ml.includes(e)))&&(console.warn(`The ${t} support for the "${e}" block can not be configured to support both axial and arbitrary sides.`),1))}function zl(e){const t=(0,l.getBlockSupport)(e,Pl);return!!(!0===t||null!=t&&t.blockGap)}function Fl(e){if(!e)return null;const t="string"==typeof e;return{top:t?e:null==e?void 0:e.top,left:t?e:null==e?void 0:e.left}}function Vl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0";const n=Fl(e);if(!n)return null;const o=Oo(null==n?void 0:n.top)||t,l=Oo(null==n?void 0:n.left)||t;return o===l?o:`${o} ${l}`}function Hl(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Yo("spacing.blockGap");return!zl(e)||t}function Gl(e){var t;const{clientId:n,attributes:{style:o},name:l,setAttributes:r}=e,i=Yo("spacing.spacingSizes"),a=(0,m.__experimentalUseCustomUnits)({availableUnits:Yo("spacing.units")||["%","px","em","rem","vw"]}),c=Dl(l,"blockGap"),u=Mo(n);if(Hl(e))return null;const d=c&&c.some((e=>Ml.includes(e))),p=e=>{var t;let n=e;e&&d?n={...Fl(e)}:null!=e&&e.hasOwnProperty("top")&&(n=e.top);const l={...o,spacing:{...null==o?void 0:o.spacing,blockGap:n}};r({style:al(l)});const i=(null===(t=window)||void 0===t?void 0:t.navigator.userAgent)&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome ")&&!window.navigator.userAgent.includes("Chromium ");var s;u.current&&i&&(null===(s=u.current.parentNode)||void 0===s||s.replaceChild(u.current,u.current))},g=Fl(null==o||null===(t=o.spacing)||void 0===t?void 0:t.blockGap),f=d?{...g,right:null==g?void 0:g.left,bottom:null==g?void 0:g.top}:{top:null==g?void 0:g.top};return s.Platform.select({web:(0,s.createElement)(s.Fragment,null,(!i||0===(null==i?void 0:i.length))&&(d?(0,s.createElement)(m.__experimentalBoxControl,{label:(0,h.__)("Block spacing"),min:0,onChange:p,units:a,sides:c,values:f,allowReset:!1,splitOnAxis:d}):(0,s.createElement)(m.__experimentalUnitControl,{label:(0,h.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:p,units:a,value:f})),(null==i?void 0:i.length)>0&&(0,s.createElement)(ll,{values:f,onChange:p,label:(0,h.__)("Block spacing"),sides:d?c:["top"],units:a,allowReset:!1,splitOnAxis:d})),native:null})}const Ul=(0,s.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(m.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Wl=(0,s.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(m.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),$l={top:{icon:(0,s.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(m.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:(0,h._x)("Align top","Block vertical alignment setting")},center:{icon:Wl,title:(0,h._x)("Align middle","Block vertical alignment setting")},bottom:{icon:Ul,title:(0,h._x)("Align bottom","Block vertical alignment setting")}},jl=["top","center","bottom"],Kl={isAlternate:!0},ql=function(e){let{value:t,onChange:n,controls:o=jl,isCollapsed:l=!0,isToolbar:r}=e;const a=$l[t],c=$l.top,u=r?m.ToolbarGroup:m.ToolbarDropdownMenu,d=r?{isCollapsed:l}:{popoverProps:{POPOVER_PROPS:Kl}};return(0,s.createElement)(u,i({icon:a?a.icon:c.icon,label:(0,h._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map((e=>{return{...$l[e],isActive:t===e,role:l?"menuitemradio":void 0,onClick:(o=e,()=>n(t===o?void 0:o))};var o}))},d))},Yl=e=>(0,s.createElement)(ql,i({},e,{isToolbar:!1})),Zl=e=>(0,s.createElement)(ql,i({},e,{isToolbar:!0})),Ql={left:yo,center:Eo,right:Co,"space-between":So},Xl=function(e){let{allowedControls:t=["left","center","right","space-between"],isCollapsed:n=!0,onChange:o,value:l,popoverProps:r,isToolbar:a}=e;const c=e=>{o(e===l?void 0:e)},u=l?Ql[l]:Ql.left,d=[{name:"left",icon:yo,title:(0,h.__)("Justify items left"),isActive:"left"===l,onClick:()=>c("left")},{name:"center",icon:Eo,title:(0,h.__)("Justify items center"),isActive:"center"===l,onClick:()=>c("center")},{name:"right",icon:Co,title:(0,h.__)("Justify items right"),isActive:"right"===l,onClick:()=>c("right")},{name:"space-between",icon:So,title:(0,h.__)("Space between items"),isActive:"space-between"===l,onClick:()=>c("space-between")}],p=a?m.ToolbarGroup:m.ToolbarDropdownMenu,g=a?{isCollapsed:n}:{};return(0,s.createElement)(p,i({icon:u,popoverProps:r,label:(0,h.__)("Change items justification"),controls:d.filter((e=>t.includes(e.name)))},g))},Jl=e=>(0,s.createElement)(Xl,i({},e,{isToolbar:!1})),er=e=>(0,s.createElement)(Xl,i({},e,{isToolbar:!0})),tr={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},nr={left:"flex-start",right:"flex-end",center:"center"},or={top:"flex-start",center:"center",bottom:"flex-end"},lr=["wrap","nowrap"],rr={name:"flex",label:(0,h.__)("Flex"),inspectorControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:o={}}=e;const{allowOrientation:l=!0}=o;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(m.Flex,null,(0,s.createElement)(m.FlexItem,null,(0,s.createElement)(sr,{layout:t,onChange:n})),(0,s.createElement)(m.FlexItem,null,l&&(0,s.createElement)(cr,{layout:t,onChange:n}))),(0,s.createElement)(ar,{layout:t,onChange:n}))},toolBarControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:o}=e;if(null!=o&&o.allowSwitching)return null;const{allowVerticalAlignment:l=!0}=o;return(0,s.createElement)(ko,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(sr,{layout:t,onChange:n,isToolbar:!0}),l&&"vertical"!==(null==t?void 0:t.orientation)&&(0,s.createElement)(ir,{layout:t,onChange:n,isToolbar:!0}))},getLayoutStyle:function(e){var t,n;let{selector:o,layout:l,style:r,blockName:i,hasBlockGapSupport:s,layoutDefinitions:a}=e;const{orientation:c="horizontal"}=l,u=null!=r&&null!==(t=r.spacing)&&void 0!==t&&t.blockGap&&!dl(i,"spacing","blockGap")?Vl(null==r||null===(n=r.spacing)||void 0===n?void 0:n.blockGap,"0.5em"):void 0,d=tr[l.justifyContent],p=lr.includes(l.flexWrap)?l.flexWrap:"wrap",m=or[l.verticalAlignment],g=nr[l.justifyContent]||nr.left;let h="";const f=[];return p&&"wrap"!==p&&f.push(`flex-wrap: ${p}`),"horizontal"===c?(m&&f.push(`align-items: ${m}`),d&&f.push(`justify-content: ${d}`)):(f.push("flex-direction: column"),f.push(`align-items: ${g}`)),f.length&&(h=`${Io(o)} {\n\t\t\t\t${f.join("; ")};\n\t\t\t}`),s&&u&&(h+=xo(o,a,"flex",u)),h},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments:()=>[]};function ir(e){let{layout:t,onChange:n,isToolbar:o=!1}=e;const{verticalAlignment:l=or.center}=t,r=e=>{n({...t,verticalAlignment:e})};if(o)return(0,s.createElement)(Yl,{onChange:r,value:l});const i=[{value:"flex-start",label:(0,h.__)("Align items top")},{value:"center",label:(0,h.__)("Align items center")},{value:"flex-end",label:(0,h.__)("Align items bottom")}];return(0,s.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-vertical-alignment-control"},(0,s.createElement)("legend",null,(0,h.__)("Vertical alignment")),(0,s.createElement)("div",null,i.map(((e,t,n)=>(0,s.createElement)(m.Button,{key:e,label:n,icon:t,isPressed:l===e,onClick:()=>r(e)})))))}function sr(e){let{layout:t,onChange:n,isToolbar:o=!1}=e;const{justifyContent:l="left",orientation:r="horizontal"}=t,i=e=>{n({...t,justifyContent:e})},a=["left","center","right"];if("horizontal"===r&&a.push("space-between"),o)return(0,s.createElement)(Jl,{allowedControls:a,value:l,onChange:i,popoverProps:{position:"bottom right",isAlternate:!0}});const c=[{value:"left",icon:yo,label:(0,h.__)("Justify items left")},{value:"center",icon:Eo,label:(0,h.__)("Justify items center")},{value:"right",icon:Co,label:(0,h.__)("Justify items right")}];return"horizontal"===r&&c.push({value:"space-between",icon:So,label:(0,h.__)("Space between items")}),(0,s.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-justification-controls"},(0,s.createElement)("legend",null,(0,h.__)("Justification")),(0,s.createElement)("div",null,c.map((e=>{let{value:t,icon:n,label:o}=e;return(0,s.createElement)(m.Button,{key:t,label:o,icon:n,isPressed:l===t,onClick:()=>i(t)})}))))}function ar(e){let{layout:t,onChange:n}=e;const{flexWrap:o="wrap"}=t;return(0,s.createElement)(m.ToggleControl,{label:(0,h.__)("Allow to wrap to multiple lines"),onChange:e=>{n({...t,flexWrap:e?"wrap":"nowrap"})},checked:"wrap"===o})}function cr(e){let{layout:t,onChange:n}=e;const{orientation:o="horizontal"}=t;return(0,s.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-orientation-controls"},(0,s.createElement)("legend",null,(0,h.__)("Orientation")),(0,s.createElement)(m.Button,{label:(0,h.__)("Horizontal"),icon:wo,isPressed:"horizontal"===o,onClick:()=>n({...t,orientation:"horizontal"})}),(0,s.createElement)(m.Button,{label:(0,h.__)("Vertical"),icon:Bo,isPressed:"vertical"===o,onClick:()=>n({...t,orientation:"vertical"})}))}const ur={name:"default",label:(0,h.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function(e){var t;let{selector:n,style:o,blockName:l,hasBlockGapSupport:r,layoutDefinitions:i}=e;const s=Vl(null==o||null===(t=o.spacing)||void 0===t?void 0:t.blockGap);let a="";dl(l,"spacing","blockGap")||(null!=s&&s.top?a=Vl(null==s?void 0:s.top):"string"==typeof s&&(a=Vl(s)));let c="";return r&&a&&(c+=xo(n,i,"default",a)),c},getOrientation:()=>"vertical",getAlignments(e){const t=To(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:o}=e,l=[{name:"left"},{name:"center"},{name:"right"}];return n&&l.unshift({name:"full"}),o&&l.unshift({name:"wide",info:t.wide}),l.unshift({name:"none",info:t.none}),l}},dr=function(e){let{icon:t,size:n=24,...o}=e;return(0,s.cloneElement)(t,{width:n,height:n,...o})},pr=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M7 9v6h10V9H7zM5 19.8h14v-1.5H5v1.5zM5 4.3v1.5h14V4.3H5z"})),mr=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),gr=window.wp.styleEngine,hr=[ur,rr,{name:"constrained",label:(0,h.__)("Constrained"),inspectorControls:function(e){let{layout:t,onChange:n}=e;const{wideSize:o,contentSize:l,justifyContent:r="center"}=t,i=[{value:"left",icon:yo,label:(0,h.__)("Justify items left")},{value:"center",icon:Eo,label:(0,h.__)("Justify items center")},{value:"right",icon:Co,label:(0,h.__)("Justify items right")}],a=(0,m.__experimentalUseCustomUnits)({availableUnits:Yo("spacing.units")||["%","px","em","rem","vw"]});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,s.createElement)(m.__experimentalUnitControl,{label:(0,h.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:l||o||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,contentSize:e})},units:a}),(0,s.createElement)(dr,{icon:pr})),(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,s.createElement)(m.__experimentalUnitControl,{label:(0,h.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:o||l||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,wideSize:e})},units:a}),(0,s.createElement)(dr,{icon:mr}))),(0,s.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,h.__)("Customize the width for all elements that are assigned to the center or wide columns.")),(0,s.createElement)(m.__experimentalToggleGroupControl,{__experimentalIsBorderless:!0,label:(0,h.__)("Justification"),value:r,onChange:e=>{n({...t,justifyContent:e})}},i.map((e=>{let{value:t,icon:n,label:o}=e;return(0,s.createElement)(m.__experimentalToggleGroupControlOptionIcon,{key:t,value:t,icon:n,label:o})}))))},toolBarControls:function(){return null},getLayoutStyle:function(e){var t,n;let{selector:o,layout:l={},style:r,blockName:i,hasBlockGapSupport:s,layoutDefinitions:a}=e;const{contentSize:c,wideSize:u,justifyContent:d}=l,p=Vl(null==r||null===(t=r.spacing)||void 0===t?void 0:t.blockGap);let m="";dl(i,"spacing","blockGap")||(null!=p&&p.top?m=Vl(null==p?void 0:p.top):"string"==typeof p&&(m=Vl(p)));const g="left"===d?"0 !important":"auto !important",h="right"===d?"0 !important":"auto !important";let f=c||u?`\n\t\t\t\t\t${Io(o,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {\n\t\t\t\t\t\tmax-width: ${null!=c?c:u};\n\t\t\t\t\t\tmargin-left: ${g};\n\t\t\t\t\t\tmargin-right: ${h};\n\t\t\t\t\t}\n\t\t\t\t\t${Io(o,"> .alignwide")} {\n\t\t\t\t\t\tmax-width: ${null!=u?u:c};\n\t\t\t\t\t}\n\t\t\t\t\t${Io(o,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";return"left"===d?f+=`${Io(o,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-left: ${g}; }`:"right"===d&&(f+=`${Io(o,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-right: ${h}; }`),null!=r&&null!==(n=r.spacing)&&void 0!==n&&n.padding&&(0,gr.getCSSRules)(r).forEach((e=>{"paddingRight"===e.key?f+=`\n\t\t\t\t\t${Io(o,"> .alignfull")} {\n\t\t\t\t\t\tmargin-right: calc(${e.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`:"paddingLeft"===e.key&&(f+=`\n\t\t\t\t\t${Io(o,"> .alignfull")} {\n\t\t\t\t\t\tmargin-left: calc(${e.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`)})),s&&m&&(f+=xo(o,a,"constrained",m)),f},getOrientation:()=>"vertical",getAlignments(e){const t=To(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:o}=e,l=[{name:"left"},{name:"center"},{name:"right"}];return n&&l.unshift({name:"full"}),o&&l.unshift({name:"wide",info:t.wide}),l.unshift({name:"none",info:t.none}),l}}];function fr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return hr.find((t=>t.name===e))}const vr={type:"default"},br=(0,s.createContext)(vr),_r=br.Provider;function kr(){return(0,s.useContext)(br)}function yr(e){let{layout:t={},css:n,...o}=e;const l=fr(t.type),r=null!==Yo("spacing.blockGap");if(l){var i;if(n)return(0,s.createElement)("style",null,n);const e=null===(i=l.getLayoutStyle)||void 0===i?void 0:i.call(l,{hasBlockGapSupport:r,layout:t,...o});if(e)return(0,s.createElement)("style",null,e)}return null}const Er=["none","left","center","right","wide","full"],Cr=["wide","full"];function Sr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Er;e.includes("none")||(e=["none",...e]);const{wideControlsEnabled:t=!1,themeSupportsLayout:n}=(0,p.useSelect)((e=>{const{getSettings:t}=e(co),n=t();return{wideControlsEnabled:n.alignWide,themeSupportsLayout:n.supportsLayout}}),[]),o=kr(),l=fr(null==o?void 0:o.type),r=l.getAlignments(o);if(n){const t=r.filter((t=>{let{name:n}=t;return e.includes(n)}));return 1===t.length&&"none"===t[0].name?[]:t}if("default"!==l.name&&"constrained"!==l.name)return[];const{alignments:i=Er}=o,s=e.filter((e=>(o.alignments||t||!Cr.includes(e))&&i.includes(e))).map((e=>({name:e})));return 1===s.length&&"none"===s[0].name?[]:s}const wr=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),Br=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),Ir=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),xr=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"})),Tr={none:{icon:wr,title:(0,h._x)("None","Alignment option")},left:{icon:Br,title:(0,h.__)("Align left")},center:{icon:pr,title:(0,h.__)("Align center")},right:{icon:Ir,title:(0,h.__)("Align right")},wide:{icon:mr,title:(0,h.__)("Wide width")},full:{icon:xr,title:(0,h.__)("Full width")}},Nr={isAlternate:!0},Pr=function(e){let{value:t,onChange:n,controls:o,isToolbar:l,isCollapsed:r=!0}=e;const a=Sr(o);if(!a.length)return null;function u(e){n([t,"none"].includes(e)?void 0:e)}const d=Tr[t],p=Tr.none,g=l?m.ToolbarGroup:m.ToolbarDropdownMenu,f={icon:d?d.icon:p.icon,label:(0,h.__)("Align")},v=l?{isCollapsed:r,controls:a.map((e=>{let{name:n}=e;return{...Tr[n],isActive:t===n||!t&&"none"===n,role:r?"menuitemradio":void 0,onClick:()=>u(n)}}))}:{toggleProps:{describedBy:(0,h.__)("Change alignment")},popoverProps:Nr,children:e=>{let{onClose:n}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(m.MenuGroup,{className:"block-editor-block-alignment-control__menu-group"},a.map((e=>{let{name:o,info:l}=e;const{icon:r,title:i}=Tr[o],a=o===t||!t&&"none"===o;return(0,s.createElement)(m.MenuItem,{key:o,icon:r,iconPosition:"left",className:c()("components-dropdown-menu__menu-item",{"is-active":a}),isSelected:a,onClick:()=>{u(o),n()},role:"menuitemradio",info:l},i)}))))}};return(0,s.createElement)(g,i({},f,v))},Lr=e=>(0,s.createElement)(Pr,i({},e,{isToolbar:!1})),Mr=e=>(0,s.createElement)(Pr,i({},e,{isToolbar:!0})),Rr=["left","center","right","wide","full"],Ar=["wide","full"];function Dr(e){let t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?Rr.filter((t=>e.includes(t))):!0===e?[...Rr]:[],!o||!0===e&&!n?(0,u.without)(t,...Ar):t}const Or=(0,d.createHigherOrderComponent)((e=>t=>{const n=(0,s.createElement)(e,t),{name:o}=t,r=Sr(Dr((0,l.getBlockSupport)(o,"align"),(0,l.hasBlockSupport)(o,"alignWide",!0))).map((e=>{let{name:t}=e;return t})),i=(0,p.useSelect)((e=>e(co).__unstableGetContentLockingParent(t.clientId)),[t.clientId]);return!r.length||i?n:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(ko,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(Lr,{value:t.attributes.align,onChange:e=>{if(!e){var n,o;const r=(0,l.getBlockType)(t.name);(null==r||null===(n=r.attributes)||void 0===n||null===(o=n.align)||void 0===o?void 0:o.default)&&(e="")}t.setAttributes({align:e})},controls:r})),n)}),"withToolbarControls"),zr=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:o}=t,{align:r}=o,a=Sr(Dr((0,l.getBlockSupport)(n,"align"),(0,l.hasBlockSupport)(n,"alignWide",!0)));if(void 0===r)return(0,s.createElement)(e,t);let c=t.wrapperProps;return a.some((e=>e.name===r))&&(c={...c,"data-align":r}),(0,s.createElement)(e,i({},t,{wrapperProps:c}))}));(0,r.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.align)&&void 0!==t?t:{})||(0,l.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...Rr,""]}}),e})),(0,r.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",zr),(0,r.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",Or),(0,r.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:o}=n;return Dr((0,l.getBlockSupport)(t,"align"),(0,l.hasBlockSupport)(t,"alignWide",!0)).includes(o)&&(e.className=c()(`align${o}`,e.className)),e})),(0,r.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.lock)&&void 0!==t?t:{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));const Fr=/[\s#]/g,Vr={type:"string",source:"attribute",attribute:"id",selector:"*"},Hr=(0,d.createHigherOrderComponent)((e=>t=>{if((0,l.hasBlockSupport)(t.name,"anchor")&&t.isSelected){const n="web"===s.Platform.OS,o=(0,s.createElement)(m.TextControl,{className:"html-anchor-control",label:(0,h.__)("HTML anchor"),help:(0,s.createElement)(s.Fragment,null,(0,h.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),n&&(0,s.createElement)(m.ExternalLink,{href:(0,h.__)("https://wordpress.org/support/article/page-jumps/")},(0,h.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:(0,h.__)("Add an anchor"),onChange:e=>{e=e.replace(Fr,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(e,t),n&&(0,s.createElement)(vl,{__experimentalGroup:"advanced"},o),!n&&"core/heading"===t.name&&(0,s.createElement)(vl,null,(0,s.createElement)(m.PanelBody,{title:(0,h.__)("Heading settings")},o)))}return(0,s.createElement)(e,t)}),"withInspectorControl");(0,r.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.anchor)&&void 0!==t?t:{})||(0,l.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:Vr}),e})),(0,r.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",Hr),(0,r.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return(0,l.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const Gr={type:"string",source:"attribute",attribute:"aria-label",selector:"*"};(0,r.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",(function(e){var t,n;return null!=e&&null!==(t=e.attributes)&&void 0!==t&&null!==(n=t.ariaLabel)&&void 0!==n&&n.type||(0,l.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:Gr}),e})),(0,r.addFilter)("blocks.getSaveContent.extraProps","core/ariaLabel/save-props",(function(e,t,n){return(0,l.hasBlockSupport)(t,"ariaLabel")&&(e["aria-label"]=""===n.ariaLabel?null:n.ariaLabel),e}));const Ur=(0,d.createHigherOrderComponent)((e=>t=>(0,l.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?(0,s.createElement)(s.Fragment,null,(0,s.createElement)(e,t),(0,s.createElement)(vl,{__experimentalGroup:"advanced"},(0,s.createElement)(m.TextControl,{autoComplete:"off",label:(0,h.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:(0,h.__)("Separate multiple classes with spaces.")}))):(0,s.createElement)(e,t)),"withInspectorControl");(0,r.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return(0,l.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,r.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",Ur),(0,r.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return(0,l.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=c()(e.className,n.className)),e})),(0,r.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){if(!(0,l.hasBlockSupport)(e.name,"customClassName",!0))return e;if(1===o.length&&e.innerBlocks.length===t.length)return e;if(1===o.length&&t.length>1||o.length>1&&1===t.length)return e;if(t[n]){var r;const o=null===(r=t[n])||void 0===r?void 0:r.attributes.className;if(o)return{...e,attributes:{...e.attributes,className:o}}}return e})),(0,r.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,l.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=[...new Set([(0,l.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,l.getBlockDefaultClassName)(t.name)),e}));const Wr=window.wp.dom,$r=(0,s.createContext)({});function jr(e){let{value:t,children:n}=e;const o=(0,s.useContext)($r),l=(0,s.useMemo)((()=>({...o,...t})),[o,t]);return(0,s.createElement)($r.Provider,{value:l,children:n})}const Kr=$r,qr={},Yr=(0,m.withFilters)("editor.BlockEdit")((e=>{const{attributes:t={},name:n}=e,o=(0,l.getBlockType)(n),r=(0,s.useContext)(Kr),a=(0,s.useMemo)((()=>o&&o.usesContext?(0,u.pick)(r,o.usesContext):qr),[o,r]);if(!o)return null;const d=o.edit||o.save;if(o.apiVersion>1)return(0,s.createElement)(d,i({},e,{context:a}));const p=(0,l.hasBlockSupport)(o,"className",!0)?(0,l.getBlockDefaultClassName)(n):null,m=c()(p,t.className,e.className);return(0,s.createElement)(d,i({},e,{context:a,className:m}))}));function Zr(e){const{name:t,isSelected:n,clientId:o}=e,l={name:t,isSelected:n,clientId:o};return(0,s.createElement)(mo,{value:(0,s.useMemo)((()=>l),Object.values(l))},(0,s.createElement)(Yr,e))}const Qr=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"})),Xr=function(e){let{className:t,actions:n,children:o,secondaryActions:l}=e;return(0,s.createElement)("div",{style:{display:"contents",all:"initial"}},(0,s.createElement)("div",{className:c()(t,"block-editor-warning")},(0,s.createElement)("div",{className:"block-editor-warning__contents"},(0,s.createElement)("p",{className:"block-editor-warning__message"},o),(s.Children.count(n)>0||l)&&(0,s.createElement)("div",{className:"block-editor-warning__actions"},s.Children.count(n)>0&&s.Children.map(n,((e,t)=>(0,s.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),l&&(0,s.createElement)(m.DropdownMenu,{className:"block-editor-warning__secondary",icon:Qr,label:(0,h.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,s.createElement)(m.MenuGroup,null,l.map(((e,t)=>(0,s.createElement)(m.MenuItem,{onClick:e.onClick,key:t},e.title))))))))))};var Jr=n(1973);function ei(e){let{title:t,rawContent:n,renderedContent:o,action:l,actionText:r,className:i}=e;return(0,s.createElement)("div",{className:i},(0,s.createElement)("div",{className:"block-editor-block-compare__content"},(0,s.createElement)("h2",{className:"block-editor-block-compare__heading"},t),(0,s.createElement)("div",{className:"block-editor-block-compare__html"},n),(0,s.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,s.createElement)(s.RawHTML,null,(0,Wr.safeHTML)(o)))),(0,s.createElement)("div",{className:"block-editor-block-compare__action"},(0,s.createElement)(m.Button,{variant:"secondary",tabIndex:"0",onClick:l},r)))}const ti=function(e){let{block:t,onKeep:n,onConvert:o,convertor:r,convertButtonText:i}=e;const a=(d=r(t),(0,u.castArray)(d).map((e=>(0,l.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var d;const p=(m=t.originalContent,g=a,(0,Jr.Kx)(m,g).map(((e,t)=>{const n=c()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,s.createElement)("span",{key:t,className:n},e.value)})));var m,g;return(0,s.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,s.createElement)(ei,{title:(0,h.__)("Current"),className:"block-editor-block-compare__current",action:n,actionText:(0,h.__)("Convert to HTML"),rawContent:t.originalContent,renderedContent:t.originalContent}),(0,s.createElement)(ei,{title:(0,h.__)("After Conversion"),className:"block-editor-block-compare__converted",action:o,actionText:i,rawContent:p,renderedContent:a}))},ni=e=>(0,l.rawHandler)({HTML:e.originalContent}),oi=(0,d.compose)([(0,p.withSelect)(((e,t)=>{let{clientId:n}=t;return{block:e(co).getBlock(n)}})),(0,p.withDispatch)(((e,t)=>{let{block:n}=t;const{replaceBlock:o}=e(co);return{convertToClassic(){o(n.clientId,(e=>(0,l.createBlock)("core/freeform",{content:e.originalContent}))(n))},convertToHTML(){o(n.clientId,(e=>(0,l.createBlock)("core/html",{content:e.originalContent}))(n))},convertToBlocks(){o(n.clientId,ni(n))},attemptBlockRecovery(){o(n.clientId,(e=>{let{name:t,attributes:n,innerBlocks:o}=e;return(0,l.createBlock)(t,n,o)})(n))}}}))])((function(e){let{convertToHTML:t,convertToBlocks:n,convertToClassic:o,attemptBlockRecovery:r,block:i}=e;const a=!!(0,l.getBlockType)("core/html"),[c,u]=(0,s.useState)(!1),d=(0,s.useCallback)((()=>u(!0)),[]),p=(0,s.useCallback)((()=>u(!1)),[]),g=(0,s.useMemo)((()=>[{
|
10 |
// translators: Button to fix block content
|
11 |
-
title:(0,h._x)("Resolve","imperative verb"),onClick:d},a&&{title:(0,h.__)("Convert to HTML"),onClick:t},{title:(0,h.__)("Convert to Classic Block"),onClick:o}].filter(Boolean)),[d,t,o]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(
|
12 |
-
(0,h.__)("Resolve Block"),onRequestClose:p,className:"block-editor-block-compare"},(0,s.createElement)(ti,{block:i,onKeep:t,onConvert:n,convertor:ni,convertButtonText:(0,h.__)("Convert to Blocks")})))})),li=(0,s.createElement)(Xr,{className:"block-editor-block-list__block-crash-warning"},(0,h.__)("This block has encountered an error and cannot be previewed.")),ri=()=>li;class ii extends s.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}const si=ii;var ai=n(773);const ci=function(e){let{clientId:t}=e;const[n,o]=(0,s.useState)(""),r=(0,p.useSelect)((e=>e(co).getBlock(t)),[t]),{updateBlock:i}=(0,p.useDispatch)(co);return(0,s.useEffect)((()=>{o((0,l.getBlockContent)(r))}),[r]),(0,s.createElement)(ai.Z,{className:"block-editor-block-list__block-html-textarea",value:n,onBlur:()=>{const e=(0,l.getBlockType)(r.name);if(!e)return;const s=(0,l.getBlockAttributes)(e,n,r.attributes),a=n||(0,l.getSaveContent)(e,s),[c]=n?(0,l.validateBlock)({...r,attributes:s,originalContent:a}):[!0];i(t,{attributes:s,originalContent:a,isValid:c}),n||o({content:a})},onChange:e=>o(e.target.value)})};let ui=Bi();const di=e=>Ei(e,ui);let pi=Bi();di.write=e=>Ei(e,pi);let mi=Bi();di.onStart=e=>Ei(e,mi);let gi=Bi();di.onFrame=e=>Ei(e,gi);let hi=Bi();di.onFinish=e=>Ei(e,hi);let fi=[];di.setTimeout=(e,t)=>{let n=di.now()+t,o=()=>{let e=fi.findIndex((e=>e.cancel==o));~e&&fi.splice(e,1),ki-=~e?1:0},l={time:n,handler:e,cancel:o};return fi.splice(vi(n),0,l),ki+=1,Ci(),l};let vi=e=>~(~fi.findIndex((t=>t.time>e))||~fi.length);di.cancel=e=>{mi.delete(e),gi.delete(e),ui.delete(e),pi.delete(e),hi.delete(e)},di.sync=e=>{yi=!0,di.batchedUpdates(e),yi=!1},di.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function o(...e){t=e,di.onStart(n)}return o.handler=e,o.cancel=()=>{mi.delete(n),t=null},o};let bi="undefined"!=typeof window?window.requestAnimationFrame:()=>{};di.use=e=>bi=e,di.now="undefined"!=typeof performance?()=>performance.now():Date.now,di.batchedUpdates=e=>e(),di.catch=console.error,di.frameLoop="always",di.advance=()=>{"demand"!==di.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):wi()};let _i=-1,ki=0,yi=!1;function Ei(e,t){yi?(t.delete(e),e(0)):(t.add(e),Ci())}function Ci(){_i<0&&(_i=0,"demand"!==di.frameLoop&&bi(Si))}function Si(){~_i&&(bi(Si),di.batchedUpdates(wi))}function wi(){let e=_i;_i=di.now();let t=vi(_i);t&&(Ii(fi.splice(0,t),(e=>e.handler())),ki-=t),mi.flush(),ui.flush(e?Math.min(64,_i-e):16.667),gi.flush(),pi.flush(),hi.flush(),ki||(_i=-1)}function Bi(){let e=new Set,t=e;return{add(n){ki+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(ki-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,ki-=t.size,Ii(t,(t=>t(n)&&e.add(t))),ki+=e.size,t=e)}}}function Ii(e,t){e.forEach((e=>{try{t(e)}catch(e){di.catch(e)}}))}var xi=n(9196),Ti=n.n(xi);function Ni(){}const Pi={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function Li(e,t){if(Pi.arr(e)){if(!Pi.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}const Mi=(e,t)=>e.forEach(t);function Ri(e,t,n){if(Pi.arr(e))for(let o=0;o<e.length;o++)t.call(n,e[o],`${o}`);else for(const o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o)}const Ai=e=>Pi.und(e)?[]:Pi.arr(e)?e:[e];function Di(e,t){if(e.size){const n=Array.from(e);e.clear(),Mi(n,t)}}const Oi=(e,...t)=>Di(e,(e=>e(...t))),zi=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent);let Fi,Vi,Hi=null,Gi=!1,Ui=Ni;var Wi=Object.freeze({__proto__:null,get createStringInterpolator(){return Fi},get to(){return Vi},get colors(){return Hi},get skipAnimation(){return Gi},get willAdvance(){return Ui},assign:e=>{e.to&&(Vi=e.to),e.now&&(di.now=e.now),void 0!==e.colors&&(Hi=e.colors),null!=e.skipAnimation&&(Gi=e.skipAnimation),e.createStringInterpolator&&(Fi=e.createStringInterpolator),e.requestAnimationFrame&&di.use(e.requestAnimationFrame),e.batchedUpdates&&(di.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Ui=e.willAdvance),e.frameLoop&&(di.frameLoop=e.frameLoop)}});const $i=new Set;let ji=[],Ki=[],qi=0;const Yi={get idle(){return!$i.size&&!ji.length},start(e){qi>e.priority?($i.add(e),di.onStart(Zi)):(Qi(e),di(Ji))},advance:Ji,sort(e){if(qi)di.onFrame((()=>Yi.sort(e)));else{const t=ji.indexOf(e);~t&&(ji.splice(t,1),Xi(e))}},clear(){ji=[],$i.clear()}};function Zi(){$i.forEach(Qi),$i.clear(),di(Ji)}function Qi(e){ji.includes(e)||Xi(e)}function Xi(e){ji.splice(function(t,n){const o=t.findIndex((t=>t.priority>e.priority));return o<0?t.length:o}(ji),0,e)}function Ji(e){const t=Ki;for(let n=0;n<ji.length;n++){const o=ji[n];qi=o.priority,o.idle||(Ui(o),o.advance(e),o.idle||t.push(o))}return qi=0,Ki=ji,Ki.length=0,ji=t,ji.length>0}const es="[-+]?\\d*\\.?\\d+",ts=es+"%";function ns(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const os=new RegExp("rgb"+ns(es,es,es)),ls=new RegExp("rgba"+ns(es,es,es,es)),rs=new RegExp("hsl"+ns(es,ts,ts)),is=new RegExp("hsla"+ns(es,ts,ts,es)),ss=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,as=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,cs=/^#([0-9a-fA-F]{6})$/,us=/^#([0-9a-fA-F]{8})$/;function ds(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ps(e,t,n){const o=n<.5?n*(1+t):n+t-n*t,l=2*n-o,r=ds(l,o,e+1/3),i=ds(l,o,e),s=ds(l,o,e-1/3);return Math.round(255*r)<<24|Math.round(255*i)<<16|Math.round(255*s)<<8}function ms(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function gs(e){return(parseFloat(e)%360+360)%360/360}function hs(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fs(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function vs(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=cs.exec(e))?parseInt(t[1]+"ff",16)>>>0:Hi&&void 0!==Hi[e]?Hi[e]:(t=os.exec(e))?(ms(t[1])<<24|ms(t[2])<<16|ms(t[3])<<8|255)>>>0:(t=ls.exec(e))?(ms(t[1])<<24|ms(t[2])<<16|ms(t[3])<<8|hs(t[4]))>>>0:(t=ss.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=us.exec(e))?parseInt(t[1],16)>>>0:(t=as.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=rs.exec(e))?(255|ps(gs(t[1]),fs(t[2]),fs(t[3])))>>>0:(t=is.exec(e))?(ps(gs(t[1]),fs(t[2]),fs(t[3]))|hs(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const bs=(e,t,n)=>{if(Pi.fun(e))return e;if(Pi.arr(e))return bs({range:e,output:t,extrapolate:n});if(Pi.str(e.output[0]))return Fi(e);const o=e,l=o.output,r=o.range||[0,1],i=o.extrapolateLeft||o.extrapolate||"extend",s=o.extrapolateRight||o.extrapolate||"extend",a=o.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,r);return function(e,t,n,o,l,r,i,s,a){let c=a?a(e):e;if(c<t){if("identity"===i)return c;"clamp"===i&&(c=t)}if(c>n){if("identity"===s)return c;"clamp"===s&&(c=n)}return o===l?o:t===n?e<=t?o:l:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=r(c),o===-1/0?c=-c:l===1/0?c+=o:c=c*(l-o)+o,c)}(e,r[t],r[t+1],l[t],l[t+1],a,i,s,o.map)}};function _s(){return(_s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}const ks=Symbol.for("FluidValue.get"),ys=Symbol.for("FluidValue.observers"),Es=e=>Boolean(e&&e[ks]),Cs=e=>e&&e[ks]?e[ks]():e,Ss=e=>e[ys]||null;function ws(e,t){let n=e[ys];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}class Bs{constructor(e){if(this[ks]=void 0,this[ys]=void 0,!e&&!(e=this.get))throw Error("Unknown getter");Is(this,e)}}const Is=(e,t)=>Ns(e,ks,t);function xs(e,t){if(e[ks]){let n=e[ys];n||Ns(e,ys,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Ts(e,t){let n=e[ys];if(n&&n.has(t)){const o=n.size-1;o?n.delete(t):e[ys]=null,e.observerRemoved&&e.observerRemoved(o,t)}}const Ns=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ps=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Ls=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Ms=new RegExp(`(${Ps.source})(%|[a-z]+)`,"i"),Rs=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,As=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Ds=e=>{const[t,n]=Os(e);if(!t||zi())return e;const o=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(o)return o.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||e}return n&&As.test(n)?Ds(n):n||e},Os=e=>{const t=As.exec(e);if(!t)return[,];const[,n,o]=t;return[n,o]};let zs;const Fs=(e,t,n,o,l)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(o)}, ${l})`,Vs=e=>{zs||(zs=Hi?new RegExp(`(${Object.keys(Hi).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>Cs(e).replace(As,Ds).replace(Ls,vs).replace(zs,vs))),n=t.map((e=>e.match(Ps).map(Number))),o=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>bs(_s({},e,{output:t}))));return e=>{var n;const l=!Ms.test(t[0])&&(null==(n=t.find((e=>Ms.test(e))))?void 0:n.replace(Ps,""));let r=0;return t[0].replace(Ps,(()=>`${o[r++](e)}${l||""}`)).replace(Rs,Fs)}},Hs="react-spring: ",Gs=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${Hs}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},Us=Gs(console.warn),Ws=Gs(console.warn);function $s(e){return Pi.str(e)&&("#"==e[0]||/\d/.test(e)||!zi()&&As.test(e)||e in(Hi||{}))}const js="undefined"!=typeof window&&window.document&&window.document.createElement?xi.useLayoutEffect:xi.useEffect;function Ks(){const e=(0,xi.useState)()[1],t=(()=>{const e=(0,xi.useRef)(!1);return js((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}const qs=e=>(0,xi.useEffect)(e,Ys),Ys=[];function Zs(e){const t=(0,xi.useRef)();return(0,xi.useEffect)((()=>{t.current=e})),t.current}const Qs=Symbol.for("Animated:node"),Xs=e=>e&&e[Qs],Js=(e,t)=>{return n=e,o=Qs,l=t,Object.defineProperty(n,o,{value:l,writable:!0,configurable:!0});var n,o,l},ea=e=>e&&e[Qs]&&e[Qs].getPayload();class ta{constructor(){this.payload=void 0,Js(this,this)}getPayload(){return this.payload||[]}}class na extends ta{constructor(e){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=e,Pi.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new na(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Pi.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,Pi.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}}class oa extends na{constructor(e){super(0),this._string=null,this._toString=void 0,this._toString=bs({output:[e,e]})}static create(e){return new oa(e)}getValue(){let e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(Pi.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=bs({output:[this.getValue(),e]})),this._value=0,super.reset()}}const la={dependencies:null};class ra extends ta{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Ri(this.source,((n,o)=>{var l;(l=n)&&l[Qs]===l?t[o]=n.getValue(e):Es(n)?t[o]=Cs(n):e||(t[o]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Mi(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return Ri(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){la.dependencies&&Es(e)&&la.dependencies.add(e);const t=ea(e);t&&Mi(t,(e=>this.add(e)))}}class ia extends ra{constructor(e){super(e)}static create(e){return new ia(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(sa)),!0)}}function sa(e){return($s(e)?oa:na).create(e)}function aa(e){const t=Xs(e);return t?t.constructor:Pi.arr(e)?ia:$s(e)?oa:na}function ca(){return(ca=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}const ua=(e,t)=>{const n=!Pi.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,xi.forwardRef)(((o,l)=>{const r=(0,xi.useRef)(null),i=n&&(0,xi.useCallback)((e=>{r.current=function(e,t){return e&&(Pi.fun(e)?e(t):e.current=t),t}(l,e)}),[l]),[s,a]=function(e,t){const n=new Set;return la.dependencies=n,e.style&&(e=ca({},e,{style:t.createAnimatedStyle(e.style)})),e=new ra(e),la.dependencies=null,[e,n]}(o,t),c=Ks(),u=()=>{const e=r.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,s.getValue(!0)))&&c()},d=new da(u,a),p=(0,xi.useRef)();js((()=>(p.current=d,Mi(a,(e=>xs(e,d))),()=>{p.current&&(Mi(p.current.deps,(e=>Ts(e,p.current))),di.cancel(p.current.update))}))),(0,xi.useEffect)(u,[]),qs((()=>()=>{const e=p.current;Mi(e.deps,(t=>Ts(t,e)))}));const m=t.getComponentProps(s.getValue());return xi.createElement(e,ca({},m,{ref:i}))}))};class da{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&di.write(this.update)}}const pa=Symbol.for("AnimatedComponent"),ma=e=>Pi.str(e)?e:e&&Pi.str(e.displayName)?e.displayName:Pi.fun(e)&&e.name||null;function ga(){return(ga=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function ha(e,...t){return Pi.fun(e)?e(...t):e}const fa=(e,t)=>!0===e||!!(t&&e&&(Pi.fun(e)?e(t):Ai(e).includes(t))),va=(e,t)=>Pi.obj(e)?t&&e[t]:e,ba=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,_a=e=>e,ka=(e,t=_a)=>{let n=ya;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const o={};for(const l of n){const n=t(e[l],l);Pi.und(n)||(o[l]=n)}return o},ya=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Ea={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function Ca(e){const t=function(e){const t={};let n=0;if(Ri(e,((e,o)=>{Ea[o]||(t[o]=e,n++)})),n)return t}(e);if(t){const n={to:t};return Ri(e,((e,o)=>o in t||(n[o]=e))),n}return ga({},e)}function Sa(e){return e=Cs(e),Pi.arr(e)?e.map(Sa):$s(e)?Wi.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function wa(e){for(const t in e)return!0;return!1}function Ba(e){return Pi.fun(e)||Pi.arr(e)&&Pi.obj(e[0])}function Ia(e,t){var n;null==(n=e.ref)||n.delete(e),null==t||t.delete(e)}function xa(e,t){var n;t&&e.ref!==t&&(null==(n=e.ref)||n.delete(e),t.add(e),e.ref=t)}Math.PI,Math.PI;const Ta=ga({},{tension:170,friction:26},{mass:1,damping:1,easing:e=>e,clamp:!1});class Na{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,Ta)}}function Pa(e,t){if(Pi.und(t.decay)){const n=!Pi.und(t.tension)||!Pi.und(t.friction);!n&&Pi.und(t.frequency)&&Pi.und(t.damping)&&Pi.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}const La=[];class Ma{constructor(){this.changed=!1,this.values=La,this.toValues=null,this.fromValues=La,this.to=void 0,this.from=void 0,this.config=new Na,this.immediate=!1}}function Ra(e,{key:t,props:n,defaultProps:o,state:l,actions:r}){return new Promise(((i,s)=>{var a;let c,u,d=fa(null!=(a=n.cancel)?a:null==o?void 0:o.cancel,t);if(d)g();else{Pi.und(n.pause)||(l.paused=fa(n.pause,t));let e=null==o?void 0:o.pause;!0!==e&&(e=l.paused||fa(e,t)),c=ha(n.delay||0,t),e?(l.resumeQueue.add(m),r.pause()):(r.resume(),m())}function p(){l.resumeQueue.add(m),l.timeouts.delete(u),u.cancel(),c=u.time-di.now()}function m(){c>0&&!Wi.skipAnimation?(l.delayed=!0,u=di.setTimeout(g,c),l.pauseQueue.add(p),l.timeouts.add(u)):g()}function g(){l.delayed&&(l.delayed=!1),l.pauseQueue.delete(p),l.timeouts.delete(u),e<=(l.cancelId||0)&&(d=!0);try{r.start(ga({},n,{callId:e,cancel:d}),i)}catch(e){s(e)}}}))}const Aa=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?za(e.get()):t.every((e=>e.noop))?Da(e.get()):Oa(e.get(),t.every((e=>e.finished))),Da=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Oa=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),za=e=>({value:e,cancelled:!0,finished:!1});function Fa(e,t,n,o){const{callId:l,parentId:r,onRest:i}=t,{asyncTo:s,promise:a}=n;return r||e!==s||t.reset?n.promise=(async()=>{n.asyncId=l,n.asyncTo=e;const c=ka(t,((e,t)=>"onRest"===t?void 0:e));let u,d;const p=new Promise(((e,t)=>(u=e,d=t))),m=e=>{const t=l<=(n.cancelId||0)&&za(o)||l!==n.asyncId&&Oa(o,!1);if(t)throw e.result=t,d(e),e},g=(e,t)=>{const r=new Ha,i=new Ga;return(async()=>{if(Wi.skipAnimation)throw Va(n),i.result=Oa(o,!1),d(i),i;m(r);const s=Pi.obj(e)?ga({},e):ga({},t,{to:e});s.parentId=l,Ri(c,((e,t)=>{Pi.und(s[t])&&(s[t]=e)}));const a=await o.start(s);return m(r),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),a})()};let h;if(Wi.skipAnimation)return Va(n),Oa(o,!1);try{let t;t=Pi.arr(e)?(async e=>{for(const t of e)await g(t)})(e):Promise.resolve(e(g,o.stop.bind(o))),await Promise.all([t.then(u),p]),h=Oa(o.get(),!0,!1)}catch(e){if(e instanceof Ha)h=e.result;else{if(!(e instanceof Ga))throw e;h=e.result}}finally{l==n.asyncId&&(n.asyncId=r,n.asyncTo=r?s:void 0,n.promise=r?a:void 0)}return Pi.fun(i)&&di.batchedUpdates((()=>{i(h,o,o.item)})),h})():a}function Va(e,t){Di(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}class Ha extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."),this.result=void 0}}class Ga extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}}const Ua=e=>e instanceof $a;let Wa=1;class $a extends Bs{constructor(...e){super(...e),this.id=Wa++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Xs(this);return e&&e.getValue()}to(...e){return Wi.to(this,e)}interpolate(...e){return Us(`${Hs}The "interpolate" function is deprecated in v9 (use "to" instead)`),Wi.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){ws(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Yi.sort(this),ws(this,{type:"priority",parent:this,priority:e})}}const ja=Symbol.for("SpringPhase"),Ka=e=>(1&e[ja])>0,qa=e=>(2&e[ja])>0,Ya=e=>(4&e[ja])>0,Za=(e,t)=>t?e[ja]|=3:e[ja]&=-3,Qa=(e,t)=>t?e[ja]|=4:e[ja]&=-5;class Xa extends $a{constructor(e,t){if(super(),this.key=void 0,this.animation=new Ma,this.queue=void 0,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Pi.und(e)||!Pi.und(t)){const n=Pi.obj(e)?ga({},e):ga({},t,{from:e});Pi.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(qa(this)||this._state.asyncTo)||Ya(this)}get goal(){return Cs(this.animation.to)}get velocity(){const e=Xs(this);return e instanceof na?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return Ka(this)}get isAnimating(){return qa(this)}get isPaused(){return Ya(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const o=this.animation;let{config:l,toValues:r}=o;const i=ea(o.to);!i&&Es(o.to)&&(r=Ai(Cs(o.to))),o.values.forEach(((s,a)=>{if(s.done)return;const c=s.constructor==oa?1:i?i[a].lastPosition:r[a];let u=o.immediate,d=c;if(!u){if(d=s.lastPosition,l.tension<=0)return void(s.done=!0);let t=s.elapsedTime+=e;const n=o.fromValues[a],r=null!=s.v0?s.v0:s.v0=Pi.arr(l.velocity)?l.velocity[a]:l.velocity;let i;if(Pi.und(l.duration))if(l.decay){const e=!0===l.decay?.998:l.decay,o=Math.exp(-(1-e)*t);d=n+r/(1-e)*(1-o),u=Math.abs(s.lastPosition-d)<.1,i=r*o}else{i=null==s.lastVelocity?r:s.lastVelocity;const t=l.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n))),o=l.restVelocity||t/10,a=l.clamp?0:l.bounce,p=!Pi.und(a),m=n==c?s.v0>0:n<c;let g,h=!1;const f=1,v=Math.ceil(e/f);for(let e=0;e<v&&(g=Math.abs(i)>o,g||(u=Math.abs(c-d)<=t,!u));++e)p&&(h=d==c||d>c==m,h&&(i=-i*a,d=c)),i+=(1e-6*-l.tension*(d-c)+.001*-l.friction*i)/l.mass*f,d+=i*f}else{let o=1;l.duration>0&&(this._memoizedDuration!==l.duration&&(this._memoizedDuration=l.duration,s.durationProgress>0&&(s.elapsedTime=l.duration*s.durationProgress,t=s.elapsedTime+=e)),o=(l.progress||0)+t/this._memoizedDuration,o=o>1?1:o<0?0:o,s.durationProgress=o),d=n+l.easing(o)*(c-n),i=(d-s.lastPosition)/e,u=1==o}s.lastVelocity=i,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}i&&!i[a].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,l.round)&&(n=!0)}));const s=Xs(this),a=s.getValue();if(t){const e=Cs(o.to);a===e&&!n||l.decay?n&&l.decay&&this._onChange(a):(s.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(a)}set(e){return di.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(qa(this)){const{to:e,config:t}=this.animation;di.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return Pi.und(e)?(n=this.queue||[],this.queue=[]):n=[Pi.obj(e)?e:ga({},t,{to:e})],Promise.all(n.map((e=>this._update(e)))).then((e=>Aa(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Va(this._state,e&&this._lastCallId),di.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:o}=e;n=Pi.obj(n)?n[t]:n,(null==n||Ba(n))&&(n=void 0),o=Pi.obj(o)?o[t]:o,null==o&&(o=void 0);const l={to:n,from:o};return Ka(this)||(e.reverse&&([n,o]=[o,n]),o=Cs(o),Pi.und(o)?Xs(this)||this._set(n):this._set(o)),l}_update(e,t){let n=ga({},e);const{key:o,defaultProps:l}=this;n.default&&Object.assign(l,ka(n,((e,t)=>/^on/.test(t)?va(e,o):e))),rc(this,n,"onProps"),ic(this,"onProps",n,this);const r=this._prepareNode(n);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return Ra(++this._lastCallId,{key:o,props:n,defaultProps:l,state:i,actions:{pause:()=>{Ya(this)||(Qa(this,!0),Oi(i.pauseQueue),ic(this,"onPause",Oa(this,Ja(this,this.animation.to)),this))},resume:()=>{Ya(this)&&(Qa(this,!1),qa(this)&&this._resume(),Oi(i.resumeQueue),ic(this,"onResume",Oa(this,Ja(this,this.animation.to)),this))},start:this._merge.bind(this,r)}}).then((e=>{if(n.loop&&e.finished&&(!t||!e.noop)){const e=ec(n);if(e)return this._update(e,!0)}return e}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(za(this));const o=!Pi.und(e.to),l=!Pi.und(e.from);if(o||l){if(!(t.callId>this._lastToId))return n(za(this));this._lastToId=t.callId}const{key:r,defaultProps:i,animation:s}=this,{to:a,from:c}=s;let{to:u=a,from:d=c}=e;!l||o||t.default&&!Pi.und(u)||(u=d),t.reverse&&([u,d]=[d,u]);const p=!Li(d,c);p&&(s.from=d),d=Cs(d);const m=!Li(u,a);m&&this._focus(u);const g=Ba(t.to),{config:h}=s,{decay:f,velocity:v}=h;(o||l)&&(h.velocity=0),t.config&&!g&&function(e,t,n){n&&(Pa(n=ga({},n),t),t=ga({},n,t)),Pa(e,t),Object.assign(e,t);for(const t in Ta)null==e[t]&&(e[t]=Ta[t]);let{mass:o,frequency:l,damping:r}=e;Pi.und(l)||(l<.01&&(l=.01),r<0&&(r=0),e.tension=Math.pow(2*Math.PI/l,2)*o,e.friction=4*Math.PI*r*o/l)}(h,ha(t.config,r),t.config!==i.config?ha(i.config,r):void 0);let b=Xs(this);if(!b||Pi.und(u))return n(Oa(this,!0));const _=Pi.und(t.reset)?l&&!t.default:!Pi.und(d)&&fa(t.reset,r),k=_?d:this.get(),y=Sa(u),E=Pi.num(y)||Pi.arr(y)||$s(y),C=!g&&(!E||fa(i.immediate||t.immediate,r));if(m){const e=aa(u);if(e!==b.constructor){if(!C)throw Error(`Cannot animate between ${b.constructor.name} and ${e.name}, as the "to" prop suggests`);b=this._set(y)}}const S=b.constructor;let w=Es(u),B=!1;if(!w){const e=_||!Ka(this)&&p;(m||e)&&(B=Li(Sa(k),y),w=!B),(Li(s.immediate,C)||C)&&Li(h.decay,f)&&Li(h.velocity,v)||(w=!0)}if(B&&qa(this)&&(s.changed&&!_?w=!0:w||this._stop(a)),!g&&((w||Es(a))&&(s.values=b.getPayload(),s.toValues=Es(u)?null:S==oa?[1]:Ai(y)),s.immediate!=C&&(s.immediate=C,C||_||this._set(a)),w)){const{onRest:e}=s;Mi(lc,(e=>rc(this,t,e)));const o=Oa(this,Ja(this,a));Oi(this._pendingCalls,o),this._pendingCalls.add(n),s.changed&&di.batchedUpdates((()=>{s.changed=!_,null==e||e(o,this),_?ha(i.onRest,o):null==s.onStart||s.onStart(o,this)}))}_&&this._set(k),g?n(Fa(t.to,t,this._state,this)):w?this._start():qa(this)&&!m?this._pendingCalls.add(n):n(Da(k))}_focus(e){const t=this.animation;e!==t.to&&(Ss(this)&&this._detach(),t.to=e,Ss(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Es(t)&&(xs(t,this),Ua(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Es(e)&&Ts(e,this)}_set(e,t=!0){const n=Cs(e);if(!Pi.und(n)){const e=Xs(this);if(!e||!Li(n,e.getValue())){const o=aa(n);e&&e.constructor==o?e.setValue(n):Js(this,o.create(n)),e&&di.batchedUpdates((()=>{this._onChange(n,t)}))}}return Xs(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,ic(this,"onStart",Oa(this,Ja(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),ha(this.animation.onChange,e,this)),ha(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Xs(this).reset(Cs(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),qa(this)||(Za(this,!0),Ya(this)||this._resume())}_resume(){Wi.skipAnimation?this.finish():Yi.start(this)}_stop(e,t){if(qa(this)){Za(this,!1);const n=this.animation;Mi(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),ws(this,{type:"idle",parent:this});const o=t?za(this.get()):Oa(this.get(),Ja(this,null!=e?e:n.to));Oi(this._pendingCalls,o),n.changed&&(n.changed=!1,ic(this,"onRest",o,this))}}}function Ja(e,t){const n=Sa(t);return Li(Sa(e.get()),n)}function ec(e,t=e.loop,n=e.to){let o=ha(t);if(o){const l=!0!==o&&Ca(o),r=(l||e).reverse,i=!l||l.reset;return tc(ga({},e,{loop:t,default:!1,pause:void 0,to:!r||Ba(n)?n:void 0,from:i?e.from:void 0,reset:i},l))}}function tc(e){const{to:t,from:n}=e=Ca(e),o=new Set;return Pi.obj(t)&&oc(t,o),Pi.obj(n)&&oc(n,o),e.keys=o.size?Array.from(o):null,e}function nc(e){const t=tc(e);return Pi.und(t.default)&&(t.default=ka(t)),t}function oc(e,t){Ri(e,((e,n)=>null!=e&&t.add(n)))}const lc=["onStart","onRest","onChange","onPause","onResume"];function rc(e,t,n){e.animation[n]=t[n]!==ba(t,n)?va(t[n],e.key):void 0}function ic(e,t,...n){var o,l,r,i;null==(o=(l=e.animation)[t])||o.call(l,...n),null==(r=(i=e.defaultProps)[t])||r.call(i,...n)}const sc=["onStart","onChange","onRest"];let ac=1;class cc{constructor(e,t){this.id=ac++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start(ga({default:!0},e))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(const t in e){const n=e[t];Pi.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(tc(e)),this}start(e){let{queue:t}=this;return e?t=Ai(e).map(tc):this.queue=[],this._flush?this._flush(this,t):(fc(this,t),uc(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Mi(Ai(t),(t=>n[t].stop(!!e)))}else Va(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Pi.und(e))this.start({pause:!0});else{const t=this.springs;Mi(Ai(e),(e=>t[e].pause()))}return this}resume(e){if(Pi.und(e))this.start({pause:!1});else{const t=this.springs;Mi(Ai(e),(e=>t[e].resume()))}return this}each(e){Ri(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,o=this._active.size>0,l=this._changed.size>0;(o&&!this._started||l&&!this._started)&&(this._started=!0,Di(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const r=!o&&this._started,i=l||r&&n.size?this.get():null;l&&t.size&&Di(t,(([e,t])=>{t.value=i,e(t,this,this._item)})),r&&(this._started=!1,Di(n,(([e,t])=>{t.value=i,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}di.onFrame(this._onFrame)}}function uc(e,t){return Promise.all(t.map((t=>dc(e,t)))).then((t=>Aa(e,t)))}async function dc(e,t,n){const{keys:o,to:l,from:r,loop:i,onRest:s,onResolve:a}=t,c=Pi.obj(t.default)&&t.default;i&&(t.loop=!1),!1===l&&(t.to=null),!1===r&&(t.from=null);const u=Pi.arr(l)||Pi.fun(l)?l:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Mi(sc,(n=>{const o=t[n];if(Pi.fun(o)){const l=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=l.get(o);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):l.set(o,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));const d=e._state;t.pause===!d.paused?(d.paused=t.pause,Oi(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const p=(o||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),m=!0===t.cancel||!0===ba(t,"cancel");(u||m&&d.asyncId)&&p.push(Ra(++e._lastAsyncId,{props:t,state:d,actions:{pause:Ni,resume:Ni,start(t,n){m?(Va(d,e._lastAsyncId),n(za(e))):(t.onRest=s,n(Fa(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));const g=Aa(e,await Promise.all(p));if(i&&g.finished&&(!n||!g.noop)){const n=ec(t,i,l);if(n)return fc(e,[n]),dc(e,n,!0)}return a&&di.batchedUpdates((()=>a(g,e,e.item))),g}function pc(e,t){const n=ga({},e.springs);return t&&Mi(Ai(t),(e=>{Pi.und(e.keys)&&(e=tc(e)),Pi.obj(e.to)||(e=ga({},e,{to:void 0})),hc(n,e,(e=>gc(e)))})),mc(e,n),n}function mc(e,t){Ri(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,xs(t,e))}))}function gc(e,t){const n=new Xa;return n.key=e,t&&xs(n,t),n}function hc(e,t,n){t.keys&&Mi(t.keys,(o=>{(e[o]||(e[o]=n(o)))._prepareNode(t)}))}function fc(e,t){Mi(t,(t=>{hc(e.springs,t,(t=>gc(t,e)))}))}const vc=["children"],bc=e=>{let{children:t}=e,n=function(e,t){if(null==e)return{};var n,o,l={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,vc);const o=(0,xi.useContext)(_c),l=n.pause||!!o.pause,r=n.immediate||!!o.immediate;n=function(e,t){const[n]=(0,xi.useState)((()=>({inputs:t,result:e()}))),o=(0,xi.useRef)(),l=o.current;let r=l;return r?Boolean(t&&r.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,r.inputs))||(r={inputs:t,result:e()}):r=n,(0,xi.useEffect)((()=>{o.current=r,l==n&&(n.inputs=n.result=void 0)}),[r]),r.result}((()=>({pause:l,immediate:r})),[l,r]);const{Provider:i}=_c;return xi.createElement(i,{value:n},t)},_c=(kc=bc,yc={},Object.assign(kc,xi.createContext(yc)),kc.Provider._context=kc,kc.Consumer._context=kc,kc);var kc,yc;bc.Provider=_c.Provider,bc.Consumer=_c.Consumer;const Ec=()=>{const e=[],t=function(t){Ws(`${Hs}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);const o=[];return Mi(e,((e,l)=>{if(Pi.und(t))o.push(e.start());else{const r=n(t,e,l);r&&o.push(e.start(r))}})),o};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return Mi(e,(e=>e.pause(...arguments))),this},t.resume=function(){return Mi(e,(e=>e.resume(...arguments))),this},t.set=function(t){Mi(e,(e=>e.set(t)))},t.start=function(t){const n=[];return Mi(e,((e,o)=>{if(Pi.und(t))n.push(e.start());else{const l=this._getProps(t,e,o);l&&n.push(e.start(l))}})),n},t.stop=function(){return Mi(e,(e=>e.stop(...arguments))),this},t.update=function(t){return Mi(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return Pi.fun(e)?e(n,t):e};return t._getProps=n,t};function Cc(e,t,n){const o=Pi.fun(t)&&t;o&&!n&&(n=[]);const l=(0,xi.useMemo)((()=>o||3==arguments.length?Ec():void 0),[]),r=(0,xi.useRef)(0),i=Ks(),s=(0,xi.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){const n=pc(e,t);return r.current>0&&!s.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?uc(e,t):new Promise((o=>{mc(e,n),s.queue.push((()=>{o(uc(e,t))})),i()}))}})),[]),a=(0,xi.useRef)([...s.ctrls]),c=[],u=Zs(e)||0;function d(e,n){for(let l=e;l<n;l++){const e=a.current[l]||(a.current[l]=new cc(null,s.flush)),n=o?o(l,e):t[l];n&&(c[l]=nc(n))}}(0,xi.useMemo)((()=>{Mi(a.current.slice(e,u),(e=>{Ia(e,l),e.stop(!0)})),a.current.length=e,d(u,e)}),[e]),(0,xi.useMemo)((()=>{d(0,Math.min(u,e))}),n);const p=a.current.map(((e,t)=>pc(e,c[t]))),m=(0,xi.useContext)(bc),g=Zs(m),h=m!==g&&wa(m);js((()=>{r.current++,s.ctrls=a.current;const{queue:e}=s;e.length&&(s.queue=[],Mi(e,(e=>e()))),Mi(a.current,((e,t)=>{null==l||l.add(e),h&&e.start({default:m});const n=c[t];n&&(xa(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),qs((()=>()=>{Mi(s.ctrls,(e=>e.stop(!0)))}));const f=p.map((e=>ga({},e)));return l?[f,l]:f}let Sc;!function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"}(Sc||(Sc={}));class wc extends $a{constructor(e,t){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=e,this.calc=bs(...t);const n=this._get(),o=aa(n);Js(this,o.create(n))}advance(e){const t=this._get();Li(t,this.get())||(Xs(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Ic(this._active)&&xc(this)}_get(){const e=Pi.arr(this.source)?this.source.map(Cs):Ai(Cs(this.source));return this.calc(...e)}_start(){this.idle&&!Ic(this._active)&&(this.idle=!1,Mi(ea(this),(e=>{e.done=!1})),Wi.skipAnimation?(di.batchedUpdates((()=>this.advance())),xc(this)):Yi.start(this))}_attach(){let e=1;Mi(Ai(this.source),(t=>{Es(t)&&xs(t,this),Ua(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){Mi(Ai(this.source),(e=>{Es(e)&&Ts(e,this)})),this._active.clear(),xc(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=Ai(this.source).reduce(((e,t)=>Math.max(e,(Ua(t)?t.priority:0)+1)),0))}}function Bc(e){return!1!==e.idle}function Ic(e){return!e.size||Array.from(e).every(Bc)}function xc(e){e.idle||(e.idle=!0,Mi(ea(e),(e=>{e.done=!0})),ws(e,{type:"idle",parent:e}))}Wi.assign({createStringInterpolator:Vs,to:(e,t)=>new wc(e,t)}),Yi.advance;const Tc=window.ReactDOM;function Nc(e,t){if(null==e)return{};var n,o,l={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(l[n]=e[n]);return l}const Pc=["style","children","scrollTop","scrollLeft"],Lc=/^--/;function Mc(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Lc.test(e)||Ac.hasOwnProperty(e)&&Ac[e]?(""+t).trim():t+"px"}const Rc={};let Ac={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const Dc=["Webkit","Ms","Moz","O"];Ac=Object.keys(Ac).reduce(((e,t)=>(Dc.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Ac);const Oc=["x","y","z"],zc=/^(matrix|translate|scale|rotate|skew)/,Fc=/^(translate)/,Vc=/^(rotate|skew)/,Hc=(e,t)=>Pi.num(e)&&0!==e?e+t:e,Gc=(e,t)=>Pi.arr(e)?e.every((e=>Gc(e,t))):Pi.num(e)?e===t:parseFloat(e)===t;class Uc extends ra{constructor(e){let{x:t,y:n,z:o}=e,l=Nc(e,Oc);const r=[],i=[];(t||n||o)&&(r.push([t||0,n||0,o||0]),i.push((e=>[`translate3d(${e.map((e=>Hc(e,"px"))).join(",")})`,Gc(e,0)]))),Ri(l,((e,t)=>{if("transform"===t)r.push([e||""]),i.push((e=>[e,""===e]));else if(zc.test(t)){if(delete l[t],Pi.und(e))return;const n=Fc.test(t)?"px":Vc.test(t)?"deg":"";r.push(Ai(e)),i.push("rotate3d"===t?([e,t,o,l])=>[`rotate3d(${e},${t},${o},${Hc(l,n)})`,Gc(l,0)]:e=>[`${t}(${e.map((e=>Hc(e,n))).join(",")})`,Gc(e,t.startsWith("scale")?1:0)])}})),r.length&&(l.transform=new Wc(r,i)),super(l)}}class Wc extends Bs{constructor(e,t){super(),this._value=null,this.inputs=e,this.transforms=t}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Mi(this.inputs,((n,o)=>{const l=Cs(n[0]),[r,i]=this.transforms[o](Pi.arr(l)?l:n.map(Cs));e+=" "+r,t=t&&i})),t?"none":e}observerAdded(e){1==e&&Mi(this.inputs,(e=>Mi(e,(e=>Es(e)&&xs(e,this)))))}observerRemoved(e){0==e&&Mi(this.inputs,(e=>Mi(e,(e=>Es(e)&&Ts(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),ws(this,e)}}const $c=["scrollTop","scrollLeft"];Wi.assign({batchedUpdates:Tc.unstable_batchedUpdates,createStringInterpolator:Vs,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});const jc=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new ra(e)),getComponentProps:o=(e=>e)}={})=>{const l={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:o},r=e=>{const t=ma(e)||"Anonymous";return(e=Pi.str(e)?r[e]||(r[e]=ua(e,l)):e[pa]||(e[pa]=ua(e,l))).displayName=`Animated(${t})`,e};return Ri(e,((t,n)=>{Pi.arr(e)&&(n=ma(t)),r[n]=r(t)})),{animated:r}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,o=t,{style:l,children:r,scrollTop:i,scrollLeft:s}=o,a=Nc(o,Pc),c=Object.values(a),u=Object.keys(a).map((t=>n||e.hasAttribute(t)?t:Rc[t]||(Rc[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==r&&(e.textContent=r);for(let t in l)if(l.hasOwnProperty(t)){const n=Mc(t,l[t]);Lc.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==i&&(e.scrollTop=i),void 0!==s&&(e.scrollLeft=s)},createAnimatedStyle:e=>new Uc(e),getComponentProps:e=>Nc(e,$c)}).animated,Kc=e=>e+1,qc=e=>({top:e.offsetTop,left:e.offsetLeft}),Yc=function(e){let{isSelected:t,adjustScrolling:n,enableAnimation:o,triggerAnimationOnChange:l}=e;const r=(0,s.useRef)(),i=(0,d.useReducedMotion)()||!o,[a,c]=(0,s.useReducer)(Kc,0),[u,p]=(0,s.useReducer)(Kc,0),[m,g]=(0,s.useState)({x:0,y:0}),h=(0,s.useMemo)((()=>r.current?qc(r.current):null),[l]),f=(0,s.useMemo)((()=>{if(!n||!r.current)return()=>{};const e=(0,Wr.getScrollContainer)(r.current);if(!e)return()=>{};const t=r.current.getBoundingClientRect();return()=>{const n=r.current.getBoundingClientRect().top-t.top;n&&(e.scrollTop+=n)}}),[l,n]);return(0,s.useLayoutEffect)((()=>{a&&p()}),[a]),(0,s.useLayoutEffect)((()=>{if(!h)return;if(i)return void f();r.current.style.transform=void 0;const e=qc(r.current);c(),g({x:Math.round(h.left-e.left),y:Math.round(h.top-e.top)})}),[l]),function(e,t){const n=Pi.fun(e),[[o],l]=Cc(1,n?e:[e],n?t||[]:t)}({from:{x:m.x,y:m.y},to:{x:0,y:0},reset:a!==u,config:{mass:5,tension:2e3,friction:200},immediate:i,onChange:function(e){let{value:n}=e;if(!r.current)return;let{x:o,y:l}=n;o=Math.round(o),l=Math.round(l);const i=0===o&&0===l;r.current.style.transformOrigin="center center",r.current.style.transform=i?void 0:`translate3d(${o}px,${l}px,0)`,r.current.style.zIndex=t?"1":"",f()}}),r},Zc=".block-editor-block-list__block",Qc=".block-list-appender",Xc=".block-editor-button-block-appender";function Jc(e,t){return t.closest([Zc,Qc,Xc].join(","))===e}function eu(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(Zc);return t?t.id.slice("block-".length):void 0}function tu(e){const t=(0,s.useRef)(),n=function(e){return(0,p.useSelect)((t=>{const{getSelectedBlocksInitialCaretPosition:n,__unstableGetEditorMode:o,isBlockSelected:l}=t(co);if(l(e)&&"edit"===o())return n()}),[e])}(e),{isBlockSelected:o,isMultiSelecting:l}=(0,p.useSelect)(co);return(0,s.useEffect)((()=>{if(!o(e)||l())return;if(null==n)return;if(!t.current)return;const{ownerDocument:r}=t.current;if(Jc(t.current,r.activeElement))return;const i=Wr.focus.tabbable.find(t.current).filter((e=>(0,Wr.isTextField)(e))),s=-1===n,a=i[s?i.length-1:0]||t.current;if(Jc(t.current,a)){if(!t.current.getAttribute("contenteditable")){const e=Wr.focus.tabbable.findNext(t.current);if(e&&Jc(t.current,e)&&(0,Wr.isFormElement)(e))return void e.focus()}(0,Wr.placeCaretAtHorizontalEdge)(a,s)}else t.current.focus()}),[n,e]),t}function nu(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function ou(){const e=(0,p.useSelect)((e=>{const{getSettings:t}=e(co);return t().outlineMode}),[]);return(0,d.useRefEffect)((t=>{if(e)return t.addEventListener("mouseout",nu),t.addEventListener("mouseover",nu),()=>{t.removeEventListener("mouseout",nu),t.removeEventListener("mouseover",nu),t.classList.remove("is-hovered")}}),[e])}function lu(e){return(0,p.useSelect)((t=>{const{isBlockBeingDragged:n,isBlockHighlighted:o,isBlockSelected:r,isBlockMultiSelected:i,getBlockName:s,getSettings:a,hasSelectedInnerBlock:u,isTyping:d,__unstableIsFullySelected:p,__unstableSelectionHasUnmergeableBlock:m}=t(co),{outlineMode:g}=a(),h=n(e),f=r(e),v=s(e),b=u(e,!0),_=i(e);return c()({"is-selected":f,"is-highlighted":o(e),"is-multi-selected":_,"is-partially-selected":_&&!p()&&!m(),"is-reusable":(0,l.isReusableBlock)((0,l.getBlockType)(v)),"is-dragging":h,"has-child-selected":b,"remove-outline":f&&g&&d()})}),[e])}function ru(e){return(0,p.useSelect)((t=>{const n=t(co).getBlockName(e),o=(0,l.getBlockType)(n);if((null==o?void 0:o.apiVersion)>1)return(0,l.getBlockDefaultClassName)(n)}),[e])}function iu(e){return(0,p.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o}=t(co),r=o(e);if(null==r||!r.className)return;const i=(0,l.getBlockType)(n(e));return(null==i?void 0:i.apiVersion)>1?r.className:void 0}),[e])}function su(e){return(0,p.useSelect)((t=>{const{hasBlockMovingClientId:n,canInsertBlockType:o,getBlockName:l,getBlockRootClientId:r,isBlockSelected:i}=t(co);if(!i(e))return;const s=n();return s?c()("is-block-moving-mode",{"can-insert-moving-block":o(l(s),r(e))}):void 0}),[e])}function au(e){const{isBlockSelected:t}=(0,p.useSelect)(co),{selectBlock:n,selectionChange:o}=(0,p.useDispatch)(co);return(0,d.useRefEffect)((l=>{function r(r){l.parentElement.closest('[contenteditable="true"]')||(t(e)?r.target.isContentEditable||o(e):Jc(l,r.target)&&n(e))}return l.addEventListener("focusin",r),()=>{l.removeEventListener("focusin",r)}}),[t,n])}const cu=window.wp.keycodes;function uu(e){const t=(0,p.useSelect)((t=>t(co).isBlockSelected(e)),[e]),{getBlockRootClientId:n,getBlockIndex:o}=(0,p.useSelect)(co),{insertDefaultBlock:l,removeBlock:r}=(0,p.useDispatch)(co);return(0,d.useRefEffect)((i=>{if(t)return i.addEventListener("keydown",s),i.addEventListener("dragstart",a),()=>{i.removeEventListener("keydown",s),i.removeEventListener("dragstart",a)};function s(t){const{keyCode:s,target:a}=t;s!==cu.ENTER&&s!==cu.BACKSPACE&&s!==cu.DELETE||a!==i||(0,Wr.isTextField)(a)||(t.preventDefault(),s===cu.ENTER?l({},n(e),o(e)+1):r(e))}function a(e){e.preventDefault()}}),[e,t,n,o,l,r])}function du(e){const{isNavigationMode:t,isBlockSelected:n}=(0,p.useSelect)(co),{setNavigationMode:o,selectBlock:l}=(0,p.useDispatch)(co);return(0,d.useRefEffect)((r=>{function i(r){t()&&!r.defaultPrevented&&(r.preventDefault(),n(e)?o(!1):l(e))}return r.addEventListener("mousedown",i),()=>{r.addEventListener("mousedown",i)}}),[e,t,n,o])}function pu(){const e=(0,s.useContext)(Wh);return(0,d.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function mu(e){return(0,p.useSelect)((t=>{const{__unstableHasActiveBlockOverlayActive:n}=t(co);return n(e)}),[e])}function gu(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{__unstableIsHtml:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n,className:o,wrapperProps:r={},isAligned:i}=(0,s.useContext)(hu),{index:a,mode:u,name:m,blockApiVersion:g,blockTitle:f,isPartOfSelection:v,adjustScrolling:b,enableAnimation:_}=(0,p.useSelect)((e=>{const{getBlockAttributes:t,getBlockIndex:o,getBlockMode:r,getBlockName:i,isTyping:s,getGlobalBlockCount:a,isBlockSelected:c,isBlockMultiSelected:u,isAncestorMultiSelected:d,isFirstMultiSelectedBlock:p}=e(co),{getActiveBlockVariation:m}=e(l.store),g=c(n),h=u(n)||d(n),f=i(n),v=(0,l.getBlockType)(f),b=m(f,t(n));return{index:o(n),mode:r(n),name:f,blockApiVersion:(null==v?void 0:v.apiVersion)||1,blockTitle:(null==b?void 0:b.title)||(null==v?void 0:v.title),isPartOfSelection:g||h,adjustScrolling:g||p(n),enableAnimation:!s()&&a()<=200}}),[n]),k=mu(n),y=(0,h.sprintf)((0,h.__)("Block: %s"),f),E="html"!==u||t?"":"-visual",C=(0,d.useMergeRefs)([e.ref,tu(n),Lo(n),au(n),uu(n),du(n),ou(),pu(),Yc({isSelected:v,adjustScrolling:b,enableAnimation:_,triggerAnimationOnChange:a}),(0,d.useDisabled)({isDisabled:!k})]),S=go();return g<2&&n===S.clientId&&"undefined"!=typeof process&&process.env,{tabIndex:0,...r,...e,ref:C,id:`block-${n}${E}`,role:"document","aria-label":y,"data-block":n,"data-type":m,"data-title":f,className:c()(c()("block-editor-block-list__block",{"wp-block":!i,"has-block-overlay":k}),o,e.className,r.className,lu(n),ru(n),iu(n),su(n)),style:{...r.style,...e.style}}}gu.save=l.__unstableGetBlockProps;const hu=(0,s.createContext)();function fu(e){let{children:t,isHtml:n,...o}=e;return(0,s.createElement)("div",gu(o,{__unstableIsHtml:n}),t)}const vu=(0,p.withSelect)(((e,t)=>{let{clientId:n,rootClientId:o}=t;const{isBlockSelected:l,getBlockMode:r,isSelectionEnabled:i,getTemplateLock:s,__unstableGetBlockWithoutInnerBlocks:a,canRemoveBlock:c,canMoveBlock:u}=e(co),d=a(n),p=l(n),m=s(o),g=c(n,o),h=u(n,o),{name:f,attributes:v,isValid:b}=d||{};return{mode:r(n),isSelectionEnabled:i(),isLocked:!!m,canRemove:g,canMove:h,block:d,name:f,attributes:v,isValid:b,isSelected:p}})),bu=(0,p.withDispatch)(((e,t,n)=>{let{select:o}=n;const{updateBlockAttributes:r,insertBlocks:i,mergeBlocks:s,replaceBlocks:a,toggleSelection:c,__unstableMarkLastChangeAsPersistent:u}=e(co);return{setAttributes(e){const{getMultiSelectedBlockClientIds:n}=o(co),l=n(),{clientId:i}=t,s=l.length?l:[i];r(s,e)},onInsertBlocks(e,n){const{rootClientId:o}=t;i(e,n,o)},onInsertBlocksAfter(e){const{clientId:n,rootClientId:l}=t,{getBlockIndex:r}=o(co),s=r(n);i(e,s+1,l)},onMerge(e){const{clientId:n,rootClientId:r}=t,{getPreviousBlockClientId:i,getNextBlockClientId:c,getBlock:u}=o(co);if(e){const e=c(n);e&&s(n,e)}else{const e=i(n);if(e)s(e,n);else if(r){const e=(0,l.switchToBlockType)(u(r),"*");e&&e.length&&a(r,e,0)}}},onReplace(e,n,o){e.length&&!(0,l.isUnmodifiedDefaultBlock)(e[e.length-1])&&u(),a([t.clientId],e,n,o)},toggleSelection(e){c(e)}}})),_u=(0,d.compose)(d.pure,vu,bu,(0,d.ifCondition)((e=>{let{block:t}=e;return!!t})),(0,m.withFilters)("editor.BlockListBlock"))((function(e){var t;let{block:{__unstableBlockSource:n},mode:o,isLocked:r,canRemove:i,clientId:a,isSelected:u,isSelectionEnabled:d,className:m,name:g,isValid:h,attributes:f,wrapperProps:v,setAttributes:b,onReplace:_,onInsertBlocksAfter:k,onMerge:y,toggleSelection:E}=e;const{themeSupportsLayout:C,hasContentLockedParent:S,isContentBlock:w,isContentLocking:B,isTemporarilyEditingAsBlocks:I}=(0,p.useSelect)((e=>{const{getSettings:t,__unstableGetContentLockingParent:n,getTemplateLock:o,__unstableGetTemporarilyEditingAsBlocks:r}=e(co),i=!!n(a);return{themeSupportsLayout:t().supportsLayout,isContentBlock:e(l.store).__experimentalHasContentRoleAttribute(g),hasContentLockedParent:i,isContentLocking:"contentOnly"===o(a)&&!i,isTemporarilyEditingAsBlocks:r()===a}}),[g,a]),{removeBlock:x}=(0,p.useDispatch)(co),T=(0,s.useCallback)((()=>x(a)),[a]);let N=(0,s.createElement)(Zr,{name:g,isSelected:u,attributes:f,setAttributes:b,insertBlocksAfter:r?void 0:k,onReplace:i?_:void 0,onRemove:i?T:void 0,mergeBlocks:i?y:void 0,clientId:a,isSelectionEnabled:d,toggleSelection:E});const P=(0,l.getBlockType)(g);S&&!w&&(v={...v,tabIndex:-1}),null!=P&&P.getEditWrapperProps&&(v=function(e,t){const n={...e,...t};return null!=e&&e.className&&null!=t&&t.className&&(n.className=c()(e.className,t.className)),null!=e&&e.style&&null!=t&&t.style&&(n.style={...e.style,...t.style}),n}(v,P.getEditWrapperProps(f)));const L=v&&!!v["data-align"]&&!C;let M;if(L&&(N=(0,s.createElement)("div",{className:"wp-block","data-align":v["data-align"]},N)),h)M="html"===o?(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{style:{display:"none"}},N),(0,s.createElement)(fu,{isHtml:!0},(0,s.createElement)(ci,{clientId:a}))):(null==P?void 0:P.apiVersion)>1?N:(0,s.createElement)(fu,v,N);else{const e=n?(0,l.serializeRawBlock)(n):(0,l.getSaveContent)(P,f);M=(0,s.createElement)(fu,{className:"has-warning"},(0,s.createElement)(oi,{clientId:a}),(0,s.createElement)(s.RawHTML,null,(0,Wr.safeHTML)(e)))}const{"data-align":R,...A}=null!==(t=v)&&void 0!==t?t:{},D={clientId:a,className:c()({"is-content-locked":B,"is-content-locked-temporarily-editing-as-blocks":I,"is-content-block":S&&w},R&&C&&`align${R}`,m),wrapperProps:A,isAligned:L},O=(0,s.useMemo)((()=>D),Object.values(D));return(0,s.createElement)(hu.Provider,{value:O},(0,s.createElement)(si,{fallback:(0,s.createElement)(fu,{className:"has-warning"},(0,s.createElement)(ri,null))},M))})),ku=window.wp.htmlEntities,yu=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"})),Eu=[(0,s.createInterpolateElement)((0,h.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,s.createElement)("kbd",null)}),(0,s.createInterpolateElement)((0,h.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,s.createElement)("kbd",null)}),(0,s.createInterpolateElement)((0,h.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,s.createElement)("kbd",null)}),(0,h.__)("Drag files into the editor to automatically insert media blocks."),(0,h.__)("Change a block's type by pressing the block icon on the toolbar.")],Cu=function(){const[e]=(0,s.useState)(Math.floor(Math.random()*Eu.length));return(0,s.createElement)(m.Tip,null,Eu[e])},Su=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})),wu=(0,s.memo)((function(e){var t;let{icon:n,showColors:o=!1,className:l}=e;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:Su});const r=(0,s.createElement)(m.Icon,{icon:n&&n.src?n.src:n}),i=o?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return(0,s.createElement)("span",{style:i,className:c()("block-editor-block-icon",l,{"has-colors":o})},r)})),Bu=function(e){let{title:t,icon:n,description:o,blockType:l}=e;return l&&(V()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:t,icon:n,description:o}=l)),(0,s.createElement)("div",{className:"block-editor-block-card"},(0,s.createElement)(wu,{icon:n,showColors:!0}),(0,s.createElement)("div",{className:"block-editor-block-card__content"},(0,s.createElement)("h2",{className:"block-editor-block-card__title"},t),(0,s.createElement)("span",{className:"block-editor-block-card__description"},o)))},Iu=(0,d.createHigherOrderComponent)((e=>(0,p.withRegistry)((t=>{let{useSubRegistry:n=!0,registry:o,...l}=t;if(!n)return(0,s.createElement)(e,i({registry:o},l));const[r,a]=(0,s.useState)(null);return(0,s.useEffect)((()=>{const e=(0,p.createRegistry)({},o);e.registerStore(so,ao),a(e)}),[o]),r?(0,s.createElement)(p.RegistryProvider,{value:r},(0,s.createElement)(e,i({registry:r},l))):null}))),"withRegistryProvider"),xu=()=>{};function Tu(e){let{clientId:t=null,value:n,selection:o,onChange:r=xu,onInput:i=xu}=e;const a=(0,p.useRegistry)(),{resetBlocks:c,resetSelection:u,replaceInnerBlocks:d,setHasControlledInnerBlocks:m,__unstableMarkNextChangeAsNotPersistent:g}=a.dispatch(co),{getBlockName:h,getBlocks:f}=a.select(co),v=(0,p.useSelect)((e=>!t||e(co).areInnerBlocksControlled(t)),[t]),b=(0,s.useRef)({incoming:null,outgoing:[]}),_=(0,s.useRef)(!1),k=()=>{n&&(g(),t?a.batch((()=>{m(t,!0);const e=n.map((e=>(0,l.cloneBlock)(e)));_.current&&(b.current.incoming=e),g(),d(t,e)})):(_.current&&(b.current.incoming=n),c(n)))},y=(0,s.useRef)(i),E=(0,s.useRef)(r);(0,s.useEffect)((()=>{y.current=i,E.current=r}),[i,r]),(0,s.useEffect)((()=>{b.current.outgoing.includes(n)?b.current.outgoing[b.current.outgoing.length-1]===n&&(b.current.outgoing=[]):f(t)!==n&&(b.current.outgoing=[],k(),o&&u(o.selectionStart,o.selectionEnd,o.initialPosition))}),[n,t]),(0,s.useEffect)((()=>{v||(b.current.outgoing=[],k())}),[v]),(0,s.useEffect)((()=>{const{getSelectionStart:e,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:o,isLastBlockChangePersistent:l,__unstableIsLastBlockChangeIgnored:r,areInnerBlocksControlled:i}=a.select(co);let s=f(t),c=l(),u=!1;_.current=!0;const d=a.subscribe((()=>{if(null!==t&&null===h(t))return;if(t&&!i(t))return;const a=l(),d=f(t),p=d!==s;if(s=d,p&&(b.current.incoming||r()))return b.current.incoming=null,void(c=a);(p||u&&!p&&a&&!c)&&(c=a,b.current.outgoing.push(s),(c?E.current:y.current)(s,{selection:{selectionStart:e(),selectionEnd:n(),initialPosition:o()}})),u=p}));return()=>d()}),[a,t])}const Nu=Iu((function(e){const{children:t,settings:n}=e,{updateSettings:o}=(0,p.useDispatch)(co);return(0,s.useEffect)((()=>{o(n)}),[n]),Tu(e),(0,s.createElement)(Po,null,t)}));function Pu(e){let{onClick:t}=e;return(0,s.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},(0,s.createElement)(m.Disabled,null,(0,s.createElement)(Kh,null)))}function Lu(){const{hasSelectedBlock:e,hasMultiSelection:t}=(0,p.useSelect)(co),{clearSelectedBlock:n}=(0,p.useDispatch)(co);return(0,d.useRefEffect)((o=>{function l(l){(e()||t())&&l.target===o&&n()}return o.addEventListener("mousedown",l),()=>{o.removeEventListener("mousedown",l)}}),[e,t,n])}function Mu(e){return(0,s.createElement)("div",i({ref:Lu()},e))}function Ru(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:l,getSelectedBlocksInitialCaretPosition:r,__unstableIsFullySelected:i}=e(co);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:l(),initialPosition:r(),isFullSelection:i()}}function Au(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:o,selectedBlockClientId:l,isFullSelection:r}=(0,p.useSelect)(Ru,[]);return(0,d.useRefEffect)((l=>{const{ownerDocument:i}=l,{defaultView:s}=i;if(null==e)return;if(!o||t)return;const{length:a}=n;a<2||r&&(l.contentEditable=!0,l.focus(),s.getSelection().removeAllRanges())}),[o,t,n,l,e,r])}function Du(e,t,n,o){let l,r=Wr.focus.focusable.find(n);return t&&r.reverse(),r=r.slice(r.indexOf(e)+1),o&&(l=e.getBoundingClientRect()),r.find((function(e){if(1!==e.children.length||!function(e,t){return e.closest(Zc)===t.closest(Zc)}(e,e.firstElementChild)||"true"!==e.firstElementChild.getAttribute("contenteditable")){if(!Wr.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(o){const t=e.getBoundingClientRect();if(t.left>=l.right||t.right<=l.left)return!1}return!0}}))}function Ou(){const{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:n,hasMultiSelection:o,__unstableIsFullySelected:l}=(0,p.useSelect)(co),{selectBlock:r}=(0,p.useDispatch)(co);return(0,d.useRefEffect)((i=>{let s;function a(){s=null}function c(a){const{keyCode:c,target:u}=a,d=c===cu.UP,p=c===cu.DOWN,m=c===cu.LEFT,g=c===cu.RIGHT,h=d||m,f=m||g,v=d||p,b=f||v,_=a.shiftKey,k=_||a.ctrlKey||a.altKey||a.metaKey,y=v?Wr.isVerticalEdge:Wr.isHorizontalEdge,{ownerDocument:E}=i,{defaultView:C}=E;if(o()){if(!l())return;if(a.defaultPrevented)return;if(!b)return;if(_)return;return a.preventDefault(),void(h?r(e()):r(t(),-1))}if(v?s||(s=(0,Wr.computeCaretRect)(C)):s=null,a.defaultPrevented)return;if(!b)return;if(!function(e,t,n){if((t===cu.UP||t===cu.DOWN)&&!n)return!0;const{tagName:o}=e;return"INPUT"===o?["button","checkbox","color","file","image","radio","reset","submit"].includes(e.getAttribute("type")):"TEXTAREA"!==o}(u,c,k))return;const S=(0,Wr.isRTL)(u)?!h:h,{keepCaretInsideBlock:w}=n();if(_)(function(e,t){const n=Du(e,t,i);return n&&eu(n)})(u,h)&&y(u,h)&&(i.contentEditable=!0,i.focus());else if(v&&(0,Wr.isVerticalEdge)(u,h)&&!w){const e=Du(u,h,i,!0);e&&((0,Wr.placeCaretAtVerticalEdge)(e,h,s),a.preventDefault())}else if(f&&C.getSelection().isCollapsed&&(0,Wr.isHorizontalEdge)(u,S)&&!w){const e=Du(u,S,i);(0,Wr.placeCaretAtHorizontalEdge)(e,h),a.preventDefault()}}return i.addEventListener("mousedown",a),i.addEventListener("keydown",c),()=>{i.removeEventListener("mousedown",a),i.removeEventListener("keydown",c)}}),[])}const zu=window.wp.keyboardShortcuts;function Fu(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,p.useSelect)(co),{multiSelect:o,selectBlock:l}=(0,p.useDispatch)(co),r=(0,zu.__unstableUseShortcutEventMatch)();return(0,d.useRefEffect)((i=>{function s(s){if(!r("core/block-editor/select-all",s))return;const a=t();if(a.length<2&&!(0,Wr.isEntirelySelected)(s.target))return;s.preventDefault();const[c]=a,u=n(c),d=e(u);a.length!==d.length?o(d[0],d[d.length-1]):u&&(i.ownerDocument.defaultView.getSelection().removeAllRanges(),l(u))}return i.addEventListener("keydown",s),()=>{i.removeEventListener("keydown",s)}}),[])}function Vu(e,t){e.contentEditable=t,t&&e.focus()}function Hu(){const{startMultiSelect:e,stopMultiSelect:t}=(0,p.useDispatch)(co),{isSelectionEnabled:n,hasMultiSelection:o,isDraggingBlocks:l}=(0,p.useSelect)(co);return(0,d.useRefEffect)((r=>{const{ownerDocument:i}=r,{defaultView:s}=i;let a,c;function u(){t(),s.removeEventListener("mouseup",u),c=s.requestAnimationFrame((()=>{if(o())return;Vu(r,!1);const e=s.getSelection();if(e.rangeCount){const{commonAncestorContainer:t}=e.getRangeAt(0);a.contains(t)&&a.focus()}}))}function d(t){let{buttons:o,target:c}=t;l()||1===o&&c.getAttribute("contenteditable")&&n()&&(a=i.activeElement,e(),s.addEventListener("mouseup",u),Vu(r,!0))}return r.addEventListener("mouseout",d),()=>{r.removeEventListener("mouseout",d),s.removeEventListener("mouseup",u),s.cancelAnimationFrame(c)}}),[e,t,n,o])}function Gu(e,t){e.contentEditable=t,t&&e.focus()}function Uu(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,p.useDispatch)(co),{getBlockParents:o,getBlockSelectionStart:l}=(0,p.useSelect)(co);return(0,d.useRefEffect)((n=>{const{ownerDocument:r}=n,{defaultView:i}=r;function s(r){const s=i.getSelection();if(!s.rangeCount)return;const a=r.shiftKey&&"mouseup"===r.type;if(s.isCollapsed&&!a)return void Gu(n,!1);let c=eu(function(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE||0===n?t:t.childNodes[n-1]}(s)),u=eu(function(e){const{focusNode:t,focusOffset:n}=e;return t.nodeType===t.TEXT_NODE||n===t.childNodes.length?t:t.childNodes[n]}(s));if(a){const e=l(),t=eu(r.target),n=t!==u;(c===u&&s.isCollapsed||!u||n)&&(u=t),c!==e&&(c=e)}if(void 0!==c||void 0!==u)if(c===u)t(c);else{const t=[...o(c),c],n=[...o(u),u],l=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,n);e(t[l],n[l])}else Gu(n,!1)}function a(){r.addEventListener("selectionchange",s),i.addEventListener("mouseup",s)}function c(){r.removeEventListener("selectionchange",s),i.removeEventListener("mouseup",s)}function u(){c(),a()}return a(),n.addEventListener("focusin",u),()=>{c(),n.removeEventListener("focusin",u)}}),[e,t,n,o])}function Wu(){const{selectBlock:e}=(0,p.useDispatch)(co),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:o}=(0,p.useSelect)(co);return(0,d.useRefEffect)((l=>{function r(r){if(!t()||0!==r.button)return;const i=n(),s=eu(r.target);r.shiftKey?i!==s&&(l.contentEditable=!0,l.focus()):o()&&e(s)}return l.addEventListener("mousedown",r),()=>{l.removeEventListener("mousedown",r)}}),[e,t,n,o])}function $u(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,__unstableIsSelectionMergeable:n,hasMultiSelection:o}=(0,p.useSelect)(co),{replaceBlocks:r,__unstableSplitSelection:i,removeBlocks:s,__unstableDeleteSelection:a,__unstableExpandSelection:c}=(0,p.useDispatch)(co);return(0,d.useRefEffect)((u=>{function d(e){var t;o()&&null!==(t=e.inputType)&&void 0!==t&&t.startsWith("format")&&e.preventDefault()}function p(d){d.defaultPrevented||o()&&(d.keyCode===cu.ENTER?(u.contentEditable=!1,d.preventDefault(),e()?r(t(),(0,l.createBlock)((0,l.getDefaultBlockName)())):i()):d.keyCode===cu.BACKSPACE||d.keyCode===cu.DELETE?(u.contentEditable=!1,d.preventDefault(),e()?s(t()):n()?a(d.keyCode===cu.DELETE):c()):1!==d.key.length||d.metaKey||d.ctrlKey||(u.contentEditable=!1,n()?a(d.keyCode===cu.DELETE):(d.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges())))}function m(e){o()&&(u.contentEditable=!1,n()?a():(e.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges()))}return u.addEventListener("beforeinput",d),u.addEventListener("keydown",p),u.addEventListener("compositionstart",m),()=>{u.removeEventListener("beforeinput",d),u.removeEventListener("keydown",p),u.removeEventListener("compositionstart",m)}}),[])}function ju(){const[e,t,n]=function(){const e=(0,s.useRef)(),t=(0,s.useRef)(),n=(0,s.useRef)(),o=(0,s.useRef)(),{hasMultiSelection:l,getSelectedBlockClientId:r,getBlockCount:i}=(0,p.useSelect)(co),{setNavigationMode:a}=(0,p.useDispatch)(co),c=(0,p.useSelect)((e=>e(co).isNavigationMode()),[])?void 0:"0",u=(0,s.useRef)();function m(t){if(u.current)u.current=null;else if(l())e.current.focus();else if(r())o.current.focus();else{a(!0);const n=t.target.compareDocumentPosition(e.current)&t.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";Wr.focus.tabbable[n](t.target).focus()}}const g=(0,s.createElement)("div",{ref:t,tabIndex:c,onFocus:m}),h=(0,s.createElement)("div",{ref:n,tabIndex:c,onFocus:m}),f=(0,d.useRefEffect)((s=>{function c(e){if(e.defaultPrevented)return;if(e.keyCode===cu.ESCAPE)return e.preventDefault(),void a(!0);if(e.keyCode!==cu.TAB)return;const o=e.shiftKey,i=o?"findPrevious":"findNext";if(!l()&&!r())return void(e.target===s&&a(!0));if(((0,Wr.isFormElement)(e.target)||e.target.getAttribute("data-block")===r())&&(0,Wr.isFormElement)(Wr.focus.tabbable[i](e.target)))return;const c=o?t:n;u.current=!0,c.current.focus({preventScroll:!0})}function d(e){o.current=e.target;const{ownerDocument:t}=s;e.relatedTarget||t.activeElement!==t.body||0!==i()||s.focus()}function p(o){var l;if(o.keyCode!==cu.TAB)return;if("region"===(null===(l=o.target)||void 0===l?void 0:l.getAttribute("role")))return;if(e.current===o.target)return;const r=o.shiftKey?"findPrevious":"findNext",i=Wr.focus.tabbable[r](o.target);i!==t.current&&i!==n.current||(o.preventDefault(),i.focus({preventScroll:!0}))}const{ownerDocument:m}=s,{defaultView:g}=m;return g.addEventListener("keydown",p),s.addEventListener("keydown",c),s.addEventListener("focusout",d),()=>{g.removeEventListener("keydown",p),s.removeEventListener("keydown",c),s.removeEventListener("focusout",d)}}),[]);return[g,(0,d.useMergeRefs)([e,f]),h]}(),o=(0,p.useSelect)((e=>e(co).hasMultiSelection()),[]);return[e,(0,d.useMergeRefs)([t,$u(),Hu(),Uu(),Wu(),Au(),Fu(),Ou(),(0,d.useRefEffect)((e=>{if(e.tabIndex=-1,e.contentEditable=o,o)return e.classList.add("has-multi-selection"),e.setAttribute("aria-label",(0,h.__)("Multiple selected blocks")),()=>{e.classList.remove("has-multi-selection"),e.removeAttribute("aria-label")}}),[o])]),n]}const Ku=(0,s.forwardRef)((function(e,t){let{children:n,...o}=e;const[l,r,a]=ju();return(0,s.createElement)(s.Fragment,null,l,(0,s.createElement)("div",i({},o,{ref:(0,d.useMergeRefs)([r,t]),className:c()(o.className,"block-editor-writing-flow")}),n),a)})),qu="editor-styles-wrapper";function Yu(e){return(0,s.useMemo)((()=>{const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)}),[e])}const Zu=(0,s.forwardRef)((function(e,t){let{contentRef:n,children:o,head:l,tabIndex:r=0,assets:a,isZoomedOut:u,...p}=e;const[,g]=(0,s.useReducer)((()=>({}))),[f,v]=(0,s.useState)(),[b,_]=(0,s.useState)([]),k=Yu(null==a?void 0:a.styles),y=Yu(null==a?void 0:a.scripts),E=Lu(),[C,S,w]=ju(),[B,{height:I}]=(0,d.useResizeObserver)(),x=(0,d.useRefEffect)((e=>{let t;function n(e){e.preventDefault()}function o(){const{contentDocument:o,ownerDocument:l}=e,{readyState:r,documentElement:i}=o;return t=o,("interactive"===r||"complete"===r)&&(function(e){const{defaultView:t}=e,{frameElement:n}=t;function o(e){const o=Object.getPrototypeOf(e).constructor.name,l=window[o],r={};for(const t in e)r[t]=e[t];if(e instanceof t.MouseEvent){const e=n.getBoundingClientRect();r.clientX+=e.left,r.clientY+=e.top}const i=new l(e.type,r);!n.dispatchEvent(i)&&e.preventDefault()}const l=["dragover"];for(const t of l)e.addEventListener(t,o)}(o),v(o),E(i),_(Array.from(l.body.classList).filter((e=>e.startsWith("admin-color-")||e.startsWith("post-type-")||"wp-embed-responsive"===e))),o.dir=l.dir,i.removeChild(o.head),i.removeChild(o.body),t.addEventListener("dragover",n,!1),t.addEventListener("drop",n,!1),!0)}return e.addEventListener("load",o),()=>{var l,r;e.removeEventListener("load",o),null===(l=t)||void 0===l||l.removeEventListener("dragover",n),null===(r=t)||void 0===r||r.removeEventListener("drop",n)}}),[]),T=(0,d.useRefEffect)((e=>{y.reduce(((t,n)=>t.then((()=>async function(e,t){let{id:n,src:o}=t;return new Promise(((t,l)=>{const r=e.ownerDocument.createElement("script");r.id=n,o?(r.src=o,r.onload=()=>t(),r.onerror=()=>l()):t(),e.appendChild(r)}))}(e,n)))),Promise.resolve()).finally((()=>{g()}))}),[]),N=(0,d.useMergeRefs)([n,E,S]),P=(0,d.useRefEffect)((e=>{Array.from(document.styleSheets).forEach((t=>{try{t.cssRules}catch(e){return}const{ownerNode:n,cssRules:o}=t;if(o&&"LINK"===n.tagName&&"wp-reset-editor-styles-css"!==n.id&&function e(t){return Array.from(t).find((t=>{let{selectorText:n,conditionText:o,cssRules:l}=t;return o?e(l):n&&(n.includes(`.${qu}`)||n.includes(".wp-block"))}))}(o)&&!e.ownerDocument.getElementById(n.id)){e.appendChild(n.cloneNode(!0));const t=n.id.replace("-css","-inline-css"),o=document.getElementById(t);o&&e.appendChild(o.cloneNode(!0))}}))}),[]);return l=(0,s.createElement)(s.Fragment,null,(0,s.createElement)("style",null,"body{margin:0}"),k.map((e=>{let{tagName:t,href:n,id:o,rel:l,media:r,textContent:i}=e;const a=t.toLowerCase();return"style"===a?(0,s.createElement)(a,{id:o,key:o},i):(0,s.createElement)(a,{href:n,id:o,rel:l,media:r,key:o})})),l),(0,s.createElement)(s.Fragment,null,r>=0&&C,(0,s.createElement)("iframe",i({},p,{ref:(0,d.useMergeRefs)([t,x]),tabIndex:r,srcDoc:"<!doctype html>",title:(0,h.__)("Editor canvas")}),f&&(0,s.createPortal)((0,s.createElement)(s.Fragment,null,(0,s.createElement)("head",{ref:T},l,(0,s.createElement)("style",null,`html { transition: background 5s; ${u?"background: #2f2f2f; transition: background 0s;":""} }`)),(0,s.createElement)("body",{ref:N,className:c()("block-editor-iframe__body",qu,...b,{"is-zoomed-out":u}),style:u?{marginBottom:`-${.55*I-100}px`}:{}},B,(0,s.createElement)("div",{style:{display:"none"},ref:P}),(0,s.createElement)(m.__experimentalStyleProvider,{document:f},o))),f.documentElement)),r>=0&&w)}));var Qu={grad:.9,turn:360,rad:360/(2*Math.PI)},Xu=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Ju=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},ed=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},td=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},nd=function(e){return{r:ed(e.r,0,255),g:ed(e.g,0,255),b:ed(e.b,0,255),a:ed(e.a)}},od=function(e){return{r:Ju(e.r),g:Ju(e.g),b:Ju(e.b),a:Ju(e.a,3)}},ld=/^#([0-9a-f]{3,8})$/i,rd=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},id=function(e){var t=e.r,n=e.g,o=e.b,l=e.a,r=Math.max(t,n,o),i=r-Math.min(t,n,o),s=i?r===t?(n-o)/i:r===n?2+(o-t)/i:4+(t-n)/i:0;return{h:60*(s<0?s+6:s),s:r?i/r*100:0,v:r/255*100,a:l}},sd=function(e){var t=e.h,n=e.s,o=e.v,l=e.a;t=t/360*6,n/=100,o/=100;var r=Math.floor(t),i=o*(1-n),s=o*(1-(t-r)*n),a=o*(1-(1-t+r)*n),c=r%6;return{r:255*[o,s,i,i,a,o][c],g:255*[a,o,o,s,i,i][c],b:255*[i,i,a,o,o,s][c],a:l}},ad=function(e){return{h:td(e.h),s:ed(e.s,0,100),l:ed(e.l,0,100),a:ed(e.a)}},cd=function(e){return{h:Ju(e.h),s:Ju(e.s),l:Ju(e.l),a:Ju(e.a,3)}},ud=function(e){return sd((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},dd=function(e){return{h:(t=id(e)).h,s:(l=(200-(n=t.s))*(o=t.v)/100)>0&&l<200?n*o/100/(l<=100?l:200-l)*100:0,l:l/2,a:t.a};var t,n,o,l},pd=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,md=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,gd=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,hd=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,fd={string:[[function(e){var t=ld.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?Ju(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?Ju(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=gd.exec(e)||hd.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:nd({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=pd.exec(e)||md.exec(e);if(!t)return null;var n,o,l=ad({h:(n=t[1],o=t[2],void 0===o&&(o="deg"),Number(n)*(Qu[o]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return ud(l)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,l=e.a,r=void 0===l?1:l;return Xu(t)&&Xu(n)&&Xu(o)?nd({r:Number(t),g:Number(n),b:Number(o),a:Number(r)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,l=e.a,r=void 0===l?1:l;if(!Xu(t)||!Xu(n)||!Xu(o))return null;var i=ad({h:Number(t),s:Number(n),l:Number(o),a:Number(r)});return ud(i)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,l=e.a,r=void 0===l?1:l;if(!Xu(t)||!Xu(n)||!Xu(o))return null;var i=function(e){return{h:td(e.h),s:ed(e.s,0,100),v:ed(e.v,0,100),a:ed(e.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(r)});return sd(i)},"hsv"]]},vd=function(e,t){for(var n=0;n<t.length;n++){var o=t[n][0](e);if(o)return[o,t[n][1]]}return[null,void 0]},bd=function(e,t){var n=dd(e);return{h:n.h,s:ed(n.s+100*t,0,100),l:n.l,a:n.a}},_d=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},kd=function(e,t){var n=dd(e);return{h:n.h,s:n.s,l:ed(n.l+100*t,0,100),a:n.a}},yd=function(){function e(e){this.parsed=function(e){return"string"==typeof e?vd(e.trim(),fd.string):"object"==typeof e&&null!==e?vd(e,fd.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return Ju(_d(this.rgba),2)},e.prototype.isDark=function(){return _d(this.rgba)<.5},e.prototype.isLight=function(){return _d(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=od(this.rgba)).r,n=e.g,o=e.b,r=(l=e.a)<1?rd(Ju(255*l)):"","#"+rd(t)+rd(n)+rd(o)+r;var e,t,n,o,l,r},e.prototype.toRgb=function(){return od(this.rgba)},e.prototype.toRgbString=function(){return t=(e=od(this.rgba)).r,n=e.g,o=e.b,(l=e.a)<1?"rgba("+t+", "+n+", "+o+", "+l+")":"rgb("+t+", "+n+", "+o+")";var e,t,n,o,l},e.prototype.toHsl=function(){return cd(dd(this.rgba))},e.prototype.toHslString=function(){return t=(e=cd(dd(this.rgba))).h,n=e.s,o=e.l,(l=e.a)<1?"hsla("+t+", "+n+"%, "+o+"%, "+l+")":"hsl("+t+", "+n+"%, "+o+"%)";var e,t,n,o,l},e.prototype.toHsv=function(){return e=id(this.rgba),{h:Ju(e.h),s:Ju(e.s),v:Ju(e.v),a:Ju(e.a,3)};var e},e.prototype.invert=function(){return Ed({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),Ed(bd(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Ed(bd(this.rgba,-e))},e.prototype.grayscale=function(){return Ed(bd(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Ed(kd(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Ed(kd(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?Ed({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Ju(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=dd(this.rgba);return"number"==typeof e?Ed({h:e,s:t.s,l:t.l,a:t.a}):Ju(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Ed(e).toHex()},e}(),Ed=function(e){return e instanceof yd?e:new yd(e)},Cd=[],Sd=function(e){e.forEach((function(e){Cd.indexOf(e)<0&&(e(yd,fd),Cd.push(e))}))};function wd(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var l in n)o[n[l]]=l;var r={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var l,i,s=o[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var a=this.toRgb(),c=1/0,u="black";if(!r.length)for(var d in n)r[d]=new e(n[d]).toRgb();for(var p in n){var m=(l=a,i=r[p],Math.pow(l.r-i.r,2)+Math.pow(l.g-i.g,2)+Math.pow(l.b-i.b,2));m<c&&(c=m,u=p)}return u}},t.string.push([function(t){var o=t.toLowerCase(),l="transparent"===o?"#0000":n[o];return l?new e(l).toRgb():null},"name"])}var Bd=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Id=function(e){return.2126*Bd(e.r)+.7152*Bd(e.g)+.0722*Bd(e.b)};function xd(e){e.prototype.luminance=function(){return e=Id(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,o,l,r,i,s,a,c=t instanceof e?t:new e(t);return r=this.rgba,i=c.toRgb(),n=(s=Id(r))>(a=Id(i))?(s+.05)/(a+.05):(a+.05)/(s+.05),void 0===(o=2)&&(o=0),void 0===l&&(l=Math.pow(10,o)),Math.floor(l*n)/l+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(i=void 0===(r=(n=t).size)?"normal":r,"AAA"===(l=void 0===(o=n.level)?"AA":o)&&"normal"===i?7:"AA"===l&&"large"===i?3:4.5);var n,o,l,r,i}}var Td=n(3124),Nd=n.n(Td);const Pd=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Ld(e,t){t=t||{};let n=1,o=1;function l(e){const t=e.match(/\n/g);t&&(n+=t.length);const l=e.lastIndexOf("\n");o=~l?e.length-l:o+e.length}function r(){const e={line:n,column:o};return function(t){return t.position=new i(e),m(),t}}function i(e){this.start=e,this.end={line:n,column:o},this.source=t.source}i.prototype.content=e;const s=[];function a(l){const r=new Error(t.source+":"+n+":"+o+": "+l);if(r.reason=l,r.filename=t.source,r.line=n,r.column=o,r.source=e,!t.silent)throw r;s.push(r)}function c(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){let t;const n=[];for(m(),g(n);e.length&&"}"!==e.charAt(0)&&(t=S()||w());)!1!==t&&(n.push(t),g(n));return n}function p(t){const n=t.exec(e);if(!n)return;const o=n[0];return l(o),e=e.slice(o.length),n}function m(){p(/^\s*/)}function g(e){let t;for(e=e||[];t=h();)!1!==t&&e.push(t);return e}function h(){const t=r();if("/"!==e.charAt(0)||"*"!==e.charAt(1))return;let n=2;for(;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return a("End of comment missing");const i=e.slice(2,n-2);return o+=2,l(i),e=e.slice(n),o+=2,t({type:"comment",comment:i})}function f(){const e=p(/^([^{]+)/);if(e)return Md(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function v(){const e=r();let t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=Md(t[0]),!p(/^:\s*/))return a("property missing ':'");const n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:t.replace(Pd,""),value:n?Md(n[0]).replace(Pd,""):""});return p(/^[;\s]*/),o}function b(){const e=[];if(!c())return a("missing '{'");let t;for(g(e);t=v();)!1!==t&&(e.push(t),g(e));return u()?e:a("missing '}'")}function _(){let e;const t=[],n=r();for(;e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:b()})}const k=C("import"),y=C("charset"),E=C("namespace");function C(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=r(),o=p(t);if(!o)return;const l={type:e};return l[e]=o[1].trim(),n(l)}}function S(){if("@"===e[0])return function(){const e=r();let t=p(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=p(/^([-\w]+)\s*/),!t)return a("@keyframes missing name");const o=t[1];if(!c())return a("@keyframes missing '{'");let l,i=g();for(;l=_();)i.push(l),i=i.concat(g());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):a("@keyframes missing '}'")}()||function(){const e=r(),t=p(/^@media *([^{]+)/);if(!t)return;const n=Md(t[1]);if(!c())return a("@media missing '{'");const o=g().concat(d());return u()?e({type:"media",media:n,rules:o}):a("@media missing '}'")}()||function(){const e=r(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Md(t[1]),media:Md(t[2])})}()||function(){const e=r(),t=p(/^@supports *([^{]+)/);if(!t)return;const n=Md(t[1]);if(!c())return a("@supports missing '{'");const o=g().concat(d());return u()?e({type:"supports",supports:n,rules:o}):a("@supports missing '}'")}()||k()||y()||E()||function(){const e=r(),t=p(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=Md(t[1]),o=Md(t[2]);if(!c())return a("@document missing '{'");const l=g().concat(d());return u()?e({type:"document",document:o,vendor:n,rules:l}):a("@document missing '}'")}()||function(){const e=r();if(!p(/^@page */))return;const t=f()||[];if(!c())return a("@page missing '{'");let n,o=g();for(;n=v();)o.push(n),o=o.concat(g());return u()?e({type:"page",selectors:t,declarations:o}):a("@page missing '}'")}()||function(){const e=r();if(!p(/^@host\s*/))return;if(!c())return a("@host missing '{'");const t=g().concat(d());return u()?e({type:"host",rules:t}):a("@host missing '}'")}()||function(){const e=r();if(!p(/^@font-face\s*/))return;if(!c())return a("@font-face missing '{'");let t,n=g();for(;t=v();)n.push(t),n=n.concat(g());return u()?e({type:"font-face",declarations:n}):a("@font-face missing '}'")}()}function w(){const e=r(),t=f();return t?(g(),e({type:"rule",selectors:t,declarations:b()})):a("selector missing")}return Rd(function(){const e=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:s}}}())}function Md(e){return e?e.replace(/^\s+|\s+$/g,""):""}function Rd(e,t){const n=e&&"string"==typeof e.type,o=n?e:t;for(const t in e){const n=e[t];Array.isArray(n)?n.forEach((function(e){Rd(e,o)})):n&&"object"==typeof n&&Rd(n,o)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var Ad=n(8575),Dd=n.n(Ad);const Od=zd;function zd(e){this.options=e||{}}zd.prototype.emit=function(e){return e},zd.prototype.visit=function(e){return this[e.type](e)},zd.prototype.mapVisit=function(e,t){let n="";t=t||"";for(let o=0,l=e.length;o<l;o++)n+=this.visit(e[o]),t&&o<l-1&&(n+=this.emit(t));return n};const Fd=Vd;function Vd(e){Od.call(this,e)}Dd()(Vd,Od),Vd.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},Vd.prototype.comment=function(e){return this.emit("",e.position)},Vd.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Vd.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Vd.prototype.document=function(e){const t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Vd.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Vd.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Vd.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Vd.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},Vd.prototype.keyframe=function(e){const t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},Vd.prototype.page=function(e){const t=e.selectors.length?e.selectors.join(", "):"";return this.emit("@page "+t,e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Vd.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Vd.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Vd.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Vd.prototype.rule=function(e){const t=e.declarations;return t.length?this.emit(e.selectors.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}"):""},Vd.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};const Hd=Gd;function Gd(e){e=e||{},Od.call(this,e),this.indentation=e.indent}Dd()(Gd,Od),Gd.prototype.compile=function(e){return this.stylesheet(e)},Gd.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},Gd.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},Gd.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Gd.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Gd.prototype.document=function(e){const t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Gd.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Gd.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Gd.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Gd.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.keyframes,"\n")+this.emit(this.indent(-1)+"}")},Gd.prototype.keyframe=function(e){const t=e.declarations;return this.emit(this.indent())+this.emit(e.values.join(", "),e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},Gd.prototype.page=function(e){const t=e.selectors.length?e.selectors.join(", ")+" ":"";return this.emit("@page "+t,e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Gd.prototype["font-face"]=function(e){return this.emit("@font-face ",e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Gd.prototype.host=function(e){return this.emit("@host",e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Gd.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Gd.prototype.rule=function(e){const t=this.indent(),n=e.declarations;return n.length?this.emit(e.selectors.map((function(e){return t+e})).join(",\n"),e.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(n,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},Gd.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},Gd.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};const Ud=function(e,t){try{const l=Ld(e);return n=Nd().map(l,(function(e){if(!e)return e;const n=t(e);return this.update(n)})),((o=o||{}).compress?new Fd(o):new Hd(o)).compile(n)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var n,o};function Wd(e){return 0!==e.value.indexOf("data:")&&0!==e.value.indexOf("#")&&(t=e.value,!/^\/(?!\/)/.test(t)&&!function(e){return/^(?:https?:)?\/\//.test(e)}(e.value));var t}function $d(e,t){return new URL(e,t).toString()}const jd=e=>t=>{if("declaration"===t.type){const r=function(e){const t=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;let n;const o=[];for(;null!==(n=t.exec(e));){const e={source:n[0],before:n[1],quote:n[2],value:n[3],after:n[4]};Wd(e)&&o.push(e)}return o}(t.value).map((l=e,e=>({...e,newUrl:"url("+e.before+e.quote+$d(e.value,l)+e.quote+e.after+")"})));return{...t,value:(n=t.value,o=r,o.forEach((e=>{n=n.replace(e.source,e.newUrl)})),n)}}var n,o,l;return t},Kd=/^(body|html|:root).*$/,qd=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n=>"rule"===n.type?{...n,selectors:n.selectors.map((n=>t.includes(n.trim())?n:n.match(Kd)?n.replace(/^(body|html|:root)/,e):e+" "+n))}:n},Yd=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,u.map)(e,(e=>{let{css:n,baseURL:o}=e;const l=[];return t&&l.push(qd(t)),o&&l.push(jd(o)),l.length?Ud(n,(0,d.compose)(l)):n}))},Zd=".editor-styles-wrapper";function Qd(e){return(0,s.useCallback)((e=>{if(!e)return;const{ownerDocument:t}=e,{defaultView:n,body:o}=t,l=t.querySelector(Zd);let r;if(l)r=n.getComputedStyle(l,null).getPropertyValue("background-color");else{const e=t.createElement("div");e.classList.add("editor-styles-wrapper"),o.appendChild(e),r=n.getComputedStyle(e,null).getPropertyValue("background-color"),o.removeChild(e)}const i=Ed(r);i.luminance()>.5||0===i.alpha()?o.classList.remove("is-dark-theme"):o.classList.add("is-dark-theme")}),[e])}function Xd(e){let{styles:t}=e;const n=(0,s.useMemo)((()=>Yd(t,Zd)),[t]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("style",{ref:Qd(t)}),n.map(((e,t)=>(0,s.createElement)("style",{key:t},e))))}function Jd(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=Ed(e).toRgb();t.r.push(n.r/255),t.g.push(n.g/255),t.b.push(n.b/255),t.a.push(n.a)})),t}function ep(e){let{selector:t,id:n}=e;const o=`\n${t} {\n\tfilter: url( #${n} );\n}\n`;return(0,s.createElement)("style",null,o)}function tp(e){let{selector:t}=e;const n=`\n${t} {\n\tfilter: none;\n}\n`;return(0,s.createElement)("style",null,n)}function np(e){let{id:t,colors:n}=e;const o=Jd(n);return(0,s.createElement)(m.SVG,{xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 0 0",width:"0",height:"0",focusable:"false",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"}},(0,s.createElement)("defs",null,(0,s.createElement)("filter",{id:t},(0,s.createElement)("feColorMatrix",{colorInterpolationFilters:"sRGB",type:"matrix",values:" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "}),(0,s.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},(0,s.createElement)("feFuncR",{type:"table",tableValues:o.r.join(" ")}),(0,s.createElement)("feFuncG",{type:"table",tableValues:o.g.join(" ")}),(0,s.createElement)("feFuncB",{type:"table",tableValues:o.b.join(" ")}),(0,s.createElement)("feFuncA",{type:"table",tableValues:o.a.join(" ")})),(0,s.createElement)("feComposite",{in2:"SourceGraphic",operator:"in"}))))}function op(e){let{preset:t}=e;return(0,s.createElement)(np,{id:`wp-duotone-${t.slug}`,colors:t.colors})}let lp;Sd([wd,xd]);const rp=2e3;function ip(e){let{viewportWidth:t,containerWidth:n,__experimentalPadding:o,__experimentalMinHeight:l}=e;const[r,{height:i}]=(0,d.useResizeObserver)(),{styles:a,assets:c,duotone:u}=(0,p.useSelect)((e=>{var t,n;const o=e(co).getSettings();return{styles:o.styles,assets:o.__unstableResolvedAssets,duotone:null===(t=o.__experimentalFeatures)||void 0===t||null===(n=t.color)||void 0===n?void 0:n.duotone}}),[]),g=(0,s.useMemo)((()=>a?[...a,{css:"body{height:auto;overflow:hidden;}",__unstableType:"presets"}]:a),[a]),h=(0,s.useMemo)((()=>{var e,t;return[...null!==(e=null==u?void 0:u.default)&&void 0!==e?e:[],...null!==(t=null==u?void 0:u.theme)&&void 0!==t?t:[]]}),[u]);lp=lp||(0,d.pure)(Kh);const f=n/t;return(0,s.createElement)(m.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${f})`,height:i*f,maxHeight:i>rp?rp*f:void 0,minHeight:l}},(0,s.createElement)(Zu,{head:(0,s.createElement)(Xd,{styles:g}),assets:c,contentRef:(0,d.useRefEffect)((e=>{const{ownerDocument:{documentElement:t}}=e;t.classList.add("block-editor-block-preview__content-iframe"),t.style.position="absolute",t.style.width="100%",e.style.padding=o+"px",e.style.boxSizing="border-box",e.style.position="absolute",e.style.width="100%"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:t,height:i,pointerEvents:"none",maxHeight:rp,minHeight:0!==f&&f<1&&l?l/f:l}},r,h.map((e=>(0,s.createElement)(op,{preset:e,key:e.slug}))),(0,s.createElement)(lp,{renderAppender:!1})))}function sp(e){const[t,{width:n}]=(0,d.useResizeObserver)();return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{style:{position:"relative",width:"100%",height:0}},t),(0,s.createElement)("div",{className:"block-editor-block-preview__container"},!!n&&(0,s.createElement)(ip,i({},e,{containerWidth:n}))))}const ap=(0,s.memo)((function(e){let{blocks:t,__experimentalPadding:n=0,viewportWidth:o=1200,__experimentalLive:l=!1,__experimentalOnClick:r,__experimentalMinHeight:i}=e;const a=(0,p.useSelect)((e=>e(co).getSettings()),[]),c=(0,s.useMemo)((()=>{const e={...a};return e.__experimentalBlockPatterns=[],e}),[a]),d=(0,s.useMemo)((()=>(0,u.castArray)(t)),[t]);return t&&0!==t.length?(0,s.createElement)(Nu,{value:d,settings:c},l?(0,s.createElement)(Pu,{onClick:r}):(0,s.createElement)(sp,{viewportWidth:o,__experimentalPadding:n,__experimentalMinHeight:i})):null}));function cp(e){let{blocks:t,props:n={},__experimentalLayout:o}=e;const l=(0,p.useSelect)((e=>e(co).getSettings()),[]),r=(0,d.useDisabled)(),i=(0,d.useMergeRefs)([n.ref,r]),a=(0,s.useMemo)((()=>({...l,__experimentalBlockPatterns:[]})),[l]),m=(0,s.useMemo)((()=>(0,u.castArray)(t)),[t]),g=(0,s.createElement)(Nu,{value:m,settings:a},(0,s.createElement)(Yh,{renderAppender:!1,__experimentalLayout:o}));return{...n,ref:i,className:c()(n.className,"block-editor-block-preview__live-content","components-disabled"),children:null!=t&&t.length?g:null}}const up=function(e){var t;let{item:n}=e;const{name:o,title:r,icon:i,description:a,initialAttributes:c,example:u}=n,d=(0,l.isReusableBlock)(n);return(0,s.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,s.createElement)("div",{className:"block-editor-inserter__preview"},d||u?(0,s.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,s.createElement)(ap,{__experimentalPadding:16,viewportWidth:null!==(t=null==u?void 0:u.viewportWidth)&&void 0!==t?t:500,blocks:u?(0,l.getBlockFromExample)(o,{attributes:{...u.attributes,...c},innerBlocks:u.innerBlocks}):(0,l.createBlock)(o,c)})):(0,s.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},(0,h.__)("No Preview Available."))),!d&&(0,s.createElement)(Bu,{title:r,icon:i,description:a}))},dp=(0,s.createContext)(),pp=(0,s.forwardRef)((function(e,t){let{isFirst:n,as:o,children:l,...r}=e;const a=(0,s.useContext)(dp);return(0,s.createElement)(m.__unstableCompositeItem,i({ref:t,state:a,role:"option",focusable:!0},r),(e=>{const t={...e,tabIndex:n?0:e.tabIndex};return o?(0,s.createElement)(o,t,l):"function"==typeof l?l(t):(0,s.createElement)(m.Button,t,l)}))})),mp=(0,s.createElement)(D.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"}));function gp(e){let{count:t,icon:n}=e;return(0,s.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},(0,s.createElement)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip"},(0,s.createElement)(m.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,s.createElement)(m.FlexItem,null,n?(0,s.createElement)(wu,{icon:n}):(0,h.sprintf)(
|
13 |
/* translators: %d: Number of blocks. */
|
14 |
-
(0,h._n)("%d block","%d blocks",t),t)),(0,s.createElement)(m.FlexItem,null,(0,s.createElement)(
|
15 |
/* translators: %s: block pattern title. */
|
16 |
-
(0,h.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[])]};function xp(e){let{isDraggable:t,pattern:n,onClick:o,composite:l}=e;const{blocks:r,viewportWidth:a}=n,c=`block-editor-block-patterns-list__item-description-${(0,d.useInstanceId)(xp)}`;return(0,s.createElement)(hp,{isEnabled:t,blocks:r},(e=>{let{draggable:t,onDragStart:u,onDragEnd:d}=e;return(0,s.createElement)("div",{className:"block-editor-block-patterns-list__list-item","aria-label":n.title,"aria-describedby":n.description?c:void 0,draggable:t,onDragStart:u,onDragEnd:d},(0,s.createElement)(m.__unstableCompositeItem,i({role:"option",as:"div"},l,{className:"block-editor-block-patterns-list__item",onClick:()=>o(n,r)}),(0,s.createElement)(ap,{blocks:r,viewportWidth:a}),(0,s.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},n.title),!!n.description&&(0,s.createElement)(m.VisuallyHidden,{id:c},n.description)))}))}function Tp(){return(0,s.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}const Np=function(e){let{isDraggable:t,blockPatterns:n,shownPatterns:o,onClickPattern:l,orientation:r,label:a=(0,h.__)("Block Patterns")}=e;const c=(0,m.__unstableUseCompositeState)({orientation:r});return(0,s.createElement)(m.__unstableComposite,i({},c,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":a}),n.map((e=>o.includes(e)?(0,s.createElement)(xp,{key:e.name,pattern:e,onClick:l,isDraggable:t,composite:c}):(0,s.createElement)(Tp,{key:e.name}))))};function Pp(e){let{selectedCategory:t,patternCategories:n,onClickCategory:o}=e;const l="block-editor-block-patterns-explorer__sidebar";return(0,s.createElement)("div",{className:`${l}__categories-list`},n.map((e=>{let{name:n,label:r}=e;return(0,s.createElement)(m.Button,{key:n,label:r,className:`${l}__categories-list__item`,isPressed:t===n,onClick:()=>{o(n)}},r)})))}function Lp(e){let{filterValue:t,setFilterValue:n}=e;return(0,s.createElement)("div",{className:"block-editor-block-patterns-explorer__search"},(0,s.createElement)
|
1 |
+
(()=>{var e={6411:function(e,t){var n,o;n=function(e,t){"use strict";var n,o,r="function"==typeof Map?new Map:(n=[],o=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return o[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),o.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),o.splice(t,1))}}),l=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){l=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!r.has(e)){var t=null,n=null,o=null,i=function(){e.clientWidth!==n&&d()},s=function(t){window.removeEventListener("resize",i,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",s,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),r.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",s,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",i,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",r.set(e,{destroy:s,update:d}),"vertical"===(a=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===a.resize&&(e.style.resize="horizontal"),t="content-box"===a.boxSizing?-(parseFloat(a.paddingTop)+parseFloat(a.paddingBottom)):parseFloat(a.borderTopWidth)+parseFloat(a.borderBottomWidth),isNaN(t)&&(t=0),d()}var a;function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var o=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,o.forEach((function(e){e.node.scrollTop=e.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(c("scroll"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(c("hidden"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),o!==r){o=r;var i=l("autosize:resized");try{e.dispatchEvent(i)}catch(e){}}}}function s(e){var t=r.get(e);t&&t.destroy()}function a(e){var t=r.get(e);t&&t.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(e){return e}).destroy=function(e){return e},c.update=function(e){return e}):((c=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return i(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],s),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e}),t.default=c,e.exports=t.default},void 0===(o=n.apply(t,[e,t]))||(e.exports=o)},4403:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var l=typeof n;if("string"===l||"number"===l)e.push(n);else if(Array.isArray(n)){if(n.length){var i=r.apply(null,n);i&&e.push(i)}}else if("object"===l)if(n.toString===Object.prototype.toString)for(var s in n)o.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},4827:e=>{e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},1198:(e,t)=>{"use strict";function n(){}function o(e,t,n,o,r){for(var l=0,i=t.length,s=0,a=0;l<i;l++){var c=t[l];if(c.removed){if(c.value=e.join(o.slice(a,a+c.count)),a+=c.count,l&&t[l-1].added){var u=t[l-1];t[l-1]=t[l],t[l]=u}}else{if(!c.added&&r){var d=n.slice(s,s+c.count);d=d.map((function(e,t){var n=o[a+t];return n.length>e.length?n:e})),c.value=e.join(d)}else c.value=e.join(n.slice(s,s+c.count));s+=c.count,c.added||(a+=c.count)}}var p=t[i-1];return i>1&&"string"==typeof p.value&&(p.added||p.removed)&&e.equals("",p.value)&&(t[i-2].value+=p.value,t.pop()),t}function r(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=n.callback;"function"==typeof n&&(l=n,n={}),this.options=n;var i=this;function s(e){return l?(setTimeout((function(){l(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var a=(t=this.removeEmpty(this.tokenize(t))).length,c=e.length,u=1,d=a+c,p=[{newPos:-1,components:[]}],m=this.extractCommon(p[0],t,e,0);if(p[0].newPos+1>=a&&m+1>=c)return s([{value:this.join(t),count:t.length}]);function g(){for(var n=-1*u;n<=u;n+=2){var l=void 0,d=p[n-1],m=p[n+1],g=(m?m.newPos:0)-n;d&&(p[n-1]=void 0);var h=d&&d.newPos+1<a,f=m&&0<=g&&g<c;if(h||f){if(!h||f&&d.newPos<m.newPos?(l=r(m),i.pushComponent(l.components,void 0,!0)):((l=d).newPos++,i.pushComponent(l.components,!0,void 0)),g=i.extractCommon(l,t,e,n),l.newPos+1>=a&&g+1>=c)return s(o(i,l.components,t,e,i.useLongestToken));p[n]=l}else p[n]=void 0}u++}if(l)!function e(){setTimeout((function(){if(u>d)return l();g()||e()}),0)}();else for(;u<=d;){var h=g();if(h)return h}},pushComponent:function(e,t,n){var o=e[e.length-1];o&&o.added===t&&o.removed===n?e[e.length-1]={count:o.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,o){for(var r=t.length,l=n.length,i=e.newPos,s=i-o,a=0;i+1<r&&s+1<l&&this.equals(t[i+1],n[s+1]);)i++,s++,a++;return a&&e.components.push({count:a}),e.newPos=i,s},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}},1973:(e,t,n)=>{"use strict";var o;t.Kx=function(e,t,n){return r.diff(e,t,n)};var r=new(((o=n(1198))&&o.__esModule?o:{default:o}).default)},1345:(e,t,n)=>{"use strict";var o=n(5022);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=o.getWindow(t));var r=n.allowHorizontalScroll,l=n.onlyScrollIfNeeded,i=n.alignWithTop,s=n.alignWithLeft,a=n.offsetTop||0,c=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;r=void 0===r||r;var p=o.isWindow(t),m=!(!p||!t.frameElement),g=o.offset(e),h=o.outerHeight(e),f=o.outerWidth(e),v=void 0,b=void 0,_=void 0,k=void 0,y=void 0,E=void 0,C=void 0,S=void 0,w=void 0,B=void 0;m&&(t=t.document.scrollingElement||t.document.body),p||m?(C=t,B=o.height(C),w=o.width(C),S={left:o.scrollLeft(C),top:o.scrollTop(C)},y={left:g.left-S.left-c,top:g.top-S.top-a},E={left:g.left+f-(S.left+w)+d,top:g.top+h-(S.top+B)+u},k=S):(v=o.offset(t),b=t.clientHeight,_=t.clientWidth,k={left:t.scrollLeft,top:t.scrollTop},y={left:g.left-(v.left+(parseFloat(o.css(t,"borderLeftWidth"))||0))-c,top:g.top-(v.top+(parseFloat(o.css(t,"borderTopWidth"))||0))-a},E={left:g.left+f-(v.left+_+(parseFloat(o.css(t,"borderRightWidth"))||0))+d,top:g.top+h-(v.top+b+(parseFloat(o.css(t,"borderBottomWidth"))||0))+u}),y.top<0||E.top>0?!0===i?o.scrollTop(t,k.top+y.top):!1===i?o.scrollTop(t,k.top+E.top):y.top<0?o.scrollTop(t,k.top+y.top):o.scrollTop(t,k.top+E.top):l||((i=void 0===i||!!i)?o.scrollTop(t,k.top+y.top):o.scrollTop(t,k.top+E.top)),r&&(y.left<0||E.left>0?!0===s?o.scrollLeft(t,k.left+y.left):!1===s?o.scrollLeft(t,k.left+E.left):y.left<0?o.scrollLeft(t,k.left+y.left):o.scrollLeft(t,k.left+E.left):l||((s=void 0===s||!!s)?o.scrollLeft(t,k.left+y.left):o.scrollLeft(t,k.left+E.left)))}},5425:(e,t,n)=>{"use strict";e.exports=n(1345)},5022:e=>{"use strict";var t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function o(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],o="scroll"+(t?"Top":"Left");if("number"!=typeof n){var r=e.document;"number"!=typeof(n=r.documentElement[o])&&(n=r.body[o])}return n}function r(e){return o(e)}function l(e){return o(e,!0)}function i(e){var t=function(e){var t,n=void 0,o=void 0,r=e.ownerDocument,l=r.body,i=r&&r.documentElement;return n=(t=e.getBoundingClientRect()).left,o=t.top,{left:n-=i.clientLeft||l.clientLeft||0,top:o-=i.clientTop||l.clientTop||0}}(e),n=e.ownerDocument,o=n.defaultView||n.parentWindow;return t.left+=r(o),t.top+=l(o),t}var s=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),a=/^(top|right|bottom|left)$/,c=void 0;function u(e,t){for(var n=0;n<e.length;n++)t(e[n])}function d(e){return"border-box"===c(e,"boxSizing")}"undefined"!=typeof window&&(c=window.getComputedStyle?function(e,t,n){var o="",r=e.ownerDocument,l=n||r.defaultView.getComputedStyle(e,null);return l&&(o=l.getPropertyValue(t)||l[t]),o}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(s.test(n)&&!a.test(t)){var o=e.style,r=o.left,l=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left,o.left="fontSize"===t?"1em":n||0,n=o.pixelLeft+"px",o.left=r,e.runtimeStyle.left=l}return""===n?"auto":n});var p=["margin","border","padding"];function m(e,t,n){var o={},r=e.style,l=void 0;for(l in t)t.hasOwnProperty(l)&&(o[l]=r[l],r[l]=t[l]);for(l in n.call(e),t)t.hasOwnProperty(l)&&(r[l]=o[l])}function g(e,t,n){var o=0,r=void 0,l=void 0,i=void 0;for(l=0;l<t.length;l++)if(r=t[l])for(i=0;i<n.length;i++){var s;s="border"===r?r+n[i]+"Width":r+n[i],o+=parseFloat(c(e,s))||0}return o}function h(e){return null!=e&&e==e.window}var f={};function v(e,t,n){if(h(e))return"width"===t?f.viewportWidth(e):f.viewportHeight(e);if(9===e.nodeType)return"width"===t?f.docWidth(e):f.docHeight(e);var o="width"===t?["Left","Right"]:["Top","Bottom"],r="width"===t?e.offsetWidth:e.offsetHeight,l=(c(e),d(e)),i=0;(null==r||r<=0)&&(r=void 0,(null==(i=c(e,t))||Number(i)<0)&&(i=e.style[t]||0),i=parseFloat(i)||0),void 0===n&&(n=l?1:-1);var s=void 0!==r||l,a=r||i;if(-1===n)return s?a-g(e,["border","padding"],o):i;if(s){var u=2===n?-g(e,["border"],o):g(e,["margin"],o);return a+(1===n?0:u)}return i+g(e,p.slice(n),o)}u(["Width","Height"],(function(e){f["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],f["viewport"+e](n))},f["viewport"+e]=function(t){var n="client"+e,o=t.document,r=o.body,l=o.documentElement[n];return"CSS1Compat"===o.compatMode&&l||r&&r[n]||l}}));var b={position:"absolute",visibility:"hidden",display:"block"};function _(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=v.apply(void 0,n):m(e,b,(function(){t=v.apply(void 0,n)})),t}function k(e,t,o){var r=o;if("object"!==(void 0===t?"undefined":n(t)))return void 0!==r?("number"==typeof r&&(r+="px"),void(e.style[t]=r)):c(e,t);for(var l in t)t.hasOwnProperty(l)&&k(e,l,t[l])}u(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);f["outer"+t]=function(t,n){return t&&_(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];f[e]=function(t,o){return void 0===o?t&&_(t,e,-1):t?(c(t),d(t)&&(o+=g(t,["padding","border"],n)),k(t,e,o)):void 0}})),e.exports=t({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return i(e);!function(e,t){"static"===k(e,"position")&&(e.style.position="relative");var n=i(e),o={},r=void 0,l=void 0;for(l in t)t.hasOwnProperty(l)&&(r=parseFloat(k(e,l))||0,o[l]=r+t[l]-n[l]);k(e,o)}(e,t)},isWindow:h,each:u,css:k,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var n in e)e.hasOwnProperty(n)&&(t.overflow[n]=e.overflow[n]);return t},scrollLeft:function(e,t){if(h(e)){if(void 0===t)return r(e);window.scrollTo(t,l(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(h(e)){if(void 0===t)return l(e);window.scrollTo(r(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},f)},8575:e=>{"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},9894:(e,t,n)=>{var o=n(4827);e.exports=function(e){var t=o(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var r=e.style.lineHeight;e.style.lineHeight=t+"em",t=o(e,"line-height"),n=parseFloat(t,10),r?e.style.lineHeight=r:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var l=e.nodeName,i=document.createElement(l);i.innerHTML=" ","TEXTAREA"===l.toUpperCase()&&i.setAttribute("rows","1");var s=o(e,"font-size");i.style.fontSize=s,i.style.padding="0px",i.style.border="0px";var a=document.body;a.appendChild(i),n=i.offsetHeight,a.removeChild(i)}return n}},7970:(e,t,n)=>{e.exports=n(195)},3110:e=>{"use strict";var t=!("undefined"==typeof window||!window.document||!window.document.createElement),n={canUseDOM:t,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:t&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:t&&!!window.screen,isInWorker:!t};e.exports=n},3812:e=>{var t,n,o,r,l,i,s,a,c,u,d,p,m,g,h,f=!1;function v(){if(!f){f=!0;var e=navigator.userAgent,v=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),b=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(p=/\b(iPhone|iP[ao]d)/.exec(e),m=/\b(iP[ao]d)/.exec(e),u=/Android/i.exec(e),g=/FBAN\/\w+;/i.exec(e),h=/Mobile/i.exec(e),d=!!/Win64/.exec(e),v){(t=v[1]?parseFloat(v[1]):v[5]?parseFloat(v[5]):NaN)&&document&&document.documentMode&&(t=document.documentMode);var _=/(?:Trident\/(\d+.\d+))/.exec(e);i=_?parseFloat(_[1])+4:t,n=v[2]?parseFloat(v[2]):NaN,o=v[3]?parseFloat(v[3]):NaN,(r=v[4]?parseFloat(v[4]):NaN)?(v=/(?:Chrome\/(\d+\.\d+))/.exec(e),l=v&&v[1]?parseFloat(v[1]):NaN):l=NaN}else t=n=o=l=r=NaN;if(b){if(b[1]){var k=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);s=!k||parseFloat(k[1].replace("_","."))}else s=!1;a=!!b[2],c=!!b[3]}else s=a=c=!1}}var b={ie:function(){return v()||t},ieCompatibilityMode:function(){return v()||i>t},ie64:function(){return b.ie()&&d},firefox:function(){return v()||n},opera:function(){return v()||o},webkit:function(){return v()||r},safari:function(){return b.webkit()},chrome:function(){return v()||l},windows:function(){return v()||a},osx:function(){return v()||s},linux:function(){return v()||c},iphone:function(){return v()||p},mobile:function(){return v()||p||m||u||h},nativeApp:function(){return v()||g},android:function(){return v()||u},ipad:function(){return v()||m}};e.exports=b},7939:(e,t,n)=>{"use strict";var o,r=n(3110);r.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),e.exports=function(e,t){if(!r.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,l=n in document;if(!l){var i=document.createElement("div");i.setAttribute(n,"return;"),l="function"==typeof i[n]}return!l&&o&&"wheel"===e&&(l=document.implementation.hasFeature("Events.wheel","3.0")),l}},195:(e,t,n)=>{"use strict";var o=n(3812),r=n(7939);function l(e){var t=0,n=0,o=0,r=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),o=10*t,r=10*n,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(o=e.deltaX),(o||r)&&e.deltaMode&&(1==e.deltaMode?(o*=40,r*=40):(o*=800,r*=800)),o&&!t&&(t=o<1?-1:1),r&&!n&&(n=r<1?-1:1),{spinX:t,spinY:n,pixelX:o,pixelY:r}}l.getEventType=function(){return o.firefox()?"DOMMouseScroll":r("wheel")?"wheel":"mousewheel"},e.exports=l},5372:(e,t,n)=>{"use strict";var o=n(9567);function r(){}function l(){}l.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,l,i){if(i!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:l,resetWarningCache:r};return n.PropTypes=n,n}},2652:(e,t,n)=>{e.exports=n(5372)()},9567:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5438:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),l=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]])}return n};t.__esModule=!0;var s=n(9196),a=n(2652),c=n(6411),u=n(9894),d="autosize:resized",p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return r(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,o=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||o?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(d,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(d,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),o=(t.onChange,t.style),r=(t.innerRef,t.children),a=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return s.createElement("textarea",l({},a,{onChange:this.onChange,style:u?l({},o,{maxHeight:u}):o,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),r)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:a.number,maxRows:a.number,onResize:a.func,innerRef:a.any,async:a.bool},t}(s.Component);t.TextareaAutosize=s.forwardRef((function(e,t){return s.createElement(p,l({},e,{innerRef:t}))}))},773:(e,t,n)=>{"use strict";var o=n(5438);t.Z=o.TextareaAutosize},4793:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ì:"I",Í:"I",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",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z"},n=Object.keys(t).join("|"),o=new RegExp(n,"g"),r=new RegExp(n,""),l=function(e){return e.replace(o,(function(e){return t[e]}))};e.exports=l,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=l},3124:e=>{var t=e.exports=function(e){return new n(e)};function n(e){this.value=e}function o(e,t,n){var o=[],i=[],u=!0;return function e(d){var p=n?r(d):d,m={},g=!0,h={node:p,node_:d,path:[].concat(o),parent:i[i.length-1],parents:i,key:o.slice(-1)[0],isRoot:0===o.length,level:o.length,circular:null,update:function(e,t){h.isRoot||(h.parent.node[h.key]=e),h.node=e,t&&(g=!1)},delete:function(e){delete h.parent.node[h.key],e&&(g=!1)},remove:function(e){s(h.parent.node)?h.parent.node.splice(h.key,1):delete h.parent.node[h.key],e&&(g=!1)},keys:null,before:function(e){m.before=e},after:function(e){m.after=e},pre:function(e){m.pre=e},post:function(e){m.post=e},stop:function(){u=!1},block:function(){g=!1}};if(!u)return h;function f(){if("object"==typeof h.node&&null!==h.node){h.keys&&h.node_===h.node||(h.keys=l(h.node)),h.isLeaf=0==h.keys.length;for(var e=0;e<i.length;e++)if(i[e].node_===d){h.circular=i[e];break}}else h.isLeaf=!0,h.keys=null;h.notLeaf=!h.isLeaf,h.notRoot=!h.isRoot}f();var v=t.call(h,h.node);return void 0!==v&&h.update&&h.update(v),m.before&&m.before.call(h,h.node),g?("object"!=typeof h.node||null===h.node||h.circular||(i.push(h),f(),a(h.keys,(function(t,r){o.push(t),m.pre&&m.pre.call(h,h.node[t],t);var l=e(h.node[t]);n&&c.call(h.node,t)&&(h.node[t]=l.node),l.isLast=r==h.keys.length-1,l.isFirst=0==r,m.post&&m.post.call(h,l),o.pop()})),i.pop()),m.after&&m.after.call(h,h.node),h):h}(e).node}function r(e){if("object"==typeof e&&null!==e){var t;if(s(e))t=[];else if("[object Date]"===i(e))t=new Date(e.getTime?e.getTime():e);else if("[object RegExp]"===i(e))t=new RegExp(e);else if(function(e){return"[object Error]"===i(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===i(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===i(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===i(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},o=function(){};o.prototype=n,t=new o}return a(l(e),(function(n){t[n]=e[n]})),t}return e}n.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var o=e[n];if(!t||!c.call(t,o)){t=void 0;break}t=t[o]}return t},n.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var o=e[n];if(!t||!c.call(t,o))return!1;t=t[o]}return!0},n.prototype.set=function(e,t){for(var n=this.value,o=0;o<e.length-1;o++){var r=e[o];c.call(n,r)||(n[r]={}),n=n[r]}return n[e[o]]=t,t},n.prototype.map=function(e){return o(this.value,e,!0)},n.prototype.forEach=function(e){return this.value=o(this.value,e,!1),this.value},n.prototype.reduce=function(e,t){var n=1===arguments.length,o=n?this.value:t;return this.forEach((function(t){this.isRoot&&n||(o=e.call(this,o,t))})),o},n.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},n.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},n.prototype.clone=function(){var e=[],t=[];return function n(o){for(var i=0;i<e.length;i++)if(e[i]===o)return t[i];if("object"==typeof o&&null!==o){var s=r(o);return e.push(o),t.push(s),a(l(o),(function(e){s[e]=n(o[e])})),e.pop(),t.pop(),s}return o}(this.value)};var l=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function i(e){return Object.prototype.toString.call(e)}var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},a=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};a(l(n.prototype),(function(e){t[e]=function(t){var o=[].slice.call(arguments,1),r=new n(t);return r[e].apply(r,o)}}));var c=Object.hasOwnProperty||function(e,t){return t in e}},9196:e=>{"use strict";e.exports=window.React}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var l=t[o]={exports:{}};return e[o].call(l.exports,l,l.exports,n),l.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{AlignmentControl:()=>u_,AlignmentToolbar:()=>d_,Autocomplete:()=>E_,BlockAlignmentControl:()=>Ll,BlockAlignmentToolbar:()=>Rl,BlockBreadcrumb:()=>x_,BlockColorsStyleSelector:()=>M_,BlockContextProvider:()=>Kl,BlockControls:()=>ko,BlockEdit:()=>Zl,BlockEditorKeyboardShortcuts:()=>RC,BlockEditorProvider:()=>Fu,BlockFormatControls:()=>_o,BlockIcon:()=>Ru,BlockInspector:()=>IC,BlockList:()=>tf,BlockMover:()=>tg,BlockNavigationDropdown:()=>ek,BlockPreview:()=>vp,BlockSelectionClearer:()=>Gu,BlockSettingsMenu:()=>ph,BlockSettingsMenuControls:()=>sh,BlockStyles:()=>lk,BlockTitle:()=>Um,BlockToolbar:()=>yh,BlockTools:()=>NC,BlockVerticalAlignmentControl:()=>Yr,BlockVerticalAlignmentToolbar:()=>Qr,ButtonBlockAppender:()=>Pm,ButtonBlockerAppender:()=>Nm,ColorPalette:()=>Ek,ColorPaletteControl:()=>Ck,ContrastChecker:()=>Zf,CopyHandler:()=>Gg,DefaultBlockAppender:()=>xm,FontSizePicker:()=>Ov,InnerBlocks:()=>Qh,Inserter:()=>Im,InspectorAdvancedControls:()=>fr,InspectorControls:()=>vr,JustifyContentControl:()=>Jr,JustifyToolbar:()=>el,LineHeightControl:()=>_v,MediaPlaceholder:()=>gE,MediaReplaceFlow:()=>aE,MediaUpload:()=>rE,MediaUploadCheck:()=>lE,MultiSelectScrollIntoView:()=>AC,NavigableToolbar:()=>rg,ObserveTyping:()=>FC,PanelColorSettings:()=>hE,PlainText:()=>YE,RichText:()=>$E,RichTextShortcut:()=>XE,RichTextToolbarButton:()=>JE,SETTINGS_DEFAULTS:()=>v,SkipToSelectedBlock:()=>vC,ToolSelector:()=>nC,Typewriter:()=>UC,URLInput:()=>Cy,URLInputButton:()=>iC,URLPopover:()=>dE,Warning:()=>Jl,WritingFlow:()=>nd,__experimentalBlockAlignmentMatrixControl:()=>B_,__experimentalBlockFullHeightAligmentControl:()=>S_,__experimentalBlockPatternSetup:()=>vk,__experimentalBlockPatternsList:()=>Fp,__experimentalBlockVariationPicker:()=>sk,__experimentalBlockVariationTransforms:()=>kk,__experimentalBorderRadiusControl:()=>ff,__experimentalColorGradientControl:()=>$f,__experimentalColorGradientSettingsDropdown:()=>Qf,__experimentalDateFormatPicker:()=>Bk,__experimentalDuotoneControl:()=>Sb,__experimentalFontAppearanceControl:()=>bv,__experimentalFontFamilyControl:()=>Tv,__experimentalGetBorderClassesAndStyles:()=>Hb,__experimentalGetColorClassesAndStyles:()=>Ub,__experimentalGetElementClassName:()=>ZC,__experimentalGetGapCSSValue:()=>Vr,__experimentalGetGradientClass:()=>Af,__experimentalGetGradientObjectByGradientValue:()=>Of,__experimentalGetMatchingVariation:()=>JC,__experimentalGetSpacingClassesAndStyles:()=>$b,__experimentalImageEditingProvider:()=>ny,__experimentalImageEditor:()=>py,__experimentalImageSizeControl:()=>hy,__experimentalImageURLInputUI:()=>gC,__experimentalInspectorPopoverHeader:()=>qC,__experimentalLayoutStyle:()=>El,__experimentalLetterSpacingControl:()=>ib,__experimentalLibrary:()=>MC,__experimentalLinkControl:()=>eE,__experimentalLinkControlSearchInput:()=>jy,__experimentalLinkControlSearchItem:()=>My,__experimentalLinkControlSearchResults:()=>zy,__experimentalListView:()=>X_,__experimentalPanelColorGradientSettings:()=>Mk,__experimentalPreviewOptions:()=>hC,__experimentalPublishDateTimePicker:()=>YC,__experimentalRecursionProvider:()=>jC,__experimentalResponsiveBlockControl:()=>ZE,__experimentalSpacingSizesControl:()=>rr,__experimentalTextDecorationControl:()=>qv,__experimentalTextTransformControl:()=>nb,__experimentalUnitControl:()=>oC,__experimentalUseBlockOverlayActive:()=>Eu,__experimentalUseBlockPreview:()=>bp,__experimentalUseBorderProps:()=>Gb,__experimentalUseColorProps:()=>jb,__experimentalUseCustomSides:()=>Dr,__experimentalUseGradient:()=>Ff,__experimentalUseHasRecursion:()=>$C,__experimentalUseMultipleOriginColorsAndGradients:()=>Ef,__experimentalUseOnBlockDrop:()=>Vh,__experimentalUseResizeCanvas:()=>fC,__experimentaluseLayoutClasses:()=>Mb,__experimentaluseLayoutStyles:()=>Lb,__unstableBlockNameContext:()=>kh,__unstableBlockSettingsMenuFirstItem:()=>Yg,__unstableBlockToolbarLastItem:()=>Dg,__unstableDuotoneFilter:()=>dp,__unstableDuotoneStylesheet:()=>cp,__unstableDuotoneUnsetStylesheet:()=>up,__unstableEditorStyles:()=>sp,__unstableGetValuesFromColors:()=>ap,__unstableIframe:()=>ld,__unstableInserterMenuExtension:()=>fm,__unstablePresetDuotoneFilter:()=>pp,__unstableRichTextInputEvent:()=>eC,__unstableUseBlockSelectionClearer:()=>Hu,__unstableUseClipboardHandler:()=>Hg,__unstableUseMouseMoveTypingReset:()=>OC,__unstableUseTypewriter:()=>GC,__unstableUseTypingObserver:()=>zC,createCustomColorsHOC:()=>Jb,getColorClassName:()=>kf,getColorObjectByAttributeValues:()=>bf,getColorObjectByColorValue:()=>_f,getFontSize:()=>Rv,getFontSizeClass:()=>Dv,getFontSizeObjectByValue:()=>Av,getGradientSlugByValue:()=>zf,getGradientValueBySlug:()=>Df,getPxFromCssUnit:()=>cS,getTypographyClassesAndStyles:()=>Kb,store:()=>co,storeConfig:()=>ao,transformStyles:()=>rp,useBlockDisplayInformation:()=>Hm,useBlockEditContext:()=>go,useBlockProps:()=>Cu,useCachedTruthy:()=>qb,useInnerBlocksProps:()=>Yh,useSetting:()=>Yo,withColorContext:()=>yk,withColors:()=>e_,withFontSizes:()=>o_});var e={};n.r(e),n.d(e,{__experimentalGetActiveBlockIdByBlockNames:()=>Vt,__experimentalGetAllowedBlocks:()=>_t,__experimentalGetAllowedPatterns:()=>Ct,__experimentalGetBlockListSettingsForBlocks:()=>Tt,__experimentalGetDirectInsertBlock:()=>kt,__experimentalGetGlobalBlocksByName:()=>ee,__experimentalGetLastBlockAttributeChanges:()=>Mt,__experimentalGetParsedPattern:()=>yt,__experimentalGetPatternTransformItems:()=>wt,__experimentalGetPatternsByBlockTypes:()=>St,__experimentalGetReusableBlockTitle:()=>Nt,__unstableGetBlockWithoutInnerBlocks:()=>K,__unstableGetClientIdWithClientIdsTree:()=>Y,__unstableGetClientIdsTree:()=>Q,__unstableGetContentLockingParent:()=>Wt,__unstableGetEditorMode:()=>At,__unstableGetSelectedBlocksWithPartialSelection:()=>Re,__unstableGetTemporarilyEditingAsBlocks:()=>jt,__unstableGetVisibleBlocks:()=>Ut,__unstableHasActiveBlockOverlayActive:()=>$t,__unstableIsFullySelected:()=>Ne,__unstableIsLastBlockChangeIgnored:()=>Pt,__unstableIsSelectionCollapsed:()=>Pe,__unstableIsSelectionMergeable:()=>Le,__unstableIsWithinBlockOverlay:()=>Kt,__unstableSelectionHasUnmergeableBlock:()=>Me,areInnerBlocksControlled:()=>Ft,canEditBlock:()=>ct,canInsertBlockType:()=>ot,canInsertBlocks:()=>rt,canLockBlockType:()=>ut,canMoveBlock:()=>st,canMoveBlocks:()=>at,canRemoveBlock:()=>lt,canRemoveBlocks:()=>it,didAutomaticChange:()=>Ot,getAdjacentBlockClientId:()=>fe,getBlock:()=>$,getBlockAttributes:()=>j,getBlockCount:()=>ne,getBlockHierarchyRootClientId:()=>ge,getBlockIndex:()=>De,getBlockInsertionPoint:()=>Qe,getBlockListSettings:()=>Bt,getBlockMode:()=>Ue,getBlockName:()=>U,getBlockOrder:()=>Ae,getBlockParents:()=>pe,getBlockParentsByBlockName:()=>me,getBlockRootClientId:()=>de,getBlockSelectionEnd:()=>ie,getBlockSelectionStart:()=>le,getBlockTransformItems:()=>vt,getBlocks:()=>q,getBlocksByClientId:()=>te,getClientIdsOfDescendants:()=>Z,getClientIdsWithDescendants:()=>X,getDraggedBlockClientIds:()=>$e,getFirstMultiSelectedBlockClientId:()=>Ce,getGlobalBlockCount:()=>J,getInserterItems:()=>ft,getLastMultiSelectedBlockClientId:()=>Se,getLowestCommonAncestorWithSelectedBlock:()=>he,getMultiSelectedBlockClientIds:()=>ye,getMultiSelectedBlocks:()=>Ee,getMultiSelectedBlocksEndClientId:()=>Te,getMultiSelectedBlocksStartClientId:()=>xe,getNextBlockClientId:()=>be,getPreviousBlockClientId:()=>ve,getSelectedBlock:()=>ue,getSelectedBlockClientId:()=>ce,getSelectedBlockClientIds:()=>ke,getSelectedBlockCount:()=>se,getSelectedBlocksInitialCaretPosition:()=>_e,getSelectionEnd:()=>re,getSelectionStart:()=>oe,getSettings:()=>It,getTemplate:()=>Je,getTemplateLock:()=>et,hasBlockMovingClientId:()=>Dt,hasInserterItems:()=>bt,hasMultiSelection:()=>Ve,hasSelectedBlock:()=>ae,hasSelectedInnerBlock:()=>ze,isAncestorBeingDragged:()=>qe,isAncestorMultiSelected:()=>Ie,isBlockBeingDragged:()=>Ke,isBlockHighlighted:()=>zt,isBlockInsertionPointVisible:()=>Ze,isBlockMultiSelected:()=>Be,isBlockSelected:()=>Oe,isBlockValid:()=>W,isBlockVisible:()=>Gt,isBlockWithinSelection:()=>Fe,isCaretWithinFormattedText:()=>Ye,isDraggingBlocks:()=>je,isFirstMultiSelectedBlock:()=>we,isLastBlockChangePersistent:()=>xt,isMultiSelecting:()=>He,isNavigationMode:()=>Rt,isSelectionEnabled:()=>Ge,isTyping:()=>We,isValidTemplate:()=>Xe,wasBlockJustInserted:()=>Ht});var t={};n.r(t),n.d(t,{__unstableDeleteSelection:()=>xn,__unstableExpandSelection:()=>Nn,__unstableMarkAutomaticChange:()=>Yn,__unstableMarkLastChangeAsPersistent:()=>Kn,__unstableMarkNextChangeAsNotPersistent:()=>qn,__unstableSaveReusableBlock:()=>$n,__unstableSetEditorMode:()=>Zn,__unstableSetTemporarilyEditingAsBlocks:()=>io,__unstableSplitSelection:()=>Tn,clearSelectedBlock:()=>dn,duplicateBlocks:()=>Jn,enterFormattedText:()=>Vn,exitFormattedText:()=>Hn,flashBlock:()=>oo,hideInsertionPoint:()=>wn,insertAfterBlock:()=>to,insertBeforeBlock:()=>eo,insertBlock:()=>En,insertBlocks:()=>Cn,insertDefaultBlock:()=>Un,mergeBlocks:()=>Pn,moveBlockToPosition:()=>yn,moveBlocksDown:()=>vn,moveBlocksToPosition:()=>kn,moveBlocksUp:()=>bn,multiSelect:()=>un,receiveBlocks:()=>tn,removeBlock:()=>Ln,removeBlocks:()=>Mn,replaceBlock:()=>hn,replaceBlocks:()=>gn,replaceInnerBlocks:()=>Rn,resetBlocks:()=>Xt,resetSelection:()=>en,selectBlock:()=>rn,selectNextBlock:()=>sn,selectPreviousBlock:()=>ln,selectionChange:()=>Gn,setBlockMovingClientId:()=>Xn,setBlockVisibility:()=>lo,setHasControlledInnerBlocks:()=>ro,setNavigationMode:()=>Qn,setTemplateValidity:()=>Bn,showInsertionPoint:()=>Sn,startDraggingBlocks:()=>zn,startMultiSelect:()=>an,startTyping:()=>Dn,stopDraggingBlocks:()=>Fn,stopMultiSelect:()=>cn,stopTyping:()=>On,synchronizeTemplate:()=>In,toggleBlockHighlight:()=>no,toggleBlockMode:()=>An,toggleSelection:()=>pn,updateBlock:()=>on,updateBlockAttributes:()=>nn,updateBlockListSettings:()=>Wn,updateSettings:()=>jn,validateBlocksToTemplate:()=>Jt});const r=window.wp.blocks,l=window.wp.hooks;function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},i.apply(this,arguments)}(0,l.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",(function(e){const{apiVersion:t=1}=e;return t<2&&(0,r.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}));const s=window.wp.element;var a=n(4403),c=n.n(a);const u=window.lodash,d=window.wp.compose,p=window.wp.data,m=window.wp.components,g={default:(0,m.createSlotFill)("BlockControls"),block:(0,m.createSlotFill)("BlockControlsBlock"),inline:(0,m.createSlotFill)("BlockFormatControls"),other:(0,m.createSlotFill)("BlockControlsOther"),parent:(0,m.createSlotFill)("BlockControlsParent")},h=window.wp.i18n,f={insertUsage:{}},v={alignWide:!1,supportsLayout:!0,colors:[{name:(0,h.__)("Black"),slug:"black",color:"#000000"},{name:(0,h.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,h.__)("White"),slug:"white",color:"#ffffff"},{name:(0,h.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,h.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,h.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,h.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,h.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,h.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,h.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,h.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,h.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,h._x)("Small","font size name"),size:13,slug:"small"},{name:(0,h._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,h._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,h._x)("Large","font size name"),size:36,slug:"large"},{name:(0,h._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,h.__)("Thumbnail")},{slug:"medium",name:(0,h.__)("Medium")},{slug:"large",name:(0,h.__)("Large")},{slug:"full",name:(0,h.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,canLockBlocks:!0,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__unstableGalleryWithImageBlocks:!1,generateAnchors:!1,gradients:[{name:(0,h.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:(0,h.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:(0,h.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:(0,h.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:(0,h.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:(0,h.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:(0,h.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,h.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:(0,h.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:(0,h.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:(0,h.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,h.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function b(e,t,n){return[...e.slice(0,n),...(0,u.castArray)(t),...e.slice(n)]}function _(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const r=[...e];return r.splice(t,o),b(r,e.slice(t,t+o),n)}const k=e=>e;function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n={[t]:[]};return e.forEach((e=>{const{clientId:o,innerBlocks:r}=e;n[t].push(o),Object.assign(n,y(r,o))})),n}function E(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce(((e,n)=>Object.assign(e,{[n.clientId]:t},E(n.innerBlocks,n.clientId))),{})}function C(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:k;const n={},o=[...e];for(;o.length;){const{innerBlocks:e,...r}=o.shift();o.push(...e),n[r.clientId]=t(r)}return n}function S(e){return C(e,(e=>(0,u.omit)(e,"attributes")))}function w(e){return C(e,(e=>e.attributes))}function B(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&(0,u.isEqual)(e.clientIds,t.clientIds)&&function(e,t){return(0,u.isEqual)(Object.keys(e),Object.keys(t))}(e.attributes,t.attributes)}function I(e,t){const n={},o=[...t],r=[...t];for(;o.length;){const e=o.shift();o.push(...e.innerBlocks),r.push(...e.innerBlocks)}for(const e of r)n[e.clientId]={};for(const t of r)n[t.clientId]=Object.assign(n[t.clientId],{...e.byClientId[t.clientId],attributes:e.attributes[t.clientId],innerBlocks:t.innerBlocks.map((e=>n[e.clientId]))});return n}function x(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=new Set([]),l=new Set;for(const t of n){let n=o?t:e.parents[t];do{if(e.controlledInnerBlocks[n]){l.add(n);break}r.add(n),n=e.parents[n]}while(void 0!==n)}for(const e of r)t[e]={...t[e]};for(const n of r)t[n].innerBlocks=(e.order[n]||[]).map((e=>t[e]));for(const n of l)t["controlled||"+n]={innerBlocks:(e.order[n]||[]).map((e=>t[e]))};return t}const T=(0,d.pipe)(p.combineReducers,(e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:o}=n;if(e===o)return t;(t={...t}).attributes=(0,u.mapValues)(t.attributes,((n,r)=>{const{name:l}=t.byClientId[r];return"core/block"===l&&n.ref===e?{...n,ref:o}:n}))}return e(t,n)}),(e=>function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const o=e(t,n);if(o===t)return t;switch(o.tree=t.tree?t.tree:{},n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const e=I(o,n.blocks);o.tree=x(o,{...o.tree,...e},n.rootClientId?[n.rootClientId]:[""],!0);break}case"UPDATE_BLOCK":o.tree=x(o,{...o.tree,[n.clientId]:{...o.tree[n.clientId],...o.byClientId[n.clientId],attributes:o.attributes[n.clientId]}},[n.clientId],!1);break;case"UPDATE_BLOCK_ATTRIBUTES":{const e=n.clientIds.reduce(((e,t)=>(e[t]={...o.tree[t],attributes:o.attributes[t]},e)),{});o.tree=x(o,{...o.tree,...e},n.clientIds,!1);break}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=I(o,n.blocks);o.tree=x(o,{...(0,u.omit)(o.tree,n.replacedClientIds.concat(n.replacedClientIds.filter((t=>!e[t])).map((e=>"controlled||"+e)))),...e},n.blocks.map((e=>e.clientId)),!1);const r=[];for(const e of n.clientIds)void 0===t.parents[e]||""!==t.parents[e]&&!o.byClientId[t.parents[e]]||r.push(t.parents[e]);o.tree=x(o,o.tree,r,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const r of n.clientIds)void 0===t.parents[r]||""!==t.parents[r]&&!o.byClientId[t.parents[r]]||e.push(t.parents[r]);o.tree=x(o,(0,u.omit)(o.tree,n.removedClientIds.concat(n.removedClientIds.map((e=>"controlled||"+e)))),e,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const e=[];n.fromRootClientId?e.push(n.fromRootClientId):e.push(""),n.toRootClientId&&e.push(n.toRootClientId),o.tree=x(o,o.tree,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];o.tree=x(o,o.tree,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=Object.keys((0,u.omitBy)(o.attributes,((e,t)=>"core/block"!==o.byClientId[t].name||e.ref!==n.updatedId)));o.tree=x(o,{...o.tree,...e.reduce(((e,t)=>(e[t]={...o.byClientId[t],attributes:o.attributes[t],innerBlocks:o.tree[t].innerBlocks},e)),{})},e,!1)}}return o}),(e=>(t,n)=>{const o=e=>{let o=e;for(let r=0;r<o.length;r++)!t.order[o[r]]||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[o[r]]||(o===e&&(o=[...o]),o.push(...t.order[o[r]]));return o};if(t)switch(n.type){case"REMOVE_BLOCKS":n={...n,type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:o(n.clientIds)};break;case"REPLACE_BLOCKS":n={...n,type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:o(n.clientIds)}}return e(t,n)}),(e=>(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const o={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...r}=e.shift();e.push(...n),t.controlledInnerBlocks[r.clientId]&&(o[r.clientId]=!0)}}let r=t;t.order[n.rootClientId]&&(r=e(r,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:o,clientIds:t.order[n.rootClientId]}));let l=r;return n.blocks.length&&(l=e(l,{...n,type:"INSERT_BLOCKS",index:0}),l.order={...l.order,...(0,u.reduce)(o,((e,n,o)=>(t.order[o]&&(e[o]=t.order[o]),e)),{})},l.tree={...l.tree,...(0,u.reduce)(o,((e,n,o)=>{const r=`controlled||${o}`;return t.tree[r]&&(e[r]=t.tree[r]),e}),{})}),l}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:S(n.blocks),attributes:w(n.blocks),order:y(n.blocks),parents:E(n.blocks),controlledInnerBlocks:{}},o=I(e,n.blocks);return e.tree={...o,"":{innerBlocks:n.blocks.map((e=>o[e.clientId]))}},e}return e(t,n)}),(function(e){let t,n=!1;return(o,r)=>{let l=e(o,r);const i="MARK_LAST_CHANGE_AS_PERSISTENT"===r.type||n;if(o===l&&!i){var s;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===r.type;const e=null===(s=null==o?void 0:o.isPersistentChange)||void 0===s||s;return o.isPersistentChange===e?o:{...l,isPersistentChange:e}}return l={...l,isPersistentChange:i?!n:!B(r,t)},t=r,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===r.type,l}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,o)=>{const r=e(n,o);return r!==n&&(r.isIgnoredChange=t.has(o.type)),r}}),(e=>(t,n)=>{if("SET_HAS_CONTROLLED_INNER_BLOCKS"===n.type){const o=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:n.clientId,blocks:[]});return e(o,n)}return e(t,n)}))({byClientId(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...S(t.blocks)};case"UPDATE_BLOCK":if(!e[t.clientId])return e;const n=(0,u.omit)(t.updates,"attributes");return(0,u.isEmpty)(n)?e:{...e,[t.clientId]:{...e[t.clientId],...n}};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,u.omit)(e,t.replacedClientIds),...S(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},attributes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return{...e,...w(t.blocks)};case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?{...e,[t.clientId]:{...e[t.clientId],...t.updates.attributes}}:e;case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e[t])))return e;const n=t.clientIds.reduce(((n,o)=>({...n,[o]:(0,u.reduce)(t.uniqueByBlock?t.attributes[o]:t.attributes,((t,n,r)=>{var l,i;return n!==t[r]&&((t=(l=e[o])===(i=t)?{...l}:i)[r]=n),t}),e[o])})),{});return t.clientIds.every((t=>n[t]===e[t]))?e:{...e,...n}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?{...(0,u.omit)(e,t.replacedClientIds),...w(t.blocks)}:e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},order(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":{const n=y(t.blocks);return{...e,...(0,u.omit)(n,""),"":((null==e?void 0:e[""])||[]).concat(n[""])}}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,o=e[n]||[],r=y(t.blocks,n),{index:l=o.length}=t;return{...e,...r,[n]:b(o,r[n],l)}}case"MOVE_BLOCKS_TO_POSITION":{const{fromRootClientId:n="",toRootClientId:o="",clientIds:r}=t,{index:l=e[o].length}=t;if(n===o){const t=e[o].indexOf(r[0]);return{...e,[o]:_(e[o],t,l,r.length)}}return{...e,[n]:(0,u.without)(e[n],...r),[o]:b(e[o],r,l)}}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],l=e[o];if(!l.length||r===l[0])return e;const i=l.indexOf(r);return{...e,[o]:_(l,i,i-1,n.length)}}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],l=n[n.length-1],i=e[o];if(!i.length||l===i[i.length-1])return e;const s=i.indexOf(r);return{...e,[o]:_(i,s,s+1,n.length)}}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const o=y(t.blocks);return(0,d.pipe)([e=>(0,u.omit)(e,t.replacedClientIds),e=>({...e,...(0,u.omit)(o,"")}),e=>(0,u.mapValues)(e,(e=>(0,u.reduce)(e,((e,t)=>t===n[0]?[...e,...o[""]]:(-1===n.indexOf(t)&&e.push(t),e)),[])))])(e)}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,d.pipe)([e=>(0,u.omit)(e,t.removedClientIds),e=>(0,u.mapValues)(e,(e=>(0,u.without)(e,...t.removedClientIds)))])(e)}return e},parents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_BLOCKS":return{...e,...E(t.blocks)};case"INSERT_BLOCKS":return{...e,...E(t.blocks,t.rootClientId||"")};case"MOVE_BLOCKS_TO_POSITION":return{...e,...t.clientIds.reduce(((e,n)=>(e[n]=t.toRootClientId||"",e)),{})};case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return{...(0,u.omit)(e,t.replacedClientIds),...E(t.blocks,e[t.clientIds[0]])};case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return(0,u.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,clientId:n,hasControlledInnerBlocks:o}=arguments.length>1?arguments[1]:void 0;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:o}:e}});function N(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":{if(-1===t.clientIds.indexOf(e.clientId))return e;const n=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return n?n.clientId===e.clientId?e:{clientId:n.clientId}:{}}}return e}const P=(0,p.combineReducers)({blocks:T,isTyping:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},selection:function(){var e,t,n,o;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l=arguments.length>1?arguments[1]:void 0;switch(l.type){case"SELECTION_CHANGE":return l.clientId?{selectionStart:{clientId:l.clientId,attributeKey:l.attributeKey,offset:l.startOffset},selectionEnd:{clientId:l.clientId,attributeKey:l.attributeKey,offset:l.endOffset}}:{selectionStart:l.start||r.selectionStart,selectionEnd:l.end||r.selectionEnd};case"RESET_SELECTION":const{selectionStart:i,selectionEnd:s}=l;return{selectionStart:i,selectionEnd:s};case"MULTI_SELECT":const{start:a,end:c}=l;return a===(null===(e=r.selectionStart)||void 0===e?void 0:e.clientId)&&c===(null===(t=r.selectionEnd)||void 0===t?void 0:t.clientId)?r:{selectionStart:{clientId:a},selectionEnd:{clientId:c}};case"RESET_BLOCKS":const u=null==r||null===(n=r.selectionStart)||void 0===n?void 0:n.clientId,d=null==r||null===(o=r.selectionEnd)||void 0===o?void 0:o.clientId;if(!u&&!d)return r;if(!l.blocks.some((e=>e.clientId===u)))return{selectionStart:{},selectionEnd:{}};if(!l.blocks.some((e=>e.clientId===d)))return{...r,selectionEnd:r.selectionStart}}return{selectionStart:N(r.selectionStart,l),selectionEnd:N(r.selectionEnd,l)}},isMultiSelecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;return"TOGGLE_SELECTION"===t.type?t.isSelectionEnabled:e},initialPosition:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["MULTI_SELECT","SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return(0,u.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":{const{clientId:n}=t;return t.settings?(0,u.isEqual)(e[n],t.settings)?e:{...e,[n]:t.settings}:e.hasOwnProperty(n)?(0,u.omit)(e,n):e}}return e},insertionPoint:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":const{rootClientId:e,index:n,__unstableWithInserter:o}=t;return{rootClientId:e,index:n,__unstableWithInserter:o};case"HIDE_INSERTION_POINT":return null}return e},template:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0;return"UPDATE_SETTINGS"===t.type?{...e,...t.settings}:e},preferences:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce(((e,n)=>{const{attributes:o,name:l}=n,i=(0,p.select)(r.store).getActiveBlockVariation(l,o);let s=null!=i&&i.name?`${l}/${i.name}`:l;const a={name:s};return"core/block"===l&&(a.ref=o.ref,s+="/"+o.ref),{...e,insertUsage:{...e.insertUsage,[s]:{time:t.time,count:e.insertUsage[s]?e.insertUsage[s].count+1:1,insert:a}}}}),e)}return e},lastBlockAttributesChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return{[t.clientId]:t.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce(((e,n)=>({...e,[n]:t.uniqueByBlock?t.attributes[n]:t.attributes})),{})}return e},editorMode:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"edit",t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"===t.type&&"navigation"===e?"edit":"SET_EDITOR_MODE"===t.type?t.mode:e},hasBlockMovingClientId:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_EDITOR_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"SET_BLOCK_VISIBILITY":case"START_TYPING":case"STOP_TYPING":case"UPDATE_BLOCK_LIST_SETTINGS":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:o}=t;return o?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INSERT_BLOCKS":return n.blocks.length?{clientId:n.blocks[0].clientId,source:null===(e=n.meta)||void 0===e?void 0:e.source}:t;case"RESET_BLOCKS":return{}}return t},temporarilyEditingAsBlocks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.temporarilyEditingAsBlocks:e},blockVisibility:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_VISIBILITY"===t.type?{...e,...t.updates}:e}});var M={};function L(e){return[e]}function R(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}function A(e,t){var n,o=t||L;function r(e){var t,o,r,l,i,s=n,a=!0;for(t=0;t<e.length;t++){if(!(i=o=e[t])||"object"!=typeof i){a=!1;break}s.has(o)?s=s.get(o):(r=new WeakMap,s.set(o,r),s=r)}return s.has(M)||((l=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=a,s.set(M,l)),s.get(M)}function l(){n=new WeakMap}function i(){var t,n,l,i,s,a=arguments.length;for(i=new Array(a),l=0;l<a;l++)i[l]=arguments[l];for((t=r(s=o.apply(null,i))).isUniqueByDependants||(t.lastDependants&&!R(s,t.lastDependants,0)&&t.clear(),t.lastDependants=s),n=t.head;n;){if(R(n.args,i,1))return n!==t.head&&(n.prev.next=n.next,n.next&&(n.next.prev=n.prev),n.next=t.head,n.prev=null,t.head.prev=n,t.head=n),n.val;n=n.next}return n={val:e.apply(null,i)},i[0]=null,n.args=i,t.head&&(t.head.prev=n,n.next=t.head),t.head=n,n.val}return i.getDependants=o,i.clear=l,l(),i}const D=window.wp.primitives,O=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})),z=window.wp.richText,F=window.wp.deprecated;var V=n.n(F);function H(e){const{multiline:t,__unstableMultilineWrapperTags:n,__unstablePreserveWhiteSpace:o}=e;return{multilineTag:t,multilineWrapperTags:n,preserveWhiteSpace:o}}const G=[];function U(e,t){const n=e.blocks.byClientId[t],o="core/social-link";if("web"!==s.Platform.OS&&(null==n?void 0:n.name)===o){const n=e.blocks.attributes[t],{service:r}=n;return r?`core/social-link-${r}`:o}return n?n.name:null}function W(e,t){const n=e.blocks.byClientId[t];return!!n&&n.isValid}function j(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}function $(e,t){return e.blocks.byClientId[t]?e.blocks.tree[t]:null}const K=A(((e,t)=>{const n=e.blocks.byClientId[t];return n?{...n,attributes:j(e,t)}:null}),((e,t)=>[e.blocks.byClientId[t],e.blocks.attributes[t]]));function q(e,t){var n;const o=t&&Ft(e,t)?"controlled||"+t:t||"";return(null===(n=e.blocks.tree[o])||void 0===n?void 0:n.innerBlocks)||G}const Y=A(((e,t)=>({clientId:t,innerBlocks:Q(e,t)})),(e=>[e.blocks.order])),Q=A((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,u.map)(Ae(e,t),(t=>Y(e,t)))}),(e=>[e.blocks.order])),Z=A(((e,t)=>{const n=[];for(const o of t)for(const t of Ae(e,o))n.push(t,...Z(e,[t]));return n}),(e=>[e.blocks.order])),X=A((e=>{const t=[];for(const n of Ae(e))t.push(n,...Z(e,[n]));return t}),(e=>[e.blocks.order])),J=A(((e,t)=>{const n=X(e);return t?(0,u.reduce)(n,((n,o)=>e.blocks.byClientId[o].name===t?n+1:n),0):n.length}),(e=>[e.blocks.order,e.blocks.byClientId])),ee=A(((e,t)=>{if(!t)return G;const n=X(e).filter((n=>e.blocks.byClientId[n].name===t));return n.length>0?n:G}),(e=>[e.blocks.order,e.blocks.byClientId])),te=A(((e,t)=>(0,u.map)((0,u.castArray)(t),(t=>$(e,t)))),((e,t)=>(0,u.map)((0,u.castArray)(t),(t=>e.blocks.tree[t]))));function ne(e,t){return Ae(e,t).length}function oe(e){return e.selection.selectionStart}function re(e){return e.selection.selectionEnd}function le(e){return e.selection.selectionStart.clientId}function ie(e){return e.selection.selectionEnd.clientId}function se(e){return ye(e).length||(e.selection.selectionStart.clientId?1:0)}function ae(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function ce(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function ue(e){const t=ce(e);return t?$(e,t):null}function de(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}const pe=A((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=[];let r=t;for(;e.blocks.parents[r];)r=e.blocks.parents[r],o.push(r);return n?o:o.reverse()}),(e=>[e.blocks.parents])),me=A((function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=pe(e,t,o);return(0,u.map)((0,u.filter)((0,u.map)(r,(t=>({id:t,name:U(e,t)}))),(e=>{let{name:t}=e;return Array.isArray(n)?n.includes(t):t===n})),(e=>{let{id:t}=e;return t}))}),(e=>[e.blocks.parents]));function ge(e,t){let n,o=t;do{n=o,o=e.blocks.parents[o]}while(o);return n}function he(e,t){const n=ce(e),o=[...pe(e,t),t],r=[...pe(e,n),n];let l;const i=Math.min(o.length,r.length);for(let e=0;e<i&&o[e]===r[e];e++)l=o[e];return l}function fe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=ce(e)),void 0===t&&(t=n<0?Ce(e):Se(e)),!t)return null;const o=de(e,t);if(null===o)return null;const{order:r}=e.blocks,l=r[o],i=l.indexOf(t),s=i+1*n;return s<0||s===l.length?null:l[s]}function ve(e,t){return fe(e,t,-1)}function be(e,t){return fe(e,t,1)}function _e(e){return e.initialPosition}const ke=A((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(void 0===t.clientId||void 0===n.clientId)return G;if(t.clientId===n.clientId)return[t.clientId];const o=de(e,t.clientId);if(null===o)return G;const r=Ae(e,o),l=r.indexOf(t.clientId),i=r.indexOf(n.clientId);return l>i?r.slice(i,l+1):r.slice(l,i+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function ye(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?G:ke(e)}const Ee=A((e=>{const t=ye(e);return t.length?t.map((t=>$(e,t))):G}),(e=>[...ke.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function Ce(e){return ye(e)[0]||null}function Se(e){const t=ye(e);return t[t.length-1]||null}function we(e,t){return Ce(e)===t}function Be(e,t){return-1!==ye(e).indexOf(t)}const Ie=A(((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=de(e,n),o=Be(e,n);return o}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function xe(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function Te(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function Ne(e){const t=oe(e),n=re(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function Pe(e){const t=oe(e),n=re(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function Me(e){return ke(e).some((t=>{const n=U(e,t);return!(0,r.getBlockType)(n).merge}))}function Le(e,t){const n=oe(e),o=re(e);if(n.clientId===o.clientId)return!1;if(!n.attributeKey||!o.attributeKey||void 0===n.offset||void 0===o.offset)return!1;const l=de(e,n.clientId);if(l!==de(e,o.clientId))return!1;const i=Ae(e,l);let s,a;i.indexOf(n.clientId)>i.indexOf(o.clientId)?(s=o,a=n):(s=n,a=o);const c=t?a.clientId:s.clientId,u=t?s.clientId:a.clientId,d=U(e,c);if(!(0,r.getBlockType)(d).merge)return!1;const p=$(e,u);if(p.name===d)return!0;const m=(0,r.switchToBlockType)(p,d);return m&&m.length}const Re=e=>{const t=oe(e),n=re(e);if(t.clientId===n.clientId)return G;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return G;const o=de(e,t.clientId);if(o!==de(e,n.clientId))return G;const l=Ae(e,o),i=l.indexOf(t.clientId),s=l.indexOf(n.clientId),[a,c]=i>s?[n,t]:[t,n],u=$(e,a.clientId),d=(0,r.getBlockType)(u.name),p=$(e,c.clientId),m=(0,r.getBlockType)(p.name),g=u.attributes[a.attributeKey],h=p.attributes[c.attributeKey],f=d.attributes[a.attributeKey],v=m.attributes[c.attributeKey];let b=(0,z.create)({html:g,...H(f)}),_=(0,z.create)({html:h,...H(v)});return b=(0,z.remove)(b,0,a.offset),_=(0,z.remove)(_,c.offset,_.text.length),[{...u,attributes:{...u.attributes,[a.attributeKey]:(0,z.toHTMLString)({value:b,...H(f)})}},{...p,attributes:{...p.attributes,[c.attributeKey]:(0,z.toHTMLString)({value:_,...H(v)})}}]};function Ae(e,t){return e.blocks.order[t||""]||G}function De(e,t){return Ae(e,de(e,t)).indexOf(t)}function Oe(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function ze(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,u.some)(Ae(e,t),(t=>Oe(e,t)||Be(e,t)||n&&ze(e,t,n)))}function Fe(e,t){if(!t)return!1;const n=ye(e),o=n.indexOf(t);return o>-1&&o<n.length-1}function Ve(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId!==n.clientId}function He(e){return e.isMultiSelecting}function Ge(e){return e.isSelectionEnabled}function Ue(e,t){return e.blocksMode[t]||"visual"}function We(e){return e.isTyping}function je(e){return!!e.draggedBlocks.length}function $e(e){return e.draggedBlocks}function Ke(e,t){return e.draggedBlocks.includes(t)}function qe(e,t){if(!je(e))return!1;const n=pe(e,t);return(0,u.some)(n,(t=>Ke(e,t)))}function Ye(){return V()('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}function Qe(e){let t,n;const{insertionPoint:o,selection:{selectionEnd:r}}=e;if(null!==o)return o;const{clientId:l}=r;return l?(t=de(e,l)||void 0,n=De(e,r.clientId)+1):n=Ae(e).length,{rootClientId:t,index:n}}function Ze(e){return null!==e.insertionPoint}function Xe(e){return e.template.isValid}function Je(e){return e.settings.template}function et(e,t){if(!t)return e.settings.templateLock;const n=Bt(e,t);return n?n.templateLock:void 0}const tt=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return"boolean"==typeof e?e:Array.isArray(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},nt=function(e,t){let n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t&&"object"==typeof t?(n=t,t=n.name):n=(0,r.getBlockType)(t),!n)return!1;const{allowedBlockTypes:i}=It(e),s=tt(i,t,!0);if(!s)return!1;const a=!!et(e,o);if(a)return!1;const c=Bt(e,o);if(o&&void 0===c)return!1;const d=null==c?void 0:c.allowedBlocks,p=tt(d,t),m=n.parent,g=U(e,o),h=tt(m,g);let f=!0;const v=n.ancestor;if(v){const t=[o,...pe(e,o)];f=(0,u.some)(t,(t=>tt(v,U(e,t))))}const b=f&&(null===p&&null===h||!0===p||!0===h);return b?(0,l.applyFilters)("blockEditor.__unstableCanInsertBlockType",b,n,o,{getBlock:$.bind(null,e),getBlockParentsByBlockName:me.bind(null,e)}):b},ot=A(nt,((e,t,n)=>[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]));function rt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>ot(e,U(e,t),n)))}function lt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=j(e,t);if(null===o)return!0;const{lock:r}=o,l=!!et(e,n);return void 0===r||void 0===(null==r?void 0:r.remove)?!l:!(null!=r&&r.remove)}function it(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>lt(e,t,n)))}function st(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const o=j(e,t);if(null===o)return;const{lock:r}=o,l="all"===et(e,n);return void 0===r||void 0===(null==r?void 0:r.move)?!l:!(null!=r&&r.move)}function at(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((t=>st(e,t,n)))}function ct(e,t){const n=j(e,t);if(null===n)return!0;const{lock:o}=n;return!(null!=o&&o.edit)}function ut(e,t){var n;return!!(0,r.hasBlockSupport)(t,"lock",!0)&&!(null===(n=e.settings)||void 0===n||!n.canLockBlocks)}function dt(e,t){var n,o;return null!==(n=null===(o=e.preferences.insertUsage)||void 0===o?void 0:o[t])&&void 0!==n?n:null}const pt=(e,t,n)=>!!(0,r.hasBlockSupport)(t,"inserter",!0)&&nt(e,t.name,n),mt=(e,t)=>n=>{const o=`${t.id}/${n.name}`,{time:r,count:l=0}=dt(e,o)||{};return{...t,id:o,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:{...t.initialAttributes,...n.attributes},innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:gt(r,l)}},gt=(e,t)=>{if(!e)return t;const n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},ht=(e,t)=>{let{buildScope:n="inserter"}=t;return t=>{const o=t.name;let l=!1;(0,r.hasBlockSupport)(t.name,"multiple",!0)||(l=(0,u.some)(te(e,X(e)),{name:t.name}));const{time:i,count:s=0}=dt(e,o)||{},a={id:o,name:t.name,title:t.title,icon:t.icon,isDisabled:l,frecency:gt(i,s)};if("transform"===n)return a;const c=(0,r.getBlockVariations)(t.name,"inserter");return{...a,initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:c,example:t.example,utility:1}}},ft=A((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=ht(e,{buildScope:"inserter"}),o=/^\s*<!--\s+(\/)?wp:([a-z][a-z0-9_-]*\/)?([a-z][a-z0-9_-]*)\s+({(?:(?=([^}]+|}+(?=})|(?!}\s+\/?-->)[^])*)\5|[^]*?)}\s+)?(\/)?-->/,l=t=>{let n=O;if("web"===s.Platform.OS){const e=("string"==typeof t.content.raw?t.content.raw:t.content).match(o);if(e){const[,,t="core/",o]=e,l=(0,r.getBlockType)(t+o);l&&(n=l.icon)}}const l=`core/block/${t.id}`,{time:i,count:a=0}=dt(e,l)||{},c=gt(i,a);return{id:l,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:c}},i=(0,r.getBlockTypes)().filter((n=>pt(e,n,t))).map(n),a=nt(e,"core/block",t)?Lt(e).map(l):[],c=i.reduce(((t,n)=>{const{variations:o=[]}=n;if(o.some((e=>{let{isDefault:t}=e;return t}))||t.push(n),o.length){const r=mt(e,n);t.push(...o.map(r))}return t}),[]),u=(e,t)=>{const{core:n,noncore:o}=e;return(t.name.startsWith("core/")?n:o).push(t),e},{core:d,noncore:p}=c.reduce(u,{core:[],noncore:[]}),m=[...d,...p];return[...m,...a]}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Lt(e),(0,r.getBlockTypes)()])),vt=A((function(e,t){var n;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const l=(0,u.castArray)(t),[i]=l,s=ht(e,{buildScope:"transform"}),a=(0,r.getBlockTypes)().filter((t=>pt(e,t,o))).map(s),c=Object.fromEntries(Object.entries(a).map((e=>{let[,t]=e;return[t.name,t]})));c["*"]={frecency:1/0,id:"*",isDisabled:!1,name:"*",title:(0,h.__)("Unwrap"),icon:null===(n=c[null==i?void 0:i.name])||void 0===n?void 0:n.icon};const d=(0,r.getPossibleBlockTransformations)(l).reduce(((e,t)=>("*"===t?e.push(c["*"]):c[null==t?void 0:t.name]&&e.push(c[t.name]),e)),[]);return(0,u.orderBy)(d,(e=>c[e.name].frecency),"desc")}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,(0,r.getBlockTypes)()])),bt=A((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(0,u.some)((0,r.getBlockTypes)(),(n=>pt(e,n,t)));if(n)return!0;const o=nt(e,"core/block",t)&&Lt(e).length>0;return o}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Lt(e),(0,r.getBlockTypes)()])),_t=A((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return(0,u.filter)((0,r.getBlockTypes)(),(n=>pt(e,n,t)))}),((e,t)=>[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,(0,r.getBlockTypes)()])),kt=A((function(e){var t,n;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!o)return;const r=null===(t=e.blockListSettings[o])||void 0===t?void 0:t.__experimentalDefaultBlock,l=null===(n=e.blockListSettings[o])||void 0===n?void 0:n.__experimentalDirectInsert;return r&&l?"function"==typeof l?l($(e,o))?r:null:r:void 0}),((e,t)=>[e.blockListSettings[t],e.blocks.tree[t]])),yt=A(((e,t)=>{const n=e.settings.__experimentalBlockPatterns.find((e=>{let{name:n}=e;return n===t}));return n?{...n,blocks:(0,r.parse)(n.content,{__unstableSkipMigrationLogs:!0})}:null}),(e=>[e.settings.__experimentalBlockPatterns])),Et=A((e=>{const t=e.settings.__experimentalBlockPatterns,{allowedBlockTypes:n}=It(e),o=t.filter((e=>{let{inserter:t=!0}=e;return!!t})).map((t=>{let{name:n}=t;return yt(e,n)})),r=o.filter((e=>{let{blocks:t}=e;return((e,t)=>{if("boolean"==typeof t)return t;const n=[...e];for(;n.length>0;){var o;const e=n.shift();if(!tt(t,e.name||e.blockName,!0))return!1;null===(o=e.innerBlocks)||void 0===o||o.forEach((e=>{n.push(e)}))}return!0})(t,n)}));return r}),(e=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes])),Ct=A((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=Et(e),o=(0,u.filter)(n,(n=>{let{blocks:o}=n;return o.every((n=>{let{name:o}=n;return ot(e,o,t)}))}));return o}),((e,t)=>[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId[t]])),St=A((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return G;const o=Ct(e,n),r=Array.isArray(t)?t:[t];return o.filter((e=>{var t,n;return null==e||null===(t=e.blockTypes)||void 0===t||null===(n=t.some)||void 0===n?void 0:n.call(t,(e=>r.includes(e)))}))}),((e,t)=>[...Ct.getDependants(e,t)])),wt=A((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return G;if(t.some((t=>{let{clientId:n,innerBlocks:o}=t;return o.length||Ft(e,n)})))return G;const o=Array.from(new Set(t.map((e=>{let{name:t}=e;return t}))));return St(e,o,n)}),((e,t)=>[...St.getDependants(e,t)]));function Bt(e,t){return e.blockListSettings[t]}function It(e){return e.settings}function xt(e){return e.blocks.isPersistentChange}const Tt=A((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})}),(e=>[e.blockListSettings])),Nt=A(((e,t)=>{var n;const o=(0,u.find)(Lt(e),(e=>e.id===t));return o?null===(n=o.title)||void 0===n?void 0:n.raw:null}),(e=>[Lt(e)]));function Pt(e){return e.blocks.isIgnoredChange}function Mt(e){return e.lastBlockAttributesChange}function Lt(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:G}function Rt(e){return"navigation"===e.editorMode}function At(e){return e.editorMode}function Dt(e){return e.hasBlockMovingClientId}function Ot(e){return!!e.automaticChangeStatus}function zt(e,t){return e.highlightedBlock===t}function Ft(e,t){return!!e.blocks.controlledInnerBlocks[t]}const Vt=A(((e,t)=>{if(!t.length)return null;const n=ce(e);if(t.includes(U(e,n)))return n;const o=ye(e),r=me(e,n||o[0],t);return r?r[r.length-1]:null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function Ht(e,t,n){const{lastBlockInserted:o}=e;return o.clientId===t&&o.source===n}function Gt(e,t){var n,o;return null===(n=null===(o=e.blockVisibility)||void 0===o?void 0:o[t])||void 0===n||n}const Ut=A((e=>new Set(Object.keys(e.blockVisibility).filter((t=>e.blockVisibility[t])))),(e=>[e.blockVisibility])),Wt=A(((e,t)=>{let n,o=t;for(;e.blocks.parents[o];)o=e.blocks.parents[o],"contentOnly"===et(e,o)&&(n=o);return n}),(e=>[e.blocks.parents,e.blockListSettings]));function jt(e){return e.temporarilyEditingAsBlocks}function $t(e,t){if(!ct(e,t))return!0;const n=At(e);if("zoom-out"===n&&t&&!de(e,t))return!0;const o=(0,r.hasBlockSupport)(U(e,t),"__experimentalDisableBlockOverlay",!1);return("navigation"===n||!o&&Ft(e,t))&&!Oe(e,t)&&!ze(e,t,!0)}function Kt(e,t){let n=e.blocks.parents[t];for(;n;){if($t(e,n))return!0;n=e.blocks.parents[n]}return!1}const qt=window.wp.a11y,Yt="";function Qt(e){if(e)return Object.keys(e).find((t=>{const n=e[t];return"string"==typeof n&&-1!==n.indexOf(Yt)}))}const Zt=e=>Array.isArray(e)?e:[e],Xt=e=>t=>{let{dispatch:n}=t;n({type:"RESET_BLOCKS",blocks:e}),n(Jt(e))},Jt=e=>t=>{let{select:n,dispatch:o}=t;const l=n.getTemplate(),i=n.getTemplateLock(),s=!l||"all"!==i||(0,r.doBlocksMatchTemplate)(e,l);if(s!==n.isValidTemplate())return o.setTemplateValidity(s),s};function en(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function tn(e){return V()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function nn(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Zt(e),attributes:t,uniqueByBlock:n}}function on(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function rn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}const ln=e=>t=>{let{select:n,dispatch:o}=t;const r=n.getPreviousBlockClientId(e);r&&o.selectBlock(r,-1)},sn=e=>t=>{let{select:n,dispatch:o}=t;const r=n.getNextBlockClientId(e);r&&o.selectBlock(r)};function an(){return{type:"START_MULTI_SELECT"}}function cn(){return{type:"STOP_MULTI_SELECT"}}const un=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return o=>{let{select:r,dispatch:l}=o;if(r.getBlockRootClientId(e)!==r.getBlockRootClientId(t))return;l({type:"MULTI_SELECT",start:e,end:t,initialPosition:n});const i=r.getSelectedBlockCount();(0,qt.speak)((0,h.sprintf)(
|
2 |
/* translators: %s: number of selected blocks */
|
3 |
+
(0,h._n)("%s block selected.","%s blocks selected.",i),i),"assertive")}};function dn(){return{type:"CLEAR_SELECTED_BLOCK"}}function pn(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function mn(e,t){var n,o;const l=null!==(n=null==t||null===(o=t.__experimentalPreferredStyleVariations)||void 0===o?void 0:o.value)&&void 0!==n?n:{};return e.map((e=>{var t;const n=e.name;if(!(0,r.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!l[n])return e;const o=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=o&&o.includes("is-style-"))return e;const{attributes:i={}}=e,s=l[n];return{...e,attributes:{...i,className:`${o||""} is-style-${s}`.trim()}}}))}const gn=function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4?arguments[4]:void 0;return l=>{let{select:i,dispatch:s}=l;e=Zt(e),t=mn(Zt(t),i.getSettings());const a=i.getBlockRootClientId(e[0]);for(let e=0;e<t.length;e++){const n=t[e];if(!i.canInsertBlockType(n.name,a))return}s({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:o,meta:r}),s((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:o}=t.getSettings();o||n.insertDefaultBlock()}))}};function hn(e,t){return gn(e,t)}const fn=e=>(t,n)=>o=>{let{select:r,dispatch:l}=o;r.canMoveBlocks(t,n)&&l({type:e,clientIds:Zt(t),rootClientId:n})},vn=fn("MOVE_BLOCKS_DOWN"),bn=fn("MOVE_BLOCKS_UP"),kn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3?arguments[3]:void 0;return r=>{let{select:l,dispatch:i}=r;if(l.canMoveBlocks(e,t)){if(t!==n){if(!l.canRemoveBlocks(e,t))return;if(!l.canInsertBlocks(e,n))return}i({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:o})}}};function yn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3?arguments[3]:void 0;return kn([e],t,n,o)}function En(e,t,n,o,r){return Cn([e],t,n,o,0,r)}const Cn=function(e,t,n){let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,l=arguments.length>5?arguments[5]:void 0;return i=>{let{select:s,dispatch:a}=i;null!==r&&"object"==typeof r&&(l=r,r=0,V()("meta argument in wp.data.dispatch('core/block-editor')",{since:"5.8",hint:"The meta argument is now the 6th argument of the function"})),e=mn(Zt(e),s.getSettings());const c=[];for(const t of e)s.canInsertBlockType(t.name,n)&&c.push(t);c.length&&a({type:"INSERT_BLOCKS",blocks:c,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?r:null,meta:l})}};function Sn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{__unstableWithInserter:o}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:o}}function wn(){return{type:"HIDE_INSERTION_POINT"}}function Bn(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const In=()=>e=>{let{select:t,dispatch:n}=e;n({type:"SYNCHRONIZE_TEMPLATE"});const o=t.getBlocks(),l=t.getTemplate(),i=(0,r.synchronizeBlocksWithTemplate)(o,l);n.resetBlocks(i)},xn=e=>t=>{let{registry:n,select:o,dispatch:l}=t;const i=o.getSelectionStart(),s=o.getSelectionEnd();if(i.clientId===s.clientId)return;if(!i.attributeKey||!s.attributeKey||void 0===i.offset||void 0===s.offset)return!1;const a=o.getBlockRootClientId(i.clientId);if(a!==o.getBlockRootClientId(s.clientId))return;const c=o.getBlockOrder(a);let u,d;c.indexOf(i.clientId)>c.indexOf(s.clientId)?(u=s,d=i):(u=i,d=s);const p=e?d:u,m=o.getBlock(p.clientId),g=(0,r.getBlockType)(m.name);if(!g.merge)return;const h=u,f=d,v=o.getBlock(h.clientId),b=(0,r.getBlockType)(v.name),_=o.getBlock(f.clientId),k=(0,r.getBlockType)(_.name),y=v.attributes[h.attributeKey],E=_.attributes[f.attributeKey],C=b.attributes[h.attributeKey],S=k.attributes[f.attributeKey];let w=(0,z.create)({html:y,...H(C)}),B=(0,z.create)({html:E,...H(S)});w=(0,z.remove)(w,h.offset,w.text.length),B=(0,z.insert)(B,Yt,0,f.offset);const I=(0,r.cloneBlock)(v,{[h.attributeKey]:(0,z.toHTMLString)({value:w,...H(C)})}),x=(0,r.cloneBlock)(_,{[f.attributeKey]:(0,z.toHTMLString)({value:B,...H(S)})}),T=e?I:x,N=v.name===_.name?[T]:(0,r.switchToBlockType)(T,g.name);if(!N||!N.length)return;let P;if(e){const e=N.pop();P=g.merge(e.attributes,x.attributes)}else{const e=N.shift();P=g.merge(I.attributes,e.attributes)}const M=Qt(P),L=P[M],R=(0,z.create)({html:L,...H(g.attributes[M])}),A=R.text.indexOf(Yt),D=(0,z.remove)(R,A,A+1),O=(0,z.toHTMLString)({value:D,...H(g.attributes[M])});P[M]=O;const F=o.getSelectedBlockClientIds(),V=[...e?N:[],{...m,attributes:{...m.attributes,...P}},...e?[]:N];n.batch((()=>{l.selectionChange(m.clientId,M,A,A),l.replaceBlocks(F,V,0,o.getSelectedBlocksInitialCaretPosition())}))},Tn=()=>e=>{let{select:t,dispatch:n}=e;const o=t.getSelectionStart(),l=t.getSelectionEnd();if(o.clientId===l.clientId)return;if(!o.attributeKey||!l.attributeKey||void 0===o.offset||void 0===l.offset)return;const i=t.getBlockRootClientId(o.clientId);if(i!==t.getBlockRootClientId(l.clientId))return;const s=t.getBlockOrder(i);let a,c;s.indexOf(o.clientId)>s.indexOf(l.clientId)?(a=l,c=o):(a=o,c=l);const u=a,d=c,p=t.getBlock(u.clientId),m=(0,r.getBlockType)(p.name),g=t.getBlock(d.clientId),h=(0,r.getBlockType)(g.name),f=p.attributes[u.attributeKey],v=g.attributes[d.attributeKey],b=m.attributes[u.attributeKey],_=h.attributes[d.attributeKey];let k=(0,z.create)({html:f,...H(b)}),y=(0,z.create)({html:v,...H(_)});k=(0,z.remove)(k,u.offset,k.text.length),y=(0,z.remove)(y,0,d.offset),n.replaceBlocks(t.getSelectedBlockClientIds(),[{...p,attributes:{...p.attributes,[u.attributeKey]:(0,z.toHTMLString)({value:k,...H(b)})}},(0,r.createBlock)((0,r.getDefaultBlockName)()),{...g,attributes:{...g.attributes,[d.attributeKey]:(0,z.toHTMLString)({value:y,...H(_)})}}],1,t.getSelectedBlocksInitialCaretPosition())},Nn=()=>e=>{let{select:t,dispatch:n}=e;const o=t.getSelectionStart(),r=t.getSelectionEnd();n.selectionChange({start:{clientId:o.clientId},end:{clientId:r.clientId}})},Pn=(e,t)=>n=>{let{registry:o,select:l,dispatch:i}=n;const s=[e,t];i({type:"MERGE_BLOCKS",blocks:s});const[a,c]=s,u=l.getBlock(a),d=(0,r.getBlockType)(u.name);if(!d)return;const p=l.getBlock(c);if(d&&!d.merge){const e=(0,r.switchToBlockType)(p,d.name);if(1!==(null==e?void 0:e.length))return void i.selectBlock(u.clientId);const[t]=e;return t.innerBlocks.length<1?void i.selectBlock(u.clientId):void o.batch((()=>{i.insertBlocks(t.innerBlocks,void 0,a),i.removeBlock(c),i.selectBlock(t.innerBlocks[0].clientId)}))}const m=(0,r.getBlockType)(p.name),{clientId:g,attributeKey:h,offset:f}=l.getSelectionStart(),v=(g===a?d:m).attributes[h],b=(g===a||g===c)&&void 0!==h&&void 0!==f&&!!v;v||("number"==typeof h?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was "+typeof h):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const _=(0,r.cloneBlock)(u),k=(0,r.cloneBlock)(p);if(b){const e=g===a?_:k,t=e.attributes[h],n=(0,z.insert)((0,z.create)({html:t,...H(v)}),Yt,f,f);e.attributes[h]=(0,z.toHTMLString)({value:n,...H(v)})}const y=u.name===p.name?[k]:(0,r.switchToBlockType)(k,u.name);if(!y||!y.length)return;const E=d.merge(_.attributes,y[0].attributes);if(b){const e=Qt(E),t=E[e],n=(0,z.create)({html:t,...H(d.attributes[e])}),o=n.text.indexOf(Yt),r=(0,z.remove)(n,o,o+1),l=(0,z.toHTMLString)({value:r,...H(d.attributes[e])});E[e]=l,i.selectionChange(u.clientId,e,o,o)}i.replaceBlocks([u.clientId,p.clientId],[{...u,attributes:{...u.attributes,...E}},...y.slice(1)],0)},Mn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:o,dispatch:r}=n;if(!e||!e.length)return;e=Zt(e);const l=o.getBlockRootClientId(e[0]);o.canRemoveBlocks(e,l)&&(t&&r.selectPreviousBlock(e[0]),r({type:"REMOVE_BLOCKS",clientIds:e}),r((e=>{let{select:t,dispatch:n}=e;if(t.getBlockCount()>0)return;const{__unstableHasCustomAppender:o}=t.getSettings();o||n.insertDefaultBlock()})))}};function Ln(e,t){return Mn([e],t)}function Rn(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?o:null,time:Date.now()}}function An(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Dn(){return{type:"START_TYPING"}}function On(){return{type:"STOP_TYPING"}}function zn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function Fn(){return{type:"STOP_DRAGGING_BLOCKS"}}function Vn(){return V()('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function Hn(){return V()('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function Gn(e,t,n,o){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:o}:{type:"SELECTION_CHANGE",...e}}const Un=(e,t,n)=>o=>{let{dispatch:l}=o;const i=(0,r.getDefaultBlockName)();if(!i)return;const s=(0,r.createBlock)(i,e);return l.insertBlock(s,n,t)};function Wn(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function jn(e){return{type:"UPDATE_SETTINGS",settings:e}}function $n(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function Kn(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function qn(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const Yn=()=>e=>{let{dispatch:t}=e;t({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:n=(e=>setTimeout(e,100))}=window;n((()=>{t({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},Qn=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t=>{let{dispatch:n}=t;n.__unstableSetEditorMode(e?"navigation":"edit")}},Zn=e=>t=>{let{dispatch:n,select:o}=t;if("zoom-out"===e){const e=o.getBlockSelectionStart();e&&n.selectBlock(o.getBlockHierarchyRootClientId(e))}n({type:"SET_EDITOR_MODE",mode:e}),"navigation"===e?(0,qt.speak)((0,h.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.")):"edit"===e?(0,qt.speak)((0,h.__)("You are currently in edit mode. To return to the navigation mode, press Escape.")):"zoom-out"===e&&(0,qt.speak)((0,h.__)("You are currently in zoom-out mode."))},Xn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>{let{dispatch:n}=t;n({type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e}),e&&(0,qt.speak)((0,h.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."))}},Jn=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return n=>{let{select:o,dispatch:l}=n;if(!e||!e.length)return;const i=o.getBlocksByClientId(e);if(i.some((e=>!e)))return;const s=i.map((e=>e.name));if(s.some((e=>!(0,r.hasBlockSupport)(e,"multiple",!0))))return;const a=o.getBlockRootClientId(e[0]),c=Zt(e),u=o.getBlockIndex(c[c.length-1]),d=i.map((e=>(0,r.__experimentalCloneSanitizedBlock)(e)));return l.insertBlocks(d,u+1,a,t),d.length>1&&t&&l.multiSelect(d[0].clientId,d[d.length-1].clientId),d.map((e=>e.clientId))}},eo=e=>t=>{let{select:n,dispatch:o}=t;if(!e)return;const r=n.getBlockRootClientId(e);if(n.getTemplateLock(r))return;const l=n.getBlockIndex(e);return o.insertDefaultBlock({},r,l)},to=e=>t=>{let{select:n,dispatch:o}=t;if(!e)return;const r=n.getBlockRootClientId(e);if(n.getTemplateLock(r))return;const l=n.getBlockIndex(e);return o.insertDefaultBlock({},r,l+1)};function no(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const oo=e=>async t=>{let{dispatch:n}=t;n(no(e,!0)),await new Promise((e=>setTimeout(e,150))),n(no(e,!1))};function ro(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function lo(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function io(e){return{type:"SET_TEMPORARILY_EDITING_AS_BLOCKS",temporarilyEditingAsBlocks:e}}const so="core/block-editor",ao={reducer:P,selectors:e,actions:t},co=(0,p.createReduxStore)(so,{...ao,persist:["preferences"]});(0,p.registerStore)(so,{...ao,persist:["preferences"]});const uo={name:"",isSelected:!1},po=(0,s.createContext)(uo),{Provider:mo}=po;function go(){return(0,s.useContext)(po)}function ho(){const{isSelected:e,clientId:t,name:n}=go();return(0,p.useSelect)((o=>{if(e)return!0;const{getBlockName:r,isFirstMultiSelectedBlock:l,getMultiSelectedBlockClientIds:i}=o(co);return!!l(t)&&i().every((e=>r(e)===n))}),[t,e,n])}function fo(e){let{group:t="default",controls:n,children:o,__experimentalShareWithChildBlocks:l=!1}=e;const i=function(e,t){const n=ho(),{clientId:o}=go(),l=(0,p.useSelect)((e=>{const{getBlockName:n,hasSelectedInnerBlock:l}=e(co),{hasBlockSupport:i}=e(r.store);return t&&i(n(o),"__experimentalExposeControlsToChildren",!1)&&l(o)}),[t,o]);var i;return n?null===(i=g[e])||void 0===i?void 0:i.Fill:l?g.parent.Fill:null}(t,l);return i?(0,s.createElement)(m.__experimentalStyleProvider,{document},(0,s.createElement)(i,null,(e=>{const r=(0,u.isEmpty)(e)?null:e;return(0,s.createElement)(m.__experimentalToolbarContext.Provider,{value:r},"default"===t&&(0,s.createElement)(m.ToolbarGroup,{controls:n}),o)}))):null}function vo(e){let{group:t="default",...n}=e;const o=(0,s.useContext)(m.__experimentalToolbarContext),r=g[t].Slot,l=(0,m.__experimentalUseSlotFills)(r.__unstableName);return Boolean(l&&l.length)?"default"===t?(0,s.createElement)(r,i({},n,{bubblesVirtually:!0,fillProps:o})):(0,s.createElement)(m.ToolbarGroup,null,(0,s.createElement)(r,i({},n,{bubblesVirtually:!0,fillProps:o}))):null}const bo=fo;bo.Slot=vo;const _o=e=>(0,s.createElement)(fo,i({group:"inline"},e));_o.Slot=e=>(0,s.createElement)(vo,i({group:"inline"},e));const ko=bo,yo=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})),Eo=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"})),Co=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})),So=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})),wo=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M14.3 6.7l-1.1 1.1 4 4H4v1.5h13.3l-4.1 4.4 1.1 1.1 5.8-6.3z"})),Bo=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M16.2 13.2l-4 4V4h-1.5v13.3l-4.5-4.1-1 1.1 6.2 5.8 5.8-5.8-1-1.1z"}));function Io(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.split(",").map((e=>`.editor-styles-wrapper ${e}${t?` ${t}`:""}`)).join(",")}function xo(e,t,n,o){var r,l;let i="";return null!=t&&null!==(r=t[n])&&void 0!==r&&null!==(l=r.spacingStyles)&&void 0!==l&&l.length&&o&&t[n].spacingStyles.forEach((t=>{i+=`${Io(e,t.selector.trim())} { `,i+=Object.entries(t.rules).map((e=>{let[t,n]=e;return`${t}: ${n||o}`})).join("; "),i+="; }"})),i}function To(e){const{contentSize:t,wideSize:n}=e,o={},r=/^(?!0)\d+(px|em|rem|vw|vh|%)?$/i;return r.test(t)&&(
|
4 |
// translators: %s: container size (i.e. 600px etc)
|
5 |
+
o.none=(0,h.sprintf)((0,h.__)("Max %s wide"),t)),r.test(n)&&(
|
6 |
// translators: %s: container size (i.e. 600px etc)
|
7 |
+
o.wide=(0,h.sprintf)((0,h.__)("Max %s wide"),n)),o}const No=(0,s.createContext)({refs:new Map,callbacks:new Map});function Po(e){let{children:t}=e;const n=(0,s.useMemo)((()=>({refs:new Map,callbacks:new Map})),[]);return(0,s.createElement)(No.Provider,{value:n},t)}function Mo(e){const{refs:t,callbacks:n}=(0,s.useContext)(No),o=(0,s.useRef)();return(0,s.useLayoutEffect)((()=>(t.set(o,e),()=>{t.delete(o)})),[e]),(0,d.useRefEffect)((t=>{o.current=t,n.forEach(((n,o)=>{e===n&&o(t)}))}),[e])}function Lo(e){const{refs:t}=(0,s.useContext)(No),n=(0,s.useRef)();return n.current=e,(0,s.useMemo)((()=>({get current(){let e=null;for(const[o,r]of t.entries())r===n.current&&o.current&&(e=o.current);return e}})),[])}function Ro(e){const{callbacks:t}=(0,s.useContext)(No),n=Lo(e),[o,r]=(0,s.useState)(null);return(0,s.useLayoutEffect)((()=>{if(e)return t.set(r,e),()=>{t.delete(r)}}),[e]),n.current||o}function Ao(e){return!(null==e||!e.includes)&&("0"===e||e.includes("var:preset|spacing|"))}function Do(e,t){if(!Ao(e))return e;const n=zo(e),o=t.find((e=>String(e.slug)===n));return null==o?void 0:o.size}function Oo(e){if(!e)return;const t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function zo(e){if(!e)return;if("0"===e||"default"===e)return e;const t=e.match(/var:preset\|spacing\|(.+)/);return t?t[1]:void 0}const Fo={all:(0,h.__)("All sides"),top:(0,h.__)("Top"),bottom:(0,h.__)("Bottom"),left:(0,h.__)("Left"),right:(0,h.__)("Right"),mixed:(0,h.__)("Mixed"),vertical:(0,h.__)("Vertical"),horizontal:(0,h.__)("Horizontal")},Vo={top:void 0,right:void 0,bottom:void 0,left:void 0},Ho=["top","right","bottom","left"];function Go(e){return e.sort(((t,n)=>e.filter((e=>e===t)).length-e.filter((e=>e===n)).length)).pop()}function Uo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ho;return Object.values(e).length>=1&&Object.values(e).length<t.length||new Set(Object.values(e)).size>1}function Wo(e){return null!=e&&!(0,u.isEmpty)(Object.values(e).filter((e=>!!e)))}const jo=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M14.5 13.8c-1.1 0-2.1.7-2.4 1.8H4V17h8.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20v-1.5h-3.1c-.3-1-1.3-1.7-2.4-1.7zM11.9 7c-.3-1-1.3-1.8-2.4-1.8S7.4 6 7.1 7H4v1.5h3.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20V7h-8.1z"})),$o=["color","border","typography","spacing"],Ko={"color.palette":e=>e.colors,"color.gradients":e=>e.gradients,"color.custom":e=>void 0===e.disableCustomColors?void 0:!e.disableCustomColors,"color.customGradient":e=>void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients,"typography.fontSizes":e=>e.fontSizes,"typography.customFontSize":e=>void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes,"typography.lineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.padding":e=>e.enableCustomSpacing},qo={"border.customColor":"border.color","border.customStyle":"border.style","border.customWidth":"border.width","typography.customFontStyle":"typography.fontStyle","typography.customFontWeight":"typography.fontWeight","typography.customLetterSpacing":"typography.letterSpacing","typography.customTextDecorations":"typography.textDecoration","typography.customTextTransforms":"typography.textTransform","border.customRadius":"border.radius","spacing.customMargin":"spacing.margin","spacing.customPadding":"spacing.padding","typography.customLineHeight":"typography.lineHeight"};function Yo(e){const{name:t,clientId:n}=go();return(0,p.useSelect)((o=>{if($o.includes(e))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");let l;const i=(e=>qo[e]||e)(e),s=[n,...o(co).getBlockParents(n,!0)];for(const e of s){const n=o(co).getBlockName(e);if((0,r.hasBlockSupport)(n,"__experimentalSettings",!1)){var a;const n=o(co).getBlockAttributes(e);if(l=null!==(a=(0,u.get)(n,`settings.blocks.${t}.${i}`))&&void 0!==a?a:(0,u.get)(n,`settings.${i}`),void 0!==l)break}}const c=o(co).getSettings();if(void 0===l){var d;const e=`__experimentalFeatures.${i}`,n=`__experimentalFeatures.blocks.${t}.${i}`;l=null!==(d=(0,u.get)(c,n))&&void 0!==d?d:(0,u.get)(c,e)}var p,m;if(void 0!==l)return r.__EXPERIMENTAL_PATHS_WITH_MERGE[i]?null!==(p=null!==(m=l.custom)&&void 0!==m?m:l.theme)&&void 0!==p?p:l.default:l;const g=Ko[i]?Ko[i](c):void 0;return void 0!==g?g:"typography.dropCap"===i||void 0}),[t,n,e])}function Qo(e){var t;let{spacingSizes:n,value:o,side:r,onChange:l,isMixed:i=!1,type:a,minimumCustomValue:u}=e;o=function(e,t){if(Ao(e))return e;const n=t.find((t=>String(t.size)===String(e)));return null!=n&&n.slug?`var:preset|spacing|${n.slug}`:e}(o,n);let d=n;const g=n.length<=8,f=(0,p.useSelect)((e=>{const t=e(co).getSettings();return null==t?void 0:t.disableCustomSpacingSizes})),[v,b]=(0,s.useState)(!f&&void 0!==o&&!Ao(o)),_=(0,m.__experimentalUseCustomUnits)({availableUnits:Yo("spacing.units")||["px","em","rem"]});let k=null;g||v||void 0===o||!(!Ao(o)||Ao(o)&&i)?i||(k=v?Do(o,n):function(e,t){if(void 0===e)return 0;const n=0===parseFloat(e,10)?"0":zo(e),o=t.findIndex((e=>String(e.slug)===n));return-1!==o?o:NaN}(o,n)):(d=[...n,{name:i?(0,h.__)("Mixed"):// translators: A custom measurement, eg. a number followed by a unit like 12px.
|
8 |
+
(0,h.sprintf)((0,h.__)("Custom (%s)"),o),slug:"custom",size:o}],k=d.length-1);const y=(0,s.useMemo)((()=>(0,m.__experimentalParseQuantityAndUnitFromRawValue)(k)),[k])[1]||_[0].value,E=e=>{var t;return void 0===o||null===(t=n[e])||void 0===t?void 0:t.name},C=parseInt(k,10),S=(e,t)=>{var o;const r=parseInt(e,10);if("selectList"===t){if(0===r)return;if(1===r)return"0"}else if(0===r)return"0";return`var:preset|spacing|${null===(o=n[e])||void 0===o?void 0:o.slug}`},w=i?(0,h.__)("Mixed"):null,B=i?(0,h.__)("Mixed"):E(k),I=d.map(((e,t)=>({key:t,name:e.name}))),x=n.map(((e,t)=>({value:t,label:void 0}))),T=(0,h.sprintf)(// translators: 1: The side of the block being modified (top, bottom, left, etc.). 2. Type of spacing being modified (Padding, margin, etc)
|
9 |
+
(0,h.__)("%1$s %2$s"),Fo[r],null==a?void 0:a.toLowerCase()),N=g&&!v&&void 0!==B;return(0,s.createElement)(s.Fragment,null,"all"!==r&&(0,s.createElement)(m.__experimentalHStack,{className:"components-spacing-sizes-control__side-labels"},(0,s.createElement)(m.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__side-label"},Fo[r]),N&&(0,s.createElement)(m.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__hint-single"},B)),"all"===r&&N&&(0,s.createElement)(m.BaseControl.VisualLabel,{className:"components-spacing-sizes-control__hint-all"},B),!f&&(0,s.createElement)(m.Button,{label:v?(0,h.__)("Use size preset"):(0,h.__)("Set custom size"),icon:jo,onClick:()=>{b(!v)},isPressed:v,isSmall:!0,className:c()({"components-spacing-sizes-control__custom-toggle-all":"all"===r,"components-spacing-sizes-control__custom-toggle-single":"all"!==r}),iconSize:24}),v&&(0,s.createElement)(s.Fragment,null,(0,s.createElement)(m.__experimentalUnitControl,{onChange:e=>l((e=>isNaN(parseFloat(e))?void 0:e)(e)),value:k,units:_,min:u,placeholder:w,disableUnits:i,label:T,hideLabelFromVision:!0,className:"components-spacing-sizes-control__custom-value-input",style:{gridColumn:"1"}}),(0,s.createElement)(m.RangeControl,{value:C,min:0,max:100,withInputField:!1,onChange:e=>{l([e,y].join(""))},className:"components-spacing-sizes-control__custom-value-range"})),g&&!v&&(0,s.createElement)(m.RangeControl,{className:"components-spacing-sizes-control__range-control",value:k,onChange:e=>l(S(e)),onMouseDown:e=>{var t;(null==e||null===(t=e.nativeEvent)||void 0===t?void 0:t.offsetX)<35&&void 0===o&&l("0")},withInputField:!1,"aria-valuenow":k,"aria-valuetext":null===(t=n[k])||void 0===t?void 0:t.name,renderTooltipContent:E,min:0,max:n.length-1,marks:x,label:T,hideLabelFromVision:!0,__nextHasNoMarginBottom:!0}),!g&&!v&&(0,s.createElement)(m.CustomSelectControl,{className:"components-spacing-sizes-control__custom-select-control",value:I.find((e=>e.key===k))||"",onChange:e=>{l(S(e.selectedItem.key,"selectList"))},options:I,label:T,hideLabelFromVision:!0,__nextUnconstrainedWidth:!0}))}function Zo(e){let{onChange:t,values:n,sides:o,spacingSizes:r,type:l,minimumCustomValue:i}=e;const a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Go(Object.values(e))}(n),c=Wo(n)&&Uo(n,o);return(0,s.createElement)(Qo,{value:a,onChange:e=>{const r=(0,m.__experimentalApplyValueToSides)(n,e,o);t(r)},side:"all",spacingSizes:r,isMixed:c,type:l,minimumCustomValue:i})}function Xo(e){let{values:t,sides:n,onChange:o,spacingSizes:r,type:l,minimumCustomValue:i}=e;const a=null!=n&&n.length?Ho.filter((e=>n.includes(e))):Ho,c=e=>n=>{const r={...t};r[e]=n,o(r)};return(0,s.createElement)(s.Fragment,null,a.map((e=>(0,s.createElement)(Qo,{value:t[e],label:Fo[e],key:`spacing-sizes-control-${e}`,withInputField:!1,side:e,onChange:c(e),spacingSizes:r,type:l,minimumCustomValue:i}))))}const Jo=["vertical","horizontal"];function er(e){let{onChange:t,values:n,sides:o,spacingSizes:r,type:l,minimumCustomValue:i}=e;const a=e=>o=>{if(!t)return;const r={...n};"vertical"===e&&(r.top=o,r.bottom=o),"horizontal"===e&&(r.left=o,r.right=o),t(r)},c=null!=o&&o.length?Jo.filter((e=>o.includes(e))):Jo;return(0,s.createElement)(s.Fragment,null,c.map((e=>{const t="vertical"===e?n.top:n.left;return(0,s.createElement)(Qo,{value:t,onChange:a(e),label:Fo[e],key:`spacing-sizes-control-${e}`,withInputField:!1,side:e,spacingSizes:r,type:l,minimumCustomValue:i})})))}const tr=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"})),nr=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"}));function or(e){let{isLinked:t,onClick:n}=e;const o=t?(0,h.__)("Unlink sides"):(0,h.__)("Link sides");return(0,s.createElement)(m.Tooltip,{text:o},(0,s.createElement)("span",{className:"component-spacing-sizes-control__linked-button"},(0,s.createElement)(m.Button,{isSmall:!0,icon:t?tr:nr,iconSize:24,"aria-label":o,onClick:n})))}function rr(e){let{inputProps:t,onChange:n,label:o=(0,h.__)("Spacing Control"),values:r,sides:l,splitOnAxis:a=!1,useSelect:u,minimumCustomValue:d=0}=e;const p=[{name:0,slug:"0",size:0},...Yo("spacing.spacingSizes")||[]];p.length>8&&p.unshift({name:(0,h.__)("Default"),slug:"default",size:void 0});const g=r||Vo,f=Wo(r),v=1===(null==l?void 0:l.length),[b,_]=(0,s.useState)(!f||!Uo(g,l)||v),k={...t,onChange:e=>{const t={...r,...e};n(t)},isLinked:b,sides:l,values:g,spacingSizes:p,useSelect:u,type:o,minimumCustomValue:d};return(0,s.createElement)("fieldset",{role:"region",className:c()("component-spacing-sizes-control",{"is-unlinked":!b})},(0,s.createElement)(m.BaseControl.VisualLabel,{as:"legend"},o),!v&&(0,s.createElement)(or,{onClick:()=>{_(!b)},isLinked:b}),b&&(0,s.createElement)(Zo,i({"aria-label":o},k)),!b&&a&&(0,s.createElement)(er,k),!b&&!a&&(0,s.createElement)(Xo,k))}window.wp.warning;const lr={default:(0,m.createSlotFill)("InspectorControls"),advanced:(0,m.createSlotFill)("InspectorAdvancedControls"),border:(0,m.createSlotFill)("InspectorControlsBorder"),color:(0,m.createSlotFill)("InspectorControlsColor"),dimensions:(0,m.createSlotFill)("InspectorControlsDimensions"),typography:(0,m.createSlotFill)("InspectorControlsTypography")};function ir(e){var t;let{__experimentalGroup:n="default",children:o}=e;const r=ho(),l=null===(t=lr[n])||void 0===t?void 0:t.Fill;return l?r?(0,s.createElement)(m.__experimentalStyleProvider,{document},(0,s.createElement)(l,null,(e=>{const t=(0,u.isEmpty)(e)?null:e;return(0,s.createElement)(m.__experimentalToolsPanelContext.Provider,{value:t},o)}))):null:("undefined"!=typeof process&&process.env,null)}const sr=e=>e,ar=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=(0,u.pickBy)((0,u.mapValues)(e,ar),sr);return(0,u.isEmpty)(t)?void 0:t};function cr(e,t,n){return(0,u.setWith)(e?(0,u.clone)(e):{},t,n,u.clone)}function ur(e,t,n,o,r,l){var i;if((0,u.every)(e,(e=>!e)))return n;if(1===l.length&&n.innerBlocks.length===o.length)return n;let s=null===(i=o[0])||void 0===i?void 0:i.attributes;if(l.length>1&&o.length>1){if(!o[r])return n;var a;s=null===(a=o[r])||void 0===a?void 0:a.attributes}let c=n;return Object.entries(e).forEach((e=>{let[n,o]=e;o&&t[n].forEach((e=>{const t=(0,u.get)(s,e);t&&(c={...c,attributes:cr(c.attributes,e,t)})}))})),c}function dr(e,t,n){const o=(0,r.getBlockSupport)(e,t),l=null==o?void 0:o.__experimentalSkipSerialization;return Array.isArray(l)?l.includes(n):l}function pr(e){let{children:t,group:n,label:o}=e;const{updateBlockAttributes:r}=(0,p.useDispatch)(co),{getBlockAttributes:l,getMultiSelectedBlockClientIds:i,getSelectedBlockClientId:a,hasMultiSelection:c}=(0,p.useSelect)(co),u=a(),d=(0,s.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},n=c()?i():[u];n.forEach((n=>{const{style:o}=l(n);let r={style:o};e.forEach((e=>{r={...r,...e(r)}})),r={...r,style:ar(r.style)},t[n]=r})),r(n,t,!0)}),[ar,l,i,c,u,r]);return(0,s.createElement)(m.__experimentalToolsPanel,{className:`${n}-block-support-panel`,label:o,resetAll:d,key:u,panelId:u,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},t)}function mr(e){let{Slot:t,...n}=e;const o=(0,s.useContext)(m.__experimentalToolsPanelContext);return(0,s.createElement)(t,i({},n,{fillProps:o,bubblesVirtually:!0}))}function gr(e){var t;let{__experimentalGroup:n="default",label:o,...r}=e;const l=null===(t=lr[n])||void 0===t?void 0:t.Slot,a=(0,m.__experimentalUseSlot)(null==l?void 0:l.__unstableName),c=(0,m.__experimentalUseSlotFills)(null==l?void 0:l.__unstableName);return l&&a?Boolean(c&&c.length)?o?(0,s.createElement)(pr,{group:n,label:o},(0,s.createElement)(mr,i({},r,{Slot:l}))):(0,s.createElement)(l,i({},r,{bubblesVirtually:!0})):null:("undefined"!=typeof process&&process.env,null)}const hr=ir;hr.Slot=gr;const fr=e=>(0,s.createElement)(ir,i({},e,{__experimentalGroup:"advanced"}));fr.Slot=e=>(0,s.createElement)(gr,i({},e,{__experimentalGroup:"advanced"})),fr.slotName="InspectorAdvancedControls";const vr=hr,br=window.wp.isShallowEqual;var _r=n.n(br);const kr=function(e){return(0,d.useRefEffect)((t=>{if(!e)return;function n(t){const{deltaX:n,deltaY:o}=t;e.current.scrollBy(n,o)}const o={passive:!0};return t.addEventListener("wheel",n,o),()=>{t.removeEventListener("wheel",n,o)}}),[e])},yr=Number.MAX_SAFE_INTEGER,Er=(0,s.forwardRef)((function(e,t){let{clientId:n,bottomClientId:o,children:r,__unstableRefreshSize:l,__unstableCoverTarget:a=!1,__unstablePopoverSlot:u,__unstableContentRef:p,...g}=e;const h=Ro(n),f=Ro(null!=o?o:n),v=(0,d.useMergeRefs)([t,kr(p)]),[b,_]=(0,s.useReducer)((e=>(e+1)%yr),0);(0,s.useLayoutEffect)((()=>{if(!h)return;const e=new window.MutationObserver(_);return e.observe(h,{attributes:!0}),()=>{e.disconnect()}}),[h]);const k=(0,s.useMemo)((()=>b<0||!h||f!==h?{}:{position:"absolute",width:h.offsetWidth,height:h.offsetHeight}),[h,f,l,b]),y=(0,s.useMemo)((()=>{if(!(b<0||!h||o&&!f))return{getBoundingClientRect(){var e,t,n,o;const r=h.getBoundingClientRect(),l=null==f?void 0:f.getBoundingClientRect(),i=Math.min(r.left,null!==(e=null==l?void 0:l.left)&&void 0!==e?e:1/0),s=Math.min(r.top,null!==(t=null==l?void 0:l.top)&&void 0!==t?t:1/0),a=Math.max(r.right,null!==(n=l.right)&&void 0!==n?n:-1/0)-i,c=Math.max(r.bottom,null!==(o=l.bottom)&&void 0!==o?o:-1/0)-s;return new window.DOMRect(i,s,a,c)},ownerDocument:h.ownerDocument}}),[o,f,h,b]);return!h||o&&!f?null:(0,s.createElement)(m.Popover,i({ref:v,animate:!1,focusOnMount:!1,anchor:y,__unstableSlotName:u||null,placement:"top-start",resize:!1,flip:!1,shift:!0},g,{className:c()("block-editor-block-popover",g.className)}),a&&(0,s.createElement)("div",{style:k},r),!a&&r)}));function Cr(e){const t=(0,r.getBlockSupport)(e,Pr);return!!(!0===t||null!=t&&t.margin)}function Sr(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Yo("spacing.margin"),n=!Or(e,"margin");return!Cr(e)||t||n}function wr(e){var t,n;const{name:o,attributes:{style:r},setAttributes:l}=e,i=Yo("spacing.spacingSizes"),a=(0,m.__experimentalUseCustomUnits)({availableUnits:Yo("spacing.units")||["%","px","em","rem","vw"]}),c=Dr(o,"margin"),u=c&&c.some((e=>Lr.includes(e)));if(Sr(e))return null;const d=e=>{const t={...r,spacing:{...null==r?void 0:r.spacing,margin:e}};l({style:ar(t)})};return s.Platform.select({web:(0,s.createElement)(s.Fragment,null,(!i||0===(null==i?void 0:i.length))&&(0,s.createElement)(m.__experimentalBoxControl,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.margin,onChange:d,label:(0,h.__)("Margin"),sides:c,units:a,allowReset:!1,splitOnAxis:u}),(null==i?void 0:i.length)>0&&(0,s.createElement)(rr,{values:null==r||null===(n=r.spacing)||void 0===n?void 0:n.margin,onChange:d,label:(0,h.__)("Margin"),sides:c,units:a,allowReset:!1,splitOnAxis:!1})),native:null})}function Br(e){var t,n;let{clientId:o,attributes:r}=e;const l=null==r||null===(t=r.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin,i=Yo("spacing.spacingSizes"),a=(0,s.useMemo)((()=>{const e=null!=l&&l.top?Do(null==l?void 0:l.top,i):0,t=null!=l&&l.right?Do(null==l?void 0:l.right,i):0,n=null!=l&&l.bottom?Do(null==l?void 0:l.bottom,i):0,o=null!=l&&l.left?Do(null==l?void 0:l.left,i):0;return{borderTopWidth:e,borderRightWidth:t,borderBottomWidth:n,borderLeftWidth:o,top:0!==e?`-${e}`:0,right:0!==t?`-${t}`:0,bottom:0!==n?`-${n}`:0,left:0!==o?`-${o}`:0}}),[l]),[c,u]=(0,s.useState)(!1),d=(0,s.useRef)(l),p=(0,s.useRef)(),m=()=>{p.current&&window.clearTimeout(p.current)};return(0,s.useEffect)((()=>(_r()(l,d.current)||(u(!0),d.current=l,m(),p.current=setTimeout((()=>{u(!1)}),400)),()=>m())),[l]),c?(0,s.createElement)(Er,{clientId:o,__unstableCoverTarget:!0,__unstableRefreshSize:l},(0,s.createElement)("div",{className:"block-editor__padding-visualizer",style:a})):null}function Ir(e){const t=(0,r.getBlockSupport)(e,Pr);return!!(!0===t||null!=t&&t.padding)}function xr(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Yo("spacing.padding"),n=!Or(e,"padding");return!Ir(e)||t||n}function Tr(e){var t,n;const{name:o,attributes:{style:r},setAttributes:l}=e,i=Yo("spacing.spacingSizes"),a=(0,m.__experimentalUseCustomUnits)({availableUnits:Yo("spacing.units")||["%","px","em","rem","vw"]}),c=Dr(o,"padding"),u=c&&c.some((e=>Lr.includes(e)));if(xr(e))return null;const d=e=>{const t={...r,spacing:{...null==r?void 0:r.spacing,padding:e}};l({style:ar(t)})};return s.Platform.select({web:(0,s.createElement)(s.Fragment,null,(!i||0===(null==i?void 0:i.length))&&(0,s.createElement)(m.__experimentalBoxControl,{values:null==r||null===(t=r.spacing)||void 0===t?void 0:t.padding,onChange:d,label:(0,h.__)("Padding"),sides:c,units:a,allowReset:!1,splitOnAxis:u}),(null==i?void 0:i.length)>0&&(0,s.createElement)(rr,{values:null==r||null===(n=r.spacing)||void 0===n?void 0:n.padding,onChange:d,label:(0,h.__)("Padding"),sides:c,units:a,allowReset:!1,splitOnAxis:u})),native:null})}function Nr(e){var t,n;let{clientId:o,attributes:r}=e;const l=null==r||null===(t=r.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding,i=(0,s.useMemo)((()=>({borderTopWidth:Ao(null==l?void 0:l.top)?Oo(null==l?void 0:l.top):null==l?void 0:l.top,borderRightWidth:Ao(null==l?void 0:l.right)?Oo(null==l?void 0:l.right):null==l?void 0:l.right,borderBottomWidth:Ao(null==l?void 0:l.bottom)?Oo(null==l?void 0:l.bottom):null==l?void 0:l.bottom,borderLeftWidth:Ao(null==l?void 0:l.left)?Oo(null==l?void 0:l.left):null==l?void 0:l.left})),[l]),[a,c]=(0,s.useState)(!1),u=(0,s.useRef)(l),d=(0,s.useRef)(),p=()=>{d.current&&window.clearTimeout(d.current)};return(0,s.useEffect)((()=>(_r()(l,u.current)||(c(!0),u.current=l,p(),d.current=setTimeout((()=>{c(!1)}),400)),()=>p())),[l]),a?(0,s.createElement)(Er,{clientId:o,__unstableCoverTarget:!0,__unstableRefreshSize:l},(0,s.createElement)("div",{className:"block-editor__padding-visualizer",style:i})):null}const Pr="spacing",Mr=["top","right","bottom","left"],Lr=["vertical","horizontal"];function Rr(e){const t=Hr(e),n=xr(e),o=Sr(e),l=Ar(e),i=(u=e.name,"web"===s.Platform.OS&&(zr(u)||Ir(u)||Cr(u))),a=Yo("spacing.spacingSizes");var u;if(l||!i)return null;const d=(0,r.getBlockSupport)(e.name,[Pr,"__experimentalDefaultControls"]),p=e=>t=>{var n;return{...t,style:{...t.style,spacing:{...null===(n=t.style)||void 0===n?void 0:n.spacing,[e]:void 0}}}},g=c()({"tools-panel-item-spacing":a&&a.length>0});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(vr,{__experimentalGroup:"dimensions"},!n&&(0,s.createElement)(m.__experimentalToolsPanelItem,{className:g,hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.padding)}(e),label:(0,h.__)("Padding"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:ar({...o,spacing:{...null==o?void 0:o.spacing,padding:void 0}})})}(e),resetAllFilter:p("padding"),isShownByDefault:null==d?void 0:d.padding,panelId:e.clientId},(0,s.createElement)(Tr,e)),!o&&(0,s.createElement)(m.__experimentalToolsPanelItem,{className:g,hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.margin)}(e),label:(0,h.__)("Margin"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:ar({...o,spacing:{...null==o?void 0:o.spacing,margin:void 0}})})}(e),resetAllFilter:p("margin"),isShownByDefault:null==d?void 0:d.margin,panelId:e.clientId},(0,s.createElement)(wr,e)),!t&&(0,s.createElement)(m.__experimentalToolsPanelItem,{className:g,hasValue:()=>function(e){var t,n;return void 0!==(null===(t=e.attributes.style)||void 0===t||null===(n=t.spacing)||void 0===n?void 0:n.blockGap)}(e),label:(0,h.__)("Block spacing"),onDeselect:()=>function(e){let{attributes:t={},setAttributes:n}=e;const{style:o}=t;n({style:{...o,spacing:{...null==o?void 0:o.spacing,blockGap:void 0}}})}(e),resetAllFilter:p("blockGap"),isShownByDefault:null==d?void 0:d.blockGap,panelId:e.clientId},(0,s.createElement)(Gr,e))),!n&&(0,s.createElement)(Nr,e),!o&&(0,s.createElement)(Br,e))}const Ar=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Hr(e),n=xr(e),o=Sr(e);return t&&n&&o};function Dr(e,t){var n;const o=(0,r.getBlockSupport)(e,Pr);if(o&&"boolean"!=typeof o[t])return Array.isArray(o[t])?o[t]:null!==(n=o[t])&&void 0!==n&&n.sides?o[t].sides:void 0}function Or(e,t){const n=Dr(e,t);return!(n&&n.some((e=>Mr.includes(e)))&&n.some((e=>Lr.includes(e)))&&(console.warn(`The ${t} support for the "${e}" block can not be configured to support both axial and arbitrary sides.`),1))}function zr(e){const t=(0,r.getBlockSupport)(e,Pr);return!!(!0===t||null!=t&&t.blockGap)}function Fr(e){if(!e)return null;const t="string"==typeof e;return{top:t?e:null==e?void 0:e.top,left:t?e:null==e?void 0:e.left}}function Vr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0";const n=Fr(e);if(!n)return null;const o=Oo(null==n?void 0:n.top)||t,r=Oo(null==n?void 0:n.left)||t;return o===r?o:`${o} ${r}`}function Hr(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=!Yo("spacing.blockGap");return!zr(e)||t}function Gr(e){var t;const{clientId:n,attributes:{style:o},name:r,setAttributes:l}=e,i=Yo("spacing.spacingSizes"),a=(0,m.__experimentalUseCustomUnits)({availableUnits:Yo("spacing.units")||["%","px","em","rem","vw"]}),c=Dr(r,"blockGap"),u=Lo(n);if(Hr(e))return null;const d=c&&c.some((e=>Lr.includes(e))),p=e=>{var t;let n=e;e&&d?n={...Fr(e)}:null!=e&&e.hasOwnProperty("top")&&(n=e.top);const r={...o,spacing:{...null==o?void 0:o.spacing,blockGap:n}};l({style:ar(r)});const i=(null===(t=window)||void 0===t?void 0:t.navigator.userAgent)&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome ")&&!window.navigator.userAgent.includes("Chromium ");var s;u.current&&i&&(null===(s=u.current.parentNode)||void 0===s||s.replaceChild(u.current,u.current))},g=Fr(null==o||null===(t=o.spacing)||void 0===t?void 0:t.blockGap),f=d?{...g,right:null==g?void 0:g.left,bottom:null==g?void 0:g.top}:{top:null==g?void 0:g.top};return s.Platform.select({web:(0,s.createElement)(s.Fragment,null,(!i||0===(null==i?void 0:i.length))&&(d?(0,s.createElement)(m.__experimentalBoxControl,{label:(0,h.__)("Block spacing"),min:0,onChange:p,units:a,sides:c,values:f,allowReset:!1,splitOnAxis:d}):(0,s.createElement)(m.__experimentalUnitControl,{label:(0,h.__)("Block spacing"),__unstableInputWidth:"80px",min:0,onChange:p,units:a,value:f})),(null==i?void 0:i.length)>0&&(0,s.createElement)(rr,{values:f,onChange:p,label:(0,h.__)("Block spacing"),sides:d?c:["top"],units:a,allowReset:!1,splitOnAxis:d})),native:null})}const Ur=(0,s.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(m.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Wr=(0,s.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(m.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),jr={top:{icon:(0,s.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(m.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:(0,h._x)("Align top","Block vertical alignment setting")},center:{icon:Wr,title:(0,h._x)("Align middle","Block vertical alignment setting")},bottom:{icon:Ur,title:(0,h._x)("Align bottom","Block vertical alignment setting")}},$r=["top","center","bottom"],Kr={isAlternate:!0},qr=function(e){let{value:t,onChange:n,controls:o=$r,isCollapsed:r=!0,isToolbar:l}=e;const a=jr[t],c=jr.top,u=l?m.ToolbarGroup:m.ToolbarDropdownMenu,d=l?{isCollapsed:r}:{popoverProps:{POPOVER_PROPS:Kr}};return(0,s.createElement)(u,i({icon:a?a.icon:c.icon,label:(0,h._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map((e=>{return{...jr[e],isActive:t===e,role:r?"menuitemradio":void 0,onClick:(o=e,()=>n(t===o?void 0:o))};var o}))},d))},Yr=e=>(0,s.createElement)(qr,i({},e,{isToolbar:!1})),Qr=e=>(0,s.createElement)(qr,i({},e,{isToolbar:!0})),Zr={left:yo,center:Eo,right:Co,"space-between":So},Xr=function(e){let{allowedControls:t=["left","center","right","space-between"],isCollapsed:n=!0,onChange:o,value:r,popoverProps:l,isToolbar:a}=e;const c=e=>{o(e===r?void 0:e)},u=r?Zr[r]:Zr.left,d=[{name:"left",icon:yo,title:(0,h.__)("Justify items left"),isActive:"left"===r,onClick:()=>c("left")},{name:"center",icon:Eo,title:(0,h.__)("Justify items center"),isActive:"center"===r,onClick:()=>c("center")},{name:"right",icon:Co,title:(0,h.__)("Justify items right"),isActive:"right"===r,onClick:()=>c("right")},{name:"space-between",icon:So,title:(0,h.__)("Space between items"),isActive:"space-between"===r,onClick:()=>c("space-between")}],p=a?m.ToolbarGroup:m.ToolbarDropdownMenu,g=a?{isCollapsed:n}:{};return(0,s.createElement)(p,i({icon:u,popoverProps:l,label:(0,h.__)("Change items justification"),controls:d.filter((e=>t.includes(e.name)))},g))},Jr=e=>(0,s.createElement)(Xr,i({},e,{isToolbar:!1})),el=e=>(0,s.createElement)(Xr,i({},e,{isToolbar:!0})),tl={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},nl={left:"flex-start",right:"flex-end",center:"center"},ol={top:"flex-start",center:"center",bottom:"flex-end"},rl=["wrap","nowrap"],ll={name:"flex",label:(0,h.__)("Flex"),inspectorControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:o={}}=e;const{allowOrientation:r=!0}=o;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(m.Flex,null,(0,s.createElement)(m.FlexItem,null,(0,s.createElement)(sl,{layout:t,onChange:n})),(0,s.createElement)(m.FlexItem,null,r&&(0,s.createElement)(cl,{layout:t,onChange:n}))),(0,s.createElement)(al,{layout:t,onChange:n}))},toolBarControls:function(e){let{layout:t={},onChange:n,layoutBlockSupport:o}=e;if(null!=o&&o.allowSwitching)return null;const{allowVerticalAlignment:r=!0}=o;return(0,s.createElement)(ko,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(sl,{layout:t,onChange:n,isToolbar:!0}),r&&"vertical"!==(null==t?void 0:t.orientation)&&(0,s.createElement)(il,{layout:t,onChange:n,isToolbar:!0}))},getLayoutStyle:function(e){var t,n;let{selector:o,layout:r,style:l,blockName:i,hasBlockGapSupport:s,layoutDefinitions:a}=e;const{orientation:c="horizontal"}=r,u=null!=l&&null!==(t=l.spacing)&&void 0!==t&&t.blockGap&&!dr(i,"spacing","blockGap")?Vr(null==l||null===(n=l.spacing)||void 0===n?void 0:n.blockGap,"0.5em"):void 0,d=tl[r.justifyContent],p=rl.includes(r.flexWrap)?r.flexWrap:"wrap",m=ol[r.verticalAlignment],g=nl[r.justifyContent]||nl.left;let h="";const f=[];return p&&"wrap"!==p&&f.push(`flex-wrap: ${p}`),"horizontal"===c?(m&&f.push(`align-items: ${m}`),d&&f.push(`justify-content: ${d}`)):(f.push("flex-direction: column"),f.push(`align-items: ${g}`)),f.length&&(h=`${Io(o)} {\n\t\t\t\t${f.join("; ")};\n\t\t\t}`),s&&u&&(h+=xo(o,a,"flex",u)),h},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments:()=>[]};function il(e){let{layout:t,onChange:n,isToolbar:o=!1}=e;const{verticalAlignment:r=ol.center}=t,l=e=>{n({...t,verticalAlignment:e})};if(o)return(0,s.createElement)(Yr,{onChange:l,value:r});const i=[{value:"flex-start",label:(0,h.__)("Align items top")},{value:"center",label:(0,h.__)("Align items center")},{value:"flex-end",label:(0,h.__)("Align items bottom")}];return(0,s.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-vertical-alignment-control"},(0,s.createElement)("legend",null,(0,h.__)("Vertical alignment")),(0,s.createElement)("div",null,i.map(((e,t,n)=>(0,s.createElement)(m.Button,{key:e,label:n,icon:t,isPressed:r===e,onClick:()=>l(e)})))))}function sl(e){let{layout:t,onChange:n,isToolbar:o=!1}=e;const{justifyContent:r="left",orientation:l="horizontal"}=t,i=e=>{n({...t,justifyContent:e})},a=["left","center","right"];if("horizontal"===l&&a.push("space-between"),o)return(0,s.createElement)(Jr,{allowedControls:a,value:r,onChange:i,popoverProps:{position:"bottom right",isAlternate:!0}});const c=[{value:"left",icon:yo,label:(0,h.__)("Justify items left")},{value:"center",icon:Eo,label:(0,h.__)("Justify items center")},{value:"right",icon:Co,label:(0,h.__)("Justify items right")}];return"horizontal"===l&&c.push({value:"space-between",icon:So,label:(0,h.__)("Space between items")}),(0,s.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-justification-controls"},(0,s.createElement)("legend",null,(0,h.__)("Justification")),(0,s.createElement)("div",null,c.map((e=>{let{value:t,icon:n,label:o}=e;return(0,s.createElement)(m.Button,{key:t,label:o,icon:n,isPressed:r===t,onClick:()=>i(t)})}))))}function al(e){let{layout:t,onChange:n}=e;const{flexWrap:o="wrap"}=t;return(0,s.createElement)(m.ToggleControl,{label:(0,h.__)("Allow to wrap to multiple lines"),onChange:e=>{n({...t,flexWrap:e?"wrap":"nowrap"})},checked:"wrap"===o})}function cl(e){let{layout:t,onChange:n}=e;const{orientation:o="horizontal"}=t;return(0,s.createElement)("fieldset",{className:"block-editor-hooks__flex-layout-orientation-controls"},(0,s.createElement)("legend",null,(0,h.__)("Orientation")),(0,s.createElement)(m.Button,{label:(0,h.__)("Horizontal"),icon:wo,isPressed:"horizontal"===o,onClick:()=>n({...t,orientation:"horizontal"})}),(0,s.createElement)(m.Button,{label:(0,h.__)("Vertical"),icon:Bo,isPressed:"vertical"===o,onClick:()=>n({...t,orientation:"vertical"})}))}const ul={name:"default",label:(0,h.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function(e){var t;let{selector:n,style:o,blockName:r,hasBlockGapSupport:l,layoutDefinitions:i}=e;const s=Vr(null==o||null===(t=o.spacing)||void 0===t?void 0:t.blockGap);let a="";dr(r,"spacing","blockGap")||(null!=s&&s.top?a=Vr(null==s?void 0:s.top):"string"==typeof s&&(a=Vr(s)));let c="";return l&&a&&(c+=xo(n,i,"default",a)),c},getOrientation:()=>"vertical",getAlignments(e){const t=To(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:o}=e,r=[{name:"left"},{name:"center"},{name:"right"}];return n&&r.unshift({name:"full"}),o&&r.unshift({name:"wide",info:t.wide}),r.unshift({name:"none",info:t.none}),r}},dl=function(e){let{icon:t,size:n=24,...o}=e;return(0,s.cloneElement)(t,{width:n,height:n,...o})},pl=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M7 9v6h10V9H7zM5 19.8h14v-1.5H5v1.5zM5 4.3v1.5h14V4.3H5z"})),ml=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),gl=window.wp.styleEngine,hl={name:"constrained",label:(0,h.__)("Constrained"),inspectorControls:function(e){let{layout:t,onChange:n}=e;const{wideSize:o,contentSize:r,justifyContent:l="center"}=t,i=[{value:"left",icon:yo,label:(0,h.__)("Justify items left")},{value:"center",icon:Eo,label:(0,h.__)("Justify items center")},{value:"right",icon:Co,label:(0,h.__)("Justify items right")}],a=(0,m.__experimentalUseCustomUnits)({availableUnits:Yo("spacing.units")||["%","px","em","rem","vw"]});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls"},(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,s.createElement)(m.__experimentalUnitControl,{label:(0,h.__)("Content"),labelPosition:"top",__unstableInputWidth:"80px",value:r||o||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,contentSize:e})},units:a}),(0,s.createElement)(dl,{icon:pl})),(0,s.createElement)("div",{className:"block-editor-hooks__layout-controls-unit"},(0,s.createElement)(m.__experimentalUnitControl,{label:(0,h.__)("Wide"),labelPosition:"top",__unstableInputWidth:"80px",value:o||r||"",onChange:e=>{e=0>parseFloat(e)?"0":e,n({...t,wideSize:e})},units:a}),(0,s.createElement)(dl,{icon:ml}))),(0,s.createElement)("p",{className:"block-editor-hooks__layout-controls-helptext"},(0,h.__)("Customize the width for all elements that are assigned to the center or wide columns.")),(0,s.createElement)(m.__experimentalToggleGroupControl,{__experimentalIsBorderless:!0,label:(0,h.__)("Justification"),value:l,onChange:e=>{n({...t,justifyContent:e})}},i.map((e=>{let{value:t,icon:n,label:o}=e;return(0,s.createElement)(m.__experimentalToggleGroupControlOptionIcon,{key:t,value:t,icon:n,label:o})}))))},toolBarControls:function(){return null},getLayoutStyle:function(e){var t,n;let{selector:o,layout:r={},style:l,blockName:i,hasBlockGapSupport:s,layoutDefinitions:a}=e;const{contentSize:c,wideSize:u,justifyContent:d}=r,p=Vr(null==l||null===(t=l.spacing)||void 0===t?void 0:t.blockGap);let m="";dr(i,"spacing","blockGap")||(null!=p&&p.top?m=Vr(null==p?void 0:p.top):"string"==typeof p&&(m=Vr(p)));const g="left"===d?"0 !important":"auto !important",h="right"===d?"0 !important":"auto !important";let f=c||u?`\n\t\t\t\t\t${Io(o,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {\n\t\t\t\t\t\tmax-width: ${null!=c?c:u};\n\t\t\t\t\t\tmargin-left: ${g};\n\t\t\t\t\t\tmargin-right: ${h};\n\t\t\t\t\t}\n\t\t\t\t\t${Io(o,"> .alignwide")} {\n\t\t\t\t\t\tmax-width: ${null!=u?u:c};\n\t\t\t\t\t}\n\t\t\t\t\t${Io(o,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";return"left"===d?f+=`${Io(o,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-left: ${g}; }`:"right"===d&&(f+=`${Io(o,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-right: ${h}; }`),null!=l&&null!==(n=l.spacing)&&void 0!==n&&n.padding&&(0,gl.getCSSRules)(l).forEach((e=>{"paddingRight"===e.key?f+=`\n\t\t\t\t\t${Io(o,"> .alignfull")} {\n\t\t\t\t\t\tmargin-right: calc(${e.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`:"paddingLeft"===e.key&&(f+=`\n\t\t\t\t\t${Io(o,"> .alignfull")} {\n\t\t\t\t\t\tmargin-left: calc(${e.value} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`)})),s&&m&&(f+=xo(o,a,"constrained",m)),f},getOrientation:()=>"vertical",getAlignments(e){const t=To(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:o}=e,r=[{name:"left"},{name:"center"},{name:"right"}];return n&&r.unshift({name:"full"}),o&&r.unshift({name:"wide",info:t.wide}),r.unshift({name:"none",info:t.none}),r}},fl=[ul,ll,hl];function vl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return fl.find((t=>t.name===e))}const bl={type:"default"},_l=(0,s.createContext)(bl),kl=_l.Provider;function yl(){return(0,s.useContext)(_l)}function El(e){let{layout:t={},css:n,...o}=e;const r=vl(t.type),l=null!==Yo("spacing.blockGap");if(r){var i;if(n)return(0,s.createElement)("style",null,n);const e=null===(i=r.getLayoutStyle)||void 0===i?void 0:i.call(r,{hasBlockGapSupport:l,layout:t,...o});if(e)return(0,s.createElement)("style",null,e)}return null}const Cl=["none","left","center","right","wide","full"],Sl=["wide","full"];function wl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Cl;e.includes("none")||(e=["none",...e]);const{wideControlsEnabled:t=!1,themeSupportsLayout:n}=(0,p.useSelect)((e=>{const{getSettings:t}=e(co),n=t();return{wideControlsEnabled:n.alignWide,themeSupportsLayout:n.supportsLayout}}),[]),o=yl(),r=vl(null==o?void 0:o.type),l=r.getAlignments(o);if(n){const t=l.filter((t=>{let{name:n}=t;return e.includes(n)}));return 1===t.length&&"none"===t[0].name?[]:t}if("default"!==r.name&&"constrained"!==r.name)return[];const{alignments:i=Cl}=o,s=e.filter((e=>(o.alignments||t||!Sl.includes(e))&&i.includes(e))).map((e=>({name:e})));return 1===s.length&&"none"===s[0].name?[]:s}const Bl=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),Il=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),xl=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),Tl=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"})),Nl={none:{icon:Bl,title:(0,h._x)("None","Alignment option")},left:{icon:Il,title:(0,h.__)("Align left")},center:{icon:pl,title:(0,h.__)("Align center")},right:{icon:xl,title:(0,h.__)("Align right")},wide:{icon:ml,title:(0,h.__)("Wide width")},full:{icon:Tl,title:(0,h.__)("Full width")}},Pl={isAlternate:!0},Ml=function(e){let{value:t,onChange:n,controls:o,isToolbar:r,isCollapsed:l=!0}=e;const a=wl(o);if(!a.length)return null;function u(e){n([t,"none"].includes(e)?void 0:e)}const d=Nl[t],p=Nl.none,g=r?m.ToolbarGroup:m.ToolbarDropdownMenu,f={icon:d?d.icon:p.icon,label:(0,h.__)("Align")},v=r?{isCollapsed:l,controls:a.map((e=>{let{name:n}=e;return{...Nl[n],isActive:t===n||!t&&"none"===n,role:l?"menuitemradio":void 0,onClick:()=>u(n)}}))}:{toggleProps:{describedBy:(0,h.__)("Change alignment")},popoverProps:Pl,children:e=>{let{onClose:n}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(m.MenuGroup,{className:"block-editor-block-alignment-control__menu-group"},a.map((e=>{let{name:o,info:r}=e;const{icon:l,title:i}=Nl[o],a=o===t||!t&&"none"===o;return(0,s.createElement)(m.MenuItem,{key:o,icon:l,iconPosition:"left",className:c()("components-dropdown-menu__menu-item",{"is-active":a}),isSelected:a,onClick:()=>{u(o),n()},role:"menuitemradio",info:r},i)}))))}};return(0,s.createElement)(g,i({},f,v))},Ll=e=>(0,s.createElement)(Ml,i({},e,{isToolbar:!1})),Rl=e=>(0,s.createElement)(Ml,i({},e,{isToolbar:!0})),Al=["left","center","right","wide","full"],Dl=["wide","full"];function Ol(e){let t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?Al.filter((t=>e.includes(t))):!0===e?[...Al]:[],!o||!0===e&&!n?(0,u.without)(t,...Dl):t}const zl=(0,d.createHigherOrderComponent)((e=>t=>{const n=(0,s.createElement)(e,t),{name:o}=t,l=wl(Ol((0,r.getBlockSupport)(o,"align"),(0,r.hasBlockSupport)(o,"alignWide",!0))).map((e=>{let{name:t}=e;return t})),i=(0,p.useSelect)((e=>e(co).__unstableGetContentLockingParent(t.clientId)),[t.clientId]);return!l.length||i?n:(0,s.createElement)(s.Fragment,null,(0,s.createElement)(ko,{group:"block",__experimentalShareWithChildBlocks:!0},(0,s.createElement)(Ll,{value:t.attributes.align,onChange:e=>{if(!e){var n,o;const l=(0,r.getBlockType)(t.name);(null==l||null===(n=l.attributes)||void 0===n||null===(o=n.align)||void 0===o?void 0:o.default)&&(e="")}t.setAttributes({align:e})},controls:l})),n)}),"withToolbarControls"),Fl=(0,d.createHigherOrderComponent)((e=>t=>{const{name:n,attributes:o}=t,{align:l}=o,a=wl(Ol((0,r.getBlockSupport)(n,"align"),(0,r.hasBlockSupport)(n,"alignWide",!0)));if(void 0===l)return(0,s.createElement)(e,t);let c=t.wrapperProps;return a.some((e=>e.name===l))&&(c={...c,"data-align":l}),(0,s.createElement)(e,i({},t,{wrapperProps:c}))}));(0,l.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.align)&&void 0!==t?t:{})||(0,r.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...Al,""]}}),e})),(0,l.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",Fl),(0,l.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",zl),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){const{align:o}=n;return Ol((0,r.getBlockSupport)(t,"align"),(0,r.hasBlockSupport)(t,"alignWide",!0)).includes(o)&&(e.className=c()(`align${o}`,e.className)),e})),(0,l.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.lock)&&void 0!==t?t:{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));const Vl=/[\s#]/g,Hl={type:"string",source:"attribute",attribute:"id",selector:"*"},Gl=(0,d.createHigherOrderComponent)((e=>t=>{if((0,r.hasBlockSupport)(t.name,"anchor")&&t.isSelected){const n="web"===s.Platform.OS,o=(0,s.createElement)(m.TextControl,{className:"html-anchor-control",label:(0,h.__)("HTML anchor"),help:(0,s.createElement)(s.Fragment,null,(0,h.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),n&&(0,s.createElement)(m.ExternalLink,{href:(0,h.__)("https://wordpress.org/support/article/page-jumps/")},(0,h.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:(0,h.__)("Add an anchor"),onChange:e=>{e=e.replace(Vl,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(e,t),n&&(0,s.createElement)(vr,{__experimentalGroup:"advanced"},o),!n&&"core/heading"===t.name&&(0,s.createElement)(vr,null,(0,s.createElement)(m.PanelBody,{title:(0,h.__)("Heading settings")},o)))}return(0,s.createElement)(e,t)}),"withInspectorControl");(0,l.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){var t,n;return"type"in(null!==(t=null===(n=e.attributes)||void 0===n?void 0:n.anchor)&&void 0!==t?t:{})||(0,r.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:Hl}),e})),(0,l.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",Gl),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return(0,r.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));const Ul={type:"string",source:"attribute",attribute:"aria-label",selector:"*"};(0,l.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",(function(e){var t,n;return null!=e&&null!==(t=e.attributes)&&void 0!==t&&null!==(n=t.ariaLabel)&&void 0!==n&&n.type||(0,r.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:Ul}),e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/ariaLabel/save-props",(function(e,t,n){return(0,r.hasBlockSupport)(t,"ariaLabel")&&(e["aria-label"]=""===n.ariaLabel?null:n.ariaLabel),e}));const Wl=(0,d.createHigherOrderComponent)((e=>t=>(0,r.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?(0,s.createElement)(s.Fragment,null,(0,s.createElement)(e,t),(0,s.createElement)(vr,{__experimentalGroup:"advanced"},(0,s.createElement)(m.TextControl,{autoComplete:"off",label:(0,h.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:e=>{t.setAttributes({className:""!==e?e:void 0})},help:(0,h.__)("Separate multiple classes with spaces.")}))):(0,s.createElement)(e,t)),"withInspectorControl");(0,l.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return(0,r.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,l.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",Wl),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return(0,r.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=c()(e.className,n.className)),e})),(0,l.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){if(!(0,r.hasBlockSupport)(e.name,"customClassName",!0))return e;if(1===o.length&&e.innerBlocks.length===t.length)return e;if(1===o.length&&t.length>1||o.length>1&&1===t.length)return e;if(t[n]){var l;const o=null===(l=t[n])||void 0===l?void 0:l.attributes.className;if(o)return{...e,attributes:{...e.attributes,className:o}}}return e})),(0,l.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,r.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=[...new Set([(0,r.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,r.getBlockDefaultClassName)(t.name)),e}));const jl=window.wp.dom,$l=(0,s.createContext)({});function Kl(e){let{value:t,children:n}=e;const o=(0,s.useContext)($l),r=(0,s.useMemo)((()=>({...o,...t})),[o,t]);return(0,s.createElement)($l.Provider,{value:r,children:n})}const ql=$l,Yl={},Ql=(0,m.withFilters)("editor.BlockEdit")((e=>{const{attributes:t={},name:n}=e,o=(0,r.getBlockType)(n),l=(0,s.useContext)(ql),a=(0,s.useMemo)((()=>o&&o.usesContext?(0,u.pick)(l,o.usesContext):Yl),[o,l]);if(!o)return null;const d=o.edit||o.save;if(o.apiVersion>1)return(0,s.createElement)(d,i({},e,{context:a}));const p=(0,r.hasBlockSupport)(o,"className",!0)?(0,r.getBlockDefaultClassName)(n):null,m=c()(p,t.className,e.className);return(0,s.createElement)(d,i({},e,{context:a,className:m}))}));function Zl(e){const{name:t,isSelected:n,clientId:o}=e,r={name:t,isSelected:n,clientId:o};return(0,s.createElement)(mo,{value:(0,s.useMemo)((()=>r),Object.values(r))},(0,s.createElement)(Ql,e))}const Xl=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"})),Jl=function(e){let{className:t,actions:n,children:o,secondaryActions:r}=e;return(0,s.createElement)("div",{style:{display:"contents",all:"initial"}},(0,s.createElement)("div",{className:c()(t,"block-editor-warning")},(0,s.createElement)("div",{className:"block-editor-warning__contents"},(0,s.createElement)("p",{className:"block-editor-warning__message"},o),(s.Children.count(n)>0||r)&&(0,s.createElement)("div",{className:"block-editor-warning__actions"},s.Children.count(n)>0&&s.Children.map(n,((e,t)=>(0,s.createElement)("span",{key:t,className:"block-editor-warning__action"},e))),r&&(0,s.createElement)(m.DropdownMenu,{className:"block-editor-warning__secondary",icon:Xl,label:(0,h.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(()=>(0,s.createElement)(m.MenuGroup,null,r.map(((e,t)=>(0,s.createElement)(m.MenuItem,{onClick:e.onClick,key:t},e.title))))))))))};var ei=n(1973);function ti(e){let{title:t,rawContent:n,renderedContent:o,action:r,actionText:l,className:i}=e;return(0,s.createElement)("div",{className:i},(0,s.createElement)("div",{className:"block-editor-block-compare__content"},(0,s.createElement)("h2",{className:"block-editor-block-compare__heading"},t),(0,s.createElement)("div",{className:"block-editor-block-compare__html"},n),(0,s.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},(0,s.createElement)(s.RawHTML,null,(0,jl.safeHTML)(o)))),(0,s.createElement)("div",{className:"block-editor-block-compare__action"},(0,s.createElement)(m.Button,{variant:"secondary",tabIndex:"0",onClick:r},l)))}const ni=function(e){let{block:t,onKeep:n,onConvert:o,convertor:l,convertButtonText:i}=e;const a=(d=l(t),(0,u.castArray)(d).map((e=>(0,r.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var d;const p=(m=t.originalContent,g=a,(0,ei.Kx)(m,g).map(((e,t)=>{const n=c()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,s.createElement)("span",{key:t,className:n},e.value)})));var m,g;return(0,s.createElement)("div",{className:"block-editor-block-compare__wrapper"},(0,s.createElement)(ti,{title:(0,h.__)("Current"),className:"block-editor-block-compare__current",action:n,actionText:(0,h.__)("Convert to HTML"),rawContent:t.originalContent,renderedContent:t.originalContent}),(0,s.createElement)(ti,{title:(0,h.__)("After Conversion"),className:"block-editor-block-compare__converted",action:o,actionText:i,rawContent:p,renderedContent:a}))},oi=e=>(0,r.rawHandler)({HTML:e.originalContent}),ri=(0,d.compose)([(0,p.withSelect)(((e,t)=>{let{clientId:n}=t;return{block:e(co).getBlock(n)}})),(0,p.withDispatch)(((e,t)=>{let{block:n}=t;const{replaceBlock:o}=e(co);return{convertToClassic(){o(n.clientId,(e=>(0,r.createBlock)("core/freeform",{content:e.originalContent}))(n))},convertToHTML(){o(n.clientId,(e=>(0,r.createBlock)("core/html",{content:e.originalContent}))(n))},convertToBlocks(){o(n.clientId,oi(n))},attemptBlockRecovery(){o(n.clientId,(e=>{let{name:t,attributes:n,innerBlocks:o}=e;return(0,r.createBlock)(t,n,o)})(n))}}}))])((function(e){let{convertToHTML:t,convertToBlocks:n,convertToClassic:o,attemptBlockRecovery:l,block:i}=e;const a=!!(0,r.getBlockType)("core/html"),[c,u]=(0,s.useState)(!1),d=(0,s.useCallback)((()=>u(!0)),[]),p=(0,s.useCallback)((()=>u(!1)),[]),g=(0,s.useMemo)((()=>[{
|
10 |
// translators: Button to fix block content
|
11 |
+
title:(0,h._x)("Resolve","imperative verb"),onClick:d},a&&{title:(0,h.__)("Convert to HTML"),onClick:t},{title:(0,h.__)("Convert to Classic Block"),onClick:o}].filter(Boolean)),[d,t,o]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Jl,{actions:[(0,s.createElement)(m.Button,{key:"recover",onClick:l,variant:"primary"},(0,h.__)("Attempt Block Recovery"))],secondaryActions:g},(0,h.__)("This block contains unexpected or invalid content.")),c&&(0,s.createElement)(m.Modal,{title:// translators: Dialog title to fix block content
|
12 |
+
(0,h.__)("Resolve Block"),onRequestClose:p,className:"block-editor-block-compare"},(0,s.createElement)(ni,{block:i,onKeep:t,onConvert:n,convertor:oi,convertButtonText:(0,h.__)("Convert to Blocks")})))})),li=(0,s.createElement)(Jl,{className:"block-editor-block-list__block-crash-warning"},(0,h.__)("This block has encountered an error and cannot be previewed.")),ii=()=>li;class si extends s.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}const ai=si;var ci=n(773);const ui=function(e){let{clientId:t}=e;const[n,o]=(0,s.useState)(""),l=(0,p.useSelect)((e=>e(co).getBlock(t)),[t]),{updateBlock:i}=(0,p.useDispatch)(co);return(0,s.useEffect)((()=>{o((0,r.getBlockContent)(l))}),[l]),(0,s.createElement)(ci.Z,{className:"block-editor-block-list__block-html-textarea",value:n,onBlur:()=>{const e=(0,r.getBlockType)(l.name);if(!e)return;const s=(0,r.getBlockAttributes)(e,n,l.attributes),a=n||(0,r.getSaveContent)(e,s),[c]=n?(0,r.validateBlock)({...l,attributes:s,originalContent:a}):[!0];i(t,{attributes:s,originalContent:a,isValid:c}),n||o({content:a})},onChange:e=>o(e.target.value)})};let di=Ii();const pi=e=>Ci(e,di);let mi=Ii();pi.write=e=>Ci(e,mi);let gi=Ii();pi.onStart=e=>Ci(e,gi);let hi=Ii();pi.onFrame=e=>Ci(e,hi);let fi=Ii();pi.onFinish=e=>Ci(e,fi);let vi=[];pi.setTimeout=(e,t)=>{let n=pi.now()+t,o=()=>{let e=vi.findIndex((e=>e.cancel==o));~e&&vi.splice(e,1),yi-=~e?1:0},r={time:n,handler:e,cancel:o};return vi.splice(bi(n),0,r),yi+=1,Si(),r};let bi=e=>~(~vi.findIndex((t=>t.time>e))||~vi.length);pi.cancel=e=>{gi.delete(e),hi.delete(e),fi.delete(e),di.delete(e),mi.delete(e)},pi.sync=e=>{Ei=!0,pi.batchedUpdates(e),Ei=!1},pi.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function o(...e){t=e,pi.onStart(n)}return o.handler=e,o.cancel=()=>{gi.delete(n),t=null},o};let _i="undefined"!=typeof window?window.requestAnimationFrame:()=>{};pi.use=e=>_i=e,pi.now="undefined"!=typeof performance?()=>performance.now():Date.now,pi.batchedUpdates=e=>e(),pi.catch=console.error,pi.frameLoop="always",pi.advance=()=>{"demand"!==pi.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Bi()};let ki=-1,yi=0,Ei=!1;function Ci(e,t){Ei?(t.delete(e),e(0)):(t.add(e),Si())}function Si(){ki<0&&(ki=0,"demand"!==pi.frameLoop&&_i(wi))}function wi(){~ki&&(_i(wi),pi.batchedUpdates(Bi))}function Bi(){let e=ki;ki=pi.now();let t=bi(ki);t&&(xi(vi.splice(0,t),(e=>e.handler())),yi-=t),yi?(gi.flush(),di.flush(e?Math.min(64,ki-e):16.667),hi.flush(),mi.flush(),fi.flush()):ki=-1}function Ii(){let e=new Set,t=e;return{add(n){yi+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(yi-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,yi-=t.size,xi(t,(t=>t(n)&&e.add(t))),yi+=e.size,t=e)}}}function xi(e,t){e.forEach((e=>{try{t(e)}catch(e){pi.catch(e)}}))}var Ti=n(9196),Ni=n.n(Ti);function Pi(){}const Mi={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function Li(e,t){if(Mi.arr(e)){if(!Mi.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}const Ri=(e,t)=>e.forEach(t);function Ai(e,t,n){if(Mi.arr(e))for(let o=0;o<e.length;o++)t.call(n,e[o],`${o}`);else for(const o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o)}const Di=e=>Mi.und(e)?[]:Mi.arr(e)?e:[e];function Oi(e,t){if(e.size){const n=Array.from(e);e.clear(),Ri(n,t)}}const zi=(e,...t)=>Oi(e,(e=>e(...t))),Fi=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent);let Vi,Hi,Gi=null,Ui=!1,Wi=Pi;var ji=Object.freeze({__proto__:null,get createStringInterpolator(){return Vi},get to(){return Hi},get colors(){return Gi},get skipAnimation(){return Ui},get willAdvance(){return Wi},assign:e=>{e.to&&(Hi=e.to),e.now&&(pi.now=e.now),void 0!==e.colors&&(Gi=e.colors),null!=e.skipAnimation&&(Ui=e.skipAnimation),e.createStringInterpolator&&(Vi=e.createStringInterpolator),e.requestAnimationFrame&&pi.use(e.requestAnimationFrame),e.batchedUpdates&&(pi.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Wi=e.willAdvance),e.frameLoop&&(pi.frameLoop=e.frameLoop)}});const $i=new Set;let Ki=[],qi=[],Yi=0;const Qi={get idle(){return!$i.size&&!Ki.length},start(e){Yi>e.priority?($i.add(e),pi.onStart(Zi)):(Xi(e),pi(es))},advance:es,sort(e){if(Yi)pi.onFrame((()=>Qi.sort(e)));else{const t=Ki.indexOf(e);~t&&(Ki.splice(t,1),Ji(e))}},clear(){Ki=[],$i.clear()}};function Zi(){$i.forEach(Xi),$i.clear(),pi(es)}function Xi(e){Ki.includes(e)||Ji(e)}function Ji(e){Ki.splice(function(t,n){const o=t.findIndex((t=>t.priority>e.priority));return o<0?t.length:o}(Ki),0,e)}function es(e){const t=qi;for(let n=0;n<Ki.length;n++){const o=Ki[n];Yi=o.priority,o.idle||(Wi(o),o.advance(e),o.idle||t.push(o))}return Yi=0,qi=Ki,qi.length=0,Ki=t,Ki.length>0}const ts="[-+]?\\d*\\.?\\d+",ns=ts+"%";function os(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const rs=new RegExp("rgb"+os(ts,ts,ts)),ls=new RegExp("rgba"+os(ts,ts,ts,ts)),is=new RegExp("hsl"+os(ts,ns,ns)),ss=new RegExp("hsla"+os(ts,ns,ns,ts)),as=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,cs=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,us=/^#([0-9a-fA-F]{6})$/,ds=/^#([0-9a-fA-F]{8})$/;function ps(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ms(e,t,n){const o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,l=ps(r,o,e+1/3),i=ps(r,o,e),s=ps(r,o,e-1/3);return Math.round(255*l)<<24|Math.round(255*i)<<16|Math.round(255*s)<<8}function gs(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function hs(e){return(parseFloat(e)%360+360)%360/360}function fs(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function vs(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function bs(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=us.exec(e))?parseInt(t[1]+"ff",16)>>>0:Gi&&void 0!==Gi[e]?Gi[e]:(t=rs.exec(e))?(gs(t[1])<<24|gs(t[2])<<16|gs(t[3])<<8|255)>>>0:(t=ls.exec(e))?(gs(t[1])<<24|gs(t[2])<<16|gs(t[3])<<8|fs(t[4]))>>>0:(t=as.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=ds.exec(e))?parseInt(t[1],16)>>>0:(t=cs.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=is.exec(e))?(255|ms(hs(t[1]),vs(t[2]),vs(t[3])))>>>0:(t=ss.exec(e))?(ms(hs(t[1]),vs(t[2]),vs(t[3]))|fs(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const _s=(e,t,n)=>{if(Mi.fun(e))return e;if(Mi.arr(e))return _s({range:e,output:t,extrapolate:n});if(Mi.str(e.output[0]))return Vi(e);const o=e,r=o.output,l=o.range||[0,1],i=o.extrapolateLeft||o.extrapolate||"extend",s=o.extrapolateRight||o.extrapolate||"extend",a=o.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,l);return function(e,t,n,o,r,l,i,s,a){let c=a?a(e):e;if(c<t){if("identity"===i)return c;"clamp"===i&&(c=t)}if(c>n){if("identity"===s)return c;"clamp"===s&&(c=n)}return o===r?o:t===n?e<=t?o:r:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=l(c),o===-1/0?c=-c:r===1/0?c+=o:c=c*(r-o)+o,c)}(e,l[t],l[t+1],r[t],r[t+1],a,i,s,o.map)}};function ks(){return ks=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},ks.apply(this,arguments)}const ys=Symbol.for("FluidValue.get"),Es=Symbol.for("FluidValue.observers"),Cs=e=>Boolean(e&&e[ys]),Ss=e=>e&&e[ys]?e[ys]():e,ws=e=>e[Es]||null;function Bs(e,t){let n=e[Es];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}class Is{constructor(e){if(this[ys]=void 0,this[Es]=void 0,!e&&!(e=this.get))throw Error("Unknown getter");xs(this,e)}}const xs=(e,t)=>Ps(e,ys,t);function Ts(e,t){if(e[ys]){let n=e[Es];n||Ps(e,Es,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Ns(e,t){let n=e[Es];if(n&&n.has(t)){const o=n.size-1;o?n.delete(t):e[Es]=null,e.observerRemoved&&e.observerRemoved(o,t)}}const Ps=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ms=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Ls=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Rs=new RegExp(`(${Ms.source})(%|[a-z]+)`,"i"),As=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Ds=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Os=e=>{const[t,n]=zs(e);if(!t||Fi())return e;const o=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(o)return o.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||e}return n&&Ds.test(n)?Os(n):n||e},zs=e=>{const t=Ds.exec(e);if(!t)return[,];const[,n,o]=t;return[n,o]};let Fs;const Vs=(e,t,n,o,r)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(o)}, ${r})`,Hs=e=>{Fs||(Fs=Gi?new RegExp(`(${Object.keys(Gi).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>Ss(e).replace(Ds,Os).replace(Ls,bs).replace(Fs,bs))),n=t.map((e=>e.match(Ms).map(Number))),o=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))),r=o.map((t=>_s(ks({},e,{output:t}))));return e=>{var n;const o=!Rs.test(t[0])&&(null==(n=t.find((e=>Rs.test(e))))?void 0:n.replace(Ms,""));let l=0;return t[0].replace(Ms,(()=>`${r[l++](e)}${o||""}`)).replace(As,Vs)}},Gs="react-spring: ",Us=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${Gs}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},Ws=Us(console.warn),js=Us(console.warn);function $s(e){return Mi.str(e)&&("#"==e[0]||/\d/.test(e)||!Fi()&&Ds.test(e)||e in(Gi||{}))}const Ks=Fi()?Ti.useEffect:Ti.useLayoutEffect;function qs(){const e=(0,Ti.useState)()[1],t=(()=>{const e=(0,Ti.useRef)(!1);return Ks((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}const Ys=e=>(0,Ti.useEffect)(e,Qs),Qs=[];function Zs(e){const t=(0,Ti.useRef)();return(0,Ti.useEffect)((()=>{t.current=e})),t.current}const Xs=Symbol.for("Animated:node"),Js=e=>e&&e[Xs],ea=(e,t)=>{return n=e,o=Xs,r=t,Object.defineProperty(n,o,{value:r,writable:!0,configurable:!0});var n,o,r},ta=e=>e&&e[Xs]&&e[Xs].getPayload();class na{constructor(){this.payload=void 0,ea(this,this)}getPayload(){return this.payload||[]}}class oa extends na{constructor(e){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=e,Mi.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new oa(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Mi.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,Mi.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}}class ra extends oa{constructor(e){super(0),this._string=null,this._toString=void 0,this._toString=_s({output:[e,e]})}static create(e){return new ra(e)}getValue(){let e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(Mi.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=_s({output:[this.getValue(),e]})),this._value=0,super.reset()}}const la={dependencies:null};class ia extends na{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Ai(this.source,((n,o)=>{var r;(r=n)&&r[Xs]===r?t[o]=n.getValue(e):Cs(n)?t[o]=Ss(n):e||(t[o]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Ri(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return Ai(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){la.dependencies&&Cs(e)&&la.dependencies.add(e);const t=ta(e);t&&Ri(t,(e=>this.add(e)))}}class sa extends ia{constructor(e){super(e)}static create(e){return new sa(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(aa)),!0)}}function aa(e){return($s(e)?ra:oa).create(e)}function ca(e){const t=Js(e);return t?t.constructor:Mi.arr(e)?sa:$s(e)?ra:oa}function ua(){return ua=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},ua.apply(this,arguments)}const da=(e,t)=>{const n=!Mi.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Ti.forwardRef)(((o,r)=>{const l=(0,Ti.useRef)(null),i=n&&(0,Ti.useCallback)((e=>{l.current=function(e,t){return e&&(Mi.fun(e)?e(t):e.current=t),t}(r,e)}),[r]),[s,a]=function(e,t){const n=new Set;return la.dependencies=n,e.style&&(e=ua({},e,{style:t.createAnimatedStyle(e.style)})),e=new ia(e),la.dependencies=null,[e,n]}(o,t),c=qs(),u=()=>{const e=l.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,s.getValue(!0)))&&c()},d=new pa(u,a),p=(0,Ti.useRef)();Ks((()=>(p.current=d,Ri(a,(e=>Ts(e,d))),()=>{p.current&&(Ri(p.current.deps,(e=>Ns(e,p.current))),pi.cancel(p.current.update))}))),(0,Ti.useEffect)(u,[]),Ys((()=>()=>{const e=p.current;Ri(e.deps,(t=>Ns(t,e)))}));const m=t.getComponentProps(s.getValue());return Ti.createElement(e,ua({},m,{ref:i}))}))};class pa{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&pi.write(this.update)}}const ma=Symbol.for("AnimatedComponent"),ga=e=>Mi.str(e)?e:e&&Mi.str(e.displayName)?e.displayName:Mi.fun(e)&&e.name||null;function ha(){return ha=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},ha.apply(this,arguments)}function fa(e,...t){return Mi.fun(e)?e(...t):e}const va=(e,t)=>!0===e||!!(t&&e&&(Mi.fun(e)?e(t):Di(e).includes(t))),ba=(e,t)=>Mi.obj(e)?t&&e[t]:e,_a=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,ka=e=>e,ya=(e,t=ka)=>{let n=Ea;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const o={};for(const r of n){const n=t(e[r],r);Mi.und(n)||(o[r]=n)}return o},Ea=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Ca={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function Sa(e){const t=function(e){const t={};let n=0;if(Ai(e,((e,o)=>{Ca[o]||(t[o]=e,n++)})),n)return t}(e);if(t){const n={to:t};return Ai(e,((e,o)=>o in t||(n[o]=e))),n}return ha({},e)}function wa(e){return e=Ss(e),Mi.arr(e)?e.map(wa):$s(e)?ji.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Ba(e){for(const t in e)return!0;return!1}function Ia(e){return Mi.fun(e)||Mi.arr(e)&&Mi.obj(e[0])}function xa(e,t){var n;null==(n=e.ref)||n.delete(e),null==t||t.delete(e)}function Ta(e,t){var n;t&&e.ref!==t&&(null==(n=e.ref)||n.delete(e),t.add(e),e.ref=t)}const Na=1.70158,Pa=1.525*Na,Ma=Na+1,La=2*Math.PI/3,Ra=2*Math.PI/4.5,Aa=e=>{const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},Da={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>Ma*e*e*e-Na*e*e,easeOutBack:e=>1+Ma*Math.pow(e-1,3)+Na*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-Pa)/2:(Math.pow(2*e-2,2)*((Pa+1)*(2*e-2)+Pa)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*La),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*La)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Ra)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Ra)/2+1,easeInBounce:e=>1-Aa(1-e),easeOutBounce:Aa,easeInOutBounce:e=>e<.5?(1-Aa(1-2*e))/2:(1+Aa(2*e-1))/2},Oa=ha({},{tension:170,friction:26},{mass:1,damping:1,easing:Da.linear,clamp:!1});class za{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,Oa)}}function Fa(e,t){if(Mi.und(t.decay)){const n=!Mi.und(t.tension)||!Mi.und(t.friction);!n&&Mi.und(t.frequency)&&Mi.und(t.damping)&&Mi.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}const Va=[];class Ha{constructor(){this.changed=!1,this.values=Va,this.toValues=null,this.fromValues=Va,this.to=void 0,this.from=void 0,this.config=new za,this.immediate=!1}}function Ga(e,{key:t,props:n,defaultProps:o,state:r,actions:l}){return new Promise(((i,s)=>{var a;let c,u,d=va(null!=(a=n.cancel)?a:null==o?void 0:o.cancel,t);if(d)g();else{Mi.und(n.pause)||(r.paused=va(n.pause,t));let e=null==o?void 0:o.pause;!0!==e&&(e=r.paused||va(e,t)),c=fa(n.delay||0,t),e?(r.resumeQueue.add(m),l.pause()):(l.resume(),m())}function p(){r.resumeQueue.add(m),r.timeouts.delete(u),u.cancel(),c=u.time-pi.now()}function m(){c>0&&!ji.skipAnimation?(r.delayed=!0,u=pi.setTimeout(g,c),r.pauseQueue.add(p),r.timeouts.add(u)):g()}function g(){r.delayed&&(r.delayed=!1),r.pauseQueue.delete(p),r.timeouts.delete(u),e<=(r.cancelId||0)&&(d=!0);try{l.start(ha({},n,{callId:e,cancel:d}),i)}catch(e){s(e)}}}))}const Ua=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?$a(e.get()):t.every((e=>e.noop))?Wa(e.get()):ja(e.get(),t.every((e=>e.finished))),Wa=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),ja=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),$a=e=>({value:e,cancelled:!0,finished:!1});function Ka(e,t,n,o){const{callId:r,parentId:l,onRest:i}=t,{asyncTo:s,promise:a}=n;return l||e!==s||t.reset?n.promise=(async()=>{n.asyncId=r,n.asyncTo=e;const c=ya(t,((e,t)=>"onRest"===t?void 0:e));let u,d;const p=new Promise(((e,t)=>(u=e,d=t))),m=e=>{const t=r<=(n.cancelId||0)&&$a(o)||r!==n.asyncId&&ja(o,!1);if(t)throw e.result=t,d(e),e},g=(e,t)=>{const l=new Ya,i=new Qa;return(async()=>{if(ji.skipAnimation)throw qa(n),i.result=ja(o,!1),d(i),i;m(l);const s=Mi.obj(e)?ha({},e):ha({},t,{to:e});s.parentId=r,Ai(c,((e,t)=>{Mi.und(s[t])&&(s[t]=e)}));const a=await o.start(s);return m(l),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),a})()};let h;if(ji.skipAnimation)return qa(n),ja(o,!1);try{let t;t=Mi.arr(e)?(async e=>{for(const t of e)await g(t)})(e):Promise.resolve(e(g,o.stop.bind(o))),await Promise.all([t.then(u),p]),h=ja(o.get(),!0,!1)}catch(e){if(e instanceof Ya)h=e.result;else{if(!(e instanceof Qa))throw e;h=e.result}}finally{r==n.asyncId&&(n.asyncId=l,n.asyncTo=l?s:void 0,n.promise=l?a:void 0)}return Mi.fun(i)&&pi.batchedUpdates((()=>{i(h,o,o.item)})),h})():a}function qa(e,t){Oi(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}class Ya extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."),this.result=void 0}}class Qa extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}}const Za=e=>e instanceof Ja;let Xa=1;class Ja extends Is{constructor(...e){super(...e),this.id=Xa++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Js(this);return e&&e.getValue()}to(...e){return ji.to(this,e)}interpolate(...e){return Ws(`${Gs}The "interpolate" function is deprecated in v9 (use "to" instead)`),ji.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Bs(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Qi.sort(this),Bs(this,{type:"priority",parent:this,priority:e})}}const ec=Symbol.for("SpringPhase"),tc=e=>(1&e[ec])>0,nc=e=>(2&e[ec])>0,oc=e=>(4&e[ec])>0,rc=(e,t)=>t?e[ec]|=3:e[ec]&=-3,lc=(e,t)=>t?e[ec]|=4:e[ec]&=-5;class ic extends Ja{constructor(e,t){if(super(),this.key=void 0,this.animation=new Ha,this.queue=void 0,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Mi.und(e)||!Mi.und(t)){const n=Mi.obj(e)?ha({},e):ha({},t,{from:e});Mi.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(nc(this)||this._state.asyncTo)||oc(this)}get goal(){return Ss(this.animation.to)}get velocity(){const e=Js(this);return e instanceof oa?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return tc(this)}get isAnimating(){return nc(this)}get isPaused(){return oc(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const o=this.animation;let{config:r,toValues:l}=o;const i=ta(o.to);!i&&Cs(o.to)&&(l=Di(Ss(o.to))),o.values.forEach(((s,a)=>{if(s.done)return;const c=s.constructor==ra?1:i?i[a].lastPosition:l[a];let u=o.immediate,d=c;if(!u){if(d=s.lastPosition,r.tension<=0)return void(s.done=!0);let t=s.elapsedTime+=e;const n=o.fromValues[a],l=null!=s.v0?s.v0:s.v0=Mi.arr(r.velocity)?r.velocity[a]:r.velocity;let i;const p=r.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n)));if(Mi.und(r.duration))if(r.decay){const e=!0===r.decay?.998:r.decay,o=Math.exp(-(1-e)*t);d=n+l/(1-e)*(1-o),u=Math.abs(s.lastPosition-d)<=p,i=l*o}else{i=null==s.lastVelocity?l:s.lastVelocity;const t=r.restVelocity||p/10,o=r.clamp?0:r.bounce,a=!Mi.und(o),m=n==c?s.v0>0:n<c;let g,h=!1;const f=1,v=Math.ceil(e/f);for(let e=0;e<v&&(g=Math.abs(i)>t,g||(u=Math.abs(c-d)<=p,!u));++e)a&&(h=d==c||d>c==m,h&&(i=-i*o,d=c)),i+=(1e-6*-r.tension*(d-c)+.001*-r.friction*i)/r.mass*f,d+=i*f}else{let o=1;r.duration>0&&(this._memoizedDuration!==r.duration&&(this._memoizedDuration=r.duration,s.durationProgress>0&&(s.elapsedTime=r.duration*s.durationProgress,t=s.elapsedTime+=e)),o=(r.progress||0)+t/this._memoizedDuration,o=o>1?1:o<0?0:o,s.durationProgress=o),d=n+r.easing(o)*(c-n),i=(d-s.lastPosition)/e,u=1==o}s.lastVelocity=i,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}i&&!i[a].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,r.round)&&(n=!0)}));const s=Js(this),a=s.getValue();if(t){const e=Ss(o.to);a===e&&!n||r.decay?n&&r.decay&&this._onChange(a):(s.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(a)}set(e){return pi.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(nc(this)){const{to:e,config:t}=this.animation;pi.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return Mi.und(e)?(n=this.queue||[],this.queue=[]):n=[Mi.obj(e)?e:ha({},t,{to:e})],Promise.all(n.map((e=>this._update(e)))).then((e=>Ua(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),qa(this._state,e&&this._lastCallId),pi.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:o}=e;n=Mi.obj(n)?n[t]:n,(null==n||Ia(n))&&(n=void 0),o=Mi.obj(o)?o[t]:o,null==o&&(o=void 0);const r={to:n,from:o};return tc(this)||(e.reverse&&([n,o]=[o,n]),o=Ss(o),Mi.und(o)?Js(this)||this._set(n):this._set(o)),r}_update(e,t){let n=ha({},e);const{key:o,defaultProps:r}=this;n.default&&Object.assign(r,ya(n,((e,t)=>/^on/.test(t)?ba(e,o):e))),mc(this,n,"onProps"),gc(this,"onProps",n,this);const l=this._prepareNode(n);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return Ga(++this._lastCallId,{key:o,props:n,defaultProps:r,state:i,actions:{pause:()=>{oc(this)||(lc(this,!0),zi(i.pauseQueue),gc(this,"onPause",ja(this,sc(this,this.animation.to)),this))},resume:()=>{oc(this)&&(lc(this,!1),nc(this)&&this._resume(),zi(i.resumeQueue),gc(this,"onResume",ja(this,sc(this,this.animation.to)),this))},start:this._merge.bind(this,l)}}).then((e=>{if(n.loop&&e.finished&&(!t||!e.noop)){const e=ac(n);if(e)return this._update(e,!0)}return e}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n($a(this));const o=!Mi.und(e.to),r=!Mi.und(e.from);if(o||r){if(!(t.callId>this._lastToId))return n($a(this));this._lastToId=t.callId}const{key:l,defaultProps:i,animation:s}=this,{to:a,from:c}=s;let{to:u=a,from:d=c}=e;!r||o||t.default&&!Mi.und(u)||(u=d),t.reverse&&([u,d]=[d,u]);const p=!Li(d,c);p&&(s.from=d),d=Ss(d);const m=!Li(u,a);m&&this._focus(u);const g=Ia(t.to),{config:h}=s,{decay:f,velocity:v}=h;(o||r)&&(h.velocity=0),t.config&&!g&&function(e,t,n){n&&(Fa(n=ha({},n),t),t=ha({},n,t)),Fa(e,t),Object.assign(e,t);for(const t in Oa)null==e[t]&&(e[t]=Oa[t]);let{mass:o,frequency:r,damping:l}=e;Mi.und(r)||(r<.01&&(r=.01),l<0&&(l=0),e.tension=Math.pow(2*Math.PI/r,2)*o,e.friction=4*Math.PI*l*o/r)}(h,fa(t.config,l),t.config!==i.config?fa(i.config,l):void 0);let b=Js(this);if(!b||Mi.und(u))return n(ja(this,!0));const _=Mi.und(t.reset)?r&&!t.default:!Mi.und(d)&&va(t.reset,l),k=_?d:this.get(),y=wa(u),E=Mi.num(y)||Mi.arr(y)||$s(y),C=!g&&(!E||va(i.immediate||t.immediate,l));if(m){const e=ca(u);if(e!==b.constructor){if(!C)throw Error(`Cannot animate between ${b.constructor.name} and ${e.name}, as the "to" prop suggests`);b=this._set(y)}}const S=b.constructor;let w=Cs(u),B=!1;if(!w){const e=_||!tc(this)&&p;(m||e)&&(B=Li(wa(k),y),w=!B),(Li(s.immediate,C)||C)&&Li(h.decay,f)&&Li(h.velocity,v)||(w=!0)}if(B&&nc(this)&&(s.changed&&!_?w=!0:w||this._stop(a)),!g&&((w||Cs(a))&&(s.values=b.getPayload(),s.toValues=Cs(u)?null:S==ra?[1]:Di(y)),s.immediate!=C&&(s.immediate=C,C||_||this._set(a)),w)){const{onRest:e}=s;Ri(pc,(e=>mc(this,t,e)));const o=ja(this,sc(this,a));zi(this._pendingCalls,o),this._pendingCalls.add(n),s.changed&&pi.batchedUpdates((()=>{s.changed=!_,null==e||e(o,this),_?fa(i.onRest,o):null==s.onStart||s.onStart(o,this)}))}_&&this._set(k),g?n(Ka(t.to,t,this._state,this)):w?this._start():nc(this)&&!m?this._pendingCalls.add(n):n(Wa(k))}_focus(e){const t=this.animation;e!==t.to&&(ws(this)&&this._detach(),t.to=e,ws(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Cs(t)&&(Ts(t,this),Za(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Cs(e)&&Ns(e,this)}_set(e,t=!0){const n=Ss(e);if(!Mi.und(n)){const e=Js(this);if(!e||!Li(n,e.getValue())){const o=ca(n);e&&e.constructor==o?e.setValue(n):ea(this,o.create(n)),e&&pi.batchedUpdates((()=>{this._onChange(n,t)}))}}return Js(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,gc(this,"onStart",ja(this,sc(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),fa(this.animation.onChange,e,this)),fa(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Js(this).reset(Ss(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),nc(this)||(rc(this,!0),oc(this)||this._resume())}_resume(){ji.skipAnimation?this.finish():Qi.start(this)}_stop(e,t){if(nc(this)){rc(this,!1);const n=this.animation;Ri(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Bs(this,{type:"idle",parent:this});const o=t?$a(this.get()):ja(this.get(),sc(this,null!=e?e:n.to));zi(this._pendingCalls,o),n.changed&&(n.changed=!1,gc(this,"onRest",o,this))}}}function sc(e,t){const n=wa(t);return Li(wa(e.get()),n)}function ac(e,t=e.loop,n=e.to){let o=fa(t);if(o){const r=!0!==o&&Sa(o),l=(r||e).reverse,i=!r||r.reset;return cc(ha({},e,{loop:t,default:!1,pause:void 0,to:!l||Ia(n)?n:void 0,from:i?e.from:void 0,reset:i},r))}}function cc(e){const{to:t,from:n}=e=Sa(e),o=new Set;return Mi.obj(t)&&dc(t,o),Mi.obj(n)&&dc(n,o),e.keys=o.size?Array.from(o):null,e}function uc(e){const t=cc(e);return Mi.und(t.default)&&(t.default=ya(t)),t}function dc(e,t){Ai(e,((e,n)=>null!=e&&t.add(n)))}const pc=["onStart","onRest","onChange","onPause","onResume"];function mc(e,t,n){e.animation[n]=t[n]!==_a(t,n)?ba(t[n],e.key):void 0}function gc(e,t,...n){var o,r,l,i;null==(o=(r=e.animation)[t])||o.call(r,...n),null==(l=(i=e.defaultProps)[t])||l.call(i,...n)}const hc=["onStart","onChange","onRest"];let fc=1;class vc{constructor(e,t){this.id=fc++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start(ha({default:!0},e))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(const t in e){const n=e[t];Mi.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(cc(e)),this}start(e){let{queue:t}=this;return e?t=Di(e).map(cc):this.queue=[],this._flush?this._flush(this,t):(Sc(this,t),bc(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Ri(Di(t),(t=>n[t].stop(!!e)))}else qa(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Mi.und(e))this.start({pause:!0});else{const t=this.springs;Ri(Di(e),(e=>t[e].pause()))}return this}resume(e){if(Mi.und(e))this.start({pause:!1});else{const t=this.springs;Ri(Di(e),(e=>t[e].resume()))}return this}each(e){Ai(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,o=this._active.size>0,r=this._changed.size>0;(o&&!this._started||r&&!this._started)&&(this._started=!0,Oi(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const l=!o&&this._started,i=r||l&&n.size?this.get():null;r&&t.size&&Oi(t,(([e,t])=>{t.value=i,e(t,this,this._item)})),l&&(this._started=!1,Oi(n,(([e,t])=>{t.value=i,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}pi.onFrame(this._onFrame)}}function bc(e,t){return Promise.all(t.map((t=>_c(e,t)))).then((t=>Ua(e,t)))}async function _c(e,t,n){const{keys:o,to:r,from:l,loop:i,onRest:s,onResolve:a}=t,c=Mi.obj(t.default)&&t.default;i&&(t.loop=!1),!1===r&&(t.to=null),!1===l&&(t.from=null);const u=Mi.arr(r)||Mi.fun(r)?r:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Ri(hc,(n=>{const o=t[n];if(Mi.fun(o)){const r=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=r.get(o);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):r.set(o,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));const d=e._state;t.pause===!d.paused?(d.paused=t.pause,zi(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const p=(o||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),m=!0===t.cancel||!0===_a(t,"cancel");(u||m&&d.asyncId)&&p.push(Ga(++e._lastAsyncId,{props:t,state:d,actions:{pause:Pi,resume:Pi,start(t,n){m?(qa(d,e._lastAsyncId),n($a(e))):(t.onRest=s,n(Ka(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));const g=Ua(e,await Promise.all(p));if(i&&g.finished&&(!n||!g.noop)){const n=ac(t,i,r);if(n)return Sc(e,[n]),_c(e,n,!0)}return a&&pi.batchedUpdates((()=>a(g,e,e.item))),g}function kc(e,t){const n=ha({},e.springs);return t&&Ri(Di(t),(e=>{Mi.und(e.keys)&&(e=cc(e)),Mi.obj(e.to)||(e=ha({},e,{to:void 0})),Cc(n,e,(e=>Ec(e)))})),yc(e,n),n}function yc(e,t){Ai(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,Ts(t,e))}))}function Ec(e,t){const n=new ic;return n.key=e,t&&Ts(n,t),n}function Cc(e,t,n){t.keys&&Ri(t.keys,(o=>{(e[o]||(e[o]=n(o)))._prepareNode(t)}))}function Sc(e,t){Ri(t,(t=>{Cc(e.springs,t,(t=>Ec(t,e)))}))}const wc=["children"],Bc=e=>{let{children:t}=e,n=function(e,t){if(null==e)return{};var n,o,r={},l=Object.keys(e);for(o=0;o<l.length;o++)n=l[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,wc);const o=(0,Ti.useContext)(Ic),r=n.pause||!!o.pause,l=n.immediate||!!o.immediate;n=function(e,t){const[n]=(0,Ti.useState)((()=>({inputs:t,result:e()}))),o=(0,Ti.useRef)(),r=o.current;let l=r;if(l){const n=Boolean(t&&l.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,l.inputs));n||(l={inputs:t,result:e()})}else l=n;return(0,Ti.useEffect)((()=>{o.current=l,r==n&&(n.inputs=n.result=void 0)}),[l]),l.result}((()=>({pause:r,immediate:l})),[r,l]);const{Provider:i}=Ic;return Ti.createElement(i,{value:n},t)},Ic=(xc=Bc,Tc={},Object.assign(xc,Ti.createContext(Tc)),xc.Provider._context=xc,xc.Consumer._context=xc,xc);var xc,Tc;Bc.Provider=Ic.Provider,Bc.Consumer=Ic.Consumer;const Nc=()=>{const e=[],t=function(t){js(`${Gs}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);const o=[];return Ri(e,((e,r)=>{if(Mi.und(t))o.push(e.start());else{const l=n(t,e,r);l&&o.push(e.start(l))}})),o};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return Ri(e,(e=>e.pause(...arguments))),this},t.resume=function(){return Ri(e,(e=>e.resume(...arguments))),this},t.set=function(t){Ri(e,(e=>e.set(t)))},t.start=function(t){const n=[];return Ri(e,((e,o)=>{if(Mi.und(t))n.push(e.start());else{const r=this._getProps(t,e,o);r&&n.push(e.start(r))}})),n},t.stop=function(){return Ri(e,(e=>e.stop(...arguments))),this},t.update=function(t){return Ri(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return Mi.fun(e)?e(n,t):e};return t._getProps=n,t};function Pc(e,t,n){const o=Mi.fun(t)&&t;o&&!n&&(n=[]);const r=(0,Ti.useMemo)((()=>o||3==arguments.length?Nc():void 0),[]),l=(0,Ti.useRef)(0),i=qs(),s=(0,Ti.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){const n=kc(e,t);return l.current>0&&!s.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?bc(e,t):new Promise((o=>{yc(e,n),s.queue.push((()=>{o(bc(e,t))})),i()}))}})),[]),a=(0,Ti.useRef)([...s.ctrls]),c=[],u=Zs(e)||0;function d(e,n){for(let r=e;r<n;r++){const e=a.current[r]||(a.current[r]=new vc(null,s.flush)),n=o?o(r,e):t[r];n&&(c[r]=uc(n))}}(0,Ti.useMemo)((()=>{Ri(a.current.slice(e,u),(e=>{xa(e,r),e.stop(!0)})),a.current.length=e,d(u,e)}),[e]),(0,Ti.useMemo)((()=>{d(0,Math.min(u,e))}),n);const p=a.current.map(((e,t)=>kc(e,c[t]))),m=(0,Ti.useContext)(Bc),g=Zs(m),h=m!==g&&Ba(m);Ks((()=>{l.current++,s.ctrls=a.current;const{queue:e}=s;e.length&&(s.queue=[],Ri(e,(e=>e()))),Ri(a.current,((e,t)=>{null==r||r.add(e),h&&e.start({default:m});const n=c[t];n&&(Ta(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),Ys((()=>()=>{Ri(s.ctrls,(e=>e.stop(!0)))}));const f=p.map((e=>ha({},e)));return r?[f,r]:f}let Mc;!function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"}(Mc||(Mc={}));class Lc extends Ja{constructor(e,t){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=e,this.calc=_s(...t);const n=this._get(),o=ca(n);ea(this,o.create(n))}advance(e){const t=this._get();Li(t,this.get())||(Js(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Ac(this._active)&&Dc(this)}_get(){const e=Mi.arr(this.source)?this.source.map(Ss):Di(Ss(this.source));return this.calc(...e)}_start(){this.idle&&!Ac(this._active)&&(this.idle=!1,Ri(ta(this),(e=>{e.done=!1})),ji.skipAnimation?(pi.batchedUpdates((()=>this.advance())),Dc(this)):Qi.start(this))}_attach(){let e=1;Ri(Di(this.source),(t=>{Cs(t)&&Ts(t,this),Za(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){Ri(Di(this.source),(e=>{Cs(e)&&Ns(e,this)})),this._active.clear(),Dc(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=Di(this.source).reduce(((e,t)=>Math.max(e,(Za(t)?t.priority:0)+1)),0))}}function Rc(e){return!1!==e.idle}function Ac(e){return!e.size||Array.from(e).every(Rc)}function Dc(e){e.idle||(e.idle=!0,Ri(ta(e),(e=>{e.done=!0})),Bs(e,{type:"idle",parent:e}))}ji.assign({createStringInterpolator:Hs,to:(e,t)=>new Lc(e,t)}),Qi.advance;const Oc=window.ReactDOM;function zc(e,t){if(null==e)return{};var n,o,r={},l=Object.keys(e);for(o=0;o<l.length;o++)n=l[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}const Fc=["style","children","scrollTop","scrollLeft"],Vc=/^--/;function Hc(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Vc.test(e)||Uc.hasOwnProperty(e)&&Uc[e]?(""+t).trim():t+"px"}const Gc={};let Uc={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const Wc=["Webkit","Ms","Moz","O"];Uc=Object.keys(Uc).reduce(((e,t)=>(Wc.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Uc);const jc=["x","y","z"],$c=/^(matrix|translate|scale|rotate|skew)/,Kc=/^(translate)/,qc=/^(rotate|skew)/,Yc=(e,t)=>Mi.num(e)&&0!==e?e+t:e,Qc=(e,t)=>Mi.arr(e)?e.every((e=>Qc(e,t))):Mi.num(e)?e===t:parseFloat(e)===t;class Zc extends ia{constructor(e){let{x:t,y:n,z:o}=e,r=zc(e,jc);const l=[],i=[];(t||n||o)&&(l.push([t||0,n||0,o||0]),i.push((e=>[`translate3d(${e.map((e=>Yc(e,"px"))).join(",")})`,Qc(e,0)]))),Ai(r,((e,t)=>{if("transform"===t)l.push([e||""]),i.push((e=>[e,""===e]));else if($c.test(t)){if(delete r[t],Mi.und(e))return;const n=Kc.test(t)?"px":qc.test(t)?"deg":"";l.push(Di(e)),i.push("rotate3d"===t?([e,t,o,r])=>[`rotate3d(${e},${t},${o},${Yc(r,n)})`,Qc(r,0)]:e=>[`${t}(${e.map((e=>Yc(e,n))).join(",")})`,Qc(e,t.startsWith("scale")?1:0)])}})),l.length&&(r.transform=new Xc(l,i)),super(r)}}class Xc extends Is{constructor(e,t){super(),this._value=null,this.inputs=e,this.transforms=t}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Ri(this.inputs,((n,o)=>{const r=Ss(n[0]),[l,i]=this.transforms[o](Mi.arr(r)?r:n.map(Ss));e+=" "+l,t=t&&i})),t?"none":e}observerAdded(e){1==e&&Ri(this.inputs,(e=>Ri(e,(e=>Cs(e)&&Ts(e,this)))))}observerRemoved(e){0==e&&Ri(this.inputs,(e=>Ri(e,(e=>Cs(e)&&Ns(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Bs(this,e)}}const Jc=["scrollTop","scrollLeft"];ji.assign({batchedUpdates:Oc.unstable_batchedUpdates,createStringInterpolator:Hs,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});const eu=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new ia(e)),getComponentProps:o=(e=>e)}={})=>{const r={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:o},l=e=>{const t=ga(e)||"Anonymous";return(e=Mi.str(e)?l[e]||(l[e]=da(e,r)):e[ma]||(e[ma]=da(e,r))).displayName=`Animated(${t})`,e};return Ai(e,((t,n)=>{Mi.arr(e)&&(n=ga(t)),l[n]=l(t)})),{animated:l}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,o=t,{style:r,children:l,scrollTop:i,scrollLeft:s}=o,a=zc(o,Fc),c=Object.values(a),u=Object.keys(a).map((t=>n||e.hasAttribute(t)?t:Gc[t]||(Gc[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==l&&(e.textContent=l);for(let t in r)if(r.hasOwnProperty(t)){const n=Hc(t,r[t]);Vc.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==i&&(e.scrollTop=i),void 0!==s&&(e.scrollLeft=s)},createAnimatedStyle:e=>new Zc(e),getComponentProps:e=>zc(e,Jc)}),tu=eu.animated,nu=e=>e+1,ou=e=>({top:e.offsetTop,left:e.offsetLeft}),ru=function(e){let{isSelected:t,adjustScrolling:n,enableAnimation:o,triggerAnimationOnChange:r}=e;const l=(0,s.useRef)(),i=(0,d.useReducedMotion)()||!o,[a,c]=(0,s.useReducer)(nu,0),[u,p]=(0,s.useReducer)(nu,0),[m,g]=(0,s.useState)({x:0,y:0}),h=(0,s.useMemo)((()=>l.current?ou(l.current):null),[r]),f=(0,s.useMemo)((()=>{if(!n||!l.current)return()=>{};const e=(0,jl.getScrollContainer)(l.current);if(!e)return()=>{};const t=l.current.getBoundingClientRect();return()=>{const n=l.current.getBoundingClientRect().top-t.top;n&&(e.scrollTop+=n)}}),[r,n]);return(0,s.useLayoutEffect)((()=>{a&&p()}),[a]),(0,s.useLayoutEffect)((()=>{if(!h)return;if(i)return void f();l.current.style.transform=void 0;const e=ou(l.current);c(),g({x:Math.round(h.left-e.left),y:Math.round(h.top-e.top)})}),[r]),function(e,t){const n=Mi.fun(e),[[o],r]=Pc(1,n?e:[e],n?t||[]:t)}({from:{x:m.x,y:m.y},to:{x:0,y:0},reset:a!==u,config:{mass:5,tension:2e3,friction:200},immediate:i,onChange:function(e){let{value:n}=e;if(!l.current)return;let{x:o,y:r}=n;o=Math.round(o),r=Math.round(r);const i=0===o&&0===r;l.current.style.transformOrigin="center center",l.current.style.transform=i?void 0:`translate3d(${o}px,${r}px,0)`,l.current.style.zIndex=t?"1":"",f()}}),l},lu=".block-editor-block-list__block",iu=".block-list-appender",su=".block-editor-button-block-appender";function au(e,t){return t.closest([lu,iu,su].join(","))===e}function cu(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(lu);return t?t.id.slice("block-".length):void 0}function uu(e){const t=(0,s.useRef)(),n=function(e){return(0,p.useSelect)((t=>{const{getSelectedBlocksInitialCaretPosition:n,__unstableGetEditorMode:o,isBlockSelected:r}=t(co);if(r(e)&&"edit"===o())return n()}),[e])}(e),{isBlockSelected:o,isMultiSelecting:r}=(0,p.useSelect)(co);return(0,s.useEffect)((()=>{if(!o(e)||r())return;if(null==n)return;if(!t.current)return;const{ownerDocument:l}=t.current;if(au(t.current,l.activeElement))return;const i=jl.focus.tabbable.find(t.current).filter((e=>(0,jl.isTextField)(e))),s=-1===n,a=i[s?i.length-1:0]||t.current;if(au(t.current,a)){if(!t.current.getAttribute("contenteditable")){const e=jl.focus.tabbable.findNext(t.current);if(e&&au(t.current,e)&&(0,jl.isFormElement)(e))return void e.focus()}(0,jl.placeCaretAtHorizontalEdge)(a,s)}else t.current.focus()}),[n,e]),t}function du(e){if(e.defaultPrevented)return;const t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}function pu(){const e=(0,p.useSelect)((e=>{const{getSettings:t}=e(co);return t().outlineMode}),[]);return(0,d.useRefEffect)((t=>{if(e)return t.addEventListener("mouseout",du),t.addEventListener("mouseover",du),()=>{t.removeEventListener("mouseout",du),t.removeEventListener("mouseover",du),t.classList.remove("is-hovered")}}),[e])}function mu(e){return(0,p.useSelect)((t=>{const{isBlockBeingDragged:n,isBlockHighlighted:o,isBlockSelected:l,isBlockMultiSelected:i,getBlockName:s,getSettings:a,hasSelectedInnerBlock:u,isTyping:d,__unstableIsFullySelected:p,__unstableSelectionHasUnmergeableBlock:m}=t(co),{outlineMode:g}=a(),h=n(e),f=l(e),v=s(e),b=u(e,!0),_=i(e);return c()({"is-selected":f,"is-highlighted":o(e),"is-multi-selected":_,"is-partially-selected":_&&!p()&&!m(),"is-reusable":(0,r.isReusableBlock)((0,r.getBlockType)(v)),"is-dragging":h,"has-child-selected":b,"remove-outline":f&&g&&d()})}),[e])}function gu(e){return(0,p.useSelect)((t=>{const n=t(co).getBlockName(e),o=(0,r.getBlockType)(n);if((null==o?void 0:o.apiVersion)>1)return(0,r.getBlockDefaultClassName)(n)}),[e])}function hu(e){return(0,p.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o}=t(co),l=o(e);if(null==l||!l.className)return;const i=(0,r.getBlockType)(n(e));return(null==i?void 0:i.apiVersion)>1?l.className:void 0}),[e])}function fu(e){return(0,p.useSelect)((t=>{const{hasBlockMovingClientId:n,canInsertBlockType:o,getBlockName:r,getBlockRootClientId:l,isBlockSelected:i}=t(co);if(!i(e))return;const s=n();return s?c()("is-block-moving-mode",{"can-insert-moving-block":o(r(s),l(e))}):void 0}),[e])}function vu(e){const{isBlockSelected:t}=(0,p.useSelect)(co),{selectBlock:n,selectionChange:o}=(0,p.useDispatch)(co);return(0,d.useRefEffect)((r=>{function l(l){r.parentElement.closest('[contenteditable="true"]')||(t(e)?l.target.isContentEditable||o(e):au(r,l.target)&&n(e))}return r.addEventListener("focusin",l),()=>{r.removeEventListener("focusin",l)}}),[t,n])}const bu=window.wp.keycodes;function _u(e){const t=(0,p.useSelect)((t=>t(co).isBlockSelected(e)),[e]),{getBlockRootClientId:n,getBlockIndex:o}=(0,p.useSelect)(co),{insertDefaultBlock:r,removeBlock:l}=(0,p.useDispatch)(co);return(0,d.useRefEffect)((i=>{if(t)return i.addEventListener("keydown",s),i.addEventListener("dragstart",a),()=>{i.removeEventListener("keydown",s),i.removeEventListener("dragstart",a)};function s(t){const{keyCode:s,target:a}=t;s!==bu.ENTER&&s!==bu.BACKSPACE&&s!==bu.DELETE||a!==i||(0,jl.isTextField)(a)||(t.preventDefault(),s===bu.ENTER?r({},n(e),o(e)+1):l(e))}function a(e){e.preventDefault()}}),[e,t,n,o,r,l])}function ku(e){const{isNavigationMode:t,isBlockSelected:n}=(0,p.useSelect)(co),{setNavigationMode:o,selectBlock:r}=(0,p.useDispatch)(co);return(0,d.useRefEffect)((l=>{function i(l){t()&&!l.defaultPrevented&&(l.preventDefault(),n(e)?o(!1):r(e))}return l.addEventListener("mousedown",i),()=>{l.addEventListener("mousedown",i)}}),[e,t,n,o])}function yu(){const e=(0,s.useContext)(Xh);return(0,d.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function Eu(e){return(0,p.useSelect)((t=>{const{__unstableHasActiveBlockOverlayActive:n}=t(co);return n(e)}),[e])}function Cu(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{__unstableIsHtml:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{clientId:n,className:o,wrapperProps:l={},isAligned:i}=(0,s.useContext)(Su),{index:a,mode:u,name:m,blockApiVersion:g,blockTitle:f,isPartOfSelection:v,adjustScrolling:b,enableAnimation:_}=(0,p.useSelect)((e=>{const{getBlockAttributes:t,getBlockIndex:o,getBlockMode:l,getBlockName:i,isTyping:s,getGlobalBlockCount:a,isBlockSelected:c,isBlockMultiSelected:u,isAncestorMultiSelected:d,isFirstMultiSelectedBlock:p}=e(co),{getActiveBlockVariation:m}=e(r.store),g=c(n),h=u(n)||d(n),f=i(n),v=(0,r.getBlockType)(f),b=m(f,t(n));return{index:o(n),mode:l(n),name:f,blockApiVersion:(null==v?void 0:v.apiVersion)||1,blockTitle:(null==b?void 0:b.title)||(null==v?void 0:v.title),isPartOfSelection:g||h,adjustScrolling:g||p(n),enableAnimation:!s()&&a()<=200}}),[n]),k=Eu(n),y=(0,h.sprintf)((0,h.__)("Block: %s"),f),E="html"!==u||t?"":"-visual",C=(0,d.useMergeRefs)([e.ref,uu(n),Mo(n),vu(n),_u(n),ku(n),pu(),yu(),ru({isSelected:v,adjustScrolling:b,enableAnimation:_,triggerAnimationOnChange:a}),(0,d.useDisabled)({isDisabled:!k})]),S=go();return g<2&&n===S.clientId&&"undefined"!=typeof process&&process.env,{tabIndex:0,...l,...e,ref:C,id:`block-${n}${E}`,role:"document","aria-label":y,"data-block":n,"data-type":m,"data-title":f,className:c()(c()("block-editor-block-list__block",{"wp-block":!i,"has-block-overlay":k}),o,e.className,l.className,mu(n),gu(n),hu(n),fu(n)),style:{...l.style,...e.style}}}Cu.save=r.__unstableGetBlockProps;const Su=(0,s.createContext)();function wu(e){let{children:t,isHtml:n,...o}=e;return(0,s.createElement)("div",Cu(o,{__unstableIsHtml:n}),t)}const Bu=(0,p.withSelect)(((e,t)=>{let{clientId:n,rootClientId:o}=t;const{isBlockSelected:r,getBlockMode:l,isSelectionEnabled:i,getTemplateLock:s,__unstableGetBlockWithoutInnerBlocks:a,canRemoveBlock:c,canMoveBlock:u}=e(co),d=a(n),p=r(n),m=s(o),g=c(n,o),h=u(n,o),{name:f,attributes:v,isValid:b}=d||{};return{mode:l(n),isSelectionEnabled:i(),isLocked:!!m,canRemove:g,canMove:h,block:d,name:f,attributes:v,isValid:b,isSelected:p}})),Iu=(0,p.withDispatch)(((e,t,n)=>{let{select:o}=n;const{updateBlockAttributes:l,insertBlocks:i,mergeBlocks:s,replaceBlocks:a,toggleSelection:c,__unstableMarkLastChangeAsPersistent:u}=e(co);return{setAttributes(e){const{getMultiSelectedBlockClientIds:n}=o(co),r=n(),{clientId:i}=t,s=r.length?r:[i];l(s,e)},onInsertBlocks(e,n){const{rootClientId:o}=t;i(e,n,o)},onInsertBlocksAfter(e){const{clientId:n,rootClientId:r}=t,{getBlockIndex:l}=o(co),s=l(n);i(e,s+1,r)},onMerge(e){const{clientId:n,rootClientId:l}=t,{getPreviousBlockClientId:i,getNextBlockClientId:c,getBlock:u}=o(co);if(e){const e=c(n);e&&s(n,e)}else{const e=i(n);if(e)s(e,n);else if(l){const e=(0,r.switchToBlockType)(u(l),"*");e&&e.length&&a(l,e,0)}}},onReplace(e,n,o){e.length&&!(0,r.isUnmodifiedDefaultBlock)(e[e.length-1])&&u(),a([t.clientId],e,n,o)},toggleSelection(e){c(e)}}})),xu=(0,d.compose)(d.pure,Bu,Iu,(0,d.ifCondition)((e=>{let{block:t}=e;return!!t})),(0,m.withFilters)("editor.BlockListBlock"))((function(e){var t;let{block:{__unstableBlockSource:n},mode:o,isLocked:l,canRemove:i,clientId:a,isSelected:u,isSelectionEnabled:d,className:m,name:g,isValid:h,attributes:f,wrapperProps:v,setAttributes:b,onReplace:_,onInsertBlocksAfter:k,onMerge:y,toggleSelection:E}=e;const{themeSupportsLayout:C,hasContentLockedParent:S,isContentBlock:w,isContentLocking:B,isTemporarilyEditingAsBlocks:I}=(0,p.useSelect)((e=>{const{getSettings:t,__unstableGetContentLockingParent:n,getTemplateLock:o,__unstableGetTemporarilyEditingAsBlocks:l}=e(co),i=!!n(a);return{themeSupportsLayout:t().supportsLayout,isContentBlock:e(r.store).__experimentalHasContentRoleAttribute(g),hasContentLockedParent:i,isContentLocking:"contentOnly"===o(a)&&!i,isTemporarilyEditingAsBlocks:l()===a}}),[g,a]),{removeBlock:x}=(0,p.useDispatch)(co),T=(0,s.useCallback)((()=>x(a)),[a]);let N=(0,s.createElement)(Zl,{name:g,isSelected:u,attributes:f,setAttributes:b,insertBlocksAfter:l?void 0:k,onReplace:i?_:void 0,onRemove:i?T:void 0,mergeBlocks:i?y:void 0,clientId:a,isSelectionEnabled:d,toggleSelection:E});const P=(0,r.getBlockType)(g);S&&!w&&(v={...v,tabIndex:-1}),null!=P&&P.getEditWrapperProps&&(v=function(e,t){const n={...e,...t};return null!=e&&e.className&&null!=t&&t.className&&(n.className=c()(e.className,t.className)),null!=e&&e.style&&null!=t&&t.style&&(n.style={...e.style,...t.style}),n}(v,P.getEditWrapperProps(f)));const M=v&&!!v["data-align"]&&!C;let L;if(M&&(N=(0,s.createElement)("div",{className:"wp-block","data-align":v["data-align"]},N)),h)L="html"===o?(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{style:{display:"none"}},N),(0,s.createElement)(wu,{isHtml:!0},(0,s.createElement)(ui,{clientId:a}))):(null==P?void 0:P.apiVersion)>1?N:(0,s.createElement)(wu,v,N);else{const e=n?(0,r.serializeRawBlock)(n):(0,r.getSaveContent)(P,f);L=(0,s.createElement)(wu,{className:"has-warning"},(0,s.createElement)(ri,{clientId:a}),(0,s.createElement)(s.RawHTML,null,(0,jl.safeHTML)(e)))}const{"data-align":R,...A}=null!==(t=v)&&void 0!==t?t:{},D={clientId:a,className:c()({"is-content-locked":B,"is-content-locked-temporarily-editing-as-blocks":I,"is-content-block":S&&w},R&&C&&`align${R}`,m),wrapperProps:A,isAligned:M},O=(0,s.useMemo)((()=>D),Object.values(D));return(0,s.createElement)(Su.Provider,{value:O},(0,s.createElement)(ai,{fallback:(0,s.createElement)(wu,{className:"has-warning"},(0,s.createElement)(ii,null))},L))})),Tu=window.wp.htmlEntities,Nu=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"})),Pu=[(0,s.createInterpolateElement)((0,h.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,s.createElement)("kbd",null)}),(0,s.createInterpolateElement)((0,h.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,s.createElement)("kbd",null)}),(0,s.createInterpolateElement)((0,h.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,s.createElement)("kbd",null)}),(0,h.__)("Drag files into the editor to automatically insert media blocks."),(0,h.__)("Change a block's type by pressing the block icon on the toolbar.")],Mu=function(){const[e]=(0,s.useState)(Math.floor(Math.random()*Pu.length));return(0,s.createElement)(m.Tip,null,Pu[e])},Lu=(0,s.createElement)(D.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})),Ru=(0,s.memo)((function(e){var t;let{icon:n,showColors:o=!1,className:r}=e;"block-default"===(null===(t=n)||void 0===t?void 0:t.src)&&(n={src:Lu});const l=(0,s.createElement)(m.Icon,{icon:n&&n.src?n.src:n}),i=o?{backgroundColor:n&&n.background,color:n&&n.foreground}:{};return(0,s.createElement)("span",{style:i,className:c()("block-editor-block-icon",r,{"has-colors":o})},l)})),Au=function(e){let{title:t,icon:n,description:o,blockType:r}=e;return r&&(V()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:t,icon:n,description:o}=r)),(0,s.createElement)("div",{className:"block-editor-block-card"},(0,s.createElement)(Ru,{icon:n,showColors:!0}),(0,s.createElement)("div",{className:"block-editor-block-card__content"},(0,s.createElement)("h2",{className:"block-editor-block-card__title"},t),(0,s.createElement)("span",{className:"block-editor-block-card__description"},o)))},Du=(0,d.createHigherOrderComponent)((e=>(0,p.withRegistry)((t=>{let{useSubRegistry:n=!0,registry:o,...r}=t;if(!n)return(0,s.createElement)(e,i({registry:o},r));const[l,a]=(0,s.useState)(null);return(0,s.useEffect)((()=>{const e=(0,p.createRegistry)({},o);e.registerStore(so,ao),a(e)}),[o]),l?(0,s.createElement)(p.RegistryProvider,{value:l},(0,s.createElement)(e,i({registry:l},r))):null}))),"withRegistryProvider"),Ou=()=>{};function zu(e){let{clientId:t=null,value:n,selection:o,onChange:l=Ou,onInput:i=Ou}=e;const a=(0,p.useRegistry)(),{resetBlocks:c,resetSelection:u,replaceInnerBlocks:d,setHasControlledInnerBlocks:m,__unstableMarkNextChangeAsNotPersistent:g}=a.dispatch(co),{getBlockName:h,getBlocks:f}=a.select(co),v=(0,p.useSelect)((e=>!t||e(co).areInnerBlocksControlled(t)),[t]),b=(0,s.useRef)({incoming:null,outgoing:[]}),_=(0,s.useRef)(!1),k=()=>{n&&(g(),t?a.batch((()=>{m(t,!0);const e=n.map((e=>(0,r.cloneBlock)(e)));_.current&&(b.current.incoming=e),g(),d(t,e)})):(_.current&&(b.current.incoming=n),c(n)))},y=(0,s.useRef)(i),E=(0,s.useRef)(l);(0,s.useEffect)((()=>{y.current=i,E.current=l}),[i,l]),(0,s.useEffect)((()=>{b.current.outgoing.includes(n)?b.current.outgoing[b.current.outgoing.length-1]===n&&(b.current.outgoing=[]):f(t)!==n&&(b.current.outgoing=[],k(),o&&u(o.selectionStart,o.selectionEnd,o.initialPosition))}),[n,t]),(0,s.useEffect)((()=>{v||(b.current.outgoing=[],k())}),[v]),(0,s.useEffect)((()=>{const{getSelectionStart:e,getSelectionEnd:n,getSelectedBlocksInitialCaretPosition:o,isLastBlockChangePersistent:r,__unstableIsLastBlockChangeIgnored:l,areInnerBlocksControlled:i}=a.select(co);let s=f(t),c=r(),u=!1;_.current=!0;const d=a.subscribe((()=>{if(null!==t&&null===h(t))return;if(t&&!i(t))return;const a=r(),d=f(t),p=d!==s;if(s=d,p&&(b.current.incoming||l()))return b.current.incoming=null,void(c=a);(p||u&&!p&&a&&!c)&&(c=a,b.current.outgoing.push(s),(c?E.current:y.current)(s,{selection:{selectionStart:e(),selectionEnd:n(),initialPosition:o()}})),u=p}));return()=>d()}),[a,t])}const Fu=Du((function(e){const{children:t,settings:n}=e,{updateSettings:o}=(0,p.useDispatch)(co);return(0,s.useEffect)((()=>{o(n)}),[n]),zu(e),(0,s.createElement)(Po,null,t)}));function Vu(e){let{onClick:t}=e;return(0,s.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},(0,s.createElement)(m.Disabled,null,(0,s.createElement)(tf,null)))}function Hu(){const{hasSelectedBlock:e,hasMultiSelection:t}=(0,p.useSelect)(co),{clearSelectedBlock:n}=(0,p.useDispatch)(co);return(0,d.useRefEffect)((o=>{function r(r){(e()||t())&&r.target===o&&n()}return o.addEventListener("mousedown",r),()=>{o.removeEventListener("mousedown",r)}}),[e,t,n])}function Gu(e){return(0,s.createElement)("div",i({ref:Hu()},e))}function Uu(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r,getSelectedBlocksInitialCaretPosition:l,__unstableIsFullySelected:i}=e(co);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r(),initialPosition:l(),isFullSelection:i()}}function Wu(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:o,selectedBlockClientId:r,isFullSelection:l}=(0,p.useSelect)(Uu,[]);return(0,d.useRefEffect)((r=>{const{ownerDocument:i}=r,{defaultView:s}=i;if(null==e)return;if(!o||t)return;const{length:a}=n;a<2||l&&(r.contentEditable=!0,r.focus(),s.getSelection().removeAllRanges())}),[o,t,n,r,e,l])}function ju(e,t,n,o){let r,l=jl.focus.focusable.find(n);return t&&l.reverse(),l=l.slice(l.indexOf(e)+1),o&&(r=e.getBoundingClientRect()),l.find((function(e){if(1!==e.children.length||!function(e,t){return e.closest(lu)===t.closest(lu)}(e,e.firstElementChild)||"true"!==e.firstElementChild.getAttribute("contenteditable")){if(!jl.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(o){const t=e.getBoundingClientRect();if(t.left>=r.right||t.right<=r.left)return!1}return!0}}))}function $u(){const{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:n,hasMultiSelection:o,__unstableIsFullySelected:r}=(0,p.useSelect)(co),{selectBlock:l}=(0,p.useDispatch)(co);return(0,d.useRefEffect)((i=>{let s;function a(){s=null}function c(a){const{keyCode:c,target:u,shiftKey:d,ctrlKey:p,altKey:m,metaKey:g}=a,h=c===bu.UP,f=c===bu.DOWN,v=c===bu.LEFT,b=c===bu.RIGHT,_=h||v,k=v||b,y=h||f,E=k||y,C=d||p||m||g,S=y?jl.isVerticalEdge:jl.isHorizontalEdge,{ownerDocument:w}=i,{defaultView:B}=w;if(o()){if(!r())return;if(a.defaultPrevented)return;if(!E)return;if(d)return;return a.preventDefault(),void(_?l(e()):l(t(),-1))}if(y?s||(s=(0,jl.computeCaretRect)(B)):s=null,a.defaultPrevented)return;if(!E)return;if(!function(e,t,n){if((t===bu.UP||t===bu.DOWN)&&!n)return!0;const{tagName:o}=e;return"INPUT"===o?["button","checkbox","color","file","image","radio","reset","submit"].includes(e.getAttribute("type")):"TEXTAREA"!==o}(u,c,C))return;const I=(0,jl.isRTL)(u)?!_:_,{keepCaretInsideBlock:x}=n();if(d)(function(e,t){const n=ju(e,t,i);return n&&cu(n)})(u,_)&&S(u,_)&&(i.contentEditable=!0,i.focus());else if(!y||!(0,jl.isVerticalEdge)(u,_)||m&&!(0,jl.isHorizontalEdge)(u,I)||x){if(k&&B.getSelection().isCollapsed&&(0,jl.isHorizontalEdge)(u,I)&&!x){const e=ju(u,I,i);(0,jl.placeCaretAtHorizontalEdge)(e,_),a.preventDefault()}}else{const e=ju(u,_,i,!0);e&&((0,jl.placeCaretAtVerticalEdge)(e,m?!_:_,m?void 0:s),a.preventDefault())}}return i.addEventListener("mousedown",a),i.addEventListener("keydown",c),()=>{i.removeEventListener("mousedown",a),i.removeEventListener("keydown",c)}}),[])}const Ku=window.wp.keyboardShortcuts;function qu(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,p.useSelect)(co),{multiSelect:o,selectBlock:r}=(0,p.useDispatch)(co),l=(0,Ku.__unstableUseShortcutEventMatch)();return(0,d.useRefEffect)((i=>{function s(s){if(!l("core/block-editor/select-all",s))return;const a=t();if(a.length<2&&!(0,jl.isEntirelySelected)(s.target))return;s.preventDefault();const[c]=a,u=n(c),d=e(u);a.length!==d.length?o(d[0],d[d.length-1]):u&&(i.ownerDocument.defaultView.getSelection().removeAllRanges(),r(u))}return i.addEventListener("keydown",s),()=>{i.removeEventListener("keydown",s)}}),[])}function Yu(e,t){e.contentEditable=t,t&&e.focus()}function Qu(){const{startMultiSelect:e,stopMultiSelect:t}=(0,p.useDispatch)(co),{isSelectionEnabled:n,hasMultiSelection:o,isDraggingBlocks:r}=(0,p.useSelect)(co);return(0,d.useRefEffect)((l=>{const{ownerDocument:i}=l,{defaultView:s}=i;let a,c;function u(){t(),s.removeEventListener("mouseup",u),c=s.requestAnimationFrame((()=>{if(o())return;Yu(l,!1);const e=s.getSelection();if(e.rangeCount){const{commonAncestorContainer:t}=e.getRangeAt(0);a.contains(t)&&a.focus()}}))}function d(t){let{buttons:o,target:c}=t;r()||1===o&&c.getAttribute("contenteditable")&&n()&&(a=i.activeElement,e(),s.addEventListener("mouseup",u),Yu(l,!0))}return l.addEventListener("mouseout",d),()=>{l.removeEventListener("mouseout",d),s.removeEventListener("mouseup",u),s.cancelAnimationFrame(c)}}),[e,t,n,o])}function Zu(e,t){e.contentEditable=t,t&&e.focus()}function Xu(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,p.useDispatch)(co),{getBlockParents:o,getBlockSelectionStart:r}=(0,p.useSelect)(co);return(0,d.useRefEffect)((n=>{const{ownerDocument:l}=n,{defaultView:i}=l;function s(l){const s=i.getSelection();if(!s.rangeCount)return;const a=l.shiftKey&&"mouseup"===l.type;if(s.isCollapsed&&!a)return void Zu(n,!1);let c=cu(function(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE||0===n?t:t.childNodes[n-1]}(s)),u=cu(function(e){const{focusNode:t,focusOffset:n}=e;return t.nodeType===t.TEXT_NODE||n===t.childNodes.length?t:t.childNodes[n]}(s));if(a){const e=r(),t=cu(l.target),n=t!==u;(c===u&&s.isCollapsed||!u||n)&&(u=t),c!==e&&(c=e)}if(void 0!==c||void 0!==u)if(c===u)t(c);else{const t=[...o(c),c],n=[...o(u),u],r=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,n);e(t[r],n[r])}else Zu(n,!1)}function a(){l.addEventListener("selectionchange",s),i.addEventListener("mouseup",s)}function c(){l.removeEventListener("selectionchange",s),i.removeEventListener("mouseup",s)}function u(){c(),a()}return a(),n.addEventListener("focusin",u),()=>{c(),n.removeEventListener("focusin",u)}}),[e,t,n,o])}function Ju(){const{selectBlock:e}=(0,p.useDispatch)(co),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:o}=(0,p.useSelect)(co);return(0,d.useRefEffect)((r=>{function l(l){if(!t()||0!==l.button)return;const i=n(),s=cu(l.target);l.shiftKey?i!==s&&(r.contentEditable=!0,r.focus()):o()&&e(s)}return r.addEventListener("mousedown",l),()=>{r.removeEventListener("mousedown",l)}}),[e,t,n,o])}function ed(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,__unstableIsSelectionMergeable:n,hasMultiSelection:o}=(0,p.useSelect)(co),{replaceBlocks:l,__unstableSplitSelection:i,removeBlocks:s,__unstableDeleteSelection:a,__unstableExpandSelection:c}=(0,p.useDispatch)(co);return(0,d.useRefEffect)((u=>{function d(e){var t;o()&&null!==(t=e.inputType)&&void 0!==t&&t.startsWith("format")&&e.preventDefault()}function p(d){d.defaultPrevented||o()&&(d.keyCode===bu.ENTER?(u.contentEditable=!1,d.preventDefault(),e()?l(t(),(0,r.createBlock)((0,r.getDefaultBlockName)())):i()):d.keyCode===bu.BACKSPACE||d.keyCode===bu.DELETE?(u.contentEditable=!1,d.preventDefault(),e()?s(t()):n()?a(d.keyCode===bu.DELETE):c()):1!==d.key.length||d.metaKey||d.ctrlKey||(u.contentEditable=!1,n()?a(d.keyCode===bu.DELETE):(d.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges())))}function m(e){o()&&(u.contentEditable=!1,n()?a():(e.preventDefault(),u.ownerDocument.defaultView.getSelection().removeAllRanges()))}return u.addEventListener("beforeinput",d),u.addEventListener("keydown",p),u.addEventListener("compositionstart",m),()=>{u.removeEventListener("beforeinput",d),u.removeEventListener("keydown",p),u.removeEventListener("compositionstart",m)}}),[])}function td(){const[e,t,n]=function(){const e=(0,s.useRef)(),t=(0,s.useRef)(),n=(0,s.useRef)(),o=(0,s.useRef)(),{hasMultiSelection:r,getSelectedBlockClientId:l,getBlockCount:i}=(0,p.useSelect)(co),{setNavigationMode:a}=(0,p.useDispatch)(co),c=(0,p.useSelect)((e=>e(co).isNavigationMode()),[])?void 0:"0",u=(0,s.useRef)();function m(t){if(u.current)u.current=null;else if(r())e.current.focus();else if(l())o.current.focus();else{a(!0);const n=t.target.compareDocumentPosition(e.current)&t.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";jl.focus.tabbable[n](t.target).focus()}}const g=(0,s.createElement)("div",{ref:t,tabIndex:c,onFocus:m}),h=(0,s.createElement)("div",{ref:n,tabIndex:c,onFocus:m}),f=(0,d.useRefEffect)((s=>{function c(e){if(e.defaultPrevented)return;if(e.keyCode===bu.ESCAPE)return e.preventDefault(),void a(!0);if(e.keyCode!==bu.TAB)return;const o=e.shiftKey,i=o?"findPrevious":"findNext";if(!r()&&!l())return void(e.target===s&&a(!0));if(((0,jl.isFormElement)(e.target)||e.target.getAttribute("data-block")===l())&&(0,jl.isFormElement)(jl.focus.tabbable[i](e.target)))return;const c=o?t:n;u.current=!0,c.current.focus({preventScroll:!0})}function d(e){o.current=e.target;const{ownerDocument:t}=s;e.relatedTarget||t.activeElement!==t.body||0!==i()||s.focus()}function p(o){var r;if(o.keyCode!==bu.TAB)return;if("region"===(null===(r=o.target)||void 0===r?void 0:r.getAttribute("role")))return;if(e.current===o.target)return;const l=o.shiftKey?"findPrevious":"findNext",i=jl.focus.tabbable[l](o.target);i!==t.current&&i!==n.current||(o.preventDefault(),i.focus({preventScroll:!0}))}const{ownerDocument:m}=s,{defaultView:g}=m;return g.addEventListener("keydown",p),s.addEventListener("keydown",c),s.addEventListener("focusout",d),()=>{g.removeEventListener("keydown",p),s.removeEventListener("keydown",c),s.removeEventListener("focusout",d)}}),[]);return[g,(0,d.useMergeRefs)([e,f]),h]}(),o=(0,p.useSelect)((e=>e(co).hasMultiSelection()),[]);return[e,(0,d.useMergeRefs)([t,ed(),Qu(),Xu(),Ju(),Wu(),qu(),$u(),(0,d.useRefEffect)((e=>{if(e.tabIndex=-1,e.contentEditable=o,o)return e.classList.add("has-multi-selection"),e.setAttribute("aria-label",(0,h.__)("Multiple selected blocks")),()=>{e.classList.remove("has-multi-selection"),e.removeAttribute("aria-label")}}),[o])]),n]}const nd=(0,s.forwardRef)((function(e,t){let{children:n,...o}=e;const[r,l,a]=td();return(0,s.createElement)(s.Fragment,null,r,(0,s.createElement)("div",i({},o,{ref:(0,d.useMergeRefs)([l,t]),className:c()(o.className,"block-editor-writing-flow")}),n),a)})),od="editor-styles-wrapper";function rd(e){return(0,s.useMemo)((()=>{const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,Array.from(t.body.children)}),[e])}const ld=(0,s.forwardRef)((function(e,t){let{contentRef:n,children:o,head:r,tabIndex:l=0,assets:a,isZoomedOut:u,...p}=e;const[,g]=(0,s.useReducer)((()=>({}))),[f,v]=(0,s.useState)(),[b,_]=(0,s.useState)([]),k=rd(null==a?void 0:a.styles),y=rd(null==a?void 0:a.scripts),E=Hu(),[C,S,w]=td(),[B,{height:I}]=(0,d.useResizeObserver)(),x=(0,d.useRefEffect)((e=>{let t;function n(e){e.preventDefault()}function o(){const{contentDocument:o,ownerDocument:r}=e,{readyState:l,documentElement:i}=o;return t=o,("interactive"===l||"complete"===l)&&(function(e){const{defaultView:t}=e,{frameElement:n}=t;function o(e){const o=Object.getPrototypeOf(e).constructor.name,r=window[o],l={};for(const t in e)l[t]=e[t];if(e instanceof t.MouseEvent){const e=n.getBoundingClientRect();l.clientX+=e.left,l.clientY+=e.top}const i=new r(e.type,l);!n.dispatchEvent(i)&&e.preventDefault()}const r=["dragover"];for(const t of r)e.addEventListener(t,o)}(o),v(o),E(i),_(Array.from(r.body.classList).filter((e=>e.startsWith("admin-color-")||e.startsWith("post-type-")||"wp-embed-responsive"===e))),o.dir=r.dir,i.removeChild(o.head),i.removeChild(o.body),t.addEventListener("dragover",n,!1),t.addEventListener("drop",n,!1),!0)}return e.addEventListener("load",o),()=>{var r,l;e.removeEventListener("load",o),null===(r=t)||void 0===r||r.removeEventListener("dragover",n),null===(l=t)||void 0===l||l.removeEventListener("drop",n)}}),[]),T=(0,d.useRefEffect)((e=>{y.reduce(((t,n)=>t.then((()=>async function(e,t){let{id:n,src:o}=t;return new Promise(((t,r)=>{const l=e.ownerDocument.createElement("script");l.id=n,o?(l.src=o,l.onload=()=>t(),l.onerror=()=>r()):t(),e.appendChild(l)}))}(e,n)))),Promise.resolve()).finally((()=>{g()}))}),[]),N=(0,d.useMergeRefs)([n,E,S]),P=(0,d.useRefEffect)((e=>{Array.from(document.styleSheets).forEach((t=>{try{t.cssRules}catch(e){return}const{ownerNode:n,cssRules:o}=t;if(o&&"LINK"===n.tagName&&"wp-reset-editor-styles-css"!==n.id&&function e(t){return Array.from(t).find((t=>{let{selectorText:n,conditionText:o,cssRules:r}=t;return o?e(r):n&&(n.includes(`.${od}`)||n.includes(".wp-block"))}))}(o)&&!e.ownerDocument.getElementById(n.id)){e.appendChild(n.cloneNode(!0));const t=n.id.replace("-css","-inline-css"),o=document.getElementById(t);o&&e.appendChild(o.cloneNode(!0))}}))}),[]);return r=(0,s.createElement)(s.Fragment,null,(0,s.createElement)("style",null,"body{margin:0}"),k.map((e=>{let{tagName:t,href:n,id:o,rel:r,media:l,textContent:i}=e;const a=t.toLowerCase();return"style"===a?(0,s.createElement)(a,{id:o,key:o},i):(0,s.createElement)(a,{href:n,id:o,rel:r,media:l,key:o})})),r),(0,s.createElement)(s.Fragment,null,l>=0&&C,(0,s.createElement)("iframe",i({},p,{ref:(0,d.useMergeRefs)([t,x]),tabIndex:l,srcDoc:"<!doctype html>",title:(0,h.__)("Editor canvas")}),f&&(0,s.createPortal)((0,s.createElement)(s.Fragment,null,(0,s.createElement)("head",{ref:T},r,(0,s.createElement)("style",null,`html { transition: background 5s; ${u?"background: #2f2f2f; transition: background 0s;":""} }`)),(0,s.createElement)("body",{ref:N,className:c()("block-editor-iframe__body",od,...b,{"is-zoomed-out":u}),style:u?{marginBottom:`-${.55*I-100}px`}:{}},B,(0,s.createElement)("div",{style:{display:"none"},ref:P}),(0,s.createElement)(m.__experimentalStyleProvider,{document:f},o))),f.documentElement)),l>=0&&w)}));var id={grad:.9,turn:360,rad:360/(2*Math.PI)},sd=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},ad=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},cd=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},ud=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},dd=function(e){return{r:cd(e.r,0,255),g:cd(e.g,0,255),b:cd(e.b,0,255),a:cd(e.a)}},pd=function(e){return{r:ad(e.r),g:ad(e.g),b:ad(e.b),a:ad(e.a,3)}},md=/^#([0-9a-f]{3,8})$/i,gd=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},hd=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,l=Math.max(t,n,o),i=l-Math.min(t,n,o),s=i?l===t?(n-o)/i:l===n?2+(o-t)/i:4+(t-n)/i:0;return{h:60*(s<0?s+6:s),s:l?i/l*100:0,v:l/255*100,a:r}},fd=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var l=Math.floor(t),i=o*(1-n),s=o*(1-(t-l)*n),a=o*(1-(1-t+l)*n),c=l%6;return{r:255*[o,s,i,i,a,o][c],g:255*[a,o,o,s,i,i][c],b:255*[i,i,a,o,o,s][c],a:r}},vd=function(e){return{h:ud(e.h),s:cd(e.s,0,100),l:cd(e.l,0,100),a:cd(e.a)}},bd=function(e){return{h:ad(e.h),s:ad(e.s),l:ad(e.l),a:ad(e.a,3)}},_d=function(e){return fd((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},kd=function(e){return{h:(t=hd(e)).h,s:(r=(200-(n=t.s))*(o=t.v)/100)>0&&r<200?n*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,n,o,r},yd=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ed=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Cd=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Sd=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,wd={string:[[function(e){var t=md.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?ad(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?ad(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Cd.exec(e)||Sd.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:dd({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=yd.exec(e)||Ed.exec(e);if(!t)return null;var n,o,r=vd({h:(n=t[1],o=t[2],void 0===o&&(o="deg"),Number(n)*(id[o]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return _d(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,l=void 0===r?1:r;return sd(t)&&sd(n)&&sd(o)?dd({r:Number(t),g:Number(n),b:Number(o),a:Number(l)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,l=void 0===r?1:r;if(!sd(t)||!sd(n)||!sd(o))return null;var i=vd({h:Number(t),s:Number(n),l:Number(o),a:Number(l)});return _d(i)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,l=void 0===r?1:r;if(!sd(t)||!sd(n)||!sd(o))return null;var i=function(e){return{h:ud(e.h),s:cd(e.s,0,100),v:cd(e.v,0,100),a:cd(e.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(l)});return fd(i)},"hsv"]]},Bd=function(e,t){for(var n=0;n<t.length;n++){var o=t[n][0](e);if(o)return[o,t[n][1]]}return[null,void 0]},Id=function(e,t){var n=kd(e);return{h:n.h,s:cd(n.s+100*t,0,100),l:n.l,a:n.a}},xd=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Td=function(e,t){var n=kd(e);return{h:n.h,s:n.s,l:cd(n.l+100*t,0,100),a:n.a}},Nd=function(){function e(e){this.parsed=function(e){return"string"==typeof e?Bd(e.trim(),wd.string):"object"==typeof e&&null!==e?Bd(e,wd.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return ad(xd(this.rgba),2)},e.prototype.isDark=function(){return xd(this.rgba)<.5},e.prototype.isLight=function(){return xd(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=pd(this.rgba)).r,n=e.g,o=e.b,l=(r=e.a)<1?gd(ad(255*r)):"","#"+gd(t)+gd(n)+gd(o)+l;var e,t,n,o,r,l},e.prototype.toRgb=function(){return pd(this.rgba)},e.prototype.toRgbString=function(){return t=(e=pd(this.rgba)).r,n=e.g,o=e.b,(r=e.a)<1?"rgba("+t+", "+n+", "+o+", "+r+")":"rgb("+t+", "+n+", "+o+")";var e,t,n,o,r},e.prototype.toHsl=function(){return bd(kd(this.rgba))},e.prototype.toHslString=function(){return t=(e=bd(kd(this.rgba))).h,n=e.s,o=e.l,(r=e.a)<1?"hsla("+t+", "+n+"%, "+o+"%, "+r+")":"hsl("+t+", "+n+"%, "+o+"%)";var e,t,n,o,r},e.prototype.toHsv=function(){return e=hd(this.rgba),{h:ad(e.h),s:ad(e.s),v:ad(e.v),a:ad(e.a,3)};var e},e.prototype.invert=function(){return Pd({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),Pd(Id(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Pd(Id(this.rgba,-e))},e.prototype.grayscale=function(){return Pd(Id(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Pd(Td(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Pd(Td(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?Pd({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):ad(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=kd(this.rgba);return"number"==typeof e?Pd({h:e,s:t.s,l:t.l,a:t.a}):ad(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Pd(e).toHex()},e}(),Pd=function(e){return e instanceof Nd?e:new Nd(e)},Md=[],Ld=function(e){e.forEach((function(e){Md.indexOf(e)<0&&(e(Nd,wd),Md.push(e))}))};function Rd(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var r in n)o[n[r]]=r;var l={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var r,i,s=o[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var a=this.toRgb(),c=1/0,u="black";if(!l.length)for(var d in n)l[d]=new e(n[d]).toRgb();for(var p in n){var m=(r=a,i=l[p],Math.pow(r.r-i.r,2)+Math.pow(r.g-i.g,2)+Math.pow(r.b-i.b,2));m<c&&(c=m,u=p)}return u}},t.string.push([function(t){var o=t.toLowerCase(),r="transparent"===o?"#0000":n[o];return r?new e(r).toRgb():null},"name"])}var Ad=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Dd=function(e){return.2126*Ad(e.r)+.7152*Ad(e.g)+.0722*Ad(e.b)};function Od(e){e.prototype.luminance=function(){return e=Dd(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,o,r,l,i,s,a,c=t instanceof e?t:new e(t);return l=this.rgba,i=c.toRgb(),n=(s=Dd(l))>(a=Dd(i))?(s+.05)/(a+.05):(a+.05)/(s+.05),void 0===(o=2)&&(o=0),void 0===r&&(r=Math.pow(10,o)),Math.floor(r*n)/r+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(i=void 0===(l=(n=t).size)?"normal":l,"AAA"===(r=void 0===(o=n.level)?"AA":o)&&"normal"===i?7:"AA"===r&&"large"===i?3:4.5);var n,o,r,l,i}}var zd=n(3124),Fd=n.n(zd);const Vd=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Hd(e,t){t=t||{};let n=1,o=1;function r(e){const t=e.match(/\n/g);t&&(n+=t.length);const r=e.lastIndexOf("\n");o=~r?e.length-r:o+e.length}function l(){const e={line:n,column:o};return function(t){return t.position=new i(e),m(),t}}function i(e){this.start=e,this.end={line:n,column:o},this.source=t.source}i.prototype.content=e;const s=[];function a(r){const l=new Error(t.source+":"+n+":"+o+": "+r);if(l.reason=r,l.filename=t.source,l.line=n,l.column=o,l.source=e,!t.silent)throw l;s.push(l)}function c(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){let t;const n=[];for(m(),g(n);e.length&&"}"!==e.charAt(0)&&(t=S()||w());)!1!==t&&(n.push(t),g(n));return n}function p(t){const n=t.exec(e);if(!n)return;const o=n[0];return r(o),e=e.slice(o.length),n}function m(){p(/^\s*/)}function g(e){let t;for(e=e||[];t=h();)!1!==t&&e.push(t);return e}function h(){const t=l();if("/"!==e.charAt(0)||"*"!==e.charAt(1))return;let n=2;for(;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return a("End of comment missing");const i=e.slice(2,n-2);return o+=2,r(i),e=e.slice(n),o+=2,t({type:"comment",comment:i})}function f(){const e=p(/^([^{]+)/);if(e)return Gd(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function v(){const e=l();let t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;if(t=Gd(t[0]),!p(/^:\s*/))return a("property missing ':'");const n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:t.replace(Vd,""),value:n?Gd(n[0]).replace(Vd,""):""});return p(/^[;\s]*/),o}function b(){const e=[];if(!c())return a("missing '{'");let t;for(g(e);t=v();)!1!==t&&(e.push(t),g(e));return u()?e:a("missing '}'")}function _(){let e;const t=[],n=l();for(;e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:b()})}const k=C("import"),y=C("charset"),E=C("namespace");function C(e){const t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){const n=l(),o=p(t);if(!o)return;const r={type:e};return r[e]=o[1].trim(),n(r)}}function S(){if("@"===e[0])return function(){const e=l();let t=p(/^@([-\w]+)?keyframes\s*/);if(!t)return;const n=t[1];if(t=p(/^([-\w]+)\s*/),!t)return a("@keyframes missing name");const o=t[1];if(!c())return a("@keyframes missing '{'");let r,i=g();for(;r=_();)i.push(r),i=i.concat(g());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):a("@keyframes missing '}'")}()||function(){const e=l(),t=p(/^@media *([^{]+)/);if(!t)return;const n=Gd(t[1]);if(!c())return a("@media missing '{'");const o=g().concat(d());return u()?e({type:"media",media:n,rules:o}):a("@media missing '}'")}()||function(){const e=l(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Gd(t[1]),media:Gd(t[2])})}()||function(){const e=l(),t=p(/^@supports *([^{]+)/);if(!t)return;const n=Gd(t[1]);if(!c())return a("@supports missing '{'");const o=g().concat(d());return u()?e({type:"supports",supports:n,rules:o}):a("@supports missing '}'")}()||k()||y()||E()||function(){const e=l(),t=p(/^@([-\w]+)?document *([^{]+)/);if(!t)return;const n=Gd(t[1]),o=Gd(t[2]);if(!c())return a("@document missing '{'");const r=g().concat(d());return u()?e({type:"document",document:o,vendor:n,rules:r}):a("@document missing '}'")}()||function(){const e=l();if(!p(/^@page */))return;const t=f()||[];if(!c())return a("@page missing '{'");let n,o=g();for(;n=v();)o.push(n),o=o.concat(g());return u()?e({type:"page",selectors:t,declarations:o}):a("@page missing '}'")}()||function(){const e=l();if(!p(/^@host\s*/))return;if(!c())return a("@host missing '{'");const t=g().concat(d());return u()?e({type:"host",rules:t}):a("@host missing '}'")}()||function(){const e=l();if(!p(/^@font-face\s*/))return;if(!c())return a("@font-face missing '{'");let t,n=g();for(;t=v();)n.push(t),n=n.concat(g());return u()?e({type:"font-face",declarations:n}):a("@font-face missing '}'")}()}function w(){const e=l(),t=f();return t?(g(),e({type:"rule",selectors:t,declarations:b()})):a("selector missing")}return Ud(function(){const e=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:s}}}())}function Gd(e){return e?e.replace(/^\s+|\s+$/g,""):""}function Ud(e,t){const n=e&&"string"==typeof e.type,o=n?e:t;for(const t in e){const n=e[t];Array.isArray(n)?n.forEach((function(e){Ud(e,o)})):n&&"object"==typeof n&&Ud(n,o)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var Wd=n(8575),jd=n.n(Wd);const $d=Kd;function Kd(e){this.options=e||{}}Kd.prototype.emit=function(e){return e},Kd.prototype.visit=function(e){return this[e.type](e)},Kd.prototype.mapVisit=function(e,t){let n="";t=t||"";for(let o=0,r=e.length;o<r;o++)n+=this.visit(e[o]),t&&o<r-1&&(n+=this.emit(t));return n};const qd=Yd;function Yd(e){$d.call(this,e)}jd()(Yd,$d),Yd.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},Yd.prototype.comment=function(e){return this.emit("",e.position)},Yd.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Yd.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Yd.prototype.document=function(e){const t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Yd.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Yd.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Yd.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Yd.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},Yd.prototype.keyframe=function(e){const t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},Yd.prototype.page=function(e){const t=e.selectors.length?e.selectors.join(", "):"";return this.emit("@page "+t,e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Yd.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},Yd.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},Yd.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Yd.prototype.rule=function(e){const t=e.declarations;return t.length?this.emit(e.selectors.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}"):""},Yd.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};const Qd=Zd;function Zd(e){e=e||{},$d.call(this,e),this.indentation=e.indent}jd()(Zd,$d),Zd.prototype.compile=function(e){return this.stylesheet(e)},Zd.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},Zd.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},Zd.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},Zd.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Zd.prototype.document=function(e){const t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Zd.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},Zd.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},Zd.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Zd.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.keyframes,"\n")+this.emit(this.indent(-1)+"}")},Zd.prototype.keyframe=function(e){const t=e.declarations;return this.emit(this.indent())+this.emit(e.values.join(", "),e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},Zd.prototype.page=function(e){const t=e.selectors.length?e.selectors.join(", ")+" ":"";return this.emit("@page "+t,e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Zd.prototype["font-face"]=function(e){return this.emit("@font-face ",e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},Zd.prototype.host=function(e){return this.emit("@host",e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},Zd.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},Zd.prototype.rule=function(e){const t=this.indent(),n=e.declarations;return n.length?this.emit(e.selectors.map((function(e){return t+e})).join(",\n"),e.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(n,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},Zd.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},Zd.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};const Xd=function(e,t){try{const r=Hd(e),l=Fd().map(r,(function(e){if(!e)return e;const n=t(e);return this.update(n)}));return n=l,((o=o||{}).compress?new qd(o):new Qd(o)).compile(n)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var n,o};function Jd(e){return 0!==e.value.indexOf("data:")&&0!==e.value.indexOf("#")&&(t=e.value,!/^\/(?!\/)/.test(t)&&!function(e){return/^(?:https?:)?\/\//.test(e)}(e.value));var t}function ep(e,t){return new URL(e,t).toString()}const tp=e=>t=>{if("declaration"===t.type){const l=function(e){const t=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g;let n;const o=[];for(;null!==(n=t.exec(e));){const e={source:n[0],before:n[1],quote:n[2],value:n[3],after:n[4]};Jd(e)&&o.push(e)}return o}(t.value).map((r=e,e=>({...e,newUrl:"url("+e.before+e.quote+ep(e.value,r)+e.quote+e.after+")"})));return{...t,value:(n=t.value,o=l,o.forEach((e=>{n=n.replace(e.source,e.newUrl)})),n)}}var n,o,r;return t},np=/^(body|html|:root).*$/,op=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n=>"rule"===n.type?{...n,selectors:n.selectors.map((n=>t.includes(n.trim())?n:n.match(np)?n.replace(/^(body|html|:root)/,e):e+" "+n))}:n},rp=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,u.map)(e,(e=>{let{css:n,baseURL:o}=e;const r=[];return t&&r.push(op(t)),o&&r.push(tp(o)),r.length?Xd(n,(0,d.compose)(r)):n}))},lp=".editor-styles-wrapper";function ip(e){return(0,s.useCallback)((e=>{if(!e)return;const{ownerDocument:t}=e,{defaultView:n,body:o}=t,r=t.querySelector(lp);let l;if(r)l=n.getComputedStyle(r,null).getPropertyValue("background-color");else{const e=t.createElement("div");e.classList.add("editor-styles-wrapper"),o.appendChild(e),l=n.getComputedStyle(e,null).getPropertyValue("background-color"),o.removeChild(e)}const i=Pd(l);i.luminance()>.5||0===i.alpha()?o.classList.remove("is-dark-theme"):o.classList.add("is-dark-theme")}),[e])}function sp(e){let{styles:t}=e;const n=(0,s.useMemo)((()=>rp(t,lp)),[t]);return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("style",{ref:ip(t)}),n.map(((e,t)=>(0,s.createElement)("style",{key:t},e))))}function ap(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=Pd(e).toRgb();t.r.push(n.r/255),t.g.push(n.g/255),t.b.push(n.b/255),t.a.push(n.a)})),t}function cp(e){let{selector:t,id:n}=e;const o=`\n${t} {\n\tfilter: url( #${n} );\n}\n`;return(0,s.createElement)("style",null,o)}function up(e){let{selector:t}=e;const n=`\n${t} {\n\tfilter: none;\n}\n`;return(0,s.createElement)("style",null,n)}function dp(e){let{id:t,colors:n}=e;const o=ap(n);return(0,s.createElement)(m.SVG,{xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 0 0",width:"0",height:"0",focusable:"false",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"}},(0,s.createElement)("defs",null,(0,s.createElement)("filter",{id:t},(0,s.createElement)("feColorMatrix",{colorInterpolationFilters:"sRGB",type:"matrix",values:" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "}),(0,s.createElement)("feComponentTransfer",{colorInterpolationFilters:"sRGB"},(0,s.createElement)("feFuncR",{type:"table",tableValues:o.r.join(" ")}),(0,s.createElement)("feFuncG",{type:"table",tableValues:o.g.join(" ")}),(0,s.createElement)("feFuncB",{type:"table",tableValues:o.b.join(" ")}),(0,s.createElement)("feFuncA",{type:"table",tableValues:o.a.join(" ")})),(0,s.createElement)("feComposite",{in2:"SourceGraphic",operator:"in"}))))}function pp(e){let{preset:t}=e;return(0,s.createElement)(dp,{id:`wp-duotone-${t.slug}`,colors:t.colors})}let mp;Ld([Rd,Od]);const gp=2e3;function hp(e){let{viewportWidth:t,containerWidth:n,__experimentalPadding:o,__experimentalMinHeight:r}=e;const[l,{height:i}]=(0,d.useResizeObserver)(),{styles:a,assets:c,duotone:u}=(0,p.useSelect)((e=>{var t,n;const o=e(co).getSettings();return{styles:o.styles,assets:o.__unstableResolvedAssets,duotone:null===(t=o.__experimentalFeatures)||void 0===t||null===(n=t.color)||void 0===n?void 0:n.duotone}}),[]),g=(0,s.useMemo)((()=>a?[...a,{css:"body{height:auto;overflow:hidden;}",__unstableType:"presets"}]:a),[a]),h=(0,s.useMemo)((()=>{var e,t;return[...null!==(e=null==u?void 0:u.default)&&void 0!==e?e:[],...null!==(t=null==u?void 0:u.theme)&&void 0!==t?t:[]]}),[u]);mp=mp||(0,d.pure)(tf);const f=n/t;return(0,s.createElement)(m.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${f})`,height:i*f,maxHeight:i>gp?gp*f:void 0,minHeight:r}},(0,s.createElement)(ld,{head:(0,s.createElement)(sp,{styles:g}),assets:c,contentRef:(0,d.useRefEffect)((e=>{const{ownerDocument:{documentElement:t}}=e;t.classList.add("block-editor-block-preview__content-iframe"),t.style.position="absolute",t.style.width="100%",e.style.padding=o+"px",e.style.boxSizing="border-box",e.style.position="absolute",e.style.width="100%"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:t,height:i,pointerEvents:"none",maxHeight:gp,minHeight:0!==f&&f<1&&r?r/f:r}},l,h.map((e=>(0,s.createElement)(pp,{preset:e,key:e.slug}))),(0,s.createElement)(mp,{renderAppender:!1})))}function fp(e){const[t,{width:n}]=(0,d.useResizeObserver)();return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{style:{position:"relative",width:"100%",height:0}},t),(0,s.createElement)("div",{className:"block-editor-block-preview__container"},!!n&&(0,s.createElement)(hp,i({},e,{containerWidth:n}))))}const vp=(0,s.memo)((function(e){let{blocks:t,__experimentalPadding:n=0,viewportWidth:o=1200,__experimentalLive:r=!1,__experimentalOnClick:l,__experimentalMinHeight:i}=e;const a=(0,p.useSelect)((e=>e(co).getSettings()),[]),c=(0,s.useMemo)((()=>{const e={...a};return e.__experimentalBlockPatterns=[],e}),[a]),d=(0,s.useMemo)((()=>(0,u.castArray)(t)),[t]);return t&&0!==t.length?(0,s.createElement)(Fu,{value:d,settings:c},r?(0,s.createElement)(Vu,{onClick:l}):(0,s.createElement)(fp,{viewportWidth:o,__experimentalPadding:n,__experimentalMinHeight:i})):null}));function bp(e){let{blocks:t,props:n={},__experimentalLayout:o}=e;const r=(0,p.useSelect)((e=>e(co).getSettings()),[]),l=(0,d.useDisabled)(),i=(0,d.useMergeRefs)([n.ref,l]),a=(0,s.useMemo)((()=>({...r,__experimentalBlockPatterns:[]})),[r]),m=(0,s.useMemo)((()=>(0,u.castArray)(t)),[t]),g=(0,s.createElement)(Fu,{value:m,settings:a},(0,s.createElement)(of,{renderAppender:!1,__experimentalLayout:o}));return{...n,ref:i,className:c()(n.className,"block-editor-block-preview__live-content","components-disabled"),children:null!=t&&t.length?g:null}}const _p=function(e){var t;let{item:n}=e;const{name:o,title:l,icon:i,description:a,initialAttributes:c,example:u}=n,d=(0,r.isReusableBlock)(n);return(0,s.createElement)("div",{className:"block-editor-inserter__preview-container"},(0,s.createElement)("div",{className:"block-editor-inserter__preview"},d||u?(0,s.createElement)("div",{className:"block-editor-inserter__preview-content"},(0,s.createElement)(vp,{__experimentalPadding:16,viewportWidth:null!==(t=null==u?void 0:u.viewportWidth)&&void 0!==t?t:500,blocks:u?(0,r.getBlockFromExample)(o,{attributes:{...u.attributes,...c},innerBlocks:u.innerBlocks}):(0,r.createBlock)(o,c)})):(0,s.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},(0,h.__)("No Preview Available."))),!d&&(0,s.createElement)(Au,{title:l,icon:i,description:a}))},kp=(0,s.createContext)(),yp=(0,s.forwardRef)((function(e,t){let{isFirst:n,as:o,children:r,...l}=e;const a=(0,s.useContext)(kp);return(0,s.createElement)(m.__unstableCompositeItem,i({ref:t,state:a,role:"option",focusable:!0},l),(e=>{const t={...e,tabIndex:n?0:e.tabIndex};return o?(0,s.createElement)(o,t,r):"function"==typeof r?r(t):(0,s.createElement)(m.Button,t,r)}))})),Ep=(0,s.createElement)(D.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,s.createElement)(D.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"}));function Cp(e){let{count:t,icon:n}=e;return(0,s.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},(0,s.createElement)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip"},(0,s.createElement)(m.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},(0,s.createElement)(m.FlexItem,null,n?(0,s.createElement)(Ru,{icon:n}):(0,h.sprintf)(
|
13 |
/* translators: %d: Number of blocks. */
|
14 |
+
(0,h._n)("%d block","%d blocks",t),t)),(0,s.createElement)(m.FlexItem,null,(0,s.createElement)(Ru,{icon:Ep})))))}const Sp=e=>{let{isEnabled:t,blocks:n,icon:o,children:r}=e;const l={type:"inserter",blocks:n};return(0,s.createElement)(m.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:l,__experimentalDragComponent:(0,s.createElement)(Cp,{count:n.length,icon:o})},(e=>{let{onDraggableStart:n,onDraggableEnd:o}=e;return r({draggable:t,onDragStart:t?n:void 0,onDragEnd:t?o:void 0})}))},wp=(0,s.memo)((function(e){let{className:t,isFirst:n,item:o,onSelect:l,onHover:a,isDraggable:u,...d}=e;const p=(0,s.useRef)(!1),g=o.icon?{backgroundColor:o.icon.background,color:o.icon.foreground}:{},h=(0,s.useMemo)((()=>[(0,r.createBlock)(o.name,o.initialAttributes,(0,r.createBlocksFromInnerBlocksTemplate)(o.innerBlocks))]),[o.name,o.initialAttributes,o.initialAttributes]);return(0,s.createElement)(Sp,{isEnabled:u&&!o.disabled,blocks:h,icon:o.icon},(e=>{let{draggable:r,onDragStart:u,onDragEnd:h}=e;return(0,s.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable:r,onDragStart:e=>{p.current=!0,u&&(a(null),u(e))},onDragEnd:e=>{p.current=!1,h&&h(e)}},(0,s.createElement)(yp,i({isFirst:n,className:c()("block-editor-block-types-list__item",t),disabled:o.isDisabled,onClick:e=>{e.preventDefault(),l(o,(0,bu.isAppleOS)()?e.metaKey:e.ctrlKey),a(null)},onKeyDown:e=>{const{keyCode:t}=e;t===bu.ENTER&&(e.preventDefault(),l(o,(0,bu.isAppleOS)()?e.metaKey:e.ctrlKey),a(null))},onFocus:()=>{p.current||a(o)},onMouseEnter:()=>{p.current||a(o)},onMouseLeave:()=>a(null),onBlur:()=>a(null)},d),(0,s.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:g},(0,s.createElement)(Ru,{icon:o.icon,showColors:!0})),(0,s.createElement)("span",{className:"block-editor-block-types-list__item-title"},(0,s.createElement)(m.__experimentalTruncate,{numberOfLines:3},o.title))))}))})),Bp=(0,s.forwardRef)((function(e,t){const[n,o]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{n&&(0,qt.speak)((0,h.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,s.createElement)("div",i({ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{o(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&o(!1)}},e))})),Ip=(0,s.forwardRef)((function(e,t){const n=(0,s.useContext)(kp);return(0,s.createElement)(m.__unstableCompositeGroup,i({state:n,role:"presentation",ref:t},e))})),xp=function(e){let{items:t=[],onSelect:n,onHover:o=(()=>{}),children:l,label:i,isDraggable:a=!0}=e;return(0,s.createElement)(Bp,{className:"block-editor-block-types-list","aria-label":i},function(e,t){const n=[];for(let t=0,o=e.length;t<o;t+=3)n.push(e.slice(t,t+3));return n}(t).map(((e,t)=>(0,s.createElement)(Ip,{key:t},e.map(((e,l)=>(0,s.createElement)(wp,{key:e.id,item:e,className:(0,r.getBlockMenuDefaultClassName)(e.id),onSelect:n,onHover:o,isDraggable:a&&!e.isDisabled,isFirst:0===t&&0===l})))))),l)},Tp=function(e){let{title:t,icon:n,children:o}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"block-editor-inserter__panel-header"},(0,s.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),(0,s.createElement)(m.Icon,{icon:n})),(0,s.createElement)("div",{className:"block-editor-inserter__panel-content"},o))},Np=(e,t)=>{const{categories:n,collections:o,items:l}=(0,p.useSelect)((t=>{const{getInserterItems:n}=t(co),{getCategories:o,getCollections:l}=t(r.store);return{categories:o(),collections:l(),items:n(e)}}),[e]);return[l,n,o,(0,s.useCallback)(((e,n)=>{let{name:o,initialAttributes:l,innerBlocks:i}=e;const s=(0,r.createBlock)(o,l,(0,r.createBlocksFromInnerBlocksTemplate)(i));t(s,void 0,n)}),[t])]},Pp=function(e){let{children:t}=e;const n=(0,m.__unstableUseCompositeState)({shift:!0,wrap:"horizontal"});return(0,s.createElement)(kp.Provider,{value:n},t)},Mp=[],Lp=function(e){let{rootClientId:t,onInsert:n,onHover:o,showMostUsedBlocks:r}=e;const[l,i,a,c]=Np(t,n),p=(0,s.useMemo)((()=>(0,u.orderBy)(l,["frecency"],["desc"]).slice(0,6)),[l]),m=(0,s.useMemo)((()=>l.filter((e=>!e.category))),[l]),g=(0,s.useMemo)((()=>(0,d.pipe)((e=>e.filter((e=>e.category&&"reusable"!==e.category))),(e=>(0,u.groupBy)(e,"category")))(l)),[l]),f=(0,s.useMemo)((()=>{const e={...a};return Object.keys(a).forEach((t=>{e[t]=l.filter((e=>(e=>e.name.split("/")[0])(e)===t)),0===e[t].length&&delete e[t]})),e}),[l,a]);(0,s.useEffect)((()=>()=>o(null)),[]);const v=(0,d.useAsyncList)(i),b=i.length===v.length,_=(0,s.useMemo)((()=>Object.entries(a)),[a]),k=(0,d.useAsyncList)(b?_:Mp);return(0,s.createElement)(Pp,null,(0,s.createElement)("div",null,r&&!!p.length&&(0,s.createElement)(Tp,{title:(0,h._x)("Most used","blocks")},(0,s.createElement)(xp,{items:p,onSelect:c,onHover:o,label:(0,h._x)("Most used","blocks")})),(0,u.map)(v,(e=>{const t=g[e.slug];return t&&t.length?(0,s.createElement)(Tp,{key:e.slug,title:e.title,icon:e.icon},(0,s.createElement)(xp,{items:t,onSelect:c,onHover:o,label:e.title})):null})),b&&m.length>0&&(0,s.createElement)(Tp,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,h.__)("Uncategorized")},(0,s.createElement)(xp,{items:m,onSelect:c,onHover:o,label:(0,h.__)("Uncategorized")})),(0,u.map)(k,(e=>{let[t,n]=e;const r=f[t];return r&&r.length?(0,s.createElement)(Tp,{key:t,title:n.title,icon:n.icon},(0,s.createElement)(xp,{items:r,onSelect:c,onHover:o,label:n.title})):null}))))},Rp=function(e){let{selectedCategory:t,patternCategories:n,onClickCategory:o,openPatternExplorer:r}=e;const l=(0,d.useViewportMatch)("medium","<"),i=c()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns");return(0,s.createElement)(m.Flex,{justify:"space-between",align:"start",gap:"4",className:i},(0,s.createElement)(m.FlexItem,{isBlock:!0},(0,s.createElement)(m.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:(0,h.__)("Filter patterns"),hideLabelFromVision:!0,value:t.name,onChange:e=>{o(n.find((t=>e===t.name)))},onBlur:e=>{null!=e&&e.relatedTarget||e.stopPropagation()},options:(()=>{const e=[];return n.map((t=>e.push({value:t.name,label:t.label}))),e})()})),!l&&(0,s.createElement)(m.FlexItem,null,(0,s.createElement)(m.Button,{variant:"secondary",className:"block-editor-inserter__patterns-explorer-expand",label:(0,h.__)("Explore all patterns"),onClick:()=>r()},(0,h._x)("Explore","Label for showing all block patterns"))))},Ap=window.wp.notices,Dp=(e,t)=>{const{patternCategories:n,patterns:o}=(0,p.useSelect)((e=>{const{__experimentalGetAllowedPatterns:n,getSettings:o}=e(co);return{patterns:n(t),patternCategories:o().__experimentalBlockPatternCategories}}),[t]),{createSuccessNotice:l}=(0,p.useDispatch)(Ap.store),i=(0,s.useCallback)(((t,n)=>{e((0,u.map)(n,(e=>(0,r.cloneBlock)(e))),t.name),l((0,h.sprintf)(
|
15 |
/* translators: %s: block pattern title. */
|
|