react-semaphor 0.1.507 → 0.1.509

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 (254) hide show
  1. package/DATA_APP_SDK.md +56 -0
  2. package/dist/analytics-protocol/index.cjs +1 -1
  3. package/dist/analytics-protocol/index.js +194 -172
  4. package/dist/appearance/index.cjs +1 -1
  5. package/dist/appearance/index.js +1 -1
  6. package/dist/appearance-runtime/index.cjs +1 -1
  7. package/dist/appearance-runtime/index.js +1 -1
  8. package/dist/brand-studio/index.cjs +2 -2
  9. package/dist/brand-studio/index.js +279 -250
  10. package/dist/briefings/index.cjs +1 -1
  11. package/dist/briefings/index.js +3 -3
  12. package/dist/chunks/appearance-context-DzqCdhB4.cjs +1 -0
  13. package/dist/chunks/{appearance-context-XviHOhWJ.js → appearance-context-VJdrKi7r.js} +2 -1
  14. package/dist/chunks/{appearance-runtime-provider-D0xVQWnH.js → appearance-runtime-provider-CC4HT2Gi.js} +2 -2
  15. package/dist/chunks/{appearance-runtime-provider-Ca8rxO86.cjs → appearance-runtime-provider-D5pkvgE4.cjs} +1 -1
  16. package/dist/chunks/calculated-field-identity-BiTGmnST.cjs +1 -0
  17. package/dist/chunks/calculated-field-identity-CJL54uFx.js +1373 -0
  18. package/dist/chunks/{constants-NUleP4DY.js → card-config-utils-Bq1enstT.js} +260 -260
  19. package/dist/chunks/card-config-utils-CMO4_zVs.cjs +1 -0
  20. package/dist/chunks/{dashboard-briefing-launcher-DXTpU85p.js → dashboard-briefing-launcher-B5AQu-Vb.js} +12 -12
  21. package/dist/chunks/{dashboard-briefing-launcher-C8nDSDnV.cjs → dashboard-briefing-launcher-BoXFrqq0.cjs} +1 -1
  22. package/dist/chunks/{dashboard-controls-CyL0yimg.js → dashboard-controls-CKKkSXEX.js} +16 -14
  23. package/dist/chunks/dashboard-controls-gUVkQm8o.cjs +52 -0
  24. package/dist/chunks/dashboard-json-B7fSi6_b.cjs +1 -0
  25. package/dist/chunks/{dashboard-json-5Jr3RudV.js → dashboard-json-CAJJquVx.js} +9 -9
  26. package/dist/chunks/edit-dashboard-visual-AZetLUv1.cjs +172 -0
  27. package/dist/chunks/{edit-dashboard-visual-C7X-um9g.js → edit-dashboard-visual-DCnbqRRn.js} +1986 -1990
  28. package/dist/chunks/{editor-action-buttons-CcDm8nA5.cjs → editor-action-buttons-CBQsVYdt.cjs} +2 -2
  29. package/dist/chunks/{editor-action-buttons-C5Wja_J4.js → editor-action-buttons-DDA5JGwO.js} +6 -6
  30. package/dist/chunks/field-aggregations-DUb0NU6c.js +1229 -0
  31. package/dist/chunks/field-aggregations-jSi77h9Z.cjs +1 -0
  32. package/dist/chunks/{field-dependencies-DVl2p1Nm.js → field-dependencies-Cl97kkHy.js} +30 -34
  33. package/dist/chunks/{field-dependencies-r_U0CGQ-.cjs → field-dependencies-DIab72rQ.cjs} +1 -1
  34. package/dist/chunks/{index-BVr4fcCB.js → index-0pdaQ9e1.js} +5 -5
  35. package/dist/chunks/{index-De2QNsqV.js → index-CL2lvhwk.js} +47783 -46019
  36. package/dist/chunks/{index-C9KXfCkC.js → index-CLIro-EG.js} +3 -0
  37. package/dist/chunks/index-Cx3qmRUB.cjs +1 -0
  38. package/dist/chunks/{index-BlYf8gNa.cjs → index-DhlVxvyI.cjs} +1 -1
  39. package/dist/chunks/index-DkEAikW8.cjs +1420 -0
  40. package/dist/chunks/{matrix-card-DACDwdTq.js → matrix-card-CnKQpnsj.js} +1 -1
  41. package/dist/chunks/{matrix-card-CRXcmAjp.cjs → matrix-card-U4c72doZ.cjs} +1 -1
  42. package/dist/chunks/{matrix-control-sources-ClQzIk7E.js → matrix-control-sources-CRRdP03Q.js} +165 -134
  43. package/dist/chunks/matrix-control-sources-FjxGIbqk.cjs +1 -0
  44. package/dist/chunks/{matrix-formatter-7GLTcBuy.cjs → matrix-formatter-CveLJo6S.cjs} +1 -1
  45. package/dist/chunks/{matrix-formatter-xsq7n_e6.js → matrix-formatter-ZVS5QOuq.js} +2 -2
  46. package/dist/chunks/matrix-member-presentation-CFHjdrxT.cjs +1 -0
  47. package/dist/chunks/matrix-member-presentation-CzGZJd3a.js +182 -0
  48. package/dist/chunks/matrix-operation-contract-DoiWTUbT.cjs +1 -0
  49. package/dist/chunks/matrix-operation-contract-xL8IhFzp.js +1802 -0
  50. package/dist/chunks/{pivot-header-presentation-3wqWChFd.cjs → pivot-header-presentation-Cxz8-06f.cjs} +1 -1
  51. package/dist/chunks/{pivot-header-presentation-D44ODZGn.js → pivot-header-presentation-DVylCBHB.js} +2 -2
  52. package/dist/chunks/{pivot-result-lifecycle-DZ0ZSMoM.cjs → pivot-result-lifecycle-BiERyXnS.cjs} +1 -1
  53. package/dist/chunks/{pivot-result-lifecycle-BSmqVkVG.js → pivot-result-lifecycle-CmjpW7qG.js} +1 -1
  54. package/dist/chunks/{report-preferences-dialog-xADifRXs.js → report-preferences-dialog-Bv2VIOKc.js} +4 -4
  55. package/dist/chunks/report-preferences-dialog-Wg9g9fIj.cjs +1 -0
  56. package/dist/chunks/{search-BHsQIWBV.js → selection-reducer-B94WgZ9V.js} +55 -11
  57. package/dist/chunks/selection-reducer-CGKKsaPa.cjs +26 -0
  58. package/dist/chunks/{semantic-format-BhIL1PXP.cjs → semantic-format-BzH69TRq.cjs} +1 -1
  59. package/dist/chunks/{semantic-format-C3amkGmY.js → semantic-format-CBlRO8Aw.js} +1 -1
  60. package/dist/chunks/{switch-DHGiC0aU.js → switch-CD4uGTZI.js} +7450 -7694
  61. package/dist/chunks/switch-iC1x2dcE.cjs +134 -0
  62. package/dist/chunks/token-types-Ahh5u4iT.cjs +1 -0
  63. package/dist/chunks/token-types-CPde8_LG.js +8 -0
  64. package/dist/chunks/{update-policy-Cc9h57pA.cjs → update-policy-COjFudhl.cjs} +1 -1
  65. package/dist/chunks/{update-policy-eTcz52jO.js → update-policy-D9q1Tz8k.js} +1 -1
  66. package/dist/dashboard/index.cjs +1 -1
  67. package/dist/dashboard/index.js +1 -1
  68. package/dist/dashboard-authoring/index.cjs +3 -3
  69. package/dist/dashboard-authoring/index.js +734 -622
  70. package/dist/data-app-builder/index.cjs +1 -1
  71. package/dist/data-app-builder/index.js +3 -3
  72. package/dist/data-app-codegen/index.cjs +1 -1
  73. package/dist/data-app-codegen/index.js +2 -2
  74. package/dist/data-app-codegen-node/index.cjs +94 -92
  75. package/dist/data-app-codegen-node/index.js +337 -333
  76. package/dist/data-app-sdk/index.cjs +9 -9
  77. package/dist/data-app-sdk/index.js +1091 -969
  78. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  79. package/dist/data-app-sdk-adapters/index.js +104 -96
  80. package/dist/data-app-sdk-validation/index.cjs +1 -1
  81. package/dist/data-app-sdk-validation/index.js +2 -2
  82. package/dist/format-utils/index.cjs +1 -1
  83. package/dist/format-utils/index.js +8 -8
  84. package/dist/index.cjs +1 -1
  85. package/dist/index.js +15 -15
  86. package/dist/style.css +1 -1
  87. package/dist/surfboard/index.cjs +1 -1
  88. package/dist/surfboard/index.js +2 -2
  89. package/dist/types/brand-studio/brand-studio-draft.d.ts +3 -1
  90. package/dist/types/components/dashboard/card-selection-pill.d.ts +5 -0
  91. package/dist/types/components/dashboard/dashboard-container.d.ts +1 -1
  92. package/dist/types/components/dashboard/drill-breadcrumb.d.ts +1 -0
  93. package/dist/types/components/dashboard/drill-navigation-controls.d.ts +3 -3
  94. package/dist/types/components/interactions/applied-filters-display.d.ts +6 -1
  95. package/dist/types/components/interactions/click-to-filter-review-dialog.d.ts +21 -0
  96. package/dist/types/components/interactions/dashboard-drill-host.d.ts +13 -0
  97. package/dist/types/components/interactions/filter-badge-tooltip.d.ts +4 -4
  98. package/dist/types/components/interactions/insight-modal.d.ts +4 -14
  99. package/dist/types/components/interactions/insight-viewer.d.ts +7 -19
  100. package/dist/types/components/interactions/interactions-sheet.d.ts +6 -0
  101. package/dist/types/components/interactions/panels/click-to-filter-panel.d.ts +20 -0
  102. package/dist/types/components/interactions/reusable/interaction-selection-popover.d.ts +2 -2
  103. package/dist/types/components/interactions/sheet/action-editor.d.ts +17 -0
  104. package/dist/types/components/interactions/sheet/action-meta.d.ts +45 -0
  105. package/dist/types/components/interactions/sheet/action-picker.d.ts +7 -0
  106. package/dist/types/components/interactions/sheet/click-outcome-preview.d.ts +10 -0
  107. package/dist/types/components/interactions/sheet/interactions-home.d.ts +28 -0
  108. package/dist/types/components/interactions/sheet/sheet-parts.d.ts +37 -0
  109. package/dist/types/components/surfboard/filter/dashboard-filter-mapping-panel.d.ts +28 -1
  110. package/dist/types/components/surfboard/filter/selection-chip.d.ts +11 -0
  111. package/dist/types/components/surfboard/filter/selection-filter-section.d.ts +4 -0
  112. package/dist/types/components/surfboard/filter/use-dashboard-filter-mapping-popover.d.ts +3 -0
  113. package/dist/types/components/ui/resizable.d.ts +1 -1
  114. package/dist/types/components/visual/matrix-table/matrix-interaction-actions.d.ts +24 -3
  115. package/dist/types/components/visual/matrix-table/matrix-selection-click.d.ts +6 -0
  116. package/dist/types/components/visual/matrix-table/matrix-window-viewer.d.ts +1 -1
  117. package/dist/types/data-app-sdk/adapters.d.ts +3 -2
  118. package/dist/types/data-app-sdk/builders.d.ts +2 -1
  119. package/dist/types/data-app-sdk/contracts.d.ts +44 -2
  120. package/dist/types/data-app-sdk/index.d.ts +1 -0
  121. package/dist/types/data-app-sdk/query-request.d.ts +7 -2
  122. package/dist/types/data-app-sdk/selection.d.ts +2 -0
  123. package/dist/types/index.cjs +1 -1
  124. package/dist/types/index.js +24 -23
  125. package/dist/types/lib/appearance/types.d.ts +3 -1
  126. package/dist/types/lib/briefings/briefing-attachment-model.d.ts +0 -2
  127. package/dist/types/lib/contexts/interactions-popover-context.d.ts +1 -8
  128. package/dist/types/lib/dashboard/click-to-filter-card-references.d.ts +23 -0
  129. package/dist/types/lib/dashboard-inputs/build-normalized-dashboard-inputs.d.ts +16 -2
  130. package/dist/types/lib/dashboard-inputs/build-selection-dashboard-inputs.d.ts +31 -0
  131. package/dist/types/lib/dashboard-inputs/click-to-filter-emitted-fields.d.ts +17 -0
  132. package/dist/types/lib/dashboard-inputs/click-to-filter-mapping-draft.d.ts +99 -0
  133. package/dist/types/lib/dashboard-inputs/click-to-filter-sheet-reach.d.ts +12 -0
  134. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +18 -1
  135. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-candidate-metadata.d.ts +4 -1
  136. package/dist/types/lib/dashboard-inputs/dashboard-input-scope.d.ts +10 -0
  137. package/dist/types/lib/dashboard-inputs/dashboard-input-snapshot.d.ts +8 -1
  138. package/dist/types/lib/dashboard-inputs/index.d.ts +1 -0
  139. package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +18 -7
  140. package/dist/types/lib/dashboard-inputs/resolve-field-date-comparison-coverage.d.ts +5 -2
  141. package/dist/types/lib/dashboard-inputs/resolve-selection-input.d.ts +77 -0
  142. package/dist/types/lib/dashboard-inputs/selection-targets.d.ts +26 -0
  143. package/dist/types/lib/dashboard-inputs/transient-input-context.d.ts +102 -0
  144. package/dist/types/lib/dashboard-navigation/build-carried-click-context.d.ts +50 -0
  145. package/dist/types/lib/dashboard-navigation/describe-carried-context.d.ts +11 -0
  146. package/dist/types/lib/dashboard-navigation/index.d.ts +1 -0
  147. package/dist/types/lib/dashboard-navigation/navigation-state.d.ts +120 -0
  148. package/dist/types/lib/dashboard-navigation/run-one-off-drill.d.ts +11 -0
  149. package/dist/types/lib/dashboard-navigation/use-transient-contexts.d.ts +17 -0
  150. package/dist/types/lib/dashboard-view-state/card-view-state.d.ts +48 -0
  151. package/dist/types/lib/dashboard-view-state/drill-path.d.ts +20 -0
  152. package/dist/types/lib/dashboard-view-state/index.d.ts +2 -0
  153. package/dist/types/lib/download-pdf.d.ts +0 -3
  154. package/dist/types/lib/formatters/metric-formatting.d.ts +1 -1
  155. package/dist/types/lib/hooks/ai/dashboard-context.d.ts +15 -8
  156. package/dist/types/lib/hooks/chartjs/use-chart-blur.d.ts +10 -2
  157. package/dist/types/lib/hooks/interactions/{use-event-engine.d.ts → use-drill-actions.d.ts} +28 -7
  158. package/dist/types/lib/hooks/selection/use-active-selections.d.ts +15 -0
  159. package/dist/types/lib/hooks/selection/use-click-to-filter-mapping-draft.d.ts +20 -0
  160. package/dist/types/lib/hooks/selection/use-selection-click.d.ts +34 -0
  161. package/dist/types/lib/hooks/selection/use-selection-gestures.d.ts +38 -0
  162. package/dist/types/lib/hooks/selection/use-table-row-selection.d.ts +46 -0
  163. package/dist/types/lib/hooks/use-dashboard-card.d.ts +0 -2
  164. package/dist/types/lib/hooks/use-dashboard-filter-mapping-candidates.d.ts +18 -0
  165. package/dist/types/lib/hooks/use-dashboard-frame-query.d.ts +0 -1
  166. package/dist/types/lib/hooks/use-dashboard.d.ts +1 -3
  167. package/dist/types/lib/hooks/use-interactions-popover.d.ts +1 -8
  168. package/dist/types/lib/hooks/use-resolved-card-config.d.ts +6 -0
  169. package/dist/types/lib/interactions/click-outcome.d.ts +25 -0
  170. package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +3 -1
  171. package/dist/types/lib/interactions/get-click-context-from-matrix.d.ts +1 -1
  172. package/dist/types/lib/interactions/get-click-context-from-table.d.ts +7 -0
  173. package/dist/types/lib/interactions/interaction-utils.d.ts +17 -1
  174. package/dist/types/lib/matrix-table/build-matrix-drill-to-detail.d.ts +15 -0
  175. package/dist/types/lib/matrix-table/matrix-card-interactions.d.ts +14 -3
  176. package/dist/types/lib/matrix-table/matrix-runtime-types.d.ts +0 -3
  177. package/dist/types/lib/matrix-table/matrix-runtime.d.ts +0 -4
  178. package/dist/types/lib/matrix-table/{use-matrix-selection.d.ts → use-matrix-cell-focus.d.ts} +13 -17
  179. package/dist/types/lib/matrix-table/use-matrix.d.ts +0 -1
  180. package/dist/types/lib/query-context/build-card-query-context.d.ts +19 -8
  181. package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +5 -3
  182. package/dist/types/lib/query-context/build-dashboard-frame-base-query-contexts.d.ts +12 -4
  183. package/dist/types/lib/query-context/compile-selection-filters.d.ts +5 -0
  184. package/dist/types/lib/query-context/dashboard-filter-mapping-resolution.d.ts +46 -0
  185. package/dist/types/lib/query-context/filter-group-utils.d.ts +3 -0
  186. package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +29 -0
  187. package/dist/types/lib/selection/click-to-filter-authoring-support.d.ts +9 -0
  188. package/dist/types/lib/selection/selection-from-click-context.d.ts +41 -0
  189. package/dist/types/lib/selection/selection-labels.d.ts +3 -0
  190. package/dist/types/lib/selection/selection-notices.d.ts +9 -0
  191. package/dist/types/lib/selection/selection-reducer.d.ts +46 -0
  192. package/dist/types/lib/stores/dashboard-store.d.ts +62 -17
  193. package/dist/types/lib/stores/editor-store.d.ts +1 -2
  194. package/dist/types/lib/stores/index.d.ts +0 -2
  195. package/dist/types/lib/types/common-types.d.ts +60 -6
  196. package/dist/types/lib/types/explorer-types.d.ts +1 -22
  197. package/dist/types/lib/types/interaction-types.d.ts +6 -198
  198. package/dist/types/lib/utils/calculate-context-aware-filters.d.ts +21 -12
  199. package/dist/types/lib/utils/card-utils.d.ts +11 -0
  200. package/dist/types/lib/utils/date-hierarchy-utils.d.ts +3 -1
  201. package/dist/types/lib/utils/drag-and-drop-utils.d.ts +1 -1
  202. package/dist/types/lib/utils/interaction-icons.d.ts +1 -1
  203. package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +32 -32
  204. package/dist/types/shared/analytics-protocol/index.d.ts +2 -0
  205. package/dist/types/shared/analytics-protocol/selection-contract.d.ts +100 -0
  206. package/dist/types/shared/analytics-protocol/selection-filter-compiler.d.ts +12 -0
  207. package/dist/types/shared/dashboard-authoring/apply-group-by-override.d.ts +19 -0
  208. package/dist/types/shared/dashboard-authoring/click-to-filter-settings.d.ts +88 -0
  209. package/dist/types/shared/dashboard-authoring/contracts.d.ts +8 -0
  210. package/dist/types/shared/dashboard-authoring/index.d.ts +3 -0
  211. package/dist/types/shared/dashboard-authoring/linked-click-to-filter-overrides.d.ts +32 -0
  212. package/dist/types/shared/format-utils/matrix-continuation.d.ts +3 -3
  213. package/package.json +1 -1
  214. package/src/data-app-sdk/README.md +58 -1
  215. package/dist/chunks/appearance-context-tNjvTJj3.cjs +0 -1
  216. package/dist/chunks/calculated-field-identity-BTpUqfEu.js +0 -1276
  217. package/dist/chunks/calculated-field-identity-rMuXuzEY.cjs +0 -1
  218. package/dist/chunks/constants-vtu7_IUo.cjs +0 -1
  219. package/dist/chunks/dashboard-controls-DlxeddZN.cjs +0 -52
  220. package/dist/chunks/dashboard-json-DhS4yJfc.cjs +0 -1
  221. package/dist/chunks/edit-dashboard-visual-X3OCnivL.cjs +0 -172
  222. package/dist/chunks/field-aggregations-BU_3gHKR.js +0 -957
  223. package/dist/chunks/field-aggregations-CDCamEsQ.cjs +0 -1
  224. package/dist/chunks/index-C8XCKzB6.cjs +0 -1
  225. package/dist/chunks/index-DSa6RSdg.cjs +0 -1417
  226. package/dist/chunks/matrix-control-sources-CeC5EMyq.cjs +0 -1
  227. package/dist/chunks/matrix-member-presentation-E2B4k3ws.cjs +0 -1
  228. package/dist/chunks/matrix-member-presentation-qiHxv67e.js +0 -105
  229. package/dist/chunks/matrix-operation-contract-Cqy4EW2H.js +0 -1638
  230. package/dist/chunks/matrix-operation-contract-D9dLX-Wr.cjs +0 -1
  231. package/dist/chunks/report-preferences-dialog-7Vsc_fsG.cjs +0 -1
  232. package/dist/chunks/search-BqqhaMx9.cjs +0 -26
  233. package/dist/chunks/switch-BytP6QY8.cjs +0 -139
  234. package/dist/types/components/interactions/configuration-popover.d.ts +0 -1
  235. package/dist/types/components/interactions/interaction-card.d.ts +0 -59
  236. package/dist/types/components/interactions/interaction-event-handler.d.ts +0 -11
  237. package/dist/types/components/interactions/interactions-list.d.ts +0 -50
  238. package/dist/types/components/interactions/panels/cross-filter-panel.d.ts +0 -24
  239. package/dist/types/components/interactions/panels/inline-drill-panel.d.ts +0 -24
  240. package/dist/types/components/interactions/selectors/action-selector.d.ts +0 -31
  241. package/dist/types/components/interactions/selectors/trigger-selector.d.ts +0 -38
  242. package/dist/types/components/surfboard/filter/click-filter-section.d.ts +0 -5
  243. package/dist/types/lib/interactions/build-interaction-event.d.ts +0 -25
  244. package/dist/types/lib/interactions/convert-click-filters-to-filter-group.d.ts +0 -10
  245. package/dist/types/lib/interactions/execute-interaction-event.d.ts +0 -80
  246. package/dist/types/lib/interactions/field-utils.d.ts +0 -11
  247. package/dist/types/lib/interactions/handle-chart-click.d.ts +0 -75
  248. package/dist/types/lib/interactions/linked-interaction-utils.d.ts +0 -14
  249. package/dist/types/lib/interactions/source-card-filter-utils.d.ts +0 -9
  250. package/dist/types/lib/matrix-table/matrix-clipboard.d.ts +0 -45
  251. package/dist/types/lib/matrix-table/matrix-selection.d.ts +0 -20
  252. package/dist/types/lib/stores/drill-actions.d.ts +0 -139
  253. package/dist/types/lib/stores/interaction-store.d.ts +0 -113
  254. package/dist/types/lib/stores/pointer-interaction-store.d.ts +0 -18
