File: /www/wwwroot/www.waciwang.com/wp-content/plugins/gutenberg/build/scripts/autop/index.min.js.map
{
"version": 3,
"sources": ["../../../packages/autop/src/index.ts"],
"sourcesContent": ["/**\n * The regular expression for an HTML element.\n */\nconst htmlSplitRegex: RegExp = ( () => {\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} )();\n\n/**\n * Separate HTML elements and comments from the text.\n *\n * @param input The text which has to be formatted.\n *\n * @return The formatted text.\n */\nfunction htmlSplit( input: string ): string[] {\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 = match.index as number;\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 haystack The text which has to be formatted.\n * @param replacePairs In the form {from: 'to', \u2026}.\n *\n * @return The formatted text.\n */\nfunction replaceInHtmlTags(\n\thaystack: string,\n\treplacePairs: Record< string, string >\n): string {\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 text The text which has to be formatted.\n * @param 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 Text which has been converted into paragraph tags.\n */\nexport function autop( text: string, br: boolean = true ): string {\n\tconst preTags: Array< [ string, string ] > = [];\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\t// Use a function to avoid treating special replacement patterns like $' in the original content\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 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 The content with stripped paragraph tags.\n */\nexport function removep( html: string ): string {\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\tconst preserve: string[] = [];\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 preserve.shift() as string;\n\t\t} );\n\t}\n\n\treturn html;\n}\n"],
"mappings": "gfAGA,IAAMA,GAA2B,IAAM,CA8BtC,IAAMC,EACL,OAZA,8BAjBA,+BAwBA,IAhBA,kDAkBA,KAOA,aAKD,OAAO,IAAI,OAAQA,CAAM,CAC1B,GAAI,EASJ,SAASC,EAAWC,EAA0B,CAC7C,IAAMC,EAAQ,CAAC,EACXC,EAAeF,EAEfG,EACJ,KAAUA,EAAQD,EAAa,MAAOL,CAAe,GAAM,CAK1D,IAAMO,EAAQD,EAAM,MAEpBF,EAAM,KAAMC,EAAa,MAAO,EAAGE,CAAM,CAAE,EAC3CH,EAAM,KAAME,EAAO,CAAE,CAAE,EACvBD,EAAeA,EAAa,MAAOE,EAAQD,EAAO,CAAE,EAAE,MAAO,CAC9D,CAEA,OAAKD,EA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AAOA,EAAK,QAAS,uBAAwB;;;;CAAiB,GAI1DA,EAAK,QAAS,SAAU,IAAM,KAClCA,EAAOA,EAAK,QAAS,6BAAgCL,GAC7CA,EAAE,QAAS,WAAY,EAAG,CAChC,GAIHK,EAAOA,EAAK,QAAS,UAAW;CAAS,EAGzCA,EAAOA,EAAK,QAAS,+BAAgC;GAAO,EAG5DA,EAAOA,EAAK,QAAS,OAAQ,EAAG,EAChCA,EAAOA,EAAK,QAAS,eAAgB,EAAG,EAEnCK,IACJL,EAAOA,EAAK,QAAS,mBAAoB;CAAK,GAG1CM,IACJN,EAAOA,EAAK,QAAS,uBAAwB,QAAS,GAIlDI,EAAS,SACbJ,EAAOA,EAAK,QAAS,iBAAkB,IAC/BI,EAAS,MAAM,CACrB,GAGIJ,GArIC,EAsIT",
"names": ["htmlSplitRegex", "regex", "htmlSplit", "input", "parts", "workingInput", "match", "index", "replaceInHtmlTags", "haystack", "replacePairs", "textArr", "changed", "needles", "i", "j", "needle", "autop", "text", "br", "preTags", "textParts", "lastText", "textPart", "start", "name", "allBlocks", "texts", "textPiece", "a", "b", "preTag", "original", "removep", "html", "blocklist", "blocklist1", "blocklist2", "preserve", "preserveLinebreaks", "preserveBr", "_", "space"]
}