react-semaphor 0.1.526 → 0.1.528

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 (180) hide show
  1. package/DATA_APP_SDK.md +5 -1
  2. package/dist/analytics-protocol/index.js +1190 -296
  3. package/dist/brand-studio/index.js +15 -15
  4. package/dist/briefings/index.js +50 -49
  5. package/dist/chunks/{calculated-field-identity-D1ofR4KJ.js → calculated-field-identity-DUu-tCQw.js} +66 -65
  6. package/dist/chunks/{card-config-utils-9sv4e-Vb.js → card-config-utils-BdPceiw8.js} +68 -65
  7. package/dist/chunks/{constants-DeLIHVAW.js → constants-DNWVy8Y3.js} +4 -4
  8. package/dist/chunks/dashboard-BkskKMck.js +14 -0
  9. package/dist/chunks/{dashboard-briefing-launcher-DXz1GhFZ.js → dashboard-briefing-launcher-Bb0RhGRC.js} +372 -359
  10. package/dist/chunks/{dashboard-controls-Df8qOSrs.js → dashboard-controls-loWTHPMi.js} +739 -686
  11. package/dist/chunks/{dashboard-json-Xldp0qww.js → dashboard-json-DUci_SOR.js} +10 -10
  12. package/dist/chunks/{edit-dashboard-visual-COHBqyic.js → edit-dashboard-visual-z9WN26w7.js} +6603 -6572
  13. package/dist/chunks/{editor-action-buttons-DahlP57T.js → editor-action-buttons-CGSFK9S-.js} +266 -267
  14. package/dist/chunks/{field-aggregations-BQjogiI1.js → field-aggregations-CdXSo1pb.js} +19 -19
  15. package/dist/chunks/{field-dependencies-v-lJNzC7.js → field-dependencies-CGYic38w.js} +1 -1
  16. package/dist/chunks/{index-CbjuruKe.js → index-CTYnXU85.js} +781 -780
  17. package/dist/chunks/{matrix-analytical-definition-BimC4XIV.js → matrix-analytical-definition-BJyH5-99.js} +1 -1
  18. package/dist/chunks/{matrix-card-CIlz0Dnp.js → matrix-card-DhykwdZs.js} +7 -6
  19. package/dist/chunks/{matrix-control-sources-2VAzGlt8.js → matrix-control-sources-BV9ywFtJ.js} +11 -11
  20. package/dist/chunks/{matrix-definition-E5gXXSTZ.js → matrix-definition-Cdn3LoxW.js} +3 -3
  21. package/dist/chunks/{semantic-format-Baqp8kD_.js → matrix-formatter-1Mm8x8w7.js} +655 -511
  22. package/dist/chunks/{matrix-member-presentation-Bw7-JCrr.js → matrix-member-presentation-BBW0n1iY.js} +1 -1
  23. package/dist/chunks/matrix-operation-contract-Dp7kFpVk.js +1383 -0
  24. package/dist/chunks/{metric-comparison-BphoJ9bq.js → metric-comparison-Crljx_XY.js} +15 -10
  25. package/dist/chunks/{numeric-presentation-VhMUHfrJ.js → numeric-presentation-LvnNY5Ma.js} +68 -68
  26. package/dist/chunks/pivot-header-presentation-CZa3556D.js +618 -0
  27. package/dist/chunks/{pivot-result-identity-BzUQiCEV.js → pivot-result-identity-CY__BuwI.js} +1 -1
  28. package/dist/chunks/{pivot-result-lifecycle-BFO354lk.js → pivot-result-lifecycle-Bqdtknud.js} +259 -204
  29. package/dist/chunks/{raw-temporal-7bFbXd2a.js → raw-temporal-CdnA_OXJ.js} +10 -10
  30. package/dist/chunks/{raw-temporal-contract-BQZIJ1fn.js → raw-temporal-contract-Bc9z83t-.js} +1 -1
  31. package/dist/chunks/relative-date-DAF9J7mt.js +456 -0
  32. package/dist/chunks/{report-preferences-dialog-BcH-0lR-.js → report-preferences-dialog-VV0-Ro6F.js} +131 -132
  33. package/dist/chunks/{report-runtime-context-CxIoGyNM.js → report-runtime-context-CtaGGlit.js} +1 -1
  34. package/dist/chunks/{selection-reducer-NF5C07yM.js → selection-reducer-IZjBSU6Z.js} +47 -26
  35. package/dist/chunks/semantic-format-BBLvfwua.js +192 -0
  36. package/dist/chunks/{semaphor-ready-indicator-BLRDuLr4.js → semaphor-ready-indicator-DbA4mVQL.js} +49909 -46207
  37. package/dist/chunks/{slider-BYIH4icg.js → slider-DpiJG8lv.js} +81 -82
  38. package/dist/chunks/{source-entity-resolution-Bzefiive.js → source-entity-resolution-Bde29mqE.js} +25 -25
  39. package/dist/chunks/switch-C4YH-W1X.js +24003 -0
  40. package/dist/chunks/{temporal-bucket-PcLFSYWX.js → temporal-bucket-DlFuhCnT.js} +6 -6
  41. package/dist/chunks/{temporal-bucket-contract-DTLDRzgV.js → temporal-bucket-contract-C6lUGPS3.js} +1 -1
  42. package/dist/chunks/temporal-input-presentation-DyMWCZYh.js +195 -0
  43. package/dist/chunks/{token-types-BC6RcUY8.js → token-types-UjyNz95-.js} +1 -1
  44. package/dist/chunks/{validators-CsdOtZI6.js → validators-CQcG0EPN.js} +852 -731
  45. package/dist/chunks/zoned-wall-clock-BkxV9jS2.js +46 -0
  46. package/dist/dashboard/index.js +1 -1
  47. package/dist/dashboard-authoring/index.js +138 -137
  48. package/dist/data-app-sdk/index.js +12 -12
  49. package/dist/data-app-sdk-adapters/index.js +23 -22
  50. package/dist/data-app-sdk-validation/index.js +27 -26
  51. package/dist/format-utils/index.js +247 -329
  52. package/dist/index.js +165 -168
  53. package/dist/report-runtime-context/index.js +2 -2
  54. package/dist/style.css +1 -1
  55. package/dist/surfboard/index.js +1 -1
  56. package/dist/types/briefings/index.d.ts +3 -0
  57. package/dist/types/components/explorer/filters/card-date-filter.d.ts +13 -5
  58. package/dist/types/components/explorer/filters/card-date-selection.d.ts +28 -0
  59. package/dist/types/components/sharing-and-management/dashboard-actions-menu.d.ts +1 -1
  60. package/dist/types/components/sharing-and-management/hooks/use-resource-management.d.ts +0 -1
  61. package/dist/types/components/surfboard/download-settings-dialog.d.ts +8 -0
  62. package/dist/types/components/surfboard/filter/types.d.ts +8 -29
  63. package/dist/types/components/surfboard/filter/use-dashboard-filter-mapping-popover.d.ts +5 -1
  64. package/dist/types/components/ui-custom/date-range-picker.d.ts +18 -2
  65. package/dist/types/components/ui-custom/date-range-presets.d.ts +8 -21
  66. package/dist/types/components/ui-custom/report-calendar.d.ts +18 -0
  67. package/dist/types/components/visual/aggregated-table/utils/export-utils.d.ts +3 -5
  68. package/dist/types/components/visual/data-table/data-table-toolbar.d.ts +1 -1
  69. package/dist/types/components/visual/pivot-table/utils/pivot-table-export-utils.d.ts +3 -1
  70. package/dist/types/index.js +5 -5
  71. package/dist/types/lib/api/exports-api.d.ts +3 -0
  72. package/dist/types/lib/csv-download.d.ts +9 -0
  73. package/dist/types/lib/csv-encoding-options.d.ts +6 -0
  74. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +2 -1
  75. package/dist/types/lib/dashboard-navigation/build-carried-click-context.d.ts +0 -1
  76. package/dist/types/lib/document/document-input-runtime.d.ts +2 -1
  77. package/dist/types/lib/export-utils.d.ts +17 -15
  78. package/dist/types/lib/hooks/explorer/use-filter-builder.d.ts +2 -2
  79. package/dist/types/lib/hooks/use-relative-date-summarizer.d.ts +7 -0
  80. package/dist/types/lib/matrix-table/matrix-application-adapter.d.ts +3 -2
  81. package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +1 -1
  82. package/dist/types/lib/matrix-table/matrix-card-draft.d.ts +1 -1
  83. package/dist/types/lib/matrix-table/matrix-dataset-history.d.ts +47 -0
  84. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +7 -3
  85. package/dist/types/lib/matrix-table/matrix-execution-context.d.ts +2 -0
  86. package/dist/types/lib/matrix-table/matrix-query-transport.d.ts +4 -1
  87. package/dist/types/lib/matrix-table/matrix-runtime-types.d.ts +105 -4
  88. package/dist/types/lib/matrix-table/matrix-runtime.d.ts +43 -2
  89. package/dist/types/lib/matrix-table/use-matrix.d.ts +6 -0
  90. package/dist/types/lib/query-context/build-card-query-context.d.ts +5 -1
  91. package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +0 -1
  92. package/dist/types/lib/query-context/build-global-date-comparison-context.d.ts +1 -2
  93. package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +1 -2
  94. package/dist/types/lib/query-context/dashboard-card-query-key.d.ts +10 -0
  95. package/dist/types/lib/query-context/query-auth-scope.d.ts +5 -0
  96. package/dist/types/lib/stores/dashboard-store.d.ts +9 -4
  97. package/dist/types/lib/temporal-filter/temporal-filter-utils.d.ts +9 -2
  98. package/dist/types/lib/types/common-types.d.ts +5 -0
  99. package/dist/types/lib/types/explorer-types.d.ts +14 -0
  100. package/dist/types/lib/types/semantic-types.d.ts +4 -2
  101. package/dist/types/lib/types/token-types.d.ts +0 -1
  102. package/dist/types/lib/utils/aggregate-expression-utils.d.ts +0 -4
  103. package/dist/types/lib/utils/card-definition.d.ts +1 -1
  104. package/dist/types/lib/utils/date-timezone-utils.d.ts +4 -46
  105. package/dist/types/lib/utils/filter-default-value-utils.d.ts +8 -2
  106. package/dist/types/lib/utils/inline-filter-utils.d.ts +3 -2
  107. package/dist/types/lib/utils/relative-date-description.d.ts +38 -0
  108. package/dist/types/shared/analytics-protocol/aggregate-expression.d.ts +89 -0
  109. package/dist/types/shared/analytics-protocol/analytics-refusal.d.ts +32 -0
  110. package/dist/types/shared/analytics-protocol/contracts.d.ts +48 -7
  111. package/dist/types/shared/analytics-protocol/index.d.ts +15 -1
  112. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +20 -20
  113. package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +10 -10
  114. package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +8 -8
  115. package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +61 -6
  116. package/dist/types/shared/analytics-protocol/measure-aggregation-profile.d.ts +63 -0
  117. package/dist/types/shared/analytics-protocol/metric-comparison.d.ts +9 -3
  118. package/dist/types/shared/analytics-protocol/operation-temporal-state.d.ts +64 -0
  119. package/dist/types/shared/analytics-protocol/relative-date-filter.d.ts +61 -0
  120. package/dist/types/shared/analytics-protocol/relative-date-label.d.ts +20 -0
  121. package/dist/types/shared/analytics-protocol/runtime-schemas.d.ts +0 -2
  122. package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +314 -0
  123. package/dist/types/shared/analytics-protocol/time-window.d.ts +13 -0
  124. package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +8 -4
  125. package/dist/types/shared/format-utils/exporters/csv-utils.d.ts +46 -15
  126. package/dist/types/shared/format-utils/exporters/index.d.ts +2 -3
  127. package/dist/types/shared/format-utils/flat-table-export-totals.d.ts +2 -1
  128. package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +2 -2
  129. package/dist/types/shared/format-utils/types/format-types.d.ts +0 -42
  130. package/dist/types/shared/temporal/calendar-periods.d.ts +56 -0
  131. package/dist/types/shared/temporal/index.d.ts +5 -0
  132. package/dist/types/shared/temporal/relative-date.d.ts +21 -0
  133. package/dist/types/shared/temporal/temporal-parity-fixtures.d.ts +73 -0
  134. package/dist/types/shared/temporal/time-window-periods.d.ts +21 -0
  135. package/dist/types/shared/temporal/zoned-wall-clock.d.ts +23 -0
  136. package/package.json +1 -17
  137. package/src/data-app-sdk/README.md +6 -3
  138. package/dist/chunks/code-highlight-994tgM9v.js +0 -22265
  139. package/dist/chunks/dashboard-CsHvEtjN.js +0 -15
  140. package/dist/chunks/dashboard-date-comparison-definition-BqNhECUr.js +0 -183
  141. package/dist/chunks/matrix-formatter-WBgtebUT.js +0 -341
  142. package/dist/chunks/matrix-operation-contract-D32U2CSw.js +0 -1802
  143. package/dist/chunks/mouse-pointer-2-BZvGk45-.js +0 -19
  144. package/dist/chunks/pivot-header-presentation-CGtudHo7.js +0 -661
  145. package/dist/chunks/pre-block-Cq1RqhZX.js +0 -3987
  146. package/dist/chunks/search-CJz-QQ0Q.js +0 -24
  147. package/dist/chunks/switch-XaAACBrJ.js +0 -2234
  148. package/dist/chunks/temporal-input-presentation-2RJrvmYL.js +0 -222
  149. package/dist/chunks/update-policy-DhAUtiC8.js +0 -913
  150. package/dist/data-app-builder/index.js +0 -3666
  151. package/dist/data-app-builder-browser-runtime/index.js +0 -8
  152. package/dist/data-app-codegen/index.js +0 -22
  153. package/dist/data-app-codegen-node/index.js +0 -1807
  154. package/dist/types/components/data-app-runtime/published-data-app-runtime.d.ts +0 -7
  155. package/dist/types/components/surfboard/json-to-csv.d.ts +0 -7
  156. package/dist/types/components/visual/data-table/utils/export-utils.d.ts +0 -31
  157. package/dist/types/data-app-builder/browser-runtime.d.ts +0 -174
  158. package/dist/types/data-app-builder/constants.d.ts +0 -14
  159. package/dist/types/data-app-builder/data-app-builder.d.ts +0 -14
  160. package/dist/types/data-app-builder/index.d.ts +0 -1
  161. package/dist/types/data-app-builder/lib/api.d.ts +0 -36
  162. package/dist/types/data-app-builder/lib/context-select.d.ts +0 -3
  163. package/dist/types/data-app-builder/lib/diagnostics.d.ts +0 -12
  164. package/dist/types/data-app-builder/lib/file-tree.d.ts +0 -2
  165. package/dist/types/data-app-builder/types.d.ts +0 -558
  166. package/dist/types/data-app-builder-browser-runtime.d.ts +0 -2
  167. package/dist/types/data-app-builder.d.ts +0 -2
  168. package/dist/types/data-app-codegen/generate-contract.d.ts +0 -26
  169. package/dist/types/data-app-codegen/generated-contract-files.d.ts +0 -7
  170. package/dist/types/data-app-codegen/generated-contract-validation.d.ts +0 -13
  171. package/dist/types/data-app-codegen/index.d.ts +0 -6
  172. package/dist/types/data-app-codegen/live-execution.d.ts +0 -42
  173. package/dist/types/data-app-codegen/node.d.ts +0 -2
  174. package/dist/types/data-app-codegen/update-policy.d.ts +0 -25
  175. package/dist/types/data-app-codegen/validation.d.ts +0 -8
  176. package/dist/types/data-app-codegen-node.d.ts +0 -2
  177. package/dist/types/data-app-codegen.d.ts +0 -2
  178. package/dist/types/shared/analytics-protocol/data-app-codegen-summary.d.ts +0 -418
  179. package/dist/types/shared/format-utils/exporters/pivot-exporter.d.ts +0 -13
  180. package/dist/types/shared/format-utils/exporters/table-exporter.d.ts +0 -10
