{"version":3,"sources":["jsdelivr-header.js","/npm/@wordpress/html-entities@3.33.0/build-module/@wordpress/html-entities/src/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACLA,IAAI,EAeG,SAAS,EAAgB,GAE/B,GAAK,iBAAoB,IAAS,IAAM,EAAK,QAAS,KACrD,OAAO,OAIH,IAAc,IAKjB,EAHA,SAAS,gBACT,SAAS,eAAe,mBAEN,SAAS,eACzB,mBAAoB,IACpB,cAAe,YAEC,SAAS,cAAe,aAI5C,EAAgB,UAAY,EAC5B,MAAM,EAAU,EAAgB,YAoBhC,OAnBA,EAAgB,UAAY,GAmB5B,CACA,Q","file":"/npm/@wordpress/html-entities@3.33.0/build-module/index.js/+esm","sourceRoot":"","sourcesContent":["/**\n * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0.\n * Original file: /npm/@wordpress/html-entities@3.33.0/build-module/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/** @type {HTMLTextAreaElement} */\nlet _decodeTextArea;\n\n/**\n * Decodes the HTML entities from a given string.\n *\n * @param {string} html String that contain HTML entities.\n *\n * @example\n * ```js\n * const result = decodeEntities( '&aacute;' );\n * console.log( result ); // result will be \"á\"\n * ```\n *\n * @return {string} The decoded string.\n */\nexport function decodeEntities( html ) {\n\t// Not a string, or no entities to decode.\n\tif ( 'string' !== typeof html || -1 === html.indexOf( '&' ) ) {\n\t\treturn html;\n\t}\n\n\t// Create a textarea for decoding entities, that we can reuse.\n\tif ( undefined === _decodeTextArea ) {\n\t\tif (\n\t\t\tdocument.implementation &&\n\t\t\tdocument.implementation.createHTMLDocument\n\t\t) {\n\t\t\t_decodeTextArea = document.implementation\n\t\t\t\t.createHTMLDocument( '' )\n\t\t\t\t.createElement( 'textarea' );\n\t\t} else {\n\t\t\t_decodeTextArea = document.createElement( 'textarea' );\n\t\t}\n\t}\n\n\t_decodeTextArea.innerHTML = html;\n\tconst decoded = _decodeTextArea.textContent;\n\t_decodeTextArea.innerHTML = '';\n\n\t/**\n\t * Cast to string, HTMLTextAreaElement should always have `string` textContent.\n\t *\n\t * > The `textContent` property of the `Node` interface represents the text content of the\n\t * > node and its descendants.\n\t * >\n\t * > Value: A string or `null`\n\t * >\n\t * > * If the node is a `document` or a Doctype, `textContent` returns `null`.\n\t * > * If the node is a CDATA section, comment, processing instruction, or text node,\n\t * >   textContent returns the text inside the node, i.e., the `Node.nodeValue`.\n\t * > * For other node types, `textContent returns the concatenation of the textContent of\n\t * >   every child node, excluding comments and processing instructions. (This is an empty\n\t * >   string if the node has no children.)\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent\n\t */\n\treturn /** @type {string} */ ( decoded );\n}\n"]}