File: /www/wwwroot/www.waciwang.com/wp-content/plugins/gutenberg/build/scripts/a11y/index.min.js.map
{
"version": 3,
"sources": ["package-external:@wordpress/dom-ready", "package-external:@wordpress/i18n", "../../../packages/a11y/src/index.js", "../../../packages/a11y/src/script/add-container.js", "../../../packages/a11y/src/script/add-intro-text.ts", "../../../packages/a11y/src/shared/clear.js", "../../../packages/a11y/src/shared/filter-message.js", "../../../packages/a11y/src/shared/index.js"],
"sourcesContent": ["module.exports = window.wp.domReady;", "module.exports = window.wp.i18n;", "/**\n * WordPress dependencies\n */\nimport domReady from '@wordpress/dom-ready';\n\n/**\n * Internal dependencies\n */\nimport addContainer from './script/add-container';\nimport addIntroText from './script/add-intro-text';\n\nexport { speak } from './shared/index';\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 * Build the live regions markup.\n *\n * @param {'polite'|'assertive'} [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-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", "/**\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-path:inset(50%);' +\n\t\t\t'border:0;' +\n\t\t\t'word-wrap:normal !important;'\n\t);\n\tintroText.setAttribute( '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", "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 * Internal dependencies\n */\nimport clear from './clear';\nimport filterMessage from './filter-message';\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 {'polite'|'assertive'} [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\t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A,GAAW,QAGZF,EAAkBE,EAEXA,CACR,CCNO,SAASC,EAAOC,EAASC,EAAW,CAK1CC,EAAM,EAENF,EAAUG,EAAeH,CAAQ,EAEjC,IAAMI,EAAY,SAAS,eAAgB,uBAAwB,EAC7DC,EAAqB,SAAS,eACnC,sBACD,EACMC,EAAkB,SAAS,eAAgB,mBAAoB,EAEhED,GAAsBJ,IAAa,YACvCI,EAAmB,YAAcL,EACtBM,IACXA,EAAgB,YAAcN,GAO1BI,GACJA,EAAU,gBAAiB,QAAS,CAEtC,CLpCO,SAASG,GAAQ,CACvB,IAAMC,EAAY,SAAS,eAAgB,uBAAwB,EAC7DC,EAAqB,SAAS,eACnC,sBACD,EACMC,EAAkB,SAAS,eAAgB,mBAAoB,EAEhEF,IAAc,MAClBG,EAAa,EAGTF,IAAuB,MAC3BG,EAAc,WAAY,EAGtBF,IAAoB,MACxBE,EAAc,QAAS,CAEzB,IAKA,EAAAC,SAAUN,CAAM",
"names": ["require_dom_ready", "__commonJSMin", "exports", "module", "require_i18n", "__commonJSMin", "exports", "module", "import_dom_ready", "addContainer", "ariaLive", "container", "body", "import_i18n", "addIntroText", "introText", "body", "clear", "regions", "introText", "i", "previousMessage", "filterMessage", "message", "speak", "message", "ariaLive", "clear", "filterMessage", "introText", "containerAssertive", "containerPolite", "setup", "introText", "containerAssertive", "containerPolite", "addIntroText", "addContainer", "domReady"]
}