@@ -1,4 +1,4 @@
1
- import { z as _ } from "./validators-CsdOtZI6.js";
1
+ import { A as b } from "./validators-CQcG0EPN.js";
2
2
  const g = "higher_is_better", D = {
3
3
  displayMode: "difference",
4
4
  showComparison: !0,
@@ -7,9 +7,9 @@ const g = "higher_is_better", D = {
7
7
  conditionalLabel: !1
8
8
  };
9
9
  function u(o) {
10
- return _(o) !== null;
10
+ return b(o) !== null;
11
11
  }
12
- function I(o) {
12
+ function y(o) {
13
13
  var n, e, s, t;
14
14
  if (((n = o.metricComparison) == null ? void 0 : n.mode) !== "off") {
15
15
  if (((e = o.metricComparison) == null ? void 0 : e.mode) === "explicit")
@@ -22,7 +22,7 @@ function I(o) {
22
22
  };
23
23
  }
24
24
  }
25
- function y(o) {
25
+ function I(o) {
26
26
  if (o.alias) return o.alias;
27
27
  const n = o.entityName && o.entityName !== "SEMAPHOR_CALCULATED_FIELD" ? o.entityName : void 0, e = n && n !== o.name ? `${n}_` : "";
28
28
  if (o.role !== "metric") return `${e}${o.name}`;
@@ -77,7 +77,7 @@ function f(o, n, e) {
77
77
  )
78
78
  );
79
79
  }
80
- function b(o, n = "comparison") {
80
+ function _(o, n = "comparison") {
81
81
  const e = [];
82
82
  return p(o) ? (o.kind === "previous_period" ? (a(
83
83
  o,
@@ -127,7 +127,7 @@ function k(o, n = "comparison") {
127
127
  warnings: []
128
128
  };
129
129
  const e = [];
130
- return o.mode === "off" ? a(o, ["mode"], n, e) : o.mode === "explicit" ? (a(o, ["mode", "spec"], n, e), e.push(...b(o.spec, `${n}.spec`).errors)) : e.push(
130
+ return o.mode === "off" ? a(o, ["mode"], n, e) : o.mode === "explicit" ? (a(o, ["mode", "spec"], n, e), e.push(..._(o.spec, `${n}.spec`).errors)) : e.push(
131
131
  i(
132
132
  "invalid_comparison_config",
133
133
  "Comparison mode must be off or explicit.",
@@ -153,7 +153,7 @@ function C(o, n = "comparisonSelection") {
153
153
  a(o, ["mode"], n, e);
154
154
  else if (o.mode === "period") {
155
155
  a(o, ["mode", "spec"], n, e);
156
- const s = b(o.spec, `${n}.spec`);
156
+ const s = _(o.spec, `${n}.spec`);
157
157
  e.push(...s.errors), p(o.spec) && o.spec.kind === "target" && e.push(
158
158
  i(
159
159
  "invalid_global_date_comparison",
@@ -238,6 +238,10 @@ function N(o, n = "globalDateComparison") {
238
238
  )
239
239
  ), { ok: e.length === 0, errors: e, warnings: [] };
240
240
  }
241
+ function T(o) {
242
+ const { referenceTime: n, ...e } = o;
243
+ return e;
244
+ }
241
245
  function M(o, n = "comparisonPolarity") {
242
246
  return o === "higher_is_better" || o === "lower_is_better" || o === "neutral" ? { ok: !0, errors: [], warnings: [] } : {
243
247
  ok: !1,
@@ -355,7 +359,7 @@ function w(o) {
355
359
  function $(o, n) {
356
360
  return o === "unknown" || o === "no_change" || n === "neutral" ? "neutral" : n === "higher_is_better" && o === "increase" || n === "lower_is_better" && o === "decrease" ? "favorable" : "unfavorable";
357
361
  }
358
- function T(o) {
362
+ function A(o) {
359
363
  const {
360
364
  currentValue: n,
361
365
  comparisonValue: e,
@@ -381,7 +385,8 @@ export {
381
385
  N as d,
382
386
  M as e,
383
387
  S as f,
384
- T as g,
388
+ A as g,
385
389
  I as r,
386
- b as v
390
+ _ as v,
391
+ T as w
387
392
  };
@@ -1,6 +1,6 @@
1
- import { b9 as C, ba as O } from "./validators-CsdOtZI6.js";
1
+ import { K as C, M as O } from "./validators-CQcG0EPN.js";
2
2
  import { canonicalizeSupportedLocale as E, canonicalizeSupportedCurrencyCode as h } from "../value-format-preferences/index.js";
3
- import { i as _ } from "./temporal-bucket-PcLFSYWX.js";
3
+ import { d as _ } from "./temporal-bucket-DlFuhCnT.js";
4
4
  const U = [
5
5
  "day",
6
6
  "hour",
@@ -13,13 +13,13 @@ const U = [
13
13
  minute: 6e4,
14
14
  second: 1e3,
15
15
  millisecond: 1
16
- }, b = {
16
+ }, T = {
17
17
  day: "d",
18
18
  hour: "hr",
19
19
  minute: "min",
20
20
  second: "s",
21
21
  millisecond: "ms"
22
- }, T = {
22
+ }, b = {
23
23
  day: ["day", "days"],
24
24
  hour: ["hour", "hours"],
25
25
  minute: ["minute", "minutes"],
@@ -36,38 +36,38 @@ function M(i, e) {
36
36
  return U.indexOf(k(i, e));
37
37
  }
38
38
  function A(i, e) {
39
- const c = M(i, "day"), r = M(e, "second"), a = Math.min(c, r), t = Math.max(c, r);
40
- return U.slice(a, t + 1);
39
+ const c = M(i, "day"), r = M(e, "second"), n = Math.min(c, r), t = Math.max(c, r);
40
+ return U.slice(n, t + 1);
41
41
  }
42
42
  function K(i, e) {
43
43
  return i * D[k(e, "second")];
44
44
  }
45
45
  function W(i, e) {
46
- const c = A(e.largestUnit, e.smallestUnit), r = c[c.length - 1], a = D[r];
47
- let t = Math.round(i / a) * a;
48
- return c.map((n) => {
49
- const u = D[n], s = Math.floor(t / u);
50
- return t -= s * u, { unit: n, value: s };
46
+ const c = A(e.largestUnit, e.smallestUnit), r = c[c.length - 1], n = D[r];
47
+ let t = Math.round(i / n) * n;
48
+ return c.map((a) => {
49
+ const u = D[a], s = Math.floor(t / u);
50
+ return t -= s * u, { unit: a, value: s };
51
51
  });
52
52
  }
53
53
  function q(i, e) {
54
- const c = i.filter((t) => t.value !== 0), r = c.length > 0 ? c : [i[i.length - 1]], a = typeof e == "number" && Number.isFinite(e) ? Math.max(1, Math.trunc(e)) : r.length;
55
- return r.slice(0, a).map((t) => `${t.value}${b[t.unit]}`).join(" ");
54
+ const c = i.filter((t) => t.value !== 0), r = c.length > 0 ? c : [i[i.length - 1]], n = typeof e == "number" && Number.isFinite(e) ? Math.max(1, Math.trunc(e)) : r.length;
55
+ return r.slice(0, n).map((t) => `${t.value}${T[t.unit]}`).join(" ");
56
56
  }
57
57
  function Z(i, e) {
58
- const c = i.filter((t) => t.value !== 0), r = c.length > 0 ? c : [i[i.length - 1]], a = typeof e == "number" && Number.isFinite(e) ? Math.max(1, Math.trunc(e)) : r.length;
59
- return r.slice(0, a).map((t) => {
60
- const [n, u] = T[t.unit];
61
- return `${t.value} ${t.value === 1 ? n : u}`;
58
+ const c = i.filter((t) => t.value !== 0), r = c.length > 0 ? c : [i[i.length - 1]], n = typeof e == "number" && Number.isFinite(e) ? Math.max(1, Math.trunc(e)) : r.length;
59
+ return r.slice(0, n).map((t) => {
60
+ const [a, u] = b[t.unit];
61
+ return `${t.value} ${t.value === 1 ? a : u}`;
62
62
  }).join(" ");
63
63
  }
64
64
  function z(i) {
65
65
  const e = i.some(
66
66
  (s) => s.unit === "day" && s.value !== 0
67
- ), c = i.some((s) => s.unit === "millisecond"), r = i.findIndex((s) => s.value !== 0), a = Math.max(0, i.length - 2), t = e ? 0 : r === -1 ? a : Math.min(r, a), n = r === -1 ? i.slice(a) : i.slice(t);
68
- if (n.length === 0)
67
+ ), c = i.some((s) => s.unit === "millisecond"), r = i.findIndex((s) => s.value !== 0), n = Math.max(0, i.length - 2), t = e ? 0 : r === -1 ? n : Math.min(r, n), a = r === -1 ? i.slice(n) : i.slice(t);
68
+ if (a.length === 0)
69
69
  return "0";
70
- const u = n.map((s, l) => s.unit === "millisecond" ? String(s.value).padStart(3, "0") : l === 0 ? String(s.value) : String(s.value).padStart(2, "0")).join(":");
70
+ const u = a.map((s, l) => s.unit === "millisecond" ? String(s.value).padStart(3, "0") : l === 0 ? String(s.value) : String(s.value).padStart(2, "0")).join(":");
71
71
  return c ? u.replace(/:(\d{3})$/, ".$1") : u;
72
72
  }
73
73
  function J(i, e, c) {
@@ -80,7 +80,7 @@ function Y(i, e = {}) {
80
80
  const c = typeof i == "number" ? i : typeof i == "string" && i.trim() ? Number(i) : NaN;
81
81
  if (!Number.isFinite(c))
82
82
  return "";
83
- const r = e.inputUnit || "second", a = e.outputStyle === "digital" || e.outputStyle === "long" ? e.outputStyle : "compact", t = c < 0, n = Math.abs(K(c, r)), u = W(n, e), s = a === "digital" ? z(u) : a === "long" ? Z(u, e.maxUnits) : q(u, e.maxUnits);
83
+ const r = e.inputUnit || "second", n = e.outputStyle === "digital" || e.outputStyle === "long" ? e.outputStyle : "compact", t = c < 0, a = Math.abs(K(c, r)), u = W(a, e), s = n === "digital" ? z(u) : n === "long" ? Z(u, e.maxUnits) : q(u, e.maxUnits);
84
84
  return J(s, t, e);
85
85
  }
86
86
  function G(i, e) {
@@ -143,7 +143,7 @@ function I(i) {
143
143
  return e === "en-in" || e.startsWith("en-in-");
144
144
  }
145
145
  function P(i, e) {
146
- const c = d(i), r = (a) => typeof c == "number" ? c >= a : O(c.value, String(a)) >= 0;
146
+ const c = d(i), r = (n) => typeof c == "number" ? c >= n : O(c.value, String(n)) >= 0;
147
147
  return r(1e12) ? { power: 12, suffix: "T" } : r(1e9) ? { power: 9, suffix: "B" } : I(e) && r(1e7) ? { power: 7, suffix: "Cr" } : r(1e6) ? { power: 6, suffix: "M" } : I(e) && r(1e5) ? { power: 5, suffix: "L" } : r(1e3) ? { power: 3, suffix: "K" } : { power: 0, suffix: "" };
148
148
  }
149
149
  function S(i, e) {
@@ -170,33 +170,33 @@ function v(i, e) {
170
170
  const c = g(e == null ? void 0 : e.locale);
171
171
  let r = i;
172
172
  if (e != null && e.multiplyBy && (r = V(r, e.multiplyBy)), e != null && e.useSuffix) {
173
- const { power: t, suffix: n } = S(r, c);
173
+ const { power: t, suffix: a } = S(r, c);
174
174
  r = y(r, t);
175
175
  const u = f(r, new Intl.NumberFormat(c, {
176
176
  minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
177
177
  maximumFractionDigits: (e == null ? void 0 : e.maximumFractionDigits) ?? 2,
178
178
  useGrouping: (e == null ? void 0 : e.useGrouping) ?? !0
179
179
  }));
180
- return `${(e == null ? void 0 : e.prefix) ?? ""}${u}${n}${(e == null ? void 0 : e.suffix) ?? ""}`;
180
+ return `${(e == null ? void 0 : e.prefix) ?? ""}${u}${a}${(e == null ? void 0 : e.suffix) ?? ""}`;
181
181
  }
182
- const a = f(r, new Intl.NumberFormat(c, {
182
+ const n = f(r, new Intl.NumberFormat(c, {
183
183
  minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
184
184
  maximumFractionDigits: (e == null ? void 0 : e.maximumFractionDigits) ?? 2,
185
185
  useGrouping: (e == null ? void 0 : e.useGrouping) ?? !0
186
186
  }));
187
187
  if (e != null && e.negativeInParentheses && x(r)) {
188
- const t = a.replace("-", "");
188
+ const t = n.replace("-", "");
189
189
  return `(${(e == null ? void 0 : e.prefix) ?? ""}${t}${(e == null ? void 0 : e.suffix) ?? ""})`;
190
190
  }
191
- return `${(e == null ? void 0 : e.prefix) ?? ""}${a}${(e == null ? void 0 : e.suffix) ?? ""}`;
191
+ return `${(e == null ? void 0 : e.prefix) ?? ""}${n}${(e == null ? void 0 : e.suffix) ?? ""}`;
192
192
  }
193
193
  function o(i, e) {
194
194
  if (i == null || Number.isNaN(i))
195
195
  return "";
196
- const c = g(e == null ? void 0 : e.locale), r = (e == null ? void 0 : e.currency) || "USD", a = x(i), t = !!(e != null && e.negativeInParentheses && a), n = t ? d(i) : i;
196
+ const c = g(e == null ? void 0 : e.locale), r = (e == null ? void 0 : e.currency) || "USD", n = x(i), t = !!(e != null && e.negativeInParentheses && n), a = t ? d(i) : i;
197
197
  try {
198
198
  if (e != null && e.useSuffix) {
199
- const { power: s, suffix: l } = S(n, c), m = y(n, s), w = `${f(m, new Intl.NumberFormat(c, {
199
+ const { power: s, suffix: l } = S(a, c), m = y(a, s), w = `${f(m, new Intl.NumberFormat(c, {
200
200
  style: "currency",
201
201
  currency: r,
202
202
  minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
@@ -205,7 +205,7 @@ function o(i, e) {
205
205
  }))}${l}`;
206
206
  return t ? `(${w})` : w;
207
207
  }
208
- const u = f(n, new Intl.NumberFormat(c, {
208
+ const u = f(a, new Intl.NumberFormat(c, {
209
209
  style: "currency",
210
210
  currency: r,
211
211
  minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
@@ -223,14 +223,14 @@ function o(i, e) {
223
223
  useGrouping: (e == null ? void 0 : e.useGrouping) ?? !0
224
224
  }
225
225
  ), m = `${r} ${l}${s.suffix}`;
226
- return a ? e != null && e.negativeInParentheses ? `(${m})` : `-${m}` : m;
226
+ return n ? e != null && e.negativeInParentheses ? `(${m})` : `-${m}` : m;
227
227
  }
228
228
  }
229
229
  function L(i, e) {
230
230
  if (i == null || Number.isNaN(i))
231
231
  return "";
232
- const c = g(e == null ? void 0 : e.locale), a = (e == null ? void 0 : e.alreadyPercent) ?? (e == null ? void 0 : e.percentValueMode) === "whole" ? y(i, 2) : i;
233
- return f(a, new Intl.NumberFormat(c, {
232
+ const c = g(e == null ? void 0 : e.locale), n = (e == null ? void 0 : e.alreadyPercent) ?? (e == null ? void 0 : e.percentValueMode) === "whole" ? y(i, 2) : i;
233
+ return f(n, new Intl.NumberFormat(c, {
234
234
  style: "percent",
235
235
  minimumFractionDigits: (e == null ? void 0 : e.minimumFractionDigits) ?? 0,
236
236
  maximumFractionDigits: (e == null ? void 0 : e.maximumFractionDigits) ?? 2,
@@ -250,7 +250,7 @@ function R(i, e) {
250
250
  function B(i, e) {
251
251
  if (i == null || Number.isNaN(i))
252
252
  return "";
253
- const c = e.scale === void 0 ? i : V(i, e.scale), r = e.negativeStyle === "parentheses" && x(c), a = r ? d(c) : c, t = {
253
+ const c = e.scale === void 0 ? i : V(i, e.scale), r = e.negativeStyle === "parentheses" && x(c), n = r ? d(c) : c, t = {
254
254
  style: e.type === "number" ? "decimal" : e.type,
255
255
  locale: e.locale,
256
256
  currency: e.currency,
@@ -260,28 +260,28 @@ function B(i, e) {
260
260
  percentValueMode: e.percentValueMode,
261
261
  useSuffix: e.compact
262
262
  };
263
- let n;
263
+ let a;
264
264
  switch (e.type) {
265
265
  case "currency":
266
- n = o(a, t);
266
+ a = o(n, t);
267
267
  break;
268
268
  case "percent":
269
- n = L(a, t);
269
+ a = L(n, t);
270
270
  break;
271
271
  case "scientific":
272
- n = R(a, t);
272
+ a = R(n, t);
273
273
  break;
274
274
  default:
275
- n = v(a, t);
275
+ a = v(n, t);
276
276
  break;
277
277
  }
278
- const u = `${e.prefix ?? ""}${n}${e.suffix ?? ""}`;
278
+ const u = `${e.prefix ?? ""}${a}${e.suffix ?? ""}`;
279
279
  return r ? `(${u})` : u;
280
280
  }
281
- function ae(i, e) {
281
+ function ne(i, e) {
282
282
  return e.type === "duration" ? i == null ? "" : G(i, e) : B(i, e);
283
283
  }
284
- function ne(i, e, c = "en-US") {
284
+ function ae(i, e, c = "en-US") {
285
285
  if (i == null || typeof i == "number" && isNaN(i))
286
286
  return "";
287
287
  if ((e == null ? void 0 : e.style) === "duration")
@@ -291,7 +291,7 @@ function ne(i, e, c = "en-US") {
291
291
  suffix: e.suffix,
292
292
  negativeStyle: e.negativeStyle
293
293
  });
294
- const r = g((e == null ? void 0 : e.locale) || c), a = (e == null ? void 0 : e.style) || "decimal", t = a === "decimal" ? "number" : a;
294
+ const r = g((e == null ? void 0 : e.locale) || c), n = (e == null ? void 0 : e.style) || "decimal", t = n === "decimal" ? "number" : n;
295
295
  return t === "currency" && new Intl.NumberFormat(r, {
296
296
  style: "currency",
297
297
  currency: (e == null ? void 0 : e.currency) || "USD"
@@ -363,14 +363,14 @@ function p(i) {
363
363
  });
364
364
  const r = i.locale === void 0 ? void 0 : E(i.locale);
365
365
  i.locale !== void 0 && !r && e.push({ path: "locale", message: "Expected a supported BCP 47 locale." });
366
- const a = i.currency === void 0 ? void 0 : h(i.currency);
367
- i.currency !== void 0 && !a && e.push({
366
+ const n = i.currency === void 0 ? void 0 : h(i.currency);
367
+ i.currency !== void 0 && !n && e.push({
368
368
  path: "currency",
369
369
  message: "Expected a supported ISO 4217 currency code."
370
370
  });
371
371
  for (const t of ["minimumFractionDigits", "maximumFractionDigits"]) {
372
- const n = i[t];
373
- n !== void 0 && (!Number.isInteger(n) || typeof n != "number" || n < 0 || n > 20) && e.push({
372
+ const a = i[t];
373
+ a !== void 0 && (!Number.isInteger(a) || typeof a != "number" || a < 0 || a > 20) && e.push({
374
374
  path: t,
375
375
  message: "Expected an integer from 0 to 20."
376
376
  });
@@ -404,7 +404,7 @@ function p(i) {
404
404
  } : {},
405
405
  ...i.compact !== void 0 ? { compact: i.compact } : {},
406
406
  ...i.scale !== void 0 ? { scale: i.scale } : {},
407
- ...a ? { currency: a } : {},
407
+ ...n ? { currency: n } : {},
408
408
  ...i.percentValueMode !== void 0 ? {
409
409
  percentValueMode: i.percentValueMode
410
410
  } : {}
@@ -433,25 +433,25 @@ function se(i) {
433
433
  function me(i) {
434
434
  var r;
435
435
  const e = /* @__PURE__ */ new Set();
436
- if (i.snapshot.resolvedFormats.forEach((a, t) => {
437
- if (a.format.type !== "temporal_bucket") {
438
- if (a.scope.attachmentIndex !== void 0)
436
+ if (i.snapshot.resolvedFormats.forEach((n, t) => {
437
+ if (n.format.type !== "temporal_bucket") {
438
+ if (n.scope.attachmentIndex !== void 0)
439
439
  throw new Error(
440
440
  `resolvedFormats.${t}.scope.attachmentIndex is not valid for a card export`
441
441
  );
442
- if (a.scope.dashboardId !== i.expectedScope.dashboardId || a.scope.cardId !== i.expectedScope.cardId)
442
+ if (n.scope.dashboardId !== i.expectedScope.dashboardId || n.scope.cardId !== i.expectedScope.cardId)
443
443
  throw new Error(
444
444
  `resolvedFormats.${t}.scope must match the executing dashboard/card`
445
445
  );
446
- if (a.target.kind !== "column")
446
+ if (n.target.kind !== "column")
447
447
  throw new Error(
448
448
  `resolvedFormats.${t}.target must identify an export column`
449
449
  );
450
- if (e.has(a.target.columnKey))
450
+ if (e.has(n.target.columnKey))
451
451
  throw new Error(
452
- `resolvedFormats.${t} duplicates export column "${a.target.columnKey}"`
452
+ `resolvedFormats.${t} duplicates export column "${n.target.columnKey}"`
453
453
  );
454
- e.add(a.target.columnKey);
454
+ e.add(n.target.columnKey);
455
455
  }
456
456
  }), !i.useFormattedValues)
457
457
  return;
@@ -460,7 +460,7 @@ function me(i) {
460
460
  "visibleColumns must identify every formatted export column"
461
461
  );
462
462
  const c = i.visibleColumns.find(
463
- (a) => !e.has(a)
463
+ (n) => !e.has(n)
464
464
  );
465
465
  if (c)
466
466
  throw new Error(
@@ -492,16 +492,16 @@ function ie(i) {
492
492
  };
493
493
  }
494
494
  function le(i, e, c) {
495
- const r = E(i.locale) ?? e.locale, a = i.type === "number" || i.type === "currency" ? h(c) : void 0;
496
- if (!(i.type === "currency" || a !== void 0))
495
+ const r = E(i.locale) ?? e.locale, n = i.type === "number" || i.type === "currency" ? h(c) : void 0;
496
+ if (!(i.type === "currency" || n !== void 0))
497
497
  return {
498
498
  ...i,
499
499
  locale: r,
500
500
  ...ie(i)
501
501
  };
502
- const n = a ?? h(i.currency) ?? e.defaultCurrency, u = ee(
502
+ const a = n ?? h(i.currency) ?? e.defaultCurrency, u = ee(
503
503
  r,
504
- n
504
+ a
505
505
  ), s = u.minimumFractionDigits ?? 0, l = u.maximumFractionDigits ?? s, m = i.minimumFractionDigits ?? Math.min(
506
506
  s,
507
507
  i.maximumFractionDigits ?? s
@@ -513,19 +513,19 @@ function le(i, e, c) {
513
513
  ...i,
514
514
  type: "currency",
515
515
  locale: r,
516
- currency: n,
516
+ currency: a,
517
517
  minimumFractionDigits: m,
518
518
  maximumFractionDigits: N
519
519
  };
520
520
  }
521
521
  export {
522
- ae as a,
523
- v as b,
524
- o as c,
525
- L as d,
526
- R as e,
522
+ v as a,
523
+ o as b,
524
+ L as c,
525
+ R as d,
526
+ B as e,
527
527
  ne as f,
528
- B as g,
528
+ ae as g,
529
529
  ue as h,
530
530
  Y as i,
531
531
  G as j,