HEX
Server: nginx/1.28.1
System: Linux VM-0-12-opencloudos 6.6.117-45.oc9.x86_64 #1 SMP Thu Dec 4 10:26:39 CST 2025 x86_64
User: www (1000)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/www.waciwang.com/wp-content/plugins/gutenberg/build/scripts/wordcount/index.js.map
{
  "version": 3,
  "sources": ["../../../packages/wordcount/src/defaultSettings.ts", "../../../packages/wordcount/src/stripTags.ts", "../../../packages/wordcount/src/transposeAstralsToCountableChar.ts", "../../../packages/wordcount/src/stripHTMLEntities.ts", "../../../packages/wordcount/src/stripConnectors.ts", "../../../packages/wordcount/src/stripRemovables.ts", "../../../packages/wordcount/src/stripHTMLComments.ts", "../../../packages/wordcount/src/stripShortcodes.ts", "../../../packages/wordcount/src/stripSpaces.ts", "../../../packages/wordcount/src/transposeHTMLEntitiesToCountableChars.ts", "../../../packages/wordcount/src/index.ts"],
  "sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { UserSettings } from './types';\n\n/**\n * Default settings for word counting operations.\n */\nexport const defaultSettings = {\n\tHTMLRegExp: /<\\/?[a-z][^>]*?>/gi,\n\tHTMLcommentRegExp: /<!--[\\s\\S]*?-->/g,\n\tspaceRegExp: /&nbsp;|&#160;/gi,\n\tHTMLEntityRegExp: /&\\S+?;/g,\n\n\t// \\u2014 = em-dash.\n\tconnectorRegExp: /--|\\u2014/g,\n\n\t// Characters to be removed from input text.\n\tremoveRegExp: new RegExp(\n\t\t[\n\t\t\t'[',\n\n\t\t\t// Basic Latin (extract)\n\t\t\t'\\u0021-\\u002F\\u003A-\\u0040\\u005B-\\u0060\\u007B-\\u007E',\n\n\t\t\t// Latin-1 Supplement (extract)\n\t\t\t'\\u0080-\\u00BF\\u00D7\\u00F7',\n\n\t\t\t/*\n\t\t\t * The following range consists of:\n\t\t\t * General Punctuation\n\t\t\t * Superscripts and Subscripts\n\t\t\t * Currency Symbols\n\t\t\t * Combining Diacritical Marks for Symbols\n\t\t\t * Letterlike Symbols\n\t\t\t * Number Forms\n\t\t\t * Arrows\n\t\t\t * Mathematical Operators\n\t\t\t * Miscellaneous Technical\n\t\t\t * Control Pictures\n\t\t\t * Optical Character Recognition\n\t\t\t * Enclosed Alphanumerics\n\t\t\t * Box Drawing\n\t\t\t * Block Elements\n\t\t\t * Geometric Shapes\n\t\t\t * Miscellaneous Symbols\n\t\t\t * Dingbats\n\t\t\t * Miscellaneous Mathematical Symbols-A\n\t\t\t * Supplemental Arrows-A\n\t\t\t * Braille Patterns\n\t\t\t * Supplemental Arrows-B\n\t\t\t * Miscellaneous Mathematical Symbols-B\n\t\t\t * Supplemental Mathematical Operators\n\t\t\t * Miscellaneous Symbols and Arrows\n\t\t\t */\n\t\t\t'\\u2000-\\u2BFF',\n\n\t\t\t// Supplemental Punctuation.\n\t\t\t'\\u2E00-\\u2E7F',\n\t\t\t']',\n\t\t].join( '' ),\n\t\t'g'\n\t),\n\n\t// Remove UTF-16 surrogate points, see https://en.wikipedia.org/wiki/UTF-16#U.2BD800_to_U.2BDFFF\n\tastralRegExp: /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g,\n\twordsRegExp: /\\S\\s+/g,\n\tcharacters_excluding_spacesRegExp: /\\S/g,\n\n\t/*\n\t * Match anything that is not a formatting character, excluding:\n\t * \\f = form feed\n\t * \\n = new line\n\t * \\r = carriage return\n\t * \\t = tab\n\t * \\v = vertical tab\n\t * \\u00AD = soft hyphen\n\t * \\u2028 = line separator\n\t * \\u2029 = paragraph separator\n\t */\n\tcharacters_including_spacesRegExp: /[^\\f\\n\\r\\t\\v\\u00AD\\u2028\\u2029]/g,\n\tl10n: {\n\t\ttype: 'words',\n\t},\n} satisfies UserSettings;\n", "/**\n * Internal dependencies\n */\nimport type { Settings } from './types';\n\n/**\n * Replaces items matched in the regex with new line\n *\n * @param settings The main settings object containing regular expressions\n * @param text     The string being counted.\n * @return The manipulated text.\n */\nexport default function stripTags( settings: Settings, text: string ): string {\n\treturn text.replace( settings.HTMLRegExp, '\\n' );\n}\n", "/**\n * Internal dependencies\n */\nimport type { Settings } from './types';\n\n/**\n * Replaces items matched in the regex with a single character.\n *\n * @param settings The main settings object containing regular expressions\n * @param text     The string being counted.\n * @return The manipulated text.\n */\nexport default function transposeAstralsToCountableChar(\n\tsettings: Settings,\n\ttext: string\n): string {\n\treturn text.replace( settings.astralRegExp, 'a' );\n}\n", "/**\n * Internal dependencies\n */\nimport type { Settings } from './types';\n\n/**\n * Removes items matched in the regex.\n *\n * @param settings The main settings object containing regular expressions\n * @param text     The string being counted.\n * @return The manipulated text.\n */\nexport default function stripHTMLEntities(\n\tsettings: Settings,\n\ttext: string\n): string {\n\treturn text.replace( settings.HTMLEntityRegExp, '' );\n}\n", "/**\n * Internal dependencies\n */\nimport type { Settings } from './types';\n\n/**\n * Replaces items matched in the regex with spaces.\n *\n * @param settings The main settings object containing regular expressions\n * @param text     The string being counted.\n * @return The manipulated text.\n */\nexport default function stripConnectors(\n\tsettings: Settings,\n\ttext: string\n): string {\n\treturn text.replace( settings.connectorRegExp, ' ' );\n}\n", "/**\n * Internal dependencies\n */\nimport type { Settings } from './types';\n\n/**\n * Replaces items matched in the regex with spaces.\n *\n * @param settings The main settings object containing regular expressions\n * @param text     The string being counted.\n * @return The manipulated text.\n */\nexport default function stripRemovables(\n\tsettings: Settings,\n\ttext: string\n): string {\n\treturn text.replace( settings.removeRegExp, '' );\n}\n", "/**\n * Internal dependencies\n */\nimport type { Settings } from './types';\n\n/**\n * Replaces items matched in the regex with new line.\n *\n * @param settings The main settings object containing regular expressions\n * @param text     The string being counted.\n * @return The manipulated text.\n */\nexport default function stripHTMLComments(\n\tsettings: Settings,\n\ttext: string\n): string {\n\treturn text.replace( settings.HTMLcommentRegExp, '' );\n}\n", "/**\n * Internal dependencies\n */\nimport type { Settings } from './types';\n\n/**\n * Replaces items matched in the regex with a new line.\n *\n * @param settings The main settings object containing regular expressions\n * @param text     The string being counted.\n * @return The manipulated text.\n */\nexport default function stripShortcodes(\n\tsettings: Settings,\n\ttext: string\n): string {\n\tif ( settings.shortcodesRegExp ) {\n\t\treturn text.replace( settings.shortcodesRegExp, '\\n' );\n\t}\n\treturn text;\n}\n", "/**\n * Internal dependencies\n */\nimport type { Settings } from './types';\n\n/**\n * Replaces items matched in the regex with spaces.\n *\n * @param settings The main settings object containing regular expressions\n * @param text     The string being counted.\n * @return The manipulated text.\n */\nexport default function stripSpaces(\n\tsettings: Settings,\n\ttext: string\n): string {\n\treturn text.replace( settings.spaceRegExp, ' ' );\n}\n", "/**\n * Internal dependencies\n */\nimport type { Settings } from './types';\n\n/**\n * Replaces items matched in the regex with a single character.\n *\n * @param settings The main settings object containing regular expressions\n * @param text     The string being counted.\n * @return The manipulated text.\n */\nexport default function transposeHTMLEntitiesToCountableChars(\n\tsettings: Settings,\n\ttext: string\n): string {\n\treturn text.replace( settings.HTMLEntityRegExp, 'a' );\n}\n", "/**\n * Internal dependencies\n */\nimport { defaultSettings } from './defaultSettings';\nimport stripTags from './stripTags';\nimport transposeAstralsToCountableChar from './transposeAstralsToCountableChar';\nimport stripHTMLEntities from './stripHTMLEntities';\nimport stripConnectors from './stripConnectors';\nimport stripRemovables from './stripRemovables';\nimport stripHTMLComments from './stripHTMLComments';\nimport stripShortcodes from './stripShortcodes';\nimport stripSpaces from './stripSpaces';\nimport transposeHTMLEntitiesToCountableChars from './transposeHTMLEntitiesToCountableChars';\n\nimport type { Settings, UserSettings, Strategy } from './types';\n\n/**\n * Private function to manage the settings.\n *\n * @param type         The type of count to be done.\n * @param userSettings Custom settings for the count.\n * @return The combined settings object to be used.\n */\nfunction loadSettings(\n\ttype: Strategy = 'words',\n\tuserSettings: UserSettings = {}\n): Settings {\n\tconst mergedSettings = { ...defaultSettings, ...userSettings };\n\n\tconst settings: Settings = {\n\t\t...mergedSettings,\n\t\ttype,\n\t\tshortcodes: [],\n\t};\n\n\tsettings.shortcodes = settings.l10n?.shortcodes ?? [];\n\n\tif ( settings.shortcodes && settings.shortcodes.length ) {\n\t\tsettings.shortcodesRegExp = new RegExp(\n\t\t\t'\\\\[\\\\/?(?:' + settings.shortcodes.join( '|' ) + ')[^\\\\]]*?\\\\]',\n\t\t\t'g'\n\t\t);\n\t}\n\n\tif (\n\t\tsettings.type !== 'characters_excluding_spaces' &&\n\t\tsettings.type !== 'characters_including_spaces'\n\t) {\n\t\tsettings.type = 'words';\n\t}\n\n\treturn settings;\n}\n\n/**\n * Count the words in text\n *\n * @param text     The text being processed\n * @param regex    The regular expression pattern being matched\n * @param settings Settings object containing regular expressions for each strip function\n * @return Count of words.\n */\nfunction countWords( text: string, regex: RegExp, settings: Settings ): number {\n\ttext = [\n\t\tstripTags.bind( null, settings ),\n\t\tstripHTMLComments.bind( null, settings ),\n\t\tstripShortcodes.bind( null, settings ),\n\t\tstripSpaces.bind( null, settings ),\n\t\tstripHTMLEntities.bind( null, settings ),\n\t\tstripConnectors.bind( null, settings ),\n\t\tstripRemovables.bind( null, settings ),\n\t].reduce( ( result, fn ) => fn( result ), text );\n\ttext = text + '\\n';\n\treturn text.match( regex )?.length ?? 0;\n}\n\n/**\n * Count the characters in text\n *\n * @param text     The text being processed\n * @param regex    The regular expression pattern being matched\n * @param settings Settings object containing regular expressions for each strip function\n * @return Count of characters.\n */\nfunction countCharacters(\n\ttext: string,\n\tregex: RegExp,\n\tsettings: Settings\n): number {\n\ttext = [\n\t\tstripTags.bind( null, settings ),\n\t\tstripHTMLComments.bind( null, settings ),\n\t\tstripShortcodes.bind( null, settings ),\n\t\ttransposeAstralsToCountableChar.bind( null, settings ),\n\t\tstripSpaces.bind( null, settings ),\n\t\ttransposeHTMLEntitiesToCountableChars.bind( null, settings ),\n\t].reduce( ( result, fn ) => fn( result ), text );\n\ttext = text + '\\n';\n\treturn text.match( regex )?.length ?? 0;\n}\n\n/**\n * Count some words.\n *\n * @param text         The text being processed\n * @param type         The type of count. Accepts 'words', 'characters_excluding_spaces', or 'characters_including_spaces'.\n * @param userSettings Custom settings object.\n *\n * @example\n * ```ts\n * import { count } from '@wordpress/wordcount';\n * const numberOfWords = count( 'Words to count', 'words', {} )\n * ```\n *\n * @return The word or character count.\n */\nexport function count(\n\ttext: string,\n\ttype: Strategy,\n\tuserSettings?: UserSettings\n): number {\n\tconst settings = loadSettings( type, userSettings );\n\tlet matchRegExp: RegExp;\n\tswitch ( settings.type ) {\n\t\tcase 'words':\n\t\t\tmatchRegExp = settings.wordsRegExp;\n\t\t\treturn countWords( text, matchRegExp, settings );\n\t\tcase 'characters_including_spaces':\n\t\t\tmatchRegExp = settings.characters_including_spacesRegExp;\n\t\t\treturn countCharacters( text, matchRegExp, settings );\n\t\tcase 'characters_excluding_spaces':\n\t\t\tmatchRegExp = settings.characters_excluding_spacesRegExp;\n\t\t\treturn countCharacters( text, matchRegExp, settings );\n\t\tdefault:\n\t\t\treturn 0;\n\t}\n}\n\n// Export types for external usage\nexport type * from './types';\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQO,MAAM,kBAAkB;IAC9B,YAAY;IACZ,mBAAmB;IACnB,aAAa;IACb,kBAAkB;;IAGlB,iBAAiB;;IAGjB,cAAc,IAAI;MACjB;QACC;;QAGA;;QAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA6BA;;QAGA;QACA;MACD,EAAE,KAAM,EAAG;MACX;IACD;;IAGA,cAAc;IACd,aAAa;IACb,mCAAmC;;;;;;;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