@ngrok/mantle 0.88.0 → 0.90.0

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 (247) hide show
  1. package/dist/accordion.d.ts +10 -9
  2. package/dist/accordion.js +1 -1
  3. package/dist/agent.json +1530 -1
  4. package/dist/{alert-DCVfviBx.d.ts → alert-BzPDUaU7.d.ts} +16 -15
  5. package/dist/alert-DO00UiQe.js +1 -0
  6. package/dist/alert-ZaUBtgno.js +1 -0
  7. package/dist/alert-center.d.ts +7 -7
  8. package/dist/alert-center.js +1 -1
  9. package/dist/alert-dialog.d.ts +17 -16
  10. package/dist/alert-dialog.js +1 -1
  11. package/dist/alert.d.ts +1 -1
  12. package/dist/alert.js +1 -1
  13. package/dist/anchor-CgcbWEUs.js +1 -0
  14. package/dist/anchor.js +1 -1
  15. package/dist/app-layout.d.ts +1183 -45
  16. package/dist/app-layout.js +1 -1
  17. package/dist/area-chart.d.ts +41 -18
  18. package/dist/area-chart.js +1 -1
  19. package/dist/avatar.js +1 -1
  20. package/dist/badge.d.ts +3 -2
  21. package/dist/badge.js +1 -1
  22. package/dist/bar-chart.d.ts +37 -13
  23. package/dist/bar-chart.js +1 -1
  24. package/dist/breadcrumb.js +1 -1
  25. package/dist/browser-only.js +1 -1
  26. package/dist/button-69InNC_m.js +1 -0
  27. package/dist/button-BMfUxs_j.js +1 -0
  28. package/dist/{button-DO53OA70.d.ts → button-CHoYpOzx.d.ts} +5 -4
  29. package/dist/{button-B52_vczK.js → button-D8rr-1AB.js} +1 -1
  30. package/dist/{button-crUf0hbR.d.ts → button-DL7V4bzW.d.ts} +5 -4
  31. package/dist/button-b2HKEIE2.js +1 -0
  32. package/dist/{button-B5i9n7Qp.d.ts → button-mzUR1U0Y.d.ts} +5 -4
  33. package/dist/button.d.ts +3 -3
  34. package/dist/button.js +1 -1
  35. package/dist/calendar.d.ts +3 -2
  36. package/dist/calendar.js +1 -1
  37. package/dist/card.d.ts +15 -7
  38. package/dist/card.js +1 -1
  39. package/dist/centered-layout.js +1 -1
  40. package/dist/{chart-DgaWVBqi.d.ts → chart-23KQ1ZNO.d.ts} +128 -62
  41. package/dist/chart-BRkJfptA.js +2 -0
  42. package/dist/checkbox-C3N2afhB.js +1 -0
  43. package/dist/checkbox.d.ts +3 -2
  44. package/dist/checkbox.js +1 -1
  45. package/dist/{choice-PESu-9s8.d.ts → choice-BCiyqLgO.d.ts} +12 -11
  46. package/dist/choice-DQmecLfy.js +1 -0
  47. package/dist/choice.d.ts +1 -1
  48. package/dist/choice.js +1 -1
  49. package/dist/code-block-4Esx_gV-.js +12 -0
  50. package/dist/code-block.d.ts +17 -16
  51. package/dist/code-block.js +6 -6
  52. package/dist/code-block_highlight-utils.js +1 -1
  53. package/dist/code.d.ts +2 -1
  54. package/dist/code.js +1 -1
  55. package/dist/combobox.d.ts +15 -14
  56. package/dist/combobox.js +1 -1
  57. package/dist/command.d.ts +13 -13
  58. package/dist/command.js +1 -1
  59. package/dist/cx-CK7o_rVv.js +1 -0
  60. package/dist/cx.js +1 -1
  61. package/dist/data-table.d.ts +32 -31
  62. package/dist/data-table.js +1 -1
  63. package/dist/description-list.d.ts +6 -6
  64. package/dist/description-list.js +1 -1
  65. package/dist/dialog-CaGJD02w.js +1 -0
  66. package/dist/{dialog-DXpqpdJj.d.ts → dialog-DQdeqvq-.d.ts} +28 -15
  67. package/dist/dialog.d.ts +1 -1
  68. package/dist/dialog.js +1 -1
  69. package/dist/{dropdown-menu-BloQKE_y.d.ts → dropdown-menu-Cef0Cz2B.d.ts} +17 -17
  70. package/dist/dropdown-menu-CutWQ0bl.js +1 -0
  71. package/dist/dropdown-menu-DMA8dGxZ.d.ts +1 -0
  72. package/dist/dropdown-menu.d.ts +2 -2
  73. package/dist/dropdown-menu.js +1 -1
  74. package/dist/empty.d.ts +14 -6
  75. package/dist/empty.js +1 -1
  76. package/dist/field.d.ts +16 -15
  77. package/dist/field.js +1 -1
  78. package/dist/flag.d.ts +4 -3
  79. package/dist/flag.js +1 -1
  80. package/dist/hooks.d.ts +251 -1
  81. package/dist/hooks.js +1 -1
  82. package/dist/hover-card.d.ts +5 -4
  83. package/dist/hover-card.js +1 -1
  84. package/dist/icon-BudQMD2S.js +1 -0
  85. package/dist/icon-kK0c-POG.js +1 -0
  86. package/dist/{icon-w0HUe7tr.d.ts → icon-r2NvfTWW.d.ts} +3 -2
  87. package/dist/{icon-BmJ57Tgh.d.ts → icon-ucVgZeXn.d.ts} +3 -2
  88. package/dist/icon.d.ts +2 -2
  89. package/dist/icon.js +1 -1
  90. package/dist/icons-CAtjMNti.js +1 -0
  91. package/dist/{icons-Bu-2boul.js → icons-CH3tD_wq.js} +1 -1
  92. package/dist/icons-CSwTVV2m.js +1 -0
  93. package/dist/icons.js +1 -1
  94. package/dist/in-view-Dxv_GrUU.js +1 -0
  95. package/dist/input-D_DjD9lT.js +1 -0
  96. package/dist/{input-DpnC3Xgj.d.ts → input-bbB1tC0h.d.ts} +3 -2
  97. package/dist/input.d.ts +5 -4
  98. package/dist/input.js +1 -1
  99. package/dist/kbd-CLHsJ99p.js +1 -0
  100. package/dist/kbd.d.ts +2 -1
  101. package/dist/kbd.js +1 -1
  102. package/dist/label-5T8i7I4X.js +1 -0
  103. package/dist/{label-Bnfe9YJ6.d.ts → label-C-KbNls8.d.ts} +3 -2
  104. package/dist/label.d.ts +1 -1
  105. package/dist/label.js +1 -1
  106. package/dist/{layer-container-R7aux3n8.js → layer-container-DLf-6eBz.js} +1 -1
  107. package/dist/layer-container.js +1 -1
  108. package/dist/line-chart.d.ts +40 -15
  109. package/dist/line-chart.js +1 -1
  110. package/dist/list-DOVZoz9t.js +1 -0
  111. package/dist/list.d.ts +3 -2
  112. package/dist/list.js +1 -1
  113. package/dist/live-region-DQ1QLv3L.js +1 -0
  114. package/dist/live-region.d.ts +3 -2
  115. package/dist/live-region.js +1 -1
  116. package/dist/llms.txt +118 -2
  117. package/dist/{main-Dv2zuT_b.js → main-CC1L9IsH.js} +1 -1
  118. package/dist/main.js +1 -1
  119. package/dist/mantle.css +12 -0
  120. package/dist/media-object.js +1 -1
  121. package/dist/migrations/0002-data-table-action-header.yml +526 -0
  122. package/dist/migrations/0003-dialog-footer-dom-order.yml +271 -0
  123. package/dist/migrations/0004-priority-to-intent.yml +1728 -0
  124. package/dist/migrations/0005-field-item-owns-control-id.yml +234 -0
  125. package/dist/migrations/0006-data-table-tanstack-v9.yml +423 -0
  126. package/dist/migrations/0008-tabs-separator.yml +1212 -0
  127. package/dist/migrations/0009-chart-root-mode.yml +871 -0
  128. package/dist/multi-select.d.ts +23 -22
  129. package/dist/multi-select.js +1 -1
  130. package/dist/otp-input.d.ts +9 -8
  131. package/dist/otp-input.js +1 -1
  132. package/dist/pagination.d.ts +9 -8
  133. package/dist/pagination.js +1 -1
  134. package/dist/{popover-Cco1nw8I.d.ts → popover-Dvls7-j4.d.ts} +5 -4
  135. package/dist/popover-oQDUvcZ2.js +1 -0
  136. package/dist/popover.d.ts +1 -1
  137. package/dist/popover.js +1 -1
  138. package/dist/primitive-AGoxSJBI.js +1 -0
  139. package/dist/progress.d.ts +9 -8
  140. package/dist/progress.js +1 -1
  141. package/dist/qr-code.d.ts +9 -8
  142. package/dist/qr-code.js +1 -1
  143. package/dist/radio-group.d.ts +19 -18
  144. package/dist/radio-group.js +1 -1
  145. package/dist/sandbar.d.ts +7 -7
  146. package/dist/sandbar.js +1 -1
  147. package/dist/{sandboxed-on-click-BLvvSqOP.js → sandboxed-on-click-C7pPu-2M.js} +1 -1
  148. package/dist/sandboxed-on-click.js +1 -1
  149. package/dist/scatter-plot.d.ts +39 -14
  150. package/dist/scatter-plot.js +1 -1
  151. package/dist/select-DcL0-duV.js +1 -0
  152. package/dist/{select-BITJP7I5.d.ts → select-DlohFa54.d.ts} +3 -3
  153. package/dist/select.d.ts +1 -1
  154. package/dist/select.js +1 -1
  155. package/dist/selectable-list.d.ts +16 -15
  156. package/dist/selectable-list.js +1 -1
  157. package/dist/{separator-Bo4nY_3M.d.ts → separator-BWGjCIl7.d.ts} +11 -3
  158. package/dist/separator-DvPe27fH.js +1 -0
  159. package/dist/separator.d.ts +1 -1
  160. package/dist/separator.js +1 -1
  161. package/dist/sheet-H8zvhSuA.js +1 -0
  162. package/dist/sheet.d.ts +13 -12
  163. package/dist/sheet.js +1 -1
  164. package/dist/sidebar.d.ts +163 -102
  165. package/dist/sidebar.js +1 -1
  166. package/dist/skeleton-zfqoDAxT.js +1 -0
  167. package/dist/skeleton.d.ts +3 -2
  168. package/dist/skeleton.js +1 -1
  169. package/dist/skip-to-main-link.js +1 -1
  170. package/dist/slider.d.ts +3 -2
  171. package/dist/slider.js +1 -1
  172. package/dist/{slot-BsvE2ntj.js → slot-DdYN1L1C.js} +1 -1
  173. package/dist/{slot-DdgxmuI5.d.ts → slot-Q996Hqk9.d.ts} +1 -1
  174. package/dist/slot.d.ts +1 -1
  175. package/dist/slot.js +1 -1
  176. package/dist/split-button.d.ts +6 -5
  177. package/dist/split-button.js +1 -1
  178. package/dist/strata.d.ts +544 -0
  179. package/dist/strata.js +1 -0
  180. package/dist/switch.d.ts +3 -2
  181. package/dist/switch.js +1 -1
  182. package/dist/{table-DEI-qvSC.d.ts → table-BhzITa19.d.ts} +10 -9
  183. package/dist/table-DBbKqOVq.js +1 -0
  184. package/dist/table.d.ts +1 -1
  185. package/dist/table.js +1 -1
  186. package/dist/tabs.d.ts +2 -2
  187. package/dist/tabs.js +1 -1
  188. package/dist/text-area.d.ts +3 -2
  189. package/dist/text-area.js +1 -1
  190. package/dist/theme-6Q65C1Rx.js +1 -0
  191. package/dist/theme-switcher.d.ts +3 -3
  192. package/dist/theme-switcher.js +1 -1
  193. package/dist/theme.js +1 -1
  194. package/dist/toast.d.ts +10 -9
  195. package/dist/toast.js +1 -1
  196. package/dist/{tooltip-nuUCoqq8.d.ts → tooltip-CngH7Kl6.d.ts} +7 -6
  197. package/dist/tooltip-NhYXqStK.js +1 -0
  198. package/dist/tooltip.d.ts +1 -1
  199. package/dist/tooltip.js +1 -1
  200. package/dist/truncated-text.d.ts +138 -0
  201. package/dist/truncated-text.js +1 -0
  202. package/dist/types.js +1 -1
  203. package/dist/use-breakpoint--mo7kr9d.js +1 -0
  204. package/dist/use-is-hydrated-after-paint-r9Cl2mGp.js +1 -0
  205. package/dist/use-prefers-reduced-motion-DimzRx-M.js +1 -0
  206. package/dist/use-swipe-to-dismiss-Cj-AayFd.js +1 -0
  207. package/dist/utils.js +1 -1
  208. package/dist/visually-hidden.d.ts +2 -1
  209. package/dist/visually-hidden.js +1 -1
  210. package/dist/well.d.ts +10 -2
  211. package/dist/well.js +1 -1
  212. package/package.json +17 -15
  213. package/dist/alert-OP_-aGJD.js +0 -1
  214. package/dist/anchor-BnMhJYS4.js +0 -1
  215. package/dist/button-BFpCB99R.js +0 -1
  216. package/dist/button-Dij5vCQG.js +0 -1
  217. package/dist/button-pwkdtR3U.js +0 -1
  218. package/dist/chart-aZLMj4xx.js +0 -2
  219. package/dist/checkbox-DbJSqSNN.js +0 -1
  220. package/dist/choice-SRyLguqU.js +0 -1
  221. package/dist/code-block-BE3Q0iAo.js +0 -12
  222. package/dist/cx-0HCjnNv1.js +0 -1
  223. package/dist/dialog-HIdb5d3I.js +0 -1
  224. package/dist/dropdown-menu-BR_AQNMj.js +0 -1
  225. package/dist/dropdown-menu-Dlpb7600.d.ts +0 -1
  226. package/dist/icon-BT8FnkkJ.js +0 -1
  227. package/dist/icon-U24NfYv7.js +0 -1
  228. package/dist/icons-BQRcOU6J.js +0 -1
  229. package/dist/icons-C3rVfpx9.js +0 -1
  230. package/dist/in-view-T_AAYaaF.js +0 -1
  231. package/dist/input-yq0jLE4e.js +0 -1
  232. package/dist/kbd-CJ8hNZfS.js +0 -1
  233. package/dist/label-BAy0Mg59.js +0 -1
  234. package/dist/list-BleZ-43e.js +0 -1
  235. package/dist/live-region-B2vJRvPH.js +0 -1
  236. package/dist/popover-BJ5XNwzD.js +0 -1
  237. package/dist/primitive-w3wFk2La.js +0 -1
  238. package/dist/select-CUWLEeuf.js +0 -1
  239. package/dist/separator-D98be0gY.js +0 -1
  240. package/dist/sheet-B5x8EO9Y.js +0 -1
  241. package/dist/skeleton-bVDP8BzY.js +0 -1
  242. package/dist/table-D2jh52KA.js +0 -1
  243. package/dist/theme-C1kFFdIk.js +0 -1
  244. package/dist/tooltip-H03l7E4Y.js +0 -1
  245. package/dist/use-is-hydrated-after-paint-Drj0lNi4.js +0 -1
  246. package/dist/use-prefers-reduced-motion-Cj9tJ181.js +0 -1
  247. /package/dist/{types-D85fCNV3.js → css-properties-D85fCNV3.js} +0 -0
