react-semaphor 0.1.559 → 0.1.560

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 (134) hide show
  1. package/dist/analytics-protocol/index.js +368 -361
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +5 -5
  4. package/dist/brand-studio/index.js +9 -9
  5. package/dist/briefings/index.js +5 -5
  6. package/dist/chunks/analytics-base-schemas-CHLxsPfX.js +630 -0
  7. package/dist/chunks/{assistant-chat-B_4bVE6I.js → assistant-chat-Bu2fFm_I.js} +206 -207
  8. package/dist/chunks/{bookmark-state-ssqrs5oP.js → bookmark-state-BFY9oNmr.js} +3 -3
  9. package/dist/chunks/{braces-Rdxa3H-s.js → braces-Da41xfUd.js} +1 -1
  10. package/dist/chunks/{comparison-window-caption-CKzQ5LcF.js → comparison-window-caption-4FNkMrzE.js} +166 -166
  11. package/dist/chunks/{context-DVy4HOU0.js → context-BgPDzLHZ.js} +1 -1
  12. package/dist/chunks/{custom-visual-inputs-zVa9wX_o.js → custom-visual-inputs-Dz-enUNR.js} +1 -1
  13. package/dist/chunks/{dashboard-BziwOVpZ.js → dashboard-_MeBuy67.js} +1 -1
  14. package/dist/chunks/{dashboard-briefing-launcher-CbeNR-YI.js → dashboard-briefing-launcher-CEi4Pr_v.js} +1152 -1166
  15. package/dist/chunks/{dashboard-controls-RD6UJs1r.js → dashboard-controls-Bi7fyG-4.js} +98 -98
  16. package/dist/chunks/{dashboard-json-DGpv17vL.js → dashboard-json-B1mU_OMa.js} +5 -5
  17. package/dist/chunks/{document-dashboard-inputs-ChVkcBuu.js → document-dashboard-inputs-CkWfDB8c.js} +64 -64
  18. package/dist/chunks/{edit-dashboard-visual-AQ2pQkFp.js → edit-dashboard-visual-0CJN31Y3.js} +8375 -8615
  19. package/dist/chunks/filter-reach-copy-BF4w4kI2.js +3738 -0
  20. package/dist/chunks/{filter-value-text-B4l-xqJT.js → filter-value-text-CRC-K_l_.js} +3 -3
  21. package/dist/chunks/{global-date-filter-utils-DBzEOX9M.js → global-date-filter-utils-D8365uPH.js} +4068 -3401
  22. package/dist/chunks/{index-B1Xr7W24.js → index-DtHidOPV.js} +579 -604
  23. package/dist/chunks/{layout-grid-Bbz3zKif.js → layout-grid-BvsH4RY2.js} +1 -1
  24. package/dist/chunks/{list-filter-3sbH0Uy1.js → list-filter-Dg0otx5E.js} +1 -1
  25. package/dist/chunks/{matrix-analytical-definition-CEe3PGEo.js → matrix-analytical-definition-CM18W8w6.js} +4 -4
  26. package/dist/chunks/{matrix-card-BRNGb1C4.js → matrix-card-HPskLaPy.js} +3 -3
  27. package/dist/chunks/{matrix-member-presentation-CEegvTqg.js → matrix-member-presentation-Bbrfrke4.js} +1 -1
  28. package/dist/chunks/{matrix-operation-contract-COxrfQTS.js → matrix-operation-contract-WPv4R-H_.js} +110 -110
  29. package/dist/chunks/{metric-comparison-DQx-uX__.js → metric-comparison-ljMKYZKa.js} +2 -2
  30. package/dist/chunks/{model-change-CJEj3ZD6.js → model-change-Ccn1zaxl.js} +1 -1
  31. package/dist/chunks/{palette-DMJtp3Vn.js → palette-Bsh376zO.js} +1 -1
  32. package/dist/chunks/{pivot-result-contract-expectations-DOYhqeZb.js → pivot-result-contract-expectations-Bl5suy4-.js} +602 -696
  33. package/dist/chunks/{pivot-result-identity-CAj8SiRL.js → pivot-result-identity-vS9TSh4f.js} +1 -1
  34. package/dist/chunks/{raw-temporal-presentation-BmT7z6NH.js → raw-temporal-presentation-BHm7s-hz.js} +230 -274
  35. package/dist/chunks/{report-preferences-dialog-0sc8B1lh.js → report-preferences-dialog-BV8L0SeS.js} +55 -55
  36. package/dist/chunks/{report-runtime-context-bYoExeWr.js → report-runtime-context-BZQh9ywy.js} +2 -2
  37. package/dist/chunks/{resolve-dashboard-input-context-B_C_VAJH.js → resolve-dashboard-input-context-CAMiWvyR.js} +1749 -1989
  38. package/dist/chunks/{save-DSb1jTtG.js → save-B5EAsgQF.js} +1 -1
  39. package/dist/chunks/{saved-dashboard-context-BQWM3ldX.js → saved-dashboard-context-n2Wn11cV.js} +57 -57
  40. package/dist/chunks/{selection-reducer-DSzMWb4x.js → selection-reducer-D0YnaAD9.js} +1 -1
  41. package/dist/chunks/{semaphor-ready-indicator-Bz14Oma5.js → semaphor-ready-indicator-XLBLOJ2V.js} +38374 -39104
  42. package/dist/chunks/{shelf-drop-preview-context-DBHAkgch.js → shelf-drop-preview-context-DHMa54a-.js} +570 -570
  43. package/dist/chunks/{source-entity-resolution-BOrmNCEM.js → source-entity-resolution-dUG5VWRm.js} +1 -1
  44. package/dist/chunks/{switch-Dq8XPFpT.js → switch-ByxH4M7t.js} +3 -3
  45. package/dist/chunks/{table-export-sheet-C_RvEUyO.js → table-export-sheet-C_GdeTYU.js} +1 -1
  46. package/dist/chunks/{table-settings-DXj_zXwS.js → table-settings-Imz0FgWi.js} +6 -6
  47. package/dist/chunks/{temporal-input-presentation-AhLSkGPf.js → temporal-input-presentation-uvNK_tM0.js} +1109 -820
  48. package/dist/chunks/{token-types-LCYMJ3pa.js → token-types-CQtXUVMy.js} +1 -1
  49. package/dist/chunks/{upload-Dr_WAxHQ.js → upload-wbR-NVzq.js} +1 -1
  50. package/dist/chunks/{use-create-flow-overlay-state-BK3YFkfc.js → use-create-flow-overlay-state-CEBaLOKC.js} +6 -6
  51. package/dist/chunks/{validators-C87JPd-_.js → validators-CXTneCA4.js} +1206 -1579
  52. package/dist/chunks/{zoned-wall-clock-E35Frf9v.js → zoned-wall-clock-B1n_WjW3.js} +1 -1
  53. package/dist/dashboard/index.js +2 -2
  54. package/dist/dashboard-authoring/index.js +2207 -1497
  55. package/dist/data-app-sdk/index.js +5 -5
  56. package/dist/data-app-sdk-adapters/index.js +3 -3
  57. package/dist/data-app-sdk-validation/index.js +6 -6
  58. package/dist/format-utils/index.js +181 -176
  59. package/dist/index.js +22 -22
  60. package/dist/report-runtime-context/index.js +2 -2
  61. package/dist/style.css +1 -1
  62. package/dist/surfboard/index.js +2 -2
  63. package/dist/types/components/editor/editor-aside/utils.d.ts +1 -1
  64. package/dist/types/components/visual/data-table/types/data-table.d.ts +5 -20
  65. package/dist/types/index.js +6 -6
  66. package/dist/types/lib/formatters/canonical-format-adapter.d.ts +2 -29
  67. package/dist/types/lib/formatters/raw-temporal-presentation.d.ts +0 -2
  68. package/dist/types/lib/formatters/table-column-settings.d.ts +47 -0
  69. package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +10 -188
  70. package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +1 -1
  71. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +16 -372
  72. package/dist/types/lib/stores/dashboard-store.d.ts +0 -1
  73. package/dist/types/lib/stores/editor-store.d.ts +39 -9
  74. package/dist/types/lib/stores/table-actions.d.ts +9 -3
  75. package/dist/types/lib/table-formatting/index.d.ts +0 -2
  76. package/dist/types/lib/table-formatting/table-conditional-formatting-range-source.d.ts +3 -2
  77. package/dist/types/lib/table-formatting/table-conditional-formatting-range.d.ts +3 -2
  78. package/dist/types/lib/table-formatting/table-formatting-normalize.d.ts +1 -2
  79. package/dist/types/lib/table-formatting/table-formatting-render-model.d.ts +9 -0
  80. package/dist/types/lib/table-formatting/table-formatting-types.d.ts +5 -95
  81. package/dist/types/lib/table-formatting/table-presentation-fields.d.ts +35 -0
  82. package/dist/types/lib/types/common-types.d.ts +40 -47
  83. package/dist/types/lib/types/explorer-types.d.ts +11 -43
  84. package/dist/types/lib/utils/card-config-utils.d.ts +8 -0
  85. package/dist/types/lib/utils/card-definition.d.ts +9 -187
  86. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +159 -513
  87. package/dist/types/shared/analytics-protocol/contracts.d.ts +32 -9
  88. package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +108 -980
  89. package/dist/types/shared/analytics-protocol/field-validation.d.ts +1 -0
  90. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +281 -4624
  91. package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +20 -20
  92. package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +18 -18
  93. package/dist/types/shared/analytics-protocol/matrix-path-contract.d.ts +40 -40
  94. package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +3 -203
  95. package/dist/types/shared/analytics-protocol/scalar-value.d.ts +8 -8
  96. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +8 -0
  97. package/dist/types/shared/assistant-protocol/context.d.ts +69 -69
  98. package/dist/types/shared/dashboard-authoring/canonical-result-keys.d.ts +13 -0
  99. package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +4 -1
  100. package/dist/types/shared/dashboard-authoring/card-formats/sql-date-pattern.d.ts +10 -0
  101. package/dist/types/shared/dashboard-authoring/card-formats/upgrade-card-formats.d.ts +57 -0
  102. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +24 -24
  103. package/dist/types/shared/dashboard-authoring/conditional-formatting/editable.d.ts +14 -0
  104. package/dist/types/shared/dashboard-authoring/conditional-formatting/evaluate.d.ts +16 -0
  105. package/dist/types/shared/dashboard-authoring/conditional-formatting/index.d.ts +9 -0
  106. package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +14 -0
  107. package/dist/types/shared/dashboard-authoring/conditional-formatting/resolve-card-column-ref.d.ts +17 -0
  108. package/dist/types/shared/dashboard-authoring/conditional-formatting/retain.d.ts +14 -0
  109. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +4499 -0
  110. package/dist/types/shared/dashboard-authoring/conditional-formatting/store.d.ts +12 -0
  111. package/dist/types/shared/dashboard-authoring/conditional-formatting/types.d.ts +151 -0
  112. package/dist/types/shared/dashboard-authoring/conditional-formatting/upgrade.d.ts +35 -0
  113. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +62 -62
  114. package/dist/types/shared/dashboard-authoring/index.d.ts +5 -0
  115. package/dist/types/shared/dashboard-authoring/matrix-authoring.d.ts +4 -5
  116. package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +24 -736
  117. package/dist/types/shared/dashboard-authoring/retired-presentation-fields.d.ts +31 -0
  118. package/dist/types/shared/dashboard-authoring/upgrade-card-presentation.d.ts +14 -0
  119. package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +5 -1
  120. package/dist/types/shared/format-utils/formatters/number-formatter.d.ts +16 -0
  121. package/dist/types/shared/format-utils/index.d.ts +2 -0
  122. package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +10 -366
  123. package/dist/types/shared/format-utils/raw-temporal.d.ts +15 -1
  124. package/dist/types/shared/format-utils/resolve-column-format.d.ts +43 -0
  125. package/dist/types/shared/format-utils/retired-format-adapters.d.ts +68 -0
  126. package/dist/types/shared/format-utils/semantic-format.d.ts +5 -1
  127. package/dist/types/shared/format-utils/stored-value-format.d.ts +16 -0
  128. package/dist/types/shared/format-utils/types/format-types.d.ts +10 -12
  129. package/package.json +1 -1
  130. package/dist/chunks/analytics-base-schemas-BUFUoO6G.js +0 -472
  131. package/dist/chunks/editor-draft-sync-BN5qYHPF.js +0 -15
  132. package/dist/chunks/filter-reach-copy-B5Y7FHzg.js +0 -3411
  133. package/dist/types/lib/table-formatting/table-conditional-formatting-evaluator.d.ts +0 -9
  134. package/dist/types/lib/table-formatting/table-formatting-validation.d.ts +0 -12
