gt-react 10.19.14 β†’ 10.19.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/browser.cjs +10789 -0
  3. package/dist/browser.cjs.map +1 -0
  4. package/dist/browser.d.cts +732 -0
  5. package/dist/browser.d.cts.map +1 -0
  6. package/dist/browser.d.mts +734 -0
  7. package/dist/browser.d.mts.map +1 -0
  8. package/dist/browser.mjs +10751 -0
  9. package/dist/browser.mjs.map +1 -0
  10. package/dist/client.cjs +3356 -0
  11. package/dist/client.cjs.map +1 -0
  12. package/dist/client.d.cts +249 -0
  13. package/dist/client.d.cts.map +1 -0
  14. package/dist/client.d.mts +250 -0
  15. package/dist/client.d.mts.map +1 -0
  16. package/dist/client.mjs +3296 -0
  17. package/dist/client.mjs.map +1 -0
  18. package/dist/index.cjs +3509 -0
  19. package/dist/index.cjs.map +1 -0
  20. package/dist/index.d.cts +377 -0
  21. package/dist/index.d.cts.map +1 -0
  22. package/dist/index.d.mts +376 -0
  23. package/dist/index.d.mts.map +1 -0
  24. package/dist/index.mjs +3453 -0
  25. package/dist/index.mjs.map +1 -0
  26. package/dist/internal.cjs +3954 -0
  27. package/dist/internal.cjs.map +1 -0
  28. package/dist/internal.d.cts +1118 -0
  29. package/dist/internal.d.cts.map +1 -0
  30. package/dist/internal.d.mts +1118 -0
  31. package/dist/internal.d.mts.map +1 -0
  32. package/dist/internal.mjs +3893 -0
  33. package/dist/internal.mjs.map +1 -0
  34. package/dist/macros.cjs +6139 -0
  35. package/dist/macros.cjs.map +1 -0
  36. package/dist/macros.d.cts +25 -0
  37. package/dist/macros.d.cts.map +1 -0
  38. package/dist/macros.d.mts +25 -0
  39. package/dist/macros.d.mts.map +1 -0
  40. package/dist/macros.mjs +6140 -0
  41. package/dist/macros.mjs.map +1 -0
  42. package/package.json +61 -53
  43. package/dist/browser-types.d.ts +0 -5
  44. package/dist/browser-types.d.ts.map +0 -1
  45. package/dist/browser.cjs.min.cjs +0 -2
  46. package/dist/browser.cjs.min.cjs.map +0 -1
  47. package/dist/browser.d.ts +0 -4
  48. package/dist/browser.d.ts.map +0 -1
  49. package/dist/browser.esm.min.mjs +0 -2
  50. package/dist/browser.esm.min.mjs.map +0 -1
  51. package/dist/client.cjs.min.cjs +0 -2
  52. package/dist/client.cjs.min.cjs.map +0 -1
  53. package/dist/client.d.ts +0 -6
  54. package/dist/client.d.ts.map +0 -1
  55. package/dist/client.esm.min.mjs +0 -2
  56. package/dist/client.esm.min.mjs.map +0 -1
  57. package/dist/i18n-context/browser-i18n-manager/BrowserConditionStore.d.ts +0 -32
  58. package/dist/i18n-context/browser-i18n-manager/BrowserConditionStore.d.ts.map +0 -1
  59. package/dist/i18n-context/browser-i18n-manager/BrowserI18nManager.d.ts +0 -42
  60. package/dist/i18n-context/browser-i18n-manager/BrowserI18nManager.d.ts.map +0 -1
  61. package/dist/i18n-context/browser-i18n-manager/LocalStorageTranslationCache.d.ts +0 -90
  62. package/dist/i18n-context/browser-i18n-manager/LocalStorageTranslationCache.d.ts.map +0 -1
  63. package/dist/i18n-context/browser-i18n-manager/singleton-operations.d.ts +0 -9
  64. package/dist/i18n-context/browser-i18n-manager/singleton-operations.d.ts.map +0 -1
  65. package/dist/i18n-context/browser-i18n-manager/utils/constants.d.ts +0 -3
  66. package/dist/i18n-context/browser-i18n-manager/utils/constants.d.ts.map +0 -1
  67. package/dist/i18n-context/browser-i18n-manager/utils/cookies.d.ts +0 -19
  68. package/dist/i18n-context/browser-i18n-manager/utils/cookies.d.ts.map +0 -1
  69. package/dist/i18n-context/browser-i18n-manager/utils/determineLocale.d.ts +0 -15
  70. package/dist/i18n-context/browser-i18n-manager/utils/determineLocale.d.ts.map +0 -1
  71. package/dist/i18n-context/browser-i18n-manager/utils/types.d.ts +0 -14
  72. package/dist/i18n-context/browser-i18n-manager/utils/types.d.ts.map +0 -1
  73. package/dist/i18n-context/functions/branching/GtInternalBranch.d.ts +0 -29
  74. package/dist/i18n-context/functions/branching/GtInternalBranch.d.ts.map +0 -1
  75. package/dist/i18n-context/functions/branching/GtInternalPlural.d.ts +0 -30
  76. package/dist/i18n-context/functions/branching/GtInternalPlural.d.ts.map +0 -1
  77. package/dist/i18n-context/functions/branching/index.d.ts +0 -3
  78. package/dist/i18n-context/functions/branching/index.d.ts.map +0 -1
  79. package/dist/i18n-context/functions/derivation/GtInternalDerive.d.ts +0 -31
  80. package/dist/i18n-context/functions/derivation/GtInternalDerive.d.ts.map +0 -1
  81. package/dist/i18n-context/functions/derivation/index.d.ts +0 -2
  82. package/dist/i18n-context/functions/derivation/index.d.ts.map +0 -1
  83. package/dist/i18n-context/functions/html-tag-operations.d.ts +0 -19
  84. package/dist/i18n-context/functions/html-tag-operations.d.ts.map +0 -1
  85. package/dist/i18n-context/functions/index.d.ts +0 -8
  86. package/dist/i18n-context/functions/index.d.ts.map +0 -1
  87. package/dist/i18n-context/functions/locale-operations.d.ts +0 -11
  88. package/dist/i18n-context/functions/locale-operations.d.ts.map +0 -1
  89. package/dist/i18n-context/functions/translation/GtInternalRuntimeTranslateJsx.d.ts +0 -11
  90. package/dist/i18n-context/functions/translation/GtInternalRuntimeTranslateJsx.d.ts.map +0 -1
  91. package/dist/i18n-context/functions/translation/GtInternalRuntimeTranslateString.d.ts +0 -11
  92. package/dist/i18n-context/functions/translation/GtInternalRuntimeTranslateString.d.ts.map +0 -1
  93. package/dist/i18n-context/functions/translation/GtInternalTranslateJsx.d.ts +0 -33
  94. package/dist/i18n-context/functions/translation/GtInternalTranslateJsx.d.ts.map +0 -1
  95. package/dist/i18n-context/functions/translation/index.d.ts +0 -5
  96. package/dist/i18n-context/functions/translation/index.d.ts.map +0 -1
  97. package/dist/i18n-context/functions/translation/t.d.ts +0 -25
  98. package/dist/i18n-context/functions/translation/t.d.ts.map +0 -1
  99. package/dist/i18n-context/functions/translation/types.d.ts +0 -21
  100. package/dist/i18n-context/functions/translation/types.d.ts.map +0 -1
  101. package/dist/i18n-context/functions/variables/GtInternalCurrency.d.ts +0 -28
  102. package/dist/i18n-context/functions/variables/GtInternalCurrency.d.ts.map +0 -1
  103. package/dist/i18n-context/functions/variables/GtInternalDateTime.d.ts +0 -26
  104. package/dist/i18n-context/functions/variables/GtInternalDateTime.d.ts.map +0 -1
  105. package/dist/i18n-context/functions/variables/GtInternalNum.d.ts +0 -26
  106. package/dist/i18n-context/functions/variables/GtInternalNum.d.ts.map +0 -1
  107. package/dist/i18n-context/functions/variables/GtInternalRelativeTime.d.ts +0 -35
  108. package/dist/i18n-context/functions/variables/GtInternalRelativeTime.d.ts.map +0 -1
  109. package/dist/i18n-context/functions/variables/GtInternalVar.d.ts +0 -23
  110. package/dist/i18n-context/functions/variables/GtInternalVar.d.ts.map +0 -1
  111. package/dist/i18n-context/functions/variables/index.d.ts +0 -6
  112. package/dist/i18n-context/functions/variables/index.d.ts.map +0 -1
  113. package/dist/i18n-context/functions/variables/utils/computeVar.d.ts +0 -9
  114. package/dist/i18n-context/functions/variables/utils/computeVar.d.ts.map +0 -1
  115. package/dist/i18n-context/functions/variables/utils/renderVariable.d.ts +0 -15
  116. package/dist/i18n-context/functions/variables/utils/renderVariable.d.ts.map +0 -1
  117. package/dist/i18n-context/setup/bootstrap.d.ts +0 -22
  118. package/dist/i18n-context/setup/bootstrap.d.ts.map +0 -1
  119. package/dist/i18n-context/setup/index.d.ts +0 -3
  120. package/dist/i18n-context/setup/index.d.ts.map +0 -1
  121. package/dist/i18n-context/setup/initializeGT.d.ts +0 -7
  122. package/dist/i18n-context/setup/initializeGT.d.ts.map +0 -1
  123. package/dist/i18n-context/setup/types.d.ts +0 -19
  124. package/dist/i18n-context/setup/types.d.ts.map +0 -1
  125. package/dist/i18n-context/ui/LocaleSelector.d.ts +0 -18
  126. package/dist/i18n-context/ui/LocaleSelector.d.ts.map +0 -1
  127. package/dist/i18n-context/utils/enforceBrowser.d.ts +0 -7
  128. package/dist/i18n-context/utils/enforceBrowser.d.ts.map +0 -1
  129. package/dist/index.cjs.min.cjs +0 -2
  130. package/dist/index.cjs.min.cjs.map +0 -1
  131. package/dist/index.d.ts +0 -8
  132. package/dist/index.d.ts.map +0 -1
  133. package/dist/index.esm.min.mjs +0 -2
  134. package/dist/index.esm.min.mjs.map +0 -1
  135. package/dist/internal.cjs.min.cjs +0 -2
  136. package/dist/internal.cjs.min.cjs.map +0 -1
  137. package/dist/internal.d.ts +0 -7
  138. package/dist/internal.d.ts.map +0 -1
  139. package/dist/internal.esm.min.mjs +0 -2
  140. package/dist/internal.esm.min.mjs.map +0 -1
  141. package/dist/macros.cjs.min.cjs +0 -2
  142. package/dist/macros.cjs.min.cjs.map +0 -1
  143. package/dist/macros.d.ts +0 -22
  144. package/dist/macros.d.ts.map +0 -1
  145. package/dist/macros.esm.min.mjs +0 -2
  146. package/dist/macros.esm.min.mjs.map +0 -1
  147. package/dist/react-context/provider/ClientProvider.d.ts +0 -4
  148. package/dist/react-context/provider/ClientProvider.d.ts.map +0 -1
  149. package/dist/react-context/provider/GTProvider.d.ts +0 -29
  150. package/dist/react-context/provider/GTProvider.d.ts.map +0 -1
  151. package/dist/react-context/provider/helpers/isSSREnabled.d.ts +0 -2
  152. package/dist/react-context/provider/helpers/isSSREnabled.d.ts.map +0 -1
  153. package/dist/react-context/provider/hooks/locales/useDetermineLocale.d.ts +0 -5
  154. package/dist/react-context/provider/hooks/locales/useDetermineLocale.d.ts.map +0 -1
  155. package/dist/react-context/provider/hooks/useEnableI18n.d.ts +0 -10
  156. package/dist/react-context/provider/hooks/useEnableI18n.d.ts.map +0 -1
  157. package/dist/react-context/provider/hooks/useRegionState.d.ts +0 -9
  158. package/dist/react-context/provider/hooks/useRegionState.d.ts.map +0 -1
  159. package/dist/react-context/types/config.d.ts +0 -67
  160. package/dist/react-context/types/config.d.ts.map +0 -1
  161. package/dist/react-context/ui/LocaleSelector.d.ts +0 -18
  162. package/dist/react-context/ui/LocaleSelector.d.ts.map +0 -1
  163. package/dist/react-context/ui/RegionSelector.d.ts +0 -38
  164. package/dist/react-context/ui/RegionSelector.d.ts.map +0 -1
  165. package/dist/react-context/utils/readAuthFromEnv.d.ts +0 -9
  166. package/dist/react-context/utils/readAuthFromEnv.d.ts.map +0 -1
  167. package/dist/shared/InternalLocaleSelector.d.ts +0 -26
  168. package/dist/shared/InternalLocaleSelector.d.ts.map +0 -1
  169. package/dist/shared/messages.d.ts +0 -11
  170. package/dist/shared/messages.d.ts.map +0 -1