@@ -0,0 +1,138 @@
1
+ import { t as SelfClosingWithAsChild } from "./as-child-D23mGo4f.js";
2
+ import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
3
+ import { ComponentProps } from "react";
4
+ //#region src/components/truncated-text/truncated-text.d.ts
5
+ /**
6
+ * Props for `TruncatedText`. The type omits `children`: `value` is the content,
7
+ * and `asChild` takes the single element to render it in.
8
+ */
9
+ type TruncatedTextProps = Omit<ComponentProps<"span">, "children" | "translate"> & SelfClosingWithAsChild & WithDataSlot & {
10
+ /**
11
+ * How many graphemes stay visible at the end of the value. Counts grapheme
12
+ * clusters, so an emoji or a letter with a combining mark counts once. Must
13
+ * be a non-negative integer.
14
+ *
15
+ * @default 8
16
+ */
17
+ tail?: number;
18
+ /**
19
+ * Whether a browser translation engine may translate the value and its
20
+ * tooltip. When the value is prose, pass `"yes"`.
21
+ *
22
+ * @default "no"
23
+ */
24
+ translate?: "yes" | "no";
25
+ /**
26
+ * The full value. A prop and not `children`, because the component splits
27
+ * it and renders the two parts itself.
28
+ */
29
+ value: string;
30
+ };
31
+ /**
32
+ * Renders one long opaque value (a URL, a resource ID, an image reference, a
33
+ * token) on a single line. When the value overflows its container, the head
34
+ * clips with one ellipsis and the last `tail` graphemes stay visible, because
35
+ * the tail is the part that tells two values apart. When the value fits, it
36
+ * renders plain. A visually hidden copy of the value gives a screen reader the
37
+ * whole value as one string. A tooltip shows the full value on hover only while
38
+ * it overflows.
39
+ *
40
+ * **When to use**
41
+ * - A URL, an ID, an image reference, or a token in a table cell, a description
42
+ * list, or a card, where the end of the value matters.
43
+ *
44
+ * **When not to use**
45
+ * - For prose that may lose its end. Use the `truncate` utility.
46
+ * - For a value that may wrap over several lines. Let it wrap, or use
47
+ * {@link https://mantle.ngrok.com/components/data-display/code-block CodeBlock}.
48
+ * - For a short fragment of inline code. Use
49
+ * {@link https://mantle.ngrok.com/components/data-display/code Code}.
50
+ *
51
+ * **Layout.** The root is an `inline-block` that grows to its container's width
52
+ * and no further. The container decides the width:
53
+ * - A flex item needs `min-w-0`.
54
+ * - A grid track needs `minmax(0, 1fr)`.
55
+ * - An auto-layout table grows its column to the full value, even with a column
56
+ * width. Set `table-layout: fixed` on the table and give the table a width.
57
+ *
58
+ * When the container holds less than the tail and one cell, the ellipsis is all
59
+ * that remains of the head. The tail then clips at its start, so the end of the
60
+ * value is the last thing to go. A value no longer than `tail` has no head, so
61
+ * its tail draws the ellipsis itself. Give the value a line of its own: beside
62
+ * other inline text, an overflowing value wraps to the next line at the
63
+ * container's full width. The root sets `dir="ltr"`, because a URL, an ID, or
64
+ * a token reads left to right on an RTL page too; a `dir` prop wins. CSS draws
65
+ * the ellipsis, so a selection never contains it. The component sets no font,
66
+ * but it turns ligatures off, so a `//` or `=>` clips between its two
67
+ * characters. In a monospace font the clipped head sits flush against the
68
+ * tail; a proportional font leaves a gap smaller than one glyph.
69
+ *
70
+ * Until the first measurement, the tail reserves one `ch` per grapheme, which
71
+ * is exact in a monospace font. In another font the first paint of an
72
+ * overflowing value can be off by the difference: a tail of wide glyphs (CJK,
73
+ * emoji) can poke past the container, and a value that fits by less than the
74
+ * over-reserve of narrow glyphs can clip. The layout effect after mount
75
+ * replaces the estimate with the measured width.
76
+ *
77
+ * **Selection.** The root carries `user-select: all`, so one click selects the
78
+ * whole value across both segments, and a copy yields the full string. Pass
79
+ * `className="select-text"` to opt out.
80
+ *
81
+ * **Tooltip.** The tooltip shows the full value and opens only while the value
82
+ * overflows. It needs a `TooltipProvider` ancestor, like every mantle tooltip,
83
+ * and throws without one. The server render and the first client render assume
84
+ * no overflow; the measurement after mount adds the tooltip and `data-truncated`.
85
+ * While the value overflows, the root is focusable, so Tab reaches it, a screen
86
+ * reader announces the whole value, and the tooltip opens. A value that fits is
87
+ * not a tab stop. A `tabIndex` prop wins in both states.
88
+ *
89
+ * **Accessibility.** The two visible segments are `aria-hidden`, because
90
+ * Chromium puts a space between two inline-block boxes in an accessible name.
91
+ * A visually hidden `<span data-slot="truncated-text-value">` holds the whole
92
+ * value instead, with `user-select: none`, so one click still copies the value
93
+ * once. A page-wide select-all copies it twice, like any visually hidden label.
94
+ *
95
+ * **Translation.** The root and the tooltip carry `translate="no"` by default,
96
+ * because the component exists for values a reader copies. When the value is
97
+ * prose, pass `translate="yes"`.
98
+ *
99
+ * **Polymorphism.** Pass `asChild` to render the value inside a different
100
+ * element, such as a `<code>`. The child must have no children of its own,
101
+ * because `value` is the content, and it must render `children` directly, as
102
+ * `<code>` does.
103
+ *
104
+ * **Data attributes:**
105
+ *
106
+ * | Data Attribute | Value | Description |
107
+ * | ---------------- | -------------------------------------------------- | ---------------------------------------------------------------------------------- |
108
+ * | `data-slot` | `"truncated-text"` | On the root, and joined onto the child via `asChild`. |
109
+ * | `data-slot` | `"truncated-text-head"` | On the `<span>` that clips. Holds everything before the tail. |
110
+ * | `data-slot` | `"truncated-text-tail"` | On the `<span>` that stays visible. Holds the last `tail` graphemes. |
111
+ * | `data-slot` | `"truncated-text-value"` | On the visually hidden `<span>` that holds the whole value for assistive technology. |
112
+ * | `data-truncated` | present while the value overflows | Presence-only. Style with `data-truncated:`. Absent on the server render. |
113
+ * | `data-state` | `"closed"` \| `"delayed-open"` \| `"instant-open"` | The tooltip state Radix stamps on the root. |
114
+ *
115
+ * @see https://mantle.ngrok.com/components/data-display/truncated-text
116
+ *
117
+ * @example
118
+ * ```tsx
119
+ * import { TruncatedText } from "@ngrok/mantle/truncated-text";
120
+ *
121
+ * // A URL whose last path segment tells it apart from its neighbors.
122
+ * <TruncatedText
123
+ * className="font-mono text-sm"
124
+ * value="https://example.ngrok.app/api/items?filter=%7B%22name%22%3A%22x%22%7D&limit=200"
125
+ * />
126
+ *
127
+ * // Keep the six characters that tell two IDs apart.
128
+ * <TruncatedText className="font-mono text-sm" tail={6} value="ep_2abcdEFGhijKL123456" />
129
+ *
130
+ * // As a <code> element.
131
+ * <TruncatedText asChild tail={12} value="ghcr.io/ngrok/ngrok-operator:0.14.0">
132
+ * <code />
133
+ * </TruncatedText>
134
+ * ```
135
+ */
136
+ declare const TruncatedText: ({ "aria-describedby": describedBy, asChild, children, className, "data-slot": dataSlot, onFocus, onPointerMove, ref, style, tabIndex, tail, translate, value, ...props }: TruncatedTextProps) => import("react").JSX.Element;
137
+ //#endregion
138
+ export { TruncatedText, type TruncatedTextProps };
@@ -0,0 +1 @@
1
+ import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-sFdxsL7k.js";import{t as n}from"./cx-CK7o_rVv.js";import{t as r}from"./data-slot-EM6s2WEU.js";import{t as i}from"./slot-DdYN1L1C.js";import{t as a}from"./css-properties-D85fCNV3.js";import{t as o}from"./tooltip-NhYXqStK.js";import{c as ee}from"react/compiler-runtime";import{Children as s,cloneElement as te,isValidElement as ne,useRef as re,useState as c}from"react";import l from"tiny-invariant";import{Fragment as ie,jsx as u,jsxs as ae}from"react/jsx-runtime";import{Root as oe,Trigger as se}from"@radix-ui/react-tooltip";let d;function ce(e,t){l(Number.isInteger(t)&&t>=0,`TruncatedText: \`tail\` must be a non-negative integer, received ${String(t)}.`),d??=new Intl.Segmenter(void 0,{granularity:`grapheme`});let n=Array.from(d.segment(e),e=>e.segment);if(n.length<=t)return{head:``,tail:e,tailGraphemes:n.length};let r=n.length-t;return{head:n.slice(0,r).join(``),tail:n.slice(r).join(``),tailGraphemes:t}}function f(e){let t=document.createRange();return t.selectNodeContents(e),t.getBoundingClientRect().width}function p(e){let t=getComputedStyle(e),n=[t.paddingLeft,t.paddingRight,t.borderLeftWidth,t.borderRightWidth].reduce((e,t)=>e+(Number.parseFloat(t)||0),0);return e.getBoundingClientRect().width-n}function le(e,t,n){let r=f(n);return{tailWidth:r,truncated:f(t)+r>p(e)+.5}}const ue=String.raw`inline-block overflow-hidden text-ellipsis whitespace-nowrap align-bottom before:content-['\200B'] max-w-[calc(100%_-_var(--_tail-width)_+_0.5px)] [[data-truncated]>&]:max-w-[max(1ch_+_0.5px,calc(round(down,100%_-_var(--_tail-width),1ch)_+_0.5px))]`,de=e=>{let t=ee(8),n,r,a;if(t[0]!==e){let{"aria-describedby":i,asChild:o,describedBy:ee,...s}=e;a=o,n=ee,r=s,t[0]=e,t[1]=n,t[2]=r,t[3]=a}else n=t[1],r=t[2],a=t[3];let o=a!==void 0&&a?i:`span`,s;return t[4]!==o||t[5]!==n||t[6]!==r?(s=/* @__PURE__ */ u(o,{"aria-describedby":n,...r}),t[4]=o,t[5]=n,t[6]=r,t[7]=s):s=t[7],s},m=i=>{let d=ee(79),f,p,m,h,g,_,v,y,b,x,S,C,w,T;d[0]===i?(f=d[1],p=d[2],m=d[3],h=d[4],g=d[5],_=d[6],v=d[7],y=d[8],b=d[9],x=d[10],S=d[11],C=d[12],w=d[13],T=d[14]):({"aria-describedby":h,asChild:x,children:f,className:p,"data-slot":m,onFocus:g,onPointerMove:_,ref:y,style:b,tabIndex:w,tail:S,translate:C,value:T,...v}=i,d[0]=i,d[1]=f,d[2]=p,d[3]=m,d[4]=h,d[5]=g,d[6]=_,d[7]=v,d[8]=y,d[9]=b,d[10]=x,d[11]=S,d[12]=C,d[13]=w,d[14]=T);let fe=x!==void 0&&x,E=S===void 0?8:S,D=C===void 0?`no`:C,O;d[15]!==E||d[16]!==T?(O=ce(T,E),d[15]=E,d[16]=T,d[17]=O):O=d[17];let{head:k,tail:A,tailGraphemes:pe}=O,[j,me]=c(null),he=re(null),ge=re(null),_e=t(y,me),[M,ve]=c(null),[ye,be]=c(!1),N=M?.truncated===!0,P;d[18]===j?P=d[19]:(P=()=>{let e=he.current,t=ge.current;if(j==null||e==null||t==null)return;let n=()=>{let n=le(j,e,t);ve(e=>e!=null&&e.tailWidth===n.tailWidth&&e.truncated===n.truncated?e:n),n.truncated||be(!1)};n();let r=new ResizeObserver(n);return r.observe(j),r.observe(t),()=>{r.disconnect()}},d[18]=j,d[19]=P);let F;d[20]!==j||d[21]!==E||d[22]!==T?(F=[j,T,E],d[20]=j,d[21]=E,d[22]=T,d[23]=F):F=d[23],e(P,F);let I=M==null?`${pe}ch`:`${M.tailWidth}px`,L;d[24]===T?L=d[25]:(L=/* @__PURE__ */ u(`span`,{"data-slot":`truncated-text-value`,className:`sr-only select-none`,children:T}),d[24]=T,d[25]=L);let R;d[26]===k?R=d[27]:(R=/* @__PURE__ */ u(`span`,{ref:he,"aria-hidden":!0,"data-slot":`truncated-text-head`,className:ue,children:k}),d[26]=k,d[27]=R);let z;d[28]===A?z=d[29]:(z=/* @__PURE__ */ u(`span`,{ref:ge,"aria-hidden":!0,"data-slot":`truncated-text-tail`,dir:`rtl`,className:`inline-block overflow-hidden whitespace-nowrap text-left align-bottom min-w-(--_tail-width) [[data-truncated]>&]:min-w-0 [[data-truncated]>&]:max-w-[calc(round(down,100%_-_1ch_-_var(--_tail-width),1ch)_+_var(--_tail-width))] [[data-truncated]>:empty+&]:max-w-[calc(round(down,100%_-_var(--_tail-width),1ch)_+_var(--_tail-width)_+_0.5px)] [[data-truncated]>:empty+&]:text-ellipsis`,children:/* @__PURE__ */ u(`span`,{dir:`ltr`,children:A})}),d[28]=A,d[29]=z);let B;d[30]!==L||d[31]!==R||d[32]!==z?(B=/* @__PURE__ */ ae(ie,{children:[L,R,z]}),d[30]=L,d[31]=R,d[32]=z,d[33]=B):B=d[33];let V=B,H;d[34]===m?H=d[35]:(H=r(m,`truncated-text`),d[34]=m,d[35]=H);let xe=N?``:void 0,U;d[36]===p?U=d[37]:(U=n(`inline-block min-w-0 max-w-full rounded whitespace-nowrap select-all [font-variant-ligatures:none] focus:outline-hidden focus-visible:ring-3 focus-visible:ring-focus-accent data-truncated:cursor-help`,p),d[36]=p,d[37]=U);let W;d[38]!==b||d[39]!==I?(W=a({"--_tail-width":I,...b}),d[38]=b,d[39]=I,d[40]=W):W=d[40];let Se=N?w??0:w,G;d[41]!==N||d[42]!==_?(G=e=>{_?.(e),N||e.preventDefault()},d[41]=N,d[42]=_,d[43]=G):G=d[43];let K;d[44]!==N||d[45]!==g?(K=e=>{g?.(e),N||e.preventDefault()},d[44]=N,d[45]=g,d[46]=K):K=d[46];let q;d[47]!==_e||d[48]!==v||d[49]!==H||d[50]!==xe||d[51]!==U||d[52]!==W||d[53]!==Se||d[54]!==G||d[55]!==K||d[56]!==D?(q={ref:_e,"data-slot":H,"data-truncated":xe,dir:`ltr`,className:U,style:W,tabIndex:Se,onPointerMove:G,onFocus:K,translate:D,...v},d[47]=_e,d[48]=v,d[49]=H,d[50]=xe,d[51]=U,d[52]=W,d[53]=Se,d[54]=G,d[55]=K,d[56]=D,d[57]=q):q=d[57];let J=q,Y;if(fe){let e;if(d[58]!==f||d[59]!==h||d[60]!==J||d[61]!==V){let t=s.only(f);l(ne(t),"When using `asChild`, TruncatedText must be passed a single child as a JSX tag."),l(t.props.children==null,"When using `asChild`, the child of TruncatedText must have no children of its own. `value` is the content."),e=/* @__PURE__ */ u(de,{asChild:!0,describedBy:h,...J,children:te(t,{},V)}),d[58]=f,d[59]=h,d[60]=J,d[61]=V,d[62]=e}else e=d[62];Y=e}else{let e;d[63]!==h||d[64]!==J||d[65]!==V?(e=/* @__PURE__ */ u(de,{describedBy:h,...J,children:V}),d[63]=h,d[64]=J,d[65]=V,d[66]=e):e=d[66],Y=e}let Ce=N&&ye,X;d[67]===N?X=d[68]:(X=e=>be(N&&e),d[67]=N,d[68]=X);let Z;d[69]===Y?Z=d[70]:(Z=/* @__PURE__ */ u(se,{asChild:!0,children:Y}),d[69]=Y,d[70]=Z);let Q;d[71]!==D||d[72]!==T?(Q=/* @__PURE__ */ u(o.Content,{className:`break-all`,translate:D,children:T}),d[71]=D,d[72]=T,d[73]=Q):Q=d[73];let $;return d[74]!==Ce||d[75]!==X||d[76]!==Z||d[77]!==Q?($=/* @__PURE__ */ ae(oe,{open:Ce,onOpenChange:X,children:[Z,Q]}),d[74]=Ce,d[75]=X,d[76]=Z,d[77]=Q,d[78]=$):$=d[78],$};export{m as TruncatedText};
package/dist/types.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./types-D85fCNV3.js";import{t}from"./booleanish-BfvnW6vy.js";export{e as $cssProperties,t as parseBooleanish};
1
+ import{t as e}from"./css-properties-D85fCNV3.js";import{t}from"./booleanish-BfvnW6vy.js";export{e as $cssProperties,t as parseBooleanish};
@@ -0,0 +1 @@
1
+ import{c as e}from"react/compiler-runtime";import{useSyncExternalStore as t}from"react";const n=[`2xl`,`xl`,`lg`,`md`,`sm`,`xs`,`2xs`],r=[`default`,...n];function i(){return t(b,x,a)}function a(){return`default`}function o(n){let r=e(4),i;r[0]===n?i=r[1]:(i=C(n),r[0]=n,r[1]=i);let a;return r[2]===n?a=r[3]:(a=T(n),r[2]=n,r[3]=a),t(i,a,s)}function s(){return!1}const c={"2xl":`(min-width: 96rem)`,xl:`(min-width: 80rem)`,lg:`(min-width: 64rem)`,md:`(min-width: 48rem)`,sm:`(min-width: 40rem)`,xs:`(min-width: 30rem)`,"2xs":`(min-width: 22.5rem)`},l={"2xl":`(max-width: 95.99rem)`,xl:`(max-width: 79.99rem)`,lg:`(max-width: 63.99rem)`,md:`(max-width: 47.99rem)`,sm:`(max-width: 39.99rem)`,xs:`(max-width: 29.99rem)`,"2xs":`(max-width: 22.49rem)`};let u=null,d=null;function f(){return u||={"2xl":window.matchMedia(c[`2xl`]),xl:window.matchMedia(c.xl),lg:window.matchMedia(c.lg),md:window.matchMedia(c.md),sm:window.matchMedia(c.sm),xs:window.matchMedia(c.xs),"2xs":window.matchMedia(c[`2xs`])},u}function p(e){return d||={"2xl":window.matchMedia(l[`2xl`]),xl:window.matchMedia(l.xl),lg:window.matchMedia(l.lg),md:window.matchMedia(l.md),sm:window.matchMedia(l.sm),xs:window.matchMedia(l.xs),"2xs":window.matchMedia(l[`2xs`])},d[e]}let m=`default`;const h=/* @__PURE__ */ new Set;let g=!1;function _(){let e=f();for(let t of n)if(e[t].matches)return t;return`default`}let v=!1;function y(){v||(v=!0,requestAnimationFrame(()=>{v=!1;let e=_();if(e!==m){m=e;for(let e of h)e()}}))}function b(e){if(h.add(e),!g){g=!0;let e=f();m=_();for(let t of Object.values(e))t.addEventListener(`change`,y)}return e(),()=>{if(h.delete(e),h.size===0&&g){g=!1;let e=f();for(let t of Object.values(e))t.removeEventListener(`change`,y)}}}function x(){return g||(m=_()),m}const S=/* @__PURE__ */ new Map;function C(e){let t=S.get(e);return t||(t=t=>{let n=p(e),r=!1,i=()=>{r||(r=!0,requestAnimationFrame(()=>{r=!1,t()}))};return n.addEventListener(`change`,i),()=>{n.removeEventListener(`change`,i)}},S.set(e,t),t)}const w=/* @__PURE__ */ new Map;function T(e){let t=w.get(e);return t||(t=()=>p(e).matches,w.set(e,t),t)}export{i as n,o as r,r as t};
@@ -0,0 +1 @@
1
+ import{c as e}from"react/compiler-runtime";import{useEffect as t,useState as n}from"react";function r(){let r=e(2),[i,a]=n(!1),o,s;return r[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>{let e=requestAnimationFrame(()=>{a(!0)});return()=>{cancelAnimationFrame(e)}},s=[],r[0]=o,r[1]=s):(o=r[0],s=r[1]),t(o,s),i}export{r as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./use-matches-media-query-m860lols.js";import{n as t}from"./browser-only-Crr3sgA0.js";const n=`(prefers-reduced-motion: no-preference)`;function r(){return!t()||!window.matchMedia(n).matches}function i(){return!e(n)}export{i as n,r as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./alert-DO00UiQe.js";import{c as t}from"react/compiler-runtime";import{useEffect as n,useLayoutEffect as r,useRef as i}from"react";function a(e,t,n){let r=e[0],i=e[e.length-1];if(r==null||i==null)return null;let a=e.findIndex(e=>e===t);if(a!==-1)return n?a===0?i:null:a===e.length-1?r:null;if(t==null)return n?i:r;if(n){let n=e.filter(e=>(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)!==0);return n[n.length-1]??i}return e.find(e=>(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING)!==0)??r}function o(r,i){let o=t(6),s;o[0]===i?s=o[1]:(s=i===void 0?{}:i,o[0]=i,o[1]=s);let{active:c}=s,l=c===void 0||c,u,d;o[2]!==l||o[3]!==r?(u=()=>{let t=r.current;if(!l||t==null)return;let n=!t.hasAttribute(`tabindex`);n&&(t.tabIndex=-1);let i=0,o=60,s=()=>{if(t.contains(document.activeElement))return;let[n]=e(t);(n??t).focus(),--o,!t.contains(document.activeElement)&&o>0&&(i=requestAnimationFrame(s))};s();let c=n=>{if(n.key!==`Tab`||n.defaultPrevented||!(n.target instanceof Node)||!t.contains(n.target))return;let r=e(t);if(r.length===0){n.preventDefault();return}let i=a(r,document.activeElement,n.shiftKey);i!=null&&(n.preventDefault(),i.focus())};return document.addEventListener(`keydown`,c),()=>{cancelAnimationFrame(i),document.removeEventListener(`keydown`,c),n&&t.removeAttribute(`tabindex`)}},d=[l,r],o[2]=l,o[3]=r,o[4]=u,o[5]=d):(u=o[4],d=o[5]),n(u,d)}function s(e,{active:t=!0}={}){r(()=>{let n=e.current,r=n?.parentElement;if(!t||n==null||r==null)return;let i=/* @__PURE__ */ new Set,a=()=>{for(let e of r.children)e!==n&&e instanceof HTMLElement&&!e.inert&&(e.inert=!0,i.add(e))};a();let o=new MutationObserver(a);return o.observe(r,{childList:!0}),()=>{o.disconnect();for(let e of i)e.inert=!1}},[t,e])}function c({offset:e,size:t,velocity:n,threshold:r,flickVelocity:i}){return e>0&&(e>=t*r||n>=i)}function l(e,t){return t<=0?0:(1-1/(.55*e/t+1))*t}function u(e,t){switch(t){case`right`:return e.clientX;case`left`:return-e.clientX;case`down`:return e.clientY;case`up`:return-e.clientY}}function d(e,t){return t===`left`||t===`right`?e.clientY:e.clientX}function f(e,t){switch(t){case`right`:return`${e}px`;case`left`:return`${-e}px`;case`down`:return`0 ${e}px`;case`up`:return`0 ${-e}px`}}function p(e,t,n){e.property===`flex-basis`?e.target.style.flexBasis=`${e.size-t}px`:e.target.style.translate=f(t,n)}function m(e){e.target.style.removeProperty(`transition`),e.target.style.removeProperty(e.property===`flex-basis`?`flex-basis`:`translate`)}function h(e,a){let o=t(6),s=i(a),f;o[0]===a?f=o[1]:(f=()=>{s.current=a},o[0]=a,o[1]=f),r(f);let h;o[2]===e.current?h=o[3]:(h=()=>{let t=e.current;if(t==null)return;let n=null,r=!1,i=()=>{document.removeEventListener(`pointermove`,a),document.removeEventListener(`pointerup`,o),document.removeEventListener(`pointercancel`,o),n=null},a=e=>{let{direction:t}=s.current,r=t===void 0?`right`:t;if(n==null||e.pointerId!==n.pointerId)return;let a=u(e,r),o=a-n.start;if(!n.dragging){let t=Math.abs(d(e,r)-n.crossStart);if(t>=8&&t>Math.abs(o)){i();return}if(Math.abs(o)<8)return;n.dragging=!0,n.target.style.transition=`none`}let c=e.timeStamp-n.lastTime;c>0&&(n.velocity=(a-n.last)/c),n.last=a,n.lastTime=e.timeStamp,n.offset=Math.max(0,o);let f=o>=0?o:-l(-o,n.size);p(n,f,r)},o=e=>{let{onDismiss:t,threshold:a,flickVelocity:o}=s.current,l=a===void 0?.25:a,u=o===void 0?.4:o;if(n==null||e.pointerId!==n.pointerId)return;let d=n;if(i(),!d.dragging||(r=!0,window.setTimeout(()=>{r=!1},0),m(d),e.type===`pointercancel`))return;let f=e.timeStamp-d.lastTime>100?0:d.velocity;c({...d,velocity:f,threshold:l,flickVelocity:u})&&t()},f=e=>{let{active:r,direction:i,property:c,target:l}=s.current,f=r===void 0||r,p=i===void 0?`right`:i,m=c===void 0?`translate`:c;if(!(typeof f==`function`?f():f)||!e.isPrimary||e.button!==0||n!=null)return;let h=l?.current??t,g=h.getBoundingClientRect(),_=u(e,p);n={target:h,property:typeof m==`function`?m():m,pointerId:e.pointerId,start:_,crossStart:d(e,p),size:p===`left`||p===`right`?g.width:g.height,dragging:!1,last:_,lastTime:e.timeStamp,velocity:0,offset:0},document.addEventListener(`pointermove`,a),document.addEventListener(`pointerup`,o),document.addEventListener(`pointercancel`,o)},h=e=>{r&&(r=!1,e.preventDefault(),e.stopPropagation())};return t.addEventListener(`pointerdown`,f),t.addEventListener(`click`,h,!0),()=>{n?.dragging&&m(n),i(),t.removeEventListener(`pointerdown`,f),t.removeEventListener(`click`,h,!0)}},o[2]=e.current,o[3]=h);let g;o[4]===e?g=o[5]:(g=[e],o[4]=e,o[5]=g),n(h,g)}export{s as n,o as r,h as t};
package/dist/utils.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./compose-refs-sFdxsL7k.js";import{t}from"./copy-to-clipboard-Cza2OT47.js";import{a as n,c as r,d as i,f as a,i as o,l as s,n as c,o as l,p as u,r as d,s as f,t as p,u as m}from"./direction-Wa9W2F61.js";import{t as h}from"./in-view-T_AAYaaF.js";function g(e,t){return Math.sign(t.getTime()-e.getTime())}function _(e,t){return Math.sign(e.getTime()-t.getTime())}export{p as $alphanumericSortingDirection,c as $sortingDirection,d as $sortingMode,o as $timeSortingDirection,n as alphanumericSortingDirections,g as compareDatesNewestToOldest,_ as compareDatesOldestToNewest,e as composeRefs,t as copyToClipboard,h as inView,l as isAlphanumericSortingDirection,f as isSortingDirection,r as isSortingMode,s as isTimeSortingDirection,m as sortingDirections,i as sortingModes,a as timeSortingByDirection,u as timeSortingDirections};
1
+ import{t as e}from"./compose-refs-sFdxsL7k.js";import{t}from"./copy-to-clipboard-Cza2OT47.js";import{a as n,c as r,d as i,f as a,i as o,l as s,n as c,o as l,p as u,r as d,s as f,t as p,u as m}from"./direction-Wa9W2F61.js";import{t as h}from"./in-view-Dxv_GrUU.js";function g(e,t){return Math.sign(t.getTime()-e.getTime())}function _(e,t){return Math.sign(e.getTime()-t.getTime())}export{p as $alphanumericSortingDirection,c as $sortingDirection,d as $sortingMode,o as $timeSortingDirection,n as alphanumericSortingDirections,g as compareDatesNewestToOldest,_ as compareDatesOldestToNewest,e as composeRefs,t as copyToClipboard,h as inView,l as isAlphanumericSortingDirection,f as isSortingDirection,r as isSortingMode,s as isTimeSortingDirection,m as sortingDirections,i as sortingModes,a as timeSortingByDirection,u as timeSortingDirections};
@@ -1,4 +1,5 @@
1
1
  import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
+ import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
2
3
  import { ComponentProps } from "react";
3
4
  //#region src/components/visually-hidden/visually-hidden.d.ts
4
5
  /**
@@ -36,6 +37,6 @@ import { ComponentProps } from "react";
36
37
  * </a>
37
38
  * ```
38
39
  */
39
- declare const VisuallyHidden: ({ asChild, className, ref, ...props }: ComponentProps<"span"> & WithAsChild) => import("react").JSX.Element;
40
+ declare const VisuallyHidden: ({ "data-slot": dataSlot, asChild, className, ref, ...props }: ComponentProps<"span"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
40
41
  //#endregion
41
42
  export { VisuallyHidden };
@@ -1 +1 @@
1
- import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./slot-BsvE2ntj.js";import{c as n}from"react/compiler-runtime";import{jsx as r}from"react/jsx-runtime";const i=i=>{let a=n(12),o,s,c,l;a[0]===i?(o=a[1],s=a[2],c=a[3],l=a[4]):({asChild:o,className:s,ref:l,...c}=i,a[0]=i,a[1]=o,a[2]=s,a[3]=c,a[4]=l);let u=o?t:`span`,d;a[5]===s?d=a[6]:(d=e(`sr-only`,s),a[5]=s,a[6]=d);let f;return a[7]!==u||a[8]!==c||a[9]!==l||a[10]!==d?(f=r(u,{ref:l,"data-slot":`visually-hidden`,className:d,...c}),a[7]=u,a[8]=c,a[9]=l,a[10]=d,a[11]=f):f=a[11],f};export{i as VisuallyHidden};
1
+ import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-DdYN1L1C.js";import{c as r}from"react/compiler-runtime";import{jsx as i}from"react/jsx-runtime";const a=a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({"data-slot":l,asChild:s,className:c,ref:d,...u}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`span`,p;o[6]===l?p=o[7]:(p=t(l,`visually-hidden`),o[6]=l,o[7]=p);let m;o[8]===c?m=o[9]:(m=e(`sr-only`,c),o[8]=c,o[9]=m);let h;return o[10]!==f||o[11]!==u||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{ref:d,"data-slot":p,className:m,...u}),o[10]=f,o[11]=u,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h};export{a as VisuallyHidden};
package/dist/well.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
+ import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
2
3
  import "./index-DA4ig3gj.js";
3
4
  import { ComponentProps } from "react";
4
5
  //#region src/components/well/well.d.ts
5
- type WellProps = ComponentProps<"div"> & WithAsChild;
6
+ type WellProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
6
7
  /**
7
8
  * A recessed, inset container used to visually group and de-emphasize content
8
9
  * relative to the surrounding surface, such as code samples, supplementary
@@ -12,6 +13,13 @@ type WellProps = ComponentProps<"div"> & WithAsChild;
12
13
  * or your own component, forwarding all class names, `data-*` attributes, and
13
14
  * the ref onto that child.
14
15
  *
16
+ * @useWhen De-emphasize a block of content relative to the surface around it.
17
+ *
18
+ * @siblings
19
+ * - `Card`: the content is primary and needs a raised box, a header, or a footer.
20
+ * - `Empty`: the block is a zero-data state; compose `Empty.Root` inside a `Well` to inset it.
21
+ * - `CodeBlock`: the content is code and needs highlighting and a copy button.
22
+ *
15
23
  * @see https://mantle.ngrok.com/components/structure/well
16
24
  *
17
25
  * @example
@@ -28,6 +36,6 @@ type WellProps = ComponentProps<"div"> & WithAsChild;
28
36
  * </Well>
29
37
  * ```
30
38
  */
31
- declare const Well: ({ asChild, className, ref, ...props }: WellProps) => import("react").JSX.Element;
39
+ declare const Well: ({ "data-slot": dataSlot, asChild, className, ref, ...props }: WellProps) => import("react").JSX.Element;
32
40
  //#endregion
33
41
  export { Well };
package/dist/well.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./slot-BsvE2ntj.js";import{c as n}from"react/compiler-runtime";import{jsx as r}from"react/jsx-runtime";const i=i=>{let a=n(12),o,s,c,l;a[0]===i?(o=a[1],s=a[2],c=a[3],l=a[4]):({asChild:l,className:o,ref:c,...s}=i,a[0]=i,a[1]=o,a[2]=s,a[3]=c,a[4]=l);let u=l!==void 0&&l?t:`div`,d;a[5]===o?d=a[6]:(d=e(`border-card-muted bg-base relative rounded-md border shadow-inner`,o),a[5]=o,a[6]=d);let f;return a[7]!==u||a[8]!==s||a[9]!==c||a[10]!==d?(f=r(u,{ref:c,"data-slot":`well`,className:d,...s}),a[7]=u,a[8]=s,a[9]=c,a[10]=d,a[11]=f):f=a[11],f};export{i as Well};
1
+ import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-DdYN1L1C.js";import{c as r}from"react/compiler-runtime";import{jsx as i}from"react/jsx-runtime";const a=a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({"data-slot":c,asChild:d,className:s,ref:u,...l}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=d!==void 0&&d?n:`div`,p;o[6]===c?p=o[7]:(p=t(c,`well`),o[6]=c,o[7]=p);let m;o[8]===s?m=o[9]:(m=e(`border-card-muted bg-base relative rounded-md border shadow-inner`,s),o[8]=s,o[9]=m);let h;return o[10]!==f||o[11]!==l||o[12]!==u||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{ref:u,"data-slot":p,className:m,...l}),o[10]=f,o[11]=l,o[12]=u,o[13]=p,o[14]=m,o[15]=h):h=o[15],h};export{a as Well};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngrok/mantle",
3
- "version": "0.88.0",
3
+ "version": "0.90.0",
4
4
  "description": "mantle is ngrok's UI library and design system.",
5
5
  "homepage": "https://mantle.ngrok.com",
6
6
  "license": "MIT",
@@ -105,6 +105,7 @@
105
105
  "./slider": "./dist/slider.js",
106
106
  "./slot": "./dist/slot.js",
107
107
  "./split-button": "./dist/split-button.js",
108
+ "./strata": "./dist/strata.js",
108
109
  "./switch": "./dist/switch.js",
109
110
  "./table": "./dist/table.js",
110
111
  "./tabs": "./dist/tabs.js",
@@ -113,27 +114,28 @@
113
114
  "./theme-switcher": "./dist/theme-switcher.js",
114
115
  "./toast": "./dist/toast.js",
115
116
  "./tooltip": "./dist/tooltip.js",
117
+ "./truncated-text": "./dist/truncated-text.js",
116
118
  "./types": "./dist/types.js",
117
119
  "./utils": "./dist/utils.js",
118
120
  "./visually-hidden": "./dist/visually-hidden.js",
119
121
  "./well": "./dist/well.js"
120
122
  },
121
123
  "dependencies": {
122
- "@ariakit/react": "0.4.40",
124
+ "@ariakit/react": "0.4.42",
123
125
  "@headlessui/react": "2.2.10",
124
- "@radix-ui/react-dialog": "1.1.23",
125
- "@radix-ui/react-dropdown-menu": "2.1.24",
126
- "@radix-ui/react-hover-card": "1.1.23",
127
- "@radix-ui/react-popover": "1.1.23",
128
- "@radix-ui/react-progress": "1.1.16",
129
- "@radix-ui/react-select": "2.3.7",
130
- "@radix-ui/react-slider": "1.4.7",
131
- "@radix-ui/react-slot": "1.3.3",
132
- "@radix-ui/react-switch": "1.3.7",
133
- "@radix-ui/react-tabs": "1.1.21",
134
- "@radix-ui/react-tooltip": "1.2.16",
135
- "@tanstack/react-table": "9.2.4",
136
- "@tanstack/react-virtual": "3.14.13",
126
+ "@radix-ui/react-dialog": "1.3.1",
127
+ "@radix-ui/react-dropdown-menu": "2.2.1",
128
+ "@radix-ui/react-hover-card": "1.2.1",
129
+ "@radix-ui/react-popover": "1.3.1",
130
+ "@radix-ui/react-progress": "1.2.1",
131
+ "@radix-ui/react-select": "2.4.1",
132
+ "@radix-ui/react-slider": "1.6.1",
133
+ "@radix-ui/react-slot": "1.5.0",
134
+ "@radix-ui/react-switch": "1.4.1",
135
+ "@radix-ui/react-tabs": "1.2.1",
136
+ "@radix-ui/react-tooltip": "1.4.1",
137
+ "@tanstack/react-table": "9.3.1",
138
+ "@tanstack/react-virtual": "3.14.19",
137
139
  "class-variance-authority": "0.7.1",
138
140
  "cmdk": "1.1.1",
139
141
  "d3-scale": "4.0.2",
@@ -1 +0,0 @@
1
- import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-sFdxsL7k.js";import{t as n}from"./cx-0HCjnNv1.js";import{t as r}from"./icon-U24NfYv7.js";import{t as i}from"./slot-BsvE2ntj.js";import{t as a}from"./types-D85fCNV3.js";import{t as o}from"./button-Dij5vCQG.js";import{t as s}from"./button-pwkdtR3U.js";import{c}from"react/compiler-runtime";import{CaretDownIcon as l}from"@phosphor-icons/react/CaretDown";import{createContext as u,useContext as d,useEffect as f,useRef as p}from"react";import m from"tiny-invariant";import{jsx as h,jsxs as g}from"react/jsx-runtime";import{CheckCircleIcon as _}from"@phosphor-icons/react/CheckCircle";import{InfoIcon as v}from"@phosphor-icons/react/Info";import{MegaphoneIcon as y}from"@phosphor-icons/react/Megaphone";import{WarningIcon as b}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as x}from"@phosphor-icons/react/WarningDiamond";import{XIcon as S}from"@phosphor-icons/react/X";import{cva as C}from"class-variance-authority";function w(e){if(e.name===``)return!0;let t=Array.from(e.ownerDocument.querySelectorAll(`input`)).filter(t=>t.type===`radio`&&t.name===e.name&&t.form===e.form&&!t.disabled),n=t.find(e=>e.checked);return n==null?t[0]===e:n===e}function T(e){return!(!(e instanceof HTMLElement)||e.tabIndex<0||e.matches(`:disabled`)||e instanceof HTMLInputElement&&(e.type===`hidden`||e.type===`radio`&&!w(e))||e.closest(`[hidden], [inert]`)!=null||typeof e.checkVisibility==`function`&&!e.checkVisibility({visibilityProperty:!0}))}function E(e){let t=[],n=[];for(let r of e.ownerDocument.querySelectorAll(`a[href], area[href], button, input, select, textarea, iframe, summary, audio[controls], video[controls], [contenteditable]:not([contenteditable="false"]), [tabindex]`))!e.contains(r)&&T(r)&&((e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING)===0?n.push(r):t.push(r));return n.reverse(),[...t,...n]}const D=u(null),O=h(S,{});function k(){let e=d(D);return m(e,`useAlertContext hook used outside of Alert parent!`),e}const A=e=>{let t=c(6),{children:n,intent:r,redirectDismissFocus:i}=e,a=i===void 0||i,o;t[0]!==r||t[1]!==a?(o={intent:r,redirectDismissFocus:a},t[0]=r,t[1]=a,t[2]=o):o=t[2];let s=o,l;return t[3]!==n||t[4]!==s?(l=h(D.Provider,{value:s,children:n}),t[3]=n,t[4]=s,t[5]=l):l=t[5],l},j=C(`relative flex w-full gap-1.5 rounded-md border p-2.5 text-sm font-sans`,{variants:{intent:{danger:`border-danger-500/50 bg-danger-500/10 text-danger-700 [&_code]:bg-danger-500/10 [&_code]:border-danger-500/20 [&_code]:text-danger-900 [&_a:not([data-slot=button])]:text-danger-700 [&_a:not([data-slot=button])]:underline`,important:`border-important-500/50 bg-important-500/10 text-important-700 [&_code]:bg-important-500/10 [&_code]:border-important-500/20 [&_code]:text-important-900 [&_a:not([data-slot=button])]:text-important-700 [&_a:not([data-slot=button])]:underline`,info:`border-info-500/50 bg-info-500/10 text-info-700 [&_code]:bg-info-500/10 [&_code]:border-info-500/20 [&_code]:text-info-900 [&_a:not([data-slot=button])]:text-info-700 [&_a:not([data-slot=button])]:underline`,success:`border-success-500/50 bg-success-500/10 text-success-700 [&_code]:bg-success-500/10 [&_code]:border-success-500/20 [&_code]:text-success-900 [&_a:not([data-slot=button])]:text-success-700 [&_a:not([data-slot=button])]:underline`,warning:`border-warning-500/50 bg-warning-500/10 text-warning-700 [&_code]:bg-warning-500/10 [&_code]:border-warning-500/20 [&_code]:text-warning-900 [&_a:not([data-slot=button])]:text-warning-700 [&_a:not([data-slot=button])]:underline`},appearance:{banner:`border-x-0 border-t-0 rounded-none z-50 sticky`,default:``}}}),M=e=>{let t=c(22),r,i,o,s,l,u;t[0]===e?(r=t[1],i=t[2],o=t[3],s=t[4],l=t[5],u=t[6]):({appearance:u,className:r,intent:i,ref:s,style:l,...o}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=o,t[4]=s,t[5]=l,t[6]=u);let d=u===void 0?`default`:u,f;t[7]!==d||t[8]!==r||t[9]!==i?(f=n(j({appearance:d,intent:i}),`has-data-alert-dismiss:pr-10`,`has-data-alert-expand:[&_[data-slot=alert-dismiss-icon-button]]:right-16`,`md:has-data-alert-expand:[&_[data-slot=alert-dismiss-icon-button]]:right-24`,`has-data-alert-expand:[&_[data-slot=alert-content]]:pr-12`,`md:has-data-alert-expand:[&_[data-slot=alert-content]]:pr-[5.5rem]`,r),t[7]=d,t[8]=r,t[9]=i,t[10]=f):f=t[10];let p;t[11]!==i||t[12]!==l?(p=a({"--alert-control-color":R(i),"--alert-control-hover-color":z(i),"--alert-control-hover-bg":B(i),...l}),t[11]=i,t[12]=l,t[13]=p):p=t[13];let m;t[14]!==o||t[15]!==s||t[16]!==f||t[17]!==p?(m=h(`div`,{ref:s,"data-slot":`alert`,className:f,style:p,...o}),t[14]=o,t[15]=s,t[16]=f,t[17]=p,t[18]=m):m=t[18];let g;return t[19]!==i||t[20]!==m?(g=h(A,{intent:i,children:m}),t[19]=i,t[20]=m,t[21]=g):g=t[21],g},N={danger:h(b,{}),important:h(y,{mirrored:!0}),info:h(v,{}),success:h(_,{}),warning:h(x,{})},P=e=>{let t=c(12),i,a,o,s;t[0]===e?(i=t[1],a=t[2],o=t[3],s=t[4]):({className:i,ref:o,svg:s,...a}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=o,t[4]=s);let l=k(),u=N[l.intent],d;t[5]===i?d=t[6]:(d=n(`size-5`,i),t[5]=i,t[6]=d);let f=s??u,p;return t[7]!==a||t[8]!==o||t[9]!==d||t[10]!==f?(p=h(r,{ref:o,"data-slot":`alert-icon`,className:d,svg:f,...a}),t[7]=a,t[8]=o,t[9]=d,t[10]=f,t[11]=p):p=t[11],p},F=e=>{let t=c(10),r,i,a;t[0]===e?(r=t[1],i=t[2],a=t[3]):({className:r,ref:a,...i}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a);let o;t[4]===r?o=t[5]:(o=n(`min-w-0 flex-1 has-data-alert-dismiss:pr-6`,r),t[4]=r,t[5]=o);let s;return t[6]!==i||t[7]!==a||t[8]!==o?(s=h(`div`,{ref:a,"data-slot":`alert-content`,className:o,...i}),t[6]=i,t[7]=a,t[8]=o,t[9]=s):s=t[9],s},I=e=>{let t=c(12),r,a,o,s;t[0]===e?(r=t[1],a=t[2],o=t[3],s=t[4]):({asChild:s,className:r,ref:o,...a}=e,t[0]=e,t[1]=r,t[2]=a,t[3]=o,t[4]=s);let l=s!==void 0&&s?i:`h5`,u;t[5]===r?u=t[6]:(u=n(`font-medium`,r),t[5]=r,t[6]=u);let d;return t[7]!==l||t[8]!==a||t[9]!==o||t[10]!==u?(d=h(l,{ref:o,"data-slot":`alert-title`,className:u,...a}),t[7]=l,t[8]=a,t[9]=o,t[10]=u,t[11]=d):d=t[11],d},L=e=>{let t=c(12),r,a,o,s;t[0]===e?(r=t[1],a=t[2],o=t[3],s=t[4]):({asChild:s,className:r,ref:o,...a}=e,t[0]=e,t[1]=r,t[2]=a,t[3]=o,t[4]=s);let l=s!==void 0&&s?i:`div`,u;t[5]===r?u=t[6]:(u=n(`text-sm`,r),t[5]=r,t[6]=u);let d;return t[7]!==l||t[8]!==a||t[9]!==o||t[10]!==u?(d=h(l,{ref:o,"data-slot":`alert-description`,className:u,...a}),t[7]=l,t[8]=a,t[9]=o,t[10]=u,t[11]=d):d=t[11],d},R=e=>`var(--color-${e}-700)`,z=e=>`var(--color-${e}-800)`,B=e=>`color-mix(in oklab, var(--color-${e}-500) 10%, transparent)`;function V(t){let n=c(8),{buttonRef:r,enabled:i}=t,a;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=[],n[0]=a):a=n[0];let o=p(a),s,l;n[1]!==r||n[2]!==i?(s=()=>{if(i)return()=>{let e=r.current;if(e==null||document.activeElement!==e)return;let t=e.closest(`[data-slot~="alert"]`)??e;o.current=E(t)}},l=[r,i],n[1]=r,n[2]=i,n[3]=s,n[4]=l):(s=n[3],l=n[4]),e(s,l);let u,d;n[5]===i?(u=n[6],d=n[7]):(u=()=>{if(i)return()=>{let e=o.current;if(o.current=[],e.length===0)return;let{activeElement:t}=document;if(t==null||t===document.body){for(let t of e)if(t.isConnected&&T(t)&&(t.focus(),document.activeElement===t))return}}},d=[i],n[5]=i,n[6]=u,n[7]=d),f(u,d)}const H={Root:M,Content:F,ExpandButton:e=>{let t=c(21),r,i,a,s;t[0]===e?(r=t[1],i=t[2],a=t[3],s=t[4]):({count:i,expanded:a,className:r,...s}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a,t[4]=s);let u=a?`Collapse additional alerts`:`Show ${i} more ${i===1?`alert`:`alerts`}`,d=a&&`-rotate-180`,f;t[5]===d?f=t[6]:(f=n(`size-4 transition-transform ease-out duration-150`,d),t[5]=d,t[6]=f);let p;t[7]===f?p=t[8]:(p=h(l,{weight:`bold`,className:f}),t[7]=f,t[8]=p);let m;t[9]===r?m=t[10]:(m=n(`right-1.5 top-1.5 absolute gap-1 ps-1.5 pe-1`,`text-[var(--alert-control-color,currentColor)]`,`not-disabled:hover:bg-[var(--alert-control-hover-bg,transparent)] not-disabled:hover:text-[var(--alert-control-hover-color,currentColor)]`,r),t[9]=r,t[10]=m);let _;t[11]===i?_=t[12]:(_=g(`span`,{className:`min-w-[2ch] text-center tabular-nums`,children:[`+`,i]}),t[11]=i,t[12]=_);let v;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(v=h(`span`,{className:`hidden md:inline`,children:`more`}),t[13]=v):v=t[13];let y;return t[14]!==a||t[15]!==s||t[16]!==u||t[17]!==p||t[18]!==m||t[19]!==_?(y=g(o,{type:`button`,appearance:`ghost`,intent:`neutral`,size:`sm`,"aria-expanded":a,"aria-label":u,"data-slot":`alert-expand-button`,"data-alert-expand":!0,icon:p,iconPlacement:`end`,className:m,...s,children:[_,v]}),t[14]=a,t[15]=s,t[16]=u,t[17]=p,t[18]=m,t[19]=_,t[20]=y):y=t[20],y},Description:L,DismissIconButton:e=>{let r=c(22),i,a,o,l,u,f,m,g;r[0]===e?(i=r[1],a=r[2],o=r[3],l=r[4],u=r[5],f=r[6],m=r[7],g=r[8]):({size:l,type:u,label:f,appearance:m,className:i,icon:g,ref:o,...a}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=l,r[5]=u,r[6]=f,r[7]=m,r[8]=g);let _=l===void 0?`sm`:l,v=u===void 0?`button`:u,y=f===void 0?`Dismiss Alert`:f,b=m===void 0?`ghost`:m,x=g===void 0?O:g,S=d(D),C=p(null),w=t(C,o),T=S?.redirectDismissFocus??!0,E;r[9]===T?E=r[10]:(E={buttonRef:C,enabled:T},r[9]=T,r[10]=E),V(E);let k;r[11]===i?k=r[12]:(k=n(`right-1.5 top-1.5 absolute`,`text-[var(--alert-control-color,currentColor)]`,`not-disabled:hover:bg-[var(--alert-control-hover-bg,transparent)] not-disabled:hover:text-[var(--alert-control-hover-color,currentColor)]`,i),r[11]=i,r[12]=k);let A;return r[13]!==b||r[14]!==w||r[15]!==x||r[16]!==y||r[17]!==a||r[18]!==_||r[19]!==k||r[20]!==v?(A=h(s,{ref:w,appearance:b,icon:x,intent:`neutral`,label:y,size:_,"data-slot":`alert-dismiss-icon-button`,"data-alert-dismiss":!0,className:k,type:v,...a}),r[13]=b,r[14]=w,r[15]=x,r[16]=y,r[17]=a,r[18]=_,r[19]=k,r[20]=v,r[21]=A):A=r[21],A},Icon:P,Title:I};export{A as n,H as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./icon-BT8FnkkJ.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{t as r}from"./slot-BsvE2ntj.js";import{c as i}from"react/compiler-runtime";import{Children as a,cloneElement as o,isValidElement as s}from"react";import c from"tiny-invariant";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";const f=t=>e(`cursor-pointer rounded bg-transparent text-accent-600 hover:underline focus:outline-hidden focus-visible:ring-3 focus-visible:ring-focus-accent`,t),p=e=>{let p=i(72),g,_,v,y,b,x,S,C,w;p[0]===e?(g=p[1],_=p[2],v=p[3],y=p[4],b=p[5],x=p[6],S=p[7],C=p[8],w=p[9]):({"data-slot":y,asChild:g,children:_,className:v,rel:x,icon:b,iconPlacement:w,ref:C,...S}=e,p[0]=e,p[1]=g,p[2]=_,p[3]=v,p[4]=y,p[5]=b,p[6]=x,p[7]=S,p[8]=C,p[9]=w);let T=w===void 0?`start`:w,E;p[10]===x?E=p[11]:(E=h(x),p[10]=x,p[11]=E);let D=E;if(g){let e,i,h,g,x,w,E;if(p[12]!==_||p[13]!==v||p[14]!==y||p[15]!==b||p[16]!==T||p[17]!==S||p[18]!==C||p[19]!==D){let O=a.only(_);c(s(O),"When using `asChild`, Anchor must be passed a single child as a JSX tag.");let k=O.props?.children,A=S.target===`_blank`||O.props?.target===`_blank`;e=r,p[27]===y?i=p[28]:(i=n(y,`anchor`),p[27]=y,p[28]=i),p[29]===v?h=p[30]:(h=f(v),p[29]=v,p[30]=h),g=C,p[31]!==A||p[32]!==D?(x=D??m(A),p[31]=A,p[32]=D,p[33]=x):x=p[33],w=S;let j;p[34]!==b||p[35]!==T?(j=b&&T===`start`&&u(t,{className:`inline-block mr-1.5`,svg:b}),p[34]=b,p[35]=T,p[36]=j):j=p[36];let M;p[37]!==b||p[38]!==T?(M=b&&T===`end`&&u(t,{className:`inline-block ml-1.5`,svg:b}),p[37]=b,p[38]=T,p[39]=M):M=p[39],E=o(O,{},d(l,{children:[j,u(`span`,{"data-slot":`anchor-label`,children:k}),M]})),p[12]=_,p[13]=v,p[14]=y,p[15]=b,p[16]=T,p[17]=S,p[18]=C,p[19]=D,p[20]=e,p[21]=i,p[22]=h,p[23]=g,p[24]=x,p[25]=w,p[26]=E}else e=p[20],i=p[21],h=p[22],g=p[23],x=p[24],w=p[25],E=p[26];let O;return p[40]!==e||p[41]!==i||p[42]!==h||p[43]!==g||p[44]!==x||p[45]!==w||p[46]!==E?(O=u(e,{"data-slot":i,className:h,ref:g,rel:x,...w,children:E}),p[40]=e,p[41]=i,p[42]=h,p[43]=g,p[44]=x,p[45]=w,p[46]=E,p[47]=O):O=p[47],O}let O;p[48]===y?O=p[49]:(O=n(y,`anchor`),p[48]=y,p[49]=O);let k;p[50]===v?k=p[51]:(k=f(v),p[50]=v,p[51]=k);let A;p[52]!==S||p[53]!==D?(A=D??m(S.target===`_blank`),p[52]=S,p[53]=D,p[54]=A):A=p[54];let j;p[55]!==b||p[56]!==T?(j=b&&T===`start`&&u(t,{className:`inline-block mr-1.5`,svg:b}),p[55]=b,p[56]=T,p[57]=j):j=p[57];let M;p[58]===_?M=p[59]:(M=u(`span`,{"data-slot":`anchor-label`,children:_}),p[58]=_,p[59]=M);let N;p[60]!==b||p[61]!==T?(N=b&&T===`end`&&u(t,{className:`inline-block ml-1.5`,svg:b}),p[60]=b,p[61]=T,p[62]=N):N=p[62];let P;return p[63]!==S||p[64]!==C||p[65]!==O||p[66]!==k||p[67]!==A||p[68]!==j||p[69]!==M||p[70]!==N?(P=d(`a`,{"data-slot":O,className:k,ref:C,rel:A,...S,children:[j,M,N]}),p[63]=S,p[64]=C,p[65]=O,p[66]=k,p[67]=A,p[68]=j,p[69]=M,p[70]=N,p[71]=P):P=p[71],P};function m(e){return e?`noopener noreferrer`:void 0}function h(e){return Array.isArray(e)?[...new Set(e)].map(e=>e?.trim()).filter(Boolean).toSorted().join(` `)||void 0:e?.trim()||void 0}export{f as n,h as r,p as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./slot-BsvE2ntj.js";import{c as n}from"react/compiler-runtime";import{jsx as r}from"react/jsx-runtime";import{cva as i}from"class-variance-authority";const a=i(`border-form inline-flex items-center rounded-md`,{variants:{appearance:{panel:`bg-form gap-0.5 border p-0.75 [--icon-button-border-radius:0.125rem] [&>.separator]:mx-px`,ghost:`gap-0.5`,outlined:``}}}),o=i=>{let o=n(16),s,c,l,u,d,f;o[0]===i?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],f=o[6]):({appearance:s,asChild:c,className:u,children:l,ref:f,...d}=i,o[0]=i,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f);let p=c?t:`div`,m;o[7]!==s||o[8]!==u?(m=e(a({appearance:s}),u),o[7]=s,o[8]=u,o[9]=m):m=o[9];let h;return o[10]!==p||o[11]!==l||o[12]!==d||o[13]!==f||o[14]!==m?(h=r(p,{"data-slot":`button-group`,className:m,ref:f,...d,children:l}),o[10]=p,o[11]=l,o[12]=d,o[13]=f,o[14]=m,o[15]=h):h=o[15],h};export{o as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./icon-BT8FnkkJ.js";import{t as n}from"./slot-BsvE2ntj.js";import{t as r}from"./booleanish-BfvnW6vy.js";import{t as i}from"./clsx-DUGZgXfJ.js";import{c as a}from"react/compiler-runtime";import{Children as o,cloneElement as s,isValidElement as c}from"react";import l from"tiny-invariant";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";import{cva as p}from"class-variance-authority";import{CircleNotchIcon as m}from"@phosphor-icons/react/CircleNotch";const h=p(``,{variants:{appearance:{filled:`bg-filled-accent text-white focus-visible:ring-focus-accent not-disabled:hover:bg-filled-accent-hover border border-transparent text-sm font-medium`,ghost:`text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 border border-transparent text-sm font-medium`,outlined:`border-accent-600 bg-form text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-accent-700 not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 border text-sm font-medium`,link:`text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:underline group/button-link border-transparent`},isLoading:{false:``,true:`opacity-50`},intent:{accent:``,danger:``,neutral:``},size:{xs:``,sm:``,md:``,lg:``,xl:``}},defaultVariants:{isLoading:!1,size:`md`},compoundVariants:[{appearance:[`filled`,`ghost`,`outlined`],size:`xs`,class:`h-6 px-2`},{appearance:[`filled`,`ghost`,`outlined`],size:`sm`,class:`h-7 px-2.5`},{appearance:[`filled`,`ghost`,`outlined`],size:`md`,class:`h-9 px-3`},{appearance:[`filled`,`ghost`,`outlined`],size:`lg`,class:`h-10 px-3.5`},{appearance:[`filled`,`ghost`,`outlined`],size:`xl`,class:`h-12 px-4`},{appearance:`ghost`,intent:`danger`,class:`text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700 border-transparent`},{appearance:`outlined`,intent:`danger`,class:`border-danger-600 bg-form text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:border-danger-700 not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700`},{appearance:`filled`,intent:`danger`,class:`bg-filled-danger focus-visible:ring-focus-danger not-disabled:hover:bg-filled-danger-hover border-transparent`},{appearance:`link`,intent:`danger`,class:`text-danger-600 focus-visible:ring-focus-danger`},{appearance:`ghost`,intent:`neutral`,class:`text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong border-transparent`},{appearance:`outlined`,intent:`neutral`,class:`border-form bg-form text-strong focus-visible:border-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-neutral-400 not-disabled:hover:bg-form-hover not-disabled:hover:text-strong focus-visible:not-disabled:hover:border-accent-600 focus-visible:not-disabled:active:border-accent-600`},{appearance:`filled`,intent:`neutral`,class:`bg-filled-neutral not-disabled:hover:bg-filled-neutral-hover border-transparent focus-visible:border-transparent text-neutral-50`},{appearance:`link`,intent:`neutral`,class:`text-strong focus-visible:ring-focus-accent`}]}),g={xs:`ps-1.5`,sm:`ps-2`,md:`ps-2.5`,lg:`ps-3`,xl:`ps-3.5`},_={xs:`pe-1.5`,sm:`pe-2`,md:`pe-2.5`,lg:`pe-3`,xl:`pe-3.5`},v=p=>{let v=a(66),b,x,S,C,w,T,E,D,O,k,A,j,M,N;v[0]===p?(b=v[1],x=v[2],S=v[3],C=v[4],w=v[5],T=v[6],E=v[7],D=v[8],O=v[9],k=v[10],A=v[11],j=v[12],M=v[13],N=v[14]):({"aria-disabled":b,appearance:S,asChild:C,children:w,className:T,disabled:x,icon:D,iconPlacement:A,intent:E,isLoading:j,ref:k,size:M,type:N,...O}=p,v[0]=p,v[1]=b,v[2]=x,v[3]=S,v[4]=C,v[5]=w,v[6]=T,v[7]=E,v[8]=D,v[9]=O,v[10]=k,v[11]=A,v[12]=j,v[13]=M,v[14]=N);let P=A===void 0?`start`:A,F=j!==void 0&&j,I=M===void 0?`md`:M,L;v[15]!==b||v[16]!==x||v[17]!==F?(L=r(x??F)||r(b),v[15]=b,v[16]=x,v[17]=F,v[18]=L):L=v[18];let R=L,z;v[19]!==F||v[20]!==D?(z=F?d(m,{className:`animate-spin`}):D,v[19]=F,v[20]=D,v[21]=z):z=v[21];let B=z,V=B&&S!==`link`,H;v[22]!==S||v[23]!==T||v[24]!==V||v[25]!==P||v[26]!==E||v[27]!==F||v[28]!==I?(H=e(`inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md`,`focus:outline-hidden focus-visible:ring-4`,`disabled:cursor-default disabled:opacity-50`,`aria-disabled:cursor-default aria-disabled:opacity-50`,`not-disabled:active:scale-97 ease-out transition-transform duration-150`,h({appearance:S,intent:E,isLoading:F,size:I}),S!==`link`&&`font-sans`,V&&P===`start`&&g[I],V&&P===`end`&&_[I],T),v[22]=S,v[23]=T,v[24]=V,v[25]=P,v[26]=E,v[27]=F,v[28]=I,v[29]=H):H=v[29];let U=S===`link`?void 0:I,W;v[30]!==S||v[31]!==R||v[32]!==E||v[33]!==F||v[34]!==O||v[35]!==k||v[36]!==H||v[37]!==U?(W={"aria-disabled":R,"data-slot":`button`,className:H,"data-appearance":S,"data-disabled":R,"data-intent":E,"data-loading":F,"data-size":U,ref:k,...O},v[30]=S,v[31]=R,v[32]=E,v[33]=F,v[34]=O,v[35]=k,v[36]=H,v[37]=U,v[38]=W):W=v[38];let G=W;if(C){l(c(w)&&o.only(w),"When using `asChild`, Button must be passed a single child as a JSX tag.");let e;if(v[39]!==w||v[40]!==R||v[41]!==B||v[42]!==P){let n;v[44]!==B||v[45]!==P?(n=B&&d(t,{svg:B,className:i(P===`end`&&`order-last`)}),v[44]=B,v[45]=P,v[46]=n):n=v[46];let r;v[47]===w.props.children?r=v[48]:(r=d(`span`,{"data-slot":`button-label`,className:`contents`,children:w.props.children}),v[47]=w.props.children,v[48]=r);let a;v[49]!==n||v[50]!==r?(a=f(u,{children:[n,r]}),v[49]=n,v[50]=r,v[51]=a):a=v[51],e=s(w,R?y:{},a),v[39]=w,v[40]=R,v[41]=B,v[42]=P,v[43]=e}else e=v[43];let r;return v[52]!==G||v[53]!==e?(r=d(n,{...G,children:e}),v[52]=G,v[53]=e,v[54]=r):r=v[54],r}let K=N??`button`,q;v[55]!==B||v[56]!==P?(q=B&&d(t,{svg:B,className:i(P===`end`&&`order-last`)}),v[55]=B,v[56]=P,v[57]=q):q=v[57];let J;v[58]===w?J=v[59]:(J=d(`span`,{"data-slot":`button-label`,className:`contents`,children:w}),v[58]=w,v[59]=J);let Y;return v[60]!==G||v[61]!==R||v[62]!==q||v[63]!==J||v[64]!==K?(Y=f(`button`,{...G,disabled:R,type:K,children:[q,J]}),v[60]=G,v[61]=R,v[62]=q,v[63]=J,v[64]=K,v[65]=Y):Y=v[65],Y},y={tabIndex:-1,onClickCapture:e=>{e.preventDefault(),e.stopPropagation()}};export{y as n,v as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./cx-0HCjnNv1.js";import{t}from"./icon-BT8FnkkJ.js";import{t as n}from"./slot-BsvE2ntj.js";import{t as r}from"./booleanish-BfvnW6vy.js";import{n as i}from"./button-Dij5vCQG.js";import{t as a}from"./button-B52_vczK.js";import{c as o}from"react/compiler-runtime";import{Children as s,cloneElement as c,isValidElement as l}from"react";import u from"tiny-invariant";import{jsx as d}from"react/jsx-runtime";import{CircleNotchIcon as f}from"@phosphor-icons/react/CircleNotch";const p=p=>{let m=o(52),h,g,_,v,y,b,x,S,C,w,T,E,D,O;m[0]===p?(h=m[1],g=m[2],_=m[3],v=m[4],y=m[5],b=m[6],x=m[7],S=m[8],C=m[9],w=m[10],T=m[11],E=m[12],D=m[13],O=m[14]):({"aria-disabled":h,appearance:_,asChild:T,children:v,className:y,disabled:g,icon:S,intent:b,isLoading:E,label:x,ref:w,size:D,type:O,...C}=p,m[0]=p,m[1]=h,m[2]=g,m[3]=_,m[4]=v,m[5]=y,m[6]=b,m[7]=x,m[8]=S,m[9]=C,m[10]=w,m[11]=T,m[12]=E,m[13]=D,m[14]=O);let k=T!==void 0&&T,A=E!==void 0&&E,j=D===void 0?`md`:D,M;m[15]!==h||m[16]!==g||m[17]!==A?(M=r(g??A)||r(h),m[15]=h,m[16]=g,m[17]=A,m[18]=M):M=m[18];let N=M,P;m[19]!==A||m[20]!==S?(P=A?d(f,{className:`animate-spin`}):S,m[19]=A,m[20]=S,m[21]=P):P=m[21];let F=P,I;m[22]!==_||m[23]!==y||m[24]!==b||m[25]!==A||m[26]!==j?(I=e(a({appearance:_,intent:b,isLoading:A,size:j}),y),m[22]=_,m[23]=y,m[24]=b,m[25]=A,m[26]=j,m[27]=I):I=m[27];let L;m[28]!==_||m[29]!==N||m[30]!==b||m[31]!==A||m[32]!==x||m[33]!==C||m[34]!==w||m[35]!==j||m[36]!==I?(L={"aria-disabled":N,"data-slot":`icon-button`,className:I,"data-appearance":_,"data-disabled":N,"data-icon-button":!0,"data-intent":b,"data-loading":A,"data-size":j,ref:w,...C,"aria-label":x},m[28]=_,m[29]=N,m[30]=b,m[31]=A,m[32]=x,m[33]=C,m[34]=w,m[35]=j,m[36]=I,m[37]=L):L=m[37];let R=L,z;m[38]===F?z=m[39]:(z=d(t,{svg:F}),m[38]=F,m[39]=z);let B=z;if(k){u(l(v)&&s.only(v),"When using `asChild`, IconButton must be passed a single child as a JSX tag.");let e;m[40]!==v||m[41]!==N||m[42]!==B?(e=c(v,N?i:{},B),m[40]=v,m[41]=N,m[42]=B,m[43]=e):e=m[43];let t;return m[44]!==R||m[45]!==e?(t=d(n,{...R,children:e}),m[44]=R,m[45]=e,m[46]=t):t=m[46],t}let V=O??`button`,H;return m[47]!==R||m[48]!==N||m[49]!==B||m[50]!==V?(H=d(`button`,{...R,disabled:N,type:V,children:B}),m[47]=R,m[48]=N,m[49]=B,m[50]=V,m[51]=H):H=m[51],H};export{p as t};
@@ -1,2 +0,0 @@
1
- import{n as e,t}from"./compose-refs-sFdxsL7k.js";import{t as n}from"./cx-0HCjnNv1.js";import{t as r}from"./data-slot-EM6s2WEU.js";import{t as i}from"./button-pwkdtR3U.js";import{t as a}from"./use-copy-to-clipboard-ByLT8veV.js";import{t as o}from"./alternate-announcement-BkH4bOKp.js";import{t as s}from"./live-region-B2vJRvPH.js";import{c}from"react/compiler-runtime";import{createContext as l,useContext as u,useEffect as d,useId as f,useLayoutEffect as p,useRef as m,useState as h,useSyncExternalStore as g}from"react";import _ from"tiny-invariant";import{Fragment as v,jsx as y,jsxs as b}from"react/jsx-runtime";import{CheckIcon as x}from"@phosphor-icons/react/Check";import{CopyIcon as S}from"@phosphor-icons/react/Copy";import{scaleTime as C}from"d3-scale";import{area as w,curveLinear as T,curveMonotoneX as E,curveStep as D,line as O}from"d3-shape";const k=(e,t)=>Reflect.get(e,t),A=e=>{let{step:t,slot:n}=e,r=Math.min(64,Math.max(24,t*.6));return Math.min(n,r)},j=.5,M=(e,t)=>e<0?e:t,N=e=>{let{lower:t,upper:n,toPixel:r,reveal:i,gap:a}=e,o=r(t<0?n:t),s=o+(r(M(t,n))-o)*i;if(Math.abs(o-r(0))<j)return{baseline:o,value:s};let c=Math.min(a,Math.abs(o-s)/2);return{baseline:o-Math.sign(o-s)*c,value:s}},P=e=>{let{lower:t,upper:n,pileOuter:r,toPixel:i}=e;if(Number.isNaN(r))return!1;let a=i(M(t,n));return Math.abs(a-i(r))<j},F=[`chart-1`,`chart-2`,`chart-3`,`chart-4`,`chart-5`,`chart-6`,`chart-7`,`chart-8`,`chart-other`],I=e=>F.includes(e),L=e=>`--color-${e}`,R=`var(--color-chart-decorative)`,ee=[`chart-1`,`chart-2`,`chart-3`,`chart-4`,`chart-5`,`chart-6`,`chart-7`,`chart-8`],z=e=>{let t=e.toLowerCase();return t.includes(`var(`)||t.includes(`currentcolor`)},B=(e,t)=>{let n=e.ownerDocument,r=n.createElement(`span`);r.style.display=`none`,r.style.color=t,e.appendChild(r);let i=n.defaultView?.getComputedStyle(r).color??``;return r.remove(),i},te=(e,t)=>I(t)?B(e,`var(${L(t)})`):z(t)?B(e,t):t,ne=e=>({grid:B(e,`var(--border-color-card-muted)`),baseline:B(e,`var(--border-color-card)`),tickText:B(e,`var(--text-color-muted)`),reference:B(e,`var(--color-neutral-500)`),surface:B(e,`var(--background-color-card)`)}),re=e=>`${e.className}|${e.getAttribute(`data-applied-theme`)??``}|${e.getAttribute(`data-theme`)??``}`,ie=(e,t)=>{let n=new MutationObserver(t);return n.observe(e,{attributes:!0,attributeFilter:[`class`,`data-applied-theme`,`data-theme`]}),()=>n.disconnect()},ae=1.5,V=1.1,H=1.6,U=e=>`oklch(from ${e} calc(l - 0.18) c h)`,W=(e,t,n)=>{let r=ae;if(n===`up`){e.moveTo(-1.5,t+r),e.lineTo(t+r,-1.5),e.moveTo(-1.5,r),e.lineTo(r,-1.5),e.moveTo(t-r,t+r),e.lineTo(t+r,t-r);return}e.moveTo(-1.5,-1.5),e.lineTo(t+r,t+r),e.moveTo(t-r,-1.5),e.lineTo(t+r,r),e.moveTo(-1.5,t-r),e.lineTo(r,t+r)},oe=(e,t)=>{let{size:n,width:r}=t;e.fillRect(0,n/2-r/2,n,r)},se=(e,t)=>{let{size:n,width:r}=t;e.fillRect(n/2-r/2,0,r,n)},ce={hatch:(e,{size:t,ink:n})=>{e.strokeStyle=n,e.lineWidth=ae,e.beginPath(),W(e,t,`up`),e.stroke()},"hatch-reverse":(e,{size:t,ink:n})=>{e.strokeStyle=n,e.lineWidth=ae,e.beginPath(),W(e,t,`down`),e.stroke()},crosshatch:(e,{size:t,ink:n})=>{e.strokeStyle=n,e.lineWidth=1,e.beginPath(),W(e,t,`up`),W(e,t,`down`),e.stroke()},perpendicular:(e,{size:t,ink:n,orientation:r})=>{e.fillStyle=n,r===`horizontal`?se(e,{size:t,width:2}):oe(e,{size:t,width:2})},parallel:(e,{size:t,ink:n,orientation:r})=>{e.fillStyle=n,r===`horizontal`?oe(e,{size:t,width:2}):se(e,{size:t,width:2})},grid:(e,{size:t,ink:n})=>{e.fillStyle=n,oe(e,{size:t,width:V}),se(e,{size:t,width:V})},dots:(e,{size:t,ink:n})=>{e.fillStyle=n,e.beginPath(),e.arc(t/4,t/4,H,0,Math.PI*2),e.moveTo(3*t/4+H,3*t/4),e.arc(3*t/4,3*t/4,H,0,Math.PI*2),e.fill()}},le=(e,t)=>{let{texture:n,color:r,ink:i,devicePixelRatio:a,orientation:o}=t,s=e.canvas.ownerDocument.createElement(`canvas`);s.width=Math.max(1,Math.round(8*a)),s.height=s.width;let c=s.getContext(`2d`);if(c==null)return null;let l=s.width/8;c.scale(l,l),c.fillStyle=r,c.fillRect(0,0,8,8),ce[n](c,{size:8,ink:i,orientation:o});let u=e.createPattern(s,`repeat`);return u?.setTransform({a:1/l,b:0,c:0,d:1/l,e:0,f:0}),u},ue=e=>{let{pointCount:t,columnCount:n,wasDecimated:r}=e;return n<=0?!1:r?t>=n*3:t>=n*4},de=e=>{let{xs:t,values:n,startIndex:r,endIndex:i,positionK:a,positionB:o,columnCount:s}=e,c=new Uint8Array(s),l=new Float64Array(s),u=new Float64Array(s),d=new Float64Array(s),f=new Float64Array(s);for(let e=r;e<=i;e++){let r=n[e]??NaN;if(Number.isNaN(r))continue;let i=t[e]??NaN,p=Math.floor(i*a+o);if(p===s&&(p=s-1),!(p<0||p>=s)){if(c[p]===0){c[p]=1,l[p]=r,u[p]=r,d[p]=r,f[p]=r;continue}r<(l[p]??1/0)&&(l[p]=r),r>(u[p]??-1/0)&&(u[p]=r),f[p]=r}}return{columnCount:s,hasData:c,minValue:l,maxValue:u,inValue:d,outValue:f}},fe=new Intl.NumberFormat,pe=new Intl.NumberFormat(void 0,{maximumSignificantDigits:4}),me=new Map,G=(e,t)=>{let n=Object.is(e,-0)?0:e,r=t?.maximumFractionDigits;if(r!=null){let e=me.get(r);return e??(e=new Intl.NumberFormat(void 0,{maximumFractionDigits:r}),me.set(r,e)),e.format(n)}return n!==0&&Math.abs(n)<1?pe.format(n):fe.format(n)},he=e=>!Number.isFinite(e)||e<=0?0:Math.min(20,Math.max(0,-Math.floor(Math.log10(e)))),ge=new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`}),_e=new Intl.DateTimeFormat(void 0,{year:`numeric`,month:`short`,day:`numeric`}),ve=e=>e.getHours()!==0||e.getMinutes()!==0||e.getSeconds()!==0||e.getMilliseconds()!==0,K=(e,t)=>typeof e==`string`?e:typeof e==`number`?G(e):Number.isNaN(e.getTime())?`—`:t?.datasetHasTimeOfDay??ve(e)?ge.format(e):_e.format(e),ye=(e,t,n)=>{if(t<=0)return null;let r=0,i=t-1,a=e[0]??0,o=e[i]??0;if(n<=a)return 0;if(n>=o)return i;for(;i-r>1;){let t=r+i>>1;(e[t]??0)<=n?r=t:i=t}let s=n-(e[r]??0);return(e[i]??0)-n<s?i:r},be=Math.PI/2-.05,xe=e=>({cosYaw:Math.cos(e.yaw),sinYaw:Math.sin(e.yaw),cosPitch:Math.cos(e.pitch),sinPitch:Math.sin(e.pitch)}),Se=(e,t,n,r)=>{let i=e*r.cosYaw+n*r.sinYaw,a=-e*r.sinYaw+n*r.cosYaw,o=t*r.cosPitch-a*r.sinPitch,s=t*r.sinPitch+a*r.cosPitch,c=4/(4+s);return{x:i*c,y:o*c,depth:s,scale:c}},Ce=e=>Math.min(be,Math.max(-be,e)),q=(e,t)=>{let n=t[1]-t[0];return n===0?0:(e-t[0])/n*2-1},we=[[-1,-1,-1],[1,-1,-1],[1,1,-1],[-1,1,-1],[-1,-1,1],[1,-1,1],[1,1,1],[-1,1,1]],Te=[[0,1],[1,2],[2,3],[3,0],[4,5],[5,6],[6,7],[7,4],[0,4],[1,5],[2,6],[3,7]],Ee=Math.sqrt(50),De=Math.sqrt(10),Oe=Math.sqrt(2),J=(e,t,n,r)=>{let i=(t-e)/Math.max(0,n),a=r?.integer?Math.max(1,i):i,o=Math.floor(Math.log10(a)),s=a/10**o,c=s>=Ee?10:s>=De?5:s>=Oe?2:1,l,u,d;return o<0?(d=10**-o/c,l=Math.round(e*d),u=Math.round(t*d),l/d<e&&(l+=1),u/d>t&&--u,d=-d):(d=10**o*c,l=Math.round(e/d),u=Math.round(t/d),l*d<e&&(l+=1),u*d>t&&--u),u<l&&.5<=n&&n<2?J(e,t,n*2,r):[l,u,d]},ke=(e,t,n,r)=>{if(!(n>0))return[];if(e===t)return r?.integer&&!Number.isInteger(e)?[]:[e];let i=t<e,[a,o,s]=i?J(t,e,n,r):J(e,t,n,r);if(!(o>=a))return[];let c=o-a+1,l=[];for(let e=0;e<c;e+=1){let t=i?o-e:a+e;l.push(s<0?t/-s:t*s)}return l},Ae=(e,t,n)=>J(e,t,n)[2],je=(e,t)=>{let n=e[1]-e[0];if(n===0)return{k:0,b:(t[0]+t[1])/2};let r=(t[1]-t[0])/n;return{k:r,b:t[0]-e[0]*r}},Me=e=>{let{count:t,rangeStart:n,rangeEnd:r,paddingInner:i,paddingOuter:a}=e,o=r-n;if(t<=0||o<=0)return{count:Math.max(0,t),rangeStart:n,step:0,bandwidth:0,offset:0};let s=o/Math.max(1,t-i+a*2);return{count:t,rangeStart:n,step:s,bandwidth:s*(1-i),offset:s*a}},Y=(e,t)=>e.rangeStart+e.offset+t*e.step,X=(e,t)=>Y(e,t)+e.bandwidth/2,Ne=(e,t)=>({start:Y(e,t)-(e.step-e.bandwidth)/2,size:e.step}),Pe=(e,t)=>{if(e.count===0||e.step===0)return null;let n=Math.floor((t-e.rangeStart-e.offset+e.step/2-e.bandwidth/2)/e.step);return Math.min(e.count-1,Math.max(0,n))},Fe=(e,t,n)=>ke(e[0],e[1],t,n);let Ie=null,Le=null;const Re=e=>{if(Le!=null&&Ie!=null&&Ie[0]===e[0]&&Ie[1]===e[1])return Le;let t=C().domain([new Date(e[0]),new Date(e[1])]);return Ie=[e[0],e[1]],Le=t,t},ze=(e,t)=>Re(e).ticks(t).map(e=>e.getTime()),Be=e=>{let t=Re(e).tickFormat();return e=>t(new Date(e))},Z=(e,t)=>{if(e[0]>e[1])return Z([e[1],e[0]],t);if(e[0]===e[1]){let n=e[0],r=n===0?1:Math.abs(n)*.5;return Z([n-r,n+r],t)}let n=e[0],r=e[1],i=NaN;for(let e=0;e<10;e++){let e=Ae(n,r,t);if(e===i||e===0||!Number.isFinite(e))break;if(e>0)n=Math.floor(n/e)*e,r=Math.ceil(r/e)*e;else{let t=-e;n=Math.floor(n*t)/t,r=Math.ceil(r*t)/t}i=e}return[n,r]},Ve=(e,t)=>{let n=Z(e,t);return e[0]===0?[0,n[1]]:n},Q=e=>e===`monotone`?E:e===`step`?D:T,$=e=>Math.round(e)+.5,He=(e,t)=>{let{plot:n,color:r,xLines:i,yLines:a}=t;e.save(),e.strokeStyle=r,e.lineWidth=1;for(let t of i)e.globalAlpha=t.alpha,e.beginPath(),e.moveTo($(t.position),n.top),e.lineTo($(t.position),n.top+n.height),e.stroke();for(let t of a)e.globalAlpha=t.alpha,e.beginPath(),e.moveTo(n.left,$(t.position)),e.lineTo(n.left+n.width,$(t.position)),e.stroke();e.restore()},Ue=(e,t)=>{let{plot:n,color:r,y:i}=t;e.strokeStyle=r,e.lineWidth=1,e.beginPath(),e.moveTo(n.left,$(i)),e.lineTo(n.left+n.width,$(i)),e.stroke()},We=(e,t)=>{let{plot:n,color:r,x:i}=t;e.strokeStyle=r,e.lineWidth=1,e.beginPath(),e.moveTo($(i),n.top),e.lineTo($(i),n.top+n.height),e.stroke()},Ge=(e,t)=>{let{fill:n,rects:r}=t;e.fillStyle=n,e.beginPath();for(let t of r){let n=Math.max(.5,t.width),r=Math.min(t.valueY,t.baselineY),i=Math.abs(t.baselineY-t.valueY);if(i===0)continue;let a=t.rounded&&n>=8?Math.min(4,n/2,i):0;if(a===0){e.rect(t.x,r,n,i);continue}t.valueY<=t.baselineY?e.roundRect(t.x,r,n,i,[a,a,0,0]):e.roundRect(t.x,r,n,i,[0,0,a,a])}e.fill()},Ke=(e,t)=>{let{fill:n,rects:r}=t;e.fillStyle=n,e.beginPath();for(let t of r){let n=Math.max(.5,t.height),r=Math.min(t.valueX,t.baselineX),i=Math.abs(t.valueX-t.baselineX);if(i===0)continue;let a=t.rounded&&n>=8?Math.min(4,n/2,i):0;if(a===0){e.rect(r,t.y,i,n);continue}t.valueX>=t.baselineX?e.roundRect(r,t.y,i,n,[0,a,a,0]):e.roundRect(r,t.y,i,n,[a,0,0,a])}e.fill()},qe=(e,t)=>{let{color:n,curve:r,indexes:i,xAt:a,yAt:o,definedAt:s}=t,c=O().x(a).y(o).defined(s).curve(Q(r)).context(e);e.strokeStyle=n,e.lineWidth=2,e.lineJoin=`round`,e.lineCap=`round`,e.beginPath(),c(i),e.stroke()},Je=(e,t)=>{let{color:n,curve:r,indexes:i,xAt:a,y0At:o,y1At:s,definedAt:c}=t,l=w().x(a).y0(o).y1(s).defined(c).curve(Q(r)).context(e);e.beginPath(),l(i),e.save(),e.globalAlpha=.1,e.fillStyle=n,e.fill(),e.restore();let u=O().x(a).y(s).defined(c).curve(Q(r)).context(e);e.strokeStyle=n,e.lineWidth=2,e.lineJoin=`round`,e.lineCap=`round`,e.beginPath(),u(i),e.stroke()},Ye=(e,t)=>{let{color:n,columns:r,columnToX:i,valueK:a,valueB:o}=t;e.strokeStyle=n,e.lineWidth=2,e.lineJoin=`round`,e.lineCap=`round`,e.beginPath();let s=!1;for(let t=0;t<r.columnCount;t++){if(r.hasData[t]===0){s=!1;continue}let n=i(t),c=(r.inValue[t]??0)*a+o,l=(r.minValue[t]??0)*a+o,u=(r.maxValue[t]??0)*a+o,d=(r.outValue[t]??0)*a+o;s?e.lineTo(n,c):(e.moveTo(n,c),s=!0),(l!==c||u!==c)&&(e.lineTo(n,l),e.lineTo(n,u)),d!==u&&e.lineTo(n,d)}e.stroke()},Xe=(e,t)=>{let{color:n,lowerColumns:r,upperColumns:i,columnToX:a,valueK:o,valueB:s}=t;e.beginPath();let c=-1,l=t=>{if(c<0)return;let n=!1;for(let r=c;r<=t;r++){let t=a(r),c=(i.maxValue[r]??0)*o+s;n?e.lineTo(t,c):(e.moveTo(t,c),n=!0)}for(let n=t;n>=c;n--){let t=a(n),i=(r.minValue[n]??0)*o+s;e.lineTo(t,i)}e.closePath(),c=-1};for(let e=0;e<i.columnCount;e++){if(i.hasData[e]===0){l(e-1);continue}c<0&&(c=e)}l(i.columnCount-1),e.save(),e.globalAlpha=.1,e.fillStyle=n,e.fill(),e.restore(),Ye(e,{color:n,columns:i,columnToX:a,valueK:o,valueB:s})},Ze=(e,t,n,r,i)=>{let a=!1;for(let[o,s]of i)a?e.lineTo(t+o*r,n+s*r):(e.moveTo(t+o*r,n+s*r),a=!0);e.closePath()},Qe=[[-1/3,-1],[1/3,-1],[1/3,-1/3],[1,-1/3],[1,1/3],[1/3,1/3],[1/3,1],[-1/3,1],[-1/3,1/3],[-1,1/3],[-1,-1/3],[-1/3,-1/3]],$e=Qe.map(([e,t])=>[(e-t)/Math.SQRT2,(e+t)/Math.SQRT2]),et=Array.from({length:10},(e,t)=>{let n=-Math.PI/2+t*Math.PI/5,r=t%2==0?1:.382;return[Math.cos(n)*r,Math.sin(n)*r]}),tt={circle:(e,t,n,r)=>{e.arc(t,n,r,0,Math.PI*2)},square:(e,t,n,r)=>{let i=r*.886;e.moveTo(t-i,n-i),e.lineTo(t+i,n-i),e.lineTo(t+i,n+i),e.lineTo(t-i,n+i),e.closePath()},triangle:(e,t,n,r)=>{let i=r*1.55;e.moveTo(t,n-i),e.lineTo(t+i*.866,n+i*.5),e.lineTo(t-i*.866,n+i*.5),e.closePath()},diamond:(e,t,n,r)=>{let i=r*1.253;e.moveTo(t,n-i),e.lineTo(t+i,n),e.lineTo(t,n+i),e.lineTo(t-i,n),e.closePath()},"triangle-down":(e,t,n,r)=>{let i=r*1.55;e.moveTo(t,n+i),e.lineTo(t+i*.866,n-i*.5),e.lineTo(t-i*.866,n-i*.5),e.closePath()},plus:(e,t,n,r)=>{Ze(e,t,n,r*1.189,Qe)},cross:(e,t,n,r)=>{Ze(e,t,n,r*1.189,$e)},star:(e,t,n,r)=>{Ze(e,t,n,r*1.673,et)}},nt=(e,t,n,r,i)=>{tt[i](e,t,n,r)},rt=(e,t)=>{let{color:n,surface:r,shape:i,indexes:a,xAt:o,yAt:s,definedAt:c}=t;e.fillStyle=n,e.strokeStyle=r,e.lineWidth=2;for(let t of a)c(t)&&(e.beginPath(),nt(e,o(t),s(t),4,i),e.fill(),e.stroke())},it=5e3,at=2e4,ot=(e,t)=>{let{color:n,surface:r,shape:i,totalPointCount:a,indexes:o,xAt:s,yAt:c,radiusAt:l}=t;if(e.fillStyle=n,a>at){e.beginPath();for(let t of o)l(t)<=0||e.rect(s(t)-1,c(t)-1,2,2);e.fill();return}let u=a<=it;e.strokeStyle=r,e.lineWidth=2;for(let t of o){let n=l(t);n<=0||(e.beginPath(),nt(e,s(t),c(t),n,i),e.fill(),u&&e.stroke())}},st=(e,t)=>{let{count:n,order:r,screenX:i,screenY:a,radius:o,colorAt:s,shapeAt:c,alphaAt:l,surface:u}=t;if(e.save(),n>at){let t=``,n=-1;for(let c of r){let r=s(c);r!==t&&(e.fillStyle=r,t=r);let u=l(c);u!==n&&(e.globalAlpha=u,n=u);let d=Math.max(1,(o[c]??0)/2);e.fillRect((i[c]??0)-d/2,(a[c]??0)-d/2,d,d)}e.restore();return}let d=n<=it;e.strokeStyle=u,e.lineWidth=2;let f=``,p=-1;for(let t of r){let n=s(t);n!==f&&(e.fillStyle=n,f=n);let r=l(t);r!==p&&(e.globalAlpha=r,p=r),e.beginPath(),nt(e,i[t]??0,a[t]??0,o[t]??0,c(t)),e.fill(),d&&e.stroke()}e.restore()},ct=(e,t)=>{let{gridColor:n,axisColor:r,corners:i,edges:a,cubeAlpha:o,axes:s}=t;if(e.save(),o>.01){e.globalAlpha=o,e.strokeStyle=n,e.lineWidth=1,e.beginPath();for(let[t,n]of a){let r=i[t],a=i[n];r!=null&&a!=null&&(e.moveTo(r.x,r.y),e.lineTo(a.x,a.y))}e.stroke()}e.strokeStyle=r;for(let{alpha:t,from:n,to:r}of s)t<=.01||(e.globalAlpha=t,e.beginPath(),e.moveTo(n.x,n.y),e.lineTo(r.x,r.y),e.stroke());e.restore()},lt=(e,t)=>{let{textColor:n,fontFamily:r,plot:i,center:a,axes:o}=t;e.save(),e.fillStyle=n,e.font=`11px ${r}`,e.textAlign=`center`,e.textBaseline=`middle`;for(let{label:t,alpha:n,from:r,to:s}of o){if(n<=.01)continue;let o=Math.hypot(r.x-a.x,r.y-a.y),c=Math.hypot(s.x-a.x,s.y-a.y),l=c>=o?s:r,u=c>=o?r:s,d=Math.max(1,Math.hypot(l.x-u.x,l.y-u.y)),f=(l.x-u.x)/d*16,p=(l.y-u.y)/d*16,m=Math.min(i.left+i.width-8,Math.max(i.left+8,l.x+f)),h=Math.min(i.top+i.height-6,Math.max(i.top+6,l.y+p));e.globalAlpha=n,e.fillText(t,m,h)}e.restore()},ut=(e,t)=>{let{plot:n,color:r,textColor:i,y:a,label:o,fontFamily:s}=t;e.strokeStyle=r,e.lineWidth=1,e.setLineDash([4,4]),e.beginPath(),e.moveTo(n.left,$(a)),e.lineTo(n.left+n.width,$(a)),e.stroke(),e.setLineDash([]),o!=null&&o.length>0&&(e.font=`11px ${s}`,e.fillStyle=i,e.textAlign=`right`,e.textBaseline=`bottom`,e.fillText(o,n.left+n.width-4,a-3))},dt=(e,t)=>{let{plot:n,color:r,textColor:i,x:a,label:o,fontFamily:s}=t;if(e.strokeStyle=r,e.lineWidth=1,e.setLineDash([4,4]),e.beginPath(),e.moveTo($(a),n.top),e.lineTo($(a),n.top+n.height),e.stroke(),e.setLineDash([]),o!=null&&o.length>0){e.font=`11px ${s}`,e.fillStyle=i;let t=e.measureText(o).width,r=a+4+t<=n.left+n.width;e.textAlign=r?`left`:`right`,e.textBaseline=`top`,e.fillText(o,r?a+4:a-4,n.top+3)}},ft=(e,t)=>{let{plot:n,color:r,fontFamily:i,xLabels:a,yLabels:o}=t;e.save(),e.font=`11px ${i}`,e.fillStyle=r,e.textAlign=`right`,e.textBaseline=`middle`;for(let t of o)e.globalAlpha=t.alpha,e.fillText(t.text,n.left-8,t.position);e.textAlign=`center`,e.textBaseline=`top`;for(let t of a)e.globalAlpha=t.alpha,e.fillText(t.text,t.position,n.top+n.height+8);e.restore()},pt=e=>{let t=e.length,n=e[0]?.length??0,r=[],i=[];for(let e=0;e<t;e++)r.push(new Float64Array(n)),i.push(new Float64Array(n));let a=0,o=0,s=new Float64Array(n),c=new Float64Array(n),l=new Int32Array(n).fill(-1),u=new Int32Array(n).fill(-1);for(let d=0;d<t;d++){let t=e[d],f=r[d],p=i[d];if(t!=null&&f!=null&&p!=null)for(let e=0;e<n;e++){let n=t[e]??NaN;if(Number.isNaN(n)){f[e]=NaN,p[e]=NaN;continue}if(n>=0){let t=s[e]??0,r=t+n;s[e]=r,f[e]=t,p[e]=r,r>o&&(o=r),n>0&&(l[e]=d)}else{let t=c[e]??0,r=t+n;c[e]=r,f[e]=r,p[e]=t,r<a&&(a=r),u[e]=d}}}return{lower:r,upper:i,min:a,max:o,positiveEnd:l,negativeEnd:u}},mt=e=>1-(1-e)**3;var ht=class{#e=new Float64Array;#t=new Float64Array;#n=new Float64Array;#r=0;#i=0;#a=!1;get active(){return this.#a}values(){return this.#n}retarget(e,t){let{duration:n,now:r}=t,i=e.length,a=this.#n.length!==i;if(a&&(this.#e=new Float64Array(i),this.#t=new Float64Array(i),this.#n=new Float64Array(i)),a||n<=0){for(let t=0;t<i;t++){let n=e[t]??NaN;this.#e[t]=n,this.#t[t]=n,this.#n[t]=n}this.#a=!1;return}let o=!1;for(let t=0;t<i;t++){let n=e[t]??NaN,r=this.#n[t]??NaN;if(r!==n&&!(Number.isNaN(r)&&Number.isNaN(n))){o=!0;break}}if(!o){for(let t=0;t<i;t++)this.#t[t]=e[t]??NaN;this.#a=!1;return}for(let t=0;t<i;t++)this.#e[t]=this.#n[t]??NaN,this.#t[t]=e[t]??NaN;this.#r=r,this.#i=n,this.#a=!0}snap(){this.#n.set(this.#t),this.#a=!1}tick(e){if(!this.#a)return!1;let t=Math.min(1,(e-this.#r)/this.#i),n=mt(t);for(let e=0;e<this.#n.length;e++){let t=this.#e[e]??NaN,r=this.#t[e]??NaN;if(Number.isNaN(t)||Number.isNaN(r)){this.#n[e]=r;continue}this.#n[e]=t+(r-t)*n}return t>=1&&(this.#a=!1),this.#a}},gt=class{#e=new Float64Array;#t=new Float64Array;#n=0;#r=!1;#i;#a;#o=0;constructor(e={}){this.#i=e.speed??.14,this.#a=e.epsilon??.001}get active(){return this.#r}values(){return this.#t}jump(e){this.#t.length!==e.length&&(this.#e=new Float64Array(e.length),this.#t=new Float64Array(e.length));for(let t=0;t<e.length;t++){let n=e[t]??NaN;this.#e[t]=n,this.#t[t]=n}this.#r=!1}aim(e,t){if(this.#t.length!==e.length){this.jump(e);return}let n=!1;for(let t=0;t<e.length;t++){let r=e[t]??NaN,i=this.#e[t]??NaN;if(i!==r&&!(Number.isNaN(i)&&Number.isNaN(r))){n=!0;break}}if(!n)return;let r=0;for(let t=0;t<e.length;t++){let n=e[t]??NaN;this.#e[t]=n;let i=Math.abs(n-(this.#t[t]??NaN));Number.isFinite(i)&&i>r&&(r=i)}this.#o=r,this.#r||(this.#r=!0,this.#n=t)}tick(e){if(!this.#r)return!1;let t=Math.min(50,Math.max(0,e-this.#n));this.#n=e;let n=1-(1-this.#i)**(t/16.67),r=Math.max(this.#o*this.#a,2**-52),i=!0;for(let e=0;e<this.#t.length;e++){let t=this.#e[e]??NaN,a=this.#t[e]??NaN;if(Number.isNaN(t)||Number.isNaN(a)){this.#t[e]=t;continue}let o=a+(t-a)*n;n>0&&o===a||Math.abs(t-o)<=r?this.#t[e]=t:(this.#t[e]=o,i=!1)}return this.#r=!i,this.#r}};const _t=e=>`${e.colorInput}|${e.texture}`,vt={bar:`BarChart.Bar`,line:`LineChart.Line`,area:`AreaChart.Area`,scatter:`ScatterPlot.Point`},yt=1e3;var bt=class{#e;#t;#n;#r={xKey:``,xScale:`linear`,yDomain:[`auto`,`auto`],orientation:`vertical`,zKey:null,dimensions:3,stacked:!1,animate:!0};#i={onDatumActivate:null,onActiveIndexChange:null};#a;#o=null;#s=null;#c=null;#l=null;#u=0;#d=0;#f=1;#p=[];#m=0;#h=new Float64Array;#g=[];#_=null;#v=null;#y=!1;#b=!1;#x=new Map;#S=0;#C=0;#w=!0;#T=!0;#E=null;#D=new gt({speed:.16});#O=new gt({speed:.2});#k=new Map;#A=new Map;#j=null;#M=!1;#N=new Map;#P=new Map;#F=0;#I=!1;#L=new Map;#R={alpha:0,target:0};#z=0;#B=null;#V=null;#H=null;#U={left:0,top:0,width:0,height:0};#W=null;#G=new Float64Array;#K=[0,1];#q={yaw:.65,pitch:-.35};#J=new gt({speed:.12});#Y=new gt({speed:.16});#X=null;#Z=!1;#Q=null;#$=new Int32Array;#ee=new Map;#te=``;#ne=null;#re=null;#ie=null;#ae=void 0;#oe=null;#se=!1;#ce=null;#le=null;#ue={width:0,height:0};#de=!1;#fe=!1;#pe=0;#me=!1;constructor(e){this.#e=e.kind,this.#t=e.elements,this.#n=e.store,this.#a=e.elements.canvas.getContext(`2d`),this.#n.onSeriesChange=()=>{this.#b=!0,this.#De()},this.#n.onPresentationChange=()=>{this.#De()},typeof ResizeObserver<`u`&&(this.#o=new ResizeObserver(e=>{let t=e[0];t!=null&&(this.#u=t.contentRect.width,this.#d=t.contentRect.height,this.#f=this.#je(),this.#L.clear(),this.#ne=null,this.#De())}),this.#o.observe(e.elements.plot),this.#c=new ResizeObserver(()=>{this.#ue={width:this.#t.tooltip.offsetWidth,height:this.#t.tooltip.offsetHeight},this.#Oe()}),this.#c.observe(e.elements.tooltip));let t=e.elements.root.ownerDocument.documentElement;this.#s=ie(t,()=>{this.#H=null,this.#De()}),this.#he(),this.#Y.jump([1,1])}destroy(){this.#me=!0,this.#o?.disconnect(),this.#c?.disconnect(),this.#s?.(),this.#l?.(),this.#n.onSeriesChange=null,this.#n.onPresentationChange=null,this.#B!=null&&(clearTimeout(this.#B),this.#B=null),this.#pe!==0&&cancelAnimationFrame(this.#pe)}#he(){if(typeof matchMedia>`u`||this.#me)return;this.#l?.();let e=matchMedia(`(resolution: ${this.#je()}dppx)`),t=()=>{this.#f=this.#je(),this.#L.clear(),this.#De(),this.#he()};e.addEventListener(`change`,t,{once:!0}),this.#l=()=>e.removeEventListener(`change`,t)}setOptions(e){let t=this.#r;if(this.#r=e,t.xScale!==e.xScale&&this.#N.clear(),t.animate&&!e.animate&&this.#ge(),t.dimensions!==e.dimensions){let t=[+(e.dimensions>=2),+(e.dimensions>=3)],n=xt(e.dimensions);if(this.#ye()===0||!this.#M)this.#Y.jump(t),this.#q=n,this.#J.jump([n.yaw,n.pitch]);else{let e=n.yaw+Math.round((this.#q.yaw-n.yaw)/(Math.PI*2))*Math.PI*2;this.#Y.aim(t,performance.now()),this.#J.jump([this.#q.yaw,this.#q.pitch]),this.#J.aim([e,n.pitch],performance.now())}}(t.xKey!==e.xKey||t.xScale!==e.xScale||t.zKey!==e.zKey||t.stacked!==e.stacked)&&(this.#b=!0),(t.yDomain[0]!==e.yDomain[0]||t.yDomain[1]!==e.yDomain[1])&&(this.#ne=null,this.#M&&(this.#ye()===0?this.#D.jump(this.#xe()):this.#D.aim(this.#xe(),performance.now()))),this.#De()}setCallbacks(e){this.#i=e}setRows(e){e!==this.#p&&(this.#p=e,this.#b=!0,this.#De())}flushIngest(){!this.#b||this.#me||(this.#b=!1,this.#_e())}setControlledActiveIndex(e){let t=this.#oe;this.#oe=null;let n=this.#ae!==void 0;if(this.#ae=e,e!==void 0){let n=t!=null&&t.index===e&&t.viaKeyboard;this.#at(e==null?null:this.#tt(e),{viaKeyboard:n,notify:!1})}else n&&this.#at(null,{viaKeyboard:!1,notify:!1});this.#Oe()}handlePointerMove(e,t){if(this.#X!=null){let n=e-this.#X.lastX,r=t-this.#X.lastY;(this.#X.moved||Math.abs(n)+Math.abs(r)>3)&&(this.#X.moved=!0,this.#q={yaw:this.#q.yaw+n*.008,pitch:Ce(this.#q.pitch+r*.008)},this.#J.jump([this.#q.yaw,this.#q.pitch]),this.#X.lastX=e,this.#X.lastY=t,this.#at(null,{viaKeyboard:!1,notify:!1}),this.#De());return}if(this.#ce=e,this.#le=t,this.#e===`scatter`){let n=this.#ft(e,t);this.#re=n?.seriesKey??null,this.#ne=n==null?null:{x:n.screenX,y:n.screenY},this.#at(n?.index??null,{viaKeyboard:!1,notify:!0});return}let n=this.#rt(e,t);this.#at(n,{viaKeyboard:!1,notify:!0})}handlePointerDown(e,t){if(this.#Z=!0,this.#Ce()){this.#X={lastX:e,lastY:t,moved:!1};return}this.handlePointerMove(e,t)}handlePointerUp(e,t){let n=this.#X;this.#X=null;let r=this.#Z;if(this.#Z=!1,n!=null){if(n.moved)return;this.handlePointerMove(e,t)}r&&this.handleActivate(e,t)}handlePointerLeave(){this.#ce=null,this.#le=null,this.#X=null,this.#Z=!1,this.#re=null,this.#ne=null,this.#at(null,{viaKeyboard:!1,notify:!0})}handleActivate(e,t){let n=this.#$e();if(n==null)return;let r=this.#et(n),i=this.#p[r];if(i==null)return;let a=this.#e===`scatter`?this.#re:e==null||t==null?null:this.#it(n,e,t);this.#i.onDatumActivate?.({index:r,xValue:this.#nt(n),datum:i,dataKey:a})}handleKeyDown(e){if(this.#m===0)return!1;let t=this.#m-1,n=this.#$e(),r=this.#I?Math.max(1,Math.floor(this.#m/Math.max(1,this.#U.width*this.#f))):1,i=Math.max(1,Math.floor(this.#m/10)),a=(()=>{switch(e){case`ArrowLeft`:return Math.max(0,(n??this.#m)-r);case`ArrowRight`:return Math.min(t,(n??-1)+r);case`PageUp`:return Math.min(t,(n??0)+i);case`PageDown`:return Math.max(0,(n??t)-i);case`Home`:return 0;case`End`:return t;case`Escape`:return null;default:return}})();return a===void 0?e===`Enter`||e===` `?(this.handleActivate(null,null),!0):!1:(this.#ce=null,this.#le=null,this.#re=null,this.#ne=null,this.#at(a,{viaKeyboard:!0,notify:!0}),!0)}invalidateColors(){this.#H=null,this.#De()}#ge(){this.#D.jump(this.#xe()),this.#O.jump(this.#Se()),this.#Y.jump([+(this.#r.dimensions>=2),+(this.#r.dimensions>=3)]);let e=xt(this.#r.dimensions);this.#q=e,this.#J.jump([e.yaw,e.pitch]);for(let e of this.#k.values())e.snap();for(let e of this.#A.values())e.snap();this.#R.alpha=this.#R.target,this.#De()}#_e(){let e=this.#p,{xKey:t,xScale:n}=this.#r,r=this.#n.seriesSpecs();this.#L.clear();let i=this.#h;if(n===`band`||n===`point`){let n=e.length,r=new Float64Array(n),i=Array.from({length:n},()=>``),a=!1;for(let o=0;o<n;o++){let n=e[o],s=n==null?void 0:k(n,t);s!==void 0&&(a=!0),i[o]=typeof s==`string`||typeof s==`number`||s instanceof Date?s:String(s),r[o]=o}_(n===0||a,`${this.#Te()} xKey "${t}" does not match any key in the provided data. Available keys: ${Object.keys(e[0]??{}).join(`, `)}.`),this.#_=null,this.#v=null,this.#m=n,this.#h=r,this.#g=i,this.#T=!0}else{let r=[],i=!1,a=!1,o=!1;for(let s=0;s<e.length;s++){let c=e[s],l=c==null?void 0:k(c,t);l!==void 0&&(i=!0),l!=null&&(a=!0);let u=Et(l,n===`time`);Number.isFinite(u)&&(r.push({source:s,x:u}),o=!0)}_(e.length===0||i,`${this.#Te()} xKey "${t}" does not match any key in the provided data. Available keys: ${Object.keys(e[0]??{}).join(`, `)}.`),_(!a||o,`${this.#Te()} could not read any "${t}" values as ${n===`time`?`dates`:`numbers`} for the "${n}" x scale — check the xScale and the data types.`);let s=!0;for(let e=1;e<r.length;e++)if((r[e]?.x??0)<(r[e-1]?.x??0)){s=!1;break}let c=s?r:r.toSorted((e,t)=>e.x-t.x),l=c.length,u=new Float64Array(l),d=l===e.length,f=!0,p=new Int32Array(l);for(let e=0;e<l;e++){let t=c[e];t!=null&&(u[e]=t.x,Number.isInteger(t.x)||(f=!1),p[e]=t.source,t.source!==e&&(d=!1))}if(d)this.#_=null,this.#v=null;else{this.#_=p;let t=new Int32Array(e.length).fill(-1);for(let e=0;e<l;e++){let n=p[e];n!=null&&(t[n]=e)}this.#v=t}this.#m=l,this.#h=u,this.#g=[],this.#T=f}let a=!1;for(let e of this.#g)if(e instanceof Date&&ve(e)){a=!0;break}this.#y=a;let o=this.#h[0],s=this.#h[this.#m-1],c=i[0],l=i[i.length-1];!this.#Ce()&&(n===`linear`||n===`time`)&&o!=null&&s!=null&&c!=null&&l!=null&&o>c&&s>=l?(this.#R.target=1,this.#z=performance.now()):(o!==c||s!==l)&&(this.#R.target=0);let u=this.#m,d=i.length===u&&u<=2500;if(d){for(let e=0;e<u;e++)if(i[e]!==this.#h[e]){d=!1;break}}let f=this.#x;this.#x=new Map;let p=1/0,m=-1/0,h=!0;for(let t of r){let n=new Float64Array(u),r=!1;for(let i=0;i<u;i++){let a=e[this.#_==null?i:this.#_[i]??i],o=a==null?void 0:k(a,t.dataKey);if(o===void 0){n[i]=NaN;continue}r=!0;let s=typeof o==`number`&&Number.isFinite(o)?o:NaN;n[i]=s,Number.isNaN(s)||(s<p&&(p=s),s>m&&(m=s),Number.isInteger(s)||(h=!1))}_(u===0||r,`${vt[t.mark]} dataKey "${t.dataKey}" does not match any key in the provided data. Available keys: ${Object.keys(e[0]??{}).join(`, `)}.`),this.#x.set(t.dataKey,n)}this.#S=p===1/0?0:p,this.#C=m===-1/0?0:m,this.#w=h;let g=this.#r.zKey;if(this.#e===`scatter`&&g!=null){let t=new Float64Array(u),n=1/0,r=-1/0,i=!1;for(let a=0;a<u;a++){let o=e[this.#_==null?a:this.#_[a]??a],s=o==null?void 0:k(o,g);s!==void 0&&(i=!0);let c=typeof s==`number`&&Number.isFinite(s)?s:NaN;t[a]=c,Number.isNaN(c)||(c<n&&(n=c),c>r&&(r=c))}_(u===0||i,`ScatterPlot.Root zKey "${g}" does not match any key in the provided data. Available keys: ${Object.keys(e[0]??{}).join(`, `)}.`),this.#G=t,this.#K=n===1/0?[0,1]:Z([n,r],5)}else this.#G=new Float64Array;this.#Q=null,this.#ne=null,this.#E=this.#r.stacked?pt(r.map(e=>this.#x.get(e.dataKey)??new Float64Array)):null,this.#I=ue({pointCount:u,columnCount:Math.max(1,Math.round(this.#U.width*this.#f)),wasDecimated:this.#I});let v=this.#H;if(v!=null){for(let e of this.#n.seriesMeta())if(v.inputs.get(e.dataKey)!==_t(e)){this.#H=null;break}}this.#ve(r,f,d);let y=this.#$e();y!=null&&this.#at(Math.min(y,Math.max(0,u-1)),{viaKeyboard:this.#se,notify:!1}),this.#lt({force:!0})}#ve(e,t,n){let r=performance.now(),i=this.#ye(),a=!this.#M;this.#M=this.#M||this.#m>0,a||i===0?(this.#D.jump(this.#xe()),this.#O.jump(this.#Se())):(this.#D.aim(this.#xe(),r),this.#O.aim(this.#Se(),r));let o=this.#m>0&&this.#m<=2500&&n,s=new Set,c=new Set,l=(e,t,n)=>{s.add(e);let a=this.#k.get(e);a??(a=new ht,this.#k.set(e,a));let c=o&&n&&a.values().length===t.length;a.retarget(t,{duration:c?i:0,now:r})};e.forEach((e,n)=>{c.add(e.dataKey);let a=t.has(e.dataKey);if(this.#E==null?l(e.dataKey,this.#x.get(e.dataKey)??new Float64Array,a):(l(`${e.dataKey}:lower`,this.#E.lower[n]??new Float64Array,a),l(`${e.dataKey}:upper`,this.#E.upper[n]??new Float64Array,a)),!this.#A.has(e.dataKey)&&this.#m>0){let t=new ht;t.retarget([0],{duration:0,now:r}),t.retarget([1],{duration:i,now:r}),this.#A.set(e.dataKey,t)}});for(let e of this.#k.keys())s.has(e)||this.#k.delete(e);for(let e of this.#A.keys())c.has(e)||this.#A.delete(e)}#ye(){return!this.#r.animate||this.#be()?0:280}#be(){return typeof matchMedia>`u`?!1:(this.#j??=matchMedia(`(prefers-reduced-motion: reduce)`),this.#j.matches)}#xe(){let[e,t]=this.#r.yDomain,n,r;if(this.#E==null?this.#e===`line`||this.#e===`scatter`?(n=this.#S,r=this.#C):(n=Math.min(0,this.#S),r=Math.max(0,this.#C)):(n=Math.min(0,this.#E.min),r=Math.max(0,this.#E.max)),typeof e==`number`&&(n=e),typeof t==`number`&&(r=t),this.#m===0)return[0,1];let i=this.#e===`bar`||this.#e===`area`?Ve([n,r],5):Z([n,r],5);return[typeof e==`number`?e:i[0],typeof t==`number`?t:i[1]]}#Se(){if(this.#m===0)return[0,1];let e=this.#h[0]??0,t=this.#h[this.#m-1]??0;return e===t?[e-.5,t+.5]:this.#e===`scatter`?Z([e,t],5):[e,t]}#Ce(){return this.#e===`scatter`&&this.#r.zKey!=null}#we(){return this.#e===`bar`&&this.#r.orientation===`horizontal`}#Te(){return`${vt[this.#e].split(`.`)[0]??`Chart`}.Root`}#Ee(e,t){let n=this.#V;n??(n=this.#t.canvas.ownerDocument.createElement(`canvas`),this.#V=n),(n.width!==e||n.height!==t)&&(n.width=e,n.height=t);let r=n.getContext(`2d`);return r==null?null:{canvas:n,ctx:r}}#De(){this.#fe=!0,this.#ke()}#Oe(){this.#ke()}#ke(){this.#de||this.#me||(this.#de=!0,this.#pe=requestAnimationFrame(()=>{this.#de=!1,this.#pe=0,this.#Ae()}))}#Ae(){if(!this.#me){if(this.flushIngest(),this.#fe){this.#fe=!1;let e=performance.now(),t=!1;t=this.#D.tick(e)||t,t=this.#O.tick(e)||t;for(let n of this.#k.values())t=n.tick(e)||t;for(let n of this.#A.values())t=n.tick(e)||t;if(t=this.#Y.tick(e)||t,this.#J.tick(e)){t=!0;let e=this.#J.values();this.#q={yaw:e[0]??this.#q.yaw,pitch:e[1]??this.#q.pitch}}this.#Me(),this.#Pe(),t=this.#Ve(e)||t,t&&this.#De()}this.#mt()}}#je(){return typeof devicePixelRatio==`number`&&devicePixelRatio>0?Math.min(devicePixelRatio,3):1}#Me(){let e=this.#t.root,t=`${re(e.ownerDocument.documentElement)}|${this.#f}|${this.#r.orientation}`;if(this.#H?.signature===t)return;let n=e.ownerDocument.defaultView;if(n==null)return;let r=this.#a,i=new Map,a=new Map,o=new Map;for(let t of this.#n.seriesMeta()){let n=te(e,t.colorInput);if(i.set(t.dataKey,n),a.set(t.dataKey,_t(t)),r!=null&&t.mark===`bar`&&t.texture!==`solid`){let i=le(r,{texture:t.texture,color:n,ink:B(e,U(n)),devicePixelRatio:this.#f,orientation:this.#r.orientation});i!=null&&o.set(t.dataKey,i)}}this.#H={signature:t,series:i,inputs:a,barTextures:o,chrome:ne(e),fontFamily:n.getComputedStyle(e).fontFamily||`sans-serif`}}#Ne(e){let t=this.#H?.signature??``;t!==this.#te&&(this.#ee.clear(),this.#te=t);let n=this.#ee.get(e);if(n!=null)return n;let r=te(this.#t.root,e);return this.#ee.set(e,r),r}#Pe(){let e=this.#n.getSnapshot(),t=this.#Ce(),n=this.#we(),r=!t&&e.xAxis!=null,i=!t&&e.yAxis!=null,a=n?r:i,o=(n?i:r)?24:8,s=Math.max(0,this.#d-8-o);this.#U={left:8,top:8,width:Math.max(0,this.#u-16),height:s};let c=8;if(a){c=40;let e=this.#a;if(e!=null&&this.#H!=null){e.font=`11px ${this.#H.fontFamily}`;let t=0,r=n?this.#Be().map(e=>e.text):this.#ze().map(e=>e.text);for(let n of r){let r=e.measureText(n).width;r>t&&(t=r)}c=Math.ceil(t)+14}}this.#U={left:c,top:8,width:Math.max(0,this.#u-c-8),height:s};let l=n?this.#U.top:this.#U.left,u=n?this.#U.top+this.#U.height:this.#U.left+this.#U.width;this.#W=this.#r.xScale===`band`?Me({count:this.#m,rangeStart:l,rangeEnd:u,paddingInner:.2,paddingOuter:.1}):this.#r.xScale===`point`?Me({count:this.#m,rangeStart:l,rangeEnd:u,paddingInner:1,paddingOuter:.5}):null,this.#I=ue({pointCount:this.#m,columnCount:Math.max(1,Math.round(this.#U.width*this.#f)),wasDecimated:this.#I})}#Fe(){let e=this.#D.values();return je([e[0]??0,e[1]??1],[this.#U.top+this.#U.height,this.#U.top])}#Ie(){let e=this.#D.values(),t=this.#we()?[this.#U.left,this.#U.left+this.#U.width]:[this.#U.top+this.#U.height,this.#U.top];return je([e[0]??0,e[1]??1],t)}#Le(){let e=this.#O.values();return je([e[0]??0,e[1]??1],[this.#U.left,this.#U.left+this.#U.width])}#Re(e){let t=this.#W;if(t!=null)return X(t,e);let{k:n,b:r}=this.#Le();return(this.#h[e]??0)*n+r}#ze(){let e=this.#n.getSnapshot(),t=this.#D.values(),n=Fe([t[0]??0,t[1]??1],e.yAxis?.tickCount??5,{integer:this.#w}),r=e.yAxis?.tickFormat,i=n.length>1?he(Math.abs((n[1]??0)-(n[0]??0))):void 0;return n.map(e=>({value:e,text:r==null?G(e,i==null?void 0:{maximumFractionDigits:i}):r(e)}))}#Be(){let e=this.#n.getSnapshot(),t=e.xAxis?.tickFormat;if(this.#W!=null){let e=this.#we(),n=e?this.#U.height:this.#U.width,r=Math.max(1,Math.floor(n/(e?15:60))),i=Math.max(1,Math.ceil(this.#m/r)),a=[];for(let e=0;e<this.#m;e+=i){let n=this.#g[e]??``;a.push({index:e,value:e,text:t==null?K(n,{datasetHasTimeOfDay:this.#y}):t(n)})}return a}let n=this.#O.values(),r=[n[0]??0,n[1]??1],i=e.xAxis?.tickCount??Math.max(2,Math.floor(this.#U.width/90));if(this.#r.xScale===`time`){let e=Be(r);return ze(r,i).map(n=>({index:null,value:n,text:t==null?e(n):t(new Date(n))}))}let a=Fe(r,i,{integer:this.#T}),o=a.length>1?he(Math.abs((a[1]??0)-(a[0]??0))):void 0;return a.map(e=>({index:null,value:e,text:t==null?G(e,o==null?void 0:{maximumFractionDigits:o}):t(e)}))}#Ve(e){let t=this.#a,n=this.#H;if(t==null||n==null||this.#u<=0||this.#d<=0)return!1;let r=Math.min(50,Math.max(0,e-this.#F));this.#F=e;let i=this.#t.canvas,a=Math.round(this.#u*this.#f),o=Math.round(this.#d*this.#f);(i.width!==a||i.height!==o)&&(i.width=a,i.height=o),t.setTransform(this.#f,0,0,this.#f,0,0),t.clearRect(0,0,this.#u,this.#d);let s=this.#n.getSnapshot(),c=this.#U;if(c.width<=0||c.height<=0)return!1;let l=this.#Fe(),u=this.#Le(),d=this.#n.seriesSpecs(),f=this.#Ce(),p=this.#ye()===0,m=f?[]:this.#He(t,n.fontFamily),h=f?[]:this.#Ue(t,n.fontFamily),g=St(this.#N,m,r,p);g=St(this.#P,h,r,p)||g;let _=this.#R;if(_.target===1){if(e-this.#z>yt)_.target=0;else if(this.#B==null){let t=yt-(e-this.#z)+17;this.#B=setTimeout(()=>{this.#B=null,this.#De()},t)}}if(p)_.alpha=_.target;else{let e=1-(1-(_.target>_.alpha?.16:.08))**(r/16.67);_.alpha+=(_.target-_.alpha)*e,Math.abs(_.target-_.alpha)<.02&&(_.alpha=_.target)}_.alpha!==_.target&&(g=!0);let v=this.#we(),y=v?this.#Ie():l,b=e=>this.#W==null?e*u.k+u.b:X(this.#W,e),x=e=>e*y.k+y.b,S=[...this.#N.entries()].map(([e,t])=>({position:b(e),alpha:t.alpha})),C=[...this.#P.entries()].map(([e,t])=>({position:x(e),alpha:t.alpha}));if(s.grid!=null&&!f){let e=s.grid.lines??(v?`vertical`:`horizontal`),r=v?S:C,i=v?C:S;He(t,{plot:c,color:n.chrome.grid,xLines:e===`horizontal`?[]:i,yLines:e===`vertical`?[]:r})}let w=Math.min(40,c.width*.25),T=t,E=null;_.alpha>.01&&w>1&&(E=this.#Ee(a,o),E!=null&&(E.ctx.setTransform(this.#f,0,0,this.#f,0,0),E.ctx.clearRect(0,0,this.#u,this.#d),T=E.ctx)),T.save(),T.beginPath(),T.rect(c.left,c.top,c.width,c.height+1),T.clip();let D=null;if(this.#e===`bar`?v?this.#Ye(T,d):this.#Je(T,d,l):this.#e===`scatter`?D=this.#ut(T,d,l):this.#Xe(T,d,l),T.restore(),E!=null){T.save(),T.globalCompositeOperation=`destination-out`;let e=T.createLinearGradient(c.left,0,c.left+w,0);e.addColorStop(0,`rgba(0, 0, 0, ${_.alpha})`),e.addColorStop(1,`rgba(0, 0, 0, 0)`),T.fillStyle=e,T.fillRect(c.left,c.top,w,c.height+1),T.restore(),t.drawImage(E.canvas,0,0,this.#u,this.#d)}D!=null&&lt(t,{textColor:n.chrome.tickText,fontFamily:n.fontFamily,plot:c,center:D.center,axes:D.axes}),this.#e===`bar`&&this.#m>0&&(v?We(t,{plot:c,color:n.chrome.baseline,x:x(0)}):Ue(t,{plot:c,color:n.chrome.baseline,y:x(0)}));for(let e of f?[]:s.referenceLines){let r=x(e.y);if(v?r<c.left||r>c.left+c.width:r<c.top||r>c.top+c.height)continue;let i=e.color==null?n.chrome.reference:this.#Ne(e.color);v?dt(t,{plot:c,color:i,textColor:n.chrome.tickText,x:r,label:e.label,fontFamily:n.fontFamily}):ut(t,{plot:c,color:i,textColor:n.chrome.tickText,y:r,label:e.label,fontFamily:n.fontFamily})}let O=s.xAxis==null||f?[]:[...this.#N.entries()].map(([e,t])=>({position:b(e),text:t.text,alpha:t.alpha})),k=s.yAxis==null||f?[]:[...this.#P.entries()].map(([e,t])=>({position:x(e),text:t.text,alpha:t.alpha})),A=v?k:O,j=v?O:k;return(A.length>0||j.length>0)&&ft(t,{plot:c,color:n.chrome.tickText,fontFamily:n.fontFamily,xLabels:A,yLabels:j}),g}#He(e,t){e.font=`11px ${t}`;let n=this.#we(),r=this.#Le(),i=[],a=-1/0;for(let t of this.#Be()){let o=t.index!=null&&this.#W!=null,s=o&&this.#W!=null?X(this.#W,t.index??0):t.value*r.k+r.b,c=n?15/2:e.measureText(t.text).width/2,l=n?2:8;s-c<a+l||(a=s+c,i.push({key:o?t.index??0:t.value,text:t.text}))}return i}#Ue(e,t){let n=this.#ze();if(!this.#we())return n.map(e=>({key:e.value,text:e.text}));e.font=`11px ${t}`;let r=this.#Ie(),i=[],a=-1/0;for(let t of n){let n=t.value*r.k+r.b,o=e.measureText(t.text).width/2;n-o<a+8||(a=n+o,i.push({key:t.value,text:t.text}))}return i}#We(e,t,n){let r=t===`value`?e.dataKey:`${e.dataKey}:${t}`;if(!this.#I&&this.#m<=2500){let e=this.#k.get(r);if(e!=null&&e.values().length===this.#m)return e.values()}return t===`value`?this.#x.get(e.dataKey)??new Float64Array:(t===`lower`?this.#E?.lower:this.#E?.upper)?.[n]??new Float64Array}#Ge(e){return this.#A.get(e)?.values()[0]??1}#Ke(e,t){if(e==null)return 0;let n=e[t]??0;return Number.isNaN(n)?0:n}#qe(e,t,n){let r=this.#E;if(r==null)return!0;let i=r.lower[e]?.[t]??NaN,a=r.upper[e]?.[t]??NaN;if(Number.isNaN(i)||Number.isNaN(a))return!1;let o=i<0,s=(o?r.negativeEnd:r.positiveEnd)[t]??-1;if(s<0)return!1;let c=(o?r.lower:r.upper)[s]?.[t]??NaN;return P({lower:i,upper:a,pileOuter:c,toPixel:n})}#Je(e,t,n){let r=this.#W,i=this.#H;if(r==null||i==null||this.#m===0||t.length===0)return;let a=this.#E!=null,o=a?1:t.length,s=r.bandwidth>=8*o?2:+(r.bandwidth>=3*o),c=(r.bandwidth-s*(o-1))/o,l=A({step:r.step,slot:c}),u=e=>e*n.k+n.b;t.forEach((t,n)=>{let d=this.#Ge(t.dataKey),f=[],p=a?this.#We(t,`lower`,n):null,m=a?this.#We(t,`upper`,n):this.#We(t,`value`,n);for(let e=0;e<this.#m;e++){let t=m[e]??NaN;if(Number.isNaN(t))continue;let i=this.#Ke(p,e),h=a?Y(r,e)+(r.bandwidth-l)/2:Y(r,e)+(r.bandwidth-(c*o+s*(o-1)))/2+n*(c+s)+(c-l)/2,g=N({lower:i,upper:t,toPixel:u,reveal:d,gap:a?s:0});f.push({x:h,width:l,baselineY:g.baseline,valueY:g.value,rounded:this.#qe(n,e,u)})}Ge(e,{fill:i.barTextures.get(t.dataKey)??i.series.get(t.dataKey)??`currentColor`,rects:f})})}#Ye(e,t){let n=this.#W,r=this.#H;if(n==null||r==null||this.#m===0||t.length===0)return;let i=this.#Ie(),a=this.#E!=null,o=a?1:t.length,s=n.bandwidth>=8*o?2:+(n.bandwidth>=3*o),c=(n.bandwidth-s*(o-1))/o,l=A({step:n.step,slot:c}),u=e=>e*i.k+i.b;t.forEach((t,i)=>{let d=this.#Ge(t.dataKey),f=[],p=a?this.#We(t,`lower`,i):null,m=a?this.#We(t,`upper`,i):this.#We(t,`value`,i);for(let e=0;e<this.#m;e++){let t=m[e]??NaN;if(Number.isNaN(t))continue;let r=this.#Ke(p,e),h=a?Y(n,e)+(n.bandwidth-l)/2:Y(n,e)+(n.bandwidth-(c*o+s*(o-1)))/2+i*(c+s)+(c-l)/2,g=N({lower:r,upper:t,toPixel:u,reveal:d,gap:a?s:0});f.push({y:h,height:l,baselineX:g.baseline,valueX:g.value,rounded:this.#qe(i,e,u)})}Ke(e,{fill:r.barTextures.get(t.dataKey)??r.series.get(t.dataKey)??`currentColor`,rects:f})})}#Xe(e,t,n){let r=this.#H;if(r==null||this.#m===0)return;let i=this.#Le(),a=this.#W,o=e=>a==null?(this.#h[e]??0)*i.k+i.b:X(a,e);t.forEach((t,i)=>{let a=r.series.get(t.dataKey)??`currentColor`,s=this.#Ge(t.dataKey);if(e.save(),s<1&&(e.beginPath(),e.rect(this.#U.left,0,this.#U.width*s,this.#d),e.clip()),this.#I){this.#Ze(e,t,i,a,n),e.restore();return}let c=t.mark===`area`,l=this.#We(t,this.#E==null?`value`:`upper`,i),u=this.#E==null?null:this.#We(t,`lower`,i),d=e=>!Number.isNaN(l[e]??NaN),f=[];for(let e=0;e<this.#m;e++)(!t.connectNulls||d(e))&&f.push(e);let p=e=>(l[e]??0)*n.k+n.b;if(c){let r=u==null?()=>0*n.k+n.b:e=>(u[e]??0)*n.k+n.b;Je(e,{color:a,curve:t.curve,indexes:f,xAt:o,y0At:r,y1At:p,definedAt:d})}else qe(e,{color:a,curve:t.curve,indexes:f,xAt:o,yAt:p,definedAt:d}),t.markers&&this.#U.width/this.#m>=12&&rt(e,{color:a,surface:r.chrome.surface,shape:this.#n.seriesShape(t.dataKey),indexes:f,xAt:o,yAt:p,definedAt:d});e.restore()})}#Ze(e,t,n,r,i){let a=Math.max(1,Math.round(this.#U.width*this.#f)),o=e=>this.#U.left+(e+.5)/this.#f;if(t.mark===`area`){let s=this.#Qe(`${t.dataKey}:upper`,this.#We(t,this.#E==null?`value`:`upper`,n),a),c=this.#E==null?null:this.#Qe(`${t.dataKey}:lower`,this.#We(t,`lower`,n),a);c==null?Xe(e,{color:r,lowerColumns:Dt(s,0),upperColumns:s,columnToX:o,valueK:i.k,valueB:i.b}):Xe(e,{color:r,lowerColumns:c,upperColumns:s,columnToX:o,valueK:i.k,valueB:i.b});return}let s=this.#Qe(t.dataKey,this.#We(t,`value`,n),a);Ye(e,{color:r,columns:s,columnToX:o,valueK:i.k,valueB:i.b})}#Qe(e,t,n){let r=this.#O.values(),i=`${r[0]??0}:${r[1]??1}:${n}`,a=this.#L.get(e);if(a!=null&&a.key===i)return a.columns;let o=[r[0]??0,r[1]??1],s=je(o,[0,n]),c=de({xs:this.#h,values:t,startIndex:0,endIndex:this.#m-1,positionK:s.k,positionB:s.b,columnCount:n});return this.#L.set(e,{key:i,columns:c}),c}#$e(){if(this.#m===0)return null;let e;return e=this.#ae===void 0?this.#ie:this.#ae==null?null:this.#tt(this.#ae),e==null?null:Math.min(Math.max(0,e),this.#m-1)}#et(e){return this.#_==null?e:this.#_[e]??e}#tt(e){if(this.#p.length===0)return null;let t=Math.min(Math.max(0,e),this.#p.length-1);if(this.#v==null)return t;let n=this.#v[t]??-1;return n===-1?null:n}#nt(e){if(e<0||e>=this.#m)return``;let{xScale:t}=this.#r;if(t===`band`||t===`point`)return this.#g[e]??``;let n=this.#h[e]??0;return t===`time`?new Date(n):n}#rt(e,t){if(this.#m===0)return null;let n=this.#W;if(n!=null)return Pe(n,this.#we()?t:e);let{k:r,b:i}=this.#Le();if(r===0)return 0;let a=e;if(this.#I){let t=Math.floor((e-this.#U.left)*this.#f);a=this.#U.left+(t+.5)/this.#f}return ye(this.#h,this.#m,(a-i)/r)}#it(e,t,n){let r=this.#n.seriesSpecs(),i=this.#we(),a=this.#W;if(this.#e===`bar`&&this.#E==null&&a!=null&&r.length>1){let o=(i?n:t)-Y(a,e),s=Math.floor(o/Math.max(1,a.bandwidth)*r.length);return r[Math.min(r.length-1,Math.max(0,s))]?.dataKey??null}let{k:o,b:s}=i?this.#Ie():this.#Fe(),c=i?t:n,l=this.#E;if(this.#e===`bar`&&l!=null)for(let t=0;t<r.length;t++){let n=l.lower[t]?.[e]??NaN,i=l.upper[t]?.[e]??NaN;if(Number.isNaN(n)||Number.isNaN(i)||n===i)continue;let a=n*o+s,u=i*o+s;if(c>=Math.min(a,u)&&c<=Math.max(a,u))return r[t]?.dataKey??null}let u=null,d=1/0;return r.forEach((t,n)=>{let r=(this.#E==null?this.#x.get(t.dataKey):this.#E.upper[n])?.[e]??NaN;if(Number.isNaN(r))return;let i=Math.abs(r*o+s-c);i<d&&(d=i,u=t.dataKey)}),u}#at(e,t){let n=e==null||this.#m===0?null:Math.min(Math.max(0,e),this.#m-1),r=this.#ae!==void 0;if(t.notify&&n!==this.#$e()){let e=n==null?null:this.#et(n);if(this.#i.onActiveIndexChange?.(e),r){this.#oe={index:e,viaKeyboard:t.viaKeyboard};return}}this.#se=t.viaKeyboard,r||(this.#ie=n),this.#lt(),this.#Oe()}#ot=null;#st=!1;#ct=null;#lt(e={force:!1}){let t=this.#$e();if(!e.force&&t===this.#ot&&this.#se===this.#st&&this.#re===this.#ct)return;if(this.#ot=t,this.#st=this.#se,this.#ct=this.#re,t==null||this.#m===0){this.#n.publishHover(null);return}let n=this.#et(t),r=this.#p[n]??{},i=this.#n.getSnapshot().series.map(e=>{let n=this.#x.get(e.dataKey)?.[t]??NaN;return{dataKey:e.dataKey,label:e.label,value:Number.isNaN(n)?null:n,color:e.color}});this.#r.stacked&&i.reverse(),this.#e===`scatter`&&(i=this.#re==null?i.filter(e=>e.value!=null):i.filter(e=>e.dataKey===this.#re));let a={index:n,xValue:this.#nt(t),datum:r,points:i,viaKeyboard:this.#se};if(this.#Ce()){let e=this.#G[t]??NaN;a.zValue=Number.isNaN(e)?null:e}this.#n.publishHover(a)}#ut(e,t,n){let r=this.#H;if(r==null||this.#m===0||t.length===0)return null;if(this.#Ce())return this.#dt(e,t);let i=this.#Le(),a=t.map((e,t)=>{let n=this.#We(e,`value`,t),r=[];for(let e=0;e<this.#m;e++)Number.isNaN(n[e]??NaN)||r.push(e);return r}),o=a.reduce((e,t)=>e+t.length,0);return t.forEach((t,s)=>{let c=this.#We(t,`value`,s),l=a[s]??[];e.save(),e.globalAlpha=this.#Ge(t.dataKey),ot(e,{color:r.series.get(t.dataKey)??`currentColor`,surface:r.chrome.surface,shape:this.#n.seriesShape(t.dataKey),totalPointCount:o,indexes:l,xAt:e=>(this.#h[e]??0)*i.k+i.b,yAt:e=>(c[e]??0)*n.k+n.b,radiusAt:()=>4}),e.restore()}),null}#dt(e,t){let n=this.#H;if(n==null)return null;let r=this.#U,i=xe(this.#q),a=r.left+r.width/2,o=r.top+r.height/2,s=this.#Y.values(),c=s[0]??1,l=s[1]??1,u=.85-.22*c-.11*l,d=Math.min(r.width,r.height)/2*u,f=this.#O.values(),p=[f[0]??0,f[1]??1],m=this.#D.values(),h=[m[0]??0,m[1]??1],g=this.#K,_=t.map(e=>this.#Ge(e.dataKey)),v=this.#Y.values(),y=v[0]??1,b=v[1]??1,x=(e,t,n)=>{let r=Se(e,t,n,i);return{x:a+r.x*d,y:o-r.y*d}},S=we.map(([e,t,n])=>x(e,t,n)),C=t[0],w=t.length===1&&C!=null?C.dataKey:`y`,T=[{label:this.#r.xKey,alpha:1,from:x(-1,-y,-b),to:x(1,-y,-b)},{label:w,alpha:y,from:x(-1,-1,-b),to:x(-1,1,-b)},{label:this.#r.zKey??`z`,alpha:b,from:x(-1,-y,-1),to:x(-1,-y,1)}];ct(e,{gridColor:n.chrome.grid,axisColor:n.chrome.baseline,corners:S,edges:Te,cubeAlpha:b,axes:T});let E=this.#m*t.length,D=this.#Q;(D==null||D.screenX.length<E)&&(D={screenX:new Float64Array(E),screenY:new Float64Array(E),radius:new Float64Array(E),seriesIndex:new Int32Array(E),pointIndex:new Int32Array(E),depths:new Float64Array(E),count:0});let O=D.depths,k=0;t.forEach((e,t)=>{let n=this.#We(e,`value`,t);for(let e=0;e<this.#m;e++){let r=n[e]??NaN,s=this.#G[e]??NaN;if(Number.isNaN(r)||Number.isNaN(s))continue;let c=Se(q(this.#h[e]??0,p),q(r,h)*y,q(s,g)*b,i);D.screenX[k]=a+c.x*d,D.screenY[k]=o-c.y*d,D.radius[k]=4*c.scale,D.seriesIndex[k]=t,D.pointIndex[k]=e,O[k]=c.depth,k+=1}}),D.count=k,this.#Q=D,this.#$.length<k&&(this.#$=new Int32Array(E));let A=this.#$.subarray(0,k);for(let e=0;e<k;e++)A[e]=e;A.sort((e,t)=>(O[t]??0)-(O[e]??0));let j=t.map(e=>this.#n.seriesShape(e.dataKey));return st(e,{count:k,order:A,screenX:D.screenX,screenY:D.screenY,radius:D.radius,colorAt:e=>{let r=t[D.seriesIndex[e]??0];return r==null?`currentColor`:n.series.get(r.dataKey)??`currentColor`},shapeAt:e=>j[D.seriesIndex[e]??0]??`circle`,alphaAt:e=>_[D.seriesIndex[e]??0]??1,surface:n.chrome.surface}),{center:{x:a,y:o},axes:T}}#ft(e,t){let n=this.#n.seriesSpecs(),r=576,i=null;if(this.#Ce()){let a=this.#Q;if(a==null)return null;for(let o=0;o<a.count;o++){let s=(a.screenX[o]??0)-e,c=(a.screenY[o]??0)-t,l=s*s+c*c;if(l<r){let e=n[a.seriesIndex[o]??0];if(e==null)continue;r=l,i={seriesKey:e.dataKey,index:a.pointIndex[o]??0,screenX:a.screenX[o]??0,screenY:a.screenY[o]??0}}}return i}let a=this.#Le(),o=this.#Fe();for(let s of n){let n=this.#x.get(s.dataKey);if(n!=null)for(let c=0;c<this.#m;c++){let l=n[c]??NaN;if(Number.isNaN(l))continue;let u=(this.#h[c]??0)*a.k+a.b,d=l*o.k+o.b,f=u-e,p=d-t,m=f*f+p*p;m<r&&(r=m,i={seriesKey:s.dataKey,index:c,screenX:u,screenY:d})}}return i}#pt(e){let t=this.#n.seriesSpecs();if(this.#Ce()){let t=this.#Q;if(t==null)return null;for(let n=0;n<t.count;n++)if((t.pointIndex[n]??-1)===e)return{x:t.screenX[n]??0,y:t.screenY[n]??0};return null}let n=this.#Le(),r=this.#Fe();for(let i of t){let t=this.#x.get(i.dataKey)?.[e]??NaN;if(!Number.isNaN(t))return{x:(this.#h[e]??0)*n.k+n.b,y:t*r.k+r.b}}return null}#mt(){let{crosshair:e,band:t,markers:n,tooltip:r}=this.#t,i=this.#$e(),a=i!=null&&this.#m>0,o=this.#e===`bar`,s=this.#e===`scatter`;if(e.style.opacity=a&&!o&&!s?`1`:`0`,t.style.opacity=a&&o?`1`:`0`,n.style.opacity=a&&!o?`1`:`0`,r.style.opacity=a?`1`:`0`,!a)return;let c=this.#U;if(s){let e=this.#ne??this.#pt(i);if(e==null){n.style.opacity=`0`,r.style.opacity=`0`;return}for(;n.children.length>1;)n.lastElementChild?.remove();n.children.length===0&&n.appendChild(wt(n.ownerDocument));let t=n.children[0];if(t instanceof HTMLElement){let n=this.#n.getSnapshot().series,r=this.#re==null?n.find(e=>{let t=this.#x.get(e.dataKey)?.[i]??NaN;return!Number.isNaN(t)}):n.find(e=>e.dataKey===this.#re);t.style.opacity=`1`,Tt(t,r?.shape??`circle`,r?.color??`currentColor`),t.style.transform=`translate3d(${e.x}px, ${e.y}px, 0)`}this.#ht(e.x,e.y);return}let l=this.#Re(i),u=this.#we();if(o){let e=this.#W;if(e!=null){let n=Ne(e,i),r=Math.max(1,n.size),a=n.start-(r-n.size)/2;u?(t.style.transform=`translate3d(${c.left}px, ${a}px, 0)`,t.style.width=`${c.width}px`,t.style.height=`${r}px`):(t.style.transform=`translate3d(${a}px, ${c.top}px, 0)`,t.style.width=`${r}px`,t.style.height=`${c.height}px`)}}else{e.style.transform=`translate3d(${l}px, ${c.top}px, 0)`,e.style.height=`${c.height}px`;let t=this.#n.getSnapshot().series;for(;n.children.length>t.length;)n.lastElementChild?.remove();for(;n.children.length<t.length;)n.appendChild(wt(n.ownerDocument));let r=this.#Fe();t.forEach((e,t)=>{let a=n.children[t];if(!(a instanceof HTMLElement))return;let o=this.#x.get(e.dataKey)?.[i]??NaN,s=this.#We(e,this.#E==null?`value`:`upper`,t)[i]??NaN;if(Number.isNaN(o)||Number.isNaN(s)){a.style.opacity=`0`;return}a.style.opacity=`1`,Tt(a,e.shape,e.color),a.style.transform=`translate3d(${l}px, ${s*r.k+r.b}px, 0)`})}o&&u&&this.#W!=null?this.#ht(this.#ce??c.left+c.width/2,X(this.#W,i)):this.#ht(l,this.#le??c.top+8)}#ht(e,t){let n=this.#U,r=this.#t.tooltip,i=this.#ue,a=e+12;a+i.width>n.left+n.width&&e-12-i.width>=n.left&&(a=e-12-i.width);let o=Math.max(0,Math.min(t-i.height/2,n.top+n.height-i.height));r.style.transform=`translate3d(${a}px, ${o}px, 0)`}};const xt=e=>e===3?{yaw:.65,pitch:-.35}:{yaw:0,pitch:0},St=(e,t,n,r)=>{for(let t of e.values())t.target=0;for(let n of t){let t=e.get(n.key);t==null?e.set(n.key,{alpha:+!!r,target:1,text:n.text}):(t.target=1,t.text=n.text)}let i=1-.84**(n/16.67),a=1-.88**(n/16.67),o=!1;for(let[t,n]of e){if(r)n.alpha=n.target;else{let e=n.target>n.alpha?i:a;n.alpha+=(n.target-n.alpha)*e}if(n.target===1&&n.alpha>.98&&(n.alpha=1),n.target===0&&n.alpha<.03){e.delete(t);continue}n.alpha!==n.target&&(o=!0)}return o},Ct={circle:`circle(50%)`,square:`inset(8%)`,triangle:`polygon(50% 0%, 100% 100%, 0% 100%)`,diamond:`polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)`,"triangle-down":`polygon(0% 0%, 100% 0%, 50% 100%)`,plus:`polygon(33.33% 0%, 66.67% 0%, 66.67% 33.33%, 100% 33.33%, 100% 66.67%, 66.67% 66.67%, 66.67% 100%, 33.33% 100%, 33.33% 66.67%, 0% 66.67%, 0% 33.33%, 33.33% 33.33%)`,cross:`polygon(73.57% 2.86%, 97.14% 26.43%, 73.57% 50%, 97.14% 73.57%, 73.57% 97.14%, 50% 73.57%, 26.43% 97.14%, 2.86% 73.57%, 26.43% 50%, 2.86% 26.43%, 26.43% 2.86%, 50% 26.43%)`,star:`polygon(50% 2.45%, 61.8% 38.77%, 100% 38.77%, 69.1% 61.23%, 80.9% 97.55%, 50% 75.1%, 19.1% 97.55%, 30.9% 61.23%, 0% 38.77%, 38.2% 38.77%)`},wt=e=>{let t=e.createElement(`div`);t.setAttribute(`data-slot`,`chart-active-point`),t.style.position=`absolute`,t.style.width=`12px`,t.style.height=`12px`,t.style.left=`-6px`,t.style.top=`-6px`;let n=e.createElement(`div`);n.style.position=`absolute`,n.style.inset=`0`,n.style.backgroundColor=`var(--background-color-card)`;let r=e.createElement(`div`);return r.style.position=`absolute`,r.style.inset=`2px`,t.appendChild(n),t.appendChild(r),t},Tt=(e,t,n)=>{let r=Ct[t];e.setAttribute(`data-shape`,t);let[i,a]=e.children;i instanceof HTMLElement&&(i.style.clipPath=r),a instanceof HTMLElement&&(a.style.clipPath=r,a.style.backgroundColor=n)},Et=(e,t)=>e instanceof Date?e.getTime():typeof e==`number`?e:t&&typeof e==`string`?new Date(e).getTime():NaN,Dt=(e,t)=>({columnCount:e.columnCount,hasData:e.hasData,minValue:new Float64Array(e.columnCount).fill(t),maxValue:new Float64Array(e.columnCount).fill(t),inValue:new Float64Array(e.columnCount).fill(t),outValue:new Float64Array(e.columnCount).fill(t)}),Ot=e=>e.replaceAll(`|`,`\\|`).replaceAll(/\s*\n\s*/g,` `),kt=e=>e instanceof Date?Number.isNaN(e.getTime())?`—`:e.toISOString():typeof e==`number`?Number.isFinite(e)?String(e):`—`:typeof e==`string`?Ot(e):`—`,At=e=>typeof e==`number`&&Number.isFinite(e)?String(e):`—`,jt=e=>`| ${e.join(` | `)} |`,Mt=({data:e,xKey:t,series:n,zKey:r})=>{let i=[Ot(t),...n.map(e=>Ot(e.label)),...r==null?[]:[Ot(r)]],a=e.map(e=>[kt(k(e,t)),...n.map(t=>At(k(e,t.dataKey))),...r==null?[]:[At(k(e,r))]]);return[jt(i),jt(i.map(()=>`---`)),...a.map(e=>jt(e))].join(`
2
- `)},Nt=(e,t)=>e==null?`var(${L(t)})`:I(e)?`var(${L(e)})`:e,Pt={"chart-1":`circle`,"chart-2":`square`,"chart-3":`triangle`,"chart-4":`diamond`,"chart-5":`triangle-down`,"chart-6":`plus`,"chart-7":`cross`,"chart-8":`star`,"chart-other":`circle`},Ft=(e,t)=>e??Pt[t],It={1:`chart-1`,2:`chart-2`,3:`chart-3`,4:`chart-4`,5:`chart-5`,6:`chart-6`,7:`chart-7`,8:`chart-8`,other:`chart-other`},Lt=e=>{let t=new Set;for(let n of e)n.seriesSlot!=null&&n.seriesSlot!==`other`&&t.add(It[n.seriesSlot]);let n=new Map,r=new Set(t);for(let t of e){if(t.seriesSlot!=null){n.set(t.dataKey,It[t.seriesSlot]);continue}let e=ee.find(e=>!r.has(e))??`chart-other`;n.set(t.dataKey,e),r.add(e)}return n};var Rt=class{#e=new Set;#t={series:[],hover:null,grid:null,xAxis:null,yAxis:null,referenceLines:[],tooltip:null,orientation:`vertical`};#n=new Map;#r=new Map;#i=0;#a=null;#o=!1;#s=`vertical`;#c=null;#l=null;#u=new Map;#d=new Map;#f=null;#p=null;onSeriesChange=null;onPresentationChange=null;subscribe=e=>(this.#e.add(e),()=>{this.#e.delete(e)});getSnapshot=()=>this.#t;seriesSpecs(){return[...this.#n.values()].toSorted((e,t)=>e.sequence-t.sequence).map(e=>e.spec)}seriesShape(e){return this.#t.series.find(t=>t.dataKey===e)?.shape??Pt[`chart-other`]}registerSeries(e){let t=this.#r.get(e.dataKey)??this.#i++;return this.#r.set(e.dataKey,t),this.#n.set(e.dataKey,{spec:e,sequence:t}),this.#m({seriesChanged:!0}),()=>{this.#n.get(e.dataKey)?.spec===e&&(this.#n.delete(e.dataKey),this.#m({seriesChanged:!0}))}}setDecorative(e){this.#o!==e&&(this.#o=e,this.#m({seriesChanged:!0}))}setOrientation(e){this.#s!==e&&(this.#s=e,this.#m())}registerGrid(e){let t={lines:e};return this.#a=t,this.#m(),()=>{this.#a===t&&(this.#a=null,this.#m())}}registerXAxis(e){return this.#c=e,this.#m(),()=>{this.#c===e&&(this.#c=null,this.#m())}}registerYAxis(e){return this.#l=e,this.#m(),()=>{this.#l===e&&(this.#l=null,this.#m())}}registerReferenceLine(e,t){let n=this.#d.get(e)??this.#i++;return this.#d.set(e,n),this.#u.set(e,{spec:t,sequence:n}),this.#m(),()=>{this.#u.get(e)?.spec===t&&(this.#u.delete(e),this.#m())}}registerTooltip(e){return this.#f=e,this.#m(),()=>{this.#f===e&&(this.#f=null,this.#m())}}publishHover(e){this.#p!==e&&(this.#p=e,this.#t={...this.#t,hover:e},this.#h())}seriesMeta(){let e=this.seriesSpecs(),t=Lt(e);return e.map(e=>{let n=t.get(e.dataKey)??`chart-other`,r=this.#o?R:Nt(e.color,n),i=this.#o?R:e.color??n;return{dataKey:e.dataKey,label:e.label,mark:e.mark,color:r,colorInput:i,shape:Ft(e.shape,n),texture:e.texture}})}#m(e={seriesChanged:!1}){this.#t={series:this.seriesMeta(),hover:this.#p,grid:this.#a,xAxis:this.#c,yAxis:this.#l,referenceLines:[...this.#u.values()].toSorted((e,t)=>e.sequence-t.sequence).map(e=>e.spec),tooltip:this.#f,orientation:this.#s},this.#h(),e.seriesChanged?this.onSeriesChange?.():this.onPresentationChange?.()}#h(){for(let e of this.#e)e()}};const zt=l(null),Bt=e=>{let t=u(zt);return _(t,`${e} must be composed inside ${e.split(`.`)[0]}.Root — it registers into the chart it belongs to and renders nothing on its own.`),t},Vt=e=>g(e.subscribe,e.getSnapshot,e.getSnapshot),Ht=e=>{let t=c(3),n,r;return t[0]===e?(n=t[1],r=t[2]):(n=()=>e.getSnapshot().series,r=()=>e.getSnapshot().series,t[0]=e,t[1]=n,t[2]=r),g(e.subscribe,n,r)},Ut=e=>{let t=c(3),n,r;return t[0]===e?(n=t[1],r=t[2]):(n=()=>e.getSnapshot().orientation,r=()=>e.getSnapshot().orientation,t[0]=e,t[1]=n,t[2]=r),g(e.subscribe,n,r)},Wt=(e,t)=>{let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>Object.hasOwn(t,n)&&Object.is(Reflect.get(e,n),Reflect.get(t,n)))},Gt=e=>{let[t,n]=h(e);return Wt(t,e)?t:(n(e),e)},Kt=(e,t)=>{for(let n of e){let e=k(n,t);if(e!=null)return e instanceof Date?`time`:typeof e==`number`?`linear`:`point`}return`point`},qt=[`auto`,`auto`],Jt=t=>{let i=c(133),a,o,s,l,u,d,g,x,S,C,w,T,E,D,O,A,j,M,N,P,F,I,L,R,ee,z;i[0]===t?(a=i[1],o=i[2],s=i[3],l=i[4],u=i[5],d=i[6],g=i[7],x=i[8],S=i[9],C=i[10],w=i[11],T=i[12],E=i[13],D=i[14],O=i[15],A=i[16],j=i[17],M=i[18],N=i[19],P=i[20],F=i[21],I=i[22],L=i[23],R=i[24],ee=i[25],z=i[26]):({kind:C,componentName:g,slotName:O,data:x,xKey:R,xScale:ee,zKey:z,dimensions:A,yDomain:j,stacked:M,orientation:N,animate:P,pending:F,decorative:I,activeIndex:a,onActiveIndexChange:w,onDatumActivate:T,className:d,children:u,ref:D,"data-slot":S,"aria-label":s,"aria-labelledby":l,"aria-hidden":o,tabIndex:L,...E}=t,i[0]=t,i[1]=a,i[2]=o,i[3]=s,i[4]=l,i[5]=u,i[6]=d,i[7]=g,i[8]=x,i[9]=S,i[10]=C,i[11]=w,i[12]=T,i[13]=E,i[14]=D,i[15]=O,i[16]=A,i[17]=j,i[18]=M,i[19]=N,i[20]=P,i[21]=F,i[22]=I,i[23]=L,i[24]=R,i[25]=ee,i[26]=z);let B=A===void 0?3:A,te=j===void 0?qt:j,ne=M!==void 0&&M,re=N===void 0?`vertical`:N,ie=P===void 0||P,ae=F!==void 0&&F,V=I!==void 0&&I,[H]=h(mn),U=m(null),W;i[27]!==x||i[28]!==R||i[29]!==z?(W={data:x,xKey:R,zKey:z},i[27]=x,i[28]=R,i[29]=z,i[30]=W):W=i[30];let oe=m(W),se;i[31]!==g||i[32]!==C||i[33]!==H?(se=()=>({kind:C,componentName:g,store:H,engineRef:U,dataRef:oe}),i[31]=g,i[32]=C,i[33]=H,i[34]=se):se=i[34];let[ce]=h(se),le,ue;i[35]!==x||i[36]!==R||i[37]!==z?(le=()=>{oe.current={data:x,xKey:R,zKey:z}},ue=[x,R,z],i[35]=x,i[36]=R,i[37]=z,i[38]=le,i[39]=ue):(le=i[38],ue=i[39]),p(le,ue);let de=m(null),fe=e(de,D),pe=m(null),me=m(null),G=m(null),he=m(null),ge=m(null),_e=m(null),K=f(),ye;i[40]!==x||i[41]!==C||i[42]!==R||i[43]!==ee?(ye=C===`bar`?`band`:ee??Kt(x,R),i[40]=x,i[41]=C,i[42]=R,i[43]=ee,i[44]=ye):ye=i[44];let be=ye;_(C!==`scatter`||x.length===0||be!==`point`,`${g}.Root requires numeric or Date x values — the "${R}" values are not numbers or dates, so they have no position on a continuous scatter axis.`);let[xe,Se]=te,Ce;bb0:{for(let e of x){let t=k(e,R);if(t instanceof Date&&ve(t)){Ce=!0;break bb0}}Ce=!1}let q=Ce,we,Te;i[45]!==C||i[46]!==H?(we=()=>{let e=de.current,t=pe.current,n=me.current,r=G.current,i=he.current,a=ge.current,o=_e.current;if(e==null||t==null||n==null||r==null||i==null||a==null||o==null)return;let s=new bt({kind:C,store:H,elements:{root:e,plot:t,canvas:n,crosshair:r,band:i,markers:a,tooltip:o}});return U.current=s,()=>{U.current=null,s.destroy()}},Te=[C,H],i[45]=C,i[46]=H,i[47]=we,i[48]=Te):(we=i[47],Te=i[48]),p(we,Te);let Ee,De;i[49]!==ie||i[50]!==V||i[51]!==B||i[52]!==re||i[53]!==be||i[54]!==ne||i[55]!==H||i[56]!==R||i[57]!==Se||i[58]!==xe||i[59]!==z?(Ee=()=>{U.current?.setOptions({xKey:R,xScale:be,yDomain:[xe,Se],zKey:z??null,dimensions:B,stacked:ne,orientation:re,animate:ie}),H.setOrientation(re),H.setDecorative(V)},De=[H,V,R,be,xe,Se,z,B,ne,re,ie],i[49]=ie,i[50]=V,i[51]=B,i[52]=re,i[53]=be,i[54]=ne,i[55]=H,i[56]=R,i[57]=Se,i[58]=xe,i[59]=z,i[60]=Ee,i[61]=De):(Ee=i[60],De=i[61]),p(Ee,De);let Oe,J;i[62]===x?(Oe=i[63],J=i[64]):(Oe=()=>{U.current?.setRows(x)},J=[x],i[62]=x,i[63]=Oe,i[64]=J),p(Oe,J);let ke;i[65]!==V||i[66]!==w||i[67]!==T?(ke=()=>{U.current?.setCallbacks(V?{onDatumActivate:null,onActiveIndexChange:null}:{onDatumActivate:T??null,onActiveIndexChange:w??null})},i[65]=V,i[66]=w,i[67]=T,i[68]=ke):ke=i[68],p(ke);let Ae,je;i[69]!==a||i[70]!==V?(Ae=()=>{U.current?.setControlledActiveIndex(V?void 0:a)},je=[V,a],i[69]=a,i[70]=V,i[71]=Ae,i[72]=je):(Ae=i[71],je=i[72]),p(Ae,je);let Me;i[73]===Symbol.for(`react.memo_cache_sentinel`)?(Me=()=>{U.current?.flushIngest()},i[73]=Me):Me=i[73],p(Me);let Y;i[74]!==S||i[75]!==O?(Y=r(S,O),i[74]=S,i[75]=O,i[76]=Y):Y=i[76];let X;i[77]===d?X=i[78]:(X=n(`relative flex aspect-video w-full flex-col`,d),i[77]=d,i[78]=X);let Ne=V?!0:o,Pe=V?void 0:L,Fe=V?!0:void 0,Ie=`${O}-plot`,Le=ae&&`opacity-60 transition-opacity duration-300`,Re;i[79]===Le?Re=i[80]:(Re=n(`relative min-h-0 w-full flex-1`,Le),i[79]=Le,i[80]=Re);let ze=`${O}-canvas`,Be;i[81]===ze?Be=i[82]:(Be=y(`canvas`,{"data-slot":ze,ref:me,"aria-hidden":!0,className:`absolute inset-0 size-full`}),i[81]=ze,i[82]=Be);let Z;i[83]!==s||i[84]!==l||i[85]!==V||i[86]!==K||i[87]!==C||i[88]!==z?(Z=V?null:b(v,{children:[y(`div`,{role:`application`,"aria-label":s,"aria-labelledby":l,"aria-describedby":K,tabIndex:0,className:n(`focus-visible:ring-focus-accent absolute inset-0 rounded-sm outline-none focus-visible:ring-2`,(C===`line`||C===`area`)&&`cursor-crosshair`,C===`scatter`&&z!=null&&`touch-none cursor-grab active:cursor-grabbing`),onPointerDown:e=>{e.isTrusted&&C===`scatter`&&z!=null&&e.currentTarget.setPointerCapture(e.pointerId),U.current?.handlePointerDown(e.nativeEvent.offsetX,e.nativeEvent.offsetY)},onPointerMove:e=>{U.current?.handlePointerMove(e.nativeEvent.offsetX,e.nativeEvent.offsetY)},onPointerUp:e=>{U.current?.handlePointerUp(e.nativeEvent.offsetX,e.nativeEvent.offsetY)},onPointerLeave:()=>{U.current?.handlePointerLeave()},onPointerCancel:()=>{U.current?.handlePointerLeave()},onBlur:()=>{U.current?.handlePointerLeave()},onKeyDown:e=>{U.current?.handleKeyDown(e.key)&&e.preventDefault()}}),y(`span`,{id:K,className:`sr-only`,children:`Use the left and right arrow keys to move between data points, Page Up and Page Down to jump by a tenth of the data, Home and End to jump to the first and last, Enter or Space to activate the current point, and Escape to dismiss the readout.`})]}),i[83]=s,i[84]=l,i[85]=V,i[86]=K,i[87]=C,i[88]=z,i[89]=Z):Z=i[89];let Ve=`${O}-crosshair`,Q;i[90]===Ve?Q=i[91]:(Q=y(`div`,{"data-slot":Ve,ref:G,"aria-hidden":!0,className:`bg-neutral-500 pointer-events-none absolute left-0 top-0 w-px opacity-0`}),i[90]=Ve,i[91]=Q);let $=`${O}-hover-band`,He;i[92]===$?He=i[93]:(He=y(`div`,{"data-slot":$,ref:he,"aria-hidden":!0,className:`bg-neutral-500/10 pointer-events-none absolute left-0 top-0 rounded-sm opacity-0`}),i[92]=$,i[93]=He);let Ue=`${O}-markers`,We;i[94]===Ue?We=i[95]:(We=y(`div`,{"data-slot":Ue,ref:ge,"aria-hidden":!0,className:`pointer-events-none absolute inset-0 opacity-0`}),i[94]=Ue,i[95]=We);let Ge;i[96]!==O||i[97]!==H||i[98]!==q?(Ge=y(nn,{slotName:O,store:H,tooltipRef:_e,xHasTimeOfDay:q}),i[96]=O,i[97]=H,i[98]=q,i[99]=Ge):Ge=i[99];let Ke;i[100]!==Ie||i[101]!==Re||i[102]!==Be||i[103]!==Z||i[104]!==Q||i[105]!==He||i[106]!==We||i[107]!==Ge?(Ke=b(`div`,{"data-slot":Ie,className:Re,ref:pe,children:[Be,Z,Q,He,We,Ge]}),i[100]=Ie,i[101]=Re,i[102]=Be,i[103]=Z,i[104]=Q,i[105]=He,i[106]=We,i[107]=Ge,i[108]=Ke):Ke=i[108];let qe;i[109]!==s||i[110]!==l||i[111]!==x||i[112]!==V||i[113]!==O||i[114]!==H||i[115]!==q||i[116]!==R||i[117]!==z?(qe=V?null:b(v,{children:[y(dn,{store:H,xHasTimeOfDay:q}),y(pn,{data:x,label:s,labelledBy:l,slotName:O,store:H,xHasTimeOfDay:q,xKey:R,zKey:z})]}),i[109]=s,i[110]=l,i[111]=x,i[112]=V,i[113]=O,i[114]=H,i[115]=q,i[116]=R,i[117]=z,i[118]=qe):qe=i[118];let Je;i[119]!==u||i[120]!==ce||i[121]!==Ke||i[122]!==qe?(Je=b(zt.Provider,{value:ce,children:[Ke,u,qe]}),i[119]=u,i[120]=ce,i[121]=Ke,i[122]=qe,i[123]=Je):Je=i[123];let Ye;return i[124]!==fe||i[125]!==E||i[126]!==Y||i[127]!==X||i[128]!==Ne||i[129]!==Pe||i[130]!==Fe||i[131]!==Je?(Ye=y(`div`,{"data-slot":Y,className:X,"aria-hidden":Ne,tabIndex:Pe,inert:Fe,ref:fe,...E,children:Je}),i[124]=fe,i[125]=E,i[126]=Y,i[127]=X,i[128]=Ne,i[129]=Pe,i[130]=Fe,i[131]=Je,i[132]=Ye):Ye=i[132],Ye},Yt=(e,t,n)=>{let r=c(13),i=Bt(e);_(i.kind===t,`${e} cannot be composed inside ${i.componentName}.Root — compose ${i.componentName} series parts instead.`);let{dataKey:a,label:o,seriesSlot:s,color:l,curve:u,markers:d,connectNulls:f,shape:m,texture:h}=n,g=u===void 0?`linear`:u,v=d!==void 0&&d,y=f!==void 0&&f,b=h===void 0?`solid`:h,x,S;return r[0]!==l||r[1]!==y||r[2]!==i.store||r[3]!==g||r[4]!==a||r[5]!==o||r[6]!==t||r[7]!==v||r[8]!==s||r[9]!==m||r[10]!==b?(x=()=>i.store.registerSeries({dataKey:a,label:o??a,seriesSlot:s,color:l,mark:t,curve:g,markers:v,connectNulls:y,shape:m,texture:b}),S=[i.store,a,o,s,l,t,g,v,y,m,b],r[0]=l,r[1]=y,r[2]=i.store,r[3]=g,r[4]=a,r[5]=o,r[6]=t,r[7]=v,r[8]=s,r[9]=m,r[10]=b,r[11]=x,r[12]=S):(x=r[11],S=r[12]),p(x,S),null},Xt=(e,t)=>{let n=c(4),r=Bt(e),{lines:i}=t,a,o;return n[0]!==r.store||n[1]!==i?(a=()=>r.store.registerGrid(i),o=[r.store,i],n[0]=r.store,n[1]=i,n[2]=a,n[3]=o):(a=n[2],o=n[3]),p(a,o),null},Zt=(e,t)=>{let n=c(5),r=Bt(e),{tickFormat:i,tickCount:a}=t,o,s;return n[0]!==r.store||n[1]!==a||n[2]!==i?(o=()=>r.store.registerXAxis({tickFormat:i,tickCount:a}),s=[r.store,i,a],n[0]=r.store,n[1]=a,n[2]=i,n[3]=o,n[4]=s):(o=n[3],s=n[4]),p(o,s),null},Qt=(e,t)=>{let n=c(5),r=Bt(e),{tickFormat:i,tickCount:a}=t,o,s;return n[0]!==r.store||n[1]!==a||n[2]!==i?(o=()=>r.store.registerYAxis({tickFormat:i,tickCount:a}),s=[r.store,i,a],n[0]=r.store,n[1]=a,n[2]=i,n[3]=o,n[4]=s):(o=n[3],s=n[4]),p(o,s),null},$t=(e,t)=>{let n=c(7),r=Bt(e),i=f(),{y:a,label:o,color:s}=t,l,u;return n[0]!==s||n[1]!==r.store||n[2]!==i||n[3]!==o||n[4]!==a?(l=()=>r.store.registerReferenceLine(i,{y:a,label:o,color:s}),u=[r.store,i,a,o,s],n[0]=s,n[1]=r.store,n[2]=i,n[3]=o,n[4]=a,n[5]=l,n[6]=u):(l=n[5],u=n[6]),p(l,u),null},en=(e,t)=>{let n=c(16),r=Bt(e),i,a,o,s,l,u;n[0]===t?(i=n[1],a=n[2],o=n[3],s=n[4],l=n[5],u=n[6]):({labelFormat:s,valueFormat:u,indicator:l,footer:o,children:i,...a}=t,n[0]=t,n[1]=i,n[2]=a,n[3]=o,n[4]=s,n[5]=l,n[6]=u);let d=l===void 0?`line`:l,f=Gt(a),m,h;return n[7]!==i||n[8]!==r.store||n[9]!==o||n[10]!==d||n[11]!==s||n[12]!==f||n[13]!==u?(m=()=>r.store.registerTooltip({labelFormat:s,valueFormat:u,indicator:d,footer:o,children:i,divProps:f}),h=[r.store,s,u,d,o,i,f],n[7]=i,n[8]=r.store,n[9]=o,n[10]=d,n[11]=s,n[12]=f,n[13]=u,n[14]=m,n[15]=h):(m=n[14],h=n[15]),p(m,h),null},tn=(e,t,n)=>e==null?`—`:n==null?G(e):n(e,t),nn=r=>{let i=c(27),{slotName:a,store:o,tooltipRef:s,xHasTimeOfDay:l}=r,u=Vt(o),d=u.tooltip,f=u.hover,h;i[0]===d?.divProps?h=i[1]:(h=d?.divProps??{},i[0]=d?.divProps,i[1]=h);let g,_,x,S;i[2]===h?(g=i[3],_=i[4],x=i[5],S=i[6]):({className:g,ref:_,style:S,...x}=h,i[2]=h,i[3]=g,i[4]=_,i[5]=x,i[6]=S);let C=m(null),w=e(s,C),T,E;i[7]===_?(T=i[8],E=i[9]):(T=()=>{if(_==null)return;let e=t(_),n=e(C.current);return()=>{typeof n==`function`?n():e(null)}},E=[_],i[7]=_,i[8]=T,i[9]=E),p(T,E);let D=d?.footer,O=`${a}-tooltip`,k;i[10]===g?k=i[11]:(k=n(`bg-popover border-popover text-strong pointer-events-none absolute left-0 top-0 z-10 min-w-32 rounded-md border px-2.5 py-1.5 text-xs shadow-md`,g),i[10]=g,i[11]=k);let A;i[12]===S?A=i[13]:(A={opacity:0,...S},i[12]=S,i[13]=A);let j=A,M;i[14]!==d||i[15]!==D||i[16]!==f||i[17]!==a||i[18]!==l?(M=f==null?null:d?.children==null?b(v,{children:[y(`div`,{className:`text-muted font-medium`,children:d?.labelFormat==null?K(f.xValue,{datasetHasTimeOfDay:l}):d.labelFormat(f.xValue)}),y(`div`,{className:`mt-1 grid gap-1`,children:f.points.map(e=>b(`div`,{className:`flex items-center gap-1.5`,children:[d?.indicator===`none`?null:y(`span`,{"aria-hidden":!0,className:`h-2.5 w-0.5 shrink-0 rounded-full`,style:{backgroundColor:e.color}}),y(`span`,{className:`text-muted`,children:e.label}),y(`span`,{className:`text-strong ml-auto pl-3 font-medium tabular-nums`,children:tn(e.value,e.dataKey,d?.valueFormat)})]},e.dataKey))}),f.zValue===void 0?null:b(`div`,{className:`mt-1 flex items-center gap-1.5`,children:[y(`span`,{className:`text-muted`,children:`z`}),y(`span`,{className:`text-strong ml-auto pl-3 font-medium tabular-nums`,children:f.zValue==null?`—`:G(f.zValue)})]}),D==null?null:y(`div`,{className:`text-muted mt-1`,children:typeof D==`function`?D(f):D})]}):y(`div`,{"data-slot":`${a}-tooltip-label`,className:`contents`,children:d.children(f)}),i[14]=d,i[15]=D,i[16]=f,i[17]=a,i[18]=l,i[19]=M):M=i[19];let N;return i[20]!==w||i[21]!==x||i[22]!==O||i[23]!==k||i[24]!==j||i[25]!==M?(N=y(`div`,{"data-slot":O,ref:w,className:k,style:j,...x,children:M}),i[20]=w,i[21]=x,i[22]=O,i[23]=k,i[24]=j,i[25]=M,i[26]=N):N=i[26],N},rn=(e,t,n=3)=>`repeating-linear-gradient(${e}, ${t} 0, ${t} 1px, transparent 1px, transparent ${n}px)`,an=`forced-color-adjust-none [print-color-adjust:exact] [-webkit-print-color-adjust:exact]`,on={hatch:({ink:e})=>({backgroundImage:rn(`135deg`,e)}),"hatch-reverse":({ink:e})=>({backgroundImage:rn(`45deg`,e)}),crosshatch:({ink:e})=>({backgroundImage:`${rn(`135deg`,e,4)}, ${rn(`45deg`,e,4)}`}),perpendicular:({ink:e,orientation:t})=>({backgroundImage:rn(t===`horizontal`?`90deg`:`0deg`,e)}),parallel:({ink:e,orientation:t})=>({backgroundImage:rn(t===`horizontal`?`0deg`:`90deg`,e)}),grid:({ink:e})=>({backgroundImage:`${rn(`0deg`,e,4)}, ${rn(`90deg`,e,4)}`}),dots:({ink:e})=>({backgroundImage:`radial-gradient(circle at 1px 1px, ${e} 0.75px, transparent 0.8px)`,backgroundSize:`3px 3px`})},sn=(e,t,n)=>e===`solid`?{}:on[e]({ink:U(t),orientation:n}),cn=e=>{let t=c(31),{series:r,orientation:i}=e;if(r.mark===`bar`){let e=r.texture,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=n(`size-2 shrink-0 rounded-[2px]`,an),t[0]=a):a=t[0];let o=r.color,s;t[1]!==i||t[2]!==r.color||t[3]!==r.texture?(s=sn(r.texture,r.color,i),t[1]=i,t[2]=r.color,t[3]=r.texture,t[4]=s):s=t[4];let c;t[5]!==r.color||t[6]!==s?(c={backgroundColor:o,...s},t[5]=r.color,t[6]=s,t[7]=c):c=t[7];let l;return t[8]!==r.texture||t[9]!==c?(l=y(`span`,{"aria-hidden":!0,"data-texture":e,className:a,style:c}),t[8]=r.texture,t[9]=c,t[10]=l):l=t[10],l}if(r.mark===`line`){let e;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=n(`absolute inset-x-0 top-1/2 h-0.5 -translate-y-1/2 rounded-full`,an),t[11]=e):e=t[11];let i;t[12]===r.color?i=t[13]:(i=y(`span`,{className:e,style:{backgroundColor:r.color}}),t[12]=r.color,t[13]=i);let a=r.shape,o;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(o=n(`relative size-2`,an),t[14]=o):o=t[14];let s=Ct[r.shape],c;t[15]!==r.color||t[16]!==s?(c={backgroundColor:r.color,clipPath:s},t[15]=r.color,t[16]=s,t[17]=c):c=t[17];let l;t[18]!==r.shape||t[19]!==c?(l=y(`span`,{"data-shape":a,className:o,style:c}),t[18]=r.shape,t[19]=c,t[20]=l):l=t[20];let u;return t[21]!==i||t[22]!==l?(u=b(`span`,{"aria-hidden":!0,className:`relative flex h-2 w-3 shrink-0 items-center justify-center`,children:[i,l]}),t[21]=i,t[22]=l,t[23]=u):u=t[23],u}let a=r.shape,o;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(o=n(`size-2 shrink-0`,an),t[24]=o):o=t[24];let s=Ct[r.shape],l;t[25]!==r.color||t[26]!==s?(l={backgroundColor:r.color,clipPath:s},t[25]=r.color,t[26]=s,t[27]=l):l=t[27];let u;return t[28]!==r.shape||t[29]!==l?(u=y(`span`,{"aria-hidden":!0,"data-shape":a,className:o,style:l}),t[28]=r.shape,t[29]=l,t[30]=u):u=t[30],u},ln=e=>{let t=c(18),r,i,a,o,s;t[0]===e?(r=t[1],i=t[2],a=t[3],o=t[4],s=t[5]):({partName:a,slotName:s,className:i,children:r,...o}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a,t[4]=o,t[5]=s);let l=Bt(a),u=Ht(l.store),d=Ut(l.store);if(u.length<2)return null;let f=`${s}-legend`,p;t[6]===i?p=t[7]:(p=n(`text-muted flex flex-wrap items-center gap-x-4 gap-y-1 pt-3 text-xs`,i),t[6]=i,t[7]=p);let m;t[8]!==r||t[9]!==d||t[10]!==u||t[11]!==s?(m=r==null?u.map(e=>b(`div`,{className:`flex items-center gap-1.5`,children:[y(cn,{series:e,orientation:d}),e.label]},e.dataKey)):y(`div`,{"data-slot":`${s}-legend-label`,className:`contents`,children:r(u)}),t[8]=r,t[9]=d,t[10]=u,t[11]=s,t[12]=m):m=t[12];let h;return t[13]!==o||t[14]!==f||t[15]!==p||t[16]!==m?(h=y(`div`,{"data-slot":f,className:p,...o,children:m}),t[13]=o,t[14]=f,t[15]=p,t[16]=m,t[17]=h):h=t[17],h},un=e=>{let t=c(31),n,r,l,u,f,p,g,_;t[0]===e?(n=t[1],r=t[2],l=t[3],u=t[4],f=t[5],p=t[6],g=t[7],_=t[8]):({partName:u,slotName:g,label:_,onCopy:r,onCopyError:l,onClick:n,ref:p,...f}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=l,t[4]=u,t[5]=f,t[6]=p,t[7]=g,t[8]=_);let C=_===void 0?`Copy data as Markdown`:_,w=Bt(u),T=a(),[E,D]=h(``),O=E!==``,k=m(!1),A=m(void 0),j,M;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(j=()=>()=>{A.current!=null&&clearTimeout(A.current)},M=[],t[9]=j,t[10]=M):(j=t[9],M=t[10]),d(j,M);let N=`${g}-copy-button`,P;t[11]===O?P=t[12]:(P=y(O?x:S,{}),t[11]=O,t[12]=P);let F;t[13]!==w||t[14]!==T||t[15]!==n||t[16]!==r||t[17]!==l?(F=async e=>{try{if(n?.(e),e.defaultPrevented){A.current!=null&&(clearTimeout(A.current),A.current=void 0),D(``);return}let{data:t,xKey:i,zKey:a}=w.dataRef.current,s=Mt({data:t,xKey:i,zKey:a,series:w.store.getSnapshot().series});await T(s),r?.(s),D(o(`Copied`,k)),A.current!=null&&clearTimeout(A.current),A.current=setTimeout(()=>{D(``)},2e3)}catch(e){l?.(e)}},t[13]=w,t[14]=T,t[15]=n,t[16]=r,t[17]=l,t[18]=F):F=t[18];let I;t[19]!==C||t[20]!==f||t[21]!==p||t[22]!==N||t[23]!==P||t[24]!==F?(I=y(i,{type:`button`,appearance:`ghost`,intent:`neutral`,size:`sm`,"data-slot":N,label:C,icon:P,ref:p,onClick:F,...f}),t[19]=C,t[20]=f,t[21]=p,t[22]=N,t[23]=P,t[24]=F,t[25]=I):I=t[25];let L;t[26]===E?L=t[27]:(L=y(s,{children:E}),t[26]=E,t[27]=L);let R;return t[28]!==I||t[29]!==L?(R=b(v,{children:[I,L]}),t[28]=I,t[29]=L,t[30]=R):R=t[30],R},dn=e=>{let t=c(6),{store:n,xHasTimeOfDay:r}=e,i=Vt(n),[a,o]=h(``),s=i.hover,l,u;t[0]!==s||t[1]!==r?(l=()=>{if(s==null||!s.viaKeyboard){o(``);return}let e=s.points.map(hn).join(`, `),t=s.zValue===void 0?``:`, z: ${s.zValue==null?`no data`:G(s.zValue)}`,n=setTimeout(()=>{o(`${K(s.xValue,{datasetHasTimeOfDay:r})}. ${e}${t}`)},120);return()=>clearTimeout(n)},u=[s,r],t[0]=s,t[1]=r,t[2]=l,t[3]=u):(l=t[2],u=t[3]),d(l,u);let f;return t[4]===a?f=t[5]:(f=y(`span`,{role:`status`,"aria-live":`polite`,className:`sr-only`,children:a}),t[4]=a,t[5]=f),f},fn=(e,t)=>{let n=c(3),[r,i]=h(void 0),a,o;return n[0]===t?(a=n[1],o=n[2]):(a=()=>{if(t==null){i(void 0);return}let e=t.split(/\s+/).map(gn).filter(Boolean).join(` `);i(e||void 0)},o=[t],n[0]=t,n[1]=a,n[2]=o),d(a,o),e??r},pn=e=>{let t=c(39),{data:n,label:r,labelledBy:i,slotName:a,store:o,xHasTimeOfDay:s,xKey:l,zKey:u}=e,d=Ht(o),f=fn(r,i);if(n.length===0||d.length===0)return null;let p,m,h,g,_;if(t[0]!==n||t[1]!==f||t[2]!==d||t[3]!==a||t[4]!==s||t[5]!==l||t[6]!==u){let e=n.slice(0,150);g=`sr-only`,_=`${a}-data-table`;let r=`${f==null?`Chart data`:`${f} — chart data`}${n.length>150?`. Showing the first 150 of ${n.length} rows.`:`.`}`;t[12]===r?m=t[13]:(m=y(`caption`,{children:r}),t[12]=r,t[13]=m);let i;t[14]===l?i=t[15]:(i=y(`th`,{scope:`col`,children:l}),t[14]=l,t[15]=i);let o;t[16]===d?o=t[17]:(o=d.map(_n),t[16]=d,t[17]=o);let c;t[18]===u?c=t[19]:(c=u==null?null:y(`th`,{scope:`col`,children:u}),t[18]=u,t[19]=c),t[20]!==i||t[21]!==o||t[22]!==c?(h=y(`thead`,{children:b(`tr`,{children:[i,o,c]})}),t[20]=i,t[21]=o,t[22]=c,t[23]=h):h=t[23];let v;t[24]!==d||t[25]!==s||t[26]!==l||t[27]!==u?(v=(e,t)=>{let n=k(e,l),r=n instanceof Date&&!Number.isNaN(n.getTime()),i=typeof n==`string`||typeof n==`number`||n instanceof Date?K(n,{datasetHasTimeOfDay:s}):String(n);return b(`tr`,{children:[y(`th`,{scope:`row`,"data-value":typeof n==`number`&&Number.isFinite(n)?n:void 0,children:r?y(`time`,{dateTime:n.toISOString(),children:i}):i}),d.map(t=>{let n=k(e,t.dataKey),r=typeof n==`number`&&Number.isFinite(n);return y(`td`,{"data-value":r?n:void 0,children:r?G(n):`—`},t.dataKey)}),u==null?null:(()=>{let t=k(e,u),n=typeof t==`number`&&Number.isFinite(t);return y(`td`,{"data-value":n?t:void 0,children:n?G(t):`—`})})()]},t)},t[24]=d,t[25]=s,t[26]=l,t[27]=u,t[28]=v):v=t[28],p=e.map(v),t[0]=n,t[1]=f,t[2]=d,t[3]=a,t[4]=s,t[5]=l,t[6]=u,t[7]=p,t[8]=m,t[9]=h,t[10]=g,t[11]=_}else p=t[7],m=t[8],h=t[9],g=t[10],_=t[11];let v;t[29]===p?v=t[30]:(v=y(`tbody`,{children:p}),t[29]=p,t[30]=v);let x;t[31]!==m||t[32]!==h||t[33]!==v?(x=b(`table`,{children:[m,h,v]}),t[31]=m,t[32]=h,t[33]=v,t[34]=x):x=t[34];let S;return t[35]!==g||t[36]!==_||t[37]!==x?(S=y(`div`,{className:g,"data-slot":_,children:x}),t[35]=g,t[36]=_,t[37]=x,t[38]=S):S=t[38],S};function mn(){return new Rt}function hn(e){return`${e.label}: ${e.value==null?`no data`:G(e.value)}`}function gn(e){return document.getElementById(e)?.textContent?.trim()??``}function _n(e){return y(`th`,{scope:`col`,children:e.label},e.dataKey)}export{$t as a,Zt as c,Xt as i,Qt as l,ln as n,Yt as o,Jt as r,en as s,un as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-sFdxsL7k.js";import{t as n}from"./clsx-DUGZgXfJ.js";import{a as r,r as i}from"./field-Bpptk_9t.js";import{c as a}from"react/compiler-runtime";import{useRef as o,useState as s}from"react";import{jsx as c}from"react/jsx-runtime";const l=e=>e===`indeterminate`,u=u=>{let d=a(37),f,p,m,h,g,_,v,y,b,x;d[0]===u?(f=d[1],p=d[2],m=d[3],h=d[4],g=d[5],_=d[6],v=d[7],y=d[8],b=d[9],x=d[10]):({"aria-invalid":f,className:g,checked:p,defaultChecked:m,defaultValue:x,onClick:_,readOnly:y,ref:b,validation:h,...v}=u,d[0]=u,d[1]=f,d[2]=p,d[3]=m,d[4]=h,d[5]=g,d[6]=_,d[7]=v,d[8]=y,d[9]=b,d[10]=x);let S=x===void 0?`on`:x,C=o(null),w=t(C,b),[T]=s(m),E=r(),D=h??E,O;d[11]!==f||d[12]!==D?(O=i({"aria-invalid":f,validation:D}),d[11]=f,d[12]=D,d[13]=O):O=d[13];let{ariaInvalid:k,validation:A}=O,j=p??T,M,N;d[14]===j?(M=d[15],N=d[16]):(M=()=>{C.current&&(C.current.indeterminate=l(j))},N=[j],d[14]=j,d[15]=M,d[16]=N),e(M,N);let P;d[17]!==p||d[18]!==T?(P=p==null?{defaultChecked:l(T)?void 0:T}:{checked:!l(p)&&p},d[17]=p,d[18]=T,d[19]=P):P=d[19];let F=P,I=l(p)?`mixed`:p,L=y||void 0,R;d[20]===g?R=d[21]:(R=n(`border-form bg-form shrink-0 cursor-pointer select-none appearance-none rounded border disabled:cursor-default disabled:opacity-50`,`bg-center bg-no-repeat focus:outline-hidden`,`focus-visible:border-accent-600 focus-visible:ring-focus-accent focus-visible:outline-hidden focus-visible:ring-4`,`checked:border-accent-600 checked:bg-accent-600 checked:bg-checked-icon`,`indeterminate:border-accent-600 indeterminate:bg-accent-600 indeterminate:bg-indeterminate-icon`,`data-validation-success:border-success-600 data-validation-success:checked:bg-success-600 data-validation-success:indeterminate:bg-success-600 focus-visible:data-validation-success:border-success-600 focus-visible:data-validation-success:ring-focus-success`,`data-validation-warning:border-warning-600 data-validation-warning:checked:bg-warning-600 data-validation-warning:indeterminate:bg-warning-600 focus-visible:data-validation-warning:border-warning-600 focus-visible:data-validation-warning:ring-focus-warning`,`data-validation-error:border-danger-600 data-validation-error:checked:bg-danger-600 data-validation-error:indeterminate:bg-danger-600 focus-visible:data-validation-error:border-danger-600 focus-visible:data-validation-error:ring-focus-danger`,`where:block where:size-4 where:p-0`,g),d[20]=g,d[21]=R);let z=A||void 0,B;d[22]!==_||d[23]!==y?(B=e=>{if(y){e.preventDefault();return}_?.(e)},d[22]=_,d[23]=y,d[24]=B):B=d[24];let V;return d[25]!==k||d[26]!==F||d[27]!==w||d[28]!==S||d[29]!==v||d[30]!==y||d[31]!==z||d[32]!==B||d[33]!==I||d[34]!==L||d[35]!==R?(V=c(`input`,{"aria-checked":I,"aria-invalid":k,"aria-readonly":L,"data-slot":`checkbox`,className:R,...F,"data-validation":z,defaultValue:S,onClick:B,readOnly:y,ref:w,type:`checkbox`,...v}),d[25]=k,d[26]=F,d[27]=w,d[28]=S,d[29]=v,d[30]=y,d[31]=z,d[32]=B,d[33]=I,d[34]=L,d[35]=R,d[36]=V):V=d[36],V};function d({allSelected:e,someSelected:t}){return e?!0:t?`indeterminate`:!1}export{d as n,u as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-sFdxsL7k.js";import{t as n}from"./cx-0HCjnNv1.js";import{t as r}from"./slot-BsvE2ntj.js";import{t as i}from"./interactive-target-BXScNeOr.js";import{t as a}from"./field-B1wqeZr4.js";import{t as o}from"./label-BAy0Mg59.js";import{t as s}from"./radio-group-HDVxTNPi.js";import{c}from"react/compiler-runtime";import{cloneElement as l,createContext as u,isValidElement as d,useContext as f,useId as p,useRef as m}from"react";import h from"tiny-invariant";import{jsx as g}from"react/jsx-runtime";const _=u(null);function v(e){let t=f(_);return h(t,`Choice.${e} must be rendered inside Choice.Root.`),t}const y=e=>{let t=c(36),r,i,o,s,l,u,d,h,v,y;t[0]===e?(r=t[1],i=t[2],o=t[3],s=t[4],l=t[5],u=t[6],d=t[7],h=t[8],v=t[9],y=t[10]):({"aria-describedby":r,"aria-errormessage":i,"aria-invalid":o,children:s,className:l,disabled:y,id:u,name:d,ref:v,...h}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=o,t[4]=s,t[5]=l,t[6]=u,t[7]=d,t[8]=h,t[9]=v,t[10]=y);let b=y!==void 0&&y,x=f(a),S=x?.id,C=x?.name,w=x?.[`aria-describedby`],T=x?.[`aria-invalid`],E=x?.[`aria-errormessage`],D=p(),O=p(),k=m(null),A=S??u??D,j=w??r,M;t[11]!==O||t[12]!==j?(M=[j,O].filter(Boolean).join(` `)||void 0,t[11]=O,t[12]=j,t[13]=M):M=t[13];let N=M,P=C??d,F=T??o,I=E??i,L;t[14]!==A||t[15]!==N||t[16]!==b||t[17]!==P||t[18]!==F||t[19]!==I?(L={id:A,name:P,disabled:b,"aria-describedby":N,"aria-invalid":F,"aria-errormessage":I},t[14]=A,t[15]=N,t[16]=b,t[17]=P,t[18]=F,t[19]=I,t[20]=L):L=t[20];let R;t[21]!==A||t[22]!==O||t[23]!==b||t[24]!==L?(R={controlId:A,descriptionId:O,disabled:b,labelRef:k,controlProps:L},t[21]=A,t[22]=O,t[23]=b,t[24]=L,t[25]=R):R=t[25];let z=R,B;t[26]===l?B=t[27]:(B=n(`flex w-full items-start gap-2`,l),t[26]=l,t[27]=B);let V;t[28]!==s||t[29]!==h||t[30]!==v||t[31]!==B?(V=g(`div`,{ref:v,"data-slot":`choice`,className:B,...h,children:s}),t[28]=s,t[29]=h,t[30]=v,t[31]=B,t[32]=V):V=t[32];let H;return t[33]!==z||t[34]!==V?(H=g(_.Provider,{value:z,children:V}),t[33]=z,t[34]=V,t[35]=H):H=t[35],H},b=e=>{let t=c(15),r,i,a,o;t[0]===e?(r=t[1],i=t[2],a=t[3],o=t[4]):({children:r,className:i,ref:o,...a}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a,t[4]=o);let{controlProps:s}=v(`Indicator`),u;t[5]!==r||t[6]!==s?(u=d(r)?l(r,{...s,disabled:s.disabled||r.props.disabled===!0,name:s.name??r.props.name,"aria-invalid":s[`aria-invalid`]??r.props[`aria-invalid`],"aria-errormessage":s[`aria-errormessage`]??r.props[`aria-errormessage`]}):r,t[5]=r,t[6]=s,t[7]=u):u=t[7];let f=u,p;t[8]===i?p=t[9]:(p=n(`flex h-lh shrink-0 items-center text-sm`,i),t[8]=i,t[9]=p);let m;return t[10]!==f||t[11]!==a||t[12]!==o||t[13]!==p?(m=g(`span`,{ref:o,"data-slot":`choice-indicator`,className:p,...a,children:f}),t[10]=f,t[11]=a,t[12]=o,t[13]=p,t[14]=m):m=t[14],m},x=e=>{let t=c(12),i,a,o,s;t[0]===e?(i=t[1],a=t[2],o=t[3],s=t[4]):({asChild:i,className:a,ref:s,...o}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=o,t[4]=s);let l=i?r:`div`,u;t[5]===a?u=t[6]:(u=n(`flex min-w-0 flex-1 flex-col gap-0.5`,a),t[5]=a,t[6]=u);let d;return t[7]!==l||t[8]!==o||t[9]!==s||t[10]!==u?(d=g(l,{ref:s,"data-slot":`choice-content`,className:u,...o}),t[7]=l,t[8]=o,t[9]=s,t[10]=u,t[11]=d):d=t[11],d},S=e=>{let r=c(13),i,a,s;r[0]===e?(i=r[1],a=r[2],s=r[3]):({className:i,ref:s,...a}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=s);let{controlId:l,disabled:u,labelRef:d}=v(`Label`),f=t(d,s),p=u&&`opacity-50`,m;r[4]!==i||r[5]!==p?(m=n(p,i),r[4]=i,r[5]=p,r[6]=m):m=r[6];let h;return r[7]!==f||r[8]!==l||r[9]!==u||r[10]!==a||r[11]!==m?(h=g(o,{ref:f,"data-slot":`choice-label`,className:m,...a,htmlFor:l,disabled:u}),r[7]=f,r[8]=l,r[9]=u,r[10]=a,r[11]=m,r[12]=h):h=r[12],h},C=t=>{let i=c(19),a,o,l,u,d;i[0]===t?(a=i[1],o=i[2],l=i[3],u=i[4],d=i[5]):({asChild:a,className:o,id:l,ref:d,...u}=t,i[0]=t,i[1]=a,i[2]=o,i[3]=l,i[4]=u,i[5]=d);let{disabled:m}=v(`Title`),h=f(s),_=p(),y=l??_,b,x;i[6]!==h||i[7]!==y?(b=()=>h?.registerLabelId(y),x=[h,y],i[6]=h,i[7]=y,i[8]=b,i[9]=x):(b=i[8],x=i[9]),e(b,x);let S=a?r:`p`,C=m&&`opacity-50`,w;i[10]!==o||i[11]!==C?(w=n(`text-strong text-sm font-medium font-sans`,C,o),i[10]=o,i[11]=C,i[12]=w):w=i[12];let T;return i[13]!==S||i[14]!==u||i[15]!==d||i[16]!==w||i[17]!==y?(T=g(S,{ref:d,"data-slot":`choice-title`,className:w,...u,id:y}),i[13]=S,i[14]=u,i[15]=d,i[16]=w,i[17]=y,i[18]=T):T=i[18],T};function w(e){return e.defaultPrevented||i(e.target,e.currentTarget)?!1:e.currentTarget.closest(`label`)==null}const T={Root:y,Indicator:b,Content:x,Label:S,Title:C,Description:t=>{let i=c(24),a,o,l,u,d;i[0]===t?(a=i[1],o=i[2],l=i[3],u=i[4],d=i[5]):({asChild:a,className:o,onClick:l,ref:d,...u}=t,i[0]=t,i[1]=a,i[2]=o,i[3]=l,i[4]=u,i[5]=d);let{descriptionId:p,disabled:m,labelRef:h}=v(`Description`),_=f(s),y,b;i[6]!==p||i[7]!==_?(y=()=>_?.registerDescriptionId(p),b=[_,p],i[6]=p,i[7]=_,i[8]=y,i[9]=b):(y=i[8],b=i[9]),e(y,b);let x=a?r:`p`,S=!m&&`[[data-slot~=choice-label]~&]:cursor-pointer`,C=m&&`opacity-50`,T;i[10]!==o||i[11]!==S||i[12]!==C?(T=n(`text-body text-sm leading-4`,S,C,o),i[10]=o,i[11]=S,i[12]=C,i[13]=T):T=i[13];let E;i[14]!==h||i[15]!==l?(E=e=>{l?.(e),w(e)&&(h.current?.click(),e.preventDefault())},i[14]=h,i[15]=l,i[16]=E):E=i[16];let D;return i[17]!==x||i[18]!==p||i[19]!==u||i[20]!==d||i[21]!==T||i[22]!==E?(D=g(x,{ref:d,"data-slot":`choice-description`,className:T,onClick:E,...u,id:p}),i[17]=x,i[18]=p,i[19]=u,i[20]=d,i[21]=T,i[22]=E,i[23]=D):D=i[23],D}};export{T as t};