1/*! 2 * shared v9.14.5 3 * (c) 2025 kazuya kawaguchi 4 * Released under the MIT License. 5 */ 6function warn(msg, err) { 7 if (typeof console !== "undefined") { 8 console.warn(`[intlify] ` + msg); 9 if (err) { 10 console.warn(err.stack); 11 } 12 } 13} 14const inBrowser = typeof window !== "undefined"; 15const makeSymbol = (name, shareable = false) => !shareable ? Symbol(name) : Symbol.for(name); 16const generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source }); 17const friendlyJSONstringify = (json) => JSON.stringify(json).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"); 18const isNumber = (val) => typeof val === "number" && isFinite(val); 19const isDate = (val) => toTypeString(val) === "[object Date]"; 20const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; 21const isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0; 22const assign = Object.assign; 23const _create = Object.create; 24const create = (obj = null) => _create(obj); 25let _globalThis; 26const getGlobalThis = () => { 27 return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : create()); 28}; 29function escapeHtml(rawText) { 30 return rawText.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\//g, "/").replace(/=/g, "="); 31} 32function escapeAttributeValue(value) { 33 return value.replace(/&(?![a-zA-Z0-9#]{2,6};)/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">"); 34} 35function sanitizeTranslatedHtml(html) { 36 html = html.replace(/(\w+)\s*=\s*"([^"]*)"/g, (_, attrName, attrValue) => `${attrName}="${escapeAttributeValue(attrValue)}"`); 37 html = html.replace(/(\w+)\s*=\s*'([^']*)'/g, (_, attrName, attrValue) => `${attrName}='${escapeAttributeValue(attrValue)}'`); 38 const eventHandlerPattern = /\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi; 39 if (eventHandlerPattern.test(html)) { 40 html = html.replace(/(\s+)(on)(\w+\s*=)/gi, "$1on$3"); 41 } 42 const javascriptUrlPattern = [ 43 /(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi, 44 /(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi 45 ]; 46 javascriptUrlPattern.forEach((pattern) => { 47 html = html.replace(pattern, "$1javascript:"); 48 }); 49 return html; 50} 51const hasOwnProperty = Object.prototype.hasOwnProperty; 52function hasOwn(obj, key) { 53 return hasOwnProperty.call(obj, key); 54} 55const isArray = Array.isArray; 56const isFunction = (val) => typeof val === "function"; 57const isString = (val) => typeof val === "string"; 58const isBoolean = (val) => typeof val === "boolean"; 59const isObject$1 = (val) => val !== null && typeof val === "object"; 60const isPromise = (val) => { 61 return isObject$1(val) && isFunction(val.then) && isFunction(val.catch); 62}; 63const objectToString = Object.prototype.toString; 64const toTypeString = (value) => objectToString.call(value); 65const isPlainObject = (val) => { 66 if (!isObject$1(val)) 67 return false; 68 const proto = Object.getPrototypeOf(val); 69 return proto === null || proto.constructor === Object; 70}; 71const toDisplayString = (val) => { 72 return val == null ? "" : isArray(val) || isPlainObject(val) && val.toString === objectToString ? JSON.stringify(val, null, 2) : String(val); 73}; 74function join(items, separator = "") { 75 return items.reduce((str, item, index) => index === 0 ? str + item : str + separator + item, ""); 76} 77function incrementer(code2) { 78 let current = code2; 79 return () => ++current; 80} 81const isNotObjectOrIsArray = (val) => !isObject$1(val) || isArray(val); 82function deepCopy(src, des) { 83 if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) { 84 throw new Error("Invalid value"); 85 } 86 const stack = [{ src, des }]; 87 while (stack.length) { 88 const { src: src2, des: des2 } = stack.pop(); 89 Object.keys(src2).forEach((key) => { 90 if (key === "__proto__") { 91 return; 92 } 93 if (isObject$1(src2[key]) && !isObject$1(des2[key])) { 94 des2[key] = Array.isArray(src2[key]) ? [] : create(); 95 } 96 if (isNotObjectOrIsArray(des2[key]) || isNotObjectOrIsArray(src2[key])) { 97 des2[key] = src2[key]; 98 } else { 99 stack.push({ src: src2[key], des: des2[key] }); 100 } 101 }); 102 } 103} 104/*! 105 * message-compiler v9.14.5 106 * (c) 2025 kazuya kawaguchi 107 * Released under the MIT License. 108 */ 109const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g; 110function format(message, ...args) { 111 if (args.length === 1 && isObject(args[0])) { 112 args = args[0]; 113 } 114 if (!args || !args.hasOwnProperty) { 115 args = {}; 116 } 117 return message.replace(RE_ARGS, (match, identifier) => { 118 return args.hasOwnProperty(identifier) ? args[identifier] : ""; 119 }); 120} 121const isObject = (val) => val !== null && typeof val === "object"; 122const CompileWarnCodes = { 123 USE_MODULO_SYNTAX: 1, 124 __EXTEND_POINT__: 2 125}; 126const CompileErrorCodes = { 127 EXPECTED_TOKEN: 1, 128 INVALID_TOKEN_IN_PLACEHOLDER: 2, 129 UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3, 130 UNKNOWN_ESCAPE_SEQUENCE: 4, 131 INVALID_UNICODE_ESCAPE_SEQUENCE: 5, 132 UNBALANCED_CLOSING_BRACE: 6,
133 UNTERMINATED_CLOSING_BRACE: 7, 134 EMPTY_PLACEHOLDER: 8, 135 NOT_ALLOW_NEST_PLACEHOLDER: 9, 136 INVALID_LINKED_FORMAT: 10, 137 MUST_HAVE_MESSAGES_IN_PLURAL: 11, 138 UNEXPECTED_EMPTY_LINKED_MODIFIER: 12, 139 UNEXPECTED_EMPTY_LINKED_KEY: 13, 140 UNEXPECTED_LEXICAL_ANALYSIS: 14, 141 UNHANDLED_CODEGEN_NODE_TYPE: 15, 142 UNHANDLED_MINIFIER_NODE_TYPE: 16, 143 __EXTEND_POINT__: 17 144}; 145const errorMessages = { 146 [CompileErrorCodes.EXPECTED_TOKEN]: `Expected token: '{0}'`, 147 [CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER]: `Invalid token in placeholder: '{0}'`, 148 [CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: `Unterminated single quote in placeholder`, 149 [CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE]: `Unknown escape sequence: \\{0}`, 150 [CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE]: `Invalid unicode escape sequence: {0}`, 151 [CompileErrorCodes.UNBALANCED_CLOSING_BRACE]: `Unbalanced closing brace`, 152 [CompileErrorCodes.UNTERMINATED_CLOSING_BRACE]: `Unterminated closing brace`, 153 [CompileErrorCodes.EMPTY_PLACEHOLDER]: `Empty placeholder`, 154 [CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER]: `Not allowed nest placeholder`, 155 [CompileErrorCodes.INVALID_LINKED_FORMAT]: `Invalid linked format`, 156 [CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL]: `Plural must have messages`, 157 [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER]: `Unexpected empty linked modifier`, 158 [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY]: `Unexpected empty linked key`, 159 [CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS]: `Unexpected lexical analysis in token: '{0}'`, 160 [CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE]: `unhandled codegen node type: '{0}'`, 161 [CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE]: `unhandled mimifier node type: '{0}'` 162}; 163function createCompileError(code2, loc, options = {}) { 164 const { domain, messages, args } = options; 165 const msg = format((messages || errorMessages)[code2] || "", ...args || []); 166 const error = new SyntaxError(String(msg)); 167 error.code = code2; 168 if (loc) { 169 error.location = loc; 170 } 171 error.domain = domain; 172 return error; 173} 174/*! 175 * core-base v9.14.5 176 * (c) 2025 kazuya kawaguchi 177 * Released under the MIT License. 178 */ 179function initFeatureFlags() { 180 if (typeof __INTLIFY_PROD_DEVTOOLS__ !== "boolean") { 181 getGlobalThis().__INTLIFY_PROD_DEVTOOLS__ = false; 182 } 183} 184function isMessageAST(val) { 185 return isObject$1(val) && resolveType(val) === 0 && (hasOwn(val, "b") || hasOwn(val, "body")); 186} 187const PROPS_BODY = ["b", "body"]; 188const PROPS_CASES = ["c", "cases"]; 189const PROPS_STATIC = ["s", "static"]; 190const PROPS_ITEMS = ["i", "items"]; 191const PROPS_TYPE = ["t", "type"]; 192function resolveType(node) { 193 return resolveProps(node, PROPS_TYPE); 194} 195const PROPS_VALUE = ["v", "value"]; 196const PROPS_MODIFIER = ["m", "modifier"]; 197const PROPS_KEY = ["k", "key"]; 198function resolveProps(node, props, defaultValue) { 199 for (let i = 0; i < props.length; i++) { 200 const prop = props[i]; 201 if (hasOwn(node, prop) && node[prop] != null) { 202 return node[prop]; 203 } 204 } 205 return defaultValue; 206} 207const AST_NODE_PROPS_KEYS = [ 208 ...PROPS_BODY, 209 ...PROPS_CASES, 210 ...PROPS_STATIC, 211 ...PROPS_ITEMS, 212 ...PROPS_KEY, 213 ...PROPS_MODIFIER, 214 ...PROPS_VALUE, 215 ...PROPS_TYPE 216]; 217const pathStateMachine = []; 218pathStateMachine[0] = { 219 ["w"]: [0], 220 ["i"]: [3, 0], 221 ["["]: [4], 222 ["o"]: [7] 223}; 224pathStateMachine[1] = { 225 ["w"]: [1], 226 ["."]: [2], 227 ["["]: [4], 228 ["o"]: [7] 229}; 230pathStateMachine[2] = { 231 ["w"]: [2], 232 ["i"]: [3, 0], 233 ["0"]: [3, 0] 234}; 235pathStateMachine[3] = { 236 ["i"]: [3, 0], 237 ["0"]: [3, 0], 238 ["w"]: [1, 1], 239 ["."]: [2, 1], 240 ["["]: [4, 1], 241 ["o"]: [7, 1] 242}; 243pathStateMachine[4] = { 244 ["'"]: [5, 0], 245 ['"']: [6, 0], 246 ["["]: [ 247 4, 248 2 249 ], 250 ["]"]: [1, 3], 251 ["o"]: 8, 252 ["l"]: [4, 0] 253}; 254pathStateMachine[5] = { 255 ["'"]: [4, 0], 256 ["o"]: 8, 257 ["l"]: [5, 0] 258}; 259pathStateMachine[6] = { 260 ['"']: [4, 0], 261 ["o"]: 8, 262 ["l"]: [6, 0] 263}; 264const literalValueRE = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/; 265function isLiteral(exp) { 266 return literalValueRE.test(exp); 267} 268function stripQuotes(str) { 269 const a = str.charCodeAt(0); 270 const b = str.charCodeAt(str.length - 1); 271 return a === b && (a === 34 || a === 39) ? str.slice(1, -1) : str; 272}
vendor: 15,926 bytes, lines 273-760
273function getPathCharType(ch) { 274 if (ch === void 0 || ch === null) { 275 return "o"; 276 } 277 const code2 = ch.charCodeAt(0); 278 switch (code2) { 279 case 91: 280 case 93: 281 case 46: 282 case 34: 283 case 39: 284 return ch; 285 case 95: 286 case 36: 287 case 45: 288 return "i"; 289 case 9: 290 case 10: 291 case 13: 292 case 160: 293 case 65279: 294 case 8232: 295 case 8233: 296 return "w"; 297 } 298 return "i"; 299} 300function formatSubPath(path) { 301 const trimmed = path.trim(); 302 if (path.charAt(0) === "0" && isNaN(parseInt(path))) { 303 return false; 304 } 305 return isLiteral(trimmed) ? stripQuotes(trimmed) : "*" + trimmed; 306} 307function parse(path) { 308 const keys = []; 309 let index = -1; 310 let mode = 0; 311 let subPathDepth = 0; 312 let c; 313 let key; 314 let newChar; 315 let type; 316 let transition; 317 let action; 318 let typeMap; 319 const actions = []; 320 actions[0] = () => { 321 if (key === void 0) { 322 key = newChar; 323 } else { 324 key += newChar; 325 } 326 }; 327 actions[1] = () => { 328 if (key !== void 0) { 329 keys.push(key); 330 key = void 0; 331 } 332 }; 333 actions[2] = () => { 334 actions[0](); 335 subPathDepth++; 336 }; 337 actions[3] = () => { 338 if (subPathDepth > 0) { 339 subPathDepth--; 340 mode = 4; 341 actions[0](); 342 } else { 343 subPathDepth = 0; 344 if (key === void 0) { 345 return false; 346 } 347 key = formatSubPath(key); 348 if (key === false) { 349 return false; 350 } else { 351 actions[1](); 352 } 353 } 354 }; 355 function maybeUnescapeQuote() { 356 const nextChar = path[index + 1]; 357 if (mode === 5 && nextChar === "'" || mode === 6 && nextChar === '"') { 358 index++; 359 newChar = "\\" + nextChar; 360 actions[0](); 361 return true; 362 } 363 } 364 while (mode !== null) { 365 index++; 366 c = path[index]; 367 if (c === "\\" && maybeUnescapeQuote()) { 368 continue; 369 } 370 type = getPathCharType(c); 371 typeMap = pathStateMachine[mode]; 372 transition = typeMap[type] || typeMap["l"] || 8; 373 if (transition === 8) { 374 return; 375 } 376 mode = transition[0]; 377 if (transition[1] !== void 0) { 378 action = actions[transition[1]]; 379 if (action) { 380 newChar = c; 381 if (action() === false) { 382 return; 383 } 384 } 385 } 386 if (mode === 7) { 387 return keys; 388 } 389 } 390} 391const cache = /* @__PURE__ */ new Map(); 392function resolveWithKeyValue(obj, path) { 393 return isObject$1(obj) ? obj[path] : null; 394} 395function resolveValue(obj, path) { 396 if (!isObject$1(obj)) { 397 return null; 398 } 399 let hit = cache.get(path); 400 if (!hit) { 401 hit = parse(path); 402 if (hit) { 403 cache.set(path, hit); 404 } 405 } 406 if (!hit) { 407 return null; 408 } 409 const len = hit.length; 410 let last = obj; 411 let i = 0; 412 while (i < len) { 413 const key = hit[i]; 414 if (AST_NODE_PROPS_KEYS.includes(key) && isMessageAST(last)) { 415 return null; 416 } 417 const val = last[key]; 418 if (val === void 0) { 419 return null; 420 } 421 if (isFunction(last)) { 422 return null; 423 } 424 last = val; 425 i++; 426 } 427 return last; 428} 429const DEFAULT_MODIFIER = (str) => str; 430const DEFAULT_MESSAGE = (ctx) => ""; 431const DEFAULT_MESSAGE_DATA_TYPE = "text"; 432const DEFAULT_NORMALIZE = (values) => values.length === 0 ? "" : join(values); 433const DEFAULT_INTERPOLATE = toDisplayString; 434function pluralDefault(choice, choicesLength) { 435 choice = Math.abs(choice); 436 if (choicesLength === 2) { 437 return choice ? choice > 1 ? 1 : 0 : 1; 438 } 439 return choice ? Math.min(choice, 2) : 0; 440} 441function getPluralIndex(options) { 442 const index = isNumber(options.pluralIndex) ? options.pluralIndex : -1; 443 return options.named && (isNumber(options.named.count) || isNumber(options.named.n)) ? isNumber(options.named.count) ? options.named.count : isNumber(options.named.n) ? options.named.n : index : index; 444} 445function normalizeNamed(pluralIndex, props) { 446 if (!props.count) { 447 props.count = pluralIndex; 448 } 449 if (!props.n) { 450 props.n = pluralIndex; 451 } 452} 453function createMessageContext(options = {}) { 454 const locale = options.locale; 455 const pluralIndex = getPluralIndex(options); 456 const pluralRule = isObject$1(options.pluralRules) && isString(locale) && isFunction(options.pluralRules[locale]) ? options.pluralRules[locale] : pluralDefault; 457 const orgPluralRule = isObject$1(options.pluralRules) && isString(locale) && isFunction(options.pluralRules[locale]) ? pluralDefault : void 0; 458 const plural = (messages) => { 459 return messages[pluralRule(pluralIndex, messages.length, orgPluralRule)]; 460 }; 461 const _list = options.list || []; 462 const list = (index) => _list[index]; 463 const _named = options.named || create(); 464 isNumber(options.pluralIndex) && normalizeNamed(pluralIndex, _named); 465 const named = (key) => _named[key]; 466 function message(key) { 467 const msg = isFunction(options.messages) ? options.messages(key) : isObject$1(options.messages) ? options.messages[key] : false; 468 return !msg ? options.parent ? options.parent.message(key) : DEFAULT_MESSAGE : msg; 469 } 470 const _modifier = (name) => options.modifiers ? options.modifiers[name] : DEFAULT_MODIFIER; 471 const normalize = isPlainObject(options.processor) && isFunction(options.processor.normalize) ? options.processor.normalize : DEFAULT_NORMALIZE; 472 const interpolate = isPlainObject(options.processor) && isFunction(options.processor.interpolate) ? options.processor.interpolate : DEFAULT_INTERPOLATE; 473 const type = isPlainObject(options.processor) && isString(options.processor.type) ? options.processor.type : DEFAULT_MESSAGE_DATA_TYPE; 474 const linked = (key, ...args) => { 475 const [arg1, arg2] = args; 476 let type2 = "text"; 477 let modifier = ""; 478 if (args.length === 1) { 479 if (isObject$1(arg1)) { 480 modifier = arg1.modifier || modifier; 481 type2 = arg1.type || type2; 482 } else if (isString(arg1)) { 483 modifier = arg1 || modifier; 484 } 485 } else if (args.length === 2) { 486 if (isString(arg1)) { 487 modifier = arg1 || modifier; 488 } 489 if (isString(arg2)) { 490 type2 = arg2 || type2; 491 } 492 } 493 const ret = message(key)(ctx); 494 const msg = type2 === "vnode" && isArray(ret) && modifier ? ret[0] : ret; 495 return modifier ? _modifier(modifier)(msg, type2) : msg; 496 }; 497 const ctx = { 498 ["list"]: list, 499 ["named"]: named, 500 ["plural"]: plural, 501 ["linked"]: linked, 502 ["message"]: message, 503 ["type"]: type, 504 ["interpolate"]: interpolate, 505 ["normalize"]: normalize, 506 ["values"]: assign(create(), _list, _named) 507 }; 508 return ctx; 509} 510let devtools = null; 511function setDevToolsHook(hook) { 512 devtools = hook; 513} 514function initI18nDevTools(i18n, version, meta) { 515 devtools && devtools.emit("i18n:init", { 516 timestamp: Date.now(), 517 i18n, 518 version, 519 meta 520 }); 521} 522const translateDevTools = /* @__PURE__ */ createDevToolsHook("function:translate"); 523function createDevToolsHook(hook) { 524 return (payloads) => devtools && devtools.emit(hook, payloads); 525} 526const code$1 = CompileWarnCodes.__EXTEND_POINT__; 527const inc$1 = incrementer(code$1); 528const CoreWarnCodes = { 529 NOT_FOUND_KEY: code$1, 530 FALLBACK_TO_TRANSLATE: inc$1(), 531 CANNOT_FORMAT_NUMBER: inc$1(), 532 FALLBACK_TO_NUMBER_FORMAT: inc$1(), 533 CANNOT_FORMAT_DATE: inc$1(), 534 FALLBACK_TO_DATE_FORMAT: inc$1(), 535 EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: inc$1(), 536 __EXTEND_POINT__: inc$1() 537}; 538const code = CompileErrorCodes.__EXTEND_POINT__; 539const inc = incrementer(code); 540const CoreErrorCodes = { 541 INVALID_ARGUMENT: code, 542 INVALID_DATE_ARGUMENT: inc(), 543 INVALID_ISO_DATE_ARGUMENT: inc(), 544 NOT_SUPPORT_NON_STRING_MESSAGE: inc(), 545 NOT_SUPPORT_LOCALE_PROMISE_VALUE: inc(), 546 NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: inc(), 547 NOT_SUPPORT_LOCALE_TYPE: inc(), 548 __EXTEND_POINT__: inc() 549}; 550function createCoreError(code2) { 551 return createCompileError(code2, null, void 0); 552} 553function getLocale(context, options) { 554 return options.locale != null ? resolveLocale(options.locale) : resolveLocale(context.locale); 555} 556let _resolveLocale; 557function resolveLocale(locale) { 558 if (isString(locale)) { 559 return locale; 560 } else { 561 if (isFunction(locale)) { 562 if (locale.resolvedOnce && _resolveLocale != null) { 563 return _resolveLocale; 564 } else if (locale.constructor.name === "Function") { 565 const resolve = locale(); 566 if (isPromise(resolve)) { 567 throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE); 568 } 569 return _resolveLocale = resolve; 570 } else { 571 throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION); 572 } 573 } else { 574 throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE); 575 } 576 } 577} 578function fallbackWithSimple(ctx, fallback, start) { 579 return [.../* @__PURE__ */ new Set([ 580 start, 581 ...isArray(fallback) ? fallback : isObject$1(fallback) ? Object.keys(fallback) : isString(fallback) ? [fallback] : [start] 582 ])]; 583} 584function fallbackWithLocaleChain(ctx, fallback, start) { 585 const startLocale = isString(start) ? start : DEFAULT_LOCALE; 586 const context = ctx; 587 if (!context.__localeChainCache) { 588 context.__localeChainCache = /* @__PURE__ */ new Map(); 589 } 590 let chain = context.__localeChainCache.get(startLocale); 591 if (!chain) { 592 chain = []; 593 let block = [start]; 594 while (isArray(block)) { 595 block = appendBlockToChain(chain, block, fallback); 596 } 597 const defaults = isArray(fallback) || !isPlainObject(fallback) ? fallback : fallback["default"] ? fallback["default"] : null; 598 block = isString(defaults) ? [defaults] : defaults; 599 if (isArray(block)) { 600 appendBlockToChain(chain, block, false); 601 } 602 context.__localeChainCache.set(startLocale, chain); 603 } 604 return chain; 605} 606function appendBlockToChain(chain, block, blocks) { 607 let follow = true; 608 for (let i = 0; i < block.length && isBoolean(follow); i++) { 609 const locale = block[i]; 610 if (isString(locale)) { 611 follow = appendLocaleToChain(chain, block[i], blocks); 612 } 613 } 614 return follow; 615} 616function appendLocaleToChain(chain, locale, blocks) { 617 let follow; 618 const tokens = locale.split("-"); 619 do { 620 const target = tokens.join("-"); 621 follow = appendItemToChain(chain, target, blocks); 622 tokens.splice(-1, 1); 623 } while (tokens.length && follow === true); 624 return follow; 625} 626function appendItemToChain(chain, target, blocks) { 627 let follow = false; 628 if (!chain.includes(target)) { 629 follow = true; 630 if (target) { 631 follow = target[target.length - 1] !== "!"; 632 const locale = target.replace(/!/g, ""); 633 chain.push(locale); 634 if ((isArray(blocks) || isPlainObject(blocks)) && blocks[locale]) { 635 follow = blocks[locale]; 636 } 637 } 638 } 639 return follow; 640} 641const VERSION = "9.14.5"; 642const NOT_REOSLVED = -1; 643const DEFAULT_LOCALE = "en-US"; 644const MISSING_RESOLVE_VALUE = ""; 645const capitalize = (str) => `${str.charAt(0).toLocaleUpperCase()}${str.substr(1)}`; 646function getDefaultLinkedModifiers() { 647 return { 648 upper: (val, type) => { 649 return type === "text" && isString(val) ? val.toUpperCase() : type === "vnode" && isObject$1(val) && "__v_isVNode" in val ? val.children.toUpperCase() : val; 650 }, 651 lower: (val, type) => { 652 return type === "text" && isString(val) ? val.toLowerCase() : type === "vnode" && isObject$1(val) && "__v_isVNode" in val ? val.children.toLowerCase() : val; 653 }, 654 capitalize: (val, type) => { 655 return type === "text" && isString(val) ? capitalize(val) : type === "vnode" && isObject$1(val) && "__v_isVNode" in val ? capitalize(val.children) : val; 656 } 657 }; 658} 659let _compiler; 660let _resolver; 661function registerMessageResolver(resolver) { 662 _resolver = resolver; 663} 664let _fallbacker; 665function registerLocaleFallbacker(fallbacker) { 666 _fallbacker = fallbacker; 667} 668let _additionalMeta = null; 669const setAdditionalMeta = (meta) => { 670 _additionalMeta = meta; 671}; 672const getAdditionalMeta = () => _additionalMeta; 673let _fallbackContext = null; 674const setFallbackContext = (context) => { 675 _fallbackContext = context; 676}; 677const getFallbackContext = () => _fallbackContext; 678let _cid = 0; 679function createCoreContext(options = {}) { 680 const onWarn = isFunction(options.onWarn) ? options.onWarn : warn; 681 const version = isString(options.version) ? options.version : VERSION; 682 const locale = isString(options.locale) || isFunction(options.locale) ? options.locale : DEFAULT_LOCALE; 683 const _locale = isFunction(locale) ? DEFAULT_LOCALE : locale; 684 const fallbackLocale = isArray(options.fallbackLocale) || isPlainObject(options.fallbackLocale) || isString(options.fallbackLocale) || options.fallbackLocale === false ? options.fallbackLocale : _locale; 685 const messages = isPlainObject(options.messages) ? options.messages : createResources(_locale); 686 const datetimeFormats = isPlainObject(options.datetimeFormats) ? options.datetimeFormats : createResources(_locale); 687 const numberFormats = isPlainObject(options.numberFormats) ? options.numberFormats : createResources(_locale); 688 const modifiers = assign(create(), options.modifiers, getDefaultLinkedModifiers()); 689 const pluralRules = options.pluralRules || create(); 690 const missing = isFunction(options.missing) ? options.missing : null; 691 const missingWarn = isBoolean(options.missingWarn) || isRegExp(options.missingWarn) ? options.missingWarn : true; 692 const fallbackWarn = isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn) ? options.fallbackWarn : true; 693 const fallbackFormat = !!options.fallbackFormat; 694 const unresolving = !!options.unresolving; 695 const postTranslation = isFunction(options.postTranslation) ? options.postTranslation : null; 696 const processor = isPlainObject(options.processor) ? options.processor : null; 697 const warnHtmlMessage = isBoolean(options.warnHtmlMessage) ? options.warnHtmlMessage : true; 698 const escapeParameter = !!options.escapeParameter; 699 const messageCompiler = isFunction(options.messageCompiler) ? options.messageCompiler : _compiler; 700 const messageResolver = isFunction(options.messageResolver) ? options.messageResolver : _resolver || resolveWithKeyValue; 701 const localeFallbacker = isFunction(options.localeFallbacker) ? options.localeFallbacker : _fallbacker || fallbackWithSimple; 702 const fallbackContext = isObject$1(options.fallbackContext) ? options.fallbackContext : void 0; 703 const internalOptions = options; 704 const __datetimeFormatters = isObject$1(internalOptions.__datetimeFormatters) ? internalOptions.__datetimeFormatters : /* @__PURE__ */ new Map(); 705 const __numberFormatters = isObject$1(internalOptions.__numberFormatters) ? internalOptions.__numberFormatters : /* @__PURE__ */ new Map(); 706 const __meta = isObject$1(internalOptions.__meta) ? internalOptions.__meta : {}; 707 _cid++; 708 const context = { 709 version, 710 cid: _cid, 711 locale, 712 fallbackLocale, 713 messages, 714 modifiers, 715 pluralRules, 716 missing, 717 missingWarn, 718 fallbackWarn, 719 fallbackFormat, 720 unresolving, 721 postTranslation, 722 processor, 723 warnHtmlMessage, 724 escapeParameter, 725 messageCompiler, 726 messageResolver, 727 localeFallbacker, 728 fallbackContext, 729 onWarn, 730 __meta 731 }; 732 { 733 context.datetimeFormats = datetimeFormats; 734 context.numberFormats = numberFormats; 735 context.__datetimeFormatters = __datetimeFormatters; 736 context.__numberFormatters = __numberFormatters; 737 } 738 if (__INTLIFY_PROD_DEVTOOLS__) { 739 initI18nDevTools(context, version, __meta); 740 } 741 return context; 742} 743const createResources = (locale) => ({ [locale]: create() }); 744function handleMissing(context, key, locale, missingWarn, type) { 745 const { missing, onWarn } = context; 746 if (missing !== null) { 747 const ret = missing(context, locale, key, type); 748 return isString(ret) ? ret : key; 749 } else { 750 return key; 751 } 752} 753function updateFallbackLocale(ctx, locale, fallback) { 754 const context = ctx; 755 context.__localeChainCache = /* @__PURE__ */ new Map(); 756 ctx.localeFallbacker(ctx, fallback, locale); 757} 758function isAlmostSameLocale(locale, compareLocale) { 759 if (locale === compareLocale) 760 return false;
761 return locale.split("-")[0] === compareLocale.split("-")[0]; 762} 763function isImplicitFallback(targetLocale, locales) { 764 const index = locales.indexOf(targetLocale); 765 if (index === -1) { 766 return false; 767 } 768 for (let i = index + 1; i < locales.length; i++) { 769 if (isAlmostSameLocale(targetLocale, locales[i])) { 770 return true; 771 } 772 } 773 return false; 774} 775const NOOP_MESSAGE_FUNCTION = () => ""; 776const isMessageFunction = (val) => isFunction(val); 777function translate(context, ...args) { 778 const { fallbackFormat, postTranslation, unresolving, messageCompiler, fallbackLocale, messages } = context; 779 const [key, options] = parseTranslateArgs(...args); 780 const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn; 781 const fallbackWarn = isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn; 782 const escapeParameter = isBoolean(options.escapeParameter) ? options.escapeParameter : context.escapeParameter; 783 const resolvedMessage = !!options.resolvedMessage; 784 const defaultMsgOrKey = isString(options.default) || isBoolean(options.default) ? !isBoolean(options.default) ? options.default : !messageCompiler ? () => key : key : fallbackFormat ? !messageCompiler ? () => key : key : ""; 785 const enableDefaultMsg = fallbackFormat || defaultMsgOrKey !== ""; 786 const locale = getLocale(context, options); 787 escapeParameter && escapeParams(options); 788 let [formatScope, targetLocale, message] = !resolvedMessage ? resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) : [ 789 key, 790 locale, 791 messages[locale] || create() 792 ]; 793 let format2 = formatScope; 794 let cacheBaseKey = key; 795 if (!resolvedMessage && !(isString(format2) || isMessageAST(format2) || isMessageFunction(format2))) { 796 if (enableDefaultMsg) { 797 format2 = defaultMsgOrKey; 798 cacheBaseKey = format2; 799 } 800 } 801 if (!resolvedMessage && (!(isString(format2) || isMessageAST(format2) || isMessageFunction(format2)) || !isString(targetLocale))) { 802 return unresolving ? NOT_REOSLVED : key; 803 } 804 let occurred = false; 805 const onError = () => { 806 occurred = true; 807 }; 808 const msg = !isMessageFunction(format2) ? compileMessageFormat(context, key, targetLocale, format2, cacheBaseKey, onError) : format2; 809 if (occurred) { 810 return format2; 811 } 812 const ctxOptions = getMessageContextOptions(context, targetLocale, message, options); 813 const msgContext = createMessageContext(ctxOptions); 814 const messaged = evaluateMessage(context, msg, msgContext); 815 let ret = postTranslation ? postTranslation(messaged, key) : messaged; 816 if (escapeParameter && isString(ret)) { 817 ret = sanitizeTranslatedHtml(ret); 818 } 819 if (__INTLIFY_PROD_DEVTOOLS__) { 820 const payloads = { 821 timestamp: Date.now(), 822 key: isString(key) ? key : isMessageFunction(format2) ? format2.key : "", 823 locale: targetLocale || (isMessageFunction(format2) ? format2.locale : ""), 824 format: isString(format2) ? format2 : isMessageFunction(format2) ? format2.source : "", 825 message: ret 826 }; 827 payloads.meta = assign({}, context.__meta, getAdditionalMeta() || {}); 828 translateDevTools(payloads); 829 } 830 return ret; 831} 832function escapeParams(options) { 833 if (isArray(options.list)) { 834 options.list = options.list.map((item) => isString(item) ? escapeHtml(item) : item); 835 } else if (isObject$1(options.named)) { 836 Object.keys(options.named).forEach((key) => { 837 if (isString(options.named[key])) { 838 options.named[key] = escapeHtml(options.named[key]); 839 } 840 }); 841 } 842} 843function resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) { 844 const { messages, onWarn, messageResolver: resolveValue2, localeFallbacker } = context; 845 const locales = localeFallbacker(context, fallbackLocale, locale); 846 let message = create(); 847 let targetLocale; 848 let format2 = null; 849 const type = "translate"; 850 for (let i = 0; i < locales.length; i++) { 851 targetLocale = locales[i]; 852 message = messages[targetLocale] || create(); 853 if ((format2 = resolveValue2(message, key)) === null) { 854 format2 = message[key]; 855 } 856 if (isString(format2) || isMessageAST(format2) || isMessageFunction(format2)) { 857 break; 858 } 859 if (!isImplicitFallback(targetLocale, locales)) { 860 const missingRet = handleMissing( 861 context, 862 key,
vendor: 11,180 bytes, lines 863-1253
863 targetLocale, 864 missingWarn, 865 type 866 ); 867 if (missingRet !== key) { 868 format2 = missingRet; 869 } 870 } 871 } 872 return [format2, targetLocale, message]; 873} 874function compileMessageFormat(context, key, targetLocale, format2, cacheBaseKey, onError) { 875 const { messageCompiler, warnHtmlMessage } = context; 876 if (isMessageFunction(format2)) { 877 const msg2 = format2; 878 msg2.locale = msg2.locale || targetLocale; 879 msg2.key = msg2.key || key; 880 return msg2; 881 } 882 if (messageCompiler == null) { 883 const msg2 = () => format2; 884 msg2.locale = targetLocale; 885 msg2.key = key; 886 return msg2; 887 } 888 const msg = messageCompiler(format2, getCompileContext(context, targetLocale, cacheBaseKey, format2, warnHtmlMessage, onError)); 889 msg.locale = targetLocale; 890 msg.key = key; 891 msg.source = format2; 892 return msg; 893} 894function evaluateMessage(context, msg, msgCtx) { 895 const messaged = msg(msgCtx); 896 return messaged; 897} 898function parseTranslateArgs(...args) { 899 const [arg1, arg2, arg3] = args; 900 const options = create(); 901 if (!isString(arg1) && !isNumber(arg1) && !isMessageFunction(arg1) && !isMessageAST(arg1)) { 902 throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT); 903 } 904 const key = isNumber(arg1) ? String(arg1) : isMessageFunction(arg1) ? arg1 : arg1; 905 if (isNumber(arg2)) { 906 options.plural = arg2; 907 } else if (isString(arg2)) { 908 options.default = arg2; 909 } else if (isPlainObject(arg2) && !isEmptyObject(arg2)) { 910 options.named = arg2; 911 } else if (isArray(arg2)) { 912 options.list = arg2; 913 } 914 if (isNumber(arg3)) { 915 options.plural = arg3; 916 } else if (isString(arg3)) { 917 options.default = arg3; 918 } else if (isPlainObject(arg3)) { 919 assign(options, arg3); 920 } 921 return [key, options]; 922} 923function getCompileContext(context, locale, key, source, warnHtmlMessage, onError) { 924 return { 925 locale, 926 key, 927 warnHtmlMessage, 928 onError: (err) => { 929 onError && onError(err); 930 { 931 throw err; 932 } 933 }, 934 onCacheKey: (source2) => generateFormatCacheKey(locale, key, source2) 935 }; 936} 937function getMessageContextOptions(context, locale, message, options) { 938 const { modifiers, pluralRules, messageResolver: resolveValue2, fallbackLocale, fallbackWarn, missingWarn, fallbackContext } = context; 939 const resolveMessage = (key) => { 940 let val = resolveValue2(message, key); 941 if (val == null && fallbackContext) { 942 const [, , message2] = resolveMessageFormat(fallbackContext, key, locale, fallbackLocale, fallbackWarn, missingWarn); 943 val = resolveValue2(message2, key); 944 } 945 if (isString(val) || isMessageAST(val)) { 946 let occurred = false; 947 const onError = () => { 948 occurred = true; 949 }; 950 const msg = compileMessageFormat(context, key, locale, val, key, onError); 951 return !occurred ? msg : NOOP_MESSAGE_FUNCTION; 952 } else if (isMessageFunction(val)) { 953 return val; 954 } else { 955 return NOOP_MESSAGE_FUNCTION; 956 } 957 }; 958 const ctxOptions = { 959 locale, 960 modifiers, 961 pluralRules, 962 messages: resolveMessage 963 }; 964 if (context.processor) { 965 ctxOptions.processor = context.processor; 966 } 967 if (options.list) { 968 ctxOptions.list = options.list; 969 } 970 if (options.named) { 971 ctxOptions.named = options.named; 972 } 973 if (isNumber(options.plural)) { 974 ctxOptions.pluralIndex = options.plural; 975 } 976 return ctxOptions; 977} 978function datetime(context, ...args) { 979 const { datetimeFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context; 980 const { __datetimeFormatters } = context; 981 const [key, value, options, overrides] = parseDateTimeArgs(...args); 982 const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn; 983 isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn; 984 const part = !!options.part; 985 const locale = getLocale(context, options); 986 const locales = localeFallbacker( 987 context, 988 fallbackLocale, 989 locale 990 ); 991 if (!isString(key) || key === "") { 992 return new Intl.DateTimeFormat(locale, overrides).format(value); 993 } 994 let datetimeFormat = {}; 995 let targetLocale; 996 let format2 = null; 997 const type = "datetime format"; 998 for (let i = 0; i < locales.length; i++) { 999 targetLocale = locales[i]; 1000 datetimeFormat = datetimeFormats[targetLocale] || {}; 1001 format2 = datetimeFormat[key]; 1002 if (isPlainObject(format2)) 1003 break; 1004 handleMissing(context, key, targetLocale, missingWarn, type); 1005 } 1006 if (!isPlainObject(format2) || !isString(targetLocale)) { 1007 return unresolving ? NOT_REOSLVED : key; 1008 } 1009 let id = `${targetLocale}__${key}`; 1010 if (!isEmptyObject(overrides)) { 1011 id = `${id}__${JSON.stringify(overrides)}`; 1012 } 1013 let formatter = __datetimeFormatters.get(id); 1014 if (!formatter) { 1015 formatter = new Intl.DateTimeFormat(targetLocale, assign({}, format2, overrides)); 1016 __datetimeFormatters.set(id, formatter); 1017 } 1018 return !part ? formatter.format(value) : formatter.formatToParts(value); 1019} 1020const DATETIME_FORMAT_OPTIONS_KEYS = [ 1021 "localeMatcher", 1022 "weekday", 1023 "era", 1024 "year", 1025 "month", 1026 "day", 1027 "hour", 1028 "minute", 1029 "second", 1030 "timeZoneName", 1031 "formatMatcher", 1032 "hour12", 1033 "timeZone", 1034 "dateStyle", 1035 "timeStyle", 1036 "calendar", 1037 "dayPeriod", 1038 "numberingSystem", 1039 "hourCycle", 1040 "fractionalSecondDigits" 1041]; 1042function parseDateTimeArgs(...args) { 1043 const [arg1, arg2, arg3, arg4] = args; 1044 const options = create(); 1045 let overrides = create(); 1046 let value; 1047 if (isString(arg1)) { 1048 const matches = arg1.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/); 1049 if (!matches) { 1050 throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT); 1051 } 1052 const dateTime = matches[3] ? matches[3].trim().startsWith("T") ? `${matches[1].trim()}${matches[3].trim()}` : `${matches[1].trim()}T${matches[3].trim()}` : matches[1].trim(); 1053 value = new Date(dateTime); 1054 try { 1055 value.toISOString(); 1056 } catch (e) { 1057 throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT); 1058 } 1059 } else if (isDate(arg1)) { 1060 if (isNaN(arg1.getTime())) { 1061 throw createCoreError(CoreErrorCodes.INVALID_DATE_ARGUMENT); 1062 } 1063 value = arg1; 1064 } else if (isNumber(arg1)) { 1065 value = arg1; 1066 } else { 1067 throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT); 1068 } 1069 if (isString(arg2)) { 1070 options.key = arg2; 1071 } else if (isPlainObject(arg2)) { 1072 Object.keys(arg2).forEach((key) => { 1073 if (DATETIME_FORMAT_OPTIONS_KEYS.includes(key)) { 1074 overrides[key] = arg2[key]; 1075 } else { 1076 options[key] = arg2[key]; 1077 } 1078 }); 1079 } 1080 if (isString(arg3)) { 1081 options.locale = arg3; 1082 } else if (isPlainObject(arg3)) { 1083 overrides = arg3; 1084 } 1085 if (isPlainObject(arg4)) { 1086 overrides = arg4; 1087 } 1088 return [options.key || "", value, options, overrides]; 1089} 1090function clearDateTimeFormat(ctx, locale, format2) { 1091 const context = ctx; 1092 for (const key in format2) { 1093 const id = `${locale}__${key}`; 1094 if (!context.__datetimeFormatters.has(id)) { 1095 continue; 1096 } 1097 context.__datetimeFormatters.delete(id); 1098 } 1099} 1100function number(context, ...args) { 1101 const { numberFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context; 1102 const { __numberFormatters } = context; 1103 const [key, value, options, overrides] = parseNumberArgs(...args); 1104 const missingWarn = isBoolean(options.missingWarn) ? options.missingWarn : context.missingWarn; 1105 isBoolean(options.fallbackWarn) ? options.fallbackWarn : context.fallbackWarn; 1106 const part = !!options.part; 1107 const locale = getLocale(context, options); 1108 const locales = localeFallbacker( 1109 context, 1110 fallbackLocale, 1111 locale 1112 ); 1113 if (!isString(key) || key === "") { 1114 return new Intl.NumberFormat(locale, overrides).format(value); 1115 } 1116 let numberFormat = {}; 1117 let targetLocale; 1118 let format2 = null; 1119 const type = "number format"; 1120 for (let i = 0; i < locales.length; i++) { 1121 targetLocale = locales[i]; 1122 numberFormat = numberFormats[targetLocale] || {}; 1123 format2 = numberFormat[key]; 1124 if (isPlainObject(format2)) 1125 break; 1126 handleMissing(context, key, targetLocale, missingWarn, type); 1127 } 1128 if (!isPlainObject(format2) || !isString(targetLocale)) { 1129 return unresolving ? NOT_REOSLVED : key; 1130 } 1131 let id = `${targetLocale}__${key}`; 1132 if (!isEmptyObject(overrides)) { 1133 id = `${id}__${JSON.stringify(overrides)}`; 1134 } 1135 let formatter = __numberFormatters.get(id); 1136 if (!formatter) { 1137 formatter = new Intl.NumberFormat(targetLocale, assign({}, format2, overrides)); 1138 __numberFormatters.set(id, formatter); 1139 } 1140 return !part ? formatter.format(value) : formatter.formatToParts(value); 1141} 1142const NUMBER_FORMAT_OPTIONS_KEYS = [ 1143 "localeMatcher", 1144 "style", 1145 "currency", 1146 "currencyDisplay", 1147 "currencySign", 1148 "useGrouping", 1149 "minimumIntegerDigits", 1150 "minimumFractionDigits", 1151 "maximumFractionDigits", 1152 "minimumSignificantDigits", 1153 "maximumSignificantDigits", 1154 "compactDisplay", 1155 "notation", 1156 "signDisplay", 1157 "unit", 1158 "unitDisplay", 1159 "roundingMode", 1160 "roundingPriority", 1161 "roundingIncrement", 1162 "trailingZeroDisplay" 1163]; 1164function parseNumberArgs(...args) { 1165 const [arg1, arg2, arg3, arg4] = args; 1166 const options = create(); 1167 let overrides = create(); 1168 if (!isNumber(arg1)) { 1169 throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT); 1170 } 1171 const value = arg1; 1172 if (isString(arg2)) { 1173 options.key = arg2; 1174 } else if (isPlainObject(arg2)) { 1175 Object.keys(arg2).forEach((key) => { 1176 if (NUMBER_FORMAT_OPTIONS_KEYS.includes(key)) { 1177 overrides[key] = arg2[key]; 1178 } else { 1179 options[key] = arg2[key]; 1180 } 1181 }); 1182 } 1183 if (isString(arg3)) { 1184 options.locale = arg3; 1185 } else if (isPlainObject(arg3)) { 1186 overrides = arg3; 1187 } 1188 if (isPlainObject(arg4)) { 1189 overrides = arg4; 1190 } 1191 return [options.key || "", value, options, overrides]; 1192} 1193function clearNumberFormat(ctx, locale, format2) { 1194 const context = ctx; 1195 for (const key in format2) { 1196 const id = `${locale}__${key}`; 1197 if (!context.__numberFormatters.has(id)) { 1198 continue; 1199 } 1200 context.__numberFormatters.delete(id); 1201 } 1202} 1203{ 1204 initFeatureFlags(); 1205} 1206export { 1207 clearDateTimeFormat as A, 1208 clearNumberFormat as B, 1209 CoreWarnCodes as C, 1210 DATETIME_FORMAT_OPTIONS_KEYS as D, 1211 incrementer as E, 1212 isMessageAST as F, 1213 AST_NODE_PROPS_KEYS as G, 1214 setAdditionalMeta as H, 1215 getFallbackContext as I, 1216 NOT_REOSLVED as J, 1217 parseTranslateArgs as K, 1218 translate as L, 1219 MISSING_RESOLVE_VALUE as M, 1220 NUMBER_FORMAT_OPTIONS_KEYS as N, 1221 parseDateTimeArgs as O, 1222 datetime as P, 1223 parseNumberArgs as Q, 1224 number as R, 1225 isMessageFunction as S, 1226 setFallbackContext as T, 1227 CoreErrorCodes as a, 1228 assign as b, 1229 create as c, 1230 isString as d, 1231 isObject$1 as e, 1232 isBoolean as f, 1233 registerLocaleFallbacker as g, 1234 getGlobalThis as h, 1235 isNumber as i, 1236 createCompileError as j, 1237 DEFAULT_LOCALE as k, 1238 isArray as l, 1239 makeSymbol as m, 1240 isPlainObject as n, 1241 isRegExp as o, 1242 isFunction as p, 1243 inBrowser as q, 1244 registerMessageResolver as r, 1245 setDevToolsHook as s, 1246 isEmptyObject as t, 1247 updateFallbackLocale as u, 1248 resolveValue as v, 1249 fallbackWithLocaleChain as w, 1250 deepCopy as x, 1251 hasOwn as y, 1252 createCoreContext as z 1253};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.