package/dist/index.cjs ADDED
@@ -0,0 +1,3509 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region \0rolldown/runtime.js
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
+ get: ((k) => from[k]).bind(null, key),
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
20
+ value: mod,
21
+ enumerable: true
22
+ }) : target, mod));
23
+ //#endregion
24
+ let _generaltranslation_react_core = require("@generaltranslation/react-core");
25
+ let react = require("react");
26
+ let react$1 = __toESM(react, 1);
27
+ react = __toESM(react);
28
+ let _generaltranslation_format = require("@generaltranslation/format");
29
+ let react_jsx_runtime = require("react/jsx-runtime");
30
+ require("generaltranslation");
31
+ //#region src/react-context/utils/readAuthFromEnv.tsx
32
+ /**
33
+ * Extract the project ID and development API key from the environment variables
34
+ * @param projectId - The project ID
35
+ * @param devApiKey - The development API key
36
+ * @returns The project ID and development API key
37
+ */
38
+ function readAuthFromEnv({ projectId, devApiKey }) {
39
+ const env = { ...typeof process !== "undefined" ? process.env : void 0 };
40
+ return {
41
+ projectId: projectId || env.VITE_GT_PROJECT_ID || env.REDWOOD_ENV_GT_PROJECT_ID || env.GT_PROJECT_ID || env.REACT_APP_GT_PROJECT_ID || env.NEXT_PUBLIC_GT_PROJECT_ID || env.GATSBY_GT_PROJECT_ID || "",
42
+ devApiKey: devApiKey || env.VITE_GT_DEV_API_KEY || env.VITE_GT_API_KEY || env.REDWOOD_ENV_GT_DEV_API_KEY || env.REDWOOD_ENV_GT_API_KEY || env.GT_DEV_API_KEY || env.GT_API_KEY || env.REACT_APP_GT_DEV_API_KEY || env.REACT_APP_GT_API_KEY || env.NEXT_PUBLIC_GT_DEV_API_KEY || env.NEXT_PUBLIC_GT_API_KEY || env.GATSBY_GT_DEV_API_KEY || env.GATSBY_GT_API_KEY
43
+ };
44
+ }
45
+ //#endregion
46
+ //#region src/react-context/provider/hooks/useRegionState.ts
47
+ function getNewRegion({ _region, regionCookieName }) {
48
+ const cookieRegion = typeof document !== "undefined" ? document.cookie.split("; ").find((row) => row.startsWith(`${regionCookieName}=`))?.split("=")[1] : void 0;
49
+ const newRegion = _region || cookieRegion;
50
+ if (cookieRegion && cookieRegion !== newRegion && typeof document !== "undefined") document.cookie = `${regionCookieName}=${newRegion};path=/`;
51
+ return newRegion;
52
+ }
53
+ function useRegionState({ _region, ssr, regionCookieName }) {
54
+ const [region, _setRegion] = (0, react.useState)(ssr ? void 0 : getNewRegion({
55
+ _region,
56
+ regionCookieName
57
+ }));
58
+ const setRegion = (region) => {
59
+ _setRegion(region);
60
+ if (typeof document !== "undefined") document.cookie = `${regionCookieName}=${region || ""};path=/`;
61
+ };
62
+ (0, react.useEffect)(() => {
63
+ _setRegion(getNewRegion({
64
+ _region,
65
+ regionCookieName
66
+ }));
67
+ }, [_region, regionCookieName]);
68
+ return {
69
+ region,
70
+ setRegion
71
+ };
72
+ }
73
+ //#endregion
74
+ //#region src/react-context/provider/hooks/useEnableI18n.ts
75
+ /**
76
+ * Sync: no cookie
77
+ * Async: listen to cookie, until promise resolves
78
+ *
79
+ * Unfortunately, when dealing with SSR and an async enableI18n flag, there is no way to avoid a flicker of the default locale
80
+ * @returns enableI18n flag
81
+ */
82
+ function useEnableI18n({ enableI18n: _enableI18n, enableI18nCookieName, enableI18nLoaded, ssr }) {
83
+ const asyncEnabled = enableI18nLoaded !== void 0;
84
+ const isFirstRender = (0, react.useRef)(true);
85
+ const [enableI18n, setEnableI18n] = (0, react.useState)(() => getInitialEnableI18n({
86
+ _enableI18n,
87
+ asyncEnabled,
88
+ enableI18nCookieName,
89
+ ssr
90
+ }));
91
+ (0, react.useEffect)(() => {
92
+ if (ssr && asyncEnabled && isFirstRender.current) {
93
+ isFirstRender.current = false;
94
+ const cookieValue = getCookieEnableI18nValue(enableI18nCookieName);
95
+ if (cookieValue !== null && cookieValue !== enableI18n) setEnableI18n(cookieValue);
96
+ return;
97
+ }
98
+ isFirstRender.current = false;
99
+ }, [
100
+ ssr,
101
+ asyncEnabled,
102
+ enableI18nCookieName,
103
+ enableI18n
104
+ ]);
105
+ (0, react.useEffect)(() => {
106
+ if (enableI18n === _enableI18n) return;
107
+ if (!asyncEnabled) {
108
+ setEnableI18n(_enableI18n);
109
+ return;
110
+ }
111
+ if (!enableI18nLoaded) return;
112
+ persistEnableI18nFlagToCookie({
113
+ enableI18n: _enableI18n,
114
+ enableI18nCookieName
115
+ });
116
+ setEnableI18n(_enableI18n);
117
+ }, [
118
+ _enableI18n,
119
+ enableI18n,
120
+ asyncEnabled,
121
+ enableI18nLoaded,
122
+ enableI18nCookieName
123
+ ]);
124
+ return { enableI18n };
125
+ }
126
+ /**
127
+ * Get initial enableI18n flag
128
+ */
129
+ function getInitialEnableI18n({ _enableI18n, asyncEnabled, enableI18nCookieName, ssr }) {
130
+ if (!asyncEnabled) return _enableI18n;
131
+ if (ssr) return _enableI18n;
132
+ const cookieValue = getCookieEnableI18nValue(enableI18nCookieName);
133
+ if (cookieValue !== null) return cookieValue;
134
+ return _enableI18n;
135
+ }
136
+ function getCookieEnableI18nValue(enableI18nCookieName) {
137
+ if (typeof document === "undefined") return null;
138
+ const rawCookieValue = document.cookie.split("; ").find((row) => row.startsWith(`${enableI18nCookieName}=`))?.split("=")[1];
139
+ return rawCookieValue === "true" ? true : rawCookieValue === "false" ? false : null;
140
+ }
141
+ function persistEnableI18nFlagToCookie({ enableI18n, enableI18nCookieName }) {
142
+ if (typeof document === "undefined") return;
143
+ document.cookie = `${enableI18nCookieName}=${enableI18n ? "true" : "false"};path=/;`;
144
+ }
145
+ //#endregion
146
+ //#region ../react-core/dist/errors.esm.min.mjs
147
+ const e = `@generaltranslation/react-core`;
148
+ `${e}`, `${e}`, `${e}`, `${e}`, `${e}`, `${e}`, `${e}`, `${e}`, `${e}`;
149
+ const t$1 = (t, n, r = e) => `${r} Warning: "${n}" is not a supported locale. Update supported locales in your dashboard or gt.config.json. Falling back to "${t}".`;
150
+ `${e}`, `${e}`;
151
+ //#endregion
152
+ //#region ../react-core/dist/internal.esm.min.mjs
153
+ var c = Object.defineProperty, l = Object.getOwnPropertyDescriptor, u = Object.getOwnPropertyNames, d = Object.prototype.hasOwnProperty, f = (e, t) => () => (e && (t = e(e = 0)), t), p = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), m = (e, t) => {
154
+ let n = {};
155
+ for (var r in e) c(n, r, {
156
+ get: e[r],
157
+ enumerable: !0
158
+ });
159
+ return t || c(n, Symbol.toStringTag, { value: `Module` }), n;
160
+ }, h = (e, t, n, r) => {
161
+ if (t && typeof t == `object` || typeof t == `function`) for (var i = u(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !d.call(e, s) && s !== n && c(e, s, {
162
+ get: ((e) => t[e]).bind(null, s),
163
+ enumerable: !(r = l(t, s)) || r.enumerable
164
+ });
165
+ return e;
166
+ }, g = (e) => d.call(e, `module.exports`) ? e[`module.exports`] : h(c({}, `__esModule`, { value: !0 }), e);
167
+ function w(e) {
168
+ return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === `Uint8Array` && `BYTES_PER_ELEMENT` in e && e.BYTES_PER_ELEMENT === 1;
169
+ }
170
+ function T$1(e, t, n = ``) {
171
+ let r = w(e), i = e?.length, a = t !== void 0;
172
+ if (!r || a && i !== t) {
173
+ let o = n && `"${n}" `, s = a ? ` of length ${t}` : ``, c = r ? `length=${i}` : `type=${typeof e}`, l = o + `expected Uint8Array` + s + `, got ` + c;
174
+ throw r ? RangeError(l) : TypeError(l);
175
+ }
176
+ return e;
177
+ }
178
+ function E(e, t = !0) {
179
+ if (e.destroyed) throw Error(`Hash instance has been destroyed`);
180
+ if (t && e.finished) throw Error(`Hash#digest() has already been called`);
181
+ }
182
+ function D(e, t) {
183
+ T$1(e, void 0, `digestInto() output`);
184
+ let n = t.outputLen;
185
+ if (e.length < n) throw RangeError(`"digestInto() output" expected to be of length >=` + n);
186
+ }
187
+ function O(...e) {
188
+ for (let t = 0; t < e.length; t++) e[t].fill(0);
189
+ }
190
+ function k(e) {
191
+ return new DataView(e.buffer, e.byteOffset, e.byteLength);
192
+ }
193
+ function A(e, t) {
194
+ return e << 32 - t | e >>> t;
195
+ }
196
+ new Uint8Array(new Uint32Array([287454020]).buffer)[0];
197
+ typeof Uint8Array.from([]).toHex == `function` && Uint8Array.fromHex;
198
+ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, `0`));
199
+ function oe(e, t = {}) {
200
+ let n = (t, n) => e(n).update(t).digest(), r = e(void 0);
201
+ return n.outputLen = r.outputLen, n.blockLen = r.blockLen, n.canXOF = r.canXOF, n.create = (t) => e(t), Object.assign(n, t), Object.freeze(n);
202
+ }
203
+ const se = (e) => ({ oid: Uint8Array.from([
204
+ 6,
205
+ 9,
206
+ 96,
207
+ 134,
208
+ 72,
209
+ 1,
210
+ 101,
211
+ 3,
212
+ 4,
213
+ 2,
214
+ e
215
+ ]) });
216
+ function ce(e, t, n) {
217
+ return e & t ^ ~e & n;
218
+ }
219
+ function le(e, t, n) {
220
+ return e & t ^ e & n ^ t & n;
221
+ }
222
+ var ue = class {
223
+ blockLen;
224
+ outputLen;
225
+ canXOF = !1;
226
+ padOffset;
227
+ isLE;
228
+ buffer;
229
+ view;
230
+ finished = !1;
231
+ length = 0;
232
+ pos = 0;
233
+ destroyed = !1;
234
+ constructor(e, t, n, r) {
235
+ this.blockLen = e, this.outputLen = t, this.padOffset = n, this.isLE = r, this.buffer = new Uint8Array(e), this.view = k(this.buffer);
236
+ }
237
+ update(e) {
238
+ E(this), T$1(e);
239
+ let { view: t, buffer: n, blockLen: r } = this, i = e.length;
240
+ for (let a = 0; a < i;) {
241
+ let o = Math.min(r - this.pos, i - a);
242
+ if (o === r) {
243
+ let t = k(e);
244
+ for (; r <= i - a; a += r) this.process(t, a);
245
+ continue;
246
+ }
247
+ n.set(e.subarray(a, a + o), this.pos), this.pos += o, a += o, this.pos === r && (this.process(t, 0), this.pos = 0);
248
+ }
249
+ return this.length += e.length, this.roundClean(), this;
250
+ }
251
+ digestInto(e) {
252
+ E(this), D(e, this), this.finished = !0;
253
+ let { buffer: t, view: n, blockLen: r, isLE: i } = this, { pos: a } = this;
254
+ t[a++] = 128, O(this.buffer.subarray(a)), this.padOffset > r - a && (this.process(n, 0), a = 0);
255
+ for (let e = a; e < r; e++) t[e] = 0;
256
+ n.setBigUint64(r - 8, BigInt(this.length * 8), i), this.process(n, 0);
257
+ let o = k(e), s = this.outputLen;
258
+ if (s % 4) throw Error(`_sha2: outputLen must be aligned to 32bit`);
259
+ let c = s / 4, l = this.get();
260
+ if (c > l.length) throw Error(`_sha2: outputLen bigger than state`);
261
+ for (let e = 0; e < c; e++) o.setUint32(4 * e, l[e], i);
262
+ }
263
+ digest() {
264
+ let { buffer: e, outputLen: t } = this;
265
+ this.digestInto(e);
266
+ let n = e.slice(0, t);
267
+ return this.destroy(), n;
268
+ }
269
+ _cloneInto(e) {
270
+ e ||= new this.constructor(), e.set(...this.get());
271
+ let { blockLen: t, buffer: n, length: r, finished: i, destroyed: a, pos: o } = this;
272
+ return e.destroyed = a, e.finished = i, e.length = r, e.pos = o, r % t && e.buffer.set(n), e;
273
+ }
274
+ clone() {
275
+ return this._cloneInto();
276
+ }
277
+ };
278
+ const j = Uint32Array.from([
279
+ 1779033703,
280
+ 3144134277,
281
+ 1013904242,
282
+ 2773480762,
283
+ 1359893119,
284
+ 2600822924,
285
+ 528734635,
286
+ 1541459225
287
+ ]), M = BigInt(2 ** 32 - 1), de = BigInt(32);
288
+ function fe(e, t = !1) {
289
+ return t ? {
290
+ h: Number(e & M),
291
+ l: Number(e >> de & M)
292
+ } : {
293
+ h: Number(e >> de & M) | 0,
294
+ l: Number(e & M) | 0
295
+ };
296
+ }
297
+ function pe(e, t = !1) {
298
+ let n = e.length, r = new Uint32Array(n), i = new Uint32Array(n);
299
+ for (let a = 0; a < n; a++) {
300
+ let { h: n, l: o } = fe(e[a], t);
301
+ [r[a], i[a]] = [n, o];
302
+ }
303
+ return [r, i];
304
+ }
305
+ const me = Uint32Array.from([
306
+ 1116352408,
307
+ 1899447441,
308
+ 3049323471,
309
+ 3921009573,
310
+ 961987163,
311
+ 1508970993,
312
+ 2453635748,
313
+ 2870763221,
314
+ 3624381080,
315
+ 310598401,
316
+ 607225278,
317
+ 1426881987,
318
+ 1925078388,
319
+ 2162078206,
320
+ 2614888103,
321
+ 3248222580,
322
+ 3835390401,
323
+ 4022224774,
324
+ 264347078,
325
+ 604807628,
326
+ 770255983,
327
+ 1249150122,
328
+ 1555081692,
329
+ 1996064986,
330
+ 2554220882,
331
+ 2821834349,
332
+ 2952996808,
333
+ 3210313671,
334
+ 3336571891,
335
+ 3584528711,
336
+ 113926993,
337
+ 338241895,
338
+ 666307205,
339
+ 773529912,
340
+ 1294757372,
341
+ 1396182291,
342
+ 1695183700,
343
+ 1986661051,
344
+ 2177026350,
345
+ 2456956037,
346
+ 2730485921,
347
+ 2820302411,
348
+ 3259730800,
349
+ 3345764771,
350
+ 3516065817,
351
+ 3600352804,
352
+ 4094571909,
353
+ 275423344,
354
+ 430227734,
355
+ 506948616,
356
+ 659060556,
357
+ 883997877,
358
+ 958139571,
359
+ 1322822218,
360
+ 1537002063,
361
+ 1747873779,
362
+ 1955562222,
363
+ 2024104815,
364
+ 2227730452,
365
+ 2361852424,
366
+ 2428436474,
367
+ 2756734187,
368
+ 3204031479,
369
+ 3329325298
370
+ ]), N = new Uint32Array(64);
371
+ var he = class extends ue {
372
+ constructor(e) {
373
+ super(64, e, 8, !1);
374
+ }
375
+ get() {
376
+ let { A: e, B: t, C: n, D: r, E: i, F: a, G: o, H: s } = this;
377
+ return [
378
+ e,
379
+ t,
380
+ n,
381
+ r,
382
+ i,
383
+ a,
384
+ o,
385
+ s
386
+ ];
387
+ }
388
+ set(e, t, n, r, i, a, o, s) {
389
+ this.A = e | 0, this.B = t | 0, this.C = n | 0, this.D = r | 0, this.E = i | 0, this.F = a | 0, this.G = o | 0, this.H = s | 0;
390
+ }
391
+ process(e, t) {
392
+ for (let n = 0; n < 16; n++, t += 4) N[n] = e.getUint32(t, !1);
393
+ for (let e = 16; e < 64; e++) {
394
+ let t = N[e - 15], n = N[e - 2], r = A(t, 7) ^ A(t, 18) ^ t >>> 3;
395
+ N[e] = (A(n, 17) ^ A(n, 19) ^ n >>> 10) + N[e - 7] + r + N[e - 16] | 0;
396
+ }
397
+ let { A: n, B: r, C: i, D: a, E: o, F: s, G: c, H: l } = this;
398
+ for (let e = 0; e < 64; e++) {
399
+ let t = A(o, 6) ^ A(o, 11) ^ A(o, 25), u = l + t + ce(o, s, c) + me[e] + N[e] | 0, d = (A(n, 2) ^ A(n, 13) ^ A(n, 22)) + le(n, r, i) | 0;
400
+ l = c, c = s, s = o, o = a + u | 0, a = i, i = r, r = n, n = u + d | 0;
401
+ }
402
+ n = n + this.A | 0, r = r + this.B | 0, i = i + this.C | 0, a = a + this.D | 0, o = o + this.E | 0, s = s + this.F | 0, c = c + this.G | 0, l = l + this.H | 0, this.set(n, r, i, a, o, s, c, l);
403
+ }
404
+ roundClean() {
405
+ O(N);
406
+ }
407
+ destroy() {
408
+ this.destroyed = !0, this.set(0, 0, 0, 0, 0, 0, 0, 0), O(this.buffer);
409
+ }
410
+ }, ge = class extends he {
411
+ A = j[0] | 0;
412
+ B = j[1] | 0;
413
+ C = j[2] | 0;
414
+ D = j[3] | 0;
415
+ E = j[4] | 0;
416
+ F = j[5] | 0;
417
+ G = j[6] | 0;
418
+ H = j[7] | 0;
419
+ constructor() {
420
+ super(32);
421
+ }
422
+ };
423
+ const _e = pe(`0x428a2f98d728ae22.0x7137449123ef65cd.0xb5c0fbcfec4d3b2f.0xe9b5dba58189dbbc.0x3956c25bf348b538.0x59f111f1b605d019.0x923f82a4af194f9b.0xab1c5ed5da6d8118.0xd807aa98a3030242.0x12835b0145706fbe.0x243185be4ee4b28c.0x550c7dc3d5ffb4e2.0x72be5d74f27b896f.0x80deb1fe3b1696b1.0x9bdc06a725c71235.0xc19bf174cf692694.0xe49b69c19ef14ad2.0xefbe4786384f25e3.0x0fc19dc68b8cd5b5.0x240ca1cc77ac9c65.0x2de92c6f592b0275.0x4a7484aa6ea6e483.0x5cb0a9dcbd41fbd4.0x76f988da831153b5.0x983e5152ee66dfab.0xa831c66d2db43210.0xb00327c898fb213f.0xbf597fc7beef0ee4.0xc6e00bf33da88fc2.0xd5a79147930aa725.0x06ca6351e003826f.0x142929670a0e6e70.0x27b70a8546d22ffc.0x2e1b21385c26c926.0x4d2c6dfc5ac42aed.0x53380d139d95b3df.0x650a73548baf63de.0x766a0abb3c77b2a8.0x81c2c92e47edaee6.0x92722c851482353b.0xa2bfe8a14cf10364.0xa81a664bbc423001.0xc24b8b70d0f89791.0xc76c51a30654be30.0xd192e819d6ef5218.0xd69906245565a910.0xf40e35855771202a.0x106aa07032bbd1b8.0x19a4c116b8d2d0c8.0x1e376c085141ab53.0x2748774cdf8eeb99.0x34b0bcb5e19b48a8.0x391c0cb3c5c95a63.0x4ed8aa4ae3418acb.0x5b9cca4f7763e373.0x682e6ff3d6b2b8a3.0x748f82ee5defb2fc.0x78a5636f43172f60.0x84c87814a1f0ab72.0x8cc702081a6439ec.0x90befffa23631e28.0xa4506cebde82bde9.0xbef9a3f7b2c67915.0xc67178f2e372532b.0xca273eceea26619c.0xd186b8c721c0c207.0xeada7dd6cde0eb1e.0xf57d4f7fee6ed178.0x06f067aa72176fba.0x0a637dc5a2c898a6.0x113f9804bef90dae.0x1b710b35131c471b.0x28db77f523047d84.0x32caab7b40c72493.0x3c9ebe0a15c9bebc.0x431d67c49c100d4c.0x4cc5d4becb3e42b6.0x597f299cfc657e2a.0x5fcb6fab3ad6faec.0x6c44198c4a475817`.split(`.`).map((e) => BigInt(e)));
424
+ _e[0], _e[1];
425
+ oe(() => new ge(), se(1));
426
+ const ye = (e) => `generaltranslation Formatting Error: Invalid cutoff style: ${e}.`, be = `DEFAULT_TERMINATOR_KEY`, xe = {
427
+ ellipsis: {
428
+ fr: {
429
+ terminator: `…`,
430
+ separator: `β€―`
431
+ },
432
+ zh: {
433
+ terminator: `……`,
434
+ separator: void 0
435
+ },
436
+ ja: {
437
+ terminator: `……`,
438
+ separator: void 0
439
+ },
440
+ [be]: {
441
+ terminator: `…`,
442
+ separator: void 0
443
+ }
444
+ },
445
+ none: { [be]: {
446
+ terminator: void 0,
447
+ separator: void 0
448
+ } }
449
+ };
450
+ var Se = class {
451
+ constructor(e, t = {}) {
452
+ try {
453
+ let t = e ? Array.isArray(e) ? e.map((e) => String(e)) : [String(e)] : [`en`], n = Intl.getCanonicalLocales(t);
454
+ this.locale = n.length ? n[0] : `en`;
455
+ } catch {
456
+ this.locale = `en`;
457
+ }
458
+ if (!xe[t.style ?? `ellipsis`]) throw Error(ye(t.style ?? `ellipsis`));
459
+ let n, r;
460
+ if (t.maxChars !== void 0) {
461
+ n = t.style ?? `ellipsis`;
462
+ let e = new Intl.Locale(this.locale).language;
463
+ r = xe[n][e] || xe[n].DEFAULT_TERMINATOR_KEY;
464
+ }
465
+ let i = t.terminator ?? r?.terminator, a = i == null ? void 0 : t.separator ?? r?.separator;
466
+ this.additionLength = (i?.length ?? 0) + (a?.length ?? 0), t.maxChars !== void 0 && Math.abs(t.maxChars) < this.additionLength && (i = void 0, a = void 0), this.options = {
467
+ maxChars: t.maxChars,
468
+ style: n,
469
+ terminator: i,
470
+ separator: a
471
+ };
472
+ }
473
+ format(e) {
474
+ return this.formatToParts(e).join(``);
475
+ }
476
+ formatToParts(e) {
477
+ let { maxChars: t, terminator: n, separator: r } = this.options, i = t === void 0 || Math.abs(t) >= e.length ? t : t >= 0 ? Math.max(0, t - this.additionLength) : Math.min(0, t + this.additionLength), a = i !== void 0 && i > -1 ? e.slice(0, i) : e.slice(i);
478
+ return t == null || i == null || i === 0 || n == null || e.length <= Math.abs(t) ? [a] : i > 0 ? r == null ? [a, n] : [
479
+ a,
480
+ r,
481
+ n
482
+ ] : r == null ? [n, a] : [
483
+ n,
484
+ r,
485
+ a
486
+ ];
487
+ }
488
+ resolvedOptions() {
489
+ return this.options;
490
+ }
491
+ };
492
+ const Ce = {
493
+ Collator: Intl.Collator,
494
+ DateTimeFormat: Intl.DateTimeFormat,
495
+ DisplayNames: Intl.DisplayNames,
496
+ ListFormat: Intl.ListFormat,
497
+ Locale: Intl.Locale,
498
+ NumberFormat: Intl.NumberFormat,
499
+ PluralRules: Intl.PluralRules,
500
+ RelativeTimeFormat: Intl.RelativeTimeFormat,
501
+ Segmenter: Intl.Segmenter,
502
+ CutoffFormat: Se
503
+ };
504
+ new class {
505
+ constructor() {
506
+ this.cache = {};
507
+ }
508
+ _generateKey(e, t = {}) {
509
+ return `${e ? Array.isArray(e) ? e.map((e) => String(e)).join(`,`) : String(e) : `undefined`}:${t ? JSON.stringify(t, Object.keys(t).sort()) : `{}`}`;
510
+ }
511
+ get(e, ...t) {
512
+ let [n = `en`, r = {}] = t, i = this._generateKey(n, r), a = this.cache[e]?.[i];
513
+ return a === void 0 && (a = new Ce[e](...t), this.cache[e] || (this.cache[e] = {}), this.cache[e][i] = a), a;
514
+ }
515
+ }();
516
+ var P = m({
517
+ __addDisposableResource: () => Ze,
518
+ __assign: () => R,
519
+ __asyncDelegator: () => Ue,
520
+ __asyncGenerator: () => He,
521
+ __asyncValues: () => We,
522
+ __await: () => I,
523
+ __awaiter: () => Fe,
524
+ __classPrivateFieldGet: () => Je,
525
+ __classPrivateFieldIn: () => Xe,
526
+ __classPrivateFieldSet: () => Ye,
527
+ __createBinding: () => z,
528
+ __decorate: () => Oe,
529
+ __disposeResources: () => Qe,
530
+ __esDecorate: () => Ae,
531
+ __exportStar: () => Le,
532
+ __extends: () => Ee,
533
+ __generator: () => Ie,
534
+ __importDefault: () => qe,
535
+ __importStar: () => Ke,
536
+ __makeTemplateObject: () => Ge,
537
+ __metadata: () => Pe,
538
+ __param: () => ke,
539
+ __propKey: () => Me,
540
+ __read: () => Re,
541
+ __rest: () => De,
542
+ __rewriteRelativeImportExtension: () => $e,
543
+ __runInitializers: () => je,
544
+ __setFunctionName: () => Ne,
545
+ __spread: () => ze,
546
+ __spreadArray: () => Ve,
547
+ __spreadArrays: () => Be,
548
+ __values: () => F,
549
+ default: () => nt
550
+ });
551
+ function Ee(e, t) {
552
+ if (typeof t != `function` && t !== null) throw TypeError(`Class extends value ` + String(t) + ` is not a constructor or null`);
553
+ L(e, t);
554
+ function n() {
555
+ this.constructor = e;
556
+ }
557
+ e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
558
+ }
559
+ function De(e, t) {
560
+ var n = {};
561
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
562
+ if (e != null && typeof Object.getOwnPropertySymbols == `function`) for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++) t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
563
+ return n;
564
+ }
565
+ function Oe(e, t, n, r) {
566
+ var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
567
+ if (typeof Reflect == `object` && typeof Reflect.decorate == `function`) a = Reflect.decorate(e, t, n, r);
568
+ else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
569
+ return i > 3 && a && Object.defineProperty(t, n, a), a;
570
+ }
571
+ function ke(e, t) {
572
+ return function(n, r) {
573
+ t(n, r, e);
574
+ };
575
+ }
576
+ function Ae(e, t, n, r, i, a) {
577
+ function o(e) {
578
+ if (e !== void 0 && typeof e != `function`) throw TypeError(`Function expected`);
579
+ return e;
580
+ }
581
+ for (var s = r.kind, c = s === `getter` ? `get` : s === `setter` ? `set` : `value`, l = !t && e ? r.static ? e : e.prototype : null, u = t || (l ? Object.getOwnPropertyDescriptor(l, r.name) : {}), d, f = !1, p = n.length - 1; p >= 0; p--) {
582
+ var m = {};
583
+ for (var h in r) m[h] = h === `access` ? {} : r[h];
584
+ for (var h in r.access) m.access[h] = r.access[h];
585
+ m.addInitializer = function(e) {
586
+ if (f) throw TypeError(`Cannot add initializers after decoration has completed`);
587
+ a.push(o(e || null));
588
+ };
589
+ var g = (0, n[p])(s === `accessor` ? {
590
+ get: u.get,
591
+ set: u.set
592
+ } : u[c], m);
593
+ if (s === `accessor`) {
594
+ if (g === void 0) continue;
595
+ if (typeof g != `object` || !g) throw TypeError(`Object expected`);
596
+ (d = o(g.get)) && (u.get = d), (d = o(g.set)) && (u.set = d), (d = o(g.init)) && i.unshift(d);
597
+ } else (d = o(g)) && (s === `field` ? i.unshift(d) : u[c] = d);
598
+ }
599
+ l && Object.defineProperty(l, r.name, u), f = !0;
600
+ }
601
+ function je(e, t, n) {
602
+ for (var r = arguments.length > 2, i = 0; i < t.length; i++) n = r ? t[i].call(e, n) : t[i].call(e);
603
+ return r ? n : void 0;
604
+ }
605
+ function Me(e) {
606
+ return typeof e == `symbol` ? e : `${e}`;
607
+ }
608
+ function Ne(e, t, n) {
609
+ return typeof t == `symbol` && (t = t.description ? `[${t.description}]` : ``), Object.defineProperty(e, `name`, {
610
+ configurable: !0,
611
+ value: n ? `${n} ${t}` : t
612
+ });
613
+ }
614
+ function Pe(e, t) {
615
+ if (typeof Reflect == `object` && typeof Reflect.metadata == `function`) return Reflect.metadata(e, t);
616
+ }
617
+ function Fe(e, t, n, r) {
618
+ function i(e) {
619
+ return e instanceof n ? e : new n(function(t) {
620
+ t(e);
621
+ });
622
+ }
623
+ return new (n ||= Promise)(function(n, a) {
624
+ function o(e) {
625
+ try {
626
+ c(r.next(e));
627
+ } catch (e) {
628
+ a(e);
629
+ }
630
+ }
631
+ function s(e) {
632
+ try {
633
+ c(r.throw(e));
634
+ } catch (e) {
635
+ a(e);
636
+ }
637
+ }
638
+ function c(e) {
639
+ e.done ? n(e.value) : i(e.value).then(o, s);
640
+ }
641
+ c((r = r.apply(e, t || [])).next());
642
+ });
643
+ }
644
+ function Ie(e, t) {
645
+ var n = {
646
+ label: 0,
647
+ sent: function() {
648
+ if (a[0] & 1) throw a[1];
649
+ return a[1];
650
+ },
651
+ trys: [],
652
+ ops: []
653
+ }, r, i, a, o = Object.create((typeof Iterator == `function` ? Iterator : Object).prototype);
654
+ return o.next = s(0), o.throw = s(1), o.return = s(2), typeof Symbol == `function` && (o[Symbol.iterator] = function() {
655
+ return this;
656
+ }), o;
657
+ function s(e) {
658
+ return function(t) {
659
+ return c([e, t]);
660
+ };
661
+ }
662
+ function c(s) {
663
+ if (r) throw TypeError(`Generator is already executing.`);
664
+ for (; o && (o = 0, s[0] && (n = 0)), n;) try {
665
+ if (r = 1, i && (a = s[0] & 2 ? i.return : s[0] ? i.throw || ((a = i.return) && a.call(i), 0) : i.next) && !(a = a.call(i, s[1])).done) return a;
666
+ switch (i = 0, a && (s = [s[0] & 2, a.value]), s[0]) {
667
+ case 0:
668
+ case 1:
669
+ a = s;
670
+ break;
671
+ case 4: return n.label++, {
672
+ value: s[1],
673
+ done: !1
674
+ };
675
+ case 5:
676
+ n.label++, i = s[1], s = [0];
677
+ continue;
678
+ case 7:
679
+ s = n.ops.pop(), n.trys.pop();
680
+ continue;
681
+ default:
682
+ if ((a = n.trys, !(a = a.length > 0 && a[a.length - 1])) && (s[0] === 6 || s[0] === 2)) {
683
+ n = 0;
684
+ continue;
685
+ }
686
+ if (s[0] === 3 && (!a || s[1] > a[0] && s[1] < a[3])) {
687
+ n.label = s[1];
688
+ break;
689
+ }
690
+ if (s[0] === 6 && n.label < a[1]) {
691
+ n.label = a[1], a = s;
692
+ break;
693
+ }
694
+ if (a && n.label < a[2]) {
695
+ n.label = a[2], n.ops.push(s);
696
+ break;
697
+ }
698
+ a[2] && n.ops.pop(), n.trys.pop();
699
+ continue;
700
+ }
701
+ s = t.call(e, n);
702
+ } catch (e) {
703
+ s = [6, e], i = 0;
704
+ } finally {
705
+ r = a = 0;
706
+ }
707
+ if (s[0] & 5) throw s[1];
708
+ return {
709
+ value: s[0] ? s[1] : void 0,
710
+ done: !0
711
+ };
712
+ }
713
+ }
714
+ function Le(e, t) {
715
+ for (var n in e) n !== `default` && !Object.prototype.hasOwnProperty.call(t, n) && z(t, e, n);
716
+ }
717
+ function F(e) {
718
+ var t = typeof Symbol == `function` && Symbol.iterator, n = t && e[t], r = 0;
719
+ if (n) return n.call(e);
720
+ if (e && typeof e.length == `number`) return { next: function() {
721
+ return e && r >= e.length && (e = void 0), {
722
+ value: e && e[r++],
723
+ done: !e
724
+ };
725
+ } };
726
+ throw TypeError(t ? `Object is not iterable.` : `Symbol.iterator is not defined.`);
727
+ }
728
+ function Re(e, t) {
729
+ var n = typeof Symbol == `function` && e[Symbol.iterator];
730
+ if (!n) return e;
731
+ var r = n.call(e), i, a = [], o;
732
+ try {
733
+ for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
734
+ } catch (e) {
735
+ o = { error: e };
736
+ } finally {
737
+ try {
738
+ i && !i.done && (n = r.return) && n.call(r);
739
+ } finally {
740
+ if (o) throw o.error;
741
+ }
742
+ }
743
+ return a;
744
+ }
745
+ function ze() {
746
+ for (var e = [], t = 0; t < arguments.length; t++) e = e.concat(Re(arguments[t]));
747
+ return e;
748
+ }
749
+ function Be() {
750
+ for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
751
+ for (var r = Array(e), i = 0, t = 0; t < n; t++) for (var a = arguments[t], o = 0, s = a.length; o < s; o++, i++) r[i] = a[o];
752
+ return r;
753
+ }
754
+ function Ve(e, t, n) {
755
+ if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
756
+ return e.concat(a || Array.prototype.slice.call(t));
757
+ }
758
+ function I(e) {
759
+ return this instanceof I ? (this.v = e, this) : new I(e);
760
+ }
761
+ function He(e, t, n) {
762
+ if (!Symbol.asyncIterator) throw TypeError(`Symbol.asyncIterator is not defined.`);
763
+ var r = n.apply(e, t || []), i, a = [];
764
+ return i = Object.create((typeof AsyncIterator == `function` ? AsyncIterator : Object).prototype), s(`next`), s(`throw`), s(`return`, o), i[Symbol.asyncIterator] = function() {
765
+ return this;
766
+ }, i;
767
+ function o(e) {
768
+ return function(t) {
769
+ return Promise.resolve(t).then(e, d);
770
+ };
771
+ }
772
+ function s(e, t) {
773
+ r[e] && (i[e] = function(t) {
774
+ return new Promise(function(n, r) {
775
+ a.push([
776
+ e,
777
+ t,
778
+ n,
779
+ r
780
+ ]) > 1 || c(e, t);
781
+ });
782
+ }, t && (i[e] = t(i[e])));
783
+ }
784
+ function c(e, t) {
785
+ try {
786
+ l(r[e](t));
787
+ } catch (e) {
788
+ f(a[0][3], e);
789
+ }
790
+ }
791
+ function l(e) {
792
+ e.value instanceof I ? Promise.resolve(e.value.v).then(u, d) : f(a[0][2], e);
793
+ }
794
+ function u(e) {
795
+ c(`next`, e);
796
+ }
797
+ function d(e) {
798
+ c(`throw`, e);
799
+ }
800
+ function f(e, t) {
801
+ e(t), a.shift(), a.length && c(a[0][0], a[0][1]);
802
+ }
803
+ }
804
+ function Ue(e) {
805
+ var t, n;
806
+ return t = {}, r(`next`), r(`throw`, function(e) {
807
+ throw e;
808
+ }), r(`return`), t[Symbol.iterator] = function() {
809
+ return this;
810
+ }, t;
811
+ function r(r, i) {
812
+ t[r] = e[r] ? function(t) {
813
+ return (n = !n) ? {
814
+ value: I(e[r](t)),
815
+ done: !1
816
+ } : i ? i(t) : t;
817
+ } : i;
818
+ }
819
+ }
820
+ function We(e) {
821
+ if (!Symbol.asyncIterator) throw TypeError(`Symbol.asyncIterator is not defined.`);
822
+ var t = e[Symbol.asyncIterator], n;
823
+ return t ? t.call(e) : (e = typeof F == `function` ? F(e) : e[Symbol.iterator](), n = {}, r(`next`), r(`throw`), r(`return`), n[Symbol.asyncIterator] = function() {
824
+ return this;
825
+ }, n);
826
+ function r(t) {
827
+ n[t] = e[t] && function(n) {
828
+ return new Promise(function(r, a) {
829
+ n = e[t](n), i(r, a, n.done, n.value);
830
+ });
831
+ };
832
+ }
833
+ function i(e, t, n, r) {
834
+ Promise.resolve(r).then(function(t) {
835
+ e({
836
+ value: t,
837
+ done: n
838
+ });
839
+ }, t);
840
+ }
841
+ }
842
+ function Ge(e, t) {
843
+ return Object.defineProperty ? Object.defineProperty(e, `raw`, { value: t }) : e.raw = t, e;
844
+ }
845
+ function Ke(e) {
846
+ if (e && e.__esModule) return e;
847
+ var t = {};
848
+ if (e != null) for (var n = B(e), r = 0; r < n.length; r++) n[r] !== `default` && z(t, e, n[r]);
849
+ return et(t, e), t;
850
+ }
851
+ function qe(e) {
852
+ return e && e.__esModule ? e : { default: e };
853
+ }
854
+ function Je(e, t, n, r) {
855
+ if (n === `a` && !r) throw TypeError(`Private accessor was defined without a getter`);
856
+ if (typeof t == `function` ? e !== t || !r : !t.has(e)) throw TypeError(`Cannot read private member from an object whose class did not declare it`);
857
+ return n === `m` ? r : n === `a` ? r.call(e) : r ? r.value : t.get(e);
858
+ }
859
+ function Ye(e, t, n, r, i) {
860
+ if (r === `m`) throw TypeError(`Private method is not writable`);
861
+ if (r === `a` && !i) throw TypeError(`Private accessor was defined without a setter`);
862
+ if (typeof t == `function` ? e !== t || !i : !t.has(e)) throw TypeError(`Cannot write private member to an object whose class did not declare it`);
863
+ return r === `a` ? i.call(e, n) : i ? i.value = n : t.set(e, n), n;
864
+ }
865
+ function Xe(e, t) {
866
+ if (t === null || typeof t != `object` && typeof t != `function`) throw TypeError(`Cannot use 'in' operator on non-object`);
867
+ return typeof e == `function` ? t === e : e.has(t);
868
+ }
869
+ function Ze(e, t, n) {
870
+ if (t != null) {
871
+ if (typeof t != `object` && typeof t != `function`) throw TypeError(`Object expected.`);
872
+ var r, i;
873
+ if (n) {
874
+ if (!Symbol.asyncDispose) throw TypeError(`Symbol.asyncDispose is not defined.`);
875
+ r = t[Symbol.asyncDispose];
876
+ }
877
+ if (r === void 0) {
878
+ if (!Symbol.dispose) throw TypeError(`Symbol.dispose is not defined.`);
879
+ r = t[Symbol.dispose], n && (i = r);
880
+ }
881
+ if (typeof r != `function`) throw TypeError(`Object not disposable.`);
882
+ i && (r = function() {
883
+ try {
884
+ i.call(this);
885
+ } catch (e) {
886
+ return Promise.reject(e);
887
+ }
888
+ }), e.stack.push({
889
+ value: t,
890
+ dispose: r,
891
+ async: n
892
+ });
893
+ } else n && e.stack.push({ async: !0 });
894
+ return t;
895
+ }
896
+ function Qe(e) {
897
+ function t(t) {
898
+ e.error = e.hasError ? new tt(t, e.error, `An error was suppressed during disposal.`) : t, e.hasError = !0;
899
+ }
900
+ var n, r = 0;
901
+ function i() {
902
+ for (; n = e.stack.pop();) try {
903
+ if (!n.async && r === 1) return r = 0, e.stack.push(n), Promise.resolve().then(i);
904
+ if (n.dispose) {
905
+ var a = n.dispose.call(n.value);
906
+ if (n.async) return r |= 2, Promise.resolve(a).then(i, function(e) {
907
+ return t(e), i();
908
+ });
909
+ } else r |= 1;
910
+ } catch (e) {
911
+ t(e);
912
+ }
913
+ if (r === 1) return e.hasError ? Promise.reject(e.error) : Promise.resolve();
914
+ if (e.hasError) throw e.error;
915
+ }
916
+ return i();
917
+ }
918
+ function $e(e, t) {
919
+ return typeof e == `string` && /^\.\.?\//.test(e) ? e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(e, n, r, i, a) {
920
+ return n ? t ? `.jsx` : `.js` : r && (!i || !a) ? e : r + i + `.` + a.toLowerCase() + `js`;
921
+ }) : e;
922
+ }
923
+ var L, R, z, et, B, tt, nt, V = f((() => {
924
+ L = function(e, t) {
925
+ return L = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
926
+ e.__proto__ = t;
927
+ } || function(e, t) {
928
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
929
+ }, L(e, t);
930
+ }, R = function() {
931
+ return R = Object.assign || function(e) {
932
+ for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
933
+ return e;
934
+ }, R.apply(this, arguments);
935
+ }, z = Object.create ? (function(e, t, n, r) {
936
+ r === void 0 && (r = n);
937
+ var i = Object.getOwnPropertyDescriptor(t, n);
938
+ (!i || (`get` in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
939
+ enumerable: !0,
940
+ get: function() {
941
+ return t[n];
942
+ }
943
+ }), Object.defineProperty(e, r, i);
944
+ }) : (function(e, t, n, r) {
945
+ r === void 0 && (r = n), e[r] = t[n];
946
+ }), et = Object.create ? (function(e, t) {
947
+ Object.defineProperty(e, `default`, {
948
+ enumerable: !0,
949
+ value: t
950
+ });
951
+ }) : function(e, t) {
952
+ e.default = t;
953
+ }, B = function(e) {
954
+ return B = Object.getOwnPropertyNames || function(e) {
955
+ var t = [];
956
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[t.length] = n);
957
+ return t;
958
+ }, B(e);
959
+ }, tt = typeof SuppressedError == `function` ? SuppressedError : function(e, t, n) {
960
+ var r = Error(n);
961
+ return r.name = `SuppressedError`, r.error = e, r.suppressed = t, r;
962
+ }, nt = {
963
+ __extends: Ee,
964
+ __assign: R,
965
+ __rest: De,
966
+ __decorate: Oe,
967
+ __param: ke,
968
+ __esDecorate: Ae,
969
+ __runInitializers: je,
970
+ __propKey: Me,
971
+ __setFunctionName: Ne,
972
+ __metadata: Pe,
973
+ __awaiter: Fe,
974
+ __generator: Ie,
975
+ __createBinding: z,
976
+ __exportStar: Le,
977
+ __values: F,
978
+ __read: Re,
979
+ __spread: ze,
980
+ __spreadArrays: Be,
981
+ __spreadArray: Ve,
982
+ __await: I,
983
+ __asyncGenerator: He,
984
+ __asyncDelegator: Ue,
985
+ __asyncValues: We,
986
+ __makeTemplateObject: Ge,
987
+ __importStar: Ke,
988
+ __importDefault: qe,
989
+ __classPrivateFieldGet: Je,
990
+ __classPrivateFieldSet: Ye,
991
+ __classPrivateFieldIn: Xe,
992
+ __addDisposableResource: Ze,
993
+ __disposeResources: Qe,
994
+ __rewriteRelativeImportExtension: $e
995
+ };
996
+ })), rt = p(((e) => {
997
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.ErrorKind = void 0;
998
+ var t;
999
+ (function(e) {
1000
+ e[e.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = `EXPECT_ARGUMENT_CLOSING_BRACE`, e[e.EMPTY_ARGUMENT = 2] = `EMPTY_ARGUMENT`, e[e.MALFORMED_ARGUMENT = 3] = `MALFORMED_ARGUMENT`, e[e.EXPECT_ARGUMENT_TYPE = 4] = `EXPECT_ARGUMENT_TYPE`, e[e.INVALID_ARGUMENT_TYPE = 5] = `INVALID_ARGUMENT_TYPE`, e[e.EXPECT_ARGUMENT_STYLE = 6] = `EXPECT_ARGUMENT_STYLE`, e[e.INVALID_NUMBER_SKELETON = 7] = `INVALID_NUMBER_SKELETON`, e[e.INVALID_DATE_TIME_SKELETON = 8] = `INVALID_DATE_TIME_SKELETON`, e[e.EXPECT_NUMBER_SKELETON = 9] = `EXPECT_NUMBER_SKELETON`, e[e.EXPECT_DATE_TIME_SKELETON = 10] = `EXPECT_DATE_TIME_SKELETON`, e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = `UNCLOSED_QUOTE_IN_ARGUMENT_STYLE`, e[e.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = `EXPECT_SELECT_ARGUMENT_OPTIONS`, e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = `EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE`, e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = `INVALID_PLURAL_ARGUMENT_OFFSET_VALUE`, e[e.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = `EXPECT_SELECT_ARGUMENT_SELECTOR`, e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = `EXPECT_PLURAL_ARGUMENT_SELECTOR`, e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = `EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT`, e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = `EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT`, e[e.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = `INVALID_PLURAL_ARGUMENT_SELECTOR`, e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = `DUPLICATE_PLURAL_ARGUMENT_SELECTOR`, e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = `DUPLICATE_SELECT_ARGUMENT_SELECTOR`, e[e.MISSING_OTHER_CLAUSE = 22] = `MISSING_OTHER_CLAUSE`, e[e.INVALID_TAG = 23] = `INVALID_TAG`, e[e.INVALID_TAG_NAME = 25] = `INVALID_TAG_NAME`, e[e.UNMATCHED_CLOSING_TAG = 26] = `UNMATCHED_CLOSING_TAG`, e[e.UNCLOSED_TAG = 27] = `UNCLOSED_TAG`;
1001
+ })(t || (e.ErrorKind = t = {}));
1002
+ })), H = p(((e) => {
1003
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.SKELETON_TYPE = e.TYPE = void 0, e.isLiteralElement = r, e.isArgumentElement = i, e.isNumberElement = a, e.isDateElement = o, e.isTimeElement = s, e.isSelectElement = c, e.isPluralElement = l, e.isPoundElement = u, e.isTagElement = d, e.isNumberSkeleton = f, e.isDateTimeSkeleton = p, e.createLiteralElement = m, e.createNumberElement = h;
1004
+ var t;
1005
+ (function(e) {
1006
+ e[e.literal = 0] = `literal`, e[e.argument = 1] = `argument`, e[e.number = 2] = `number`, e[e.date = 3] = `date`, e[e.time = 4] = `time`, e[e.select = 5] = `select`, e[e.plural = 6] = `plural`, e[e.pound = 7] = `pound`, e[e.tag = 8] = `tag`;
1007
+ })(t || (e.TYPE = t = {}));
1008
+ var n;
1009
+ (function(e) {
1010
+ e[e.number = 0] = `number`, e[e.dateTime = 1] = `dateTime`;
1011
+ })(n || (e.SKELETON_TYPE = n = {}));
1012
+ function r(e) {
1013
+ return e.type === t.literal;
1014
+ }
1015
+ function i(e) {
1016
+ return e.type === t.argument;
1017
+ }
1018
+ function a(e) {
1019
+ return e.type === t.number;
1020
+ }
1021
+ function o(e) {
1022
+ return e.type === t.date;
1023
+ }
1024
+ function s(e) {
1025
+ return e.type === t.time;
1026
+ }
1027
+ function c(e) {
1028
+ return e.type === t.select;
1029
+ }
1030
+ function l(e) {
1031
+ return e.type === t.plural;
1032
+ }
1033
+ function u(e) {
1034
+ return e.type === t.pound;
1035
+ }
1036
+ function d(e) {
1037
+ return e.type === t.tag;
1038
+ }
1039
+ function f(e) {
1040
+ return !!(e && typeof e == `object` && e.type === n.number);
1041
+ }
1042
+ function p(e) {
1043
+ return !!(e && typeof e == `object` && e.type === n.dateTime);
1044
+ }
1045
+ function m(e) {
1046
+ return {
1047
+ type: t.literal,
1048
+ value: e
1049
+ };
1050
+ }
1051
+ function h(e, n) {
1052
+ return {
1053
+ type: t.number,
1054
+ value: e,
1055
+ style: n
1056
+ };
1057
+ }
1058
+ })), it = p(((e) => {
1059
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.WHITE_SPACE_REGEX = e.SPACE_SEPARATOR_REGEX = void 0, e.SPACE_SEPARATOR_REGEX = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, e.WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/;
1060
+ })), at = p(((e) => {
1061
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.parseDateTimeSkeleton = n;
1062
+ var t = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
1063
+ function n(e) {
1064
+ var n = {};
1065
+ return e.replace(t, function(e) {
1066
+ var t = e.length;
1067
+ switch (e[0]) {
1068
+ case `G`:
1069
+ n.era = t === 4 ? `long` : t === 5 ? `narrow` : `short`;
1070
+ break;
1071
+ case `y`:
1072
+ n.year = t === 2 ? `2-digit` : `numeric`;
1073
+ break;
1074
+ case `Y`:
1075
+ case `u`:
1076
+ case `U`:
1077
+ case `r`: throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");
1078
+ case `q`:
1079
+ case `Q`: throw RangeError("`q/Q` (quarter) patterns are not supported");
1080
+ case `M`:
1081
+ case `L`:
1082
+ n.month = [
1083
+ `numeric`,
1084
+ `2-digit`,
1085
+ `short`,
1086
+ `long`,
1087
+ `narrow`
1088
+ ][t - 1];
1089
+ break;
1090
+ case `w`:
1091
+ case `W`: throw RangeError("`w/W` (week) patterns are not supported");
1092
+ case `d`:
1093
+ n.day = [`numeric`, `2-digit`][t - 1];
1094
+ break;
1095
+ case `D`:
1096
+ case `F`:
1097
+ case `g`: throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
1098
+ case `E`:
1099
+ n.weekday = t === 4 ? `long` : t === 5 ? `narrow` : `short`;
1100
+ break;
1101
+ case `e`:
1102
+ if (t < 4) throw RangeError("`e..eee` (weekday) patterns are not supported");
1103
+ n.weekday = [
1104
+ `short`,
1105
+ `long`,
1106
+ `narrow`,
1107
+ `short`
1108
+ ][t - 4];
1109
+ break;
1110
+ case `c`:
1111
+ if (t < 4) throw RangeError("`c..ccc` (weekday) patterns are not supported");
1112
+ n.weekday = [
1113
+ `short`,
1114
+ `long`,
1115
+ `narrow`,
1116
+ `short`
1117
+ ][t - 4];
1118
+ break;
1119
+ case `a`:
1120
+ n.hour12 = !0;
1121
+ break;
1122
+ case `b`:
1123
+ case `B`: throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");
1124
+ case `h`:
1125
+ n.hourCycle = `h12`, n.hour = [`numeric`, `2-digit`][t - 1];
1126
+ break;
1127
+ case `H`:
1128
+ n.hourCycle = `h23`, n.hour = [`numeric`, `2-digit`][t - 1];
1129
+ break;
1130
+ case `K`:
1131
+ n.hourCycle = `h11`, n.hour = [`numeric`, `2-digit`][t - 1];
1132
+ break;
1133
+ case `k`:
1134
+ n.hourCycle = `h24`, n.hour = [`numeric`, `2-digit`][t - 1];
1135
+ break;
1136
+ case `j`:
1137
+ case `J`:
1138
+ case `C`: throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
1139
+ case `m`:
1140
+ n.minute = [`numeric`, `2-digit`][t - 1];
1141
+ break;
1142
+ case `s`:
1143
+ n.second = [`numeric`, `2-digit`][t - 1];
1144
+ break;
1145
+ case `S`:
1146
+ case `A`: throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");
1147
+ case `z`:
1148
+ n.timeZoneName = t < 4 ? `short` : `long`;
1149
+ break;
1150
+ case `Z`:
1151
+ case `O`:
1152
+ case `v`:
1153
+ case `V`:
1154
+ case `X`:
1155
+ case `x`: throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead");
1156
+ }
1157
+ return ``;
1158
+ }), n;
1159
+ }
1160
+ })), ot = p(((e) => {
1161
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.WHITE_SPACE_REGEX = void 0, e.WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
1162
+ })), st = p(((e) => {
1163
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.parseNumberSkeletonFromString = r, e.parseNumberSkeleton = p;
1164
+ var t = (V(), g(P)), n = ot();
1165
+ function r(e) {
1166
+ if (e.length === 0) throw Error(`Number skeleton cannot be empty`);
1167
+ for (var t = e.split(n.WHITE_SPACE_REGEX).filter(function(e) {
1168
+ return e.length > 0;
1169
+ }), r = [], i = 0, a = t; i < a.length; i++) {
1170
+ var o = a[i].split(`/`);
1171
+ if (o.length === 0) throw Error(`Invalid number skeleton`);
1172
+ for (var s = o[0], c = o.slice(1), l = 0, u = c; l < u.length; l++) if (u[l].length === 0) throw Error(`Invalid number skeleton`);
1173
+ r.push({
1174
+ stem: s,
1175
+ options: c
1176
+ });
1177
+ }
1178
+ return r;
1179
+ }
1180
+ function i(e) {
1181
+ return e.replace(/^(.*?)-/, ``);
1182
+ }
1183
+ var a = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, o = /^(@+)?(\+|#+)?[rs]?$/g, s = /(\*)(0+)|(#+)(0+)|(0+)/g, c = /^(0+)$/;
1184
+ function l(e) {
1185
+ var t = {};
1186
+ return e[e.length - 1] === `r` ? t.roundingPriority = `morePrecision` : e[e.length - 1] === `s` && (t.roundingPriority = `lessPrecision`), e.replace(o, function(e, n, r) {
1187
+ return typeof r == `string` ? r === `+` ? t.minimumSignificantDigits = n.length : n[0] === `#` ? t.maximumSignificantDigits = n.length : (t.minimumSignificantDigits = n.length, t.maximumSignificantDigits = n.length + (typeof r == `string` ? r.length : 0)) : (t.minimumSignificantDigits = n.length, t.maximumSignificantDigits = n.length), ``;
1188
+ }), t;
1189
+ }
1190
+ function u(e) {
1191
+ switch (e) {
1192
+ case `sign-auto`: return { signDisplay: `auto` };
1193
+ case `sign-accounting`:
1194
+ case `()`: return { currencySign: `accounting` };
1195
+ case `sign-always`:
1196
+ case `+!`: return { signDisplay: `always` };
1197
+ case `sign-accounting-always`:
1198
+ case `()!`: return {
1199
+ signDisplay: `always`,
1200
+ currencySign: `accounting`
1201
+ };
1202
+ case `sign-except-zero`:
1203
+ case `+?`: return { signDisplay: `exceptZero` };
1204
+ case `sign-accounting-except-zero`:
1205
+ case `()?`: return {
1206
+ signDisplay: `exceptZero`,
1207
+ currencySign: `accounting`
1208
+ };
1209
+ case `sign-never`:
1210
+ case `+_`: return { signDisplay: `never` };
1211
+ }
1212
+ }
1213
+ function d(e) {
1214
+ var t;
1215
+ if (e[0] === `E` && e[1] === `E` ? (t = { notation: `engineering` }, e = e.slice(2)) : e[0] === `E` && (t = { notation: `scientific` }, e = e.slice(1)), t) {
1216
+ var n = e.slice(0, 2);
1217
+ if (n === `+!` ? (t.signDisplay = `always`, e = e.slice(2)) : n === `+?` && (t.signDisplay = `exceptZero`, e = e.slice(2)), !c.test(e)) throw Error(`Malformed concise eng/scientific notation`);
1218
+ t.minimumIntegerDigits = e.length;
1219
+ }
1220
+ return t;
1221
+ }
1222
+ function f(e) {
1223
+ return u(e) || {};
1224
+ }
1225
+ function p(e) {
1226
+ for (var n = {}, r = 0, p = e; r < p.length; r++) {
1227
+ var m = p[r];
1228
+ switch (m.stem) {
1229
+ case `percent`:
1230
+ case `%`:
1231
+ n.style = `percent`;
1232
+ continue;
1233
+ case `%x100`:
1234
+ n.style = `percent`, n.scale = 100;
1235
+ continue;
1236
+ case `currency`:
1237
+ n.style = `currency`, n.currency = m.options[0];
1238
+ continue;
1239
+ case `group-off`:
1240
+ case `,_`:
1241
+ n.useGrouping = !1;
1242
+ continue;
1243
+ case `precision-integer`:
1244
+ case `.`:
1245
+ n.maximumFractionDigits = 0;
1246
+ continue;
1247
+ case `measure-unit`:
1248
+ case `unit`:
1249
+ n.style = `unit`, n.unit = i(m.options[0]);
1250
+ continue;
1251
+ case `compact-short`:
1252
+ case `K`:
1253
+ n.notation = `compact`, n.compactDisplay = `short`;
1254
+ continue;
1255
+ case `compact-long`:
1256
+ case `KK`:
1257
+ n.notation = `compact`, n.compactDisplay = `long`;
1258
+ continue;
1259
+ case `scientific`:
1260
+ n = t.__assign(t.__assign(t.__assign({}, n), { notation: `scientific` }), m.options.reduce(function(e, n) {
1261
+ return t.__assign(t.__assign({}, e), f(n));
1262
+ }, {}));
1263
+ continue;
1264
+ case `engineering`:
1265
+ n = t.__assign(t.__assign(t.__assign({}, n), { notation: `engineering` }), m.options.reduce(function(e, n) {
1266
+ return t.__assign(t.__assign({}, e), f(n));
1267
+ }, {}));
1268
+ continue;
1269
+ case `notation-simple`:
1270
+ n.notation = `standard`;
1271
+ continue;
1272
+ case `unit-width-narrow`:
1273
+ n.currencyDisplay = `narrowSymbol`, n.unitDisplay = `narrow`;
1274
+ continue;
1275
+ case `unit-width-short`:
1276
+ n.currencyDisplay = `code`, n.unitDisplay = `short`;
1277
+ continue;
1278
+ case `unit-width-full-name`:
1279
+ n.currencyDisplay = `name`, n.unitDisplay = `long`;
1280
+ continue;
1281
+ case `unit-width-iso-code`:
1282
+ n.currencyDisplay = `symbol`;
1283
+ continue;
1284
+ case `scale`:
1285
+ n.scale = parseFloat(m.options[0]);
1286
+ continue;
1287
+ case `rounding-mode-floor`:
1288
+ n.roundingMode = `floor`;
1289
+ continue;
1290
+ case `rounding-mode-ceiling`:
1291
+ n.roundingMode = `ceil`;
1292
+ continue;
1293
+ case `rounding-mode-down`:
1294
+ n.roundingMode = `trunc`;
1295
+ continue;
1296
+ case `rounding-mode-up`:
1297
+ n.roundingMode = `expand`;
1298
+ continue;
1299
+ case `rounding-mode-half-even`:
1300
+ n.roundingMode = `halfEven`;
1301
+ continue;
1302
+ case `rounding-mode-half-down`:
1303
+ n.roundingMode = `halfTrunc`;
1304
+ continue;
1305
+ case `rounding-mode-half-up`:
1306
+ n.roundingMode = `halfExpand`;
1307
+ continue;
1308
+ case `integer-width`:
1309
+ if (m.options.length > 1) throw RangeError(`integer-width stems only accept a single optional option`);
1310
+ m.options[0].replace(s, function(e, t, r, i, a, o) {
1311
+ if (t) n.minimumIntegerDigits = r.length;
1312
+ else if (i && a) throw Error(`We currently do not support maximum integer digits`);
1313
+ else if (o) throw Error(`We currently do not support exact integer digits`);
1314
+ return ``;
1315
+ });
1316
+ continue;
1317
+ }
1318
+ if (c.test(m.stem)) {
1319
+ n.minimumIntegerDigits = m.stem.length;
1320
+ continue;
1321
+ }
1322
+ if (a.test(m.stem)) {
1323
+ if (m.options.length > 1) throw RangeError(`Fraction-precision stems only accept a single optional option`);
1324
+ m.stem.replace(a, function(e, t, r, i, a, o) {
1325
+ return r === `*` ? n.minimumFractionDigits = t.length : i && i[0] === `#` ? n.maximumFractionDigits = i.length : a && o ? (n.minimumFractionDigits = a.length, n.maximumFractionDigits = a.length + o.length) : (n.minimumFractionDigits = t.length, n.maximumFractionDigits = t.length), ``;
1326
+ });
1327
+ var h = m.options[0];
1328
+ h === `w` ? n = t.__assign(t.__assign({}, n), { trailingZeroDisplay: `stripIfInteger` }) : h && (n = t.__assign(t.__assign({}, n), l(h)));
1329
+ continue;
1330
+ }
1331
+ if (o.test(m.stem)) {
1332
+ n = t.__assign(t.__assign({}, n), l(m.stem));
1333
+ continue;
1334
+ }
1335
+ var g = u(m.stem);
1336
+ g && (n = t.__assign(t.__assign({}, n), g));
1337
+ var _ = d(m.stem);
1338
+ _ && (n = t.__assign(t.__assign({}, n), _));
1339
+ }
1340
+ return n;
1341
+ }
1342
+ })), ct = p(((e) => {
1343
+ Object.defineProperty(e, `__esModule`, { value: !0 });
1344
+ var t = (V(), g(P));
1345
+ t.__exportStar(at(), e), t.__exportStar(st(), e);
1346
+ })), lt = p(((e) => {
1347
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.timeData = void 0, e.timeData = {
1348
+ "001": [`H`, `h`],
1349
+ 419: [
1350
+ `h`,
1351
+ `H`,
1352
+ `hB`,
1353
+ `hb`
1354
+ ],
1355
+ AC: [
1356
+ `H`,
1357
+ `h`,
1358
+ `hb`,
1359
+ `hB`
1360
+ ],
1361
+ AD: [`H`, `hB`],
1362
+ AE: [
1363
+ `h`,
1364
+ `hB`,
1365
+ `hb`,
1366
+ `H`
1367
+ ],
1368
+ AF: [
1369
+ `H`,
1370
+ `hb`,
1371
+ `hB`,
1372
+ `h`
1373
+ ],
1374
+ AG: [
1375
+ `h`,
1376
+ `hb`,
1377
+ `H`,
1378
+ `hB`
1379
+ ],
1380
+ AI: [
1381
+ `H`,
1382
+ `h`,
1383
+ `hb`,
1384
+ `hB`
1385
+ ],
1386
+ AL: [
1387
+ `h`,
1388
+ `H`,
1389
+ `hB`
1390
+ ],
1391
+ AM: [`H`, `hB`],
1392
+ AO: [`H`, `hB`],
1393
+ AR: [
1394
+ `h`,
1395
+ `H`,
1396
+ `hB`,
1397
+ `hb`
1398
+ ],
1399
+ AS: [`h`, `H`],
1400
+ AT: [`H`, `hB`],
1401
+ AU: [
1402
+ `h`,
1403
+ `hb`,
1404
+ `H`,
1405
+ `hB`
1406
+ ],
1407
+ AW: [`H`, `hB`],
1408
+ AX: [`H`],
1409
+ AZ: [
1410
+ `H`,
1411
+ `hB`,
1412
+ `h`
1413
+ ],
1414
+ BA: [
1415
+ `H`,
1416
+ `hB`,
1417
+ `h`
1418
+ ],
1419
+ BB: [
1420
+ `h`,
1421
+ `hb`,
1422
+ `H`,
1423
+ `hB`
1424
+ ],
1425
+ BD: [
1426
+ `h`,
1427
+ `hB`,
1428
+ `H`
1429
+ ],
1430
+ BE: [`H`, `hB`],
1431
+ BF: [`H`, `hB`],
1432
+ BG: [
1433
+ `H`,
1434
+ `hB`,
1435
+ `h`
1436
+ ],
1437
+ BH: [
1438
+ `h`,
1439
+ `hB`,
1440
+ `hb`,
1441
+ `H`
1442
+ ],
1443
+ BI: [`H`, `h`],
1444
+ BJ: [`H`, `hB`],
1445
+ BL: [`H`, `hB`],
1446
+ BM: [
1447
+ `h`,
1448
+ `hb`,
1449
+ `H`,
1450
+ `hB`
1451
+ ],
1452
+ BN: [
1453
+ `hb`,
1454
+ `hB`,
1455
+ `h`,
1456
+ `H`
1457
+ ],
1458
+ BO: [
1459
+ `h`,
1460
+ `H`,
1461
+ `hB`,
1462
+ `hb`
1463
+ ],
1464
+ BQ: [`H`],
1465
+ BR: [`H`, `hB`],
1466
+ BS: [
1467
+ `h`,
1468
+ `hb`,
1469
+ `H`,
1470
+ `hB`
1471
+ ],
1472
+ BT: [`h`, `H`],
1473
+ BW: [
1474
+ `H`,
1475
+ `h`,
1476
+ `hb`,
1477
+ `hB`
1478
+ ],
1479
+ BY: [`H`, `h`],
1480
+ BZ: [
1481
+ `H`,
1482
+ `h`,
1483
+ `hb`,
1484
+ `hB`
1485
+ ],
1486
+ CA: [
1487
+ `h`,
1488
+ `hb`,
1489
+ `H`,
1490
+ `hB`
1491
+ ],
1492
+ CC: [
1493
+ `H`,
1494
+ `h`,
1495
+ `hb`,
1496
+ `hB`
1497
+ ],
1498
+ CD: [`hB`, `H`],
1499
+ CF: [
1500
+ `H`,
1501
+ `h`,
1502
+ `hB`
1503
+ ],
1504
+ CG: [`H`, `hB`],
1505
+ CH: [
1506
+ `H`,
1507
+ `hB`,
1508
+ `h`
1509
+ ],
1510
+ CI: [`H`, `hB`],
1511
+ CK: [
1512
+ `H`,
1513
+ `h`,
1514
+ `hb`,
1515
+ `hB`
1516
+ ],
1517
+ CL: [
1518
+ `h`,
1519
+ `H`,
1520
+ `hB`,
1521
+ `hb`
1522
+ ],
1523
+ CM: [
1524
+ `H`,
1525
+ `h`,
1526
+ `hB`
1527
+ ],
1528
+ CN: [
1529
+ `H`,
1530
+ `hB`,
1531
+ `hb`,
1532
+ `h`
1533
+ ],
1534
+ CO: [
1535
+ `h`,
1536
+ `H`,
1537
+ `hB`,
1538
+ `hb`
1539
+ ],
1540
+ CP: [`H`],
1541
+ CR: [
1542
+ `h`,
1543
+ `H`,
1544
+ `hB`,
1545
+ `hb`
1546
+ ],
1547
+ CU: [
1548
+ `h`,
1549
+ `H`,
1550
+ `hB`,
1551
+ `hb`
1552
+ ],
1553
+ CV: [`H`, `hB`],
1554
+ CW: [`H`, `hB`],
1555
+ CX: [
1556
+ `H`,
1557
+ `h`,
1558
+ `hb`,
1559
+ `hB`
1560
+ ],
1561
+ CY: [
1562
+ `h`,
1563
+ `H`,
1564
+ `hb`,
1565
+ `hB`
1566
+ ],
1567
+ CZ: [`H`],
1568
+ DE: [`H`, `hB`],
1569
+ DG: [
1570
+ `H`,
1571
+ `h`,
1572
+ `hb`,
1573
+ `hB`
1574
+ ],
1575
+ DJ: [`h`, `H`],
1576
+ DK: [`H`],
1577
+ DM: [
1578
+ `h`,
1579
+ `hb`,
1580
+ `H`,
1581
+ `hB`
1582
+ ],
1583
+ DO: [
1584
+ `h`,
1585
+ `H`,
1586
+ `hB`,
1587
+ `hb`
1588
+ ],
1589
+ DZ: [
1590
+ `h`,
1591
+ `hB`,
1592
+ `hb`,
1593
+ `H`
1594
+ ],
1595
+ EA: [
1596
+ `H`,
1597
+ `h`,
1598
+ `hB`,
1599
+ `hb`
1600
+ ],
1601
+ EC: [
1602
+ `h`,
1603
+ `H`,
1604
+ `hB`,
1605
+ `hb`
1606
+ ],
1607
+ EE: [`H`, `hB`],
1608
+ EG: [
1609
+ `h`,
1610
+ `hB`,
1611
+ `hb`,
1612
+ `H`
1613
+ ],
1614
+ EH: [
1615
+ `h`,
1616
+ `hB`,
1617
+ `hb`,
1618
+ `H`
1619
+ ],
1620
+ ER: [`h`, `H`],
1621
+ ES: [
1622
+ `H`,
1623
+ `hB`,
1624
+ `h`,
1625
+ `hb`
1626
+ ],
1627
+ ET: [
1628
+ `hB`,
1629
+ `hb`,
1630
+ `h`,
1631
+ `H`
1632
+ ],
1633
+ FI: [`H`],
1634
+ FJ: [
1635
+ `h`,
1636
+ `hb`,
1637
+ `H`,
1638
+ `hB`
1639
+ ],
1640
+ FK: [
1641
+ `H`,
1642
+ `h`,
1643
+ `hb`,
1644
+ `hB`
1645
+ ],
1646
+ FM: [
1647
+ `h`,
1648
+ `hb`,
1649
+ `H`,
1650
+ `hB`
1651
+ ],
1652
+ FO: [`H`, `h`],
1653
+ FR: [`H`, `hB`],
1654
+ GA: [`H`, `hB`],
1655
+ GB: [
1656
+ `H`,
1657
+ `h`,
1658
+ `hb`,
1659
+ `hB`
1660
+ ],
1661
+ GD: [
1662
+ `h`,
1663
+ `hb`,
1664
+ `H`,
1665
+ `hB`
1666
+ ],
1667
+ GE: [
1668
+ `H`,
1669
+ `hB`,
1670
+ `h`
1671
+ ],
1672
+ GF: [`H`, `hB`],
1673
+ GG: [
1674
+ `H`,
1675
+ `h`,
1676
+ `hb`,
1677
+ `hB`
1678
+ ],
1679
+ GH: [`h`, `H`],
1680
+ GI: [
1681
+ `H`,
1682
+ `h`,
1683
+ `hb`,
1684
+ `hB`
1685
+ ],
1686
+ GL: [`H`, `h`],
1687
+ GM: [
1688
+ `h`,
1689
+ `hb`,
1690
+ `H`,
1691
+ `hB`
1692
+ ],
1693
+ GN: [`H`, `hB`],
1694
+ GP: [`H`, `hB`],
1695
+ GQ: [
1696
+ `H`,
1697
+ `hB`,
1698
+ `h`,
1699
+ `hb`
1700
+ ],
1701
+ GR: [
1702
+ `h`,
1703
+ `H`,
1704
+ `hb`,
1705
+ `hB`
1706
+ ],
1707
+ GT: [
1708
+ `h`,
1709
+ `H`,
1710
+ `hB`,
1711
+ `hb`
1712
+ ],
1713
+ GU: [
1714
+ `h`,
1715
+ `hb`,
1716
+ `H`,
1717
+ `hB`
1718
+ ],
1719
+ GW: [`H`, `hB`],
1720
+ GY: [
1721
+ `h`,
1722
+ `hb`,
1723
+ `H`,
1724
+ `hB`
1725
+ ],
1726
+ HK: [
1727
+ `h`,
1728
+ `hB`,
1729
+ `hb`,
1730
+ `H`
1731
+ ],
1732
+ HN: [
1733
+ `h`,
1734
+ `H`,
1735
+ `hB`,
1736
+ `hb`
1737
+ ],
1738
+ HR: [`H`, `hB`],
1739
+ HU: [`H`, `h`],
1740
+ IC: [
1741
+ `H`,
1742
+ `h`,
1743
+ `hB`,
1744
+ `hb`
1745
+ ],
1746
+ ID: [`H`],
1747
+ IE: [
1748
+ `H`,
1749
+ `h`,
1750
+ `hb`,
1751
+ `hB`
1752
+ ],
1753
+ IL: [`H`, `hB`],
1754
+ IM: [
1755
+ `H`,
1756
+ `h`,
1757
+ `hb`,
1758
+ `hB`
1759
+ ],
1760
+ IN: [`h`, `H`],
1761
+ IO: [
1762
+ `H`,
1763
+ `h`,
1764
+ `hb`,
1765
+ `hB`
1766
+ ],
1767
+ IQ: [
1768
+ `h`,
1769
+ `hB`,
1770
+ `hb`,
1771
+ `H`
1772
+ ],
1773
+ IR: [`hB`, `H`],
1774
+ IS: [`H`],
1775
+ IT: [`H`, `hB`],
1776
+ JE: [
1777
+ `H`,
1778
+ `h`,
1779
+ `hb`,
1780
+ `hB`
1781
+ ],
1782
+ JM: [
1783
+ `h`,
1784
+ `hb`,
1785
+ `H`,
1786
+ `hB`
1787
+ ],
1788
+ JO: [
1789
+ `h`,
1790
+ `hB`,
1791
+ `hb`,
1792
+ `H`
1793
+ ],
1794
+ JP: [
1795
+ `H`,
1796
+ `K`,
1797
+ `h`
1798
+ ],
1799
+ KE: [
1800
+ `hB`,
1801
+ `hb`,
1802
+ `H`,
1803
+ `h`
1804
+ ],
1805
+ KG: [
1806
+ `H`,
1807
+ `h`,
1808
+ `hB`,
1809
+ `hb`
1810
+ ],
1811
+ KH: [
1812
+ `hB`,
1813
+ `h`,
1814
+ `H`,
1815
+ `hb`
1816
+ ],
1817
+ KI: [
1818
+ `h`,
1819
+ `hb`,
1820
+ `H`,
1821
+ `hB`
1822
+ ],
1823
+ KM: [
1824
+ `H`,
1825
+ `h`,
1826
+ `hB`,
1827
+ `hb`
1828
+ ],
1829
+ KN: [
1830
+ `h`,
1831
+ `hb`,
1832
+ `H`,
1833
+ `hB`
1834
+ ],
1835
+ KP: [
1836
+ `h`,
1837
+ `H`,
1838
+ `hB`,
1839
+ `hb`
1840
+ ],
1841
+ KR: [
1842
+ `h`,
1843
+ `H`,
1844
+ `hB`,
1845
+ `hb`
1846
+ ],
1847
+ KW: [
1848
+ `h`,
1849
+ `hB`,
1850
+ `hb`,
1851
+ `H`
1852
+ ],
1853
+ KY: [
1854
+ `h`,
1855
+ `hb`,
1856
+ `H`,
1857
+ `hB`
1858
+ ],
1859
+ KZ: [`H`, `hB`],
1860
+ LA: [
1861
+ `H`,
1862
+ `hb`,
1863
+ `hB`,
1864
+ `h`
1865
+ ],
1866
+ LB: [
1867
+ `h`,
1868
+ `hB`,
1869
+ `hb`,
1870
+ `H`
1871
+ ],
1872
+ LC: [
1873
+ `h`,
1874
+ `hb`,
1875
+ `H`,
1876
+ `hB`
1877
+ ],
1878
+ LI: [
1879
+ `H`,
1880
+ `hB`,
1881
+ `h`
1882
+ ],
1883
+ LK: [
1884
+ `H`,
1885
+ `h`,
1886
+ `hB`,
1887
+ `hb`
1888
+ ],
1889
+ LR: [
1890
+ `h`,
1891
+ `hb`,
1892
+ `H`,
1893
+ `hB`
1894
+ ],
1895
+ LS: [`h`, `H`],
1896
+ LT: [
1897
+ `H`,
1898
+ `h`,
1899
+ `hb`,
1900
+ `hB`
1901
+ ],
1902
+ LU: [
1903
+ `H`,
1904
+ `h`,
1905
+ `hB`
1906
+ ],
1907
+ LV: [
1908
+ `H`,
1909
+ `hB`,
1910
+ `hb`,
1911
+ `h`
1912
+ ],
1913
+ LY: [
1914
+ `h`,
1915
+ `hB`,
1916
+ `hb`,
1917
+ `H`
1918
+ ],
1919
+ MA: [
1920
+ `H`,
1921
+ `h`,
1922
+ `hB`,
1923
+ `hb`
1924
+ ],
1925
+ MC: [`H`, `hB`],
1926
+ MD: [`H`, `hB`],
1927
+ ME: [
1928
+ `H`,
1929
+ `hB`,
1930
+ `h`
1931
+ ],
1932
+ MF: [`H`, `hB`],
1933
+ MG: [`H`, `h`],
1934
+ MH: [
1935
+ `h`,
1936
+ `hb`,
1937
+ `H`,
1938
+ `hB`
1939
+ ],
1940
+ MK: [
1941
+ `H`,
1942
+ `h`,
1943
+ `hb`,
1944
+ `hB`
1945
+ ],
1946
+ ML: [`H`],
1947
+ MM: [
1948
+ `hB`,
1949
+ `hb`,
1950
+ `H`,
1951
+ `h`
1952
+ ],
1953
+ MN: [
1954
+ `H`,
1955
+ `h`,
1956
+ `hb`,
1957
+ `hB`
1958
+ ],
1959
+ MO: [
1960
+ `h`,
1961
+ `hB`,
1962
+ `hb`,
1963
+ `H`
1964
+ ],
1965
+ MP: [
1966
+ `h`,
1967
+ `hb`,
1968
+ `H`,
1969
+ `hB`
1970
+ ],
1971
+ MQ: [`H`, `hB`],
1972
+ MR: [
1973
+ `h`,
1974
+ `hB`,
1975
+ `hb`,
1976
+ `H`
1977
+ ],
1978
+ MS: [
1979
+ `H`,
1980
+ `h`,
1981
+ `hb`,
1982
+ `hB`
1983
+ ],
1984
+ MT: [`H`, `h`],
1985
+ MU: [`H`, `h`],
1986
+ MV: [`H`, `h`],
1987
+ MW: [
1988
+ `h`,
1989
+ `hb`,
1990
+ `H`,
1991
+ `hB`
1992
+ ],
1993
+ MX: [
1994
+ `h`,
1995
+ `H`,
1996
+ `hB`,
1997
+ `hb`
1998
+ ],
1999
+ MY: [
2000
+ `hb`,
2001
+ `hB`,
2002
+ `h`,
2003
+ `H`
2004
+ ],
2005
+ MZ: [`H`, `hB`],
2006
+ NA: [
2007
+ `h`,
2008
+ `H`,
2009
+ `hB`,
2010
+ `hb`
2011
+ ],
2012
+ NC: [`H`, `hB`],
2013
+ NE: [`H`],
2014
+ NF: [
2015
+ `H`,
2016
+ `h`,
2017
+ `hb`,
2018
+ `hB`
2019
+ ],
2020
+ NG: [
2021
+ `H`,
2022
+ `h`,
2023
+ `hb`,
2024
+ `hB`
2025
+ ],
2026
+ NI: [
2027
+ `h`,
2028
+ `H`,
2029
+ `hB`,
2030
+ `hb`
2031
+ ],
2032
+ NL: [`H`, `hB`],
2033
+ NO: [`H`, `h`],
2034
+ NP: [
2035
+ `H`,
2036
+ `h`,
2037
+ `hB`
2038
+ ],
2039
+ NR: [
2040
+ `H`,
2041
+ `h`,
2042
+ `hb`,
2043
+ `hB`
2044
+ ],
2045
+ NU: [
2046
+ `H`,
2047
+ `h`,
2048
+ `hb`,
2049
+ `hB`
2050
+ ],
2051
+ NZ: [
2052
+ `h`,
2053
+ `hb`,
2054
+ `H`,
2055
+ `hB`
2056
+ ],
2057
+ OM: [
2058
+ `h`,
2059
+ `hB`,
2060
+ `hb`,
2061
+ `H`
2062
+ ],
2063
+ PA: [
2064
+ `h`,
2065
+ `H`,
2066
+ `hB`,
2067
+ `hb`
2068
+ ],
2069
+ PE: [
2070
+ `h`,
2071
+ `H`,
2072
+ `hB`,
2073
+ `hb`
2074
+ ],
2075
+ PF: [
2076
+ `H`,
2077
+ `h`,
2078
+ `hB`
2079
+ ],
2080
+ PG: [`h`, `H`],
2081
+ PH: [
2082
+ `h`,
2083
+ `hB`,
2084
+ `hb`,
2085
+ `H`
2086
+ ],
2087
+ PK: [
2088
+ `h`,
2089
+ `hB`,
2090
+ `H`
2091
+ ],
2092
+ PL: [`H`, `h`],
2093
+ PM: [`H`, `hB`],
2094
+ PN: [
2095
+ `H`,
2096
+ `h`,
2097
+ `hb`,
2098
+ `hB`
2099
+ ],
2100
+ PR: [
2101
+ `h`,
2102
+ `H`,
2103
+ `hB`,
2104
+ `hb`
2105
+ ],
2106
+ PS: [
2107
+ `h`,
2108
+ `hB`,
2109
+ `hb`,
2110
+ `H`
2111
+ ],
2112
+ PT: [`H`, `hB`],
2113
+ PW: [`h`, `H`],
2114
+ PY: [
2115
+ `h`,
2116
+ `H`,
2117
+ `hB`,
2118
+ `hb`
2119
+ ],
2120
+ QA: [
2121
+ `h`,
2122
+ `hB`,
2123
+ `hb`,
2124
+ `H`
2125
+ ],
2126
+ RE: [`H`, `hB`],
2127
+ RO: [`H`, `hB`],
2128
+ RS: [
2129
+ `H`,
2130
+ `hB`,
2131
+ `h`
2132
+ ],
2133
+ RU: [`H`],
2134
+ RW: [`H`, `h`],
2135
+ SA: [
2136
+ `h`,
2137
+ `hB`,
2138
+ `hb`,
2139
+ `H`
2140
+ ],
2141
+ SB: [
2142
+ `h`,
2143
+ `hb`,
2144
+ `H`,
2145
+ `hB`
2146
+ ],
2147
+ SC: [
2148
+ `H`,
2149
+ `h`,
2150
+ `hB`
2151
+ ],
2152
+ SD: [
2153
+ `h`,
2154
+ `hB`,
2155
+ `hb`,
2156
+ `H`
2157
+ ],
2158
+ SE: [`H`],
2159
+ SG: [
2160
+ `h`,
2161
+ `hb`,
2162
+ `H`,
2163
+ `hB`
2164
+ ],
2165
+ SH: [
2166
+ `H`,
2167
+ `h`,
2168
+ `hb`,
2169
+ `hB`
2170
+ ],
2171
+ SI: [`H`, `hB`],
2172
+ SJ: [`H`],
2173
+ SK: [`H`],
2174
+ SL: [
2175
+ `h`,
2176
+ `hb`,
2177
+ `H`,
2178
+ `hB`
2179
+ ],
2180
+ SM: [
2181
+ `H`,
2182
+ `h`,
2183
+ `hB`
2184
+ ],
2185
+ SN: [
2186
+ `H`,
2187
+ `h`,
2188
+ `hB`
2189
+ ],
2190
+ SO: [`h`, `H`],
2191
+ SR: [`H`, `hB`],
2192
+ SS: [
2193
+ `h`,
2194
+ `hb`,
2195
+ `H`,
2196
+ `hB`
2197
+ ],
2198
+ ST: [`H`, `hB`],
2199
+ SV: [
2200
+ `h`,
2201
+ `H`,
2202
+ `hB`,
2203
+ `hb`
2204
+ ],
2205
+ SX: [
2206
+ `H`,
2207
+ `h`,
2208
+ `hb`,
2209
+ `hB`
2210
+ ],
2211
+ SY: [
2212
+ `h`,
2213
+ `hB`,
2214
+ `hb`,
2215
+ `H`
2216
+ ],
2217
+ SZ: [
2218
+ `h`,
2219
+ `hb`,
2220
+ `H`,
2221
+ `hB`
2222
+ ],
2223
+ TA: [
2224
+ `H`,
2225
+ `h`,
2226
+ `hb`,
2227
+ `hB`
2228
+ ],
2229
+ TC: [
2230
+ `h`,
2231
+ `hb`,
2232
+ `H`,
2233
+ `hB`
2234
+ ],
2235
+ TD: [
2236
+ `h`,
2237
+ `H`,
2238
+ `hB`
2239
+ ],
2240
+ TF: [
2241
+ `H`,
2242
+ `h`,
2243
+ `hB`
2244
+ ],
2245
+ TG: [`H`, `hB`],
2246
+ TH: [`H`, `h`],
2247
+ TJ: [`H`, `h`],
2248
+ TL: [
2249
+ `H`,
2250
+ `hB`,
2251
+ `hb`,
2252
+ `h`
2253
+ ],
2254
+ TM: [`H`, `h`],
2255
+ TN: [
2256
+ `h`,
2257
+ `hB`,
2258
+ `hb`,
2259
+ `H`
2260
+ ],
2261
+ TO: [`h`, `H`],
2262
+ TR: [`H`, `hB`],
2263
+ TT: [
2264
+ `h`,
2265
+ `hb`,
2266
+ `H`,
2267
+ `hB`
2268
+ ],
2269
+ TW: [
2270
+ `hB`,
2271
+ `hb`,
2272
+ `h`,
2273
+ `H`
2274
+ ],
2275
+ TZ: [
2276
+ `hB`,
2277
+ `hb`,
2278
+ `H`,
2279
+ `h`
2280
+ ],
2281
+ UA: [
2282
+ `H`,
2283
+ `hB`,
2284
+ `h`
2285
+ ],
2286
+ UG: [
2287
+ `hB`,
2288
+ `hb`,
2289
+ `H`,
2290
+ `h`
2291
+ ],
2292
+ UM: [
2293
+ `h`,
2294
+ `hb`,
2295
+ `H`,
2296
+ `hB`
2297
+ ],
2298
+ US: [
2299
+ `h`,
2300
+ `hb`,
2301
+ `H`,
2302
+ `hB`
2303
+ ],
2304
+ UY: [
2305
+ `h`,
2306
+ `H`,
2307
+ `hB`,
2308
+ `hb`
2309
+ ],
2310
+ UZ: [
2311
+ `H`,
2312
+ `hB`,
2313
+ `h`
2314
+ ],
2315
+ VA: [
2316
+ `H`,
2317
+ `h`,
2318
+ `hB`
2319
+ ],
2320
+ VC: [
2321
+ `h`,
2322
+ `hb`,
2323
+ `H`,
2324
+ `hB`
2325
+ ],
2326
+ VE: [
2327
+ `h`,
2328
+ `H`,
2329
+ `hB`,
2330
+ `hb`
2331
+ ],
2332
+ VG: [
2333
+ `h`,
2334
+ `hb`,
2335
+ `H`,
2336
+ `hB`
2337
+ ],
2338
+ VI: [
2339
+ `h`,
2340
+ `hb`,
2341
+ `H`,
2342
+ `hB`
2343
+ ],
2344
+ VN: [`H`, `h`],
2345
+ VU: [`h`, `H`],
2346
+ WF: [`H`, `hB`],
2347
+ WS: [`h`, `H`],
2348
+ XK: [
2349
+ `H`,
2350
+ `hB`,
2351
+ `h`
2352
+ ],
2353
+ YE: [
2354
+ `h`,
2355
+ `hB`,
2356
+ `hb`,
2357
+ `H`
2358
+ ],
2359
+ YT: [`H`, `hB`],
2360
+ ZA: [
2361
+ `H`,
2362
+ `h`,
2363
+ `hb`,
2364
+ `hB`
2365
+ ],
2366
+ ZM: [
2367
+ `h`,
2368
+ `hb`,
2369
+ `H`,
2370
+ `hB`
2371
+ ],
2372
+ ZW: [`H`, `h`],
2373
+ "af-ZA": [
2374
+ `H`,
2375
+ `h`,
2376
+ `hB`,
2377
+ `hb`
2378
+ ],
2379
+ "ar-001": [
2380
+ `h`,
2381
+ `hB`,
2382
+ `hb`,
2383
+ `H`
2384
+ ],
2385
+ "ca-ES": [
2386
+ `H`,
2387
+ `h`,
2388
+ `hB`
2389
+ ],
2390
+ "en-001": [
2391
+ `h`,
2392
+ `hb`,
2393
+ `H`,
2394
+ `hB`
2395
+ ],
2396
+ "en-HK": [
2397
+ `h`,
2398
+ `hb`,
2399
+ `H`,
2400
+ `hB`
2401
+ ],
2402
+ "en-IL": [
2403
+ `H`,
2404
+ `h`,
2405
+ `hb`,
2406
+ `hB`
2407
+ ],
2408
+ "en-MY": [
2409
+ `h`,
2410
+ `hb`,
2411
+ `H`,
2412
+ `hB`
2413
+ ],
2414
+ "es-BR": [
2415
+ `H`,
2416
+ `h`,
2417
+ `hB`,
2418
+ `hb`
2419
+ ],
2420
+ "es-ES": [
2421
+ `H`,
2422
+ `h`,
2423
+ `hB`,
2424
+ `hb`
2425
+ ],
2426
+ "es-GQ": [
2427
+ `H`,
2428
+ `h`,
2429
+ `hB`,
2430
+ `hb`
2431
+ ],
2432
+ "fr-CA": [
2433
+ `H`,
2434
+ `h`,
2435
+ `hB`
2436
+ ],
2437
+ "gl-ES": [
2438
+ `H`,
2439
+ `h`,
2440
+ `hB`
2441
+ ],
2442
+ "gu-IN": [
2443
+ `hB`,
2444
+ `hb`,
2445
+ `h`,
2446
+ `H`
2447
+ ],
2448
+ "hi-IN": [
2449
+ `hB`,
2450
+ `h`,
2451
+ `H`
2452
+ ],
2453
+ "it-CH": [
2454
+ `H`,
2455
+ `h`,
2456
+ `hB`
2457
+ ],
2458
+ "it-IT": [
2459
+ `H`,
2460
+ `h`,
2461
+ `hB`
2462
+ ],
2463
+ "kn-IN": [
2464
+ `hB`,
2465
+ `h`,
2466
+ `H`
2467
+ ],
2468
+ "ml-IN": [
2469
+ `hB`,
2470
+ `h`,
2471
+ `H`
2472
+ ],
2473
+ "mr-IN": [
2474
+ `hB`,
2475
+ `hb`,
2476
+ `h`,
2477
+ `H`
2478
+ ],
2479
+ "pa-IN": [
2480
+ `hB`,
2481
+ `hb`,
2482
+ `h`,
2483
+ `H`
2484
+ ],
2485
+ "ta-IN": [
2486
+ `hB`,
2487
+ `h`,
2488
+ `hb`,
2489
+ `H`
2490
+ ],
2491
+ "te-IN": [
2492
+ `hB`,
2493
+ `h`,
2494
+ `H`
2495
+ ],
2496
+ "zu-ZA": [
2497
+ `H`,
2498
+ `hB`,
2499
+ `hb`,
2500
+ `h`
2501
+ ]
2502
+ };
2503
+ })), ut = p(((e) => {
2504
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.getBestPattern = n;
2505
+ var t = lt();
2506
+ function n(e, t) {
2507
+ for (var n = ``, i = 0; i < e.length; i++) {
2508
+ var a = e.charAt(i);
2509
+ if (a === `j`) {
2510
+ for (var o = 0; i + 1 < e.length && e.charAt(i + 1) === a;) o++, i++;
2511
+ var s = 1 + (o & 1), c = o < 2 ? 1 : 3 + (o >> 1), l = `a`, u = r(t);
2512
+ for ((u == `H` || u == `k`) && (c = 0); c-- > 0;) n += l;
2513
+ for (; s-- > 0;) n = u + n;
2514
+ } else a === `J` ? n += `H` : n += a;
2515
+ }
2516
+ return n;
2517
+ }
2518
+ function r(e) {
2519
+ var n = e.hourCycle;
2520
+ if (n === void 0 && e.hourCycles && e.hourCycles.length && (n = e.hourCycles[0]), n) switch (n) {
2521
+ case `h24`: return `k`;
2522
+ case `h23`: return `H`;
2523
+ case `h12`: return `h`;
2524
+ case `h11`: return `K`;
2525
+ default: throw Error(`Invalid hourCycle`);
2526
+ }
2527
+ var r = e.language, i;
2528
+ return r !== `root` && (i = e.maximize().region), (t.timeData[i || ``] || t.timeData[r || ``] || t.timeData[`${r}-001`] || t.timeData[`001`])[0];
2529
+ }
2530
+ })), dt = p(((e) => {
2531
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.Parser = void 0;
2532
+ var t = (V(), g(P)), n = rt(), r = H(), i = it(), a = ct(), o = ut(), s = RegExp(`^${i.SPACE_SEPARATOR_REGEX.source}*`), c = RegExp(`${i.SPACE_SEPARATOR_REGEX.source}*\$`);
2533
+ function l(e, t) {
2534
+ return {
2535
+ start: e,
2536
+ end: t
2537
+ };
2538
+ }
2539
+ var u = !!String.prototype.startsWith && `_a`.startsWith(`a`, 1), d = !!String.fromCodePoint, f = !!Object.fromEntries, p = !!String.prototype.codePointAt, m = !!String.prototype.trimStart, h = !!String.prototype.trimEnd, _ = Number.isSafeInteger ? Number.isSafeInteger : function(e) {
2540
+ return typeof e == `number` && isFinite(e) && Math.floor(e) === e && Math.abs(e) <= 9007199254740991;
2541
+ }, v = !0;
2542
+ try {
2543
+ v = C(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`).exec(`a`)?.[0] === `a`;
2544
+ } catch {
2545
+ v = !1;
2546
+ }
2547
+ var y = u ? function(e, t, n) {
2548
+ return e.startsWith(t, n);
2549
+ } : function(e, t, n) {
2550
+ return e.slice(n, n + t.length) === t;
2551
+ }, b = d ? String.fromCodePoint : function() {
2552
+ for (var e = [...arguments], t = ``, n = e.length, r = 0, i; n > r;) {
2553
+ if (i = e[r++], i > 1114111) throw RangeError(i + ` is not a valid code point`);
2554
+ t += i < 65536 ? String.fromCharCode(i) : String.fromCharCode(((i -= 65536) >> 10) + 55296, i % 1024 + 56320);
2555
+ }
2556
+ return t;
2557
+ }, ee = f ? Object.fromEntries : function(e) {
2558
+ for (var t = {}, n = 0, r = e; n < r.length; n++) {
2559
+ var i = r[n], a = i[0];
2560
+ t[a] = i[1];
2561
+ }
2562
+ return t;
2563
+ }, x = p ? function(e, t) {
2564
+ return e.codePointAt(t);
2565
+ } : function(e, t) {
2566
+ var n = e.length;
2567
+ if (!(t < 0 || t >= n)) {
2568
+ var r = e.charCodeAt(t), i;
2569
+ return r < 55296 || r > 56319 || t + 1 === n || (i = e.charCodeAt(t + 1)) < 56320 || i > 57343 ? r : (r - 55296 << 10) + (i - 56320) + 65536;
2570
+ }
2571
+ }, S = m ? function(e) {
2572
+ return e.trimStart();
2573
+ } : function(e) {
2574
+ return e.replace(s, ``);
2575
+ }, te = h ? function(e) {
2576
+ return e.trimEnd();
2577
+ } : function(e) {
2578
+ return e.replace(c, ``);
2579
+ };
2580
+ function C(e, t) {
2581
+ return new RegExp(e, t);
2582
+ }
2583
+ var w;
2584
+ if (v) {
2585
+ var T = C(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`);
2586
+ w = function(e, t) {
2587
+ return T.lastIndex = t, T.exec(e)[1] ?? ``;
2588
+ };
2589
+ } else w = function(e, t) {
2590
+ for (var n = [];;) {
2591
+ var r = x(e, t);
2592
+ if (r === void 0 || k(r) || A(r)) break;
2593
+ n.push(r), t += r >= 65536 ? 2 : 1;
2594
+ }
2595
+ return b.apply(void 0, n);
2596
+ };
2597
+ e.Parser = function() {
2598
+ function e(e, t) {
2599
+ t === void 0 && (t = {}), this.message = e, this.position = {
2600
+ offset: 0,
2601
+ line: 1,
2602
+ column: 1
2603
+ }, this.ignoreTag = !!t.ignoreTag, this.locale = t.locale, this.requiresOtherClause = !!t.requiresOtherClause, this.shouldParseSkeletons = !!t.shouldParseSkeletons;
2604
+ }
2605
+ return e.prototype.parse = function() {
2606
+ if (this.offset() !== 0) throw Error(`parser can only be used once`);
2607
+ return this.parseMessage(0, ``, !1);
2608
+ }, e.prototype.parseMessage = function(e, t, i) {
2609
+ for (var a = []; !this.isEOF();) {
2610
+ var o = this.char();
2611
+ if (o === 123) {
2612
+ var s = this.parseArgument(e, i);
2613
+ if (s.err) return s;
2614
+ a.push(s.val);
2615
+ } else if (o === 125 && e > 0) break;
2616
+ else if (o === 35 && (t === `plural` || t === `selectordinal`)) {
2617
+ var c = this.clonePosition();
2618
+ this.bump(), a.push({
2619
+ type: r.TYPE.pound,
2620
+ location: l(c, this.clonePosition())
2621
+ });
2622
+ } else if (o === 60 && !this.ignoreTag && this.peek() === 47) {
2623
+ if (i) break;
2624
+ return this.error(n.ErrorKind.UNMATCHED_CLOSING_TAG, l(this.clonePosition(), this.clonePosition()));
2625
+ } else if (o === 60 && !this.ignoreTag && E(this.peek() || 0)) {
2626
+ var s = this.parseTag(e, t);
2627
+ if (s.err) return s;
2628
+ a.push(s.val);
2629
+ } else {
2630
+ var s = this.parseLiteral(e, t);
2631
+ if (s.err) return s;
2632
+ a.push(s.val);
2633
+ }
2634
+ }
2635
+ return {
2636
+ val: a,
2637
+ err: null
2638
+ };
2639
+ }, e.prototype.parseTag = function(e, t) {
2640
+ var i = this.clonePosition();
2641
+ this.bump();
2642
+ var a = this.parseTagName();
2643
+ if (this.bumpSpace(), this.bumpIf(`/>`)) return {
2644
+ val: {
2645
+ type: r.TYPE.literal,
2646
+ value: `<${a}/>`,
2647
+ location: l(i, this.clonePosition())
2648
+ },
2649
+ err: null
2650
+ };
2651
+ if (this.bumpIf(`>`)) {
2652
+ var o = this.parseMessage(e + 1, t, !0);
2653
+ if (o.err) return o;
2654
+ var s = o.val, c = this.clonePosition();
2655
+ if (this.bumpIf(`</`)) {
2656
+ if (this.isEOF() || !E(this.char())) return this.error(n.ErrorKind.INVALID_TAG, l(c, this.clonePosition()));
2657
+ var u = this.clonePosition();
2658
+ return a === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? {
2659
+ val: {
2660
+ type: r.TYPE.tag,
2661
+ value: a,
2662
+ children: s,
2663
+ location: l(i, this.clonePosition())
2664
+ },
2665
+ err: null
2666
+ } : this.error(n.ErrorKind.INVALID_TAG, l(c, this.clonePosition()))) : this.error(n.ErrorKind.UNMATCHED_CLOSING_TAG, l(u, this.clonePosition()));
2667
+ } else return this.error(n.ErrorKind.UNCLOSED_TAG, l(i, this.clonePosition()));
2668
+ } else return this.error(n.ErrorKind.INVALID_TAG, l(i, this.clonePosition()));
2669
+ }, e.prototype.parseTagName = function() {
2670
+ var e = this.offset();
2671
+ for (this.bump(); !this.isEOF() && O(this.char());) this.bump();
2672
+ return this.message.slice(e, this.offset());
2673
+ }, e.prototype.parseLiteral = function(e, t) {
2674
+ for (var n = this.clonePosition(), i = ``;;) {
2675
+ var a = this.tryParseQuote(t);
2676
+ if (a) {
2677
+ i += a;
2678
+ continue;
2679
+ }
2680
+ var o = this.tryParseUnquoted(e, t);
2681
+ if (o) {
2682
+ i += o;
2683
+ continue;
2684
+ }
2685
+ var s = this.tryParseLeftAngleBracket();
2686
+ if (s) {
2687
+ i += s;
2688
+ continue;
2689
+ }
2690
+ break;
2691
+ }
2692
+ var c = l(n, this.clonePosition());
2693
+ return {
2694
+ val: {
2695
+ type: r.TYPE.literal,
2696
+ value: i,
2697
+ location: c
2698
+ },
2699
+ err: null
2700
+ };
2701
+ }, e.prototype.tryParseLeftAngleBracket = function() {
2702
+ return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !D(this.peek() || 0)) ? (this.bump(), `<`) : null;
2703
+ }, e.prototype.tryParseQuote = function(e) {
2704
+ if (this.isEOF() || this.char() !== 39) return null;
2705
+ switch (this.peek()) {
2706
+ case 39: return this.bump(), this.bump(), `'`;
2707
+ case 123:
2708
+ case 60:
2709
+ case 62:
2710
+ case 125: break;
2711
+ case 35:
2712
+ if (e === `plural` || e === `selectordinal`) break;
2713
+ return null;
2714
+ default: return null;
2715
+ }
2716
+ this.bump();
2717
+ var t = [this.char()];
2718
+ for (this.bump(); !this.isEOF();) {
2719
+ var n = this.char();
2720
+ if (n === 39) if (this.peek() === 39) t.push(39), this.bump();
2721
+ else {
2722
+ this.bump();
2723
+ break;
2724
+ }
2725
+ else t.push(n);
2726
+ this.bump();
2727
+ }
2728
+ return b.apply(void 0, t);
2729
+ }, e.prototype.tryParseUnquoted = function(e, t) {
2730
+ if (this.isEOF()) return null;
2731
+ var n = this.char();
2732
+ return n === 60 || n === 123 || n === 35 && (t === `plural` || t === `selectordinal`) || n === 125 && e > 0 ? null : (this.bump(), b(n));
2733
+ }, e.prototype.parseArgument = function(e, t) {
2734
+ var i = this.clonePosition();
2735
+ if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(n.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, l(i, this.clonePosition()));
2736
+ if (this.char() === 125) return this.bump(), this.error(n.ErrorKind.EMPTY_ARGUMENT, l(i, this.clonePosition()));
2737
+ var a = this.parseIdentifierIfPossible().value;
2738
+ if (!a) return this.error(n.ErrorKind.MALFORMED_ARGUMENT, l(i, this.clonePosition()));
2739
+ if (this.bumpSpace(), this.isEOF()) return this.error(n.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, l(i, this.clonePosition()));
2740
+ switch (this.char()) {
2741
+ case 125: return this.bump(), {
2742
+ val: {
2743
+ type: r.TYPE.argument,
2744
+ value: a,
2745
+ location: l(i, this.clonePosition())
2746
+ },
2747
+ err: null
2748
+ };
2749
+ case 44: return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(n.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, l(i, this.clonePosition())) : this.parseArgumentOptions(e, t, a, i);
2750
+ default: return this.error(n.ErrorKind.MALFORMED_ARGUMENT, l(i, this.clonePosition()));
2751
+ }
2752
+ }, e.prototype.parseIdentifierIfPossible = function() {
2753
+ var e = this.clonePosition(), t = this.offset(), n = w(this.message, t), r = t + n.length;
2754
+ return this.bumpTo(r), {
2755
+ value: n,
2756
+ location: l(e, this.clonePosition())
2757
+ };
2758
+ }, e.prototype.parseArgumentOptions = function(e, i, s, c) {
2759
+ var u = this.clonePosition(), d = this.parseIdentifierIfPossible().value, f = this.clonePosition();
2760
+ switch (d) {
2761
+ case ``: return this.error(n.ErrorKind.EXPECT_ARGUMENT_TYPE, l(u, f));
2762
+ case `number`:
2763
+ case `date`:
2764
+ case `time`:
2765
+ this.bumpSpace();
2766
+ var p = null;
2767
+ if (this.bumpIf(`,`)) {
2768
+ this.bumpSpace();
2769
+ var m = this.clonePosition(), h = this.parseSimpleArgStyleIfPossible();
2770
+ if (h.err) return h;
2771
+ var g = te(h.val);
2772
+ if (g.length === 0) return this.error(n.ErrorKind.EXPECT_ARGUMENT_STYLE, l(this.clonePosition(), this.clonePosition()));
2773
+ p = {
2774
+ style: g,
2775
+ styleLocation: l(m, this.clonePosition())
2776
+ };
2777
+ }
2778
+ var _ = this.tryParseArgumentClose(c);
2779
+ if (_.err) return _;
2780
+ var v = l(c, this.clonePosition());
2781
+ if (p && y(p?.style, `::`, 0)) {
2782
+ var b = S(p.style.slice(2));
2783
+ if (d === `number`) {
2784
+ var h = this.parseNumberSkeletonFromString(b, p.styleLocation);
2785
+ return h.err ? h : {
2786
+ val: {
2787
+ type: r.TYPE.number,
2788
+ value: s,
2789
+ location: v,
2790
+ style: h.val
2791
+ },
2792
+ err: null
2793
+ };
2794
+ } else {
2795
+ if (b.length === 0) return this.error(n.ErrorKind.EXPECT_DATE_TIME_SKELETON, v);
2796
+ var x = b;
2797
+ this.locale && (x = (0, o.getBestPattern)(b, this.locale));
2798
+ var g = {
2799
+ type: r.SKELETON_TYPE.dateTime,
2800
+ pattern: x,
2801
+ location: p.styleLocation,
2802
+ parsedOptions: this.shouldParseSkeletons ? (0, a.parseDateTimeSkeleton)(x) : {}
2803
+ };
2804
+ return {
2805
+ val: {
2806
+ type: d === `date` ? r.TYPE.date : r.TYPE.time,
2807
+ value: s,
2808
+ location: v,
2809
+ style: g
2810
+ },
2811
+ err: null
2812
+ };
2813
+ }
2814
+ }
2815
+ return {
2816
+ val: {
2817
+ type: d === `number` ? r.TYPE.number : d === `date` ? r.TYPE.date : r.TYPE.time,
2818
+ value: s,
2819
+ location: v,
2820
+ style: p?.style ?? null
2821
+ },
2822
+ err: null
2823
+ };
2824
+ case `plural`:
2825
+ case `selectordinal`:
2826
+ case `select`:
2827
+ var C = this.clonePosition();
2828
+ if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(n.ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, l(C, t.__assign({}, C)));
2829
+ this.bumpSpace();
2830
+ var w = this.parseIdentifierIfPossible(), T = 0;
2831
+ if (d !== `select` && w.value === `offset`) {
2832
+ if (!this.bumpIf(`:`)) return this.error(n.ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, l(this.clonePosition(), this.clonePosition()));
2833
+ this.bumpSpace();
2834
+ var h = this.tryParseDecimalInteger(n.ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, n.ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
2835
+ if (h.err) return h;
2836
+ this.bumpSpace(), w = this.parseIdentifierIfPossible(), T = h.val;
2837
+ }
2838
+ var E = this.tryParsePluralOrSelectOptions(e, d, i, w);
2839
+ if (E.err) return E;
2840
+ var _ = this.tryParseArgumentClose(c);
2841
+ if (_.err) return _;
2842
+ var D = l(c, this.clonePosition());
2843
+ return d === `select` ? {
2844
+ val: {
2845
+ type: r.TYPE.select,
2846
+ value: s,
2847
+ options: ee(E.val),
2848
+ location: D
2849
+ },
2850
+ err: null
2851
+ } : {
2852
+ val: {
2853
+ type: r.TYPE.plural,
2854
+ value: s,
2855
+ options: ee(E.val),
2856
+ offset: T,
2857
+ pluralType: d === `plural` ? `cardinal` : `ordinal`,
2858
+ location: D
2859
+ },
2860
+ err: null
2861
+ };
2862
+ default: return this.error(n.ErrorKind.INVALID_ARGUMENT_TYPE, l(u, f));
2863
+ }
2864
+ }, e.prototype.tryParseArgumentClose = function(e) {
2865
+ return this.isEOF() || this.char() !== 125 ? this.error(n.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, l(e, this.clonePosition())) : (this.bump(), {
2866
+ val: !0,
2867
+ err: null
2868
+ });
2869
+ }, e.prototype.parseSimpleArgStyleIfPossible = function() {
2870
+ for (var e = 0, t = this.clonePosition(); !this.isEOF();) switch (this.char()) {
2871
+ case 39:
2872
+ this.bump();
2873
+ var r = this.clonePosition();
2874
+ if (!this.bumpUntil(`'`)) return this.error(n.ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, l(r, this.clonePosition()));
2875
+ this.bump();
2876
+ break;
2877
+ case 123:
2878
+ e += 1, this.bump();
2879
+ break;
2880
+ case 125:
2881
+ if (e > 0) --e;
2882
+ else return {
2883
+ val: this.message.slice(t.offset, this.offset()),
2884
+ err: null
2885
+ };
2886
+ break;
2887
+ default:
2888
+ this.bump();
2889
+ break;
2890
+ }
2891
+ return {
2892
+ val: this.message.slice(t.offset, this.offset()),
2893
+ err: null
2894
+ };
2895
+ }, e.prototype.parseNumberSkeletonFromString = function(e, t) {
2896
+ var i = [];
2897
+ try {
2898
+ i = (0, a.parseNumberSkeletonFromString)(e);
2899
+ } catch {
2900
+ return this.error(n.ErrorKind.INVALID_NUMBER_SKELETON, t);
2901
+ }
2902
+ return {
2903
+ val: {
2904
+ type: r.SKELETON_TYPE.number,
2905
+ tokens: i,
2906
+ location: t,
2907
+ parsedOptions: this.shouldParseSkeletons ? (0, a.parseNumberSkeleton)(i) : {}
2908
+ },
2909
+ err: null
2910
+ };
2911
+ }, e.prototype.tryParsePluralOrSelectOptions = function(e, t, r, i) {
2912
+ for (var a, o = !1, s = [], c = /* @__PURE__ */ new Set(), u = i.value, d = i.location;;) {
2913
+ if (u.length === 0) {
2914
+ var f = this.clonePosition();
2915
+ if (t !== `select` && this.bumpIf(`=`)) {
2916
+ var p = this.tryParseDecimalInteger(n.ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, n.ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);
2917
+ if (p.err) return p;
2918
+ d = l(f, this.clonePosition()), u = this.message.slice(f.offset, this.offset());
2919
+ } else break;
2920
+ }
2921
+ if (c.has(u)) return this.error(t === `select` ? n.ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR : n.ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, d);
2922
+ u === `other` && (o = !0), this.bumpSpace();
2923
+ var m = this.clonePosition();
2924
+ if (!this.bumpIf(`{`)) return this.error(t === `select` ? n.ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : n.ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, l(this.clonePosition(), this.clonePosition()));
2925
+ var h = this.parseMessage(e + 1, t, r);
2926
+ if (h.err) return h;
2927
+ var g = this.tryParseArgumentClose(m);
2928
+ if (g.err) return g;
2929
+ s.push([u, {
2930
+ value: h.val,
2931
+ location: l(m, this.clonePosition())
2932
+ }]), c.add(u), this.bumpSpace(), a = this.parseIdentifierIfPossible(), u = a.value, d = a.location;
2933
+ }
2934
+ return s.length === 0 ? this.error(t === `select` ? n.ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR : n.ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, l(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !o ? this.error(n.ErrorKind.MISSING_OTHER_CLAUSE, l(this.clonePosition(), this.clonePosition())) : {
2935
+ val: s,
2936
+ err: null
2937
+ };
2938
+ }, e.prototype.tryParseDecimalInteger = function(e, t) {
2939
+ var n = 1, r = this.clonePosition();
2940
+ this.bumpIf(`+`) || this.bumpIf(`-`) && (n = -1);
2941
+ for (var i = !1, a = 0; !this.isEOF();) {
2942
+ var o = this.char();
2943
+ if (o >= 48 && o <= 57) i = !0, a = a * 10 + (o - 48), this.bump();
2944
+ else break;
2945
+ }
2946
+ var s = l(r, this.clonePosition());
2947
+ return i ? (a *= n, _(a) ? {
2948
+ val: a,
2949
+ err: null
2950
+ } : this.error(t, s)) : this.error(e, s);
2951
+ }, e.prototype.offset = function() {
2952
+ return this.position.offset;
2953
+ }, e.prototype.isEOF = function() {
2954
+ return this.offset() === this.message.length;
2955
+ }, e.prototype.clonePosition = function() {
2956
+ return {
2957
+ offset: this.position.offset,
2958
+ line: this.position.line,
2959
+ column: this.position.column
2960
+ };
2961
+ }, e.prototype.char = function() {
2962
+ var e = this.position.offset;
2963
+ if (e >= this.message.length) throw Error(`out of bound`);
2964
+ var t = x(this.message, e);
2965
+ if (t === void 0) throw Error(`Offset ${e} is at invalid UTF-16 code unit boundary`);
2966
+ return t;
2967
+ }, e.prototype.error = function(e, t) {
2968
+ return {
2969
+ val: null,
2970
+ err: {
2971
+ kind: e,
2972
+ message: this.message,
2973
+ location: t
2974
+ }
2975
+ };
2976
+ }, e.prototype.bump = function() {
2977
+ if (!this.isEOF()) {
2978
+ var e = this.char();
2979
+ e === 10 ? (this.position.line += 1, this.position.column = 1, this.position.offset += 1) : (this.position.column += 1, this.position.offset += e < 65536 ? 1 : 2);
2980
+ }
2981
+ }, e.prototype.bumpIf = function(e) {
2982
+ if (y(this.message, e, this.offset())) {
2983
+ for (var t = 0; t < e.length; t++) this.bump();
2984
+ return !0;
2985
+ }
2986
+ return !1;
2987
+ }, e.prototype.bumpUntil = function(e) {
2988
+ var t = this.offset(), n = this.message.indexOf(e, t);
2989
+ return n >= 0 ? (this.bumpTo(n), !0) : (this.bumpTo(this.message.length), !1);
2990
+ }, e.prototype.bumpTo = function(e) {
2991
+ if (this.offset() > e) throw Error(`targetOffset ${e} must be greater than or equal to the current offset ${this.offset()}`);
2992
+ for (e = Math.min(e, this.message.length);;) {
2993
+ var t = this.offset();
2994
+ if (t === e) break;
2995
+ if (t > e) throw Error(`targetOffset ${e} is at invalid UTF-16 code unit boundary`);
2996
+ if (this.bump(), this.isEOF()) break;
2997
+ }
2998
+ }, e.prototype.bumpSpace = function() {
2999
+ for (; !this.isEOF() && k(this.char());) this.bump();
3000
+ }, e.prototype.peek = function() {
3001
+ if (this.isEOF()) return null;
3002
+ var e = this.char(), t = this.offset();
3003
+ return this.message.charCodeAt(t + (e >= 65536 ? 2 : 1)) ?? null;
3004
+ }, e;
3005
+ }();
3006
+ function E(e) {
3007
+ return e >= 97 && e <= 122 || e >= 65 && e <= 90;
3008
+ }
3009
+ function D(e) {
3010
+ return E(e) || e === 47;
3011
+ }
3012
+ function O(e) {
3013
+ return e === 45 || e === 46 || e >= 48 && e <= 57 || e === 95 || e >= 97 && e <= 122 || e >= 65 && e <= 90 || e == 183 || e >= 192 && e <= 214 || e >= 216 && e <= 246 || e >= 248 && e <= 893 || e >= 895 && e <= 8191 || e >= 8204 && e <= 8205 || e >= 8255 && e <= 8256 || e >= 8304 && e <= 8591 || e >= 11264 && e <= 12271 || e >= 12289 && e <= 55295 || e >= 63744 && e <= 64975 || e >= 65008 && e <= 65533 || e >= 65536 && e <= 983039;
3014
+ }
3015
+ function k(e) {
3016
+ return e >= 9 && e <= 13 || e === 32 || e === 133 || e >= 8206 && e <= 8207 || e === 8232 || e === 8233;
3017
+ }
3018
+ function A(e) {
3019
+ return e >= 33 && e <= 35 || e === 36 || e >= 37 && e <= 39 || e === 40 || e === 41 || e === 42 || e === 43 || e === 44 || e === 45 || e >= 46 && e <= 47 || e >= 58 && e <= 59 || e >= 60 && e <= 62 || e >= 63 && e <= 64 || e === 91 || e === 92 || e === 93 || e === 94 || e === 96 || e === 123 || e === 124 || e === 125 || e === 126 || e === 161 || e >= 162 && e <= 165 || e === 166 || e === 167 || e === 169 || e === 171 || e === 172 || e === 174 || e === 176 || e === 177 || e === 182 || e === 187 || e === 191 || e === 215 || e === 247 || e >= 8208 && e <= 8213 || e >= 8214 && e <= 8215 || e === 8216 || e === 8217 || e === 8218 || e >= 8219 && e <= 8220 || e === 8221 || e === 8222 || e === 8223 || e >= 8224 && e <= 8231 || e >= 8240 && e <= 8248 || e === 8249 || e === 8250 || e >= 8251 && e <= 8254 || e >= 8257 && e <= 8259 || e === 8260 || e === 8261 || e === 8262 || e >= 8263 && e <= 8273 || e === 8274 || e === 8275 || e >= 8277 && e <= 8286 || e >= 8592 && e <= 8596 || e >= 8597 && e <= 8601 || e >= 8602 && e <= 8603 || e >= 8604 && e <= 8607 || e === 8608 || e >= 8609 && e <= 8610 || e === 8611 || e >= 8612 && e <= 8613 || e === 8614 || e >= 8615 && e <= 8621 || e === 8622 || e >= 8623 && e <= 8653 || e >= 8654 && e <= 8655 || e >= 8656 && e <= 8657 || e === 8658 || e === 8659 || e === 8660 || e >= 8661 && e <= 8691 || e >= 8692 && e <= 8959 || e >= 8960 && e <= 8967 || e === 8968 || e === 8969 || e === 8970 || e === 8971 || e >= 8972 && e <= 8991 || e >= 8992 && e <= 8993 || e >= 8994 && e <= 9e3 || e === 9001 || e === 9002 || e >= 9003 && e <= 9083 || e === 9084 || e >= 9085 && e <= 9114 || e >= 9115 && e <= 9139 || e >= 9140 && e <= 9179 || e >= 9180 && e <= 9185 || e >= 9186 && e <= 9254 || e >= 9255 && e <= 9279 || e >= 9280 && e <= 9290 || e >= 9291 && e <= 9311 || e >= 9472 && e <= 9654 || e === 9655 || e >= 9656 && e <= 9664 || e === 9665 || e >= 9666 && e <= 9719 || e >= 9720 && e <= 9727 || e >= 9728 && e <= 9838 || e === 9839 || e >= 9840 && e <= 10087 || e === 10088 || e === 10089 || e === 10090 || e === 10091 || e === 10092 || e === 10093 || e === 10094 || e === 10095 || e === 10096 || e === 10097 || e === 10098 || e === 10099 || e === 10100 || e === 10101 || e >= 10132 && e <= 10175 || e >= 10176 && e <= 10180 || e === 10181 || e === 10182 || e >= 10183 && e <= 10213 || e === 10214 || e === 10215 || e === 10216 || e === 10217 || e === 10218 || e === 10219 || e === 10220 || e === 10221 || e === 10222 || e === 10223 || e >= 10224 && e <= 10239 || e >= 10240 && e <= 10495 || e >= 10496 && e <= 10626 || e === 10627 || e === 10628 || e === 10629 || e === 10630 || e === 10631 || e === 10632 || e === 10633 || e === 10634 || e === 10635 || e === 10636 || e === 10637 || e === 10638 || e === 10639 || e === 10640 || e === 10641 || e === 10642 || e === 10643 || e === 10644 || e === 10645 || e === 10646 || e === 10647 || e === 10648 || e >= 10649 && e <= 10711 || e === 10712 || e === 10713 || e === 10714 || e === 10715 || e >= 10716 && e <= 10747 || e === 10748 || e === 10749 || e >= 10750 && e <= 11007 || e >= 11008 && e <= 11055 || e >= 11056 && e <= 11076 || e >= 11077 && e <= 11078 || e >= 11079 && e <= 11084 || e >= 11085 && e <= 11123 || e >= 11124 && e <= 11125 || e >= 11126 && e <= 11157 || e === 11158 || e >= 11159 && e <= 11263 || e >= 11776 && e <= 11777 || e === 11778 || e === 11779 || e === 11780 || e === 11781 || e >= 11782 && e <= 11784 || e === 11785 || e === 11786 || e === 11787 || e === 11788 || e === 11789 || e >= 11790 && e <= 11798 || e === 11799 || e >= 11800 && e <= 11801 || e === 11802 || e === 11803 || e === 11804 || e === 11805 || e >= 11806 && e <= 11807 || e === 11808 || e === 11809 || e === 11810 || e === 11811 || e === 11812 || e === 11813 || e === 11814 || e === 11815 || e === 11816 || e === 11817 || e >= 11818 && e <= 11822 || e === 11823 || e >= 11824 && e <= 11833 || e >= 11834 && e <= 11835 || e >= 11836 && e <= 11839 || e === 11840 || e === 11841 || e === 11842 || e >= 11843 && e <= 11855 || e >= 11856 && e <= 11857 || e === 11858 || e >= 11859 && e <= 11903 || e >= 12289 && e <= 12291 || e === 12296 || e === 12297 || e === 12298 || e === 12299 || e === 12300 || e === 12301 || e === 12302 || e === 12303 || e === 12304 || e === 12305 || e >= 12306 && e <= 12307 || e === 12308 || e === 12309 || e === 12310 || e === 12311 || e === 12312 || e === 12313 || e === 12314 || e === 12315 || e === 12316 || e === 12317 || e >= 12318 && e <= 12319 || e === 12320 || e === 12336 || e === 64830 || e === 64831 || e >= 65093 && e <= 65094;
3020
+ }
3021
+ })), ft = p(((e) => {
3022
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.hoistSelectors = s, e.isStructurallySame = l;
3023
+ var t = (V(), g(P)), n = H();
3024
+ function r(e) {
3025
+ return Array.isArray(e) ? t.__spreadArray([], e.map(r), !0) : typeof e == `object` && e ? Object.keys(e).reduce(function(t, n) {
3026
+ return t[n] = r(e[n]), t;
3027
+ }, {}) : e;
3028
+ }
3029
+ function i(e, n, i) {
3030
+ var a = r(n), o = a.options;
3031
+ return a.options = Object.keys(o).reduce(function(n, r) {
3032
+ return n[r] = { value: s(t.__spreadArray(t.__spreadArray(t.__spreadArray([], e.slice(0, i), !0), o[r].value, !0), e.slice(i + 1), !0)) }, n;
3033
+ }, {}), a;
3034
+ }
3035
+ function a(e) {
3036
+ return (0, n.isPluralElement)(e) || (0, n.isSelectElement)(e);
3037
+ }
3038
+ function o(e) {
3039
+ return !!e.find(function(e) {
3040
+ return a(e) ? !0 : (0, n.isTagElement)(e) ? o(e.children) : !1;
3041
+ });
3042
+ }
3043
+ function s(e) {
3044
+ for (var t = 0; t < e.length; t++) {
3045
+ var r = e[t];
3046
+ if (a(r)) return [i(e, r, t)];
3047
+ if ((0, n.isTagElement)(r) && o([r])) throw Error(`Cannot hoist plural/select within a tag element. Please put the tag element inside each plural/select option`);
3048
+ }
3049
+ return e;
3050
+ }
3051
+ function c(e, t) {
3052
+ t === void 0 && (t = /* @__PURE__ */ new Map()), e.forEach(function(e) {
3053
+ if ((0, n.isArgumentElement)(e) || (0, n.isDateElement)(e) || (0, n.isTimeElement)(e) || (0, n.isNumberElement)(e)) {
3054
+ if (e.value in t && t.get(e.value) !== e.type) throw Error(`Variable ${e.value} has conflicting types`);
3055
+ t.set(e.value, e.type);
3056
+ }
3057
+ ((0, n.isPluralElement)(e) || (0, n.isSelectElement)(e)) && (t.set(e.value, e.type), Object.keys(e.options).forEach(function(n) {
3058
+ c(e.options[n].value, t);
3059
+ })), (0, n.isTagElement)(e) && (t.set(e.value, e.type), c(e.children, t));
3060
+ });
3061
+ }
3062
+ function l(e, t) {
3063
+ var r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
3064
+ return c(e, r), c(t, i), r.size === i.size ? Array.from(r.entries()).reduce(function(e, t) {
3065
+ var r = t[0], a = t[1];
3066
+ if (!e.success) return e;
3067
+ var o = i.get(r);
3068
+ return o == null ? {
3069
+ success: !1,
3070
+ error: Error(`Missing variable ${r} in message`)
3071
+ } : o === a ? e : {
3072
+ success: !1,
3073
+ error: Error(`Variable ${r} has conflicting types: ${n.TYPE[a]} vs ${n.TYPE[o]}`)
3074
+ };
3075
+ }, { success: !0 }) : {
3076
+ success: !1,
3077
+ error: Error(`Different number of variables: [${Array.from(r.keys()).join(`, `)}] vs [${Array.from(i.keys()).join(`, `)}]`)
3078
+ };
3079
+ }
3080
+ })), pt = p(((e) => {
3081
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.isStructurallySame = e._Parser = void 0, e.parse = o;
3082
+ var t = (V(), g(P)), n = rt(), r = dt(), i = H();
3083
+ function a(e) {
3084
+ e.forEach(function(e) {
3085
+ if (delete e.location, (0, i.isSelectElement)(e) || (0, i.isPluralElement)(e)) for (var t in e.options) delete e.options[t].location, a(e.options[t].value);
3086
+ else (0, i.isNumberElement)(e) && (0, i.isNumberSkeleton)(e.style) || ((0, i.isDateElement)(e) || (0, i.isTimeElement)(e)) && (0, i.isDateTimeSkeleton)(e.style) ? delete e.style.location : (0, i.isTagElement)(e) && a(e.children);
3087
+ });
3088
+ }
3089
+ function o(e, i) {
3090
+ i === void 0 && (i = {}), i = t.__assign({
3091
+ shouldParseSkeletons: !0,
3092
+ requiresOtherClause: !0
3093
+ }, i);
3094
+ var o = new r.Parser(e, i).parse();
3095
+ if (o.err) {
3096
+ var s = SyntaxError(n.ErrorKind[o.err.kind]);
3097
+ throw s.location = o.err.location, s.originalMessage = o.err.message, s;
3098
+ }
3099
+ return i?.captureLocation || a(o.val), o.val;
3100
+ }
3101
+ t.__exportStar(H(), e), e._Parser = r.Parser;
3102
+ var s = ft();
3103
+ Object.defineProperty(e, `isStructurallySame`, {
3104
+ enumerable: !0,
3105
+ get: function() {
3106
+ return s.isStructurallySame;
3107
+ }
3108
+ });
3109
+ })), mt = p(((e) => {
3110
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.printAST = r;
3111
+ var t = (V(), g(P)), n = H();
3112
+ function r(e) {
3113
+ return i(e, !1);
3114
+ }
3115
+ function i(e, t) {
3116
+ return e.map(function(r, i) {
3117
+ if ((0, n.isLiteralElement)(r)) return s(r, t, i === 0, i === e.length - 1);
3118
+ if ((0, n.isArgumentElement)(r)) return c(r);
3119
+ if ((0, n.isDateElement)(r) || (0, n.isTimeElement)(r) || (0, n.isNumberElement)(r)) return l(r);
3120
+ if ((0, n.isPluralElement)(r)) return m(r);
3121
+ if ((0, n.isSelectElement)(r)) return p(r);
3122
+ if ((0, n.isPoundElement)(r)) return `#`;
3123
+ if ((0, n.isTagElement)(r)) return a(r);
3124
+ }).join(``);
3125
+ }
3126
+ function a(e) {
3127
+ return `<${e.value}>${r(e.children)}</${e.value}>`;
3128
+ }
3129
+ function o(e) {
3130
+ return e.replace(/([{}](?:[\s\S]*[{}])?)/, `'$1'`);
3131
+ }
3132
+ function s(e, t, n, r) {
3133
+ var i = e.value;
3134
+ return !n && i[0] === `'` && (i = `''${i.slice(1)}`), !r && i[i.length - 1] === `'` && (i = `${i.slice(0, i.length - 1)}''`), i = o(i), t ? i.replace(`#`, `'#'`) : i;
3135
+ }
3136
+ function c(e) {
3137
+ return `{${e.value}}`;
3138
+ }
3139
+ function l(e) {
3140
+ return `{${e.value}, ${n.TYPE[e.type]}${e.style ? `, ${d(e.style)}` : ``}}`;
3141
+ }
3142
+ function u(e) {
3143
+ var t = e.stem, n = e.options;
3144
+ return n.length === 0 ? t : `${t}${n.map(function(e) {
3145
+ return `/${e}`;
3146
+ }).join(``)}`;
3147
+ }
3148
+ function d(e) {
3149
+ return typeof e == `string` ? o(e) : e.type === n.SKELETON_TYPE.dateTime ? `::${f(e)}` : `::${e.tokens.map(u).join(` `)}`;
3150
+ }
3151
+ function f(e) {
3152
+ return e.pattern;
3153
+ }
3154
+ function p(e) {
3155
+ return `{${[
3156
+ e.value,
3157
+ `select`,
3158
+ Object.keys(e.options).map(function(t) {
3159
+ return `${t}{${i(e.options[t].value, !1)}}`;
3160
+ }).join(` `)
3161
+ ].join(`,`)}}`;
3162
+ }
3163
+ function m(e) {
3164
+ var n = e.pluralType === `cardinal` ? `plural` : `selectordinal`;
3165
+ return `{${[
3166
+ e.value,
3167
+ n,
3168
+ t.__spreadArray([e.offset ? `offset:${e.offset}` : ``], Object.keys(e.options).map(function(t) {
3169
+ return `${t}{${i(e.options[t].value, !0)}}`;
3170
+ }), !0).filter(Boolean).join(` `)
3171
+ ].join(`,`)}}`;
3172
+ }
3173
+ }));
3174
+ pt();
3175
+ H();
3176
+ mt();
3177
+ const K = `_gt_`;
3178
+ RegExp(`^${K}\\d+$`);
3179
+ RegExp(`^${K}$`);
3180
+ const q = `@generaltranslation/react-core`;
3181
+ `${q}`, `${q}`, `${q}`, `${q}`, `${q}`, `${q}`;
3182
+ `${q}`, `${q}`, `${q}`, `${q}`;
3183
+ `${q}`;
3184
+ const sn = `generaltranslation.locale`;
3185
+ react$1.use;
3186
+ function Hn({ children: e }) {
3187
+ return e;
3188
+ }
3189
+ function Un(e) {
3190
+ return Hn(e);
3191
+ }
3192
+ Hn._gtt = `derive`, Un._gtt = `derive`;
3193
+ //#endregion
3194
+ //#region src/shared/messages.ts
3195
+ const PACKAGE_NAME = "gt-react";
3196
+ `${PACKAGE_NAME}${PACKAGE_NAME}`;
3197
+ `${PACKAGE_NAME}`;
3198
+ `${PACKAGE_NAME}`;
3199
+ //#endregion
3200
+ //#region src/react-context/provider/hooks/locales/useDetermineLocale.ts
3201
+ function useDetermineLocale({ locale: initialLocale = "", defaultLocale = "en", locales: initialLocales = [], localeCookieName = sn, ssr = true, customMapping, enableI18n, reloadOnLocaleUpdate = false }) {
3202
+ const _locale = (0, react.useMemo)(() => (0, _generaltranslation_format.resolveAliasLocale)(initialLocale, customMapping), [initialLocale, customMapping]);
3203
+ const locales = (0, react.useMemo)(() => initialLocales.map((locale) => (0, _generaltranslation_format.resolveAliasLocale)(locale, customMapping)), [initialLocales, customMapping]);
3204
+ const initializeLocale = () => {
3205
+ if (!enableI18n) return defaultLocale;
3206
+ return (0, _generaltranslation_format.resolveAliasLocale)(ssr ? _locale ? (0, _generaltranslation_format.determineLocale)(_locale, locales, customMapping) || "" : "" : getNewLocale({
3207
+ _locale,
3208
+ locale: _locale,
3209
+ locales,
3210
+ defaultLocale,
3211
+ localeCookieName,
3212
+ customMapping,
3213
+ enableI18n
3214
+ }), customMapping);
3215
+ };
3216
+ const [locale, _setLocale] = (0, react.useState)(initializeLocale);
3217
+ const [setLocale, setLocaleWithoutSettingCookie] = createSetLocale({
3218
+ locale,
3219
+ locales,
3220
+ defaultLocale,
3221
+ localeCookieName,
3222
+ _setLocale,
3223
+ customMapping,
3224
+ enableI18n,
3225
+ reloadOnLocaleUpdate
3226
+ });
3227
+ (0, react.useEffect)(() => {
3228
+ setLocaleWithoutSettingCookie(getNewLocale({
3229
+ _locale,
3230
+ locale,
3231
+ locales,
3232
+ defaultLocale,
3233
+ localeCookieName,
3234
+ customMapping,
3235
+ enableI18n
3236
+ }));
3237
+ }, [
3238
+ _locale,
3239
+ locale,
3240
+ locales,
3241
+ defaultLocale,
3242
+ localeCookieName,
3243
+ enableI18n
3244
+ ]);
3245
+ return [locale, setLocale];
3246
+ }
3247
+ /**
3248
+ * Choose a locale to use
3249
+ * (1) use provided locale
3250
+ * (2) use cookie locale
3251
+ * (3) use preferred locale
3252
+ * (5) fallback to defaultLocale
3253
+ * Update the cookie locale to be correct
3254
+ */
3255
+ function getNewLocale({ _locale, locale, locales, defaultLocale, localeCookieName, customMapping, enableI18n }) {
3256
+ if (!enableI18n) return defaultLocale;
3257
+ if (_locale && _locale === locale && (0, _generaltranslation_format.determineLocale)(_locale, locales, customMapping) === locale) return (0, _generaltranslation_format.resolveAliasLocale)(_locale, customMapping);
3258
+ let cookieLocale = typeof document !== "undefined" ? document.cookie.split("; ").find((row) => row.startsWith(`${localeCookieName}=`))?.split("=")[1] : void 0;
3259
+ if (cookieLocale) cookieLocale = (0, _generaltranslation_format.resolveAliasLocale)(cookieLocale, customMapping);
3260
+ let browserLocales = (() => {
3261
+ if (typeof navigator === "undefined") return [];
3262
+ if (navigator?.languages) return navigator.languages;
3263
+ if (navigator?.language) return [navigator.language];
3264
+ const legacyNavigator = navigator;
3265
+ if (legacyNavigator.userLanguage) return [legacyNavigator.userLanguage];
3266
+ return [];
3267
+ })();
3268
+ browserLocales = browserLocales.map((locale) => (0, _generaltranslation_format.resolveAliasLocale)(locale, customMapping));
3269
+ let newLocale = (0, _generaltranslation_format.determineLocale)([
3270
+ ..._locale ? [_locale] : [],
3271
+ ...cookieLocale ? [cookieLocale] : [],
3272
+ ...browserLocales
3273
+ ], locales, customMapping) || defaultLocale;
3274
+ if (newLocale) newLocale = (0, _generaltranslation_format.resolveAliasLocale)(newLocale, customMapping);
3275
+ if (cookieLocale && cookieLocale !== newLocale && typeof document !== "undefined") document.cookie = `${localeCookieName}=${newLocale};path=/`;
3276
+ return newLocale;
3277
+ }
3278
+ function createSetLocale({ locale, locales, defaultLocale, localeCookieName, _setLocale, customMapping, enableI18n, reloadOnLocaleUpdate }) {
3279
+ locale = (0, _generaltranslation_format.resolveAliasLocale)(locale, customMapping);
3280
+ const setLocaleWithoutSettingCookie = (newLocale) => {
3281
+ if (!enableI18n) return defaultLocale;
3282
+ if (newLocale === locale) return locale;
3283
+ const validatedLocale = (0, _generaltranslation_format.resolveAliasLocale)((0, _generaltranslation_format.determineLocale)(newLocale, locales, customMapping) || locale || defaultLocale, customMapping);
3284
+ if (validatedLocale !== newLocale) console.warn(t$1(validatedLocale, newLocale, PACKAGE_NAME));
3285
+ _setLocale(validatedLocale);
3286
+ return validatedLocale;
3287
+ };
3288
+ const setLocale = (newLocale) => {
3289
+ if (!enableI18n) return;
3290
+ newLocale = (0, _generaltranslation_format.resolveAliasLocale)(newLocale);
3291
+ const validatedLocale = setLocaleWithoutSettingCookie(newLocale);
3292
+ if (typeof document !== "undefined") document.cookie = `${localeCookieName}=${validatedLocale};path=/`;
3293
+ if (typeof window !== "undefined" && newLocale !== locale && reloadOnLocaleUpdate) window.location.reload();
3294
+ };
3295
+ return [setLocale, setLocaleWithoutSettingCookie];
3296
+ }
3297
+ //#endregion
3298
+ //#region src/react-context/provider/helpers/isSSREnabled.ts
3299
+ function isSSREnabled() {
3300
+ if (typeof process !== "undefined" && process.env.NEXT_RUNTIME) return true;
3301
+ if (globalThis?.__NEXT_DATA__ !== void 0) return true;
3302
+ return false;
3303
+ }
3304
+ //#endregion
3305
+ //#region src/react-context/provider/GTProvider.tsx
3306
+ /**
3307
+ * Provides General Translation context to its children, which can then access `useGT`, `useLocale`, and `useDefaultLocale`.
3308
+ *
3309
+ * @param {React.ReactNode} children - The children components that will use the translation context.
3310
+ * @param {string} [projectId] - The project ID required for General Translation cloud services.
3311
+ * @param {Dictionary} [dictionary=defaultDictionary] - The translation dictionary for the project.
3312
+ * @param {string[]} [locales] - The list of approved locales for the project.
3313
+ * @param {string} [defaultLocale=libraryDefaultLocale] - The default locale to use if no other locale is found.
3314
+ * @param {string} [locale] - The current locale, if already set.
3315
+ * @param {string} [cacheUrl='https://cdn.gtx.dev'] - The URL of the cache service for fetching translations.
3316
+ * @param {string} [runtimeUrl='https://runtime.gtx.dev'] - The URL of the runtime service for fetching translations.
3317
+ * @param {RenderSettings} [renderSettings=defaultRenderSettings] - The settings for rendering translations.
3318
+ * @param {string} [_versionId] - The version ID for fetching translations.
3319
+ * @param {string} [devApiKey] - The API key for development environments.
3320
+ * @param {object} [metadata] - Additional metadata to pass to the context.
3321
+ * @param {boolean} [ssr=isSSREnabled()] - Whether to enable server-side rendering.
3322
+ * @param {string} [localeCookieName=defaultLocaleCookieName] - The name of the cookie to store the locale.
3323
+ * @param {boolean} [enableI18n=true] - Whether to enable i18n.
3324
+ * @param {boolean|undefined} [enableI18nLoaded=undefined] - Flag to indicate if the enableI18n flag is finished loading asynchronously. Undefined means flag is loaded synchronously.
3325
+ * @param {Translations | null} [translations=null] - The translations to use for the context.
3326
+ * @param {React.ReactNode} [fallback = undefined] - Custom fallback to display while loading
3327
+ *
3328
+ * @returns {JSX.Element} The provider component for General Translation context.
3329
+ */
3330
+ function GTProvider(props) {
3331
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_generaltranslation_react_core.GTProvider, {
3332
+ ssr: isSSREnabled(),
3333
+ environment: process.env.NODE_ENV,
3334
+ ...props,
3335
+ readAuthFromEnv,
3336
+ useDetermineLocale,
3337
+ useRegionState,
3338
+ useEnableI18n
3339
+ });
3340
+ }
3341
+ //#endregion
3342
+ //#region src/shared/InternalLocaleSelector.tsx
3343
+ /**
3344
+ * Capitalizes the first letter of a string if applicable.
3345
+ * For strings that do not use capitalization, it returns the string unchanged.
3346
+ * @param {string} str - The string to capitalize.
3347
+ * @returns {string} The string with the first letter capitalized if applicable.
3348
+ */
3349
+ function capitalizeName(str) {
3350
+ if (!str) return "";
3351
+ return str.charAt(0).toUpperCase() + (str.length > 1 ? str.slice(1) : "");
3352
+ }
3353
+ /**
3354
+ * Internal helper to convert deprecated customNames prop to the new customMapping format.
3355
+ * Used for backward compatibility with previous LocaleSelector API.
3356
+ * @param {object} customNames - Mapping of locale to display name.
3357
+ * @returns {CustomMapping | undefined} The converted mapping or undefined.
3358
+ * @internal
3359
+ */
3360
+ function _convertCustomNamesToMapping(customNames) {
3361
+ if (!customNames) return void 0;
3362
+ const result = {};
3363
+ for (const locale in customNames) result[locale] = { name: customNames[locale] };
3364
+ return result;
3365
+ }
3366
+ /**
3367
+ * A dropdown component that allows users to select a locale.
3368
+ * @param {string} locale - The currently selected locale.
3369
+ * @param {string[]} locales - The list of all available locales.
3370
+ * @param {function} setLocale - Function to update the current locale.
3371
+ * @param {function} getLocaleProperties - Function to retrieve properties for a given locale.
3372
+ * @param {object} [customNames] - (deprecated) An optional object to map locales to custom names. Use `customMapping` instead.
3373
+ * @param {CustomMapping} [customMapping] - An optional object to map locales to custom display names, emojis, or other properties.
3374
+ * @returns {React.ReactElement | null} The rendered locale dropdown component or null to prevent rendering.
3375
+ *
3376
+ * @internal
3377
+ */
3378
+ function InternalLocaleSelector({ locale, locales, customNames, customMapping = _convertCustomNamesToMapping(customNames), setLocale, getLocaleProperties, ...props }) {
3379
+ const getDisplayName = (locale) => {
3380
+ if (customMapping && customMapping[locale]) {
3381
+ if (typeof customMapping[locale] === "string") return customMapping[locale];
3382
+ if (customMapping[locale].name) return customMapping[locale].name;
3383
+ }
3384
+ return capitalizeName(getLocaleProperties(locale).nativeNameWithRegionCode);
3385
+ };
3386
+ if (!locales || locales.length === 0 || !setLocale) return null;
3387
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
3388
+ ...props,
3389
+ value: locale || "",
3390
+ onChange: (e) => setLocale(e.target.value),
3391
+ children: [!locale && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", { value: "" }), locales.map((locale) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
3392
+ value: locale,
3393
+ suppressHydrationWarning: true,
3394
+ children: getDisplayName(locale)
3395
+ }, locale))]
3396
+ });
3397
+ }
3398
+ //#endregion
3399
+ //#region src/react-context/ui/LocaleSelector.tsx
3400
+ /**
3401
+ * A dropdown component that allows users to select a locale.
3402
+ * @param {string[]} [locales] - An optional list of locales to use for the dropdown. If not provided, the list of locales from the `<GTProvider>` context is used.
3403
+ * @param {object} [customNames] - (deprecated) An optional object to map locales to custom names. Use `customMapping` instead.
3404
+ * @param {CustomMapping} [customMapping] - An optional object to map locales to custom display names, emojis, or other properties.
3405
+ * @returns {React.ReactElement | null} The rendered locale dropdown component or null to prevent rendering.
3406
+ */
3407
+ function LocaleSelector({ locales: _locales, ...props }) {
3408
+ const { locale, locales, setLocale, getLocaleProperties } = (0, _generaltranslation_react_core.useLocaleSelector)(_locales);
3409
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InternalLocaleSelector, {
3410
+ locale,
3411
+ locales,
3412
+ setLocale,
3413
+ getLocaleProperties,
3414
+ ...props
3415
+ });
3416
+ }
3417
+ //#endregion
3418
+ //#region src/react-context/ui/RegionSelector.tsx
3419
+ /**
3420
+ * A dropdown component that allows users to select a region.
3421
+ *
3422
+ * @param {string[]} [regions] - An optional array of ISO 3166 region codes to display. If not provided, regions are inferred from supported locales in the `<GTProvider>` context.
3423
+ * @param {React.ReactNode} [placeholder] - Optional placeholder node to display as the first option when no region is selected.
3424
+ * @param {object} [customMapping] - An optional object to map region codes to custom display names, emojis, or associated locales. The value can be a string (display name) or an object with `name`, `emoji`, and/or `locale` properties.
3425
+ * @param {boolean} [prioritizeCurrentLocaleRegion] - If true, the region corresponding to the current locale is prioritized in the list.
3426
+ * @param {boolean} [sortRegionsAlphabetically] - If true, regions are sorted alphabetically by display name.
3427
+ * @param {boolean} [asLocaleSelector=false] - If true, selecting a region will also update the locale to the region's associated locale.
3428
+ * @param {object} [props] - Additional props to pass to the underlying `<select>` element.
3429
+ * @returns {React.JSX.Element | null} The rendered region dropdown component or null if no regions are available.
3430
+ *
3431
+ * @example
3432
+ * ```tsx
3433
+ * <RegionSelector
3434
+ * regions={['US', 'CA']}
3435
+ * customMapping={{ US: { name: "United States", emoji: "πŸ‡ΊπŸ‡Έ" } }}
3436
+ * placeholder="Select a region"
3437
+ * />
3438
+ * ```
3439
+ */
3440
+ function RegionSelector({ regions: _regions, placeholder, customMapping, prioritizeCurrentLocaleRegion, sortRegionsAlphabetically, asLocaleSelector = false, ...props }) {
3441
+ const { region, setRegion, regions, regionData, locale, setLocale } = (0, _generaltranslation_react_core.useRegionSelector)({
3442
+ regions: _regions,
3443
+ customMapping,
3444
+ prioritizeCurrentLocaleRegion,
3445
+ sortRegionsAlphabetically
3446
+ });
3447
+ const changeRegion = (region) => {
3448
+ setRegion(region);
3449
+ if (asLocaleSelector) {
3450
+ const regionLocale = regionData.get(region).locale;
3451
+ if (locale !== regionLocale) setLocale(regionLocale);
3452
+ }
3453
+ };
3454
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
3455
+ ...props,
3456
+ value: region || "",
3457
+ onChange: (e) => changeRegion(e.target.value),
3458
+ children: [!region && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
3459
+ value: "",
3460
+ disabled: Boolean(region),
3461
+ hidden: Boolean(region),
3462
+ suppressHydrationWarning: true,
3463
+ children: placeholder || ""
3464
+ }, "placeholder"), regions.map((r) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
3465
+ value: r,
3466
+ suppressHydrationWarning: true,
3467
+ children: regionData.get(r).name
3468
+ }, r))]
3469
+ });
3470
+ }
3471
+ //#endregion
3472
+ exports.Branch = _generaltranslation_react_core.Branch;
3473
+ exports.Currency = _generaltranslation_react_core.Currency;
3474
+ exports.DateTime = _generaltranslation_react_core.DateTime;
3475
+ exports.Derive = _generaltranslation_react_core.Derive;
3476
+ exports.GTProvider = GTProvider;
3477
+ exports.LocaleSelector = LocaleSelector;
3478
+ exports.Num = _generaltranslation_react_core.Num;
3479
+ exports.Plural = _generaltranslation_react_core.Plural;
3480
+ exports.RegionSelector = RegionSelector;
3481
+ exports.RelativeTime = _generaltranslation_react_core.RelativeTime;
3482
+ exports.Static = _generaltranslation_react_core.Static;
3483
+ exports.T = _generaltranslation_react_core.T;
3484
+ exports.Var = _generaltranslation_react_core.Var;
3485
+ exports.declareStatic = _generaltranslation_react_core.declareStatic;
3486
+ exports.declareVar = _generaltranslation_react_core.declareVar;
3487
+ exports.decodeMsg = _generaltranslation_react_core.decodeMsg;
3488
+ exports.decodeOptions = _generaltranslation_react_core.decodeOptions;
3489
+ exports.decodeVars = _generaltranslation_react_core.decodeVars;
3490
+ exports.derive = _generaltranslation_react_core.derive;
3491
+ exports.gtFallback = _generaltranslation_react_core.gtFallback;
3492
+ exports.mFallback = _generaltranslation_react_core.mFallback;
3493
+ exports.msg = _generaltranslation_react_core.msg;
3494
+ exports.useDefaultLocale = _generaltranslation_react_core.useDefaultLocale;
3495
+ exports.useGT = _generaltranslation_react_core.useGT;
3496
+ exports.useGTClass = _generaltranslation_react_core.useGTClass;
3497
+ exports.useLocale = _generaltranslation_react_core.useLocale;
3498
+ exports.useLocaleDirection = _generaltranslation_react_core.useLocaleDirection;
3499
+ exports.useLocaleProperties = _generaltranslation_react_core.useLocaleProperties;
3500
+ exports.useLocaleSelector = _generaltranslation_react_core.useLocaleSelector;
3501
+ exports.useLocales = _generaltranslation_react_core.useLocales;
3502
+ exports.useMessages = _generaltranslation_react_core.useMessages;
3503
+ exports.useRegion = _generaltranslation_react_core.useRegion;
3504
+ exports.useRegionSelector = _generaltranslation_react_core.useRegionSelector;
3505
+ exports.useSetLocale = _generaltranslation_react_core.useSetLocale;
3506
+ exports.useTranslations = _generaltranslation_react_core.useTranslations;
3507
+ exports.useVersionId = _generaltranslation_react_core.useVersionId;
3508
+
3509
+ //# sourceMappingURL=index.cjs.map