gt-react 10.19.15 β†’ 10.19.17

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