File: /www/wwwroot/www.waciwang.com/wp-content/plugins/gutenberg/build/scripts/a11y/index.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\tif 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