@@ -1,105 +1,106 @@
1
- var kt = Object.defineProperty;
2
- var _t = (e, t, r) => t in e ? kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var v = (e, t, r) => _t(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { b0 as je, b1 as bt, b2 as Nt, l as Mt, a3 as $t, X as I, o as It } from "./validators-C87JPd-_.js";
1
+ var Pt = Object.defineProperty;
2
+ var Lt = (e, t, r) => t in e ? Pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var x = (e, t, r) => Lt(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import { a$ as et, b0 as jt, b1 as Kt, l as Ht, a3 as Zt, X as F, o as qt } from "./validators-CXTneCA4.js";
5
5
  import { z as f } from "zod";
6
- import { E as Ke, l as He } from "./export-file-format-C-tJsxsf.js";
7
- import { b as Et } from "./report-runtime-context-bYoExeWr.js";
8
- import { canonicalizeSupportedLocale as F, canonicalizeSupportedCurrencyCode as ce, DEFAULT_RESOLVED_VALUE_FORMAT_PREFERENCES as Ft } from "../value-format-preferences/index.js";
9
- import { i as L } from "./analytics-base-schemas-BUFUoO6G.js";
10
- import { p as Ct, z as Ut } from "./zoned-wall-clock-E35Frf9v.js";
11
- function Ze(e) {
6
+ import { E as tt, l as rt } from "./export-file-format-C-tJsxsf.js";
7
+ import "./matrix-operation-contract-WPv4R-H_.js";
8
+ import { k as Bt, i as V } from "./analytics-base-schemas-CHLxsPfX.js";
9
+ import { b as Vt } from "./report-runtime-context-BZQh9ywy.js";
10
+ import { canonicalizeSupportedLocale as A, canonicalizeSupportedCurrencyCode as ye, DEFAULT_RESOLVED_VALUE_FORMAT_PREFERENCES as Gt } from "../value-format-preferences/index.js";
11
+ import { p as Wt, z as Xt } from "./zoned-wall-clock-B1n_WjW3.js";
12
+ function Q(e) {
12
13
  if (!e || typeof e != "object") return !1;
13
14
  const t = e.type;
14
15
  return t === "number" || t === "currency" || t === "percent" || t === "scientific";
15
16
  }
16
- function ya(e) {
17
- return Ze(e) || !!e && typeof e == "object" && e.type === "duration";
17
+ function Ya(e) {
18
+ return Q(e) || !!e && typeof e == "object" && e.type === "duration";
18
19
  }
19
- const qe = [
20
+ const nt = [
20
21
  "day",
21
22
  "hour",
22
23
  "minute",
23
24
  "second",
24
25
  "millisecond"
25
- ], ue = {
26
+ ], ge = {
26
27
  day: 864e5,
27
28
  hour: 36e5,
28
29
  minute: 6e4,
29
30
  second: 1e3,
30
31
  millisecond: 1
31
- }, zt = {
32
+ }, Jt = {
32
33
  day: "d",
33
34
  hour: "hr",
34
35
  minute: "min",
35
36
  second: "s",
36
37
  millisecond: "ms"
37
- }, At = {
38
+ }, Qt = {
38
39
  day: ["day", "days"],
39
40
  hour: ["hour", "hours"],
40
41
  minute: ["minute", "minutes"],
41
42
  second: ["second", "seconds"],
42
43
  millisecond: ["millisecond", "milliseconds"]
43
44
  };
44
- function Yt(e) {
45
+ function er(e) {
45
46
  return e === "day" || e === "hour" || e === "minute" || e === "second" || e === "millisecond";
46
47
  }
47
- function Be(e, t) {
48
- return Yt(e) ? e : t;
48
+ function at(e, t) {
49
+ return er(e) ? e : t;
49
50
  }
50
- function Se(e, t) {
51
- return qe.indexOf(Be(e, t));
51
+ function be(e, t) {
52
+ return nt.indexOf(at(e, t));
52
53
  }
53
- function Rt(e, t) {
54
- const r = Se(e, "day"), n = Se(t, "second"), a = Math.min(r, n), i = Math.max(r, n);
55
- return qe.slice(a, i + 1);
54
+ function tr(e, t) {
55
+ const r = be(e, "day"), n = be(t, "second"), a = Math.min(r, n), i = Math.max(r, n);
56
+ return nt.slice(a, i + 1);
56
57
  }
57
- function Ot(e, t) {
58
- return e * ue[Be(t, "second")];
58
+ function rr(e, t) {
59
+ return e * ge[at(t, "second")];
59
60
  }
60
- function Pt(e, t) {
61
- const r = Rt(t.largestUnit, t.smallestUnit), n = r[r.length - 1], a = ue[n];
61
+ function nr(e, t) {
62
+ const r = tr(t.largestUnit, t.smallestUnit), n = r[r.length - 1], a = ge[n];
62
63
  let i = Math.round(e / a) * a;
63
64
  return r.map((o) => {
64
- const s = ue[o], c = Math.floor(i / s);
65
- return i -= c * s, { unit: o, value: c };
65
+ const c = ge[o], s = Math.floor(i / c);
66
+ return i -= s * c, { unit: o, value: s };
66
67
  });
67
68
  }
68
- function Lt(e, t) {
69
+ function ar(e, t) {
69
70
  const r = e.filter((i) => i.value !== 0), n = r.length > 0 ? r : [e[e.length - 1]], a = typeof t == "number" && Number.isFinite(t) ? Math.max(1, Math.trunc(t)) : n.length;
70
- return n.slice(0, a).map((i) => `${i.value}${zt[i.unit]}`).join(" ");
71
+ return n.slice(0, a).map((i) => `${i.value}${Jt[i.unit]}`).join(" ");
71
72
  }
72
- function jt(e, t) {
73
+ function ir(e, t) {
73
74
  const r = e.filter((i) => i.value !== 0), n = r.length > 0 ? r : [e[e.length - 1]], a = typeof t == "number" && Number.isFinite(t) ? Math.max(1, Math.trunc(t)) : n.length;
74
75
  return n.slice(0, a).map((i) => {
75
- const [o, s] = At[i.unit];
76
- return `${i.value} ${i.value === 1 ? o : s}`;
76
+ const [o, c] = Qt[i.unit];
77
+ return `${i.value} ${i.value === 1 ? o : c}`;
77
78
  }).join(" ");
78
79
  }
79
- function Kt(e) {
80
+ function or(e) {
80
81
  const t = e.some(
81
- (c) => c.unit === "day" && c.value !== 0
82
- ), r = e.some((c) => c.unit === "millisecond"), n = e.findIndex((c) => c.value !== 0), a = Math.max(0, e.length - 2), i = t ? 0 : n === -1 ? a : Math.min(n, a), o = n === -1 ? e.slice(a) : e.slice(i);
82
+ (s) => s.unit === "day" && s.value !== 0
83
+ ), r = e.some((s) => s.unit === "millisecond"), n = e.findIndex((s) => s.value !== 0), a = Math.max(0, e.length - 2), i = t ? 0 : n === -1 ? a : Math.min(n, a), o = n === -1 ? e.slice(a) : e.slice(i);
83
84
  if (o.length === 0)
84
85
  return "0";
85
- const s = o.map((c, u) => c.unit === "millisecond" ? String(c.value).padStart(3, "0") : u === 0 ? String(c.value) : String(c.value).padStart(2, "0")).join(":");
86
- return r ? s.replace(/:(\d{3})$/, ".$1") : s;
86
+ const c = o.map((s, u) => s.unit === "millisecond" ? String(s.value).padStart(3, "0") : u === 0 ? String(s.value) : String(s.value).padStart(2, "0")).join(":");
87
+ return r ? c.replace(/:(\d{3})$/, ".$1") : c;
87
88
  }
88
- function Ht(e, t, r) {
89
+ function sr(e, t, r) {
89
90
  const n = `${r.prefix || ""}${e}${r.suffix || ""}`;
90
91
  return t ? r.negativeInParentheses ? `(${n})` : `-${n}` : n;
91
92
  }
92
- function Zt(e, t = {}) {
93
+ function cr(e, t = {}) {
93
94
  if (e == null)
94
95
  return "";
95
96
  const r = typeof e == "number" ? e : typeof e == "string" && e.trim() ? Number(e) : NaN;
96
97
  if (!Number.isFinite(r))
97
98
  return "";
98
- const n = t.inputUnit || "second", a = t.outputStyle === "digital" || t.outputStyle === "long" ? t.outputStyle : "compact", i = r < 0, o = Math.abs(Ot(r, n)), s = Pt(o, t), c = a === "digital" ? Kt(s) : a === "long" ? jt(s, t.maxUnits) : Lt(s, t.maxUnits);
99
- return Ht(c, i, t);
99
+ const n = t.inputUnit || "second", a = t.outputStyle === "digital" || t.outputStyle === "long" ? t.outputStyle : "compact", i = r < 0, o = Math.abs(rr(r, n)), c = nr(o, t), s = a === "digital" ? or(c) : a === "long" ? ir(c, t.maxUnits) : ar(c, t.maxUnits);
100
+ return sr(s, i, t);
100
101
  }
101
- function Ve(e, t) {
102
- return Zt(
102
+ function it(e, t) {
103
+ return cr(
103
104
  e !== null && typeof e == "object" ? e.value : e,
104
105
  {
105
106
  inputUnit: t.inputUnit,
@@ -113,116 +114,119 @@ function Ve(e, t) {
113
114
  }
114
115
  );
115
116
  }
116
- let ve;
117
- function xe(e, t) {
117
+ let $e;
118
+ function Me(e, t) {
118
119
  const r = e.format;
119
120
  return r(t);
120
121
  }
121
- function qt(e, t) {
122
- if (ve ?? (ve = xe(
122
+ function ur(e, t) {
123
+ if ($e ?? ($e = Me(
123
124
  new Intl.NumberFormat("en-US", { useGrouping: !1, maximumFractionDigits: 6 }),
124
125
  "9007199254740993.000009"
125
- ) === "9007199254740993.000009"), !ve)
126
+ ) === "9007199254740993.000009"), !$e)
126
127
  throw new RangeError("This runtime cannot format exact decimal strings.");
127
128
  const r = Number(e);
128
129
  if (!Number.isFinite(r) || r === 0 && e !== "0")
129
130
  throw new RangeError("Exact value is outside the Intl formatting range; use raw text.");
130
- return xe(t, e);
131
+ return Me(t, e);
131
132
  }
132
- function G(e) {
133
+ function O(e) {
133
134
  return typeof e == "number" ? e < 0 : e.value.startsWith("-");
134
135
  }
135
- function j(e) {
136
- return typeof e == "number" ? Math.abs(e) : G(e) ? { ...e, value: e.value.slice(1) } : e;
136
+ function C(e) {
137
+ return typeof e == "number" ? Math.abs(e) : O(e) ? { ...e, value: e.value.slice(1) } : e;
137
138
  }
138
- function Ge(e, t) {
139
+ function lr(e) {
140
+ return typeof e == "number" ? e === 0 : /^-?0*(\.0*)?$/.test(e.value);
141
+ }
142
+ function ot(e, t) {
139
143
  return typeof e == "number" ? e * t : {
140
144
  kind: "exact_number",
141
145
  type: "decimal",
142
- value: je(e.value, t)
146
+ value: et(e.value, t)
143
147
  };
144
148
  }
145
- function K(e, t) {
149
+ function G(e, t) {
146
150
  return t === 0 ? e : typeof e == "number" ? e / 10 ** t : {
147
151
  kind: "exact_number",
148
152
  type: "decimal",
149
- value: je(e.value, `1e-${t}`)
153
+ value: et(e.value, `1e-${t}`)
150
154
  };
151
155
  }
152
- function b(e, t) {
153
- return typeof e == "number" ? t.format(e) : qt(e.value, t);
156
+ function M(e, t) {
157
+ return typeof e == "number" ? t.format(e) : ur(e.value, t);
154
158
  }
155
- function De(e) {
159
+ function Ne(e) {
156
160
  if (!e) return !1;
157
161
  const t = e.toLowerCase().replace("_", "-");
158
162
  return t === "en-in" || t.startsWith("en-in-");
159
163
  }
160
- function ke(e, t) {
161
- const r = j(e), n = (a) => typeof r == "number" ? r >= a : bt(r.value, String(a)) >= 0;
162
- return n(1e12) ? { power: 12, suffix: "T" } : n(1e9) ? { power: 9, suffix: "B" } : De(t) && n(1e7) ? { power: 7, suffix: "Cr" } : n(1e6) ? { power: 6, suffix: "M" } : De(t) && n(1e5) ? { power: 5, suffix: "L" } : n(1e3) ? { power: 3, suffix: "K" } : { power: 0, suffix: "" };
164
+ function Ie(e, t) {
165
+ const r = C(e), n = (a) => typeof r == "number" ? r >= a : jt(r.value, String(a)) >= 0;
166
+ return n(1e12) ? { power: 12, suffix: "T" } : n(1e9) ? { power: 9, suffix: "B" } : Ne(t) && n(1e7) ? { power: 7, suffix: "Cr" } : n(1e6) ? { power: 6, suffix: "M" } : Ne(t) && n(1e5) ? { power: 5, suffix: "L" } : n(1e3) ? { power: 3, suffix: "K" } : { power: 0, suffix: "" };
163
167
  }
164
- function le(e, t) {
168
+ function he(e, t) {
165
169
  try {
166
- const r = M(t);
167
- return ke(e, r);
170
+ const r = I(t);
171
+ return Ie(e, r);
168
172
  } catch {
169
- return ke(e, "en-US");
173
+ return Ie(e, "en-US");
170
174
  }
171
175
  }
172
- const We = 500, U = /* @__PURE__ */ new Map(), z = /* @__PURE__ */ new Map();
173
- function S(e, t = {}) {
176
+ const st = 500, Y = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map();
177
+ function D(e, t = {}) {
174
178
  const r = `${e}|${JSON.stringify(t)}`;
175
- let n = U.get(r);
176
- return n || (n = new Intl.NumberFormat(e, t), U.size >= We && U.clear(), U.set(r, n)), n;
179
+ let n = Y.get(r);
180
+ return n || (n = new Intl.NumberFormat(e, t), Y.size >= st && Y.clear(), Y.set(r, n)), n;
177
181
  }
178
- function Bt(e) {
179
- let t = z.get(e);
182
+ function mr(e) {
183
+ let t = P.get(e);
180
184
  if (t === void 0) {
181
185
  try {
182
- S(e), t = !0;
186
+ D(e), t = !0;
183
187
  } catch {
184
188
  t = !1;
185
189
  }
186
- z.size >= We && z.clear(), z.set(e, t);
190
+ P.size >= st && P.clear(), P.set(e, t);
187
191
  }
188
192
  return t;
189
193
  }
190
- function M(e) {
191
- return e && Bt(e) ? e : "en-US";
194
+ function I(e) {
195
+ return e && mr(e) ? e : "en-US";
192
196
  }
193
- function ge(e, t) {
197
+ function De(e, t) {
194
198
  if (e == null || Number.isNaN(e))
195
199
  return "";
196
- const r = M(t == null ? void 0 : t.locale);
200
+ const r = I(t == null ? void 0 : t.locale);
197
201
  let n = e;
198
- if (t != null && t.multiplyBy && (n = Ge(n, t.multiplyBy)), t != null && t.useSuffix) {
199
- const { power: i, suffix: o } = le(n, r);
200
- n = K(n, i);
201
- const s = b(n, S(r, {
202
+ if (t != null && t.multiplyBy && (n = ot(n, t.multiplyBy)), t != null && t.useSuffix) {
203
+ const { power: i, suffix: o } = he(n, r);
204
+ n = G(n, i);
205
+ const c = M(n, D(r, {
202
206
  minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
203
207
  maximumFractionDigits: (t == null ? void 0 : t.maximumFractionDigits) ?? 2,
204
208
  useGrouping: (t == null ? void 0 : t.useGrouping) ?? !0
205
209
  }));
206
- return `${(t == null ? void 0 : t.prefix) ?? ""}${s}${o}${(t == null ? void 0 : t.suffix) ?? ""}`;
210
+ return `${(t == null ? void 0 : t.prefix) ?? ""}${c}${o}${(t == null ? void 0 : t.suffix) ?? ""}`;
207
211
  }
208
- const a = b(n, S(r, {
212
+ const a = M(n, D(r, {
209
213
  minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
210
214
  maximumFractionDigits: (t == null ? void 0 : t.maximumFractionDigits) ?? 2,
211
215
  useGrouping: (t == null ? void 0 : t.useGrouping) ?? !0
212
216
  }));
213
- if (t != null && t.negativeInParentheses && G(n)) {
217
+ if (t != null && t.negativeInParentheses && O(n)) {
214
218
  const i = a.replace("-", "");
215
219
  return `(${(t == null ? void 0 : t.prefix) ?? ""}${i}${(t == null ? void 0 : t.suffix) ?? ""})`;
216
220
  }
217
221
  return `${(t == null ? void 0 : t.prefix) ?? ""}${a}${(t == null ? void 0 : t.suffix) ?? ""}`;
218
222
  }
219
- function Xe(e, t) {
223
+ function ct(e, t) {
220
224
  if (e == null || Number.isNaN(e))
221
225
  return "";
222
- const r = M(t == null ? void 0 : t.locale), n = (t == null ? void 0 : t.currency) || "USD", a = G(e), i = !!(t != null && t.negativeInParentheses && a), o = i ? j(e) : e;
226
+ const r = I(t == null ? void 0 : t.locale), n = (t == null ? void 0 : t.currency) || "USD", a = O(e), i = !!(t != null && t.negativeInParentheses && a), o = i ? C(e) : e;
223
227
  try {
224
228
  if (t != null && t.useSuffix) {
225
- const { power: c, suffix: u } = le(o, r), l = K(o, c), y = `${b(l, S(r, {
229
+ const { power: s, suffix: u } = he(o, r), l = G(o, s), y = `${M(l, D(r, {
226
230
  style: "currency",
227
231
  currency: n,
228
232
  minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
@@ -231,52 +235,61 @@ function Xe(e, t) {
231
235
  }))}${u}`;
232
236
  return i ? `(${y})` : y;
233
237
  }
234
- const s = b(o, S(r, {
238
+ const c = M(o, D(r, {
235
239
  style: "currency",
236
240
  currency: n,
237
241
  minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
238
242
  maximumFractionDigits: (t == null ? void 0 : t.maximumFractionDigits) ?? 2,
239
243
  useGrouping: (t == null ? void 0 : t.useGrouping) ?? !0
240
244
  }));
241
- return i ? `(${s})` : s;
245
+ return i ? `(${c})` : c;
242
246
  } catch {
243
- const s = j(e), c = t != null && t.useSuffix ? le(s, r) : { power: 0, suffix: "" }, u = ge(
244
- K(s, c.power),
247
+ const c = C(e), s = t != null && t.useSuffix ? he(c, r) : { power: 0, suffix: "" }, u = De(
248
+ G(c, s.power),
245
249
  {
246
250
  locale: r,
247
251
  minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
248
252
  maximumFractionDigits: (t == null ? void 0 : t.maximumFractionDigits) ?? 2,
249
253
  useGrouping: (t == null ? void 0 : t.useGrouping) ?? !0
250
254
  }
251
- ), l = `${n} ${u}${c.suffix}`;
255
+ ), l = `${n} ${u}${s.suffix}`;
252
256
  return a ? t != null && t.negativeInParentheses ? `(${l})` : `-${l}` : l;
253
257
  }
254
258
  }
255
- function Je(e, t) {
259
+ function ut(e, t) {
256
260
  if (e == null || Number.isNaN(e))
257
261
  return "";
258
- const r = M(t == null ? void 0 : t.locale), a = (t == null ? void 0 : t.alreadyPercent) ?? (t == null ? void 0 : t.percentValueMode) === "whole" ? K(e, 2) : e;
259
- return b(a, S(r, {
262
+ const r = I(t == null ? void 0 : t.locale), a = (t == null ? void 0 : t.alreadyPercent) ?? (t == null ? void 0 : t.percentValueMode) === "whole" ? G(e, 2) : e;
263
+ return M(a, D(r, {
260
264
  style: "percent",
261
265
  minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
262
266
  maximumFractionDigits: (t == null ? void 0 : t.maximumFractionDigits) ?? 2,
263
267
  useGrouping: (t == null ? void 0 : t.useGrouping) ?? !0
264
268
  }));
265
269
  }
266
- function Qe(e, t) {
270
+ function lt(e, t) {
267
271
  if (e == null || Number.isNaN(e))
268
272
  return "";
269
- const r = M(t == null ? void 0 : t.locale);
270
- return b(e, S(r, {
273
+ const r = I(t == null ? void 0 : t.locale);
274
+ return M(e, D(r, {
271
275
  notation: "scientific",
272
276
  minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
273
277
  maximumFractionDigits: (t == null ? void 0 : t.maximumFractionDigits) ?? 2
274
278
  }));
275
279
  }
276
- function et(e, t) {
280
+ function dr(e, t) {
281
+ const r = t ?? "auto", n = r === "never" ? C(e) : e, a = !O(n) && (r === "always" || r === "exceptZero" && !lr(n));
282
+ return { value: n, plus: a };
283
+ }
284
+ function Pa(e) {
285
+ if (!e || !("signDisplay" in e)) return e;
286
+ const { signDisplay: t, ...r } = e;
287
+ return r;
288
+ }
289
+ function mt(e, t) {
277
290
  if (e == null || Number.isNaN(e))
278
291
  return "";
279
- const r = t.scale === void 0 ? e : Ge(e, t.scale), n = t.negativeStyle === "parentheses" && G(r), a = n ? j(r) : r, i = {
292
+ const r = t.scale === void 0 ? e : ot(e, t.scale), n = dr(r, t.signDisplay), a = n.value, i = n.plus ? "+" : "", o = t.negativeStyle === "parentheses" && O(a), c = o ? C(a) : a, s = {
280
293
  style: t.type === "number" ? "decimal" : t.type,
281
294
  locale: t.locale,
282
295
  currency: t.currency,
@@ -286,42 +299,42 @@ function et(e, t) {
286
299
  percentValueMode: t.percentValueMode,
287
300
  useSuffix: t.compact
288
301
  };
289
- let o;
302
+ let u;
290
303
  switch (t.type) {
291
304
  case "currency":
292
- o = Xe(a, i);
305
+ u = ct(c, s);
293
306
  break;
294
307
  case "percent":
295
- o = Je(a, i);
308
+ u = ut(c, s);
296
309
  break;
297
310
  case "scientific":
298
- o = Qe(a, i);
311
+ u = lt(c, s);
299
312
  break;
300
313
  default:
301
- o = ge(a, i);
314
+ u = De(c, s);
302
315
  break;
303
316
  }
304
- const s = `${t.prefix ?? ""}${o}${t.suffix ?? ""}`;
305
- return n ? `(${s})` : s;
317
+ const l = `${t.prefix ?? ""}${i}${u}${t.suffix ?? ""}`;
318
+ return o ? `(${l})` : l;
306
319
  }
307
- function ga(e, t) {
308
- return t.type === "duration" ? e == null ? "" : Ve(e, t) : et(e, t);
320
+ function La(e, t) {
321
+ return t.type === "duration" ? e == null ? "" : it(e, t) : mt(e, t);
309
322
  }
310
- function ha(e, t, r = "en-US") {
323
+ function ja(e, t, r = "en-US") {
311
324
  if (e == null || typeof e == "number" && isNaN(e))
312
325
  return "";
313
326
  if ((t == null ? void 0 : t.style) === "duration")
314
- return Ve(e, {
327
+ return it(e, {
315
328
  ...t.duration,
316
329
  prefix: t.prefix,
317
330
  suffix: t.suffix,
318
331
  negativeStyle: t.negativeStyle
319
332
  });
320
- const n = M((t == null ? void 0 : t.locale) || r), a = (t == null ? void 0 : t.style) || "decimal", i = a === "decimal" ? "number" : a;
321
- return i === "currency" && S(n, {
333
+ const n = I((t == null ? void 0 : t.locale) || r), a = (t == null ? void 0 : t.style) || "decimal", i = a === "decimal" ? "number" : a;
334
+ return i === "currency" && D(n, {
322
335
  style: "currency",
323
336
  currency: (t == null ? void 0 : t.currency) || "USD"
324
- }), et(e, {
337
+ }), mt(e, {
325
338
  type: i,
326
339
  locale: n,
327
340
  currency: i === "currency" ? (t == null ? void 0 : t.currency) || "USD" : void 0,
@@ -336,7 +349,7 @@ function ha(e, t, r = "en-US") {
336
349
  suffix: t == null ? void 0 : t.suffix
337
350
  });
338
351
  }
339
- function pa(e, t, r) {
352
+ function Ka(e, t, r) {
340
353
  const n = {
341
354
  style: t === "currency" ? "currency" : t === "percent" ? "percent" : "decimal",
342
355
  locale: r == null ? void 0 : r.locale,
@@ -351,67 +364,67 @@ function pa(e, t, r) {
351
364
  };
352
365
  switch (t) {
353
366
  case "currency":
354
- return Xe(e, n);
367
+ return ct(e, n);
355
368
  case "percent":
356
- return Je(e, n);
369
+ return ut(e, n);
357
370
  case "scientific":
358
- return Qe(e, n);
371
+ return lt(e, n);
359
372
  default:
360
- return ge(e, n);
373
+ return De(e, n);
361
374
  }
362
375
  }
363
- const wa = 6048e5, Ta = 864e5, tt = 6e4, rt = 36e5, Sa = 525600, va = 43200, xa = 1440;
364
- function Da(e, t) {
365
- const n = Xt(e);
376
+ const Ha = 6048e5, Za = 864e5, dt = 6e4, ft = 36e5, qa = 525600, Ba = 43200, Va = 1440;
377
+ function Ga(e, t) {
378
+ const n = hr(e);
366
379
  let a;
367
380
  if (n.date) {
368
- const c = Jt(n.date, 2);
369
- a = Qt(c.restDateString, c.year);
381
+ const s = pr(n.date, 2);
382
+ a = wr(s.restDateString, s.year);
370
383
  }
371
384
  if (!a || isNaN(a.getTime()))
372
385
  return /* @__PURE__ */ new Date(NaN);
373
386
  const i = a.getTime();
374
- let o = 0, s;
375
- if (n.time && (o = er(n.time), isNaN(o)))
387
+ let o = 0, c;
388
+ if (n.time && (o = Tr(n.time), isNaN(o)))
376
389
  return /* @__PURE__ */ new Date(NaN);
377
390
  if (n.timezone) {
378
- if (s = tr(n.timezone), isNaN(s))
391
+ if (c = Sr(n.timezone), isNaN(c))
379
392
  return /* @__PURE__ */ new Date(NaN);
380
393
  } else {
381
- const c = new Date(i + o), u = /* @__PURE__ */ new Date(0);
394
+ const s = new Date(i + o), u = /* @__PURE__ */ new Date(0);
382
395
  return u.setFullYear(
383
- c.getUTCFullYear(),
384
- c.getUTCMonth(),
385
- c.getUTCDate()
396
+ s.getUTCFullYear(),
397
+ s.getUTCMonth(),
398
+ s.getUTCDate()
386
399
  ), u.setHours(
387
- c.getUTCHours(),
388
- c.getUTCMinutes(),
389
- c.getUTCSeconds(),
390
- c.getUTCMilliseconds()
400
+ s.getUTCHours(),
401
+ s.getUTCMinutes(),
402
+ s.getUTCSeconds(),
403
+ s.getUTCMilliseconds()
391
404
  ), u;
392
405
  }
393
- return new Date(i + o + s);
406
+ return new Date(i + o + c);
394
407
  }
395
- const A = {
408
+ const L = {
396
409
  dateTimeDelimiter: /[T ]/,
397
410
  timeZoneDelimiter: /[Z ]/i,
398
411
  timezone: /([Z+-].*)$/
399
- }, Vt = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, Gt = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, Wt = /^([+-])(\d{2})(?::?(\d{2}))?$/;
400
- function Xt(e) {
401
- const t = {}, r = e.split(A.dateTimeDelimiter);
412
+ }, fr = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, yr = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, gr = /^([+-])(\d{2})(?::?(\d{2}))?$/;
413
+ function hr(e) {
414
+ const t = {}, r = e.split(L.dateTimeDelimiter);
402
415
  let n;
403
416
  if (r.length > 2)
404
417
  return t;
405
- if (/:/.test(r[0]) ? n = r[0] : (t.date = r[0], n = r[1], A.timeZoneDelimiter.test(t.date) && (t.date = e.split(A.timeZoneDelimiter)[0], n = e.substr(
418
+ if (/:/.test(r[0]) ? n = r[0] : (t.date = r[0], n = r[1], L.timeZoneDelimiter.test(t.date) && (t.date = e.split(L.timeZoneDelimiter)[0], n = e.substr(
406
419
  t.date.length,
407
420
  e.length
408
421
  ))), n) {
409
- const a = A.timezone.exec(n);
422
+ const a = L.timezone.exec(n);
410
423
  a ? (t.time = n.replace(a[1], ""), t.timezone = a[1]) : t.time = n;
411
424
  }
412
425
  return t;
413
426
  }
414
- function Jt(e, t) {
427
+ function pr(e, t) {
415
428
  const r = new RegExp(
416
429
  "^(?:(\\d{4}|[+-]\\d{" + (4 + t) + "})|(\\d{2}|[+-]\\d{" + (2 + t) + "})$)"
417
430
  ), n = e.match(r);
@@ -422,67 +435,67 @@ function Jt(e, t) {
422
435
  restDateString: e.slice((n[1] || n[2]).length)
423
436
  };
424
437
  }
425
- function Qt(e, t) {
438
+ function wr(e, t) {
426
439
  if (t === null) return /* @__PURE__ */ new Date(NaN);
427
- const r = e.match(Vt);
440
+ const r = e.match(fr);
428
441
  if (!r) return /* @__PURE__ */ new Date(NaN);
429
- const n = !!r[4], a = $(r[1]), i = $(r[2]) - 1, o = $(r[3]), s = $(r[4]), c = $(r[5]) - 1;
442
+ const n = !!r[4], a = E(r[1]), i = E(r[2]) - 1, o = E(r[3]), c = E(r[4]), s = E(r[5]) - 1;
430
443
  if (n)
431
- return or(t, s, c) ? rr(t, s, c) : /* @__PURE__ */ new Date(NaN);
444
+ return _r(t, c, s) ? Dr(t, c, s) : /* @__PURE__ */ new Date(NaN);
432
445
  {
433
446
  const u = /* @__PURE__ */ new Date(0);
434
- return !ar(t, i, o) || !ir(t, a) ? /* @__PURE__ */ new Date(NaN) : (u.setUTCFullYear(t, i, Math.max(a, o)), u);
447
+ return !vr(t, i, o) || !kr(t, a) ? /* @__PURE__ */ new Date(NaN) : (u.setUTCFullYear(t, i, Math.max(a, o)), u);
435
448
  }
436
449
  }
437
- function $(e) {
450
+ function E(e) {
438
451
  return e ? parseInt(e) : 1;
439
452
  }
440
- function er(e) {
441
- const t = e.match(Gt);
453
+ function Tr(e) {
454
+ const t = e.match(yr);
442
455
  if (!t) return NaN;
443
- const r = ee(t[1]), n = ee(t[2]), a = ee(t[3]);
444
- return sr(r, n, a) ? r * rt + n * tt + a * 1e3 : NaN;
456
+ const r = ae(t[1]), n = ae(t[2]), a = ae(t[3]);
457
+ return br(r, n, a) ? r * ft + n * dt + a * 1e3 : NaN;
445
458
  }
446
- function ee(e) {
459
+ function ae(e) {
447
460
  return e && parseFloat(e.replace(",", ".")) || 0;
448
461
  }
449
- function tr(e) {
462
+ function Sr(e) {
450
463
  if (e === "Z") return 0;
451
- const t = e.match(Wt);
464
+ const t = e.match(gr);
452
465
  if (!t) return 0;
453
466
  const r = t[1] === "+" ? -1 : 1, n = parseInt(t[2]), a = t[3] && parseInt(t[3]) || 0;
454
- return cr(n, a) ? r * (n * rt + a * tt) : NaN;
467
+ return $r(n, a) ? r * (n * ft + a * dt) : NaN;
455
468
  }
456
- function rr(e, t, r) {
469
+ function Dr(e, t, r) {
457
470
  const n = /* @__PURE__ */ new Date(0);
458
471
  n.setUTCFullYear(e, 0, 4);
459
472
  const a = n.getUTCDay() || 7, i = (t - 1) * 7 + r + 1 - a;
460
473
  return n.setUTCDate(n.getUTCDate() + i), n;
461
474
  }
462
- const nr = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
463
- function nt(e) {
475
+ const xr = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
476
+ function yt(e) {
464
477
  return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
465
478
  }
466
- function ar(e, t, r) {
467
- return t >= 0 && t <= 11 && r >= 1 && r <= (nr[t] || (nt(e) ? 29 : 28));
479
+ function vr(e, t, r) {
480
+ return t >= 0 && t <= 11 && r >= 1 && r <= (xr[t] || (yt(e) ? 29 : 28));
468
481
  }
469
- function ir(e, t) {
470
- return t >= 1 && t <= (nt(e) ? 366 : 365);
482
+ function kr(e, t) {
483
+ return t >= 1 && t <= (yt(e) ? 366 : 365);
471
484
  }
472
- function or(e, t, r) {
485
+ function _r(e, t, r) {
473
486
  return t >= 1 && t <= 53 && r >= 0 && r <= 6;
474
487
  }
475
- function sr(e, t, r) {
488
+ function br(e, t, r) {
476
489
  return e === 24 ? t === 0 && r === 0 : r >= 0 && r < 60 && t >= 0 && t < 60 && e >= 0 && e < 25;
477
490
  }
478
- function cr(e, t) {
491
+ function $r(e, t) {
479
492
  return t >= 0 && t <= 59;
480
493
  }
481
- function ur(e, t) {
482
- const r = yr(t);
483
- return "formatToParts" in r ? mr(r, e) : dr(r, e);
494
+ function Mr(e, t) {
495
+ const r = Cr(t);
496
+ return "formatToParts" in r ? Ir(r, e) : Er(r, e);
484
497
  }
485
- const lr = {
498
+ const Nr = {
486
499
  year: 0,
487
500
  month: 1,
488
501
  day: 2,
@@ -490,11 +503,11 @@ const lr = {
490
503
  minute: 4,
491
504
  second: 5
492
505
  };
493
- function mr(e, t) {
506
+ function Ir(e, t) {
494
507
  try {
495
508
  const r = e.formatToParts(t), n = [];
496
509
  for (let a = 0; a < r.length; a++) {
497
- const i = lr[r[a].type];
510
+ const i = Nr[r[a].type];
498
511
  i !== void 0 && (n[i] = parseInt(r[a].value, 10));
499
512
  }
500
513
  return n;
@@ -504,7 +517,7 @@ function mr(e, t) {
504
517
  throw r;
505
518
  }
506
519
  }
507
- function dr(e, t) {
520
+ function Er(e, t) {
508
521
  const r = e.format(t), n = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(r);
509
522
  return [
510
523
  parseInt(n[3], 10),
@@ -515,7 +528,7 @@ function dr(e, t) {
515
528
  parseInt(n[6], 10)
516
529
  ];
517
530
  }
518
- const te = {}, _e = new Intl.DateTimeFormat("en-US", {
531
+ const ie = {}, Ee = new Intl.DateTimeFormat("en-US", {
519
532
  hourCycle: "h23",
520
533
  timeZone: "America/New_York",
521
534
  year: "numeric",
@@ -524,9 +537,9 @@ const te = {}, _e = new Intl.DateTimeFormat("en-US", {
524
537
  hour: "2-digit",
525
538
  minute: "2-digit",
526
539
  second: "2-digit"
527
- }).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), fr = _e === "06/25/2014, 00:00:00" || _e === "‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";
528
- function yr(e) {
529
- return te[e] || (te[e] = fr ? new Intl.DateTimeFormat("en-US", {
540
+ }).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), Fr = Ee === "06/25/2014, 00:00:00" || Ee === "‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";
541
+ function Cr(e) {
542
+ return ie[e] || (ie[e] = Fr ? new Intl.DateTimeFormat("en-US", {
530
543
  hourCycle: "h23",
531
544
  timeZone: e,
532
545
  year: "numeric",
@@ -544,74 +557,74 @@ function yr(e) {
544
557
  hour: "2-digit",
545
558
  minute: "2-digit",
546
559
  second: "2-digit"
547
- })), te[e];
560
+ })), ie[e];
548
561
  }
549
- function he(e, t, r, n, a, i, o) {
550
- const s = /* @__PURE__ */ new Date(0);
551
- return s.setUTCFullYear(e, t, r), s.setUTCHours(n, a, i, o), s;
562
+ function xe(e, t, r, n, a, i, o) {
563
+ const c = /* @__PURE__ */ new Date(0);
564
+ return c.setUTCFullYear(e, t, r), c.setUTCHours(n, a, i, o), c;
552
565
  }
553
- const be = 36e5, gr = 6e4, re = {
566
+ const Fe = 36e5, Ur = 6e4, oe = {
554
567
  timezoneZ: /^(Z)$/,
555
568
  timezoneHH: /^([+-]\d{2})$/,
556
569
  timezoneHHMM: /^([+-])(\d{2}):?(\d{2})$/
557
570
  };
558
- function at(e, t, r) {
571
+ function gt(e, t, r) {
559
572
  if (!e)
560
573
  return 0;
561
- let n = re.timezoneZ.exec(e);
574
+ let n = oe.timezoneZ.exec(e);
562
575
  if (n)
563
576
  return 0;
564
577
  let a, i;
565
- if (n = re.timezoneHH.exec(e), n)
566
- return a = parseInt(n[1], 10), Ne(a) ? -(a * be) : NaN;
567
- if (n = re.timezoneHHMM.exec(e), n) {
578
+ if (n = oe.timezoneHH.exec(e), n)
579
+ return a = parseInt(n[1], 10), Ce(a) ? -(a * Fe) : NaN;
580
+ if (n = oe.timezoneHHMM.exec(e), n) {
568
581
  a = parseInt(n[2], 10);
569
582
  const o = parseInt(n[3], 10);
570
- return Ne(a, o) ? (i = Math.abs(a) * be + o * gr, n[1] === "+" ? -i : i) : NaN;
583
+ return Ce(a, o) ? (i = Math.abs(a) * Fe + o * Ur, n[1] === "+" ? -i : i) : NaN;
571
584
  }
572
- if (wr(e)) {
585
+ if (Or(e)) {
573
586
  t = new Date(t || Date.now());
574
- const o = r ? t : hr(t), s = me(o, e);
575
- return -(r ? s : pr(t, s, e));
587
+ const o = r ? t : zr(t), c = pe(o, e);
588
+ return -(r ? c : Ar(t, c, e));
576
589
  }
577
590
  return NaN;
578
591
  }
579
- function hr(e) {
580
- return he(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds());
592
+ function zr(e) {
593
+ return xe(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds());
581
594
  }
582
- function me(e, t) {
583
- const r = ur(e, t), n = he(r[0], r[1] - 1, r[2], r[3] % 24, r[4], r[5], 0).getTime();
595
+ function pe(e, t) {
596
+ const r = Mr(e, t), n = xe(r[0], r[1] - 1, r[2], r[3] % 24, r[4], r[5], 0).getTime();
584
597
  let a = e.getTime();
585
598
  const i = a % 1e3;
586
599
  return a -= i >= 0 ? i : 1e3 + i, n - a;
587
600
  }
588
- function pr(e, t, r) {
601
+ function Ar(e, t, r) {
589
602
  let a = e.getTime() - t;
590
- const i = me(new Date(a), r);
603
+ const i = pe(new Date(a), r);
591
604
  if (t === i)
592
605
  return t;
593
606
  a -= i - t;
594
- const o = me(new Date(a), r);
607
+ const o = pe(new Date(a), r);
595
608
  return i === o ? i : Math.max(i, o);
596
609
  }
597
- function Ne(e, t) {
610
+ function Ce(e, t) {
598
611
  return -23 <= e && e <= 23 && (t == null || 0 <= t && t <= 59);
599
612
  }
600
- const Me = {};
601
- function wr(e) {
602
- if (Me[e])
613
+ const Ue = {};
614
+ function Or(e) {
615
+ if (Ue[e])
603
616
  return !0;
604
617
  try {
605
- return new Intl.DateTimeFormat(void 0, { timeZone: e }), Me[e] = !0, !0;
618
+ return new Intl.DateTimeFormat(void 0, { timeZone: e }), Ue[e] = !0, !0;
606
619
  } catch {
607
620
  return !1;
608
621
  }
609
622
  }
610
- function $e(e) {
623
+ function ze(e) {
611
624
  const t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()));
612
625
  return t.setUTCFullYear(e.getFullYear()), +e - +t;
613
626
  }
614
- const it = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, ne = 36e5, Ie = 6e4, Tr = 2, p = {
627
+ const ht = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, se = 36e5, Ae = 6e4, Rr = 2, w = {
615
628
  dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,
616
629
  datePattern: /^([0-9W+-]+)(.*)/,
617
630
  // year tokens
@@ -643,14 +656,14 @@ const it = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)
643
656
  HHMM: /^(\d{2}):?(\d{2}([.,]\d*)?)$/,
644
657
  HHMMSS: /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,
645
658
  // time zone tokens (to identify the presence of a tz)
646
- timeZone: it
659
+ timeZone: ht
647
660
  };
648
- function Ee(e, t = {}) {
661
+ function Oe(e, t = {}) {
649
662
  if (arguments.length < 1)
650
663
  throw new TypeError("1 argument required, but only " + arguments.length + " present");
651
664
  if (e === null)
652
665
  return /* @__PURE__ */ new Date(NaN);
653
- const r = t.additionalDigits == null ? Tr : Number(t.additionalDigits);
666
+ const r = t.additionalDigits == null ? Rr : Number(t.additionalDigits);
654
667
  if (r !== 2 && r !== 1 && r !== 0)
655
668
  throw new RangeError("additionalDigits must be 0, 1 or 2");
656
669
  if (e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]")
@@ -659,36 +672,36 @@ function Ee(e, t = {}) {
659
672
  return new Date(e);
660
673
  if (Object.prototype.toString.call(e) !== "[object String]")
661
674
  return /* @__PURE__ */ new Date(NaN);
662
- const n = Sr(e), { year: a, restDateString: i } = vr(n.date, r), o = xr(i, a);
675
+ const n = Yr(e), { year: a, restDateString: i } = Pr(n.date, r), o = Lr(i, a);
663
676
  if (o === null || isNaN(o.getTime()))
664
677
  return /* @__PURE__ */ new Date(NaN);
665
678
  if (o) {
666
- const s = o.getTime();
667
- let c = 0, u;
668
- if (n.time && (c = Dr(n.time), c === null || isNaN(c)))
679
+ const c = o.getTime();
680
+ let s = 0, u;
681
+ if (n.time && (s = jr(n.time), s === null || isNaN(s)))
669
682
  return /* @__PURE__ */ new Date(NaN);
670
683
  if (n.timeZone || t.timeZone) {
671
- if (u = at(n.timeZone || t.timeZone, new Date(s + c)), isNaN(u))
684
+ if (u = gt(n.timeZone || t.timeZone, new Date(c + s)), isNaN(u))
672
685
  return /* @__PURE__ */ new Date(NaN);
673
686
  } else
674
- u = $e(new Date(s + c)), u = $e(new Date(s + c + u));
675
- return new Date(s + c + u);
687
+ u = ze(new Date(c + s)), u = ze(new Date(c + s + u));
688
+ return new Date(c + s + u);
676
689
  } else
677
690
  return /* @__PURE__ */ new Date(NaN);
678
691
  }
679
- function Sr(e) {
692
+ function Yr(e) {
680
693
  const t = {};
681
- let r = p.dateTimePattern.exec(e), n;
682
- if (r ? (t.date = r[1], n = r[3]) : (r = p.datePattern.exec(e), r ? (t.date = r[1], n = r[2]) : (t.date = null, n = e)), n) {
683
- const a = p.timeZone.exec(n);
694
+ let r = w.dateTimePattern.exec(e), n;
695
+ if (r ? (t.date = r[1], n = r[3]) : (r = w.datePattern.exec(e), r ? (t.date = r[1], n = r[2]) : (t.date = null, n = e)), n) {
696
+ const a = w.timeZone.exec(n);
684
697
  a ? (t.time = n.replace(a[1], ""), t.timeZone = a[1].trim()) : t.time = n;
685
698
  }
686
699
  return t;
687
700
  }
688
- function vr(e, t) {
701
+ function Pr(e, t) {
689
702
  if (e) {
690
- const r = p.YYY[t], n = p.YYYYY[t];
691
- let a = p.YYYY.exec(e) || n.exec(e);
703
+ const r = w.YYY[t], n = w.YYYYY[t];
704
+ let a = w.YYYY.exec(e) || n.exec(e);
692
705
  if (a) {
693
706
  const i = a[1];
694
707
  return {
@@ -696,7 +709,7 @@ function vr(e, t) {
696
709
  restDateString: e.slice(i.length)
697
710
  };
698
711
  }
699
- if (a = p.YY.exec(e) || r.exec(e), a) {
712
+ if (a = w.YY.exec(e) || r.exec(e), a) {
700
713
  const i = a[1];
701
714
  return {
702
715
  year: parseInt(i, 10) * 100,
@@ -708,155 +721,339 @@ function vr(e, t) {
708
721
  year: null
709
722
  };
710
723
  }
711
- function xr(e, t) {
724
+ function Lr(e, t) {
712
725
  if (t === null)
713
726
  return null;
714
727
  let r, n, a;
715
728
  if (!e || !e.length)
716
729
  return r = /* @__PURE__ */ new Date(0), r.setUTCFullYear(t), r;
717
- let i = p.MM.exec(e);
730
+ let i = w.MM.exec(e);
718
731
  if (i)
719
- return r = /* @__PURE__ */ new Date(0), n = parseInt(i[1], 10) - 1, Ce(t, n) ? (r.setUTCFullYear(t, n), r) : /* @__PURE__ */ new Date(NaN);
720
- if (i = p.DDD.exec(e), i) {
732
+ return r = /* @__PURE__ */ new Date(0), n = parseInt(i[1], 10) - 1, Ye(t, n) ? (r.setUTCFullYear(t, n), r) : /* @__PURE__ */ new Date(NaN);
733
+ if (i = w.DDD.exec(e), i) {
721
734
  r = /* @__PURE__ */ new Date(0);
722
735
  const o = parseInt(i[1], 10);
723
- return br(t, o) ? (r.setUTCFullYear(t, 0, o), r) : /* @__PURE__ */ new Date(NaN);
736
+ return Zr(t, o) ? (r.setUTCFullYear(t, 0, o), r) : /* @__PURE__ */ new Date(NaN);
724
737
  }
725
- if (i = p.MMDD.exec(e), i) {
738
+ if (i = w.MMDD.exec(e), i) {
726
739
  r = /* @__PURE__ */ new Date(0), n = parseInt(i[1], 10) - 1;
727
740
  const o = parseInt(i[2], 10);
728
- return Ce(t, n, o) ? (r.setUTCFullYear(t, n, o), r) : /* @__PURE__ */ new Date(NaN);
741
+ return Ye(t, n, o) ? (r.setUTCFullYear(t, n, o), r) : /* @__PURE__ */ new Date(NaN);
729
742
  }
730
- if (i = p.Www.exec(e), i)
731
- return a = parseInt(i[1], 10) - 1, Ue(a) ? Fe(t, a) : /* @__PURE__ */ new Date(NaN);
732
- if (i = p.WwwD.exec(e), i) {
743
+ if (i = w.Www.exec(e), i)
744
+ return a = parseInt(i[1], 10) - 1, Pe(a) ? Re(t, a) : /* @__PURE__ */ new Date(NaN);
745
+ if (i = w.WwwD.exec(e), i) {
733
746
  a = parseInt(i[1], 10) - 1;
734
747
  const o = parseInt(i[2], 10) - 1;
735
- return Ue(a, o) ? Fe(t, a, o) : /* @__PURE__ */ new Date(NaN);
748
+ return Pe(a, o) ? Re(t, a, o) : /* @__PURE__ */ new Date(NaN);
736
749
  }
737
750
  return null;
738
751
  }
739
- function Dr(e) {
740
- let t, r, n = p.HH.exec(e);
752
+ function jr(e) {
753
+ let t, r, n = w.HH.exec(e);
741
754
  if (n)
742
- return t = parseFloat(n[1].replace(",", ".")), ae(t) ? t % 24 * ne : NaN;
743
- if (n = p.HHMM.exec(e), n)
744
- return t = parseInt(n[1], 10), r = parseFloat(n[2].replace(",", ".")), ae(t, r) ? t % 24 * ne + r * Ie : NaN;
745
- if (n = p.HHMMSS.exec(e), n) {
755
+ return t = parseFloat(n[1].replace(",", ".")), ce(t) ? t % 24 * se : NaN;
756
+ if (n = w.HHMM.exec(e), n)
757
+ return t = parseInt(n[1], 10), r = parseFloat(n[2].replace(",", ".")), ce(t, r) ? t % 24 * se + r * Ae : NaN;
758
+ if (n = w.HHMMSS.exec(e), n) {
746
759
  t = parseInt(n[1], 10), r = parseInt(n[2], 10);
747
760
  const a = parseFloat(n[3].replace(",", "."));
748
- return ae(t, r, a) ? t % 24 * ne + r * Ie + a * 1e3 : NaN;
761
+ return ce(t, r, a) ? t % 24 * se + r * Ae + a * 1e3 : NaN;
749
762
  }
750
763
  return null;
751
764
  }
752
- function Fe(e, t, r) {
765
+ function Re(e, t, r) {
753
766
  t = t || 0, r = r || 0;
754
767
  const n = /* @__PURE__ */ new Date(0);
755
768
  n.setUTCFullYear(e, 0, 4);
756
769
  const a = n.getUTCDay() || 7, i = t * 7 + r + 1 - a;
757
770
  return n.setUTCDate(n.getUTCDate() + i), n;
758
771
  }
759
- const kr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], _r = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
760
- function ot(e) {
772
+ const Kr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Hr = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
773
+ function pt(e) {
761
774
  return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
762
775
  }
763
- function Ce(e, t, r) {
776
+ function Ye(e, t, r) {
764
777
  if (t < 0 || t > 11)
765
778
  return !1;
766
779
  if (r != null) {
767
780
  if (r < 1)
768
781
  return !1;
769
- const n = ot(e);
770
- if (n && r > _r[t] || !n && r > kr[t])
782
+ const n = pt(e);
783
+ if (n && r > Hr[t] || !n && r > Kr[t])
771
784
  return !1;
772
785
  }
773
786
  return !0;
774
787
  }
775
- function br(e, t) {
788
+ function Zr(e, t) {
776
789
  if (t < 1)
777
790
  return !1;
778
- const r = ot(e);
791
+ const r = pt(e);
779
792
  return !(r && t > 366 || !r && t > 365);
780
793
  }
781
- function Ue(e, t) {
794
+ function Pe(e, t) {
782
795
  return !(e < 0 || e > 52 || t != null && (t < 0 || t > 6));
783
796
  }
784
- function ae(e, t, r) {
797
+ function ce(e, t, r) {
785
798
  return !(e < 0 || e >= 25 || t != null && (t < 0 || t >= 60) || r != null && (r < 0 || r >= 60));
786
799
  }
787
- function W(e, t, r) {
788
- if (typeof e == "string" && !e.match(it))
789
- return Ee(e, { ...r, timeZone: t });
790
- e = Ee(e, r);
791
- const n = he(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()).getTime(), a = at(t, new Date(n));
800
+ function ee(e, t, r) {
801
+ if (typeof e == "string" && !e.match(ht))
802
+ return Oe(e, { ...r, timeZone: t });
803
+ e = Oe(e, r);
804
+ const n = xe(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()).getTime(), a = gt(t, new Date(n));
792
805
  return new Date(n + a);
793
806
  }
794
- const Nr = 5 * 1024 * 1024, ka = 64 * 1024 * 1024, H = f.number().int().positive().max(Number.MAX_SAFE_INTEGER), R = f.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER), Z = R.refine((e) => e > 0), Mr = (e) => !!e && e !== "." && e !== ".." && !e.includes("/") && !e.includes("\\");
795
- function k(e, t) {
807
+ const qr = 5 * 1024 * 1024, Wa = 64 * 1024 * 1024, W = f.number().int().positive().max(Number.MAX_SAFE_INTEGER), H = f.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER), X = H.refine((e) => e > 0), Br = (e) => !!e && e !== "." && e !== ".." && !e.includes("/") && !e.includes("\\");
808
+ function _(e, t) {
796
809
  const r = t.split("/");
797
- if (r.length !== 5 || r[0] !== "exports" || r[1] !== e || r[2] !== "attempts" || !r.every(Mr))
810
+ if (r.length !== 5 || r[0] !== "exports" || r[1] !== e || r[2] !== "attempts" || !r.every(Br))
798
811
  throw new Error("Invalid Matrix export artifact namespace.");
799
812
  return { attemptId: r[3], filename: r[4] };
800
813
  }
801
- function _a(e, t, r) {
814
+ function Xa(e, t, r) {
802
815
  const n = `exports/${e}/attempts/${t}/${r}`;
803
- return k(e, n), n;
816
+ return _(e, n), n;
804
817
  }
805
- const ba = f.object({
818
+ const Ja = f.object({
806
819
  acquisition: f.literal("continuation"),
807
820
  jobId: f.string().min(1),
808
- sequence: Z,
809
- deadlineAt: H
810
- }), $r = [
821
+ sequence: X,
822
+ deadlineAt: W
823
+ }), Vr = [
811
824
  "application/json",
812
- ...Ke.map((e) => He(e).partContentType)
813
- ], Ir = f.object({
825
+ ...tt.map((e) => rt(e).partContentType)
826
+ ], Gr = f.object({
814
827
  key: f.string(),
815
828
  content: f.string(),
816
- contentType: f.enum($r),
829
+ contentType: f.enum(Vr),
817
830
  encoding: f.literal("gzip-base64").optional()
818
831
  // Transport-only compression: JSON (layout, sheet layout) and Excel rows. CSV travels as it always has.
819
- }).refine((e) => !e.encoding || e.contentType === "application/json" || e.contentType === He("xlsx").partContentType, "Unsupported Matrix artifact encoding."), Er = f.discriminatedUnion("kind", [
820
- f.object({ kind: f.literal("work"), sequence: Z, checkpointKey: f.string(), objects: f.array(Ir).min(2).max(4), deadlineAt: H }),
821
- f.object({ kind: f.literal("committed"), sequence: Z, done: f.boolean(), deadlineAt: H })
832
+ }).refine((e) => !e.encoding || e.contentType === "application/json" || e.contentType === rt("xlsx").partContentType, "Unsupported Matrix artifact encoding."), Wr = f.discriminatedUnion("kind", [
833
+ f.object({ kind: f.literal("work"), sequence: X, checkpointKey: f.string(), objects: f.array(Gr).min(2).max(4), deadlineAt: W }),
834
+ f.object({ kind: f.literal("committed"), sequence: X, done: f.boolean(), deadlineAt: W })
822
835
  ]);
823
- function Fr(e) {
836
+ function Xr(e) {
824
837
  const t = JSON.stringify(e);
825
- if (t === void 0 || new TextEncoder().encode(t).byteLength > Nr)
838
+ if (t === void 0 || new TextEncoder().encode(t).byteLength > qr)
826
839
  throw new RangeError("Matrix export batch exceeds its transport byte limit.");
827
840
  }
828
- function Na(e, t) {
829
- const r = Er.parse(e);
830
- if (Fr(e), r.deadlineAt !== t.deadlineAt) throw new Error("Matrix deadline does not match the job.");
841
+ function Qa(e, t) {
842
+ const r = Wr.parse(e);
843
+ if (Xr(e), r.deadlineAt !== t.deadlineAt) throw new Error("Matrix deadline does not match the job.");
831
844
  if (r.sequence !== t.sequence + (r.kind === "committed" ? 1 : 0))
832
845
  throw new Error("Invalid Matrix batch sequence.");
833
846
  if (r.kind === "work") {
834
- k(t.jobId, r.checkpointKey);
847
+ _(t.jobId, r.checkpointKey);
835
848
  for (const n of r.objects)
836
- k(t.jobId, n.key);
849
+ _(t.jobId, n.key);
837
850
  }
838
851
  return r;
839
852
  }
840
- const Cr = f.object({
853
+ const Jr = f.object({
841
854
  acquisition: f.literal("continuation"),
842
- deadlineAt: H,
843
- chunks: f.array(f.object({ chunkNumber: Z, dataKey: f.string() })).min(1),
844
- totalRows: R,
845
- totalBytes: R,
855
+ deadlineAt: W,
856
+ chunks: f.array(f.object({ chunkNumber: X, dataKey: f.string() })).min(1),
857
+ totalRows: H,
858
+ totalBytes: H,
846
859
  fileKey: f.string().min(1).optional(),
847
- fileSize: R.optional(),
860
+ fileSize: H.optional(),
848
861
  /** The file the job writes; absent means CSV (manifests from before Excel). */
849
- format: f.enum(Ke).optional(),
862
+ format: f.enum(tt).optional(),
850
863
  /** Excel only: the sheet layout the layout batch stored, which compaction wraps the rows in. */
851
864
  sheetKey: f.string().min(1).optional()
852
865
  }).refine((e) => e.fileKey === void 0 == (e.fileSize === void 0), "Incomplete published Matrix artifact.").refine((e) => e.format === "xlsx" == (e.sheetKey !== void 0), "An Excel Matrix manifest names its sheet layout, and only it does.");
853
- function Ma(e, t, r) {
854
- const n = Cr.parse(e);
866
+ function ei(e, t, r) {
867
+ const n = Jr.parse(e);
855
868
  if (n.deadlineAt !== r) throw new Error("Matrix deadline does not match the job.");
856
869
  return n.chunks.forEach((a, i) => {
857
870
  if (a.chunkNumber !== i + 1) throw new Error("Invalid committed Matrix chunk order.");
858
- k(t, a.dataKey);
859
- }), n.fileKey !== void 0 && k(t, n.fileKey), n.sheetKey !== void 0 && k(t, n.sheetKey), n;
871
+ _(t, a.dataKey);
872
+ }), n.fileKey !== void 0 && _(t, n.fileKey), n.sheetKey !== void 0 && _(t, n.sheetKey), n;
873
+ }
874
+ const Qr = "en-US", Le = [
875
+ "compact",
876
+ "maximumFractionDigits",
877
+ "minimumFractionDigits",
878
+ "negativeStyle",
879
+ "type",
880
+ "useGrouping"
881
+ ];
882
+ function en(e) {
883
+ if (e.type !== "currency" || Object.prototype.hasOwnProperty.call(e, "currency") || Object.prototype.hasOwnProperty.call(e, "locale"))
884
+ return !1;
885
+ const t = Object.keys(e).sort();
886
+ return t.length === Le.length && Le.every(
887
+ (r, n) => t[n] === r
888
+ ) && typeof e.minimumFractionDigits == "number" && typeof e.maximumFractionDigits == "number" && e.useGrouping === !0 && e.negativeStyle === "minus" && typeof e.compact == "boolean";
889
+ }
890
+ function je(e) {
891
+ if (typeof e != "string")
892
+ return;
893
+ const t = e.trim();
894
+ if (!(!t || t.toLowerCase() === "none"))
895
+ return t;
896
+ }
897
+ function Z(e) {
898
+ if (!(typeof e != "number" || !Number.isFinite(e)))
899
+ return Math.max(0, Math.min(10, Math.trunc(e)));
900
+ }
901
+ function tn(e) {
902
+ return e === "currency" ? 2 : e === "percent" ? 1 : e === "scientific" ? 2 : 0;
903
+ }
904
+ function rn(e, t, r) {
905
+ const n = Z(t.minimumFractionDigits), a = Z(t.maximumFractionDigits);
906
+ if (typeof n == "number" || typeof a == "number") {
907
+ const c = n ?? 0, s = a ?? Math.max(c, 2);
908
+ return {
909
+ minimumFractionDigits: Math.min(c, s),
910
+ maximumFractionDigits: Math.max(c, s)
911
+ };
912
+ }
913
+ const i = Z(t.decimals);
914
+ if (typeof i == "number")
915
+ return {
916
+ minimumFractionDigits: i,
917
+ maximumFractionDigits: i
918
+ };
919
+ if (r != null && r.preserveOmittedProperties)
920
+ return {};
921
+ const o = tn(e);
922
+ return {
923
+ minimumFractionDigits: o,
924
+ maximumFractionDigits: o
925
+ };
926
+ }
927
+ function nn(e, t) {
928
+ if (!(typeof t != "string" || e === "percent" && t === "%"))
929
+ return t;
930
+ }
931
+ function Ke(e) {
932
+ const t = je(e.locale), r = je(e.currency), n = nn(e.type, e.suffix);
933
+ return {
934
+ ...e,
935
+ ...t !== e.locale ? { locale: t } : {},
936
+ ...r !== e.currency ? { currency: r } : {},
937
+ ...n !== e.suffix ? { suffix: n } : {}
938
+ };
939
+ }
940
+ function v(e, t, r) {
941
+ const n = { ...t, type: e };
942
+ if ((r == null ? void 0 : r.numericInput) === "canonical" && Q(n))
943
+ return Ke(n);
944
+ const a = rn(e, t, r), i = typeof t.prefix == "string" ? t.prefix : void 0, o = {
945
+ type: e,
946
+ locale: t.locale,
947
+ minimumFractionDigits: a.minimumFractionDigits,
948
+ maximumFractionDigits: a.maximumFractionDigits,
949
+ useGrouping: typeof t.useGrouping == "boolean" ? t.useGrouping : typeof t.thousandsSeparator == "boolean" ? t.thousandsSeparator : !0,
950
+ prefix: i,
951
+ suffix: t.suffix,
952
+ negativeStyle: t.negativeStyle || "minus",
953
+ compact: !!t.compact,
954
+ scale: typeof t.scale == "number" ? t.scale : void 0,
955
+ ...t.signDisplay ? { signDisplay: t.signDisplay } : {}
956
+ };
957
+ return e === "currency" && t.currency && (o.currency = t.currency), e === "percent" && (o.percentValueMode = t.percentValueMode || "fraction"), Ke(o);
958
+ }
959
+ function He(e) {
960
+ return {
961
+ type: "date",
962
+ locale: e.locale || Qr,
963
+ pattern: e.pattern,
964
+ // A stored pattern's token set and a preset carry to every reader (column formats ledger P5-45).
965
+ ...e.dialect ? { dialect: e.dialect } : {},
966
+ ...e.preset ? { preset: e.preset } : {},
967
+ relative: !!e.relative,
968
+ timezone: e.timezone,
969
+ sourceTimezone: e.sourceTimezone,
970
+ prefix: e.prefix,
971
+ suffix: e.suffix
972
+ };
973
+ }
974
+ function ue(e) {
975
+ return e === "millisecond" || e === "second" || e === "minute" || e === "hour" || e === "day";
976
+ }
977
+ function Ze(e) {
978
+ const t = Z(e.maxUnits);
979
+ return {
980
+ type: "duration",
981
+ inputUnit: ue(e.inputUnit) ? e.inputUnit : "second",
982
+ outputStyle: e.outputStyle === "digital" || e.outputStyle === "long" ? e.outputStyle : "compact",
983
+ largestUnit: ue(e.largestUnit) ? e.largestUnit : void 0,
984
+ smallestUnit: ue(e.smallestUnit) ? e.smallestUnit : "second",
985
+ maxUnits: t,
986
+ prefix: e.prefix,
987
+ suffix: e.suffix,
988
+ negativeStyle: e.negativeStyle || "minus"
989
+ };
990
+ }
991
+ function qe(e) {
992
+ return {
993
+ type: "string",
994
+ prefix: e.prefix,
995
+ suffix: e.suffix
996
+ };
997
+ }
998
+ function ti(e, t) {
999
+ if (!e)
1000
+ return;
1001
+ if (typeof e == "string") {
1002
+ const n = e.trim().toLowerCase();
1003
+ return n === "currency" ? v(
1004
+ "currency",
1005
+ { type: "currency" },
1006
+ t
1007
+ ) : n === "percentage" || n === "percent" ? v(
1008
+ "percent",
1009
+ {
1010
+ type: "percentage",
1011
+ percentValueMode: "fraction"
1012
+ },
1013
+ t
1014
+ ) : n === "scientific" ? v(
1015
+ "scientific",
1016
+ { type: "scientific" },
1017
+ t
1018
+ ) : n === "date" ? He({}) : n === "duration" ? Ze({}) : n === "string" ? qe({}) : n === "number" ? v(
1019
+ "number",
1020
+ { type: "number" },
1021
+ t
1022
+ ) : void 0;
1023
+ }
1024
+ if ("type" in e && e.type === "temporal_bucket") {
1025
+ const n = Bt.safeParse(e);
1026
+ return n.success ? n.data : void 0;
1027
+ }
1028
+ const r = e;
1029
+ if ((t == null ? void 0 : t.numericInput) === "canonical") {
1030
+ const n = r.type === "percentage" ? { ...r, type: "percent" } : r;
1031
+ if (Q(n))
1032
+ return v(n.type, n, t);
1033
+ }
1034
+ if (r.type === "percentage")
1035
+ return v(
1036
+ "percent",
1037
+ {
1038
+ ...r,
1039
+ percentValueMode: r.percentValueMode || "fraction"
1040
+ },
1041
+ t
1042
+ );
1043
+ if (r.type === "number" || r.type === "currency" || r.type === "percent" || r.type === "scientific") {
1044
+ const n = v(
1045
+ r.type,
1046
+ r,
1047
+ t
1048
+ );
1049
+ return en(r) ? { ...n, currency: "USD" } : n;
1050
+ }
1051
+ if (r.type === "date")
1052
+ return He(r);
1053
+ if (r.type === "duration")
1054
+ return Ze(r);
1055
+ if (r.type === "string")
1056
+ return qe(r);
860
1057
  }
861
1058
  function g(e) {
862
1059
  if (e === null || typeof e != "object" || Array.isArray(e))
@@ -869,7 +1066,7 @@ function g(e) {
869
1066
  ) ? t.constructor : void 0;
870
1067
  return typeof r == "function" && Function.prototype.toString.call(r) === Function.prototype.toString.call(Object);
871
1068
  }
872
- const Ur = [
1069
+ const an = [
873
1070
  "type",
874
1071
  "locale",
875
1072
  "minimumFractionDigits",
@@ -881,24 +1078,25 @@ const Ur = [
881
1078
  "compact",
882
1079
  "scale",
883
1080
  "currency",
884
- "percentValueMode"
1081
+ "percentValueMode",
1082
+ "signDisplay"
885
1083
  ];
886
- function zr(e) {
1084
+ function on(e) {
887
1085
  if (!g(e))
888
1086
  return {
889
1087
  ok: !1,
890
1088
  issues: [{ path: "$", message: "Numeric format must be an object." }]
891
1089
  };
892
- const t = [], r = new Set(Ur);
1090
+ const t = [], r = new Set(an);
893
1091
  Object.keys(e).filter((i) => !r.has(i)).forEach(
894
1092
  (i) => t.push({ path: i, message: `Unknown property "${i}".` })
895
1093
  ), e.type !== "number" && e.type !== "currency" && e.type !== "percent" && e.type !== "scientific" && t.push({
896
1094
  path: "type",
897
1095
  message: "Expected number, currency, percent, or scientific."
898
1096
  });
899
- const n = e.locale === void 0 ? void 0 : F(e.locale);
1097
+ const n = e.locale === void 0 ? void 0 : A(e.locale);
900
1098
  e.locale !== void 0 && !n && t.push({ path: "locale", message: "Expected a supported BCP 47 locale." });
901
- const a = e.currency === void 0 ? void 0 : ce(e.currency);
1099
+ const a = e.currency === void 0 ? void 0 : ye(e.currency);
902
1100
  e.currency !== void 0 && !a && t.push({
903
1101
  path: "currency",
904
1102
  message: "Expected a supported ISO 4217 currency code."
@@ -924,7 +1122,10 @@ function zr(e) {
924
1122
  }), e.percentValueMode !== void 0 && e.percentValueMode !== "fraction" && e.percentValueMode !== "whole" && t.push({
925
1123
  path: "percentValueMode",
926
1124
  message: "Expected fraction or whole."
927
- }), e.scale !== void 0 && (typeof e.scale != "number" || !Number.isFinite(e.scale)) && t.push({ path: "scale", message: "Expected a finite number." }), t.length > 0 ? { ok: !1, issues: t } : {
1125
+ }), e.scale !== void 0 && (typeof e.scale != "number" || !Number.isFinite(e.scale)) && t.push({ path: "scale", message: "Expected a finite number." }), e.signDisplay !== void 0 && e.signDisplay !== "auto" && e.signDisplay !== "always" && e.signDisplay !== "exceptZero" && e.signDisplay !== "never" && t.push({
1126
+ path: "signDisplay",
1127
+ message: "Expected auto, always, exceptZero, or never."
1128
+ }), t.length > 0 ? { ok: !1, issues: t } : {
928
1129
  ok: !0,
929
1130
  value: {
930
1131
  type: e.type,
@@ -942,12 +1143,15 @@ function zr(e) {
942
1143
  ...a ? { currency: a } : {},
943
1144
  ...e.percentValueMode !== void 0 ? {
944
1145
  percentValueMode: e.percentValueMode
1146
+ } : {},
1147
+ ...e.signDisplay !== void 0 ? {
1148
+ signDisplay: e.signDisplay
945
1149
  } : {}
946
1150
  }
947
1151
  };
948
1152
  }
949
- function Ar(e) {
950
- const t = zr(e);
1153
+ function sn(e) {
1154
+ const t = on(e);
951
1155
  if (!t.ok)
952
1156
  return t;
953
1157
  const r = [];
@@ -965,7 +1169,7 @@ function Ar(e) {
965
1169
  message: "Resolved currency formats require an explicit currency."
966
1170
  }), r.length > 0 ? { ok: !1, issues: r } : t;
967
1171
  }
968
- function $a(e) {
1172
+ function ri(e) {
969
1173
  var n;
970
1174
  const t = /* @__PURE__ */ new Set();
971
1175
  if (e.snapshot.resolvedFormats.forEach((a, i) => {
@@ -1002,7 +1206,7 @@ function $a(e) {
1002
1206
  `resolvedFormats is missing visible export column "${r}"`
1003
1207
  );
1004
1208
  }
1005
- function Yr(e, t) {
1209
+ function cn(e, t) {
1006
1210
  const r = new Intl.NumberFormat(e, {
1007
1211
  style: "currency",
1008
1212
  currency: t
@@ -1012,7 +1216,7 @@ function Yr(e, t) {
1012
1216
  maximumFractionDigits: r.maximumFractionDigits
1013
1217
  };
1014
1218
  }
1015
- function Rr(e) {
1219
+ function un(e) {
1016
1220
  if (e.minimumFractionDigits !== void 0 || e.maximumFractionDigits !== void 0) {
1017
1221
  const r = e.minimumFractionDigits ?? 0;
1018
1222
  return {
@@ -1026,20 +1230,20 @@ function Rr(e) {
1026
1230
  maximumFractionDigits: t
1027
1231
  };
1028
1232
  }
1029
- function Ia(e, t, r) {
1030
- const n = F(e.locale) ?? t.locale, a = e.type === "number" || e.type === "currency" ? ce(r) : void 0;
1233
+ function ni(e, t, r) {
1234
+ const n = A(e.locale) ?? t.locale, a = e.type === "number" || e.type === "currency" ? ye(r) : void 0;
1031
1235
  if (!(e.type === "currency" || a !== void 0))
1032
1236
  return {
1033
1237
  ...e,
1034
1238
  locale: n,
1035
- ...Rr(e)
1239
+ ...un(e)
1036
1240
  };
1037
- const o = a ?? ce(e.currency) ?? t.defaultCurrency, s = Yr(
1241
+ const o = a ?? ye(e.currency) ?? t.defaultCurrency, c = cn(
1038
1242
  n,
1039
1243
  o
1040
- ), c = s.minimumFractionDigits ?? 0, u = s.maximumFractionDigits ?? c, l = e.minimumFractionDigits ?? Math.min(
1041
- c,
1042
- e.maximumFractionDigits ?? c
1244
+ ), s = c.minimumFractionDigits ?? 0, u = c.maximumFractionDigits ?? s, l = e.minimumFractionDigits ?? Math.min(
1245
+ s,
1246
+ e.maximumFractionDigits ?? s
1043
1247
  ), d = e.maximumFractionDigits ?? Math.max(
1044
1248
  l,
1045
1249
  u
@@ -1053,7 +1257,7 @@ function Ia(e, t, r) {
1053
1257
  maximumFractionDigits: d
1054
1258
  };
1055
1259
  }
1056
- const Or = [
1260
+ const ln = [
1057
1261
  "YYYY",
1058
1262
  "MMMM",
1059
1263
  "MMM",
@@ -1063,23 +1267,33 @@ const Or = [
1063
1267
  "HH",
1064
1268
  "mm",
1065
1269
  "ss"
1066
- ], Pr = /* @__PURE__ */ new Set([" ", "-", "/", ":", ".", ",", "T"]), st = {
1067
- week_of_short: "week",
1068
- week_of_long: "week",
1069
- quarter_short: "quarter",
1070
- quarter_long: "quarter",
1071
- fiscal_quarter_short: "quarter",
1072
- fiscal_year: "year"
1270
+ ], mn = /* @__PURE__ */ new Set([" ", "-", "/", ":", ".", ",", "T"]), j = [
1271
+ "day",
1272
+ "week",
1273
+ "month",
1274
+ "quarter",
1275
+ "year"
1276
+ ], wt = {
1277
+ week_of_short: ["week"],
1278
+ week_of_long: ["week"],
1279
+ quarter_short: ["quarter"],
1280
+ quarter_long: ["quarter"],
1281
+ fiscal_quarter_short: ["quarter"],
1282
+ fiscal_year: ["year"],
1283
+ short: j,
1284
+ long: j,
1285
+ numeric: j,
1286
+ iso: j
1073
1287
  };
1074
- function Lr(e) {
1075
- return typeof e == "string" && Object.prototype.hasOwnProperty.call(st, e);
1288
+ function dn(e) {
1289
+ return typeof e == "string" && Object.prototype.hasOwnProperty.call(wt, e);
1076
1290
  }
1077
- function jr(e, t) {
1078
- return Or.find(
1291
+ function fn(e, t) {
1292
+ return ln.find(
1079
1293
  (r) => e.startsWith(r, t)
1080
1294
  );
1081
1295
  }
1082
- function C(e) {
1296
+ function R(e) {
1083
1297
  var a;
1084
1298
  if (!e || e.trim() !== e)
1085
1299
  return {
@@ -1090,7 +1304,7 @@ function C(e) {
1090
1304
  const t = [];
1091
1305
  let r = 0, n = !1;
1092
1306
  for (; r < e.length; ) {
1093
- const i = jr(e, r);
1307
+ const i = fn(e, r);
1094
1308
  if (i) {
1095
1309
  if (n)
1096
1310
  return {
@@ -1102,7 +1316,7 @@ function C(e) {
1102
1316
  continue;
1103
1317
  }
1104
1318
  const o = e[r];
1105
- if (!Pr.has(o))
1319
+ if (!mn.has(o))
1106
1320
  return {
1107
1321
  ok: !1,
1108
1322
  code: "invalid_temporal_bucket_pattern",
@@ -1114,8 +1328,8 @@ function C(e) {
1114
1328
  code: "invalid_temporal_bucket_pattern",
1115
1329
  message: "Temporal bucket patterns cannot begin with a separator."
1116
1330
  };
1117
- const s = t[t.length - 1];
1118
- s.kind === "literal" ? s.value += o : t.push({ kind: "literal", value: o }), r += 1, n = !1;
1331
+ const c = t[t.length - 1];
1332
+ c.kind === "literal" ? c.value += o : t.push({ kind: "literal", value: o }), r += 1, n = !1;
1119
1333
  }
1120
1334
  return ((a = t[t.length - 1]) == null ? void 0 : a.kind) !== "token" ? {
1121
1335
  ok: !1,
@@ -1123,55 +1337,55 @@ function C(e) {
1123
1337
  message: "Temporal bucket patterns cannot end with a separator."
1124
1338
  } : { ok: !0, segments: t };
1125
1339
  }
1126
- function Kr(e) {
1340
+ function yn(e) {
1127
1341
  return e.flatMap(
1128
1342
  (t) => t.kind === "token" ? [t.value] : []
1129
1343
  );
1130
1344
  }
1131
- function ze(e, t) {
1345
+ function Be(e, t) {
1132
1346
  return e.filter((r) => t.includes(r)).length === 1;
1133
1347
  }
1134
- function Y(e, t) {
1348
+ function K(e, t) {
1135
1349
  return e.some((r) => t.includes(r));
1136
1350
  }
1137
- function Hr(e) {
1351
+ function gn(e) {
1138
1352
  return new Set(e).size !== e.length;
1139
1353
  }
1140
- function Zr(e, t) {
1141
- if (Hr(e)) return !1;
1142
- const r = ["YYYY", "YY"], n = ["MMMM", "MMM", "MM"], a = ["HH", "mm", "ss"], i = ze(e, r), o = ze(e, n), s = e.includes("DD"), c = Y(e, a);
1354
+ function hn(e, t) {
1355
+ if (gn(e)) return !1;
1356
+ const r = ["YYYY", "YY"], n = ["MMMM", "MMM", "MM"], a = ["HH", "mm", "ss"], i = Be(e, r), o = Be(e, n), c = e.includes("DD"), s = K(e, a);
1143
1357
  switch (t) {
1144
1358
  case "second":
1145
- return e.includes("HH") && e.includes("mm") && e.includes("ss") && (!Y(e, [...r, ...n, "DD"]) || i && o && s);
1359
+ return e.includes("HH") && e.includes("mm") && e.includes("ss") && (!K(e, [...r, ...n, "DD"]) || i && o && c);
1146
1360
  case "minute":
1147
- return e.includes("HH") && e.includes("mm") && (!Y(e, [...r, ...n, "DD"]) || i && o && s);
1361
+ return e.includes("HH") && e.includes("mm") && (!K(e, [...r, ...n, "DD"]) || i && o && c);
1148
1362
  case "hour":
1149
- return e.includes("HH") && (!Y(e, [...r, ...n, "DD"]) || i && o && s);
1363
+ return e.includes("HH") && (!K(e, [...r, ...n, "DD"]) || i && o && c);
1150
1364
  case "day":
1151
1365
  case "week":
1152
- return i && o && s && !c;
1366
+ return i && o && c && !s;
1153
1367
  case "month":
1154
- return i && o && !s && !c;
1368
+ return i && o && !c && !s;
1155
1369
  case "quarter":
1156
1370
  return !1;
1157
1371
  case "year":
1158
- return i && !o && !s && !c;
1372
+ return i && !o && !c && !s;
1159
1373
  }
1160
1374
  }
1161
- function ct(e, t) {
1375
+ function Tt(e, t) {
1162
1376
  if (e.presentation.mode === "auto")
1163
1377
  return { ok: !0 };
1164
1378
  if (e.presentation.mode === "preset") {
1165
- const n = st[e.presentation.preset];
1166
- return n === t ? { ok: !0 } : {
1379
+ const n = wt[e.presentation.preset];
1380
+ return n.includes(t) ? { ok: !0 } : {
1167
1381
  ok: !1,
1168
1382
  code: "incompatible_temporal_bucket_preset",
1169
- message: `Preset ${e.presentation.preset} requires ${n} granularity.`
1383
+ message: `Preset ${e.presentation.preset} requires ${n.join(", ")} granularity.`
1170
1384
  };
1171
1385
  }
1172
- const r = C(e.presentation.pattern);
1173
- return r.ok ? Zr(
1174
- Kr(r.segments),
1386
+ const r = R(e.presentation.pattern);
1387
+ return r.ok ? hn(
1388
+ yn(r.segments),
1175
1389
  t
1176
1390
  ) ? { ok: !0, segments: r.segments } : {
1177
1391
  ok: !1,
@@ -1179,18 +1393,21 @@ function ct(e, t) {
1179
1393
  message: `Pattern ${e.presentation.pattern} is not compatible with ${t} granularity.`
1180
1394
  } : r;
1181
1395
  }
1182
- function Ea(e, t) {
1396
+ function ai(e, t) {
1183
1397
  if (!(!e || !t))
1184
- return ct(e, t).ok ? e : void 0;
1398
+ return Tt(e, t).ok ? e : void 0;
1399
+ }
1400
+ function ii(e) {
1401
+ return e.preset ? { mode: "preset", preset: e.preset } : e.pattern ? { mode: "pattern", dialect: e.dialect ?? "semaphor_tokens", pattern: e.pattern } : { mode: "auto" };
1185
1402
  }
1186
1403
  class N extends Error {
1187
1404
  constructor(r, n) {
1188
1405
  super(n);
1189
- v(this, "code");
1406
+ x(this, "code");
1190
1407
  this.name = "RawTemporalFormatContractError", this.code = r;
1191
1408
  }
1192
1409
  }
1193
- const qr = [
1410
+ const pn = [
1194
1411
  "SSSSSSSSS",
1195
1412
  "SSSSSSSS",
1196
1413
  "SSSSSSS",
@@ -1200,7 +1417,7 @@ const qr = [
1200
1417
  "SSS",
1201
1418
  "SS",
1202
1419
  "S"
1203
- ], ut = /^(\d{4})-(\d{2})-(\d{2})$/, lt = /^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?$/, mt = /^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?(Z|[+-]\d{2}:\d{2})$/, Br = [
1420
+ ], St = /^(\d{4})-(\d{2})-(\d{2})$/, Dt = /^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?$/, xt = /^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?(Z|[+-]\d{2}:\d{2})$/, wn = [
1204
1421
  "yyyy",
1205
1422
  "MMMM",
1206
1423
  "LLLL",
@@ -1222,7 +1439,7 @@ const qr = [
1222
1439
  "m",
1223
1440
  "s",
1224
1441
  "a"
1225
- ], Vr = /* @__PURE__ */ new Set([
1442
+ ], Tn = /* @__PURE__ */ new Set([
1226
1443
  "HH",
1227
1444
  "H",
1228
1445
  "hh",
@@ -1232,9 +1449,9 @@ const qr = [
1232
1449
  "ss",
1233
1450
  "s",
1234
1451
  "a",
1235
- ...qr
1236
- ]), Gr = /* @__PURE__ */ new Set(["zzz", "XXX"]), ie = /* @__PURE__ */ new Set(["short", "medium", "long"]);
1237
- function T(e, t) {
1452
+ ...pn
1453
+ ]), Sn = /* @__PURE__ */ new Set(["zzz", "XXX"]), le = /* @__PURE__ */ new Set(["short", "medium", "long"]);
1454
+ function S(e, t) {
1238
1455
  return Object.keys(e).length === t.length && t.every((n) => n in e);
1239
1456
  }
1240
1457
  function m(e) {
@@ -1243,7 +1460,7 @@ function m(e) {
1243
1460
  e
1244
1461
  );
1245
1462
  }
1246
- function dt(e) {
1463
+ function vt(e) {
1247
1464
  if (!e || e.trim() !== e || e.length > 256)
1248
1465
  return m(
1249
1466
  "date_fns patterns must be non-empty, trimmed, and at most 256 characters."
@@ -1259,19 +1476,19 @@ function dt(e) {
1259
1476
  r("'"), n += 2;
1260
1477
  continue;
1261
1478
  }
1262
- let o = "", s = !1;
1479
+ let o = "", c = !1;
1263
1480
  for (n += 1; n < e.length; ) {
1264
1481
  if (e[n] === "'") {
1265
1482
  if (e[n + 1] === "'") {
1266
1483
  o += "'", n += 2;
1267
1484
  continue;
1268
1485
  }
1269
- s = !0, n += 1;
1486
+ c = !0, n += 1;
1270
1487
  break;
1271
1488
  }
1272
1489
  o += e[n], n += 1;
1273
1490
  }
1274
- if (!s)
1491
+ if (!c)
1275
1492
  return m("date_fns pattern has an unclosed quote.");
1276
1493
  r(o);
1277
1494
  continue;
@@ -1279,18 +1496,18 @@ function dt(e) {
1279
1496
  if (e[n] === "S") {
1280
1497
  let o = n + 1;
1281
1498
  for (; e[o] === "S"; ) o += 1;
1282
- const s = e.slice(n, o);
1283
- if (s.length > 9)
1499
+ const c = e.slice(n, o);
1500
+ if (c.length > 9)
1284
1501
  return m(
1285
1502
  "date_fns fractional-second tokens support at most nine digits."
1286
1503
  );
1287
1504
  t.push({
1288
1505
  kind: "token",
1289
- value: s
1506
+ value: c
1290
1507
  }), n = o;
1291
1508
  continue;
1292
1509
  }
1293
- const a = Br.find(
1510
+ const a = wn.find(
1294
1511
  (o) => e.startsWith(o, n)
1295
1512
  );
1296
1513
  if (a) {
@@ -1306,16 +1523,16 @@ function dt(e) {
1306
1523
  }
1307
1524
  return t.some((a) => a.kind === "token") ? t : m("date_fns patterns must contain at least one token.");
1308
1525
  }
1309
- function ft(e, t) {
1526
+ function kt(e, t) {
1310
1527
  if (e === "semaphor_tokens") {
1311
- const r = C(t);
1528
+ const r = R(t);
1312
1529
  r.ok || m(r.message);
1313
1530
  return;
1314
1531
  }
1315
- dt(t);
1532
+ vt(t);
1316
1533
  }
1317
- function Wr(e) {
1318
- return !g(e) || !T(e, ["dateStyle", "dateTime"]) ? m("Automatic raw temporal styles are incomplete.") : ie.has(e.dateStyle) ? !g(e.dateTime) || !T(e.dateTime, ["dateStyle", "timeStyle"]) || !ie.has(e.dateTime.dateStyle) || !ie.has(e.dateTime.timeStyle) ? m(
1534
+ function Dn(e) {
1535
+ return !g(e) || !S(e, ["dateStyle", "dateTime"]) ? m("Automatic raw temporal styles are incomplete.") : le.has(e.dateStyle) ? !g(e.dateTime) || !S(e.dateTime, ["dateStyle", "timeStyle"]) || !le.has(e.dateTime.dateStyle) || !le.has(e.dateTime.timeStyle) ? m(
1319
1536
  "Automatic dateTime styles are incomplete or invalid."
1320
1537
  ) : {
1321
1538
  dateStyle: e.dateStyle,
@@ -1325,29 +1542,35 @@ function Wr(e) {
1325
1542
  }
1326
1543
  } : m("Automatic dateStyle is invalid.");
1327
1544
  }
1328
- function pe(e) {
1545
+ function ve(e) {
1329
1546
  const t = ["type", "locale", "calendarTimezone", "presentation"], r = [...t, "sourceTimezone"];
1330
- if (!g(e) || !T(e, t) && !T(e, r) || e.type !== "raw_temporal")
1547
+ if (!g(e) || !S(e, t) && !S(e, r) || e.type !== "raw_temporal")
1331
1548
  return m("Resolved raw temporal format has an invalid shape.");
1332
- const n = F(e.locale);
1333
- return n ? typeof e.calendarTimezone != "string" || !L(e.calendarTimezone) ? m(
1549
+ const n = A(e.locale);
1550
+ return n ? typeof e.calendarTimezone != "string" || !V(e.calendarTimezone) ? m(
1334
1551
  "Raw temporal calendarTimezone must be a valid IANA timezone."
1335
- ) : e.sourceTimezone !== void 0 && (typeof e.sourceTimezone != "string" || !L(e.sourceTimezone)) ? m(
1552
+ ) : e.sourceTimezone !== void 0 && (typeof e.sourceTimezone != "string" || !V(e.sourceTimezone)) ? m(
1336
1553
  "Raw temporal sourceTimezone must be a valid IANA timezone."
1337
- ) : g(e.presentation) ? e.presentation.mode === "auto" ? T(e.presentation, ["mode", "styles"]) ? {
1554
+ ) : g(e.presentation) ? e.presentation.mode === "auto" ? S(e.presentation, ["mode", "styles"]) ? {
1338
1555
  type: "raw_temporal",
1339
1556
  locale: n,
1340
1557
  calendarTimezone: e.calendarTimezone,
1341
1558
  ...e.sourceTimezone ? { sourceTimezone: e.sourceTimezone } : {},
1342
1559
  presentation: {
1343
1560
  mode: "auto",
1344
- styles: Wr(e.presentation.styles)
1561
+ styles: Dn(e.presentation.styles)
1345
1562
  }
1346
1563
  } : m(
1347
1564
  "Automatic raw temporal presentation has unknown fields."
1348
- ) : e.presentation.mode !== "pattern" || !T(e.presentation, ["mode", "dialect", "pattern"]) || e.presentation.dialect !== "semaphor_tokens" && e.presentation.dialect !== "date_fns" || typeof e.presentation.pattern != "string" ? m(
1565
+ ) : e.presentation.mode === "preset" ? !S(e.presentation, ["mode", "preset"]) || !Mt(e.presentation.preset) ? m("Preset raw temporal presentation has an invalid shape.") : {
1566
+ type: "raw_temporal",
1567
+ locale: n,
1568
+ calendarTimezone: e.calendarTimezone,
1569
+ ...e.sourceTimezone ? { sourceTimezone: e.sourceTimezone } : {},
1570
+ presentation: { mode: "preset", preset: e.presentation.preset }
1571
+ } : e.presentation.mode !== "pattern" || !S(e.presentation, ["mode", "dialect", "pattern"]) || e.presentation.dialect !== "semaphor_tokens" && e.presentation.dialect !== "date_fns" || typeof e.presentation.pattern != "string" ? m(
1349
1572
  "Pattern raw temporal presentation has an invalid shape."
1350
- ) : (ft(e.presentation.dialect, e.presentation.pattern), {
1573
+ ) : (kt(e.presentation.dialect, e.presentation.pattern), {
1351
1574
  type: "raw_temporal",
1352
1575
  locale: n,
1353
1576
  calendarTimezone: e.calendarTimezone,
@@ -1359,8 +1582,8 @@ function pe(e) {
1359
1582
  }
1360
1583
  }) : m("Raw temporal presentation must be an object.") : m("Raw temporal locale is invalid or unsupported.");
1361
1584
  }
1362
- function Xr(e) {
1363
- var s, c, u;
1585
+ function xn(e) {
1586
+ var c, s, u;
1364
1587
  if (e.format) {
1365
1588
  if (!g(e.format))
1366
1589
  return m(
@@ -1375,27 +1598,30 @@ function Xr(e) {
1375
1598
  );
1376
1599
  const d = e.format.presentation;
1377
1600
  if (d.mode === "auto") {
1378
- if (!T(d, ["mode"]))
1601
+ if (!S(d, ["mode"]))
1379
1602
  return m(
1380
1603
  "Automatic authored raw temporal format has unknown fields."
1381
1604
  );
1605
+ } else if (d.mode === "preset") {
1606
+ if (!S(d, ["mode", "preset"]) || !Mt(d.preset))
1607
+ return m("Authored raw temporal preset has an invalid shape.");
1382
1608
  } else {
1383
- if (d.mode !== "pattern" || !T(d, ["mode", "dialect", "pattern"]) || d.dialect !== "semaphor_tokens" && d.dialect !== "date_fns" || typeof d.pattern != "string")
1609
+ if (d.mode !== "pattern" || !S(d, ["mode", "dialect", "pattern"]) || d.dialect !== "semaphor_tokens" && d.dialect !== "date_fns" || typeof d.pattern != "string")
1384
1610
  return m(
1385
1611
  "Authored raw temporal pattern has an invalid shape."
1386
1612
  );
1387
- ft(d.dialect, d.pattern);
1613
+ kt(d.dialect, d.pattern);
1388
1614
  }
1389
1615
  }
1390
- const t = (s = e.format) == null ? void 0 : s.timezone, r = (c = e.format) == null ? void 0 : c.sourceTimezone, n = t && t !== "auto" ? t : e.calendar.tz, a = r && r !== "auto" ? r === "local" ? Intl.DateTimeFormat().resolvedOptions().timeZone : r : void 0;
1391
- if (t !== void 0 && t !== "auto" && !L(n) || a !== void 0 && !L(a))
1616
+ const t = (c = e.format) == null ? void 0 : c.timezone, r = (s = e.format) == null ? void 0 : s.sourceTimezone, n = t && t !== "auto" ? t : e.calendar.tz, a = r && r !== "auto" ? r === "local" ? Intl.DateTimeFormat().resolvedOptions().timeZone : r : void 0;
1617
+ if (t !== void 0 && t !== "auto" && !V(n) || a !== void 0 && !V(a))
1392
1618
  return m("Authored raw temporal timezone is invalid.");
1393
1619
  const i = ((u = e.format) == null ? void 0 : u.presentation) ?? { mode: "auto" }, o = {
1394
1620
  type: "raw_temporal",
1395
1621
  locale: e.preferences.locale,
1396
1622
  calendarTimezone: n,
1397
1623
  ...a ? { sourceTimezone: a } : {},
1398
- presentation: i.mode === "pattern" ? { ...i } : {
1624
+ presentation: i.mode === "pattern" || i.mode === "preset" ? { ...i } : {
1399
1625
  mode: "auto",
1400
1626
  styles: {
1401
1627
  dateStyle: e.preferences.dateStyle,
@@ -1403,20 +1629,20 @@ function Xr(e) {
1403
1629
  }
1404
1630
  }
1405
1631
  };
1406
- return pe(o);
1632
+ return ve(o);
1407
1633
  }
1408
- function Jr(e) {
1409
- if (ut.test(e)) return "date";
1410
- if (mt.test(e)) return "instant";
1411
- if (lt.test(e)) return "wall_datetime";
1634
+ function vn(e) {
1635
+ if (St.test(e)) return "date";
1636
+ if (xt.test(e)) return "instant";
1637
+ if (Dt.test(e)) return "wall_datetime";
1412
1638
  }
1413
- function Fa(e) {
1639
+ function oi(e) {
1414
1640
  const t = /* @__PURE__ */ new Set();
1415
1641
  let r = !1;
1416
1642
  for (const n of e.values) {
1417
1643
  if (n === null) continue;
1418
1644
  r = !0;
1419
- const a = Jr(n);
1645
+ const a = vn(n);
1420
1646
  a && t.add(a);
1421
1647
  }
1422
1648
  if (!r) return { status: "empty" };
@@ -1434,7 +1660,7 @@ function Fa(e) {
1434
1660
  }
1435
1661
  };
1436
1662
  }
1437
- function Ca(e) {
1663
+ function si(e) {
1438
1664
  return {
1439
1665
  version: 1,
1440
1666
  columns: Object.fromEntries(
@@ -1445,7 +1671,7 @@ function Ca(e) {
1445
1671
  )
1446
1672
  };
1447
1673
  }
1448
- function Qr(e) {
1674
+ function kn(e) {
1449
1675
  if (!g(e) || e.version !== 1 || !g(e.columns) || Object.keys(e).some((n) => n !== "version" && n !== "columns"))
1450
1676
  throw new N(
1451
1677
  "invalid_raw_temporal_format",
@@ -1468,9 +1694,9 @@ function Qr(e) {
1468
1694
  }
1469
1695
  return { version: 1, columns: t };
1470
1696
  }
1471
- function Ua(e) {
1697
+ function ci(e) {
1472
1698
  if (e.length === 0) return;
1473
- const t = e.map(Qr), r = Object.keys(t[0].columns).sort();
1699
+ const t = e.map(kn), r = Object.keys(t[0].columns).sort();
1474
1700
  for (let n = 1; n < t.length; n += 1) {
1475
1701
  const a = Object.keys(t[n].columns).sort();
1476
1702
  if (a.length !== r.length || a.some((i, o) => i !== r[o]))
@@ -1490,16 +1716,16 @@ function Ua(e) {
1490
1716
  `Declared SQL temporal column "${n}" has inconsistent semantics across export chunks. Normalize it to one kind.`
1491
1717
  );
1492
1718
  }
1493
- function en(e) {
1719
+ function _n(e) {
1494
1720
  return e % 4 === 0 && (e % 100 !== 0 || e % 400 === 0);
1495
1721
  }
1496
- function tn(e, t) {
1497
- return t === 2 ? en(e) ? 29 : 28 : [4, 6, 9, 11].includes(t) ? 30 : 31;
1722
+ function bn(e, t) {
1723
+ return t === 2 ? _n(e) ? 29 : 28 : [4, 6, 9, 11].includes(t) ? 30 : 31;
1498
1724
  }
1499
- function rn(e) {
1500
- return e.year >= 1 && e.year <= 9999 && e.month >= 1 && e.month <= 12 && e.day >= 1 && e.day <= tn(e.year, e.month) && e.hour >= 0 && e.hour <= 23 && e.minute >= 0 && e.minute <= 59 && e.second >= 0 && e.second <= 59;
1725
+ function $n(e) {
1726
+ return e.year >= 1 && e.year <= 9999 && e.month >= 1 && e.month <= 12 && e.day >= 1 && e.day <= bn(e.year, e.month) && e.hour >= 0 && e.hour <= 23 && e.minute >= 0 && e.minute <= 59 && e.second >= 0 && e.second <= 59;
1501
1727
  }
1502
- function nn(e) {
1728
+ function Mn(e) {
1503
1729
  return {
1504
1730
  year: Number(e[1]),
1505
1731
  month: Number(e[2]),
@@ -1510,47 +1736,47 @@ function nn(e) {
1510
1736
  fraction: e[7] ?? ""
1511
1737
  };
1512
1738
  }
1513
- function an(e, t) {
1514
- const r = t === "date" ? e.match(ut) : t === "wall_datetime" ? e.match(lt) : e.match(mt);
1739
+ function Nn(e, t) {
1740
+ const r = t === "date" ? e.match(St) : t === "wall_datetime" ? e.match(Dt) : e.match(xt);
1515
1741
  if (!r) return { status: "invalid_shape" };
1516
- const n = nn(r);
1517
- if (!rn(n)) return { status: "out_of_range" };
1742
+ const n = Mn(r);
1743
+ if (!$n(n)) return { status: "out_of_range" };
1518
1744
  if (t === "instant") {
1519
1745
  const a = r[8];
1520
1746
  if (a && a !== "Z") {
1521
- const [o, s] = a.slice(1).split(":").map(Number);
1522
- if (o > 23 || s > 59) return { status: "out_of_range" };
1747
+ const [o, c] = a.slice(1).split(":").map(Number);
1748
+ if (o > 23 || c > 59) return { status: "out_of_range" };
1523
1749
  }
1524
1750
  const i = new Date(e.replace(" ", "T"));
1525
1751
  return Number.isNaN(i.getTime()) ? { status: "out_of_range" } : { status: "valid", fields: n, instant: i };
1526
1752
  }
1527
1753
  return { status: "valid", fields: n };
1528
1754
  }
1529
- function de(e) {
1755
+ function we(e) {
1530
1756
  const t = /* @__PURE__ */ new Date(0);
1531
1757
  return t.setUTCFullYear(e.year, e.month - 1, e.day), t.setUTCHours(e.hour, e.minute, e.second, 0), t;
1532
1758
  }
1533
- function we(e, t) {
1759
+ function ke(e, t) {
1534
1760
  const r = e.fraction ? `.${e.fraction.padEnd(3, "0").slice(0, 3)}` : "";
1535
- return W(
1761
+ return ee(
1536
1762
  `${String(e.year).padStart(4, "0")}-${String(e.month).padStart(2, "0")}-${String(e.day).padStart(2, "0")}T${String(e.hour).padStart(2, "0")}:${String(e.minute).padStart(2, "0")}:${String(e.second).padStart(2, "0")}${r}`,
1537
1763
  t
1538
1764
  );
1539
1765
  }
1540
- function yt(e, t) {
1766
+ function _t(e, t) {
1541
1767
  const r = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
1542
- let a, i, o, s;
1768
+ let a, i, o, c;
1543
1769
  return {
1544
- number(c, u = 1) {
1770
+ number(s, u = 1) {
1545
1771
  let l = r.get(u);
1546
1772
  return l || (l = new Intl.NumberFormat(e, {
1547
1773
  useGrouping: !1,
1548
1774
  minimumIntegerDigits: u,
1549
1775
  maximumFractionDigits: 0
1550
- }), r.set(u, l)), l.format(c);
1776
+ }), r.set(u, l)), l.format(s);
1551
1777
  },
1552
- month(c, u, l) {
1553
- var w;
1778
+ month(s, u, l) {
1779
+ var T;
1554
1780
  const d = `${u}:${l ? "standalone" : "contextual"}`;
1555
1781
  let y = n.get(d);
1556
1782
  if (!y) {
@@ -1561,18 +1787,18 @@ function yt(e, t) {
1561
1787
  };
1562
1788
  l || (h.day = "numeric"), y = new Intl.DateTimeFormat(e, h), n.set(d, y);
1563
1789
  }
1564
- return ((w = y.formatToParts(c).find((h) => h.type === "month")) == null ? void 0 : w.value) ?? "";
1790
+ return ((T = y.formatToParts(s).find((h) => h.type === "month")) == null ? void 0 : T.value) ?? "";
1565
1791
  },
1566
- dayPeriod(c) {
1792
+ dayPeriod(s) {
1567
1793
  var u;
1568
1794
  return a ?? (a = new Intl.DateTimeFormat(e, {
1569
1795
  calendar: "gregory",
1570
1796
  timeZone: "UTC",
1571
1797
  hour: "numeric",
1572
1798
  hour12: !0
1573
- })), ((u = a.formatToParts(c).find((l) => l.type === "dayPeriod")) == null ? void 0 : u.value) ?? "";
1799
+ })), ((u = a.formatToParts(s).find((l) => l.type === "dayPeriod")) == null ? void 0 : u.value) ?? "";
1574
1800
  },
1575
- instantFields(c) {
1801
+ instantFields(s) {
1576
1802
  i ?? (i = new Intl.DateTimeFormat("en-CA", {
1577
1803
  calendar: "gregory",
1578
1804
  numberingSystem: "latn",
@@ -1585,9 +1811,9 @@ function yt(e, t) {
1585
1811
  second: "2-digit",
1586
1812
  hourCycle: "h23"
1587
1813
  }));
1588
- const u = i.formatToParts(c), l = (d) => {
1814
+ const u = i.formatToParts(s), l = (d) => {
1589
1815
  var y;
1590
- return Number((y = u.find((w) => w.type === d)) == null ? void 0 : y.value);
1816
+ return Number((y = u.find((T) => T.type === d)) == null ? void 0 : y.value);
1591
1817
  };
1592
1818
  return {
1593
1819
  year: l("year"),
@@ -1599,22 +1825,22 @@ function yt(e, t) {
1599
1825
  fraction: ""
1600
1826
  };
1601
1827
  },
1602
- timezoneName(c) {
1828
+ timezoneName(s) {
1603
1829
  var u;
1604
1830
  return o ?? (o = new Intl.DateTimeFormat(e, {
1605
1831
  calendar: "gregory",
1606
1832
  timeZone: t,
1607
1833
  timeZoneName: "short"
1608
- })), ((u = o.formatToParts(c).find((l) => l.type === "timeZoneName")) == null ? void 0 : u.value) ?? "";
1834
+ })), ((u = o.formatToParts(s).find((l) => l.type === "timeZoneName")) == null ? void 0 : u.value) ?? "";
1609
1835
  },
1610
- timezoneOffset(c) {
1836
+ timezoneOffset(s) {
1611
1837
  var d;
1612
- s ?? (s = new Intl.DateTimeFormat("en-US", {
1838
+ c ?? (c = new Intl.DateTimeFormat("en-US", {
1613
1839
  calendar: "gregory",
1614
1840
  timeZone: t,
1615
1841
  timeZoneName: "longOffset"
1616
1842
  }));
1617
- const u = (d = s.formatToParts(c).find((y) => y.type === "timeZoneName")) == null ? void 0 : d.value;
1843
+ const u = (d = c.formatToParts(s).find((y) => y.type === "timeZoneName")) == null ? void 0 : d.value;
1618
1844
  if (!u)
1619
1845
  return m("Unable to resolve the instant timezone offset.");
1620
1846
  const l = u.replace(/^GMT/, "");
@@ -1622,7 +1848,7 @@ function yt(e, t) {
1622
1848
  }
1623
1849
  };
1624
1850
  }
1625
- function on(e, t, r, n, a) {
1851
+ function In(e, t, r, n, a) {
1626
1852
  if (/^S{1,9}$/.test(e)) {
1627
1853
  const i = t.fraction.padEnd(e.length, "0").slice(0, e.length);
1628
1854
  return n.number(Number(i), e.length);
@@ -1683,47 +1909,47 @@ function on(e, t, r, n, a) {
1683
1909
  );
1684
1910
  }
1685
1911
  }
1686
- function sn(e, t, r, n) {
1687
- const a = de(t);
1912
+ function En(e, t, r, n) {
1913
+ const a = we(t);
1688
1914
  return e.map(
1689
- (i) => i.kind === "literal" ? i.value : on(i.value, t, a, r, n)
1915
+ (i) => i.kind === "literal" ? i.value : In(i.value, t, a, r, n)
1690
1916
  ).join("");
1691
1917
  }
1692
- function gt(e, t, r) {
1693
- const n = t === "date_fns" ? dt(r) : (() => {
1694
- const i = C(r);
1918
+ function bt(e, t, r) {
1919
+ const n = t === "date_fns" ? vt(r) : (() => {
1920
+ const i = R(r);
1695
1921
  return i.ok ? i.segments : m(i.message);
1696
1922
  })(), a = n.filter((i) => i.kind === "token").map((i) => i.value);
1697
- return e === "date" && a.some((i) => Vr.has(i)) ? m("Date patterns cannot contain time tokens.") : e !== "instant" && a.some((i) => Gr.has(i)) ? m("Timezone pattern tokens require an instant value.") : n;
1923
+ return e === "date" && a.some((i) => Tn.has(i)) ? m("Date patterns cannot contain time tokens.") : e !== "instant" && a.some((i) => Sn.has(i)) ? m("Timezone pattern tokens require an instant value.") : n;
1698
1924
  }
1699
- function cn(e) {
1700
- gt(
1925
+ function Fn(e) {
1926
+ bt(
1701
1927
  e.valueKind ?? "instant",
1702
1928
  e.dialect,
1703
1929
  e.pattern
1704
1930
  );
1705
1931
  }
1706
- function un(e, t, r, n) {
1707
- const a = gt(
1932
+ function Cn(e, t, r, n) {
1933
+ const a = bt(
1708
1934
  e.valueKind,
1709
1935
  r,
1710
1936
  n
1711
- ), i = yt(t.locale, t.calendarTimezone);
1937
+ ), i = _t(t.locale, t.calendarTimezone);
1712
1938
  return (o) => {
1713
- const s = e.valueKind === "wall_datetime" && t.sourceTimezone ? we(o.fields, t.sourceTimezone) : void 0, c = e.valueKind === "instant" ? {
1939
+ const c = e.valueKind === "wall_datetime" && t.sourceTimezone ? ke(o.fields, t.sourceTimezone) : void 0, s = e.valueKind === "instant" ? {
1714
1940
  ...i.instantFields(o.instant),
1715
1941
  fraction: o.fields.fraction
1716
- } : s ? {
1717
- ...i.instantFields(s),
1942
+ } : c ? {
1943
+ ...i.instantFields(c),
1718
1944
  fraction: o.fields.fraction
1719
1945
  } : o.fields;
1720
- return sn(a, c, i, o.instant ?? s);
1946
+ return En(a, s, i, o.instant ?? c);
1721
1947
  };
1722
1948
  }
1723
- function ln(e, t) {
1724
- const r = yt(t.locale, t.calendarTimezone);
1949
+ function $t(e, t) {
1950
+ const r = _t(t.locale, t.calendarTimezone);
1725
1951
  return (n) => {
1726
- const a = e.valueKind === "instant" ? r.instantFields(n.instant) : e.valueKind === "wall_datetime" && t.sourceTimezone ? r.instantFields(we(n.fields, t.sourceTimezone)) : n.fields;
1952
+ const a = e.valueKind === "instant" ? r.instantFields(n.instant) : e.valueKind === "wall_datetime" && t.sourceTimezone ? r.instantFields(ke(n.fields, t.sourceTimezone)) : n.fields;
1727
1953
  return {
1728
1954
  year: a.year,
1729
1955
  month: a.month,
@@ -1734,7 +1960,31 @@ function ln(e, t) {
1734
1960
  };
1735
1961
  };
1736
1962
  }
1737
- function mn(e, t) {
1963
+ const Un = /* @__PURE__ */ new Set(["short", "long", "numeric", "iso"]);
1964
+ function Mt(e) {
1965
+ return typeof e == "string" && Un.has(e);
1966
+ }
1967
+ function zn(e, t, r) {
1968
+ const n = $t(e, t), a = e.valueKind !== "date", i = (c, s = 2) => String(c).padStart(s, "0");
1969
+ if (r === "iso")
1970
+ return (c) => {
1971
+ const s = n(c), u = `${i(s.year, 4)}-${i(s.month)}-${i(s.day)}`;
1972
+ return a ? `${u} ${i(s.hour)}:${i(s.minute)}` : u;
1973
+ };
1974
+ const o = new Intl.DateTimeFormat(t.locale, {
1975
+ calendar: "gregory",
1976
+ timeZone: "UTC",
1977
+ year: "numeric",
1978
+ month: r,
1979
+ day: "numeric",
1980
+ ...a ? { hour: "numeric", minute: "2-digit" } : {}
1981
+ });
1982
+ return (c) => {
1983
+ const s = n(c), u = /* @__PURE__ */ new Date(0);
1984
+ return u.setUTCFullYear(s.year, s.month - 1, s.day), u.setUTCHours(s.hour, s.minute, s.second, 0), o.format(u);
1985
+ };
1986
+ }
1987
+ function An(e, t) {
1738
1988
  const r = t.presentation.mode === "auto" ? t.presentation.styles : m("Automatic raw temporal formatting requires styles.");
1739
1989
  if (e.valueKind === "date") {
1740
1990
  const o = new Intl.DateTimeFormat(t.locale, {
@@ -1742,7 +1992,7 @@ function mn(e, t) {
1742
1992
  timeZone: "UTC",
1743
1993
  dateStyle: r.dateStyle
1744
1994
  });
1745
- return (s) => o.format(de(s.fields));
1995
+ return (c) => o.format(we(c.fields));
1746
1996
  }
1747
1997
  const n = e.valueKind === "instant", a = !n && r.dateTime.timeStyle === "long" ? "medium" : r.dateTime.timeStyle, i = new Intl.DateTimeFormat(t.locale, {
1748
1998
  calendar: "gregory",
@@ -1750,9 +2000,9 @@ function mn(e, t) {
1750
2000
  dateStyle: r.dateTime.dateStyle,
1751
2001
  timeStyle: a
1752
2002
  });
1753
- return (o) => n ? i.format(o.instant) : e.valueKind === "wall_datetime" && t.sourceTimezone ? i.format(we(o.fields, t.sourceTimezone)) : i.format(de(o.fields));
2003
+ return (o) => n ? i.format(o.instant) : e.valueKind === "wall_datetime" && t.sourceTimezone ? i.format(ke(o.fields, t.sourceTimezone)) : i.format(we(o.fields));
1754
2004
  }
1755
- function Ae(e, t, r) {
2005
+ function Ve(e, t, r) {
1756
2006
  return {
1757
2007
  ok: !1,
1758
2008
  text: e,
@@ -1762,18 +2012,18 @@ function Ae(e, t, r) {
1762
2012
  }
1763
2013
  };
1764
2014
  }
1765
- function dn(e) {
1766
- const t = Ct(e.metadata), r = pe(e.format), n = r.presentation.mode === "auto" ? mn(t, r) : un(
2015
+ function On(e) {
2016
+ const t = Wt(e.metadata), r = ve(e.format), n = r.presentation.mode === "auto" ? An(t, r) : r.presentation.mode === "preset" ? zn(t, r, r.presentation.preset) : Cn(
1767
2017
  t,
1768
2018
  r,
1769
2019
  r.presentation.dialect,
1770
2020
  r.presentation.pattern
1771
- ), a = ln(t, r);
2021
+ ), a = $t(t, r);
1772
2022
  return (i) => {
1773
2023
  if (i === null)
1774
2024
  return { ok: !0, text: "", status: "empty" };
1775
- const o = an(i, t.valueKind);
1776
- return o.status === "invalid_shape" ? Ae(i, t, "invalid_raw_temporal_value") : o.status === "out_of_range" ? Ae(i, t, "out_of_range_raw_temporal_value") : {
2025
+ const o = Nn(i, t.valueKind);
2026
+ return o.status === "invalid_shape" ? Ve(i, t, "invalid_raw_temporal_value") : o.status === "out_of_range" ? Ve(i, t, "out_of_range_raw_temporal_value") : {
1777
2027
  ok: !0,
1778
2028
  text: n(o),
1779
2029
  status: "formatted",
@@ -1781,24 +2031,24 @@ function dn(e) {
1781
2031
  };
1782
2032
  };
1783
2033
  }
1784
- function fn(e) {
1785
- return dn({
2034
+ function Rn(e) {
2035
+ return On({
1786
2036
  metadata: e.metadata,
1787
2037
  format: e.format
1788
2038
  })(e.value);
1789
2039
  }
1790
- const yn = {
2040
+ const Yn = {
1791
2041
  dateStyle: "short",
1792
2042
  dateTime: { dateStyle: "short", timeStyle: "short" }
1793
2043
  };
1794
- class O extends Error {
2044
+ class q extends Error {
1795
2045
  constructor(r, n) {
1796
2046
  super(n);
1797
- v(this, "code");
2047
+ x(this, "code");
1798
2048
  this.name = "TemporalBucketContractError", this.code = r;
1799
2049
  }
1800
2050
  }
1801
- const gn = [
2051
+ const Pn = [
1802
2052
  "Jan",
1803
2053
  "Feb",
1804
2054
  "Mar",
@@ -1811,7 +2061,7 @@ const gn = [
1811
2061
  "Oct",
1812
2062
  "Nov",
1813
2063
  "Dec"
1814
- ], hn = [
2064
+ ], Ln = [
1815
2065
  "January",
1816
2066
  "February",
1817
2067
  "March",
@@ -1825,31 +2075,31 @@ const gn = [
1825
2075
  "November",
1826
2076
  "December"
1827
2077
  ];
1828
- function oe(e) {
2078
+ function me(e) {
1829
2079
  return {
1830
2080
  ok: !1,
1831
2081
  error: { code: "invalid_temporal_bucket_value", message: e }
1832
2082
  };
1833
2083
  }
1834
- function pn(e) {
2084
+ function jn(e) {
1835
2085
  return e % 4 === 0 && (e % 100 !== 0 || e % 400 === 0);
1836
2086
  }
1837
- function wn(e, t) {
1838
- return t === 2 ? pn(e) ? 29 : 28 : [4, 6, 9, 11].includes(t) ? 30 : 31;
2087
+ function Kn(e, t) {
2088
+ return t === 2 ? jn(e) ? 29 : 28 : [4, 6, 9, 11].includes(t) ? 30 : 31;
1839
2089
  }
1840
- function Tn(e, t, r) {
2090
+ function Hn(e, t, r) {
1841
2091
  const n = [0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4], a = t < 3 ? e - 1 : e;
1842
2092
  return (a + Math.floor(a / 4) - Math.floor(a / 100) + Math.floor(a / 400) + n[t - 1] + r) % 7;
1843
2093
  }
1844
- function X(e) {
2094
+ function te(e) {
1845
2095
  var t;
1846
2096
  return (t = e.calendar.fiscalCalendar) == null ? void 0 : t.yearStartMonth;
1847
2097
  }
1848
- function Sn(e, t) {
2098
+ function Zn(e, t) {
1849
2099
  return (e - t + 12) % 12 % 3 === 0;
1850
2100
  }
1851
- function vn(e, t) {
1852
- const { granularity: r } = t, n = X(t) ?? 1;
2101
+ function qn(e, t) {
2102
+ const { granularity: r } = t, n = te(t) ?? 1;
1853
2103
  switch (r) {
1854
2104
  case "second":
1855
2105
  return !0;
@@ -1860,20 +2110,20 @@ function vn(e, t) {
1860
2110
  case "day":
1861
2111
  return !0;
1862
2112
  case "week":
1863
- return Tn(e.year, e.month, e.day) === t.calendar.weekStart;
2113
+ return Hn(e.year, e.month, e.day) === t.calendar.weekStart;
1864
2114
  case "month":
1865
2115
  return e.day === 1;
1866
2116
  case "quarter":
1867
- return e.day === 1 && Sn(e.month, n);
2117
+ return e.day === 1 && Zn(e.month, n);
1868
2118
  case "year":
1869
2119
  return e.day === 1 && e.month === n;
1870
2120
  }
1871
2121
  }
1872
- function ht(e, t) {
2122
+ function Nt(e, t) {
1873
2123
  if (e === null) return { ok: !0, value: null };
1874
2124
  const r = t.granularity === "second" || t.granularity === "minute" || t.granularity === "hour", n = r ? /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})$/.exec(e) : /^(\d{4})-(\d{2})-(\d{2})$/.exec(e);
1875
2125
  if (!n)
1876
- return oe(
2126
+ return me(
1877
2127
  `Expected ${r ? "YYYY-MM-DDTHH:mm:ss" : "YYYY-MM-DD"} for ${t.granularity} granularity.`
1878
2128
  );
1879
2129
  const a = {
@@ -1884,17 +2134,17 @@ function ht(e, t) {
1884
2134
  minute: r ? Number(n[5]) : 0,
1885
2135
  second: r ? Number(n[6]) : 0
1886
2136
  };
1887
- return a.year < 1 || a.month < 1 || a.month > 12 || a.day < 1 || a.day > wn(a.year, a.month) || a.hour > 23 || a.minute > 59 || a.second > 59 ? oe(`Invalid canonical ${t.granularity} bucket value ${e}.`) : vn(a, t) ? { ok: !0, value: a } : oe(
2137
+ return a.year < 1 || a.month < 1 || a.month > 12 || a.day < 1 || a.day > Kn(a.year, a.month) || a.hour > 23 || a.minute > 59 || a.second > 59 ? me(`Invalid canonical ${t.granularity} bucket value ${e}.`) : qn(a, t) ? { ok: !0, value: a } : me(
1888
2138
  `Canonical value ${e} is not aligned to ${t.granularity} granularity and its governed Calendar.`
1889
2139
  );
1890
2140
  }
1891
- function za(e) {
1892
- const { granularity: t, calendar: r } = e, n = (o, s) => new Intl.DateTimeFormat("en-US", { ...o, timeZone: "UTC" }).format(s), a = [`by ${t} in the ${r.tz} calendar`];
2141
+ function ui(e) {
2142
+ const { granularity: t, calendar: r } = e, n = (o, c) => new Intl.DateTimeFormat("en-US", { ...o, timeZone: "UTC" }).format(c), a = [`by ${t} in the ${r.tz} calendar`];
1893
2143
  t === "week" && a.push(`weeks starting on ${n({ weekday: "long" }, new Date(Date.UTC(2023, 0, 1 + r.weekStart)))}`);
1894
- const i = X(e);
2144
+ const i = te(e);
1895
2145
  return i && (t === "quarter" || t === "year") && a.push(`the fiscal year starting in ${n({ month: "long" }, new Date(Date.UTC(2e3, i - 1, 1)))}`), `${a.join(", ")}; each value is a bucket's start`;
1896
2146
  }
1897
- function pt(e) {
2147
+ function It(e) {
1898
2148
  if (!g(e))
1899
2149
  return {
1900
2150
  ok: !1,
@@ -1908,33 +2158,33 @@ function pt(e) {
1908
2158
  if (!g(n))
1909
2159
  t.push({ path: "presentation", message: "Expected a presentation object." });
1910
2160
  else {
1911
- const o = n.mode, s = o === "preset" ? /* @__PURE__ */ new Set(["mode", "preset"]) : o === "pattern" ? /* @__PURE__ */ new Set(["mode", "pattern"]) : o === "auto" ? /* @__PURE__ */ new Set(["mode", "styles"]) : /* @__PURE__ */ new Set(["mode"]);
1912
- for (const c of Object.keys(n))
1913
- s.has(c) || t.push({
1914
- path: `presentation.${c}`,
1915
- message: `Unknown property "${c}".`
2161
+ const o = n.mode, c = o === "preset" ? /* @__PURE__ */ new Set(["mode", "preset"]) : o === "pattern" ? /* @__PURE__ */ new Set(["mode", "pattern"]) : o === "auto" ? /* @__PURE__ */ new Set(["mode", "styles"]) : /* @__PURE__ */ new Set(["mode"]);
2162
+ for (const s of Object.keys(n))
2163
+ c.has(s) || t.push({
2164
+ path: `presentation.${s}`,
2165
+ message: `Unknown property "${s}".`
1916
2166
  });
1917
2167
  if (o === "preset")
1918
- Lr(n.preset) || t.push({ path: "presentation.preset", message: "Expected a supported preset." });
2168
+ dn(n.preset) || t.push({ path: "presentation.preset", message: "Expected a supported preset." });
1919
2169
  else if (o === "pattern")
1920
2170
  if (typeof n.pattern != "string" || !n.pattern)
1921
2171
  t.push({ path: "presentation.pattern", message: "Expected a non-empty pattern." });
1922
2172
  else {
1923
- const c = C(n.pattern);
1924
- c.ok || t.push({
2173
+ const s = R(n.pattern);
2174
+ s.ok || t.push({
1925
2175
  path: "presentation.pattern",
1926
- message: c.message
2176
+ message: s.message
1927
2177
  });
1928
2178
  }
1929
2179
  else if (o === "auto") {
1930
- const c = n.styles;
1931
- (!g(c) || !["short", "medium", "long"].includes(String(c.dateStyle)) || !g(c.dateTime) || !["short", "medium", "long"].includes(
1932
- String(c.dateTime.dateStyle)
2180
+ const s = n.styles;
2181
+ (!g(s) || !["short", "medium", "long"].includes(String(s.dateStyle)) || !g(s.dateTime) || !["short", "medium", "long"].includes(
2182
+ String(s.dateTime.dateStyle)
1933
2183
  ) || !["short", "medium", "long"].includes(
1934
- String(c.dateTime.timeStyle)
1935
- ) || Object.keys(c).some(
2184
+ String(s.dateTime.timeStyle)
2185
+ ) || Object.keys(s).some(
1936
2186
  (u) => u !== "dateStyle" && u !== "dateTime"
1937
- ) || Object.keys(c.dateTime).some(
2187
+ ) || Object.keys(s.dateTime).some(
1938
2188
  (u) => u !== "dateStyle" && u !== "timeStyle"
1939
2189
  )) && t.push({
1940
2190
  path: "presentation.styles",
@@ -1943,7 +2193,7 @@ function pt(e) {
1943
2193
  } else
1944
2194
  t.push({ path: "presentation.mode", message: "Expected auto, preset, or pattern." });
1945
2195
  }
1946
- const a = F(e.locale);
2196
+ const a = A(e.locale);
1947
2197
  if (a || t.push({ path: "locale", message: "Expected a supported base BCP 47 locale." }), t.length > 0 || !a || !g(n))
1948
2198
  return { ok: !1, issues: t };
1949
2199
  if (n.mode === "auto") {
@@ -1981,47 +2231,47 @@ function pt(e) {
1981
2231
  }
1982
2232
  };
1983
2233
  }
1984
- function xn(e, t) {
2234
+ function Bn(e, t) {
1985
2235
  const r = !!t.calendar.fiscalCalendar;
1986
- return e === "fiscal_quarter_short" || e === "fiscal_year" ? r : e === "quarter_short" || e === "quarter_long" ? !r : !0;
2236
+ return e === "fiscal_quarter_short" || e === "fiscal_year" ? r : e === "quarter_short" || e === "quarter_long" || Ut(e) && (t.granularity === "quarter" || t.granularity === "year") ? !r : !0;
1987
2237
  }
1988
- function wt(e, t) {
1989
- return ct(e, t.granularity).ok ? e.presentation.mode === "preset" ? xn(e.presentation.preset, t) : !(e.presentation.mode === "pattern" && t.calendar.fiscalCalendar && (t.granularity === "quarter" || t.granularity === "year")) : !1;
2238
+ function Et(e, t) {
2239
+ return Tt(e, t.granularity).ok ? e.presentation.mode === "preset" ? Bn(e.presentation.preset, t) : !(e.presentation.mode === "pattern" && t.calendar.fiscalCalendar && (t.granularity === "quarter" || t.granularity === "year")) : !1;
1990
2240
  }
1991
- function Ye(e, t) {
2241
+ function Ge(e, t) {
1992
2242
  if (!(!e || e.presentation.mode === "auto"))
1993
- return wt(e, t) ? { type: "temporal_bucket", presentation: e.presentation } : void 0;
2243
+ return Et(e, t) ? { type: "temporal_bucket", presentation: e.presentation } : void 0;
1994
2244
  }
1995
- function Dn(e) {
2245
+ function Vn(e) {
1996
2246
  var a;
1997
- const t = F(e.locale);
2247
+ const t = A(e.locale);
1998
2248
  if (!t)
1999
- throw new O(
2249
+ throw new q(
2000
2250
  "invalid_temporal_bucket_format",
2001
2251
  "Temporal bucket locale must be a supported base BCP 47 locale."
2002
2252
  );
2003
- const r = Ye(e.cardFormat, e.metadata);
2253
+ const r = Ge(e.cardFormat, e.metadata);
2004
2254
  if (r)
2005
2255
  return { format: { ...r, locale: t }, source: "card" };
2006
- const n = ((a = e.semanticFormat) == null ? void 0 : a.granularity) === e.metadata.granularity ? Ye(e.semanticFormat.format, e.metadata) : void 0;
2256
+ const n = ((a = e.semanticFormat) == null ? void 0 : a.granularity) === e.metadata.granularity ? Ge(e.semanticFormat.format, e.metadata) : void 0;
2007
2257
  return n ? { format: { ...n, locale: t }, source: "semantic" } : {
2008
2258
  format: {
2009
2259
  type: "temporal_bucket",
2010
2260
  locale: t,
2011
2261
  presentation: {
2012
2262
  mode: "auto",
2013
- styles: e.styles ?? yn
2263
+ styles: e.styles ?? Yn
2014
2264
  }
2015
2265
  },
2016
2266
  source: "automatic"
2017
2267
  };
2018
2268
  }
2019
- function x(e, t = 2) {
2269
+ function p(e, t = 2) {
2020
2270
  return String(e).padStart(t, "0");
2021
2271
  }
2022
- function q(e, t, r) {
2272
+ function U(e, t, r) {
2023
2273
  if (t === "en-US")
2024
- return (r === "short" ? gn : hn)[e - 1];
2274
+ return (r === "short" ? Pn : Ln)[e - 1];
2025
2275
  const n = new Date(Date.UTC(2e3, e - 1, 15));
2026
2276
  return new Intl.DateTimeFormat(t, {
2027
2277
  calendar: "gregory",
@@ -2029,190 +2279,219 @@ function q(e, t, r) {
2029
2279
  timeZone: "UTC"
2030
2280
  }).format(n);
2031
2281
  }
2032
- function kn(e, t, r) {
2282
+ function Gn(e, t, r) {
2033
2283
  return t.map((n) => {
2034
2284
  if (n.kind === "literal") return n.value;
2035
2285
  switch (n.value) {
2036
2286
  case "YYYY":
2037
- return x(e.year, 4);
2287
+ return p(e.year, 4);
2038
2288
  case "YY":
2039
- return x(e.year % 100);
2289
+ return p(e.year % 100);
2040
2290
  case "MMMM":
2041
- return q(e.month, r, "long");
2291
+ return U(e.month, r, "long");
2042
2292
  case "MMM":
2043
- return q(e.month, r, "short");
2293
+ return U(e.month, r, "short");
2044
2294
  case "MM":
2045
- return x(e.month);
2295
+ return p(e.month);
2046
2296
  case "DD":
2047
- return x(e.day);
2297
+ return p(e.day);
2048
2298
  case "HH":
2049
- return x(e.hour);
2299
+ return p(e.hour);
2050
2300
  case "mm":
2051
- return x(e.minute);
2301
+ return p(e.minute);
2052
2302
  case "ss":
2053
- return x(e.second);
2303
+ return p(e.second);
2054
2304
  }
2055
2305
  }).join("");
2056
2306
  }
2057
- const Re = /* @__PURE__ */ new Map();
2058
- function E(e, t) {
2059
- const r = `${e}:${JSON.stringify(t)}`, n = Re.get(r);
2307
+ const We = /* @__PURE__ */ new Map();
2308
+ function b(e, t) {
2309
+ const r = `${e}:${JSON.stringify(t)}`, n = We.get(r);
2060
2310
  if (n) return n;
2061
2311
  const a = new Intl.DateTimeFormat(e, t);
2062
- return Re.set(r, a), a;
2312
+ return We.set(r, a), a;
2063
2313
  }
2064
- function B(e) {
2314
+ function z(e) {
2065
2315
  const t = /* @__PURE__ */ new Date(0);
2066
2316
  return t.setUTCFullYear(e.year, e.month - 1, e.day), t.setUTCHours(e.hour, e.minute, e.second, 0), t;
2067
2317
  }
2068
- function Oe(e, t, r) {
2069
- return E(t, {
2318
+ function Xe(e, t, r) {
2319
+ return b(t, {
2070
2320
  calendar: "gregory",
2071
2321
  dateStyle: r,
2072
2322
  timeZone: "UTC"
2073
- }).format(B(e));
2323
+ }).format(z(e));
2074
2324
  }
2075
- function _n(e, t, r) {
2076
- return E(t, {
2325
+ function Wn(e, t, r) {
2326
+ return b(t, {
2077
2327
  calendar: "gregory",
2078
2328
  dateStyle: r.dateStyle,
2079
2329
  // Grouped buckets are civil values, not instants. Long time styles would
2080
2330
  // append a zone label that the canonical value does not semantically own.
2081
2331
  timeStyle: r.timeStyle === "long" ? "medium" : r.timeStyle,
2082
2332
  timeZone: "UTC"
2083
- }).format(B(e));
2333
+ }).format(z(e));
2084
2334
  }
2085
- function bn(e, t, r) {
2335
+ function Xn(e, t, r) {
2086
2336
  var a;
2087
2337
  if (r === "short") {
2088
- const i = B(e), o = E(t, {
2338
+ const i = z(e), o = b(t, {
2089
2339
  calendar: "gregory",
2090
2340
  dateStyle: "short",
2091
2341
  timeZone: "UTC"
2092
- }).formatToParts(i), s = o.findIndex((l) => l.type === "month"), c = o.findIndex((l) => l.type === "year"), u = (a = E(t, {
2342
+ }).formatToParts(i), c = o.findIndex((l) => l.type === "month"), s = o.findIndex((l) => l.type === "year"), u = (a = b(t, {
2093
2343
  calendar: "gregory",
2094
2344
  timeZone: "UTC",
2095
2345
  year: "numeric"
2096
2346
  }).formatToParts(i).find((l) => l.type === "year")) == null ? void 0 : a.value;
2097
- if (s >= 0 && c >= 0 && u) {
2098
- const l = Math.min(s, c), d = Math.max(s, c);
2347
+ if (c >= 0 && s >= 0 && u) {
2348
+ const l = Math.min(c, s), d = Math.max(c, s);
2099
2349
  let y = !1;
2100
- return o.slice(l, d + 1).filter((w) => w.type === "day" ? (y = !0, !1) : y && w.type === "literal" ? (y = !1, !1) : !0).map((w) => w.type === "year" ? u : w.value).join("");
2350
+ return o.slice(l, d + 1).filter((T) => T.type === "day" ? (y = !0, !1) : y && T.type === "literal" ? (y = !1, !1) : !0).map((T) => T.type === "year" ? u : T.value).join("");
2101
2351
  }
2102
2352
  }
2103
- return E(t, {
2353
+ return b(t, {
2104
2354
  calendar: "gregory",
2105
2355
  month: r === "short" ? "numeric" : r === "medium" ? "short" : "long",
2106
2356
  timeZone: "UTC",
2107
2357
  year: "numeric"
2108
- }).format(B(e));
2358
+ }).format(z(e));
2109
2359
  }
2110
- function Nn(e, t) {
2360
+ function Ft(e, t) {
2111
2361
  return Math.floor((e.month - t + 12) % 12 / 3) + 1;
2112
2362
  }
2113
- function Pe(e, t) {
2363
+ function Je(e, t) {
2114
2364
  return t === 1 || e.month < t ? e.year : e.year + 1;
2115
2365
  }
2116
- function Mn(e) {
2366
+ function Ct(e) {
2117
2367
  return e === 1 ? "1st" : e === 2 ? "2nd" : e === 3 ? "3rd" : `${e}th`;
2118
2368
  }
2119
- function fe(e, t, r, n) {
2120
- const a = X(n) ?? 1, i = Nn(e, a);
2369
+ function Ut(e) {
2370
+ return e === "short" || e === "long" || e === "numeric" || e === "iso";
2371
+ }
2372
+ function de(e, t, r) {
2373
+ return t === "iso" ? `${p(e.year, 4)}-${p(e.month)}-${p(e.day)}` : b(r, {
2374
+ calendar: "gregory",
2375
+ month: t === "numeric" ? "numeric" : t === "long" ? "long" : "short",
2376
+ day: "numeric",
2377
+ year: "numeric",
2378
+ timeZone: "UTC"
2379
+ }).format(z(e));
2380
+ }
2381
+ function Jn(e, t, r, n) {
2382
+ const a = Ft(e, 1);
2383
+ switch (n) {
2384
+ case "week":
2385
+ return t === "numeric" || t === "iso" ? de(e, t, r) : `Week of ${de(e, t, r)}`;
2386
+ case "month":
2387
+ return t === "iso" ? `${p(e.year, 4)}-${p(e.month)}` : t === "numeric" ? `${p(e.month)}/${p(e.year, 4)}` : `${U(e.month, r, t === "long" ? "long" : "short")} ${e.year}`;
2388
+ case "quarter":
2389
+ return t === "iso" ? `${p(e.year, 4)}-Q${a}` : t === "long" ? `${Ct(a)} Quarter ${e.year}` : `Q${a} ${e.year}`;
2390
+ case "year":
2391
+ return String(e.year);
2392
+ default:
2393
+ return de(e, t, r);
2394
+ }
2395
+ }
2396
+ function Te(e, t, r, n) {
2397
+ if (Ut(t))
2398
+ return Jn(e, t, r, n.granularity);
2399
+ const a = te(n) ?? 1, i = Ft(e, a);
2121
2400
  switch (t) {
2122
2401
  case "week_of_short":
2123
- return `Week of ${q(e.month, r, "short")} ${e.day}, ${e.year}`;
2402
+ return `Week of ${U(e.month, r, "short")} ${e.day}, ${e.year}`;
2124
2403
  case "week_of_long":
2125
- return `Week of ${q(e.month, r, "long")} ${e.day}, ${e.year}`;
2404
+ return `Week of ${U(e.month, r, "long")} ${e.day}, ${e.year}`;
2126
2405
  case "quarter_short":
2127
2406
  return `Q${i} ${e.year}`;
2128
2407
  case "quarter_long":
2129
- return `${Mn(i)} Quarter ${e.year}`;
2408
+ return `${Ct(i)} Quarter ${e.year}`;
2130
2409
  case "fiscal_quarter_short":
2131
- return `Q${i} FY${Pe(e, a)}`;
2410
+ return `Q${i} FY${Je(e, a)}`;
2132
2411
  case "fiscal_year":
2133
- return `FY${Pe(e, a)}`;
2412
+ return `FY${Je(e, a)}`;
2134
2413
  }
2135
2414
  }
2136
- function $n(e, t, r, n) {
2137
- const a = X(t);
2415
+ function Qn(e, t, r, n) {
2416
+ const a = te(t);
2138
2417
  switch (t.granularity) {
2139
2418
  case "second":
2140
2419
  case "minute":
2141
2420
  case "hour":
2142
- return _n(e, r, n.dateTime);
2421
+ return Wn(e, r, n.dateTime);
2143
2422
  case "day":
2144
- return Oe(e, r, n.dateStyle);
2423
+ return Xe(e, r, n.dateStyle);
2145
2424
  case "week":
2146
- return `Week of ${Oe(e, r, n.dateStyle)}`;
2425
+ return `Week of ${Xe(e, r, n.dateStyle)}`;
2147
2426
  case "month":
2148
- return bn(e, r, n.dateStyle);
2427
+ return Xn(e, r, n.dateStyle);
2149
2428
  case "quarter":
2150
- return fe(
2429
+ return Te(
2151
2430
  e,
2152
2431
  a ? "fiscal_quarter_short" : "quarter_short",
2153
2432
  r,
2154
2433
  t
2155
2434
  );
2156
2435
  case "year":
2157
- return a ? fe(e, "fiscal_year", r, t) : String(e.year);
2436
+ return a ? Te(e, "fiscal_year", r, t) : String(e.year);
2158
2437
  }
2159
2438
  }
2160
- function Aa(e, t) {
2439
+ function li(e, t) {
2161
2440
  if (t.granularity !== "second" && t.granularity !== "minute" && t.granularity !== "hour" && t.granularity !== "day" && t.granularity !== "month")
2162
2441
  return;
2163
- const r = ht(e, t);
2442
+ const r = Nt(e, t);
2164
2443
  if (!r.ok || r.value === null) return;
2165
- const { year: n, month: a, day: i, hour: o, minute: s, second: c } = r.value;
2166
- return { year: n, month: a, day: i, hour: o, minute: s, second: c };
2444
+ const { year: n, month: a, day: i, hour: o, minute: c, second: s } = r.value;
2445
+ return { year: n, month: a, day: i, hour: o, minute: c, second: s };
2167
2446
  }
2168
- function In(e) {
2169
- const t = pt(e.format);
2170
- if (!t.ok || !wt(t.value, e.metadata))
2171
- throw new O(
2447
+ function ea(e) {
2448
+ const t = It(e.format);
2449
+ if (!t.ok || !Et(t.value, e.metadata))
2450
+ throw new q(
2172
2451
  "invalid_temporal_bucket_format",
2173
2452
  "Resolved temporal bucket format is invalid or inapplicable to its metadata."
2174
2453
  );
2175
- const r = ht(e.value, e.metadata);
2454
+ const r = Nt(e.value, e.metadata);
2176
2455
  if (!r.ok)
2177
- throw new O(
2456
+ throw new q(
2178
2457
  r.error.code,
2179
2458
  r.error.message
2180
2459
  );
2181
2460
  if (r.value === null) return "(Blank)";
2182
2461
  const { presentation: n, locale: a } = t.value;
2183
2462
  if (n.mode === "auto")
2184
- return $n(
2463
+ return Qn(
2185
2464
  r.value,
2186
2465
  e.metadata,
2187
2466
  a,
2188
2467
  n.styles
2189
2468
  );
2190
2469
  if (n.mode === "preset")
2191
- return fe(
2470
+ return Te(
2192
2471
  r.value,
2193
2472
  n.preset,
2194
2473
  a,
2195
2474
  e.metadata
2196
2475
  );
2197
- const i = C(n.pattern);
2476
+ const i = R(n.pattern);
2198
2477
  if (!i.ok)
2199
- throw new O(
2478
+ throw new q(
2200
2479
  "invalid_temporal_bucket_format",
2201
2480
  i.message
2202
2481
  );
2203
- return kn(r.value, i.segments, a);
2482
+ return Gn(r.value, i.segments, a);
2204
2483
  }
2205
- function Ya(e, t) {
2484
+ function mi(e, t) {
2206
2485
  return t.levelLabels[e.id] ?? e.field.label ?? e.field.name;
2207
2486
  }
2208
- function Ra(e, t) {
2487
+ function di(e, t) {
2209
2488
  return t.measureLabels[e.id] ?? (e.kind === "aggregate" ? e.field.label ?? e.field.name : e.definition.label);
2210
2489
  }
2211
- function Oa(e) {
2212
- return It.parse(En(e));
2490
+ function fi(e) {
2491
+ return qt.parse(ta(e));
2213
2492
  }
2214
- function En(e) {
2215
- const t = Nt.parse(e), r = (n) => ({
2493
+ function ta(e) {
2494
+ const t = Kt.parse(e), r = (n) => ({
2216
2495
  grand: { visible: !0, position: "after" },
2217
2496
  levels: Object.fromEntries(
2218
2497
  n.map((a) => [
@@ -2221,7 +2500,7 @@ function En(e) {
2221
2500
  ])
2222
2501
  )
2223
2502
  });
2224
- return Mt.parse({
2503
+ return Ht.parse({
2225
2504
  version: 1,
2226
2505
  spec: t,
2227
2506
  presentation: {
@@ -2239,32 +2518,32 @@ function En(e) {
2239
2518
  }
2240
2519
  });
2241
2520
  }
2242
- function Fn(e, t) {
2243
- const r = new Map(e.map((n) => [I(n), n]));
2244
- for (const n of t ?? []) r.set(I(n), n);
2521
+ function ra(e, t) {
2522
+ const r = new Map(e.map((n) => [F(n), n]));
2523
+ for (const n of t ?? []) r.set(F(n), n);
2245
2524
  return [...r.values()];
2246
2525
  }
2247
- function Pa(e) {
2248
- const { spec: t, presentation: r, defaults: n, session: a } = $t.parse(e), i = new Map(
2249
- Fn(t.sorts, a == null ? void 0 : a.sorts).map((s) => [I(s), s])
2526
+ function yi(e) {
2527
+ const { spec: t, presentation: r, defaults: n, session: a } = Zt.parse(e), i = new Map(
2528
+ ra(t.sorts, a == null ? void 0 : a.sorts).map((c) => [F(c), c])
2250
2529
  );
2251
- for (const s of ["rows", "columns"])
2252
- for (const c of t[s]) {
2530
+ for (const c of ["rows", "columns"])
2531
+ for (const s of t[c]) {
2253
2532
  const u = {
2254
- axis: s,
2255
- levelId: c.id,
2533
+ axis: c,
2534
+ levelId: s.id,
2256
2535
  scope: { kind: "level" },
2257
2536
  target: { kind: "member" },
2258
2537
  direction: "asc",
2259
2538
  nulls: "last"
2260
2539
  };
2261
- i.has(I(u)) || i.set(I(u), u);
2540
+ i.has(F(u)) || i.set(F(u), u);
2262
2541
  }
2263
- const o = (s, c) => ({
2264
- depth: Math.min(s.depth, Math.max(0, c - 1)),
2542
+ const o = (c, s) => ({
2543
+ depth: Math.min(c.depth, Math.max(0, s - 1)),
2265
2544
  // Leaf toggles are valid but have no effect. Collapsed ancestors retain dormant overrides.
2266
- overrides: s.overrides.filter(
2267
- (u) => u.path.length < c
2545
+ overrides: c.overrides.filter(
2546
+ (u) => u.path.length < s
2268
2547
  )
2269
2548
  });
2270
2549
  return {
@@ -2280,35 +2559,35 @@ function Pa(e) {
2280
2559
  }
2281
2560
  };
2282
2561
  }
2283
- class Le extends Error {
2562
+ class Qe extends Error {
2284
2563
  constructor(r) {
2285
2564
  super(
2286
2565
  `invalid_presentation_execution_snapshot: ${r} Resave this report before running it again.`
2287
2566
  );
2288
- v(this, "code", "invalid_presentation_execution_snapshot");
2289
- v(this, "deliveryBlocking", !0);
2567
+ x(this, "code", "invalid_presentation_execution_snapshot");
2568
+ x(this, "deliveryBlocking", !0);
2290
2569
  this.name = "PresentationExecutionSnapshotError";
2291
2570
  }
2292
2571
  }
2293
- class La extends Error {
2572
+ class gi extends Error {
2294
2573
  constructor(r) {
2295
2574
  super(
2296
2575
  `missing_resolved_raw_temporal_format: Column "${r}" has no captured presentation. Resave this report before running it again.`
2297
2576
  );
2298
- v(this, "code", "missing_resolved_raw_temporal_format");
2299
- v(this, "deliveryBlocking", !0);
2577
+ x(this, "code", "missing_resolved_raw_temporal_format");
2578
+ x(this, "deliveryBlocking", !0);
2300
2579
  this.name = "MissingResolvedRawTemporalFormatError";
2301
2580
  }
2302
2581
  }
2303
- function D(e, t, r) {
2582
+ function k(e, t, r) {
2304
2583
  const n = new Set(t), a = Object.keys(e).find((i) => !n.has(i));
2305
2584
  if (a)
2306
2585
  throw new Error(`${r} contains unknown property "${a}"`);
2307
2586
  }
2308
- function Cn(e, t = "scope") {
2587
+ function na(e, t = "scope") {
2309
2588
  if (!g(e))
2310
2589
  throw new Error(`${t} must be an object`);
2311
- D(
2590
+ k(
2312
2591
  e,
2313
2592
  ["dashboardId", "cardId", "attachmentIndex"],
2314
2593
  t
@@ -2330,22 +2609,22 @@ function Cn(e, t = "scope") {
2330
2609
  ...typeof a == "number" ? { attachmentIndex: a } : {}
2331
2610
  };
2332
2611
  }
2333
- function _(e, t, r, n) {
2612
+ function $(e, t, r, n) {
2334
2613
  if (e.kind !== t) return;
2335
- D(e, ["kind", r], n);
2614
+ k(e, ["kind", r], n);
2336
2615
  const a = e[r];
2337
2616
  if (typeof a != "string" || !a.trim())
2338
2617
  throw new Error(`${n}.${r} is required`);
2339
2618
  return a;
2340
2619
  }
2341
- function se(e, t) {
2620
+ function fe(e, t) {
2342
2621
  if (!g(e))
2343
2622
  throw new Error(`${t} must be an object`);
2344
- const r = _(e, "metric", "metricId", t);
2623
+ const r = $(e, "metric", "metricId", t);
2345
2624
  if (r) return { kind: "metric", metricId: r };
2346
- const n = _(e, "column", "columnKey", t);
2625
+ const n = $(e, "column", "columnKey", t);
2347
2626
  if (n) return { kind: "column", columnKey: n };
2348
- const a = _(
2627
+ const a = $(
2349
2628
  e,
2350
2629
  "matrix_measure",
2351
2630
  "measureId",
@@ -2354,7 +2633,7 @@ function se(e, t) {
2354
2633
  if (a) return { kind: "matrix_measure", measureId: a };
2355
2634
  throw new Error(`${t} is not a valid numeric presentation target`);
2356
2635
  }
2357
- const Un = [
2636
+ const aa = [
2358
2637
  "type",
2359
2638
  "inputUnit",
2360
2639
  "outputStyle",
@@ -2365,12 +2644,12 @@ const Un = [
2365
2644
  "suffix",
2366
2645
  "negativeStyle"
2367
2646
  ];
2368
- function zn(e) {
2647
+ function ia(e) {
2369
2648
  return e === "millisecond" || e === "second" || e === "minute" || e === "hour" || e === "day";
2370
2649
  }
2371
- const An = ["type", "locale", "pattern", "timezone", "sourceTimezone"];
2372
- function Yn(e, t) {
2373
- if (D(e, An, t), typeof e.locale != "string" || !e.locale.trim())
2650
+ const oa = ["type", "locale", "pattern", "timezone", "sourceTimezone"];
2651
+ function sa(e, t) {
2652
+ if (k(e, oa, t), typeof e.locale != "string" || !e.locale.trim())
2374
2653
  throw new Error(`${t}.locale must be a non-empty string`);
2375
2654
  for (const r of ["pattern", "timezone", "sourceTimezone"])
2376
2655
  if (e[r] !== void 0 && typeof e[r] != "string")
@@ -2383,10 +2662,10 @@ function Yn(e, t) {
2383
2662
  ...typeof e.sourceTimezone == "string" ? { sourceTimezone: e.sourceTimezone } : {}
2384
2663
  };
2385
2664
  }
2386
- function Rn(e, t) {
2387
- D(e, Un, t);
2665
+ function ca(e, t) {
2666
+ k(e, aa, t);
2388
2667
  for (const i of ["inputUnit", "largestUnit", "smallestUnit"])
2389
- if (e[i] !== void 0 && !zn(e[i]))
2668
+ if (e[i] !== void 0 && !ia(e[i]))
2390
2669
  throw new Error(`${t}.${i} must be a duration unit`);
2391
2670
  const r = e.outputStyle;
2392
2671
  if (r !== void 0 && r !== "compact" && r !== "digital" && r !== "long")
@@ -2412,11 +2691,11 @@ function Rn(e, t) {
2412
2691
  ...a !== void 0 ? { negativeStyle: a } : {}
2413
2692
  };
2414
2693
  }
2415
- function On(e, t) {
2694
+ function ua(e, t) {
2416
2695
  if (!g(e))
2417
2696
  throw new Error(`${t} must be an object`);
2418
2697
  if (e.kind === "field") {
2419
- D(e, ["kind", "fieldId", "role"], t);
2698
+ k(e, ["kind", "fieldId", "role"], t);
2420
2699
  const a = typeof e.fieldId == "string" ? e.fieldId.trim() : "";
2421
2700
  if (!a)
2422
2701
  throw new Error(`${t}.fieldId is required`);
@@ -2429,9 +2708,9 @@ function On(e, t) {
2429
2708
  ...i ? { role: i } : {}
2430
2709
  };
2431
2710
  }
2432
- const r = _(e, "column", "columnKey", t);
2711
+ const r = $(e, "column", "columnKey", t);
2433
2712
  if (r) return { kind: "column", columnKey: r };
2434
- const n = _(
2713
+ const n = $(
2435
2714
  e,
2436
2715
  "matrix_axis",
2437
2716
  "axisInstanceId",
@@ -2440,22 +2719,22 @@ function On(e, t) {
2440
2719
  if (n) return { kind: "matrix_axis", axisInstanceId: n };
2441
2720
  throw new Error(`${t} is not a valid temporal bucket presentation target`);
2442
2721
  }
2443
- function Pn(e, t) {
2722
+ function la(e, t) {
2444
2723
  if (!g(e))
2445
2724
  throw new Error(`${t} must be an object`);
2446
- const r = _(e, "column", "columnKey", t);
2725
+ const r = $(e, "column", "columnKey", t);
2447
2726
  if (!r)
2448
2727
  throw new Error(`${t} must identify a column`);
2449
2728
  return { kind: "column", columnKey: r };
2450
2729
  }
2451
- function Ln(e) {
2730
+ function ma(e) {
2452
2731
  return [
2453
2732
  e.dashboardId,
2454
2733
  e.cardId ?? null,
2455
2734
  e.attachmentIndex ?? null
2456
2735
  ];
2457
2736
  }
2458
- function V(e) {
2737
+ function J(e) {
2459
2738
  switch (e.kind) {
2460
2739
  case "metric":
2461
2740
  return [e.kind, e.metricId];
@@ -2469,37 +2748,37 @@ function V(e) {
2469
2748
  return [e.kind, e.axisInstanceId];
2470
2749
  }
2471
2750
  }
2472
- function J(e, t) {
2751
+ function re(e, t) {
2473
2752
  return e.dashboardId === t.dashboardId && e.cardId === t.cardId && e.attachmentIndex === t.attachmentIndex;
2474
2753
  }
2475
- function Q(e, t) {
2476
- const r = V(e), n = V(t);
2754
+ function ne(e, t) {
2755
+ const r = J(e), n = J(t);
2477
2756
  return r.length === n.length && r.every((a, i) => a === n[i]);
2478
2757
  }
2479
- function jn(e) {
2758
+ function da(e) {
2480
2759
  if (!Array.isArray(e))
2481
2760
  throw new Error("resolvedFormats must be an array");
2482
2761
  const t = /* @__PURE__ */ new Set();
2483
2762
  return e.map((r, n) => {
2484
- var c, u;
2763
+ var s, u;
2485
2764
  const a = `resolvedFormats.${n}`;
2486
2765
  if (!g(r))
2487
2766
  throw new Error(`${a} must be an object`);
2488
- D(r, ["scope", "target", "format"], a);
2489
- const i = Cn(r.scope, `${a}.scope`);
2767
+ k(r, ["scope", "target", "format"], a);
2768
+ const i = na(r.scope, `${a}.scope`);
2490
2769
  if (!g(r.format))
2491
2770
  throw new Error(`${a}.format must be an object`);
2492
2771
  let o;
2493
2772
  switch (r.format.type) {
2494
2773
  case "temporal_bucket": {
2495
- const l = pt(r.format);
2774
+ const l = It(r.format);
2496
2775
  if (!l.ok)
2497
2776
  throw new Error(
2498
- `${a}.format is invalid: ${((c = l.issues[0]) == null ? void 0 : c.message) ?? "invalid value"}`
2777
+ `${a}.format is invalid: ${((s = l.issues[0]) == null ? void 0 : s.message) ?? "invalid value"}`
2499
2778
  );
2500
2779
  o = {
2501
2780
  scope: i,
2502
- target: On(r.target, `${a}.target`),
2781
+ target: ua(r.target, `${a}.target`),
2503
2782
  format: l.value
2504
2783
  };
2505
2784
  break;
@@ -2507,42 +2786,42 @@ function jn(e) {
2507
2786
  case "raw_temporal":
2508
2787
  o = {
2509
2788
  scope: i,
2510
- target: Pn(r.target, `${a}.target`),
2511
- format: pe(r.format)
2789
+ target: la(r.target, `${a}.target`),
2790
+ format: ve(r.format)
2512
2791
  };
2513
2792
  break;
2514
2793
  case "number":
2515
2794
  case "currency":
2516
2795
  case "percent":
2517
2796
  case "scientific": {
2518
- const l = Ar(r.format);
2797
+ const l = sn(r.format);
2519
2798
  if (!l.ok)
2520
2799
  throw new Error(
2521
2800
  `${a}.format is invalid: ${((u = l.issues[0]) == null ? void 0 : u.message) ?? "invalid value"}`
2522
2801
  );
2523
2802
  o = {
2524
2803
  scope: i,
2525
- target: se(r.target, `${a}.target`),
2804
+ target: fe(r.target, `${a}.target`),
2526
2805
  format: l.value
2527
2806
  };
2528
2807
  break;
2529
2808
  }
2530
2809
  case "date": {
2531
- const l = se(r.target, `${a}.target`);
2810
+ const l = fe(r.target, `${a}.target`);
2532
2811
  if (l.kind !== "column")
2533
2812
  throw new Error(`${a}.target must identify a column for a date format`);
2534
2813
  o = {
2535
2814
  scope: i,
2536
2815
  target: l,
2537
- format: Yn(r.format, `${a}.format`)
2816
+ format: sa(r.format, `${a}.format`)
2538
2817
  };
2539
2818
  break;
2540
2819
  }
2541
2820
  case "duration":
2542
2821
  o = {
2543
2822
  scope: i,
2544
- target: se(r.target, `${a}.target`),
2545
- format: Rn(
2823
+ target: fe(r.target, `${a}.target`),
2824
+ format: ca(
2546
2825
  r.format,
2547
2826
  `${a}.format`
2548
2827
  )
@@ -2551,28 +2830,28 @@ function jn(e) {
2551
2830
  default:
2552
2831
  throw new Error(`${a}.format.type is unsupported`);
2553
2832
  }
2554
- const s = JSON.stringify([
2555
- ...Ln(o.scope),
2556
- ...V(o.target)
2833
+ const c = JSON.stringify([
2834
+ ...ma(o.scope),
2835
+ ...J(o.target)
2557
2836
  ]);
2558
- if (t.has(s))
2837
+ if (t.has(c))
2559
2838
  throw new Error(
2560
2839
  `${a} duplicates a scoped presentation target`
2561
2840
  );
2562
- return t.add(s), o;
2841
+ return t.add(c), o;
2563
2842
  });
2564
2843
  }
2565
- function Kn(e) {
2844
+ function fa(e) {
2566
2845
  try {
2567
2846
  if (!g(e))
2568
2847
  throw new Error("presentation execution snapshot must be an object");
2569
- if (D(
2848
+ if (k(
2570
2849
  e,
2571
2850
  ["version", "reportContext", "resolvedFormats"],
2572
2851
  "presentation execution snapshot"
2573
2852
  ), e.version !== 1)
2574
2853
  throw new Error("presentation execution snapshot version must be 1");
2575
- const t = Et(e.reportContext);
2854
+ const t = Vt(e.reportContext);
2576
2855
  if (!t.ok) {
2577
2856
  const r = t.issues[0];
2578
2857
  throw new Error(
@@ -2582,50 +2861,50 @@ function Kn(e) {
2582
2861
  return {
2583
2862
  version: 1,
2584
2863
  reportContext: t.value,
2585
- resolvedFormats: jn(e.resolvedFormats)
2864
+ resolvedFormats: da(e.resolvedFormats)
2586
2865
  };
2587
2866
  } catch (t) {
2588
- throw t instanceof Le ? t : new Le(
2867
+ throw t instanceof Qe ? t : new Qe(
2589
2868
  t instanceof Error ? t.message : "Snapshot is invalid."
2590
2869
  );
2591
2870
  }
2592
2871
  }
2593
- function ja(e) {
2594
- return Kn({
2872
+ function hi(e) {
2873
+ return fa({
2595
2874
  version: 1,
2596
2875
  reportContext: e.reportContext,
2597
2876
  resolvedFormats: [...e.resolvedFormats]
2598
2877
  });
2599
2878
  }
2600
- function Ka(e) {
2601
- const t = Hn(e);
2602
- return Ze(t) ? t : void 0;
2879
+ function pi(e) {
2880
+ const t = ya(e);
2881
+ return Q(t) ? t : void 0;
2603
2882
  }
2604
- function Hn(e) {
2883
+ function ya(e) {
2605
2884
  const t = e.snapshot.resolvedFormats.find(
2606
- (r) => r.format.type !== "temporal_bucket" && r.format.type !== "raw_temporal" && r.format.type !== "date" && J(r.scope, e.scope) && Q(r.target, e.target)
2885
+ (r) => r.format.type !== "temporal_bucket" && r.format.type !== "raw_temporal" && r.format.type !== "date" && re(r.scope, e.scope) && ne(r.target, e.target)
2607
2886
  );
2608
2887
  return t == null ? void 0 : t.format;
2609
2888
  }
2610
- function Ha(e) {
2889
+ function wi(e) {
2611
2890
  const t = e.snapshot.resolvedFormats.find(
2612
- (r) => r.format.type === "date" && J(r.scope, e.scope) && Q(r.target, e.target)
2891
+ (r) => r.format.type === "date" && re(r.scope, e.scope) && ne(r.target, e.target)
2613
2892
  );
2614
2893
  return t == null ? void 0 : t.format;
2615
2894
  }
2616
- function Za(e) {
2895
+ function Ti(e) {
2617
2896
  const t = e.snapshot.resolvedFormats.find(
2618
- (r) => r.format.type === "raw_temporal" && J(r.scope, e.scope) && Q(r.target, e.target)
2897
+ (r) => r.format.type === "raw_temporal" && re(r.scope, e.scope) && ne(r.target, e.target)
2619
2898
  );
2620
2899
  return t == null ? void 0 : t.format;
2621
2900
  }
2622
- function qa(e) {
2901
+ function Si(e) {
2623
2902
  const t = e.snapshot.resolvedFormats.find(
2624
- (r) => r.format.type === "temporal_bucket" && J(r.scope, e.scope) && Q(r.target, e.target)
2903
+ (r) => r.format.type === "temporal_bucket" && re(r.scope, e.scope) && ne(r.target, e.target)
2625
2904
  );
2626
2905
  return t == null ? void 0 : t.format;
2627
2906
  }
2628
- function Ba(e) {
2907
+ function Di(e) {
2629
2908
  var a;
2630
2909
  const t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
2631
2910
  if (e.snapshot.resolvedFormats.forEach((i, o) => {
@@ -2638,12 +2917,12 @@ function Ba(e) {
2638
2917
  `resolvedFormats.${o}.scope must match the executing dashboard/card`
2639
2918
  );
2640
2919
  if (i.target.kind === "field" && i.format.type === "temporal_bucket") {
2641
- const s = JSON.stringify(V(i.target));
2642
- if (r.has(s))
2920
+ const c = JSON.stringify(J(i.target));
2921
+ if (r.has(c))
2643
2922
  throw new Error(
2644
2923
  `resolvedFormats.${o} duplicates export field "${i.target.fieldId}"`
2645
2924
  );
2646
- r.add(s);
2925
+ r.add(c);
2647
2926
  return;
2648
2927
  }
2649
2928
  if (i.target.kind !== "column")
@@ -2666,78 +2945,78 @@ function Ba(e) {
2666
2945
  `resolvedFormats is missing visible export column "${n}"`
2667
2946
  );
2668
2947
  }
2669
- const Zn = /* @__PURE__ */ new Set(["short", "medium", "long"]), qn = /^(\d{4})-(\d{2})-(\d{2})$/, Bn = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?$/, Vn = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?(?:Z|[+-]\d{2}:\d{2})$/, Te = " – ";
2670
- function Va(e) {
2948
+ const ga = /* @__PURE__ */ new Set(["short", "medium", "long"]), ha = /^(\d{4})-(\d{2})-(\d{2})$/, pa = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?$/, wa = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?(?:Z|[+-]\d{2}:\d{2})$/, _e = " – ";
2949
+ function xi(e) {
2671
2950
  if (!g(e)) return;
2672
2951
  const t = Object.keys(e);
2673
2952
  if (e.mode === "period_label" && t.length === 1)
2674
2953
  return { mode: "period_label" };
2675
- if (e.mode === "style" && t.length === 2 && typeof e.dateStyle == "string" && Zn.has(e.dateStyle))
2954
+ if (e.mode === "style" && t.length === 2 && typeof e.dateStyle == "string" && ga.has(e.dateStyle))
2676
2955
  return { mode: "style", dateStyle: e.dateStyle };
2677
- if (e.mode === "pattern" && t.length === 3 && e.dialect === "semaphor_tokens" && typeof e.pattern == "string" && Gn(e.pattern) === null)
2956
+ if (e.mode === "pattern" && t.length === 3 && e.dialect === "semaphor_tokens" && typeof e.pattern == "string" && Ta(e.pattern) === null)
2678
2957
  return {
2679
2958
  mode: "pattern",
2680
2959
  dialect: "semaphor_tokens",
2681
2960
  pattern: e.pattern
2682
2961
  };
2683
2962
  }
2684
- function Gn(e) {
2963
+ function Ta(e) {
2685
2964
  try {
2686
- return cn({ dialect: "semaphor_tokens", pattern: e }), null;
2965
+ return Fn({ dialect: "semaphor_tokens", pattern: e }), null;
2687
2966
  } catch (t) {
2688
2967
  return t instanceof Error ? t.message : "The pattern is invalid.";
2689
2968
  }
2690
2969
  }
2691
- function Ga(e) {
2970
+ function vi(e) {
2692
2971
  const { value: t, part: r, presentation: n, preferences: a, calendar: i } = e;
2693
2972
  if ((n == null ? void 0 : n.mode) === "period_label" && t.periodLabel && r === "range")
2694
2973
  return { ok: !0, text: t.periodLabel };
2695
- const [o, s] = t.bounds, u = s === void 0 || r === "start" ? [{ raw: o, role: "start" }] : r === "end" ? [{ raw: s, role: "end" }] : [
2974
+ const [o, c] = t.bounds, u = c === void 0 || r === "start" ? [{ raw: o, role: "start" }] : r === "end" ? [{ raw: c, role: "end" }] : [
2696
2975
  { raw: o, role: "start" },
2697
- { raw: s, role: "end" }
2698
- ], l = u.map(({ raw: h }) => Qn(h, i.tz));
2976
+ { raw: c, role: "end" }
2977
+ ], l = u.map(({ raw: h }) => va(h, i.tz));
2699
2978
  if (l.some((h) => h === null))
2700
2979
  return {
2701
2980
  ok: !1,
2702
- text: u.map(({ raw: h }) => h).join(Te),
2981
+ text: u.map(({ raw: h }) => h).join(_e),
2703
2982
  diagnostic: {
2704
2983
  code: "invalid_temporal_input_value",
2705
2984
  message: "A date input bound is not a date or an instant."
2706
2985
  }
2707
2986
  };
2708
2987
  const d = t.precision === "day" ? l.map(
2709
- (h, Dt) => ta(h, u[Dt].role, i.tz)
2988
+ (h, Yt) => _a(h, u[Yt].role, i.tz)
2710
2989
  ) : [], y = d.length > 0 && d.every((h) => h !== null) ? d : null;
2711
- return { ok: !0, text: y ? Wn(y, n, a, i) : Xn(
2712
- l.map((h) => ea(h, i.tz)),
2990
+ return { ok: !0, text: y ? Sa(y, n, a, i) : Da(
2991
+ l.map((h) => ka(h, i.tz)),
2713
2992
  n,
2714
2993
  a,
2715
2994
  i
2716
2995
  ) };
2717
2996
  }
2718
- function Wn(e, t, r, n) {
2997
+ function Sa(e, t, r, n) {
2719
2998
  const [a, i = a] = e;
2720
2999
  if ((t == null ? void 0 : t.mode) === "pattern")
2721
- return vt(
3000
+ return Ot(
2722
3001
  e.map(
2723
- (c) => St(ye(c), "date", t.pattern, r, n)
3002
+ (s) => At(Se(s), "date", t.pattern, r, n)
2724
3003
  )
2725
3004
  );
2726
3005
  const o = (t == null ? void 0 : t.mode) === "style" ? t.dateStyle : r.dateStyle;
2727
3006
  if (!t || t.mode === "period_label") {
2728
- const c = ra(a, i, n);
2729
- if (c)
2730
- return In({
2731
- value: ye(a),
3007
+ const s = ba(a, i, n);
3008
+ if (s)
3009
+ return ea({
3010
+ value: Se(a),
2732
3011
  metadata: {
2733
3012
  kind: "temporal_bucket",
2734
- granularity: c,
3013
+ granularity: s,
2735
3014
  calendar: { tz: n.tz, weekStart: n.weekStart ?? 1 }
2736
3015
  },
2737
- format: Dn({
3016
+ format: Vn({
2738
3017
  metadata: {
2739
3018
  kind: "temporal_bucket",
2740
- granularity: c,
3019
+ granularity: s,
2741
3020
  calendar: { tz: n.tz, weekStart: n.weekStart ?? 1 }
2742
3021
  },
2743
3022
  locale: r.locale,
@@ -2745,19 +3024,19 @@ function Wn(e, t, r, n) {
2745
3024
  }).format
2746
3025
  });
2747
3026
  }
2748
- const s = new Intl.DateTimeFormat(r.locale, {
3027
+ const c = new Intl.DateTimeFormat(r.locale, {
2749
3028
  calendar: "gregory",
2750
3029
  timeZone: "UTC",
2751
3030
  dateStyle: o
2752
3031
  });
2753
- return aa(a, i) ? s.format(P(a)) : Tt(s, P(a), P(i));
3032
+ return Ma(a, i) ? c.format(B(a)) : zt(c, B(a), B(i));
2754
3033
  }
2755
- function Xn(e, t, r, n) {
3034
+ function Da(e, t, r, n) {
2756
3035
  if ((t == null ? void 0 : t.mode) === "pattern")
2757
- return vt(
3036
+ return Ot(
2758
3037
  e.map(
2759
- (s) => St(
2760
- s.toISOString(),
3038
+ (c) => At(
3039
+ c.toISOString(),
2761
3040
  "instant",
2762
3041
  t.pattern,
2763
3042
  r,
@@ -2771,14 +3050,14 @@ function Xn(e, t, r, n) {
2771
3050
  dateStyle: (t == null ? void 0 : t.mode) === "style" ? t.dateStyle : r.dateTime.dateStyle,
2772
3051
  timeStyle: r.dateTime.timeStyle
2773
3052
  }), [i, o] = e;
2774
- return o && o.getTime() !== i.getTime() ? Tt(a, i, o) : a.format(i);
3053
+ return o && o.getTime() !== i.getTime() ? zt(a, i, o) : a.format(i);
2775
3054
  }
2776
- function Tt(e, t, r) {
3055
+ function zt(e, t, r) {
2777
3056
  const n = e;
2778
- return typeof n.formatRange == "function" ? n.formatRange(t, r) : `${e.format(t)}${Te}${e.format(r)}`;
3057
+ return typeof n.formatRange == "function" ? n.formatRange(t, r) : `${e.format(t)}${_e}${e.format(r)}`;
2779
3058
  }
2780
- function St(e, t, r, n, a) {
2781
- const i = Xr({
3059
+ function At(e, t, r, n, a) {
3060
+ const i = xn({
2782
3061
  format: {
2783
3062
  type: "raw_temporal",
2784
3063
  presentation: { mode: "pattern", dialect: "semaphor_tokens", pattern: r }
@@ -2786,154 +3065,164 @@ function St(e, t, r, n, a) {
2786
3065
  // Temporal formatting reads no currency.
2787
3066
  preferences: {
2788
3067
  ...n,
2789
- defaultCurrency: Ft.defaultCurrency
3068
+ defaultCurrency: Gt.defaultCurrency
2790
3069
  },
2791
3070
  calendar: { tz: a.tz }
2792
- }), o = t === "date" && Jn(r) ? "instant" : t;
2793
- return fn({
2794
- value: o === t ? e : W(`${e}T00:00:00`, a.tz).toISOString(),
3071
+ }), o = t === "date" && xa(r) ? "instant" : t;
3072
+ return Rn({
3073
+ value: o === t ? e : ee(`${e}T00:00:00`, a.tz).toISOString(),
2795
3074
  metadata: { kind: "raw_temporal", valueKind: o },
2796
3075
  format: i
2797
3076
  }).text;
2798
3077
  }
2799
- function Jn(e) {
3078
+ function xa(e) {
2800
3079
  return /HH|mm|ss/.test(e);
2801
3080
  }
2802
- function vt(e) {
2803
- return e[1] === void 0 || e[0] === e[1] ? e[0] : e.join(Te);
3081
+ function Ot(e) {
3082
+ return e[1] === void 0 || e[0] === e[1] ? e[0] : e.join(_e);
2804
3083
  }
2805
- function Qn(e, t) {
2806
- const r = qn.exec(e);
3084
+ function va(e, t) {
3085
+ const r = ha.exec(e);
2807
3086
  if (r) {
2808
3087
  const a = {
2809
3088
  year: Number(r[1]),
2810
3089
  month: Number(r[2]),
2811
3090
  day: Number(r[3])
2812
3091
  };
2813
- return ia(a) ? { kind: "date", date: a } : null;
3092
+ return Na(a) ? { kind: "date", date: a } : null;
2814
3093
  }
2815
- const n = Vn.test(e) ? new Date(e.replace(" ", "T")) : Bn.test(e) ? W(e.replace(" ", "T"), t) : null;
3094
+ const n = wa.test(e) ? new Date(e.replace(" ", "T")) : pa.test(e) ? ee(e.replace(" ", "T"), t) : null;
2816
3095
  return n && !Number.isNaN(n.getTime()) ? { kind: "instant", instant: n } : null;
2817
3096
  }
2818
- function ea(e, t) {
2819
- return e.kind === "instant" ? e.instant : W(`${ye(e.date)}T00:00:00`, t);
3097
+ function ka(e, t) {
3098
+ return e.kind === "instant" ? e.instant : ee(`${Se(e.date)}T00:00:00`, t);
2820
3099
  }
2821
- function ta(e, t, r) {
3100
+ function _a(e, t, r) {
2822
3101
  if (e.kind === "date") return e.date;
2823
- const n = Ut(e.instant, r), a = { year: n.year, month: n.month, day: n.day };
2824
- if (n.hour === 0 && n.minute === 0 && n.second === 0 && e.instant.getUTCMilliseconds() === 0) return t === "start" ? a : na(a, -1);
3102
+ const n = Xt(e.instant, r), a = { year: n.year, month: n.month, day: n.day };
3103
+ if (n.hour === 0 && n.minute === 0 && n.second === 0 && e.instant.getUTCMilliseconds() === 0) return t === "start" ? a : $a(a, -1);
2825
3104
  const o = n.hour === 23 && n.minute === 59 && n.second === 59;
2826
3105
  return t === "end" && o ? a : null;
2827
3106
  }
2828
- function ra(e, t, r) {
2829
- return r.fiscalCalendar || e.day !== 1 || e.year !== t.year || t.day !== xt(t.year, t.month) ? null : e.month === t.month ? "month" : e.month % 3 === 1 && t.month === e.month + 2 ? "quarter" : e.month === 1 && t.month === 12 ? "year" : null;
3107
+ function ba(e, t, r) {
3108
+ return r.fiscalCalendar || e.day !== 1 || e.year !== t.year || t.day !== Rt(t.year, t.month) ? null : e.month === t.month ? "month" : e.month % 3 === 1 && t.month === e.month + 2 ? "quarter" : e.month === 1 && t.month === 12 ? "year" : null;
2830
3109
  }
2831
- function ye(e) {
3110
+ function Se(e) {
2832
3111
  return `${String(e.year).padStart(4, "0")}-${String(e.month).padStart(2, "0")}-${String(e.day).padStart(2, "0")}`;
2833
3112
  }
2834
- function P(e) {
3113
+ function B(e) {
2835
3114
  const t = /* @__PURE__ */ new Date(0);
2836
3115
  return t.setUTCFullYear(e.year, e.month - 1, e.day), t.setUTCHours(0, 0, 0, 0), t;
2837
3116
  }
2838
- function na(e, t) {
2839
- const r = P(e);
3117
+ function $a(e, t) {
3118
+ const r = B(e);
2840
3119
  return r.setUTCDate(r.getUTCDate() + t), {
2841
3120
  year: r.getUTCFullYear(),
2842
3121
  month: r.getUTCMonth() + 1,
2843
3122
  day: r.getUTCDate()
2844
3123
  };
2845
3124
  }
2846
- function aa(e, t) {
3125
+ function Ma(e, t) {
2847
3126
  return e.year === t.year && e.month === t.month && e.day === t.day;
2848
3127
  }
2849
- function xt(e, t) {
3128
+ function Rt(e, t) {
2850
3129
  return new Date(Date.UTC(e, t, 0)).getUTCDate();
2851
3130
  }
2852
- function ia(e) {
2853
- return e.year >= 1 && e.month >= 1 && e.month <= 12 && e.day >= 1 && e.day <= xt(e.year, e.month);
3131
+ function Na(e) {
3132
+ return e.year >= 1 && e.month >= 1 && e.month <= 12 && e.day >= 1 && e.day <= Rt(e.year, e.month);
2854
3133
  }
2855
3134
  export {
2856
- za as $,
2857
- Na as A,
2858
- Cr as B,
2859
- Ma as C,
2860
- zr as D,
2861
- Ar as E,
2862
- $a as F,
2863
- Yr as G,
2864
- Ia as H,
2865
- Cn as I,
2866
- jn as J,
2867
- Kn as K,
2868
- ja as L,
2869
- La as M,
2870
- Ka as N,
2871
- Ha as O,
2872
- Le as P,
2873
- qa as Q,
3135
+ q as $,
3136
+ Wr as A,
3137
+ Xr as B,
3138
+ Qa as C,
3139
+ Jr as D,
3140
+ ei as E,
3141
+ on as F,
3142
+ sn as G,
3143
+ ri as H,
3144
+ cn as I,
3145
+ ni as J,
3146
+ na as K,
3147
+ da as L,
3148
+ gi as M,
3149
+ fa as N,
3150
+ hi as O,
3151
+ Qe as P,
3152
+ pi as Q,
2874
3153
  N as R,
2875
- Ba as S,
2876
- Or as T,
2877
- Lr as U,
2878
- C as V,
2879
- ct as W,
2880
- Ea as X,
2881
- yn as Y,
2882
- O as Z,
2883
- ht as _,
2884
- Hn as a,
2885
- pt as a0,
2886
- Dn as a1,
2887
- Aa as a2,
2888
- In as a3,
2889
- pe as a4,
2890
- Jr as a5,
2891
- Ca as a6,
2892
- Qr as a7,
2893
- Ua as a8,
2894
- fn as a9,
2895
- Va as aa,
2896
- Gn as ab,
2897
- Ga as ac,
2898
- Ya as ad,
2899
- Ra as ae,
2900
- Oa as af,
2901
- En as ag,
2902
- Fn as ah,
2903
- Pa as ai,
2904
- Da as aj,
2905
- xa as ak,
2906
- va as al,
2907
- Sa as am,
2908
- tt as an,
2909
- Ta as ao,
2910
- wa as ap,
2911
- at as aq,
2912
- Ee as ar,
2913
- W as as,
2914
- ga as b,
2915
- Fa as c,
2916
- ya as d,
2917
- ge as e,
2918
- Za as f,
2919
- Xe as g,
2920
- Je as h,
2921
- Ze as i,
2922
- Qe as j,
2923
- et as k,
2924
- ha as l,
2925
- pa as m,
2926
- Zt as n,
2927
- Ve as o,
2928
- dn as p,
2929
- Nr as q,
2930
- Xr as r,
2931
- ka as s,
2932
- H as t,
2933
- k as u,
2934
- cn as v,
2935
- _a as w,
2936
- ba as x,
2937
- Er as y,
2938
- Fr as z
3154
+ wi as S,
3155
+ Si as T,
3156
+ Di as U,
3157
+ ln as V,
3158
+ dn as W,
3159
+ R as X,
3160
+ Tt as Y,
3161
+ ai as Z,
3162
+ Yn as _,
3163
+ ya as a,
3164
+ Nt as a0,
3165
+ ui as a1,
3166
+ It as a2,
3167
+ Vn as a3,
3168
+ li as a4,
3169
+ ea as a5,
3170
+ ve as a6,
3171
+ vn as a7,
3172
+ si as a8,
3173
+ kn as a9,
3174
+ v as aA,
3175
+ He as aB,
3176
+ je as aC,
3177
+ ci as aa,
3178
+ Rn as ab,
3179
+ xi as ac,
3180
+ Ta as ad,
3181
+ vi as ae,
3182
+ yi as af,
3183
+ Pa as ag,
3184
+ mi as ah,
3185
+ Ga as ai,
3186
+ en as aj,
3187
+ di as ak,
3188
+ fi as al,
3189
+ ta as am,
3190
+ ra as an,
3191
+ Qr as ao,
3192
+ dr as ap,
3193
+ Va as aq,
3194
+ Ba as ar,
3195
+ qa as as,
3196
+ dt as at,
3197
+ Za as au,
3198
+ Ha as av,
3199
+ gt as aw,
3200
+ Oe as ax,
3201
+ ee as ay,
3202
+ Ze as az,
3203
+ La as b,
3204
+ oi as c,
3205
+ ti as d,
3206
+ Ya as e,
3207
+ Ti as f,
3208
+ De as g,
3209
+ ct as h,
3210
+ Q as i,
3211
+ ut as j,
3212
+ lt as k,
3213
+ mt as l,
3214
+ ja as m,
3215
+ Ka as n,
3216
+ cr as o,
3217
+ On as p,
3218
+ it as q,
3219
+ xn as r,
3220
+ ii as s,
3221
+ qr as t,
3222
+ Wa as u,
3223
+ Fn as v,
3224
+ W as w,
3225
+ _ as x,
3226
+ Xa as y,
3227
+ Ja as z
2939
3228
  };