@@ -1,4 +1,4 @@
1
- "use strict";var v=Object.defineProperty;var X=(e,r,t)=>r in e?v(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var w=(e,r,t)=>X(e,typeof r!="symbol"?r+"":r,t);const D=require("./semantic-format-BhIL1PXP.cjs"),k=require("./matrix-formatter-7GLTcBuy.cjs"),f=require("./raw-temporal-BUeTpG76.cjs"),d=require("../pdf-export-policy/index.cjs"),G=require("./temporal-bucket-4YEPEKlJ.cjs");function B(e,r,t){const n={...r,locale:r.locale??t};if(n.type==="number")return f.formatNumericCanonical(e,n);const{prefix:o,suffix:a,...s}=n;return`${o??""}${f.formatNumericCanonical(e,{...s,negativeStyle:n.type==="currency"?n.negativeStyle:"minus"})}${a??""}`}function A(e,r,t){return e===null?{value:e,text:null}:!r||!D.isNumericCanonicalFormat(r)&&r.type!=="duration"?{value:e,text:f.formatNumericCanonical(e,{type:"number",locale:t})}:r.type==="duration"?{value:e,text:k.formatDuration(e,{inputUnit:r.inputUnit,outputStyle:r.outputStyle,largestUnit:r.largestUnit,smallestUnit:r.smallestUnit,maxUnits:r.maxUnits,prefix:r.prefix,suffix:r.suffix,negativeInParentheses:r.negativeStyle==="parentheses"})}:{value:e,text:B(e,r,t)}}function T(e,r,t,n){return e===null?{value:e,text:null}:n==="percent"?{value:e,text:f.formatNumericCanonical(e,{type:"percent",locale:t,minimumFractionDigits:r,maximumFractionDigits:r,percentValueMode:"fraction"})}:{value:e,text:f.formatNumericCanonical(e,{type:"number",locale:t,minimumFractionDigits:r,maximumFractionDigits:r,suffix:"×"})}}function _(e,r){if(e===void 0)return r;if(!Number.isInteger(e)||e<0||e>6)throw new RangeError("Comparison precision must be an integer from 0 to 6.");return e}function $(e,r){const t={mode:r.displayMode,current:A(e.currentValue,r.metricFormat,r.locale),comparison:A(e.comparisonValue,r.metricFormat,r.locale)};return(r.displayMode==="difference"||r.displayMode==="both")&&(t.difference=A(e.delta,r.metricFormat,r.locale)),(r.displayMode==="percent_change"||r.displayMode==="both")&&(t.percentChange=T(e.percentChange,_(r.precision,1),r.locale,"percent")),r.displayMode==="ratio"&&(t.ratio=T(e.ratio,_(r.precision,2),r.locale,"ratio")),t}function U(e){const r=e.trimStart().charAt(0);return["=","+","-","@"].includes(r)||[" ","\r",`
1
+ "use strict";var v=Object.defineProperty;var X=(e,r,t)=>r in e?v(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var w=(e,r,t)=>X(e,typeof r!="symbol"?r+"":r,t);const D=require("./semantic-format-BzH69TRq.cjs"),k=require("./matrix-formatter-CveLJo6S.cjs"),f=require("./raw-temporal-BUeTpG76.cjs"),d=require("../pdf-export-policy/index.cjs"),G=require("./temporal-bucket-4YEPEKlJ.cjs");function B(e,r,t){const n={...r,locale:r.locale??t};if(n.type==="number")return f.formatNumericCanonical(e,n);const{prefix:o,suffix:a,...s}=n;return`${o??""}${f.formatNumericCanonical(e,{...s,negativeStyle:n.type==="currency"?n.negativeStyle:"minus"})}${a??""}`}function A(e,r,t){return e===null?{value:e,text:null}:!r||!D.isNumericCanonicalFormat(r)&&r.type!=="duration"?{value:e,text:f.formatNumericCanonical(e,{type:"number",locale:t})}:r.type==="duration"?{value:e,text:k.formatDuration(e,{inputUnit:r.inputUnit,outputStyle:r.outputStyle,largestUnit:r.largestUnit,smallestUnit:r.smallestUnit,maxUnits:r.maxUnits,prefix:r.prefix,suffix:r.suffix,negativeInParentheses:r.negativeStyle==="parentheses"})}:{value:e,text:B(e,r,t)}}function T(e,r,t,n){return e===null?{value:e,text:null}:n==="percent"?{value:e,text:f.formatNumericCanonical(e,{type:"percent",locale:t,minimumFractionDigits:r,maximumFractionDigits:r,percentValueMode:"fraction"})}:{value:e,text:f.formatNumericCanonical(e,{type:"number",locale:t,minimumFractionDigits:r,maximumFractionDigits:r,suffix:"×"})}}function _(e,r){if(e===void 0)return r;if(!Number.isInteger(e)||e<0||e>6)throw new RangeError("Comparison precision must be an integer from 0 to 6.");return e}function $(e,r){const t={mode:r.displayMode,current:A(e.currentValue,r.metricFormat,r.locale),comparison:A(e.comparisonValue,r.metricFormat,r.locale)};return(r.displayMode==="difference"||r.displayMode==="both")&&(t.difference=A(e.delta,r.metricFormat,r.locale)),(r.displayMode==="percent_change"||r.displayMode==="both")&&(t.percentChange=T(e.percentChange,_(r.precision,1),r.locale,"percent")),r.displayMode==="ratio"&&(t.ratio=T(e.ratio,_(r.precision,2),r.locale,"ratio")),t}function U(e){const r=e.trimStart().charAt(0);return["=","+","-","@"].includes(r)||[" ","\r",`
2
2
  `].includes(e.charAt(0))?`'${e}`:e}function C(e,r=","){if(e==null)return"";const t=String(e);return t.includes(r)||t.includes('"')||t.includes(`
3
3
  `)||t.includes("\r")?`"${t.replace(/"/g,'""')}"`:t}function b(e,r=","){return e.map(t=>C(t,r)).join(r)}function h(e,r={}){const{delimiter:t=",",lineEnding:n=`
4
4
  `}=r;return e.map(o=>b(o,t)).join(n)}function N(e,r={}){if(e.length===0)return"";const{delimiter:t=",",lineEnding:n=`
@@ -1,8 +1,8 @@
1
1
  var x = Object.defineProperty;
2
2
  var T = (e, r, t) => r in e ? x(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
3
3
  var y = (e, r, t) => T(e, typeof r != "symbol" ? r + "" : r, t);
4
- import { i as C } from "./semantic-format-C3amkGmY.js";
5
- import { d as _ } from "./matrix-formatter-xsq7n_e6.js";
4
+ import { i as C } from "./semantic-format-CBlRO8Aw.js";
5
+ import { d as _ } from "./matrix-formatter-ZVS5QOuq.js";
6
6
  import { b as g } from "./raw-temporal-CUJ86xHI.js";
7
7
  import { PDF_SAFETY_LIMIT_EXCEEDED as S, getUtf8ByteLength as V, FAST_PDF_POLICY as M } from "../pdf-export-policy/index.js";
8
8
  import { f as P } from "./temporal-bucket-B9hMwemw.js";
@@ -1 +1 @@
1
- "use strict";var P=Object.defineProperty;var M=(e,o,t)=>o in e?P(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t;var p=(e,o,t)=>M(e,typeof o!="symbol"?o+"":o,t);const x=require("./raw-temporal-BUeTpG76.cjs"),T=require("./report-runtime-context-DzvHBPxl.cjs"),u=require("./temporal-bucket-4YEPEKlJ.cjs"),q=require("./validators-DVYAnnX0.cjs");require("./matrix-operation-contract-D9dLX-Wr.cjs");const O=require("./metric-comparison-DBQ3EJTz.cjs"),B=require("./temporal-bucket-contract-ZctiyXYk.cjs"),k=require("./pivot-result-identity-uTiylUNr.cjs");class b extends Error{constructor(t){super(`invalid_presentation_execution_snapshot: ${t} Resave this report before running it again.`);p(this,"code","invalid_presentation_execution_snapshot");p(this,"deliveryBlocking",!0);this.name="PresentationExecutionSnapshotError"}}class J extends Error{constructor(t){super(`missing_resolved_raw_temporal_format: Column "${t}" has no captured presentation. Resave this report before running it again.`);p(this,"code","missing_resolved_raw_temporal_format");p(this,"deliveryBlocking",!0);this.name="MissingResolvedRawTemporalFormatError"}}function v(e,o,t){const n=new Set(o),r=Object.keys(e).find(i=>!n.has(i));if(r)throw new Error(`${t} contains unknown property "${r}"`)}function _(e,o="scope"){if(!u.isPlainJsonRecord(e))throw new Error(`${o} must be an object`);v(e,["dashboardId","cardId","attachmentIndex"],o);const t=typeof e.dashboardId=="string"?e.dashboardId.trim():"";if(!t)throw new Error(`${o}.dashboardId is required`);const n=typeof e.cardId=="string"?e.cardId.trim():void 0;if(e.cardId!==void 0&&!n)throw new Error(`${o}.cardId must be a non-empty string`);const r=e.attachmentIndex;if(r!==void 0&&(typeof r!="number"||!Number.isInteger(r)||r<0))throw new Error(`${o}.attachmentIndex must be a non-negative integer`);return{dashboardId:t,...n?{cardId:n}:{},...typeof r=="number"?{attachmentIndex:r}:{}}}function y(e,o,t,n){if(e.kind!==o)return;v(e,["kind",t],n);const r=typeof e[t]=="string"?e[t].trim():"";if(!r)throw new Error(`${n}.${t} is required`);return r}function N(e,o){if(!u.isPlainJsonRecord(e))throw new Error(`${o} must be an object`);const t=y(e,"metric","metricId",o);if(t)return{kind:"metric",metricId:t};const n=y(e,"column","columnKey",o);if(n)return{kind:"column",columnKey:n};const r=y(e,"matrix_measure","measureId",o);if(r)return{kind:"matrix_measure",measureId:r};throw new Error(`${o} is not a valid numeric presentation target`)}function z(e,o){if(!u.isPlainJsonRecord(e))throw new Error(`${o} must be an object`);if(e.kind==="field"){v(e,["kind","fieldId","role"],o);const r=typeof e.fieldId=="string"?e.fieldId.trim():"";if(!r)throw new Error(`${o}.fieldId is required`);const i=e.role;if(i!==void 0&&i!=="groupby"&&i!=="pivotby")throw new Error(`${o}.role must be groupby or pivotby`);return{kind:"field",fieldId:r,...i?{role:i}:{}}}const t=y(e,"column","columnKey",o);if(t)return{kind:"column",columnKey:t};const n=y(e,"matrix_axis","axisInstanceId",o);if(n)return{kind:"matrix_axis",axisInstanceId:n};throw new Error(`${o} is not a valid temporal bucket presentation target`)}function L(e,o){if(!u.isPlainJsonRecord(e))throw new Error(`${o} must be an object`);const t=y(e,"column","columnKey",o);if(!t)throw new Error(`${o} must identify a column`);return{kind:"column",columnKey:t}}function D(e){return[e.dashboardId,e.cardId??null,e.attachmentIndex??null]}function h(e){switch(e.kind){case"metric":return[e.kind,e.metricId];case"column":return[e.kind,e.columnKey];case"matrix_measure":return[e.kind,e.measureId];case"field":return[e.kind,e.fieldId,e.role??""];case"matrix_axis":return[e.kind,e.axisInstanceId]}}function g(e,o){return e.dashboardId===o.dashboardId&&e.cardId===o.cardId&&e.attachmentIndex===o.attachmentIndex}function R(e,o){const t=h(e),n=h(o);return t.length===n.length&&t.every((r,i)=>r===n[i])}function K(e){if(!Array.isArray(e))throw new Error("resolvedFormats must be an array");const o=new Set;return e.map((t,n)=>{var m,f;const r=`resolvedFormats.${n}`;if(!u.isPlainJsonRecord(t))throw new Error(`${r} must be an object`);v(t,["scope","target","format"],r);const i=_(t.scope,`${r}.scope`);if(!u.isPlainJsonRecord(t.format))throw new Error(`${r}.format must be an object`);let s;switch(t.format.type){case"temporal_bucket":{const l=u.parseResolvedTemporalBucketFormat(t.format);if(!l.ok)throw new Error(`${r}.format is invalid: ${((m=l.issues[0])==null?void 0:m.message)??"invalid value"}`);s={scope:i,target:z(t.target,`${r}.target`),format:l.value};break}case"raw_temporal":s={scope:i,target:L(t.target,`${r}.target`),format:x.parseResolvedRawTemporalFormat(t.format)};break;case"number":case"currency":case"percent":case"scientific":{const l=x.parseResolvedNumericCanonicalFormat(t.format);if(!l.ok)throw new Error(`${r}.format is invalid: ${((f=l.issues[0])==null?void 0:f.message)??"invalid value"}`);s={scope:i,target:N(t.target,`${r}.target`),format:l.value};break}default:throw new Error(`${r}.format.type is unsupported`)}const c=JSON.stringify([...D(s.scope),...h(s.target)]);if(o.has(c))throw new Error(`${r} duplicates a scoped presentation target`);return o.add(c),s})}function F(e){try{if(!u.isPlainJsonRecord(e))throw new Error("presentation execution snapshot must be an object");if(v(e,["version","reportContext","resolvedFormats"],"presentation execution snapshot"),e.version!==1)throw new Error("presentation execution snapshot version must be 1");const o=T.parseReportRuntimeContext(e.reportContext);if(!o.ok){const t=o.issues[0];throw new Error(`presentation execution snapshot reportContext is invalid: ${t!=null&&t.path&&t.path!=="$"?`${t.path}: `:""}${(t==null?void 0:t.message)??"invalid value"}`)}return{version:1,reportContext:o.value,resolvedFormats:K(e.resolvedFormats)}}catch(o){throw o instanceof b?o:new b(o instanceof Error?o.message:"Snapshot is invalid.")}}function U(e){return F({version:1,reportContext:e.reportContext,resolvedFormats:[...e.resolvedFormats]})}function V(e){const o=e.snapshot.resolvedFormats.find(t=>t.format.type!=="temporal_bucket"&&t.format.type!=="raw_temporal"&&g(t.scope,e.scope)&&R(t.target,e.target));return o==null?void 0:o.format}function G(e){const o=e.snapshot.resolvedFormats.find(t=>t.format.type==="raw_temporal"&&g(t.scope,e.scope)&&R(t.target,e.target));return o==null?void 0:o.format}function H(e){const o=e.snapshot.resolvedFormats.find(t=>t.format.type==="temporal_bucket"&&g(t.scope,e.scope)&&R(t.target,e.target));return o==null?void 0:o.format}function Q(e){var r;const o=new Set,t=new Set;if(e.snapshot.resolvedFormats.forEach((i,s)=>{if(i.scope.attachmentIndex!==void 0)throw new Error(`resolvedFormats.${s}.scope.attachmentIndex is not valid for a card export`);if(i.scope.dashboardId!==e.expectedScope.dashboardId||i.scope.cardId!==e.expectedScope.cardId)throw new Error(`resolvedFormats.${s}.scope must match the executing dashboard/card`);if(i.target.kind==="field"&&i.format.type==="temporal_bucket"){const c=JSON.stringify(h(i.target));if(t.has(c))throw new Error(`resolvedFormats.${s} duplicates export field "${i.target.fieldId}"`);t.add(c);return}if(i.target.kind!=="column")throw new Error(`resolvedFormats.${s}.target must identify an export column or temporal pivot field`);if(o.has(i.target.columnKey))throw new Error(`resolvedFormats.${s} duplicates export column "${i.target.columnKey}"`);o.add(i.target.columnKey)}),!e.useFormattedValues)return;if(!((r=e.visibleColumns)!=null&&r.length))throw new Error("visibleColumns must identify every formatted export column");const n=e.visibleColumns.find(i=>!o.has(i));if(n)throw new Error(`resolvedFormats is missing visible export column "${n}"`)}function w(e){return Array.from(new Set((e??[]).flatMap(o=>typeof o.id=="string"&&o.id?[o.id]:[])))}function S(e){const o=new Map;return e.forEach(t=>{t.id&&o.set(t.id,(o.get(t.id)??0)+1)}),e.flatMap(t=>t.id&&(o.get(t.id)??0)>1?[O.resolveMetricResultAlias(t)]:[])}function W(e){const o=e.metricFields??[],t=w(o);return{expectedRoleFieldIds:{groupby:w(e.groupByFields),metric:t.length>0?t:[q.SEMAPHOR_GENERATED_COUNT_METRIC_ID],pivotby:w(e.pivotByFields),detail:w(e.detailFields)},expectedMetricAliases:S(o)}}class a extends Error{constructor(t,n){super(`invalid_pivot_result_lifecycle: ${t}`);p(this,"code","invalid_pivot_result_lifecycle");p(this,"deliveryBlocking",!0);this.cause=n,this.name="PivotResultLifecycleError"}}function X(e){if(!Array.isArray(e)||e.some(t=>!t||typeof t!="object"||Array.isArray(t)||typeof t.key!="string"||!t.key||typeof t.name!="string"||typeof t.label!="string"))throw new a("Canonical pivot columns must be an array of keyed, named result descriptors.");const o=e;if(new Set(o.map(t=>t.key)).size!==o.length)throw new a("Canonical pivot column keys must be unique.");for(const t of o){const n=B.validateTemporalBucketResultColumn(t,{metadataRequired:!1});if(!n.ok)throw new a(`Canonical pivot column "${t.key}" has invalid temporal metadata: ${n.error.message}`)}return o}function C(e){if(!e||typeof e!="object"||Array.isArray(e)||e.version!==1||e.source!=="explorer"||!e.byRole||typeof e.byRole!="object"||Array.isArray(e.byRole))throw new a("A loaded canonical pivot result requires its role-scoped column key map.");const o=e,t=new Set(["groupby","metric","pivotby","detail"]);for(const[n,r]of Object.entries(o.byRole)){if(!t.has(n)||!r||typeof r!="object"||Array.isArray(r))throw new a(`Canonical pivot role map contains invalid "${n}" bindings.`);for(const[i,s]of Object.entries(r))if(!i||!s||typeof s!="object"||Array.isArray(s)||s.role!==n||typeof s.rawKey!="string"||!s.rawKey||s.outputKey!==void 0&&(typeof s.outputKey!="string"||!s.outputKey))throw new a(`Canonical pivot role map contains an invalid "${n}:${i}" binding.`)}if(o.byMetricAlias!==void 0){if(!o.byMetricAlias||typeof o.byMetricAlias!="object"||Array.isArray(o.byMetricAlias))throw new a("Canonical pivot metric-alias bindings must be an object.");for(const[n,r]of Object.entries(o.byMetricAlias))if(!n||!r||typeof r!="object"||Array.isArray(r)||r.role!=="metric"||typeof r.rawKey!="string"||!r.rawKey||r.outputKey!==void 0&&(typeof r.outputKey!="string"||!r.outputKey))throw new a(`Canonical pivot metric-alias map contains an invalid "${n}" binding.`)}return o}function Y(e){if(e===void 0)return{};if(!e||typeof e!="object"||Array.isArray(e))throw new a("Canonical pivot column metadata must be an object.");for(const[o,t]of Object.entries(e)){if(!o||!t||typeof t!="object"||Array.isArray(t))throw new a(`Canonical pivot column metadata contains an invalid "${o}" classification.`);const{isSubtotal:n,subtotalScope:r}=t;if(n!==void 0&&typeof n!="boolean"||r!==void 0&&r!=="base"&&r!=="pivot-value"&&r!=="grand-total"||n===!0&&r!=="pivot-value"&&r!=="grand-total"||(r==="pivot-value"||r==="grand-total")&&n!==!0||r==="base"&&n===!0)throw new a(`Canonical pivot column metadata contains an incoherent "${o}" subtotal classification.`)}return e}function A(e,o){if(!Array.isArray(e)||e.some(t=>typeof t!="string"||!t)||new Set(e).size!==e.length)throw new a(`Canonical pivot contract ${o} must be an array of unique field identities.`);return e}function Z(e,o){if(!e||typeof e!="object"||Array.isArray(e)||e.version!==1)throw new a("A canonical pivot result requires its versioned result contract.");const t=e,n=t.expectedRoleFieldIds;if(!n||typeof n!="object"||Array.isArray(n))throw new a("Canonical pivot contract role identities must be an object.");const i=Object.fromEntries(["groupby","metric","pivotby","detail"].map(d=>[d,A(n[d],`expectedRoleFieldIds.${d}`)])),s=A(t.expectedMetricAliases,"expectedMetricAliases"),c=t.columnKinds;if(!c||typeof c!="object"||Array.isArray(c))throw new a("Canonical pivot contract column kinds must be an object.");const m=new Set(["row","pivot_metric","value"]),f=o.map(d=>d.key),l=Object.keys(c);if(l.length!==f.length||l.some(d=>!f.includes(d)||!m.has(c[d])))throw new a("Canonical pivot contract must classify every authoritative result column exactly once.");const I=Y(t.columnClassifications);if(Object.keys(I).some(d=>!f.includes(d)))throw new a("Canonical pivot contract contains a classification for an unknown result column.");return{version:1,expectedRoleFieldIds:i,expectedMetricAliases:s,columnKinds:c,columnClassifications:I}}function E(e,o){const t=["groupby","metric","pivotby","detail"];for(const i of t){const s=new Set(o.expectedRoleFieldIds[i]??[]),c=Object.keys(e.byRole[i]??{});if(c.length!==s.size||c.some(m=>!s.has(m)))throw new a(`The role-scoped ${i} bindings do not match the authored result fields.`)}const n=new Set(o.expectedMetricAliases),r=Object.keys(e.byMetricAlias??{});if(r.length!==n.size||r.some(i=>!n.has(i)))throw new a("The metric-alias bindings do not match the authored metric instances.")}function ee(e){if(!Array.isArray(e)||e.some(o=>!o||typeof o!="object"||Array.isArray(o)))throw new a("Canonical pivot records must be an array of row objects.");return e}function te(e,o){e.forEach((t,n)=>{o.forEach(r=>{if(!Object.prototype.hasOwnProperty.call(t,r.key)||t[r.key]===void 0)throw new a(`Canonical pivot column "${r.key}" is absent from row ${n}.`)})})}function oe(e,o,t){const n=new Set(o.map(r=>r.key));["groupby","detail"].forEach(r=>{Object.entries(e.byRole[r]??{}).forEach(([i,s])=>{const c=s.outputKey||s.rawKey;if(!n.has(c)||t.columnKinds[c]!=="row")throw new a(`The role-scoped ${r} binding for "${i}" does not name an authoritative result column.`)})})}function $(e,o){o.forEach(t=>{const n=e.columnKinds[t.key];if(n==="pivot_metric"&&t.pivotIdentity===void 0)throw new a(`Physical pivot result column "${t.key}" is missing its identity.`);if(n!=="pivot_metric"&&t.pivotIdentity!==void 0)throw new a(`Canonical pivot result column "${t.key}" carries pivot identity outside the physical pivot projection.`)})}function j(e){const o=ee(e.records),t=X(e.columns),n=Z(e.pivotResultContract,t),r=n.expectedRoleFieldIds.pivotby??[];if(e.pivotResultState==="loaded_empty"){if(o.length!==0)throw new a("A loaded_empty pivot result cannot carry records.");if(t.some(m=>n.columnKinds[m.key]==="pivot_metric"))throw new a("A loaded_empty pivot result cannot carry physical pivot columns.");$(n,t);const c=C(e.columnKeyMap);return E(c,n),{pivotResultState:"loaded_empty",records:[],columns:t,columnKeyMap:c,pivotResultContract:n}}if(e.pivotResultState!=="loaded_valid")throw new a("A canonical pivot result must declare loaded_empty or loaded_valid.");if(o.length===0)throw new a("A loaded_valid pivot result must carry at least one record.");const i=C(e.columnKeyMap);E(i,n),oe(i,t,n),$(n,t);const s=t.filter(c=>n.columnKinds[c.key]==="pivot_metric");if(r.length>0&&s.length===0)throw new a("A loaded_valid pivot result is missing its physical pivot columns.");try{k.requirePivotResultColumnIdentities(s,{expectedPivotFieldIds:r,columnClassifications:n.columnClassifications})}catch(c){throw c instanceof k.PivotResultIdentityError?new a(c.message,c):c}return te(o,t),{pivotResultState:"loaded_valid",records:o,columns:t,columnKeyMap:i,pivotResultContract:n}}function re(e){const o=new Set;["groupby","detail"].forEach(i=>{Object.values(e.columnKeyMap.byRole[i]??{}).forEach(s=>{o.add(s.outputKey||s.rawKey)})});const t=new Set(e.physicalPivotColumnKeys),n=new Set(e.columns.map(i=>i.key)),r={version:1,expectedRoleFieldIds:{groupby:Array.from(new Set(e.expectedRoleFieldIds.groupby??[])),metric:Array.from(new Set(e.expectedRoleFieldIds.metric??[])),pivotby:Array.from(new Set(e.expectedRoleFieldIds.pivotby??[])),detail:Array.from(new Set(e.expectedRoleFieldIds.detail??[]))},expectedMetricAliases:[...e.expectedMetricAliases??[]],columnKinds:Object.fromEntries(e.columns.map(i=>[i.key,o.has(i.key)?"row":t.has(i.key)?"pivot_metric":"value"])),columnClassifications:Object.fromEntries(Object.entries(e.columnMetadata??{}).filter(([i])=>n.has(i)))};return j({pivotResultState:e.records.length===0?"loaded_empty":"loaded_valid",pivotResultContract:r,records:e.records,columns:e.columns,columnKeyMap:e.columnKeyMap})}exports.MissingResolvedRawTemporalFormatError=J;exports.PivotResultLifecycleError=a;exports.PresentationExecutionSnapshotError=b;exports.createCanonicalPivotResultTransport=re;exports.createPresentationExecutionSnapshot=U;exports.deriveMetricInstanceAliasExpectations=S;exports.derivePivotResultContractExpectations=W;exports.findResolvedNumericFormat=V;exports.findResolvedRawTemporalFormat=G;exports.findResolvedTemporalBucketFormat=H;exports.parseCanonicalPivotResultTransport=j;exports.parsePresentationExecutionSnapshot=F;exports.parsePresentationScope=_;exports.parseResolvedPresentationEntries=K;exports.validateCardExportPresentationSnapshot=Q;
1
+ "use strict";var P=Object.defineProperty;var M=(e,o,t)=>o in e?P(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t;var p=(e,o,t)=>M(e,typeof o!="symbol"?o+"":o,t);const x=require("./raw-temporal-BUeTpG76.cjs"),T=require("./report-runtime-context-DzvHBPxl.cjs"),u=require("./temporal-bucket-4YEPEKlJ.cjs"),q=require("./validators-DVYAnnX0.cjs");require("./matrix-operation-contract-DoiWTUbT.cjs");const O=require("./metric-comparison-DBQ3EJTz.cjs"),B=require("./temporal-bucket-contract-ZctiyXYk.cjs"),k=require("./pivot-result-identity-uTiylUNr.cjs");class b extends Error{constructor(t){super(`invalid_presentation_execution_snapshot: ${t} Resave this report before running it again.`);p(this,"code","invalid_presentation_execution_snapshot");p(this,"deliveryBlocking",!0);this.name="PresentationExecutionSnapshotError"}}class J extends Error{constructor(t){super(`missing_resolved_raw_temporal_format: Column "${t}" has no captured presentation. Resave this report before running it again.`);p(this,"code","missing_resolved_raw_temporal_format");p(this,"deliveryBlocking",!0);this.name="MissingResolvedRawTemporalFormatError"}}function v(e,o,t){const n=new Set(o),r=Object.keys(e).find(i=>!n.has(i));if(r)throw new Error(`${t} contains unknown property "${r}"`)}function _(e,o="scope"){if(!u.isPlainJsonRecord(e))throw new Error(`${o} must be an object`);v(e,["dashboardId","cardId","attachmentIndex"],o);const t=typeof e.dashboardId=="string"?e.dashboardId.trim():"";if(!t)throw new Error(`${o}.dashboardId is required`);const n=typeof e.cardId=="string"?e.cardId.trim():void 0;if(e.cardId!==void 0&&!n)throw new Error(`${o}.cardId must be a non-empty string`);const r=e.attachmentIndex;if(r!==void 0&&(typeof r!="number"||!Number.isInteger(r)||r<0))throw new Error(`${o}.attachmentIndex must be a non-negative integer`);return{dashboardId:t,...n?{cardId:n}:{},...typeof r=="number"?{attachmentIndex:r}:{}}}function y(e,o,t,n){if(e.kind!==o)return;v(e,["kind",t],n);const r=typeof e[t]=="string"?e[t].trim():"";if(!r)throw new Error(`${n}.${t} is required`);return r}function N(e,o){if(!u.isPlainJsonRecord(e))throw new Error(`${o} must be an object`);const t=y(e,"metric","metricId",o);if(t)return{kind:"metric",metricId:t};const n=y(e,"column","columnKey",o);if(n)return{kind:"column",columnKey:n};const r=y(e,"matrix_measure","measureId",o);if(r)return{kind:"matrix_measure",measureId:r};throw new Error(`${o} is not a valid numeric presentation target`)}function z(e,o){if(!u.isPlainJsonRecord(e))throw new Error(`${o} must be an object`);if(e.kind==="field"){v(e,["kind","fieldId","role"],o);const r=typeof e.fieldId=="string"?e.fieldId.trim():"";if(!r)throw new Error(`${o}.fieldId is required`);const i=e.role;if(i!==void 0&&i!=="groupby"&&i!=="pivotby")throw new Error(`${o}.role must be groupby or pivotby`);return{kind:"field",fieldId:r,...i?{role:i}:{}}}const t=y(e,"column","columnKey",o);if(t)return{kind:"column",columnKey:t};const n=y(e,"matrix_axis","axisInstanceId",o);if(n)return{kind:"matrix_axis",axisInstanceId:n};throw new Error(`${o} is not a valid temporal bucket presentation target`)}function L(e,o){if(!u.isPlainJsonRecord(e))throw new Error(`${o} must be an object`);const t=y(e,"column","columnKey",o);if(!t)throw new Error(`${o} must identify a column`);return{kind:"column",columnKey:t}}function D(e){return[e.dashboardId,e.cardId??null,e.attachmentIndex??null]}function h(e){switch(e.kind){case"metric":return[e.kind,e.metricId];case"column":return[e.kind,e.columnKey];case"matrix_measure":return[e.kind,e.measureId];case"field":return[e.kind,e.fieldId,e.role??""];case"matrix_axis":return[e.kind,e.axisInstanceId]}}function g(e,o){return e.dashboardId===o.dashboardId&&e.cardId===o.cardId&&e.attachmentIndex===o.attachmentIndex}function R(e,o){const t=h(e),n=h(o);return t.length===n.length&&t.every((r,i)=>r===n[i])}function K(e){if(!Array.isArray(e))throw new Error("resolvedFormats must be an array");const o=new Set;return e.map((t,n)=>{var m,f;const r=`resolvedFormats.${n}`;if(!u.isPlainJsonRecord(t))throw new Error(`${r} must be an object`);v(t,["scope","target","format"],r);const i=_(t.scope,`${r}.scope`);if(!u.isPlainJsonRecord(t.format))throw new Error(`${r}.format must be an object`);let s;switch(t.format.type){case"temporal_bucket":{const l=u.parseResolvedTemporalBucketFormat(t.format);if(!l.ok)throw new Error(`${r}.format is invalid: ${((m=l.issues[0])==null?void 0:m.message)??"invalid value"}`);s={scope:i,target:z(t.target,`${r}.target`),format:l.value};break}case"raw_temporal":s={scope:i,target:L(t.target,`${r}.target`),format:x.parseResolvedRawTemporalFormat(t.format)};break;case"number":case"currency":case"percent":case"scientific":{const l=x.parseResolvedNumericCanonicalFormat(t.format);if(!l.ok)throw new Error(`${r}.format is invalid: ${((f=l.issues[0])==null?void 0:f.message)??"invalid value"}`);s={scope:i,target:N(t.target,`${r}.target`),format:l.value};break}default:throw new Error(`${r}.format.type is unsupported`)}const c=JSON.stringify([...D(s.scope),...h(s.target)]);if(o.has(c))throw new Error(`${r} duplicates a scoped presentation target`);return o.add(c),s})}function F(e){try{if(!u.isPlainJsonRecord(e))throw new Error("presentation execution snapshot must be an object");if(v(e,["version","reportContext","resolvedFormats"],"presentation execution snapshot"),e.version!==1)throw new Error("presentation execution snapshot version must be 1");const o=T.parseReportRuntimeContext(e.reportContext);if(!o.ok){const t=o.issues[0];throw new Error(`presentation execution snapshot reportContext is invalid: ${t!=null&&t.path&&t.path!=="$"?`${t.path}: `:""}${(t==null?void 0:t.message)??"invalid value"}`)}return{version:1,reportContext:o.value,resolvedFormats:K(e.resolvedFormats)}}catch(o){throw o instanceof b?o:new b(o instanceof Error?o.message:"Snapshot is invalid.")}}function U(e){return F({version:1,reportContext:e.reportContext,resolvedFormats:[...e.resolvedFormats]})}function V(e){const o=e.snapshot.resolvedFormats.find(t=>t.format.type!=="temporal_bucket"&&t.format.type!=="raw_temporal"&&g(t.scope,e.scope)&&R(t.target,e.target));return o==null?void 0:o.format}function G(e){const o=e.snapshot.resolvedFormats.find(t=>t.format.type==="raw_temporal"&&g(t.scope,e.scope)&&R(t.target,e.target));return o==null?void 0:o.format}function H(e){const o=e.snapshot.resolvedFormats.find(t=>t.format.type==="temporal_bucket"&&g(t.scope,e.scope)&&R(t.target,e.target));return o==null?void 0:o.format}function Q(e){var r;const o=new Set,t=new Set;if(e.snapshot.resolvedFormats.forEach((i,s)=>{if(i.scope.attachmentIndex!==void 0)throw new Error(`resolvedFormats.${s}.scope.attachmentIndex is not valid for a card export`);if(i.scope.dashboardId!==e.expectedScope.dashboardId||i.scope.cardId!==e.expectedScope.cardId)throw new Error(`resolvedFormats.${s}.scope must match the executing dashboard/card`);if(i.target.kind==="field"&&i.format.type==="temporal_bucket"){const c=JSON.stringify(h(i.target));if(t.has(c))throw new Error(`resolvedFormats.${s} duplicates export field "${i.target.fieldId}"`);t.add(c);return}if(i.target.kind!=="column")throw new Error(`resolvedFormats.${s}.target must identify an export column or temporal pivot field`);if(o.has(i.target.columnKey))throw new Error(`resolvedFormats.${s} duplicates export column "${i.target.columnKey}"`);o.add(i.target.columnKey)}),!e.useFormattedValues)return;if(!((r=e.visibleColumns)!=null&&r.length))throw new Error("visibleColumns must identify every formatted export column");const n=e.visibleColumns.find(i=>!o.has(i));if(n)throw new Error(`resolvedFormats is missing visible export column "${n}"`)}function w(e){return Array.from(new Set((e??[]).flatMap(o=>typeof o.id=="string"&&o.id?[o.id]:[])))}function S(e){const o=new Map;return e.forEach(t=>{t.id&&o.set(t.id,(o.get(t.id)??0)+1)}),e.flatMap(t=>t.id&&(o.get(t.id)??0)>1?[O.resolveMetricResultAlias(t)]:[])}function W(e){const o=e.metricFields??[],t=w(o);return{expectedRoleFieldIds:{groupby:w(e.groupByFields),metric:t.length>0?t:[q.SEMAPHOR_GENERATED_COUNT_METRIC_ID],pivotby:w(e.pivotByFields),detail:w(e.detailFields)},expectedMetricAliases:S(o)}}class a extends Error{constructor(t,n){super(`invalid_pivot_result_lifecycle: ${t}`);p(this,"code","invalid_pivot_result_lifecycle");p(this,"deliveryBlocking",!0);this.cause=n,this.name="PivotResultLifecycleError"}}function X(e){if(!Array.isArray(e)||e.some(t=>!t||typeof t!="object"||Array.isArray(t)||typeof t.key!="string"||!t.key||typeof t.name!="string"||typeof t.label!="string"))throw new a("Canonical pivot columns must be an array of keyed, named result descriptors.");const o=e;if(new Set(o.map(t=>t.key)).size!==o.length)throw new a("Canonical pivot column keys must be unique.");for(const t of o){const n=B.validateTemporalBucketResultColumn(t,{metadataRequired:!1});if(!n.ok)throw new a(`Canonical pivot column "${t.key}" has invalid temporal metadata: ${n.error.message}`)}return o}function C(e){if(!e||typeof e!="object"||Array.isArray(e)||e.version!==1||e.source!=="explorer"||!e.byRole||typeof e.byRole!="object"||Array.isArray(e.byRole))throw new a("A loaded canonical pivot result requires its role-scoped column key map.");const o=e,t=new Set(["groupby","metric","pivotby","detail"]);for(const[n,r]of Object.entries(o.byRole)){if(!t.has(n)||!r||typeof r!="object"||Array.isArray(r))throw new a(`Canonical pivot role map contains invalid "${n}" bindings.`);for(const[i,s]of Object.entries(r))if(!i||!s||typeof s!="object"||Array.isArray(s)||s.role!==n||typeof s.rawKey!="string"||!s.rawKey||s.outputKey!==void 0&&(typeof s.outputKey!="string"||!s.outputKey))throw new a(`Canonical pivot role map contains an invalid "${n}:${i}" binding.`)}if(o.byMetricAlias!==void 0){if(!o.byMetricAlias||typeof o.byMetricAlias!="object"||Array.isArray(o.byMetricAlias))throw new a("Canonical pivot metric-alias bindings must be an object.");for(const[n,r]of Object.entries(o.byMetricAlias))if(!n||!r||typeof r!="object"||Array.isArray(r)||r.role!=="metric"||typeof r.rawKey!="string"||!r.rawKey||r.outputKey!==void 0&&(typeof r.outputKey!="string"||!r.outputKey))throw new a(`Canonical pivot metric-alias map contains an invalid "${n}" binding.`)}return o}function Y(e){if(e===void 0)return{};if(!e||typeof e!="object"||Array.isArray(e))throw new a("Canonical pivot column metadata must be an object.");for(const[o,t]of Object.entries(e)){if(!o||!t||typeof t!="object"||Array.isArray(t))throw new a(`Canonical pivot column metadata contains an invalid "${o}" classification.`);const{isSubtotal:n,subtotalScope:r}=t;if(n!==void 0&&typeof n!="boolean"||r!==void 0&&r!=="base"&&r!=="pivot-value"&&r!=="grand-total"||n===!0&&r!=="pivot-value"&&r!=="grand-total"||(r==="pivot-value"||r==="grand-total")&&n!==!0||r==="base"&&n===!0)throw new a(`Canonical pivot column metadata contains an incoherent "${o}" subtotal classification.`)}return e}function A(e,o){if(!Array.isArray(e)||e.some(t=>typeof t!="string"||!t)||new Set(e).size!==e.length)throw new a(`Canonical pivot contract ${o} must be an array of unique field identities.`);return e}function Z(e,o){if(!e||typeof e!="object"||Array.isArray(e)||e.version!==1)throw new a("A canonical pivot result requires its versioned result contract.");const t=e,n=t.expectedRoleFieldIds;if(!n||typeof n!="object"||Array.isArray(n))throw new a("Canonical pivot contract role identities must be an object.");const i=Object.fromEntries(["groupby","metric","pivotby","detail"].map(d=>[d,A(n[d],`expectedRoleFieldIds.${d}`)])),s=A(t.expectedMetricAliases,"expectedMetricAliases"),c=t.columnKinds;if(!c||typeof c!="object"||Array.isArray(c))throw new a("Canonical pivot contract column kinds must be an object.");const m=new Set(["row","pivot_metric","value"]),f=o.map(d=>d.key),l=Object.keys(c);if(l.length!==f.length||l.some(d=>!f.includes(d)||!m.has(c[d])))throw new a("Canonical pivot contract must classify every authoritative result column exactly once.");const I=Y(t.columnClassifications);if(Object.keys(I).some(d=>!f.includes(d)))throw new a("Canonical pivot contract contains a classification for an unknown result column.");return{version:1,expectedRoleFieldIds:i,expectedMetricAliases:s,columnKinds:c,columnClassifications:I}}function E(e,o){const t=["groupby","metric","pivotby","detail"];for(const i of t){const s=new Set(o.expectedRoleFieldIds[i]??[]),c=Object.keys(e.byRole[i]??{});if(c.length!==s.size||c.some(m=>!s.has(m)))throw new a(`The role-scoped ${i} bindings do not match the authored result fields.`)}const n=new Set(o.expectedMetricAliases),r=Object.keys(e.byMetricAlias??{});if(r.length!==n.size||r.some(i=>!n.has(i)))throw new a("The metric-alias bindings do not match the authored metric instances.")}function ee(e){if(!Array.isArray(e)||e.some(o=>!o||typeof o!="object"||Array.isArray(o)))throw new a("Canonical pivot records must be an array of row objects.");return e}function te(e,o){e.forEach((t,n)=>{o.forEach(r=>{if(!Object.prototype.hasOwnProperty.call(t,r.key)||t[r.key]===void 0)throw new a(`Canonical pivot column "${r.key}" is absent from row ${n}.`)})})}function oe(e,o,t){const n=new Set(o.map(r=>r.key));["groupby","detail"].forEach(r=>{Object.entries(e.byRole[r]??{}).forEach(([i,s])=>{const c=s.outputKey||s.rawKey;if(!n.has(c)||t.columnKinds[c]!=="row")throw new a(`The role-scoped ${r} binding for "${i}" does not name an authoritative result column.`)})})}function $(e,o){o.forEach(t=>{const n=e.columnKinds[t.key];if(n==="pivot_metric"&&t.pivotIdentity===void 0)throw new a(`Physical pivot result column "${t.key}" is missing its identity.`);if(n!=="pivot_metric"&&t.pivotIdentity!==void 0)throw new a(`Canonical pivot result column "${t.key}" carries pivot identity outside the physical pivot projection.`)})}function j(e){const o=ee(e.records),t=X(e.columns),n=Z(e.pivotResultContract,t),r=n.expectedRoleFieldIds.pivotby??[];if(e.pivotResultState==="loaded_empty"){if(o.length!==0)throw new a("A loaded_empty pivot result cannot carry records.");if(t.some(m=>n.columnKinds[m.key]==="pivot_metric"))throw new a("A loaded_empty pivot result cannot carry physical pivot columns.");$(n,t);const c=C(e.columnKeyMap);return E(c,n),{pivotResultState:"loaded_empty",records:[],columns:t,columnKeyMap:c,pivotResultContract:n}}if(e.pivotResultState!=="loaded_valid")throw new a("A canonical pivot result must declare loaded_empty or loaded_valid.");if(o.length===0)throw new a("A loaded_valid pivot result must carry at least one record.");const i=C(e.columnKeyMap);E(i,n),oe(i,t,n),$(n,t);const s=t.filter(c=>n.columnKinds[c.key]==="pivot_metric");if(r.length>0&&s.length===0)throw new a("A loaded_valid pivot result is missing its physical pivot columns.");try{k.requirePivotResultColumnIdentities(s,{expectedPivotFieldIds:r,columnClassifications:n.columnClassifications})}catch(c){throw c instanceof k.PivotResultIdentityError?new a(c.message,c):c}return te(o,t),{pivotResultState:"loaded_valid",records:o,columns:t,columnKeyMap:i,pivotResultContract:n}}function re(e){const o=new Set;["groupby","detail"].forEach(i=>{Object.values(e.columnKeyMap.byRole[i]??{}).forEach(s=>{o.add(s.outputKey||s.rawKey)})});const t=new Set(e.physicalPivotColumnKeys),n=new Set(e.columns.map(i=>i.key)),r={version:1,expectedRoleFieldIds:{groupby:Array.from(new Set(e.expectedRoleFieldIds.groupby??[])),metric:Array.from(new Set(e.expectedRoleFieldIds.metric??[])),pivotby:Array.from(new Set(e.expectedRoleFieldIds.pivotby??[])),detail:Array.from(new Set(e.expectedRoleFieldIds.detail??[]))},expectedMetricAliases:[...e.expectedMetricAliases??[]],columnKinds:Object.fromEntries(e.columns.map(i=>[i.key,o.has(i.key)?"row":t.has(i.key)?"pivot_metric":"value"])),columnClassifications:Object.fromEntries(Object.entries(e.columnMetadata??{}).filter(([i])=>n.has(i)))};return j({pivotResultState:e.records.length===0?"loaded_empty":"loaded_valid",pivotResultContract:r,records:e.records,columns:e.columns,columnKeyMap:e.columnKeyMap})}exports.MissingResolvedRawTemporalFormatError=J;exports.PivotResultLifecycleError=a;exports.PresentationExecutionSnapshotError=b;exports.createCanonicalPivotResultTransport=re;exports.createPresentationExecutionSnapshot=U;exports.deriveMetricInstanceAliasExpectations=S;exports.derivePivotResultContractExpectations=W;exports.findResolvedNumericFormat=V;exports.findResolvedRawTemporalFormat=G;exports.findResolvedTemporalBucketFormat=H;exports.parseCanonicalPivotResultTransport=j;exports.parsePresentationExecutionSnapshot=F;exports.parsePresentationScope=_;exports.parseResolvedPresentationEntries=K;exports.validateCardExportPresentationSnapshot=Q;
@@ -5,7 +5,7 @@ import { p as _, a as K } from "./raw-temporal-CUJ86xHI.js";
5
5
  import { b as j } from "./report-runtime-context-DWvUf1HT.js";
6
6
  import { i as f, p as F } from "./temporal-bucket-B9hMwemw.js";
7
7
  import { a6 as S } from "./validators-BDYzZFgs.js";
8
- import "./matrix-operation-contract-Cqy4EW2H.js";
8
+ import "./matrix-operation-contract-xL8IhFzp.js";
9
9
  import { a as M } from "./metric-comparison-C-sYqv0g.js";
10
10
  import { a as P } from "./temporal-bucket-contract-D5QlJbmm.js";
11
11
  import { b as T, P as O } from "./pivot-result-identity-BSudrDLN.js";
@@ -1,12 +1,12 @@
1
1
  import { jsxs as o, Fragment as j, jsx as t } from "react/jsx-runtime";
2
2
  import oe, { useState as S, useRef as X, useEffect as U, useCallback as E, useMemo as _ } from "react";
3
- import { ay as ee, az as ce, aA as B, aB as $, aC as de, g as ue, h as me, i as fe, j as he, k as M, l as H, aD as ve, aE as V, b as ye, aF as pe, aG as ge, aH as Se, aI as be, aJ as Te } from "./index-De2QNsqV.js";
4
- import { u as ae, c as F, O as W, P as we, a as Ce, B as D, b as ke, d as q, L as te, a4 as z, T as xe, F as Ne, G, I as J } from "./switch-DHGiC0aU.js";
3
+ import { ay as ee, az as ce, aA as B, aB as $, aC as de, g as ue, h as me, i as fe, j as he, k as M, l as H, aD as ve, aE as V, b as ye, aF as pe, aG as ge, aH as Se, aI as be, aJ as Te } from "./index-CL2lvhwk.js";
4
+ import { u as ae, c as F, O as W, P as we, a as Ce, B as D, b as ke, d as q, L as te, a4 as z, T as xe, F as Ne, G, I as J } from "./switch-CD4uGTZI.js";
5
5
  import { a as Pe } from "./report-runtime-context-DWvUf1HT.js";
6
6
  import "./x-CXDkqdur.js";
7
- import "./constants-NUleP4DY.js";
7
+ import "./card-config-utils-Bq1enstT.js";
8
8
  import "./validators-BDYzZFgs.js";
9
- import "./matrix-operation-contract-Cqy4EW2H.js";
9
+ import "./matrix-operation-contract-xL8IhFzp.js";
10
10
  import { parseValueFormatPreferencesResponse as Ae, canonicalizeSupportedLocale as Ee, canonicalizeSupportedCurrencyCode as ze } from "../value-format-preferences/index.js";
11
11
  function De(e = {}) {
12
12
  const { authToken: i, tokenProps: a } = ee(), d = ae(
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),o=require("react"),d=require("./index-DkEAikW8.cjs"),s=require("./switch-iC1x2dcE.cjs"),V=require("./report-runtime-context-DzvHBPxl.cjs");require("./x-B6ghREd2.cjs");require("./card-config-utils-CMO4_zVs.cjs");require("./validators-DVYAnnX0.cjs");require("./matrix-operation-contract-DoiWTUbT.cjs");const L=require("../value-format-preferences/index.cjs");function G(a={}){const{authToken:c,tokenProps:t}=d.useSemaphorContext(),m=s.useDashboardStore(p=>p.actions.applyResolvedCalendarPreferences),r=a.enabled??!0,i=(c==null?void 0:c.accessToken)??null,h=(t==null?void 0:t.apiServiceUrl)??null,[g,S]=o.useState(!1),[b,C]=o.useState(!1),[f,j]=o.useState(!1),[T,x]=o.useState(null),[w,P]=o.useState(null),v=o.useRef(i);v.current=i,o.useEffect(()=>{P(null),x(null),S(!1),C(!1),j(!1)},[i]);const N=o.useCallback(async p=>{const n=V.parseCalendarPreferencesResponse(await p.json());if(!n.ok)throw new Error("Calendar preferences response is invalid");return n.value},[]),k=o.useCallback(async()=>{if(!r||!i||!h)return;const p=i;S(!0),x(null);try{const n=await fetch(`${h}/v1/user-preferences/calendar`,{method:"GET",headers:{Authorization:`Bearer ${i}`}});if(!n.ok){const y=await n.json().catch(()=>({}));throw new Error(y.error||"Failed to fetch preferences")}const l=await N(n);v.current===p&&P(l)}catch(n){v.current===p&&x(n instanceof Error?n.message:"Unknown error")}finally{v.current===p&&S(!1)}},[i,h,r,N]);o.useEffect(()=>{r&&k()},[r,k]);const E=o.useCallback(async p=>{if(!i||!h)return x("Not authenticated"),!1;const n=i;C(!0),x(null);try{const l=await fetch(`${h}/v1/user-preferences/calendar`,{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:JSON.stringify(p)});if(!l.ok){const D=await l.json().catch(()=>({}));throw new Error(D.error||"Failed to update preferences")}const y=await N(l);return v.current!==n?!1:(P(y),m(y.resolved,y.sources),!0)}catch(l){return v.current===n&&x(l instanceof Error?l.message:"Unknown error"),!1}finally{v.current===n&&C(!1)}},[i,h,m,N]),A=o.useCallback(async()=>{if(!i||!h)return x("Not authenticated"),!1;const p=i;j(!0),x(null);try{const n=await fetch(`${h}/v1/user-preferences/calendar`,{method:"DELETE",headers:{Authorization:`Bearer ${i}`}});if(!n.ok){const y=await n.json().catch(()=>({}));throw new Error(y.error||"Failed to clear preferences")}const l=await N(n);return v.current!==p?!1:(P(l),m(l.resolved,l.sources),!0)}catch(n){return v.current===p&&x(n instanceof Error?n.message:"Unknown error"),!1}finally{v.current===p&&j(!1)}},[i,h,m,N]);return{preferences:w,isLoading:g,isSaving:b,isClearing:f,error:T,updatePreferences:E,clearPreferences:A,refetch:k}}const F=[{value:"America/New_York",label:"Eastern Time (US & Canada)"},{value:"America/Chicago",label:"Central Time (US & Canada)"},{value:"America/Denver",label:"Mountain Time (US & Canada)"},{value:"America/Los_Angeles",label:"Pacific Time (US & Canada)"},{value:"America/Phoenix",label:"Arizona"},{value:"America/Anchorage",label:"Alaska"},{value:"Pacific/Honolulu",label:"Hawaii"},{value:"Europe/London",label:"London"},{value:"Europe/Paris",label:"Paris, Berlin, Rome"},{value:"Asia/Tokyo",label:"Tokyo"},{value:"Asia/Shanghai",label:"Beijing, Shanghai"},{value:"Asia/Kolkata",label:"Mumbai, New Delhi"},{value:"Australia/Sydney",label:"Sydney"},{value:"UTC",label:"UTC"}],B=[{value:0,label:"Sunday"},{value:1,label:"Monday"},{value:6,label:"Saturday"}],R="text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";function W(){try{const a=Intl;if(a.supportedValuesOf)return a.supportedValuesOf("timeZone")}catch{}return F.map(a=>a.value)}function H(a){if(!a)return"default";if(a.tz!==a.weekStart)return"inherited";switch(a.tz){case"viewer_tenant":return"tenant";case"viewer_organization":return"organization";case"system_default":return"system";case"session_initial":return"embedded";default:return"default"}}function U(a){const c=F.find(t=>t.value===a);return c?c.label:a}function K(a){const c=B.find(t=>t.value===a);return c?c.label:String(a)}function J({active:a,onClose:c}){const{preferences:t,isLoading:m,isSaving:r,isClearing:i,updatePreferences:h,clearPreferences:g}=G({enabled:a}),S=d.useCalendarContext(),b=(t==null?void 0:t.resolved.tz)||(S==null?void 0:S.tz)||"UTC",C=(t==null?void 0:t.resolved.weekStart)??(S==null?void 0:S.weekStart)??1,[f,j]=o.useState((t==null?void 0:t.stored)===null),[T,x]=o.useState(!1),[w,P]=o.useState(b),[v,N]=o.useState(C),[k,E]=o.useState(!1),A=o.useMemo(()=>W(),[]),p=o.useMemo(()=>A.filter(u=>!F.some(M=>M.value===u)),[A]),n=o.useMemo(()=>U(w),[w]),l=t!=null&&t.inherited?U(t.inherited.tz):"UTC",y=t!=null&&t.inherited?K(t.inherited.weekStart):"Monday",D=H(t==null?void 0:t.inheritedSources);o.useEffect(()=>{if(!a){x(!1);return}T||(t&&j(t.stored===null),P(b),N(C))},[a,T,t,b,C]);const O=async()=>{if(m){s.ue.error("Preferences are still loading. Please try again.");return}f?await g()?(s.ue.success("Now using default settings."),c()):s.ue.error("Failed to save preferences. Please try again."):await h({tz:w,weekStart:v})?(s.ue.success("Preferences saved."),c()):s.ue.error("Failed to save preferences. Please try again.")},_=()=>{c()},z=r||i,$=z||m;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-4 py-1",children:[e.jsxs(d.RadioGroup,{value:f?"defaults":"custom",onValueChange:u=>{x(!0),j(u==="defaults")},className:"space-y-0.5",children:[e.jsxs("label",{htmlFor:"mode-defaults",className:s.cn("flex cursor-pointer items-start gap-2 rounded-control px-2 py-1.5 hover:bg-muted/50",f&&"bg-muted/50"),onClick:()=>{x(!0),j(!0)},children:[e.jsx(d.RadioGroupItem,{value:"defaults",id:"mode-defaults",className:"mt-0.5"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("p",{className:"text-[13px] font-medium text-foreground",children:["Use ",D," defaults"]}),e.jsxs("p",{className:"text-[12px] text-muted-foreground",children:[l,", week starts ",y]})]})]}),e.jsxs("label",{htmlFor:"mode-custom",className:s.cn("flex cursor-pointer items-start gap-2 rounded-control px-2 py-1.5 hover:bg-muted/50",!f&&"bg-muted/50"),onClick:()=>{x(!0),j(!1)},children:[e.jsx(d.RadioGroupItem,{value:"custom",id:"mode-custom",className:"mt-0.5"}),e.jsx("p",{className:"flex-1 text-[13px] font-medium text-foreground",children:"Use custom settings"})]})]}),e.jsxs("div",{className:s.cn("space-y-4 border-t border-border/60 pt-4 transition-opacity",f&&"pointer-events-none opacity-50"),children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(s.Label,{className:R,children:"Timezone"}),e.jsxs(s.Popover,{open:k,onOpenChange:E,modal:!0,children:[e.jsx(s.PopoverTrigger,{asChild:!0,children:e.jsxs(s.Button,{variant:"outline",size:"xs",role:"combobox","aria-expanded":k,className:"w-full justify-between text-[12px] font-normal",disabled:f,children:[e.jsx("span",{className:"truncate",children:n}),e.jsx(d.ChevronsUpDown,{className:"ml-2 h-3.5 w-3.5 shrink-0 opacity-50"})]})}),e.jsx(s.PopoverContent,{className:"z-50 w-[--radix-popover-trigger-width] p-0",align:"start",children:e.jsxs(d.Command,{className:"overflow-visible",children:[e.jsx(d.CommandInput,{placeholder:"Search timezones…"}),e.jsxs(d.CommandList,{children:[e.jsx(d.CommandEmpty,{children:"No timezone found."}),e.jsx(d.CommandGroup,{heading:"Common",children:F.map(u=>e.jsxs(d.CommandItem,{value:`${u.value} ${u.label}`,onSelect:()=>{x(!0),P(u.value),E(!1)},children:[e.jsx(s.Check,{className:s.cn("h-3.5 w-3.5",w===u.value?"opacity-100":"opacity-0")}),e.jsx("span",{className:"flex-1",children:u.label}),e.jsx("span",{className:"text-[11px] text-muted-foreground",children:u.value})]},u.value))}),e.jsx(d.CommandSeparator,{}),e.jsx(d.CommandGroup,{heading:"All timezones",children:p.map(u=>e.jsxs(d.CommandItem,{value:u,onSelect:()=>{x(!0),P(u),E(!1)},children:[e.jsx(s.Check,{className:s.cn("h-3.5 w-3.5",w===u?"opacity-100":"opacity-0")}),u]},u))})]})]})})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(s.Label,{className:R,children:"Week starts on"}),e.jsx(d.RadioGroup,{value:String(v),onValueChange:u=>{x(!0),N(Number(u))},className:"flex gap-4",disabled:f,children:B.map(u=>e.jsxs("label",{htmlFor:`week-start-${u.value}`,className:s.cn("flex cursor-pointer items-center gap-2 text-[13px]",f&&"cursor-not-allowed"),children:[e.jsx(d.RadioGroupItem,{value:String(u.value),id:`week-start-${u.value}`,disabled:f}),u.label]},u.value))})]})]})]}),e.jsxs(d.DialogFooter,{children:[e.jsx(s.Button,{variant:"outline",size:"xs",onClick:_,disabled:z,children:"Cancel"}),e.jsx(s.Button,{size:"xs",onClick:O,disabled:$,children:z?e.jsxs(e.Fragment,{children:[e.jsx(s.LoaderCircle,{className:"h-3.5 w-3.5 animate-spin"}),"Saving…"]}):"Save"})]})]})}function Y(a={}){const{authToken:c,tokenProps:t}=d.useSemaphorContext(),m=s.useDashboardStore(n=>n.actions.applyResolvedValueFormatPreferences),r=a.enabled??!0,i=(c==null?void 0:c.accessToken)??null,h=(t==null?void 0:t.apiServiceUrl)??null,g=o.useRef(i);g.current=i;const[S,b]=o.useState(null),[C,f]=o.useState(!1),[j,T]=o.useState(!1),[x,w]=o.useState(!1),[P,v]=o.useState(null);o.useEffect(()=>{b(null),v(null),f(!1),T(!1),w(!1)},[i]);const N=o.useCallback(async n=>{const l=L.parseValueFormatPreferencesResponse(await n.json());if(!l.ok)throw new Error("Value format preferences response is invalid");return l.value},[]),k=o.useCallback(async(n,l)=>{if(!i||!h)throw new Error("Not authenticated");const y=await fetch(`${h}/v1/user-preferences/value-format`,{method:n,headers:{Authorization:`Bearer ${i}`,...l?{"Content-Type":"application/json"}:{}},body:l?JSON.stringify(l):void 0});if(!y.ok){const D=await y.json().catch(()=>({}));throw new Error(D.error||"Failed to update preferences")}return N(y)},[i,h,N]),E=o.useCallback(async()=>{if(!r||!i||!h)return;const n=i;f(!0),v(null);try{const l=await k("GET");g.current===n&&b(l)}catch(l){g.current===n&&v(l instanceof Error?l.message:"Unknown error")}finally{g.current===n&&f(!1)}},[i,h,r,k]);o.useEffect(()=>{r&&E()},[r,E]);const A=o.useCallback(async n=>{const l=i;T(!0),v(null);try{const y=await k("PATCH",n);return g.current!==l?!1:(b(y),m(y.resolved,y.sources),!0)}catch(y){return g.current===l&&v(y instanceof Error?y.message:"Unknown error"),!1}finally{g.current===l&&T(!1)}},[i,m,k]),p=o.useCallback(async()=>{const n=i;w(!0),v(null);try{const l=await k("DELETE");return g.current!==n?!1:(b(l),m(l.resolved,l.sources),!0)}catch(l){return g.current===n&&v(l instanceof Error?l.message:"Unknown error"),!1}finally{g.current===n&&w(!1)}},[i,m,k]);return{preferences:S,isLoading:C,isSaving:j,isClearing:x,error:P,updatePreferences:A,clearPreferences:p,refetch:E}}const I=["locale","dateStyle","dateTime.dateStyle","dateTime.timeStyle","defaultCurrency"];function q(a,c){var t,m;switch(c){case"locale":return a==null?void 0:a.locale;case"dateStyle":return a==null?void 0:a.dateStyle;case"dateTime.dateStyle":return(t=a==null?void 0:a.dateTime)==null?void 0:t.dateStyle;case"dateTime.timeStyle":return(m=a==null?void 0:a.dateTime)==null?void 0:m.timeStyle;case"defaultCurrency":return a==null?void 0:a.defaultCurrency}}function Z(a){var m,r;const c=(m=a==null?void 0:a.dateTime)==null?void 0:m.dateStyle,t=(r=a==null?void 0:a.dateTime)==null?void 0:r.timeStyle;return{locale:a==null?void 0:a.locale,dateStyle:a==null?void 0:a.dateStyle,dateTime:c===void 0&&t===void 0?void 0:{dateStyle:c,timeStyle:t},defaultCurrency:a==null?void 0:a.defaultCurrency}}function Q({active:a,onClose:c}){var g,S,b,C,f,j,T;const{preferences:t,isLoading:m,isSaving:r,updatePreferences:i}=Y({enabled:a});if(!a)return null;if(!t)return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"py-2",children:e.jsx("div",{className:"flex min-h-36 items-center justify-center text-[12px] text-muted-foreground",children:m?"Loading preferences…":"Preferences unavailable."})}),e.jsxs(d.DialogFooter,{className:"justify-between sm:justify-between",children:[e.jsx(s.Button,{variant:"ghost",size:"xs",disabled:!0,children:"Reset display formats"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(s.Button,{variant:"outline",size:"xs",onClick:c,children:"Cancel"}),e.jsx(s.Button,{size:"xs",disabled:!0,children:"Save"})]})]})]});const h=[((g=t.stored)==null?void 0:g.locale)??"",((S=t.stored)==null?void 0:S.dateStyle)??"",((C=(b=t.stored)==null?void 0:b.dateTime)==null?void 0:C.dateStyle)??"",((j=(f=t.stored)==null?void 0:f.dateTime)==null?void 0:j.timeStyle)??"",((T=t.stored)==null?void 0:T.defaultCurrency)??""].join(":");return e.jsx(X,{preferences:t,isSaving:r,updatePreferences:i,onClose:c},h)}function X({preferences:a,isSaving:c,updatePreferences:t,onClose:m}){var b,C;const[r,i]=o.useState(()=>Z(a.stored)),h=(r.locale===void 0||L.canonicalizeSupportedLocale(r.locale)!==void 0)&&(r.defaultCurrency===void 0||L.canonicalizeSupportedCurrencyCode(r.defaultCurrency)!==void 0)&&(r.dateStyle===void 0||["short","medium","long"].includes(r.dateStyle))&&(((b=r.dateTime)==null?void 0:b.dateStyle)===void 0||["short","medium","long"].includes(r.dateTime.dateStyle))&&(((C=r.dateTime)==null?void 0:C.timeStyle)===void 0||["short","medium","long"].includes(r.dateTime.timeStyle)),g=async()=>{const f={...r.locale!==void 0?{locale:r.locale}:{},...r.dateStyle!==void 0?{dateStyle:r.dateStyle}:{},...r.dateTime?{dateTime:{...r.dateTime}}:{},...r.defaultCurrency!==void 0?{defaultCurrency:r.defaultCurrency}:{}},j=I.filter(w=>q(r,w)===void 0&&q(a.stored,w)!==void 0),T={...Object.keys(f).length>0?{set:f}:{},...j.length>0?{clear:j}:{}};(Object.keys(T).length===0?!0:await t(T))?(s.ue.success("Display format preferences saved."),m()):s.ue.error("Failed to save preferences. Please try again.")},S=async()=>{await t({clear:[...I]})?(s.ue.success("Display format preferences reset."),m()):s.ue.error("Failed to reset display format preferences. Please try again.")};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"py-2",children:e.jsx(d.DisplayFormatPreferencesFields,{value:r,inherited:a.inherited,inheritedSources:a.inheritedSources,onChange:i,disabled:c})}),e.jsxs(d.DialogFooter,{className:"justify-between sm:justify-between",children:[e.jsx(s.Button,{variant:"ghost",size:"xs",onClick:S,disabled:c||a.stored===null,children:"Reset display formats"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(s.Button,{variant:"outline",size:"xs",onClick:m,disabled:c,children:"Cancel"}),e.jsx(s.Button,{size:"xs",onClick:g,disabled:c||!h,children:c?e.jsxs(e.Fragment,{children:[e.jsx(s.LoaderCircle,{className:"h-3.5 w-3.5 animate-spin"}),"Saving…"]}):"Save"})]})]})]})}function ee({open:a,onOpenChange:c}){const[t,m]=o.useState("display"),r=()=>c(!1);return e.jsx(d.Dialog,{open:a,onOpenChange:c,children:e.jsxs(d.DialogContent,{className:"rounded-control border-border/60 sm:max-w-[440px] sm:rounded-control",children:[e.jsxs(d.DialogHeader,{children:[e.jsx(d.DialogTitle,{className:"text-[15px]",children:"Report preferences"}),e.jsx(d.DialogDescription,{className:"text-[13px] leading-5",children:"Set how values and Calendar periods appear for you."})]}),e.jsxs(s.Tabs,{value:t,onValueChange:m,children:[e.jsxs(s.TabsList,{variant:"underline",className:"w-full justify-start",children:[e.jsx(s.TabsTrigger,{value:"display",children:"Display formats"}),e.jsx(s.TabsTrigger,{value:"calendar",children:"Calendar"})]}),e.jsx(s.TabsContent,{value:"display",children:e.jsx(Q,{active:a&&t==="display",onClose:r})}),e.jsx(s.TabsContent,{value:"calendar",children:e.jsx(J,{active:a&&t==="calendar",onClose:r})})]})]})})}exports.ReportPreferencesDialog=ee;
@@ -1,11 +1,12 @@
1
- import { c as e } from "./x-CXDkqdur.js";
1
+ import { c as r } from "./x-CXDkqdur.js";
2
+ import { B as h, t as f } from "./matrix-operation-contract-xL8IhFzp.js";
2
3
  /**
3
4
  * @license lucide-react v0.453.0 - ISC
4
5
  *
5
6
  * This source code is licensed under the ISC license.
6
7
  * See the LICENSE file in the root directory of this source tree.
7
8
  */
8
- const y = e("ChevronRight", [
9
+ const g = r("ChevronRight", [
9
10
  ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
10
11
  ]);
11
12
  /**
@@ -14,7 +15,7 @@ const y = e("ChevronRight", [
14
15
  * This source code is licensed under the ISC license.
15
16
  * See the LICENSE file in the root directory of this source tree.
16
17
  */
17
- const n = e("Eye", [
18
+ const z = r("Eye", [
18
19
  [
19
20
  "path",
20
21
  {
@@ -30,7 +31,7 @@ const n = e("Eye", [
30
31
  * This source code is licensed under the ISC license.
31
32
  * See the LICENSE file in the root directory of this source tree.
32
33
  */
33
- const a = e("Maximize2", [
34
+ const I = r("Maximize2", [
34
35
  ["polyline", { points: "15 3 21 3 21 9", key: "mznyad" }],
35
36
  ["polyline", { points: "9 21 3 21 3 15", key: "1avn1i" }],
36
37
  ["line", { x1: "21", x2: "14", y1: "3", y2: "10", key: "ota7mn" }],
@@ -42,7 +43,7 @@ const a = e("Maximize2", [
42
43
  * This source code is licensed under the ISC license.
43
44
  * See the LICENSE file in the root directory of this source tree.
44
45
  */
45
- const c = e("Minimize2", [
46
+ const E = r("Minimize2", [
46
47
  ["polyline", { points: "4 14 10 14 10 20", key: "11kfnr" }],
47
48
  ["polyline", { points: "20 10 14 10 14 4", key: "rlmsce" }],
48
49
  ["line", { x1: "14", x2: "21", y1: "10", y2: "3", key: "o5lafz" }],
@@ -54,14 +55,57 @@ const c = e("Minimize2", [
54
55
  * This source code is licensed under the ISC license.
55
56
  * See the LICENSE file in the root directory of this source tree.
56
57
  */
57
- const o = e("Search", [
58
+ const K = r("Search", [
58
59
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
59
60
  ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
60
61
  ]);
62
+ function m(e, l, t) {
63
+ return e.length === 1 && t(e[0]) === t(l) ? { tuples: [], outcome: "cleared" } : { tuples: [l], outcome: "selected" };
64
+ }
65
+ function k(e, l) {
66
+ const t = /* @__PURE__ */ new Set();
67
+ return e.filter((c) => {
68
+ const i = l(c);
69
+ return t.has(i) ? !1 : (t.add(i), !0);
70
+ });
71
+ }
72
+ function C(e, l, t, c) {
73
+ const i = c.limit ?? f, n = c.tupleKey ?? h;
74
+ if (t.kind === "clear") return { tuples: [], outcome: "cleared" };
75
+ if (t.kind === "replace" || !c.multipleSelection)
76
+ return m(e, l, n);
77
+ if (t.kind === "toggle") {
78
+ const u = e.findIndex(
79
+ (o) => n(o) === n(l)
80
+ );
81
+ if (u >= 0) {
82
+ const o = e.filter((x, p) => p !== u);
83
+ return { tuples: o, outcome: o.length ? "removed" : "cleared" };
84
+ }
85
+ return e.length >= i ? { tuples: e, outcome: "limitReached" } : { tuples: [...e, l], outcome: "added" };
86
+ }
87
+ const d = (u) => t.ordered.findIndex(
88
+ (o) => n(o) === n(u)
89
+ ), a = d(t.anchor), s = d(l);
90
+ if (a < 0 || s < 0) return m(e, l, n);
91
+ const y = k(
92
+ t.ordered.slice(Math.min(a, s), Math.max(a, s) + 1),
93
+ n
94
+ );
95
+ return y.length <= i ? { tuples: y, outcome: "rangeSelected" } : {
96
+ tuples: a <= s ? y.slice(0, i) : y.slice(-i),
97
+ outcome: "limitReached"
98
+ };
99
+ }
100
+ function R(e, l, t) {
101
+ return t.multipleSelection ? e.metaKey || e.ctrlKey ? "toggle" : e.shiftKey ? l === "table" && t.hasAnchor ? "range" : "toggle" : e.pointerType === "touch" && t.checkboxesShown ? "toggle" : "replace" : "replace";
102
+ }
61
103
  export {
62
- y as C,
63
- n as E,
64
- c as M,
65
- o as S,
66
- a
104
+ g as C,
105
+ z as E,
106
+ E as M,
107
+ K as S,
108
+ I as a,
109
+ R as g,
110
+ C as r
67
111
  };
@@ -0,0 +1,26 @@
1
+ "use strict";const l=require("./x-B6ghREd2.cjs"),h=require("./matrix-operation-contract-DoiWTUbT.cjs");/**
2
+ * @license lucide-react v0.453.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const f=l.createLucideIcon("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
7
+ * @license lucide-react v0.453.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const x=l.createLucideIcon("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
12
+ * @license lucide-react v0.453.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const k=l.createLucideIcon("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
17
+ * @license lucide-react v0.453.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const S=l.createLucideIcon("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
22
+ * @license lucide-react v0.453.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const I=l.createLucideIcon("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);function m(e,i,t){return e.length===1&&t(e[0])===t(i)?{tuples:[],outcome:"cleared"}:{tuples:[i],outcome:"selected"}}function M(e,i){const t=new Set;return e.filter(o=>{const c=i(o);return t.has(c)?!1:(t.add(c),!0)})}function g(e,i,t,o){const c=o.limit??h.SELECTION_LIMIT,n=o.tupleKey??h.selectionTupleKey;if(t.kind==="clear")return{tuples:[],outcome:"cleared"};if(t.kind==="replace"||!o.multipleSelection)return m(e,i,n);if(t.kind==="toggle"){const d=e.findIndex(r=>n(r)===n(i));if(d>=0){const r=e.filter((L,p)=>p!==d);return{tuples:r,outcome:r.length?"removed":"cleared"}}return e.length>=c?{tuples:e,outcome:"limitReached"}:{tuples:[...e,i],outcome:"added"}}const y=d=>t.ordered.findIndex(r=>n(r)===n(d)),a=y(t.anchor),u=y(i);if(a<0||u<0)return m(e,i,n);const s=M(t.ordered.slice(Math.min(a,u),Math.max(a,u)+1),n);return s.length<=c?{tuples:s,outcome:"rangeSelected"}:{tuples:a<=u?s.slice(0,c):s.slice(-c),outcome:"limitReached"}}function z(e,i,t){return t.multipleSelection?e.metaKey||e.ctrlKey?"toggle":e.shiftKey?i==="table"&&t.hasAnchor?"range":"toggle":e.pointerType==="touch"&&t.checkboxesShown?"toggle":"replace":"replace"}exports.ChevronRight=f;exports.Eye=x;exports.Maximize2=k;exports.Minimize2=S;exports.Search=I;exports.gestureFromPointer=z;exports.reduceSelection=g;
@@ -1 +1 @@
1
- "use strict";const H=require("./constants-B00YUv89.cjs"),F=require("./index-F25jnH0p.cjs"),ue=require("./validators-DVYAnnX0.cjs");require("./matrix-operation-contract-D9dLX-Wr.cjs");function _(e){if(!e||typeof e!="object")return!1;const t=e.type;return t==="number"||t==="currency"||t==="percent"||t==="scientific"}function h(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function b(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}let de={};function p(){return de}function v(e,t){var c,u,d,m;const n=p(),r=(t==null?void 0:t.weekStartsOn)??((u=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((m=(d=n.locale)==null?void 0:d.options)==null?void 0:m.weekStartsOn)??0,a=h(e),i=a.getDay(),o=(i<r?7:0)+i-r;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function W(e){return v(e,{weekStartsOn:1})}function ne(e){const t=h(e),n=t.getFullYear(),r=b(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const a=W(r),i=b(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const o=W(i);return t.getTime()>=a.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function R(e){const t=h(e);return t.setHours(0,0,0,0),t}function q(e){const t=h(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function fe(e,t){const n=R(e),r=R(t),a=+n-q(n),i=+r-q(r);return Math.round((a-i)/H.millisecondsInDay)}function me(e){const t=ne(e),n=b(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),W(n)}function le(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function he(e){if(!le(e)&&typeof e!="number")return!1;const t=h(e);return!isNaN(Number(t))}function ge(e){const t=h(e),n=b(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const ye={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},we=(e,t,n)=>{let r;const a=ye[e];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function E(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const be={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},xe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Oe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Me={date:E({formats:be,defaultWidth:"full"}),time:E({formats:xe,defaultWidth:"full"}),dateTime:E({formats:Oe,defaultWidth:"full"})},pe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},De=(e,t,n,r)=>pe[e];function T(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,c=n!=null&&n.width?String(n.width):o;a=e.formattingValues[c]||e.formattingValues[o]}else{const o=e.defaultWidth,c=n!=null&&n.width?String(n.width):e.defaultWidth;a=e.values[c]||e.values[o]}const i=e.argumentCallback?e.argumentCallback(t):t;return a[i]}}const Pe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Te={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Se={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ve={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ke={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Fe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},We=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Ye={ordinalNumber:We,era:T({values:Pe,defaultWidth:"wide"}),quarter:T({values:Te,defaultWidth:"wide",argumentCallback:e=>e-1}),month:T({values:Se,defaultWidth:"wide"}),day:T({values:ve,defaultWidth:"wide"}),dayPeriod:T({values:ke,defaultWidth:"wide",formattingValues:Fe,defaultFormattingWidth:"wide"})};function S(e){return(t,n={})=>{const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;const o=i[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(c)?Ee(c,g=>g.test(o)):Ce(c,g=>g.test(o));let d;d=e.valueCallback?e.valueCallback(u):u,d=n.valueCallback?n.valueCallback(d):d;const m=t.slice(o.length);return{value:d,rest:m}}}function Ce(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Ee(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Ne(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const a=r[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const c=t.slice(a.length);return{value:o,rest:c}}}const ze=/^(\d+)(th|st|nd|rd)?/i,qe=/\d+/i,Xe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Le={any:[/^b/i,/^(a|c)/i]},Ue={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},He={any:[/1/i,/2/i,/3/i,/4/i]},_e={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Ie={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},je={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ge={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Qe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Re={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Ae={ordinalNumber:Ne({matchPattern:ze,parsePattern:qe,valueCallback:e=>parseInt(e,10)}),era:S({matchPatterns:Xe,defaultMatchWidth:"wide",parsePatterns:Le,defaultParseWidth:"any"}),quarter:S({matchPatterns:Ue,defaultMatchWidth:"wide",parsePatterns:He,defaultParseWidth:"any",valueCallback:e=>e+1}),month:S({matchPatterns:_e,defaultMatchWidth:"wide",parsePatterns:Ie,defaultParseWidth:"any"}),day:S({matchPatterns:je,defaultMatchWidth:"wide",parsePatterns:Ge,defaultParseWidth:"any"}),dayPeriod:S({matchPatterns:Qe,defaultMatchWidth:"any",parsePatterns:Re,defaultParseWidth:"any"})},re={code:"en-US",formatDistance:we,formatLong:Me,formatRelative:De,localize:Ye,match:Ae,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Be(e){const t=h(e);return fe(t,ge(t))+1}function Ve(e){const t=h(e),n=+W(t)-+me(t);return Math.round(n/H.millisecondsInWeek)+1}function ae(e,t){var m,g,D,P;const n=h(e),r=n.getFullYear(),a=p(),i=(t==null?void 0:t.firstWeekContainsDate)??((g=(m=t==null?void 0:t.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??a.firstWeekContainsDate??((P=(D=a.locale)==null?void 0:D.options)==null?void 0:P.firstWeekContainsDate)??1,o=b(e,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const c=v(o,t),u=b(e,0);u.setFullYear(r,0,i),u.setHours(0,0,0,0);const d=v(u,t);return n.getTime()>=c.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function Ze(e,t){var c,u,d,m;const n=p(),r=(t==null?void 0:t.firstWeekContainsDate)??((u=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??n.firstWeekContainsDate??((m=(d=n.locale)==null?void 0:d.options)==null?void 0:m.firstWeekContainsDate)??1,a=ae(e,t),i=b(e,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),v(i,t)}function $e(e,t){const n=h(e),r=+v(n,t)-+Ze(n,t);return Math.round(r/H.millisecondsInWeek)+1}function s(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const y={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return s(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):s(n+1,2)},d(e,t){return s(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return s(e.getHours()%12||12,t.length)},H(e,t){return s(e.getHours(),t.length)},m(e,t){return s(e.getMinutes(),t.length)},s(e,t){return s(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return s(a,t.length)}},O={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},A={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return y.y(e,t)},Y:function(e,t,n,r){const a=ae(e,r),i=a>0?a:1-a;if(t==="YY"){const o=i%100;return s(o,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):s(i,t.length)},R:function(e,t){const n=ne(e);return s(n,t.length)},u:function(e,t){const n=e.getFullYear();return s(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return s(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return s(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return y.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return s(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const a=$e(e,r);return t==="wo"?n.ordinalNumber(a,{unit:"week"}):s(a,t.length)},I:function(e,t,n){const r=Ve(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):s(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):y.d(e,t)},D:function(e,t,n){const r=Be(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):s(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return s(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return s(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return s(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let a;switch(r===12?a=O.noon:r===0?a=O.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let a;switch(r>=17?a=O.evening:r>=12?a=O.afternoon:r>=4?a=O.morning:a=O.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return y.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):y.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):s(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):s(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):y.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):y.s(e,t)},S:function(e,t){return y.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return V(r);case"XXXX":case"XX":return x(r);case"XXXXX":case"XXX":default:return x(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return V(r);case"xxxx":case"xx":return x(r);case"xxxxx":case"xxx":default:return x(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+B(r,":");case"OOOO":default:return"GMT"+x(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+B(r,":");case"zzzz":default:return"GMT"+x(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return s(r,t.length)},T:function(e,t,n){const r=e.getTime();return s(r,t.length)}};function B(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+t+s(i,2)}function V(e,t){return e%60===0?(e>0?"-":"+")+s(Math.abs(e)/60,2):x(e,t)}function x(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=s(Math.trunc(r/60),2),i=s(r%60,2);return n+a+t+i}const Z=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},ie=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Je=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return Z(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Z(r,t)).replace("{{time}}",ie(a,t))},Ke={p:ie,P:Je},et=/^D+$/,tt=/^Y+$/,nt=["D","DD","YY","YYYY"];function rt(e){return et.test(e)}function at(e){return tt.test(e)}function it(e,t,n){const r=ot(e,t,n);if(console.warn(r),nt.includes(e))throw new RangeError(r)}function ot(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const ct=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,st=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ut=/^'([^]*?)'?$/,dt=/''/g,ft=/[a-zA-Z]/;function oe(e,t,n){var m,g,D,P,I,j,G,Q;const r=p(),a=(n==null?void 0:n.locale)??r.locale??re,i=(n==null?void 0:n.firstWeekContainsDate)??((g=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??r.firstWeekContainsDate??((P=(D=r.locale)==null?void 0:D.options)==null?void 0:P.firstWeekContainsDate)??1,o=(n==null?void 0:n.weekStartsOn)??((j=(I=n==null?void 0:n.locale)==null?void 0:I.options)==null?void 0:j.weekStartsOn)??r.weekStartsOn??((Q=(G=r.locale)==null?void 0:G.options)==null?void 0:Q.weekStartsOn)??0,c=h(e);if(!he(c))throw new RangeError("Invalid time value");let u=t.match(st).map(l=>{const f=l[0];if(f==="p"||f==="P"){const C=Ke[f];return C(l,a.formatLong)}return l}).join("").match(ct).map(l=>{if(l==="''")return{isToken:!1,value:"'"};const f=l[0];if(f==="'")return{isToken:!1,value:mt(l)};if(A[f])return{isToken:!0,value:l};if(f.match(ft))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:l}});a.localize.preprocessor&&(u=a.localize.preprocessor(c,u));const d={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return u.map(l=>{if(!l.isToken)return l.value;const f=l.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&at(f)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&rt(f))&&it(f,t,String(e));const C=A[f[0]];return C(c,f,a.localize,d)}).join("")}function mt(e){const t=e.match(ut);return t?t[1].replace(dt,"'"):e}function lt(){return Object.assign({},p())}function $(e,t,n){const r=lt(),a=yt(e,n.timeZone,n.locale??r.locale);return"formatToParts"in a?ht(a,t):gt(a,t)}function ht(e,t){const n=e.formatToParts(t);for(let r=n.length-1;r>=0;--r)if(n[r].type==="timeZoneName")return n[r].value}function gt(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}function yt(e,t,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}const wt=60*1e3,bt={X:function(e,t,n){const r=N(n.timeZone,e);if(r===0)return"Z";switch(t){case"X":return J(r);case"XXXX":case"XX":return M(r);case"XXXXX":case"XXX":default:return M(r,":")}},x:function(e,t,n){const r=N(n.timeZone,e);switch(t){case"x":return J(r);case"xxxx":case"xx":return M(r);case"xxxxx":case"xxx":default:return M(r,":")}},O:function(e,t,n){const r=N(n.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+xt(r,":");case"OOOO":default:return"GMT"+M(r,":")}},z:function(e,t,n){switch(t){case"z":case"zz":case"zzz":return $("short",e,n);case"zzzz":default:return $("long",e,n)}}};function N(e,t){const n=e?F.tzParseTimezone(e,t,!0)/wt:(t==null?void 0:t.getTimezoneOffset())??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function Y(e,t){const n=e<0?"-":"";let r=Math.abs(e).toString();for(;r.length<t;)r="0"+r;return n+r}function M(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Y(Math.floor(r/60),2),i=Y(Math.floor(r%60),2);return n+a+t+i}function J(e,t){return e%60===0?(e>0?"-":"+")+Y(Math.abs(e)/60,2):M(e,t)}function xt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Math.floor(r/60),i=r%60;return i===0?n+String(a):n+String(a)+t+Y(i,2)}const Ot=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function Mt(e,t,n={}){t=String(t);const r=t.match(Ot);if(r){const a=F.toDate(n.originalDate||e,n);t=r.reduce(function(i,o){if(o[0]==="'")return i;const c=i.indexOf(o),u=i[c-1]==="'",d=i.replace(o,"'"+bt[o[0]](a,o,n)+"'");return u?d.substring(0,c-1)+d.substring(c+1):d},t)}return oe(e,t,n)}function ce(e,t,n){e=F.toDate(e,n);const r=F.tzParseTimezone(t,e,!0),a=new Date(e.getTime()-r),i=new Date(0);return i.setFullYear(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),i.setHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()),i}function pt(e,t,n,r){return r={...r,timeZone:t,originalDate:e},Mt(ce(e,t,{timeZone:r.timeZone}),n,r)}const se="en-US",K=["compact","maximumFractionDigits","minimumFractionDigits","negativeStyle","type","useGrouping"];function Dt(e){if(e.type!=="currency"||Object.prototype.hasOwnProperty.call(e,"currency")||Object.prototype.hasOwnProperty.call(e,"locale"))return!1;const t=Object.keys(e).sort();return t.length===K.length&&K.every((n,r)=>t[r]===n)&&typeof e.minimumFractionDigits=="number"&&typeof e.maximumFractionDigits=="number"&&e.useGrouping===!0&&e.negativeStyle==="minus"&&typeof e.compact=="boolean"}function X(e){if(typeof e!="string")return;const t=e.trim();if(!(!t||t.toLowerCase()==="none"))return t}function k(e){if(!(typeof e!="number"||!Number.isFinite(e)))return Math.max(0,Math.min(10,Math.trunc(e)))}function Pt(e){return e==="currency"?2:e==="percent"?1:e==="scientific"?2:0}function Tt(e,t,n){const r=k(t.minimumFractionDigits),a=k(t.maximumFractionDigits);if(typeof r=="number"||typeof a=="number"){const c=r??0,u=a??Math.max(c,2);return{minimumFractionDigits:Math.min(c,u),maximumFractionDigits:Math.max(c,u)}}const i=k(t.decimals);if(typeof i=="number")return{minimumFractionDigits:i,maximumFractionDigits:i};if(n!=null&&n.preserveOmittedProperties)return{};const o=Pt(e);return{minimumFractionDigits:o,maximumFractionDigits:o}}function St(e,t){if(!(typeof t!="string"||e==="percent"&&t==="%"))return t}function ee(e){const t=X(e.locale),n=X(e.currency),r=St(e.type,e.suffix);return{...e,...t!==e.locale?{locale:t}:{},...n!==e.currency?{currency:n}:{},...r!==e.suffix?{suffix:r}:{}}}function w(e,t,n){const r={...t,type:e};if((n==null?void 0:n.numericInput)==="canonical"&&_(r))return ee(r);const a=Tt(e,t,n),i=typeof t.prefix=="string"?t.prefix:void 0,o={type:e,locale:t.locale,minimumFractionDigits:a.minimumFractionDigits,maximumFractionDigits:a.maximumFractionDigits,useGrouping:typeof t.useGrouping=="boolean"?t.useGrouping:typeof t.thousandsSeparator=="boolean"?t.thousandsSeparator:!0,prefix:i,suffix:t.suffix,negativeStyle:t.negativeStyle||"minus",compact:!!t.compact,scale:typeof t.scale=="number"?t.scale:void 0};return e==="currency"&&t.currency&&(o.currency=t.currency),e==="percent"&&(o.percentValueMode=t.percentValueMode||"fraction"),ee(o)}function L(e){return{type:"date",locale:e.locale||se,pattern:e.pattern,relative:!!e.relative,timezone:e.timezone,sourceTimezone:e.sourceTimezone,prefix:e.prefix,suffix:e.suffix}}function z(e){return e==="millisecond"||e==="second"||e==="minute"||e==="hour"||e==="day"}function U(e){const t=k(e.maxUnits);return{type:"duration",inputUnit:z(e.inputUnit)?e.inputUnit:"second",outputStyle:e.outputStyle==="digital"||e.outputStyle==="long"?e.outputStyle:"compact",largestUnit:z(e.largestUnit)?e.largestUnit:void 0,smallestUnit:z(e.smallestUnit)?e.smallestUnit:"second",maxUnits:t,prefix:e.prefix,suffix:e.suffix,negativeStyle:e.negativeStyle||"minus"}}function te(e){return{type:"string",prefix:e.prefix,suffix:e.suffix}}function vt(e,t){if(!e)return;if(typeof e=="string"){const r=e.trim().toLowerCase();return r==="currency"?w("currency",{type:"currency"},t):r==="percentage"||r==="percent"?w("percent",{type:"percentage",percentValueMode:"fraction"},t):r==="scientific"?w("scientific",{type:"scientific"},t):r==="date"?L({}):r==="duration"?U({}):r==="string"?te({}):r==="number"?w("number",{type:"number"},t):void 0}if("type"in e&&e.type==="temporal_bucket"){const r=ue.temporalBucketFormatSchema.safeParse(e);return r.success?r.data:void 0}const n=e;if((t==null?void 0:t.numericInput)==="canonical"){const r=n.type==="percentage"?{...n,type:"percent"}:n;if(_(r))return w(r.type,r,t)}if(n.type==="percentage")return w("percent",{...n,percentValueMode:n.percentValueMode||"fraction"},t);if(n.type==="number"||n.type==="currency"||n.type==="percent"||n.type==="scientific"){const r=w(n.type,n,t);return Dt(n)?{...r,currency:"USD"}:r}if(n.type==="date")return L(n);if(n.type==="duration")return U(n);if(n.type==="string")return te(n)}exports.DEFAULT_LOCALE=se;exports.constructFrom=b;exports.enUS=re;exports.format=oe;exports.formatInTimeZone=pt;exports.fromSemanticFormat=vt;exports.getDefaultOptions=p;exports.getTimezoneOffsetInMilliseconds=q;exports.isNumericCanonicalFormat=_;exports.normalizeDateFormat=L;exports.normalizeDurationFormat=U;exports.normalizeLocaleOrCurrency=X;exports.normalizeNumericFormat=w;exports.toDate=h;exports.toZonedTime=ce;
1
+ "use strict";const H=require("./constants-B00YUv89.cjs"),F=require("./index-F25jnH0p.cjs"),ue=require("./validators-DVYAnnX0.cjs");require("./matrix-operation-contract-DoiWTUbT.cjs");function _(e){if(!e||typeof e!="object")return!1;const t=e.type;return t==="number"||t==="currency"||t==="percent"||t==="scientific"}function h(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function b(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}let de={};function p(){return de}function v(e,t){var c,u,d,m;const n=p(),r=(t==null?void 0:t.weekStartsOn)??((u=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((m=(d=n.locale)==null?void 0:d.options)==null?void 0:m.weekStartsOn)??0,a=h(e),i=a.getDay(),o=(i<r?7:0)+i-r;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function W(e){return v(e,{weekStartsOn:1})}function ne(e){const t=h(e),n=t.getFullYear(),r=b(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const a=W(r),i=b(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const o=W(i);return t.getTime()>=a.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function R(e){const t=h(e);return t.setHours(0,0,0,0),t}function q(e){const t=h(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function fe(e,t){const n=R(e),r=R(t),a=+n-q(n),i=+r-q(r);return Math.round((a-i)/H.millisecondsInDay)}function me(e){const t=ne(e),n=b(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),W(n)}function le(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function he(e){if(!le(e)&&typeof e!="number")return!1;const t=h(e);return!isNaN(Number(t))}function ge(e){const t=h(e),n=b(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const ye={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},we=(e,t,n)=>{let r;const a=ye[e];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function E(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const be={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},xe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Oe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Me={date:E({formats:be,defaultWidth:"full"}),time:E({formats:xe,defaultWidth:"full"}),dateTime:E({formats:Oe,defaultWidth:"full"})},pe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},De=(e,t,n,r)=>pe[e];function T(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,c=n!=null&&n.width?String(n.width):o;a=e.formattingValues[c]||e.formattingValues[o]}else{const o=e.defaultWidth,c=n!=null&&n.width?String(n.width):e.defaultWidth;a=e.values[c]||e.values[o]}const i=e.argumentCallback?e.argumentCallback(t):t;return a[i]}}const Pe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Te={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Se={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ve={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ke={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Fe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},We=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Ye={ordinalNumber:We,era:T({values:Pe,defaultWidth:"wide"}),quarter:T({values:Te,defaultWidth:"wide",argumentCallback:e=>e-1}),month:T({values:Se,defaultWidth:"wide"}),day:T({values:ve,defaultWidth:"wide"}),dayPeriod:T({values:ke,defaultWidth:"wide",formattingValues:Fe,defaultFormattingWidth:"wide"})};function S(e){return(t,n={})=>{const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;const o=i[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(c)?Ee(c,g=>g.test(o)):Ce(c,g=>g.test(o));let d;d=e.valueCallback?e.valueCallback(u):u,d=n.valueCallback?n.valueCallback(d):d;const m=t.slice(o.length);return{value:d,rest:m}}}function Ce(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Ee(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Ne(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const a=r[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const c=t.slice(a.length);return{value:o,rest:c}}}const ze=/^(\d+)(th|st|nd|rd)?/i,qe=/\d+/i,Xe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Le={any:[/^b/i,/^(a|c)/i]},Ue={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},He={any:[/1/i,/2/i,/3/i,/4/i]},_e={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Ie={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},je={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ge={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Qe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Re={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Ae={ordinalNumber:Ne({matchPattern:ze,parsePattern:qe,valueCallback:e=>parseInt(e,10)}),era:S({matchPatterns:Xe,defaultMatchWidth:"wide",parsePatterns:Le,defaultParseWidth:"any"}),quarter:S({matchPatterns:Ue,defaultMatchWidth:"wide",parsePatterns:He,defaultParseWidth:"any",valueCallback:e=>e+1}),month:S({matchPatterns:_e,defaultMatchWidth:"wide",parsePatterns:Ie,defaultParseWidth:"any"}),day:S({matchPatterns:je,defaultMatchWidth:"wide",parsePatterns:Ge,defaultParseWidth:"any"}),dayPeriod:S({matchPatterns:Qe,defaultMatchWidth:"any",parsePatterns:Re,defaultParseWidth:"any"})},re={code:"en-US",formatDistance:we,formatLong:Me,formatRelative:De,localize:Ye,match:Ae,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Be(e){const t=h(e);return fe(t,ge(t))+1}function Ve(e){const t=h(e),n=+W(t)-+me(t);return Math.round(n/H.millisecondsInWeek)+1}function ae(e,t){var m,g,D,P;const n=h(e),r=n.getFullYear(),a=p(),i=(t==null?void 0:t.firstWeekContainsDate)??((g=(m=t==null?void 0:t.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??a.firstWeekContainsDate??((P=(D=a.locale)==null?void 0:D.options)==null?void 0:P.firstWeekContainsDate)??1,o=b(e,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const c=v(o,t),u=b(e,0);u.setFullYear(r,0,i),u.setHours(0,0,0,0);const d=v(u,t);return n.getTime()>=c.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function Ze(e,t){var c,u,d,m;const n=p(),r=(t==null?void 0:t.firstWeekContainsDate)??((u=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??n.firstWeekContainsDate??((m=(d=n.locale)==null?void 0:d.options)==null?void 0:m.firstWeekContainsDate)??1,a=ae(e,t),i=b(e,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),v(i,t)}function $e(e,t){const n=h(e),r=+v(n,t)-+Ze(n,t);return Math.round(r/H.millisecondsInWeek)+1}function s(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const y={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return s(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):s(n+1,2)},d(e,t){return s(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return s(e.getHours()%12||12,t.length)},H(e,t){return s(e.getHours(),t.length)},m(e,t){return s(e.getMinutes(),t.length)},s(e,t){return s(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return s(a,t.length)}},O={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},A={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return y.y(e,t)},Y:function(e,t,n,r){const a=ae(e,r),i=a>0?a:1-a;if(t==="YY"){const o=i%100;return s(o,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):s(i,t.length)},R:function(e,t){const n=ne(e);return s(n,t.length)},u:function(e,t){const n=e.getFullYear();return s(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return s(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return s(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return y.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return s(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const a=$e(e,r);return t==="wo"?n.ordinalNumber(a,{unit:"week"}):s(a,t.length)},I:function(e,t,n){const r=Ve(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):s(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):y.d(e,t)},D:function(e,t,n){const r=Be(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):s(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return s(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return s(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return s(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let a;switch(r===12?a=O.noon:r===0?a=O.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let a;switch(r>=17?a=O.evening:r>=12?a=O.afternoon:r>=4?a=O.morning:a=O.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return y.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):y.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):s(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):s(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):y.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):y.s(e,t)},S:function(e,t){return y.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return V(r);case"XXXX":case"XX":return x(r);case"XXXXX":case"XXX":default:return x(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return V(r);case"xxxx":case"xx":return x(r);case"xxxxx":case"xxx":default:return x(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+B(r,":");case"OOOO":default:return"GMT"+x(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+B(r,":");case"zzzz":default:return"GMT"+x(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return s(r,t.length)},T:function(e,t,n){const r=e.getTime();return s(r,t.length)}};function B(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+t+s(i,2)}function V(e,t){return e%60===0?(e>0?"-":"+")+s(Math.abs(e)/60,2):x(e,t)}function x(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=s(Math.trunc(r/60),2),i=s(r%60,2);return n+a+t+i}const Z=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},ie=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Je=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return Z(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Z(r,t)).replace("{{time}}",ie(a,t))},Ke={p:ie,P:Je},et=/^D+$/,tt=/^Y+$/,nt=["D","DD","YY","YYYY"];function rt(e){return et.test(e)}function at(e){return tt.test(e)}function it(e,t,n){const r=ot(e,t,n);if(console.warn(r),nt.includes(e))throw new RangeError(r)}function ot(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const ct=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,st=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ut=/^'([^]*?)'?$/,dt=/''/g,ft=/[a-zA-Z]/;function oe(e,t,n){var m,g,D,P,I,j,G,Q;const r=p(),a=(n==null?void 0:n.locale)??r.locale??re,i=(n==null?void 0:n.firstWeekContainsDate)??((g=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??r.firstWeekContainsDate??((P=(D=r.locale)==null?void 0:D.options)==null?void 0:P.firstWeekContainsDate)??1,o=(n==null?void 0:n.weekStartsOn)??((j=(I=n==null?void 0:n.locale)==null?void 0:I.options)==null?void 0:j.weekStartsOn)??r.weekStartsOn??((Q=(G=r.locale)==null?void 0:G.options)==null?void 0:Q.weekStartsOn)??0,c=h(e);if(!he(c))throw new RangeError("Invalid time value");let u=t.match(st).map(l=>{const f=l[0];if(f==="p"||f==="P"){const C=Ke[f];return C(l,a.formatLong)}return l}).join("").match(ct).map(l=>{if(l==="''")return{isToken:!1,value:"'"};const f=l[0];if(f==="'")return{isToken:!1,value:mt(l)};if(A[f])return{isToken:!0,value:l};if(f.match(ft))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:l}});a.localize.preprocessor&&(u=a.localize.preprocessor(c,u));const d={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return u.map(l=>{if(!l.isToken)return l.value;const f=l.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&at(f)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&rt(f))&&it(f,t,String(e));const C=A[f[0]];return C(c,f,a.localize,d)}).join("")}function mt(e){const t=e.match(ut);return t?t[1].replace(dt,"'"):e}function lt(){return Object.assign({},p())}function $(e,t,n){const r=lt(),a=yt(e,n.timeZone,n.locale??r.locale);return"formatToParts"in a?ht(a,t):gt(a,t)}function ht(e,t){const n=e.formatToParts(t);for(let r=n.length-1;r>=0;--r)if(n[r].type==="timeZoneName")return n[r].value}function gt(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}function yt(e,t,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}const wt=60*1e3,bt={X:function(e,t,n){const r=N(n.timeZone,e);if(r===0)return"Z";switch(t){case"X":return J(r);case"XXXX":case"XX":return M(r);case"XXXXX":case"XXX":default:return M(r,":")}},x:function(e,t,n){const r=N(n.timeZone,e);switch(t){case"x":return J(r);case"xxxx":case"xx":return M(r);case"xxxxx":case"xxx":default:return M(r,":")}},O:function(e,t,n){const r=N(n.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+xt(r,":");case"OOOO":default:return"GMT"+M(r,":")}},z:function(e,t,n){switch(t){case"z":case"zz":case"zzz":return $("short",e,n);case"zzzz":default:return $("long",e,n)}}};function N(e,t){const n=e?F.tzParseTimezone(e,t,!0)/wt:(t==null?void 0:t.getTimezoneOffset())??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function Y(e,t){const n=e<0?"-":"";let r=Math.abs(e).toString();for(;r.length<t;)r="0"+r;return n+r}function M(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Y(Math.floor(r/60),2),i=Y(Math.floor(r%60),2);return n+a+t+i}function J(e,t){return e%60===0?(e>0?"-":"+")+Y(Math.abs(e)/60,2):M(e,t)}function xt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Math.floor(r/60),i=r%60;return i===0?n+String(a):n+String(a)+t+Y(i,2)}const Ot=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function Mt(e,t,n={}){t=String(t);const r=t.match(Ot);if(r){const a=F.toDate(n.originalDate||e,n);t=r.reduce(function(i,o){if(o[0]==="'")return i;const c=i.indexOf(o),u=i[c-1]==="'",d=i.replace(o,"'"+bt[o[0]](a,o,n)+"'");return u?d.substring(0,c-1)+d.substring(c+1):d},t)}return oe(e,t,n)}function ce(e,t,n){e=F.toDate(e,n);const r=F.tzParseTimezone(t,e,!0),a=new Date(e.getTime()-r),i=new Date(0);return i.setFullYear(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),i.setHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()),i}function pt(e,t,n,r){return r={...r,timeZone:t,originalDate:e},Mt(ce(e,t,{timeZone:r.timeZone}),n,r)}const se="en-US",K=["compact","maximumFractionDigits","minimumFractionDigits","negativeStyle","type","useGrouping"];function Dt(e){if(e.type!=="currency"||Object.prototype.hasOwnProperty.call(e,"currency")||Object.prototype.hasOwnProperty.call(e,"locale"))return!1;const t=Object.keys(e).sort();return t.length===K.length&&K.every((n,r)=>t[r]===n)&&typeof e.minimumFractionDigits=="number"&&typeof e.maximumFractionDigits=="number"&&e.useGrouping===!0&&e.negativeStyle==="minus"&&typeof e.compact=="boolean"}function X(e){if(typeof e!="string")return;const t=e.trim();if(!(!t||t.toLowerCase()==="none"))return t}function k(e){if(!(typeof e!="number"||!Number.isFinite(e)))return Math.max(0,Math.min(10,Math.trunc(e)))}function Pt(e){return e==="currency"?2:e==="percent"?1:e==="scientific"?2:0}function Tt(e,t,n){const r=k(t.minimumFractionDigits),a=k(t.maximumFractionDigits);if(typeof r=="number"||typeof a=="number"){const c=r??0,u=a??Math.max(c,2);return{minimumFractionDigits:Math.min(c,u),maximumFractionDigits:Math.max(c,u)}}const i=k(t.decimals);if(typeof i=="number")return{minimumFractionDigits:i,maximumFractionDigits:i};if(n!=null&&n.preserveOmittedProperties)return{};const o=Pt(e);return{minimumFractionDigits:o,maximumFractionDigits:o}}function St(e,t){if(!(typeof t!="string"||e==="percent"&&t==="%"))return t}function ee(e){const t=X(e.locale),n=X(e.currency),r=St(e.type,e.suffix);return{...e,...t!==e.locale?{locale:t}:{},...n!==e.currency?{currency:n}:{},...r!==e.suffix?{suffix:r}:{}}}function w(e,t,n){const r={...t,type:e};if((n==null?void 0:n.numericInput)==="canonical"&&_(r))return ee(r);const a=Tt(e,t,n),i=typeof t.prefix=="string"?t.prefix:void 0,o={type:e,locale:t.locale,minimumFractionDigits:a.minimumFractionDigits,maximumFractionDigits:a.maximumFractionDigits,useGrouping:typeof t.useGrouping=="boolean"?t.useGrouping:typeof t.thousandsSeparator=="boolean"?t.thousandsSeparator:!0,prefix:i,suffix:t.suffix,negativeStyle:t.negativeStyle||"minus",compact:!!t.compact,scale:typeof t.scale=="number"?t.scale:void 0};return e==="currency"&&t.currency&&(o.currency=t.currency),e==="percent"&&(o.percentValueMode=t.percentValueMode||"fraction"),ee(o)}function L(e){return{type:"date",locale:e.locale||se,pattern:e.pattern,relative:!!e.relative,timezone:e.timezone,sourceTimezone:e.sourceTimezone,prefix:e.prefix,suffix:e.suffix}}function z(e){return e==="millisecond"||e==="second"||e==="minute"||e==="hour"||e==="day"}function U(e){const t=k(e.maxUnits);return{type:"duration",inputUnit:z(e.inputUnit)?e.inputUnit:"second",outputStyle:e.outputStyle==="digital"||e.outputStyle==="long"?e.outputStyle:"compact",largestUnit:z(e.largestUnit)?e.largestUnit:void 0,smallestUnit:z(e.smallestUnit)?e.smallestUnit:"second",maxUnits:t,prefix:e.prefix,suffix:e.suffix,negativeStyle:e.negativeStyle||"minus"}}function te(e){return{type:"string",prefix:e.prefix,suffix:e.suffix}}function vt(e,t){if(!e)return;if(typeof e=="string"){const r=e.trim().toLowerCase();return r==="currency"?w("currency",{type:"currency"},t):r==="percentage"||r==="percent"?w("percent",{type:"percentage",percentValueMode:"fraction"},t):r==="scientific"?w("scientific",{type:"scientific"},t):r==="date"?L({}):r==="duration"?U({}):r==="string"?te({}):r==="number"?w("number",{type:"number"},t):void 0}if("type"in e&&e.type==="temporal_bucket"){const r=ue.temporalBucketFormatSchema.safeParse(e);return r.success?r.data:void 0}const n=e;if((t==null?void 0:t.numericInput)==="canonical"){const r=n.type==="percentage"?{...n,type:"percent"}:n;if(_(r))return w(r.type,r,t)}if(n.type==="percentage")return w("percent",{...n,percentValueMode:n.percentValueMode||"fraction"},t);if(n.type==="number"||n.type==="currency"||n.type==="percent"||n.type==="scientific"){const r=w(n.type,n,t);return Dt(n)?{...r,currency:"USD"}:r}if(n.type==="date")return L(n);if(n.type==="duration")return U(n);if(n.type==="string")return te(n)}exports.DEFAULT_LOCALE=se;exports.constructFrom=b;exports.enUS=re;exports.format=oe;exports.formatInTimeZone=pt;exports.fromSemanticFormat=vt;exports.getDefaultOptions=p;exports.getTimezoneOffsetInMilliseconds=q;exports.isNumericCanonicalFormat=_;exports.normalizeDateFormat=L;exports.normalizeDurationFormat=U;exports.normalizeLocaleOrCurrency=X;exports.normalizeNumericFormat=w;exports.toDate=h;exports.toZonedTime=ce;
@@ -1,7 +1,7 @@
1
1
  import { d as se, e as K } from "./constants-DeLIHVAW.js";
2
2
  import { t as ee, a as te } from "./index-CACdoqu3.js";
3
3
  import { ay as oe } from "./validators-BDYzZFgs.js";
4
- import "./matrix-operation-contract-Cqy4EW2H.js";
4
+ import "./matrix-operation-contract-xL8IhFzp.js";
5
5
  function ne(e) {
6
6
  if (!e || typeof e != "object") return !1;
7
7
  const t = e.type;