@ngrok/mantle 0.91.1 → 0.92.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 (134) hide show
  1. package/dist/accordion.js +1 -1
  2. package/dist/agent.json +5 -2
  3. package/dist/{alert-BV0VWU2o.d.ts → alert-BcSBNR3S.d.ts} +2 -2
  4. package/dist/alert-P9lwn25X.js +1 -0
  5. package/dist/alert-center.d.ts +1 -1
  6. package/dist/alert-center.js +1 -1
  7. package/dist/alert-dialog.d.ts +19 -1
  8. package/dist/alert-dialog.js +1 -1
  9. package/dist/alert.d.ts +1 -1
  10. package/dist/alert.js +1 -1
  11. package/dist/app-layout.d.ts +1 -1
  12. package/dist/app-layout.js +1 -1
  13. package/dist/area-chart.d.ts +10 -3
  14. package/dist/area-chart.js +1 -1
  15. package/dist/bar-chart.d.ts +9 -3
  16. package/dist/bar-chart.js +1 -1
  17. package/dist/breadcrumb.js +1 -1
  18. package/dist/browser-only-BTSrYWLj.js +1 -0
  19. package/dist/browser-only.js +1 -1
  20. package/dist/{button-Cwrv2Mwv.js → button-B8k98Pby.js} +1 -1
  21. package/dist/button-BQZ6eoD3.js +1 -0
  22. package/dist/{button-Dt9LZMT5.d.ts → button-BX-4lYUn.d.ts} +3 -3
  23. package/dist/{button-BOCRKR5v.d.ts → button-CPsKGDK0.d.ts} +52 -1
  24. package/dist/button-Dge0D5bl.js +1 -0
  25. package/dist/{button-BFAvonp1.d.ts → button-Yxyu1XMd.d.ts} +1 -1
  26. package/dist/button.d.ts +3 -3
  27. package/dist/button.js +1 -1
  28. package/dist/calendar.js +1 -1
  29. package/dist/card.d.ts +1 -1
  30. package/dist/chart-BpWfQAwf.js +2 -0
  31. package/dist/{chart-ynMysD16.d.ts → chart-BpfbtOUN.d.ts} +14 -0
  32. package/dist/{checkbox-BpW9TmW6.js → checkbox-DmSQXs26.js} +1 -1
  33. package/dist/checkbox.js +1 -1
  34. package/dist/{choice-U6_8mOOO.js → choice-2Lrv8_nl.js} +1 -1
  35. package/dist/choice.js +1 -1
  36. package/dist/code-block.js +6 -6
  37. package/dist/combobox.d.ts +79 -1
  38. package/dist/combobox.js +1 -1
  39. package/dist/command.d.ts +5 -1
  40. package/dist/command.js +1 -1
  41. package/dist/{copy-to-clipboard-Cza2OT47.js → copy-to-clipboard-DInu78k_.js} +1 -1
  42. package/dist/data-table.d.ts +2 -2
  43. package/dist/data-table.js +1 -1
  44. package/dist/description-list.d.ts +1 -1
  45. package/dist/{dialog-DedsCsnk.d.ts → dialog-2fRO4ca4.d.ts} +19 -1
  46. package/dist/{dialog-eL61O8eg.js → dialog-qordIos1.js} +1 -1
  47. package/dist/dialog.d.ts +1 -1
  48. package/dist/dialog.js +1 -1
  49. package/dist/{dropdown-menu-C4C1x-7W.js → dropdown-menu-CLHkKzhe.js} +1 -1
  50. package/dist/{dropdown-menu-ByQQIsQE.d.ts → dropdown-menu-CpjRwMWe.d.ts} +1 -1
  51. package/dist/dropdown-menu.d.ts +1 -1
  52. package/dist/dropdown-menu.js +1 -1
  53. package/dist/field.d.ts +1 -1
  54. package/dist/field.js +1 -1
  55. package/dist/hooks.d.ts +15 -1
  56. package/dist/hooks.js +1 -1
  57. package/dist/hover-card.js +1 -1
  58. package/dist/{icons-exKDODyp.js → icons-DGL0d2Il.js} +1 -1
  59. package/dist/icons.js +1 -1
  60. package/dist/{index-C6s5cGCr.d.ts → index-BhfgyurF.d.ts} +9 -9
  61. package/dist/input.js +1 -1
  62. package/dist/line-chart.d.ts +10 -3
  63. package/dist/line-chart.js +1 -1
  64. package/dist/list-RFRIQxU2.js +1 -0
  65. package/dist/list.js +1 -1
  66. package/dist/llms.txt +2 -2
  67. package/dist/mantle.css +409 -12
  68. package/dist/migrations/0012-single-stylesheet.yml +1971 -0
  69. package/dist/multi-select.d.ts +1 -1
  70. package/dist/multi-select.js +1 -1
  71. package/dist/pagination.d.ts +2 -2
  72. package/dist/pagination.js +1 -1
  73. package/dist/popover-BCGCpwkK.js +1 -0
  74. package/dist/popover.js +1 -1
  75. package/dist/radio-group.js +1 -1
  76. package/dist/sandbar.d.ts +1 -1
  77. package/dist/sandbar.js +1 -1
  78. package/dist/scatter-plot.d.ts +10 -4
  79. package/dist/scatter-plot.js +1 -1
  80. package/dist/{select-CRp_ndSJ.d.ts → select-BkhBxtOT.d.ts} +1 -1
  81. package/dist/{select-BdF_CnfJ.js → select-MjJMGqwP.js} +1 -1
  82. package/dist/select.d.ts +1 -1
  83. package/dist/select.js +1 -1
  84. package/dist/selectable-list.js +1 -1
  85. package/dist/{separator-DNovVsrx.d.ts → separator-D9AWEkcJ.d.ts} +4 -0
  86. package/dist/{separator-BPE-A8tw.js → separator-DfzxVutO.js} +1 -1
  87. package/dist/separator.d.ts +1 -1
  88. package/dist/separator.js +1 -1
  89. package/dist/{shake-u3qyeThI.js → shake-DL6WhMXM.js} +1 -1
  90. package/dist/{sheet-BIyuxMmF.js → sheet-C0QytOsE.js} +1 -1
  91. package/dist/sheet.d.ts +20 -2
  92. package/dist/sheet.js +1 -1
  93. package/dist/sidebar.d.ts +6 -2
  94. package/dist/sidebar.js +1 -1
  95. package/dist/slider.js +1 -1
  96. package/dist/split-button.d.ts +3 -3
  97. package/dist/split-button.js +1 -1
  98. package/dist/table-CFHiDBW8.js +1 -0
  99. package/dist/table.js +1 -1
  100. package/dist/tabs.d.ts +1 -1
  101. package/dist/tabs.js +1 -1
  102. package/dist/text-area.js +1 -1
  103. package/dist/theme-CwtpudOH.js +1 -0
  104. package/dist/theme-switcher.d.ts +1 -1
  105. package/dist/theme-switcher.js +1 -1
  106. package/dist/theme.d.ts +15 -69
  107. package/dist/theme.js +1 -1
  108. package/dist/toast.js +1 -1
  109. package/dist/truncated-text.js +1 -1
  110. package/dist/types.d.ts +1 -1
  111. package/dist/use-copy-to-clipboard-Dy_0Qzb7.js +1 -0
  112. package/dist/use-is-apple-platform-D4nifHMx.js +1 -0
  113. package/dist/use-isomorphic-layout-effect-CLSmHzo4.js +1 -0
  114. package/dist/use-prefers-reduced-motion-CU6mWmOe.js +1 -0
  115. package/dist/use-swipe-to-dismiss-DceYk1Id.js +1 -0
  116. package/dist/utils.js +1 -1
  117. package/dist/well.d.ts +1 -1
  118. package/package.json +1 -5
  119. package/dist/alert-QXHRO9ji.js +0 -1
  120. package/dist/browser-only-Crr3sgA0.js +0 -1
  121. package/dist/button-CZ-q7fYv.js +0 -1
  122. package/dist/button-DTpsT864.js +0 -1
  123. package/dist/chart-D2LtDZtV.js +0 -2
  124. package/dist/list-DOVZoz9t.js +0 -1
  125. package/dist/mantle-dark.css +0 -385
  126. package/dist/popover-q2-rCY1q.js +0 -1
  127. package/dist/table-DBbKqOVq.js +0 -1
  128. package/dist/theme-CBGxDNFc.js +0 -1
  129. package/dist/use-copy-to-clipboard-ByLT8veV.js +0 -1
  130. package/dist/use-is-apple-platform-CMPzIYjz.js +0 -1
  131. package/dist/use-is-hydrated-DDCqXmju.js +0 -1
  132. package/dist/use-isomorphic-layout-effect-DdTRtMY-.js +0 -1
  133. package/dist/use-prefers-reduced-motion-DimzRx-M.js +0 -1
  134. package/dist/use-swipe-to-dismiss-Cj-AayFd.js +0 -1
@@ -1,6 +1,6 @@
1
1
  import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
2
2
  import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
3
- import { r as VariantProps } from "./index-C6s5cGCr.js";
3
+ import { r as VariantProps } from "./index-BhfgyurF.js";
4
4
  import { ComponentProps, ReactNode } from "react";
5
5
  /**
6
6
  * The tone axis of the text-labelled button family (`Button` and
@@ -77,6 +77,13 @@ type ButtonProps = ComponentProps<"button"> & Omit<ButtonVariants, "appearance"
77
77
  * An icon to render inside the button, beside the button's text
78
78
  * children. When `isLoading` is `true`, a spinner replaces the icon.
79
79
  *
80
+ * Pass the icon here, never as a child. A child icon is an anti-pattern:
81
+ * it gets no `size-5` and no `shrink-0`, the padding on its side does not
82
+ * tighten, and `isLoading` adds a spinner beside it instead of in its place.
83
+ *
84
+ * The icon gets `size-5`. A size class on the icon element wins, as in
85
+ * `icon={<GearIcon className="size-4" />}`.
86
+ *
80
87
  * For an icon-only button, do not use `Button` — use `IconButton`
81
88
  * instead: it requires an accessible `label` and renders a square box
82
89
  * on the same shared size scale.
@@ -125,6 +132,10 @@ type ButtonProps = ComponentProps<"button"> & Omit<ButtonVariants, "appearance"
125
132
  * while `IconButton` requires a screen-reader `label` and renders a square
126
133
  * box on the same shared size scale.
127
134
  *
135
+ * **Icons.** Pass the icon through the `icon` prop, never as a child. A child
136
+ * icon is an anti-pattern: it gets no size, no `shrink-0`, and no padding
137
+ * adjustment, and `isLoading` adds a spinner beside it.
138
+ *
128
139
  * **Structure.** `children` render inside a `<span data-slot="button-label">`,
129
140
  * beside the `icon` slot. The span carries `display: contents`, so it lays out
130
141
  * nothing of its own — every child stays a flex item of the button, and the
@@ -140,6 +151,12 @@ type ButtonProps = ComponentProps<"button"> & Omit<ButtonVariants, "appearance"
140
151
  * with `tabIndex={-1}`, and a click on it is cancelled before any handler runs.
141
152
  * An explicit `disabled` wins over `isLoading`, so `disabled={false}` keeps a
142
153
  * loading button enabled. `aria-disabled={false}` cannot re-enable the button.
154
+ * To gate a button on readiness and on a pending action, put both in
155
+ * `disabled`: `disabled={!isReady || isPending}`.
156
+ *
157
+ * **`asChild`.** Wrap a plain `<a>` or a router `Link`. Do not wrap `Anchor`:
158
+ * `Anchor` puts its children in its own label `<span>`, so a button `icon`
159
+ * stacks above the text.
143
160
  *
144
161
  * | Data Attribute | Value | Description |
145
162
  * | ----------------- | ------------------------------------------------------ | --------------------------------------------------------------------------------------------- |
@@ -170,6 +187,40 @@ type ButtonProps = ComponentProps<"button"> & Omit<ButtonVariants, "appearance"
170
187
  * ```
171
188
  *
172
189
  * @example
190
+ * Pass the icon through `icon`, never as a child:
191
+ * ```tsx
192
+ * // ❌ <Button appearance="filled" intent="neutral"><PlusIcon />Create endpoint</Button>
193
+ * <Button appearance="filled" intent="neutral" icon={<PlusIcon />}>
194
+ * Create endpoint
195
+ * </Button>
196
+ * ```
197
+ *
198
+ * @example
199
+ * Gate the button on readiness and on a pending action. An explicit `disabled`
200
+ * wins over `isLoading`, so `disabled` must cover both:
201
+ * ```tsx
202
+ * <Button
203
+ * type="submit"
204
+ * appearance="filled"
205
+ * intent="neutral"
206
+ * isLoading={isPending}
207
+ * disabled={!isReady || isPending}
208
+ * >
209
+ * Save
210
+ * </Button>
211
+ * ```
212
+ *
213
+ * @example
214
+ * A button-styled link wraps a plain `<a>`, not `Anchor`:
215
+ * ```tsx
216
+ * <Button asChild appearance="outlined" intent="neutral" icon={<ArrowSquareOutIcon />} iconPlacement="end">
217
+ * <a href="https://ngrok.com/docs" target="_blank" rel="noreferrer">
218
+ * Read the docs
219
+ * </a>
220
+ * </Button>
221
+ * ```
222
+ *
223
+ * @example
173
224
  * Icon-only buttons are not `Button`s — use `IconButton` instead (an icon-only
174
225
  * `Button` has no accessible name and keeps its text-box padding):
175
226
  * ```tsx
@@ -0,0 +1 @@
1
+ import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./icon-kK0c-POG.js";import{t as r}from"./slot-DdYN1L1C.js";import{t as i}from"./booleanish-BfvnW6vy.js";import{t as a}from"./clsx-DUGZgXfJ.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{Fragment as d,jsx as f,jsxs as p}from"react/jsx-runtime";import{cva as m}from"class-variance-authority";import{CircleNotchIcon as h}from"@phosphor-icons/react/CircleNotch";const g=r=>{let i=o(20),a,s,c,l,u;i[0]===r?(a=i[1],s=i[2],c=i[3],l=i[4],u=i[5]):({"data-slot":c,active:a,className:s,icons:l,...u}=r,i[0]=r,i[1]=a,i[2]=s,i[3]=c,i[4]=l,i[5]=u);let d;i[6]===c?d=i[7]:(d=t(c,`icon-swap`),i[6]=c,i[7]=d);let p;i[8]===s?p=i[9]:(p=e(`inline-grid shrink-0 place-items-center`,s),i[8]=s,i[9]=p);let m;i[10]===l?m=i[11]:(m=Object.entries(l),i[10]=l,i[11]=m);let h;i[12]!==a||i[13]!==m?(h=m.map(t=>{let[r,i]=t,o=r===a;return/* @__PURE__ */ f(`span`,{"data-slot":`icon-swap-item`,"data-state":o?`active`:`inactive`,"aria-hidden":!o||void 0,className:e(`col-start-1 row-start-1 grid place-items-center`,`motion-safe:transition-[opacity,scale,filter] motion-safe:duration-200 motion-safe:ease-out-strong`,`data-state-inactive:opacity-0 motion-safe:data-state-inactive:scale-50 motion-safe:data-state-inactive:blur-[2px] motion-safe:data-state-inactive:duration-150`,`data-state-inactive:*:paused`),children:/* @__PURE__ */ f(n,{svg:i})},r)}),i[12]=a,i[13]=m,i[14]=h):h=i[14];let g;return i[15]!==u||i[16]!==d||i[17]!==p||i[18]!==h?(g=/* @__PURE__ */ f(`span`,{"data-slot":d,className:p,...u,children:h}),i[15]=u,i[16]=d,i[17]=p,i[18]=h,i[19]=g):g=i[19],g},ee=m(``,{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`}]}),te={xs:`ps-1.5`,sm:`ps-2`,md:`ps-2.5`,lg:`ps-3`,xl:`ps-3.5`},ne={xs:`pe-1.5`,sm:`pe-2`,md:`pe-2.5`,lg:`pe-3`,xl:`pe-3.5`},_=m=>{let _=o(68),v,y,b,x,S,C,w,T,E,D,O,k,A,j,M;_[0]===m?(v=_[1],y=_[2],b=_[3],x=_[4],S=_[5],C=_[6],w=_[7],T=_[8],E=_[9],D=_[10],O=_[11],k=_[12],A=_[13],j=_[14],M=_[15]):({"aria-disabled":v,"data-slot":w,appearance:b,asChild:x,children:S,className:C,disabled:y,icon:E,iconPlacement:k,intent:T,isLoading:A,ref:O,size:j,type:M,...D}=m,_[0]=m,_[1]=v,_[2]=y,_[3]=b,_[4]=x,_[5]=S,_[6]=C,_[7]=w,_[8]=T,_[9]=E,_[10]=D,_[11]=O,_[12]=k,_[13]=A,_[14]=j,_[15]=M);let N=k===void 0?`start`:k,P=A!==void 0&&A,F=j===void 0?`md`:j,I;_[16]!==v||_[17]!==y||_[18]!==P?(I=i(y??P)||i(v),_[16]=v,_[17]=y,_[18]=P,_[19]=I):I=_[19];let L=I,R;_[20]===Symbol.for(`react.memo_cache_sentinel`)?(R=/* @__PURE__ */ f(h,{className:`animate-spin`}),_[20]=R):R=_[20];let ie=R,z=N===`end`&&`order-last`,B;_[21]===z?B=_[22]:(B=a(z),_[21]=z,_[22]=B);let V=B,H;_[23]!==V||_[24]!==P||_[25]!==E?(H=E?/* @__PURE__ */ f(g,{active:P?`loading`:`idle`,icons:{idle:E,loading:ie},className:V}):P&&/* @__PURE__ */ f(n,{svg:ie,className:V}),_[23]=V,_[24]=P,_[25]=E,_[26]=H):H=_[26];let U=H,W=U&&b!==`link`,G;_[27]===w?G=_[28]:(G=t(w,`button`),_[27]=w,_[28]=G);let K;_[29]!==b||_[30]!==C||_[31]!==W||_[32]!==N||_[33]!==T||_[34]!==P||_[35]!==F?(K=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`,ee({appearance:b,intent:T,isLoading:P,size:F}),b!==`link`&&`font-sans`,W&&N===`start`&&te[F],W&&N===`end`&&ne[F],C),_[29]=b,_[30]=C,_[31]=W,_[32]=N,_[33]=T,_[34]=P,_[35]=F,_[36]=K):K=_[36];let q=L?``:void 0,J=P?``:void 0,Y=b===`link`?void 0:F,X;_[37]!==b||_[38]!==L||_[39]!==T||_[40]!==D||_[41]!==O||_[42]!==K||_[43]!==q||_[44]!==J||_[45]!==Y||_[46]!==G?(X={"aria-disabled":L,"data-slot":G,className:K,"data-appearance":b,"data-disabled":q,"data-intent":T,"data-loading":J,"data-size":Y,ref:O,...D},_[37]=b,_[38]=L,_[39]=T,_[40]=D,_[41]=O,_[42]=K,_[43]=q,_[44]=J,_[45]=Y,_[46]=G,_[47]=X):X=_[47];let Z=X;if(x){u(l(S)&&s.only(S),"When using `asChild`, Button must be passed a single child as a JSX tag.");let e;if(_[48]!==S||_[49]!==L||_[50]!==U){let t;_[52]===S.props.children?t=_[53]:(t=/* @__PURE__ */ f(`span`,{"data-slot":`button-label`,className:`contents`,children:S.props.children}),_[52]=S.props.children,_[53]=t);let n;_[54]!==U||_[55]!==t?(n=/* @__PURE__ */ p(d,{children:[U,t]}),_[54]=U,_[55]=t,_[56]=n):n=_[56],e=c(S,L?re:{},n),_[48]=S,_[49]=L,_[50]=U,_[51]=e}else e=_[51];let t;return _[57]!==Z||_[58]!==e?(t=/* @__PURE__ */ f(r,{...Z,children:e}),_[57]=Z,_[58]=e,_[59]=t):t=_[59],t}let ae=M??`button`,Q;_[60]===S?Q=_[61]:(Q=/* @__PURE__ */ f(`span`,{"data-slot":`button-label`,className:`contents`,children:S}),_[60]=S,_[61]=Q);let $;return _[62]!==Z||_[63]!==L||_[64]!==U||_[65]!==ae||_[66]!==Q?($=/* @__PURE__ */ p(`button`,{...Z,disabled:L,type:ae,children:[U,Q]}),_[62]=Z,_[63]=L,_[64]=U,_[65]=ae,_[66]=Q,_[67]=$):$=_[67],$},re={tabIndex:-1,onClickCapture:e=>{e.preventDefault(),e.stopPropagation()}};export{re as n,g as r,_ as t};
@@ -1,6 +1,6 @@
1
1
  import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
2
2
  import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
3
- import { r as VariantProps } from "./index-C6s5cGCr.js";
3
+ import { r as VariantProps } from "./index-BhfgyurF.js";
4
4
  import { ComponentProps, ReactNode } from "react";
5
5
  /**
6
6
  * The visual style of an `IconButton`: how much visual weight it carries.
package/dist/button.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { i as ButtonIntent, n as ButtonAppearance, r as ButtonProps, t as Button } from "./button-BOCRKR5v.js";
2
- import { i as IconButtonIntent, n as IconButtonProps, r as IconButtonAppearance, t as IconButton } from "./button-BFAvonp1.js";
3
- import { n as ButtonGroupProps, t as ButtonGroup } from "./button-Dt9LZMT5.js";
1
+ import { i as ButtonIntent, n as ButtonAppearance, r as ButtonProps, t as Button } from "./button-CPsKGDK0.js";
2
+ import { i as IconButtonIntent, n as IconButtonProps, r as IconButtonAppearance, t as IconButton } from "./button-Yxyu1XMd.js";
3
+ import { n as ButtonGroupProps, t as ButtonGroup } from "./button-BX-4lYUn.js";
4
4
  import { t as ButtonSize } from "./button-L4exxu_L.js";
5
5
  export { Button, type ButtonAppearance, ButtonGroup, type ButtonGroupProps, type ButtonIntent, type ButtonProps, type ButtonSize, IconButton, type IconButtonAppearance, type IconButtonIntent, type IconButtonProps };
package/dist/button.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./button-CZ-q7fYv.js";import{t}from"./button-Cwrv2Mwv.js";import{t as n}from"./button-69InNC_m.js";export{e as Button,n as ButtonGroup,t as IconButton};
1
+ import{t as e}from"./button-Dge0D5bl.js";import{t}from"./button-B8k98Pby.js";import{t as n}from"./button-69InNC_m.js";export{e as Button,n as ButtonGroup,t as IconButton};
package/dist/calendar.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./icon-kK0c-POG.js";import{t as r}from"./button-DTpsT864.js";import{c as i}from"react/compiler-runtime";import{jsx as a}from"react/jsx-runtime";import{CaretRightIcon as o}from"@phosphor-icons/react/CaretRight";import{CaretLeftIcon as s}from"@phosphor-icons/react/CaretLeft";import{DayPicker as c}from"react-day-picker";const l=r({appearance:`ghost`,intent:`neutral`,size:`sm`});function u(e){let t=i(2),{orientation:r}=e,c;return t[0]===r?c=t[1]:(c=/* @__PURE__ */ a(n,{svg:a(r===`left`?s:o,{}),className:`size-4`}),t[0]=r,t[1]=c),c}const d={Chevron:u},f={button_next:e(l,`absolute right-0`),button_previous:e(l,`absolute left-0`),caption_label:`text-sm font-medium`,day_button:`day size-full rounded-md not-aria-selected:not-disabled:hover:bg-filled-accent/15`,disabled:`text-muted opacity-50`,hidden:`invisible`,month:`space-y-4`,month_caption:`flex justify-center pt-1 relative items-center`,month_grid:`w-full border-collapse space-y-1`,months:`flex flex-col sm:flex-row gap-y-4 sm:gap-x-4 sm:gap-y-0 relative max-w-min`,nav:`flex items-center absolute inset-x-0 top-1 h-5 justify-between z-10`,outside:`day-outside aria-selected:text-on-filled opacity-50 text-muted`,range_end:`day-range-end [&:not(.day-range-start)]:rounded-l-none`,range_middle:`day-range-middle not-disabled:aria-selected:bg-filled-accent/15 aria-selected:text-strong rounded-none not-disabled:aria-selected:hover:bg-filled-accent/25`,range_start:`day-range-start [&:not(.day-range-end)]:rounded-r-none`,selected:`not-disabled:bg-filled-accent text-on-filled not-disabled:hover:bg-filled-accent`,today:`not-aria-selected:not-disabled:text-accent-600 font-medium not-aria-selected:not-disabled:bg-filled-accent/10 rounded-md`,week:`flex w-full mt-1`,weekday:`text-body w-7 text-[0.8rem] text-center font-normal`,weekdays:`flex`};function p(n){let r=i(27),o,s,l,u,p;r[0]===n?(o=r[1],s=r[2],l=r[3],u=r[4],p=r[5]):({"data-slot":l,className:o,classNames:s,showOutsideDays:p,...u}=n,r[0]=n,r[1]=o,r[2]=s,r[3]=l,r[4]=u,r[5]=p);let m=p!==void 0&&p,h=u.mode,g;r[6]===s?g=r[7]:(g=s??{},r[6]=s,r[7]=g);let _,v;r[8]===g?(_=r[9],v=r[10]):({root:v,..._}=g,r[8]=g,r[9]=_,r[10]=v);let y;r[11]!==o||r[12]!==v?(y=e(`isolate`,o,v),r[11]=o,r[12]=v,r[13]=y):y=r[13];let b=h===`range`&&`first:has-aria-selected:rounded-l-md last:has-aria-selected:rounded-r-md`,x;r[14]===b?x=r[15]:(x=e(`overflow-hidden text-center text-sm p-0 relative focus-within:relative focus-within:z-20 size-7 rounded-md`,b),r[14]=b,r[15]=x);let S;r[16]!==_||r[17]!==y||r[18]!==x?(S={...f,root:y,day:x,..._},r[16]=_,r[17]=y,r[18]=x,r[19]=S):S=r[19];let C=S,w;r[20]===l?w=r[21]:(w=t(l,`calendar`),r[20]=l,r[21]=w);let T;return r[22]!==C||r[23]!==u||r[24]!==m||r[25]!==w?(T=/* @__PURE__ */ a(c,{"data-slot":w,animate:!1,components:d,classNames:C,showOutsideDays:m,...u}),r[22]=C,r[23]=u,r[24]=m,r[25]=w,r[26]=T):T=r[26],T}export{p as Calendar};
1
+ import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./icon-kK0c-POG.js";import{t as r}from"./button-BQZ6eoD3.js";import{c as i}from"react/compiler-runtime";import{jsx as a}from"react/jsx-runtime";import{CaretRightIcon as o}from"@phosphor-icons/react/CaretRight";import{CaretLeftIcon as s}from"@phosphor-icons/react/CaretLeft";import{DayPicker as c}from"react-day-picker";const l=r({appearance:`ghost`,intent:`neutral`,size:`sm`});function u(e){let t=i(2),{orientation:r}=e,c;return t[0]===r?c=t[1]:(c=/* @__PURE__ */ a(n,{svg:a(r===`left`?s:o,{}),className:`size-4`}),t[0]=r,t[1]=c),c}const d={Chevron:u},f={button_next:e(l,`absolute right-0`),button_previous:e(l,`absolute left-0`),caption_label:`text-sm font-medium`,day_button:`day size-full rounded-md not-aria-selected:not-disabled:hover:bg-filled-accent/15`,disabled:`text-muted opacity-50`,hidden:`invisible`,month:`space-y-4`,month_caption:`flex justify-center pt-1 relative items-center`,month_grid:`w-full border-collapse space-y-1`,months:`flex flex-col sm:flex-row gap-y-4 sm:gap-x-4 sm:gap-y-0 relative max-w-min`,nav:`flex items-center absolute inset-x-0 top-1 h-5 justify-between z-10`,outside:`day-outside aria-selected:text-on-filled opacity-50 text-muted`,range_end:`day-range-end [&:not(.day-range-start)]:rounded-l-none`,range_middle:`day-range-middle not-disabled:aria-selected:bg-filled-accent/15 aria-selected:text-strong rounded-none not-disabled:aria-selected:hover:bg-filled-accent/25`,range_start:`day-range-start [&:not(.day-range-end)]:rounded-r-none`,selected:`not-disabled:bg-filled-accent text-on-filled not-disabled:hover:bg-filled-accent`,today:`not-aria-selected:not-disabled:text-accent-600 font-medium not-aria-selected:not-disabled:bg-filled-accent/10 rounded-md`,week:`flex w-full mt-1`,weekday:`text-body w-7 text-[0.8rem] text-center font-normal`,weekdays:`flex`};function p(n){let r=i(27),o,s,l,u,p;r[0]===n?(o=r[1],s=r[2],l=r[3],u=r[4],p=r[5]):({"data-slot":l,className:o,classNames:s,showOutsideDays:p,...u}=n,r[0]=n,r[1]=o,r[2]=s,r[3]=l,r[4]=u,r[5]=p);let m=p!==void 0&&p,h=u.mode,g;r[6]===s?g=r[7]:(g=s??{},r[6]=s,r[7]=g);let _,v;r[8]===g?(_=r[9],v=r[10]):({root:v,..._}=g,r[8]=g,r[9]=_,r[10]=v);let y;r[11]!==o||r[12]!==v?(y=e(`isolate`,o,v),r[11]=o,r[12]=v,r[13]=y):y=r[13];let b=h===`range`&&`first:has-aria-selected:rounded-l-md last:has-aria-selected:rounded-r-md`,x;r[14]===b?x=r[15]:(x=e(`overflow-hidden text-center text-sm p-0 relative focus-within:relative focus-within:z-20 size-7 rounded-md`,b),r[14]=b,r[15]=x);let S;r[16]!==_||r[17]!==y||r[18]!==x?(S={...f,root:y,day:x,..._},r[16]=_,r[17]=y,r[18]=x,r[19]=S):S=r[19];let C=S,w;r[20]===l?w=r[21]:(w=t(l,`calendar`),r[20]=l,r[21]=w);let T;return r[22]!==C||r[23]!==u||r[24]!==m||r[25]!==w?(T=/* @__PURE__ */ a(c,{"data-slot":w,animate:!1,components:d,classNames:C,showOutsideDays:m,...u}),r[22]=C,r[23]=u,r[24]=m,r[25]=w,r[26]=T):T=r[26],T}export{p as Calendar};
package/dist/card.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
2
2
  import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
3
- import "./index-C6s5cGCr.js";
3
+ import "./index-BhfgyurF.js";
4
4
  import { ComponentProps } from "react";
5
5
  type CardProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
6
6
  /**
@@ -0,0 +1,2 @@
1
+ import{r as e}from"./browser-only-BTSrYWLj.js";import{n as t,t as n}from"./compose-refs-sFdxsL7k.js";import{t as r}from"./cx-CK7o_rVv.js";import{t as i}from"./data-slot-EM6s2WEU.js";import{r as a}from"./button-Dge0D5bl.js";import{t as o}from"./button-B8k98Pby.js";import{t as s}from"./use-copy-to-clipboard-Dy_0Qzb7.js";import{t as c}from"./alternate-announcement-BkH4bOKp.js";import{t as l}from"./live-region-DQ1QLv3L.js";import{c as u}from"react/compiler-runtime";import{createContext as d,useContext as f,useEffect as p,useId as m,useLayoutEffect as h,useRef as g,useState as _,useSyncExternalStore as v}from"react";import y from"tiny-invariant";import{Fragment as b,jsx as x,jsxs as S}from"react/jsx-runtime";import{CheckIcon as C}from"@phosphor-icons/react/Check";import{CopyIcon as w}from"@phosphor-icons/react/Copy";import{scaleTime as T}from"d3-scale";import{area as E,curveLinear as D,curveMonotoneX as O,curveStep as k,line as A}from"d3-shape";const j=(e,t)=>Reflect.get(e,t),M=(e,t)=>e instanceof Date?e.getTime():typeof e==`number`?e:t&&typeof e==`string`?new Date(e).getTime():NaN,N=(e,t,n,r)=>{let i=/* @__PURE__ */ new Set;for(let e of r)for(let t of Object.keys(e))i.add(t);return`${e} ${t} "${n}" does not match any key in the provided data. Available keys: ${[...i].join(`, `)}.`},ee=(e,t,n)=>`${e} could not read any "${t}" values as ${n===`time`?`dates`:`numbers`} for the "${n}" x scale — check the xScale and the data types.`,P=(e,t)=>e.some(e=>j(e,t)!==void 0),te=({rootName:e,partName:t,rows:n,xKey:r,xScale:i,dataKeys:a,zKey:o})=>{if(n.length===0)return;if(!P(n,r))throw Error(N(e,`xKey`,r,n));let s=n;if(i===`linear`||i===`time`){let t=!1;if(s=n.filter(e=>{let n=j(e,r);return n!=null&&(t=!0),Number.isFinite(M(n,i===`time`))}),t&&s.length===0)throw Error(ee(e,r,i))}if(s.length!==0){for(let e of a)if(!P(s,e))throw Error(N(t,`dataKey`,e,n));if(o!=null&&!P(s,o))throw Error(N(e,`zKey`,o,n))}},F=/* @__PURE__ */ new Map;let I=!1;const L=e=>typeof e==`object`&&!!e&&`yield`in e&&typeof Reflect.get(e,`yield`)==`function`,R=()=>{let e=Reflect.get(globalThis,`scheduler`);return L(e)?e.yield():new Promise(e=>{if(typeof MessageChannel<`u`){let t=new MessageChannel;t.port1.addEventListener(`message`,()=>{t.port1.close(),e()},{once:!0}),t.port1.start(),t.port2.postMessage(null)}else setTimeout(e,0)})},z=(e,t)=>{let n=e.ownerDocument.defaultView;return t==null||n==null||t.bottom>0&&t.top<n.innerHeight&&t.right>0&&t.left<n.innerWidth},ne=()=>{let e=performance.now(),t=[...F.entries()].toSorted(([,e],[,t])=>Number(t.onScreen)-Number(e.onScreen)||e.top-t.top);for(let[n,r]of t)if(F.get(n)===r&&(F.delete(n),r.run(r.rect),F.size>0&&performance.now()-e>=4))break;F.size>0&&!I&&(I=!0,B())},B=async()=>{await R(),I=!1,ne()},re=(e,t)=>{F.set(e,{run:t.run,rect:t.rect,onScreen:z(e,t.rect),top:t.rect?.top??0})},ie=e=>{let t=F.get(e);t!=null&&(t.onScreen=!0)},ae=e=>{F.delete(e)},V=()=>{F.size!==0&&ne()};let oe=null;const H=()=>oe??=new Intl.NumberFormat;let U=null;const se=()=>U??=new Intl.NumberFormat(void 0,{maximumSignificantDigits:4}),ce=/* @__PURE__ */ new Map,W=(e,t)=>{let n=Object.is(e,-0)?0:e,r=t?.maximumFractionDigits;if(r!=null){let e=ce.get(r);return e??(e=new Intl.NumberFormat(void 0,{maximumFractionDigits:r}),ce.set(r,e)),e.format(n)}return n!==0&&Math.abs(n)<1?se().format(n):H().format(n)},G=e=>!Number.isFinite(e)||e<=0?0:Math.min(20,Math.max(0,-Math.floor(Math.log10(e))));let K=null;const q=()=>K??=new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`});let le=null;const ue=()=>le??=new Intl.DateTimeFormat(void 0,{year:`numeric`,month:`short`,day:`numeric`}),J=e=>e.getHours()!==0||e.getMinutes()!==0||e.getSeconds()!==0||e.getMilliseconds()!==0,de=(e,t)=>typeof e==`string`?e:typeof e==`number`?W(e):Number.isNaN(e.getTime())?`—`:t?.datasetHasTimeOfDay??J(e)?q().format(e):ue().format(e),fe=e=>typeof e==`string`||typeof e==`number`||e instanceof Date?e:String(e),pe=({raw:e,epoch:t,isTime:n})=>e instanceof Date?e:n?new Date(t):null,me=(e,t,n)=>{let r=!1;if(n===`band`||n===`point`){let n=null,i=null;for(let a of e){let e=fe(j(a,t));e instanceof Date&&J(e)&&(r=!0),n??=e,i=e}return{count:e.length,first:n,last:i,hasTimeOfDay:r}}let i=n===`time`,a=0,o=1/0,s=-1/0;for(let n of e){let e=j(n,t),c=M(e,i);if(Number.isFinite(c)){if(!r){let t=pe({raw:e,epoch:c,isTime:i});t!=null&&J(t)&&(r=!0)}a+=1,o=Math.min(o,c),s=Math.max(s,c)}}return a===0?{count:a,first:null,last:null,hasTimeOfDay:r}:{count:a,first:i?new Date(o):o,last:i?new Date(s):s,hasTimeOfDay:r}},he={line:`Line chart`,bar:`Bar chart`,area:`Area chart`,scatter:`Scatter plot`},ge=(e,t)=>e===`bar`?t?`category`:`categories`:t?`data point`:`data points`,_e=e=>e.length>0?` Series: ${e.join(`, `)}.`:``,ve=({kind:e,summary:t,hydrated:n})=>{let r;if(t.count===0)r=`${he[e]} with no data.`;else{let i=t.count===1,a=ge(e,i),o=n?W(t.count):String(t.count),s=``;if(n&&t.first!=null&&t.last!=null){let e={datasetHasTimeOfDay:t.hasTimeOfDay};s=i?` at ${de(t.first,e)}`:` from ${de(t.first,e)} to ${de(t.last,e)}`}r=`${he[e]} with ${o} ${a}${s}.`}return{sentence:r,instructions:` 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.`}},ye=e=>{let{step:t,slot:n}=e,r=Math.min(64,Math.max(24,t*.6));return Math.min(n,r)},be=.5,xe=(e,t)=>e<0?e:t,Se=e=>{let{lower:t,upper:n,toPixel:r,reveal:i,gap:a}=e,o=r(t<0?n:t),s=o+(r(xe(t,n))-o)*i;if(Math.abs(o-r(0))<be)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}},Ce=e=>{let{lower:t,upper:n,pileOuter:r,toPixel:i}=e;if(Number.isNaN(r))return!1;let a=i(xe(t,n));return Math.abs(a-i(r))<be},we=[`chart-1`,`chart-2`,`chart-3`,`chart-4`,`chart-5`,`chart-6`,`chart-7`,`chart-8`,`chart-other`],Te=e=>we.includes(e),Ee=e=>`--color-${e}`,De=`var(--color-chart-decorative)`,Oe=[`chart-1`,`chart-2`,`chart-3`,`chart-4`,`chart-5`,`chart-6`,`chart-7`,`chart-8`],ke=/* @__PURE__ */ new WeakMap,Ae=e=>{let t=ke.get(e);return(t==null||t.parentNode!==e)&&(t=e.ownerDocument.createElement(`span`),t.style.display=`none`,t.setAttribute(`aria-hidden`,`true`),e.appendChild(t),ke.set(e,t)),t},je=(e,t)=>{let n=Ae(e);return n.style.color=t,e.ownerDocument.defaultView?.getComputedStyle(n).color??``},Me=/* @__PURE__ */ new WeakMap,Y=e=>{let t=Me.get(e);if(t!==void 0)return t;let n=e.createElement(`canvas`);n.width=1,n.height=1;let r=n.getContext(`2d`);return Me.set(e,r),r},X=[`#010203`,`#030201`],Z=/* @__PURE__ */ new WeakMap,Ne=(e,t)=>{let n=Z.get(e);n??(n=/* @__PURE__ */ new Map,Z.set(e,n));let r=n.get(t);if(r!=null)return r;let i=!1;for(let n of X)if(e.fillStyle=n,e.fillStyle=t,e.fillStyle!==n){i=!0;break}return n.set(t,i),i},Pe=/^var\(\s*(--[\w-]+)\s*\)$/i,Fe=/var\(|currentcolor|light-dark\(/i,Ie=(e,t)=>{let{computed:n,parseContext:r}=t,i=/* @__PURE__ */ new Map;return{resolve:t=>{let a=i.get(t);if(a!=null)return a;let o=t.trim(),s=Pe.exec(o),c;c=s?.[1]==null?o.toLowerCase()===`currentcolor`?n.color:o:n.getPropertyValue(s[1]).trim();let l;return l=c===``||Fe.test(c)?je(e,o):r==null||Ne(r,c)?c:je(e,o),i.set(t,l),l},fontFamily:n.fontFamily||`sans-serif`}},Le=(e,t)=>Te(t)?e.resolve(`var(${Ee(t)})`):e.resolve(t),Re=e=>({grid:e.resolve(`var(--border-color-card-muted)`),baseline:e.resolve(`var(--border-color-card)`),tickText:e.resolve(`var(--text-color-muted)`),reference:e.resolve(`var(--color-neutral-500)`),surface:e.resolve(`var(--background-color-card)`)}),ze=e=>`${e.className}|${e.getAttribute(`data-applied-theme`)??``}|${e.getAttribute(`data-theme`)??``}`,Be=/* @__PURE__ */ new WeakMap,Ve=(e,t)=>{let n=Be.get(e);if(n==null){let t=/* @__PURE__ */ new Set,r={observer:new MutationObserver(()=>{let n=ze(e);if(n!==r.signature){r.signature=n;for(let e of t)e()}}),listeners:t,signature:ze(e)};r.observer.observe(e,{attributes:!0,attributeFilter:[`class`,`data-applied-theme`,`data-theme`]}),Be.set(e,r),n=r}return n.listeners.add(t),()=>{n.listeners.delete(t),n.listeners.size===0&&(n.observer.disconnect(),Be.delete(e))}},He=1.5,Ue=1.1,We=1.6,Ge=e=>`oklch(from ${e} calc(l - 0.18) c h)`,Ke=(e,t,n)=>{let r=He;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)):(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))},qe=(e,t)=>{let{size:n,width:r}=t;e.fillRect(0,n/2-r/2,n,r)},Je=(e,t)=>{let{size:n,width:r}=t;e.fillRect(n/2-r/2,0,r,n)},Ye={hatch:(e,{size:t,ink:n})=>{e.strokeStyle=n,e.lineWidth=He,e.beginPath(),Ke(e,t,`up`),e.stroke()},"hatch-reverse":(e,{size:t,ink:n})=>{e.strokeStyle=n,e.lineWidth=He,e.beginPath(),Ke(e,t,`down`),e.stroke()},crosshatch:(e,{size:t,ink:n})=>{e.strokeStyle=n,e.lineWidth=1,e.beginPath(),Ke(e,t,`up`),Ke(e,t,`down`),e.stroke()},perpendicular:(e,{size:t,ink:n,orientation:r})=>{e.fillStyle=n,r===`horizontal`?Je(e,{size:t,width:2}):qe(e,{size:t,width:2})},parallel:(e,{size:t,ink:n,orientation:r})=>{e.fillStyle=n,r===`horizontal`?qe(e,{size:t,width:2}):Je(e,{size:t,width:2})},grid:(e,{size:t,ink:n})=>{e.fillStyle=n,qe(e,{size:t,width:Ue}),Je(e,{size:t,width:Ue})},dots:(e,{size:t,ink:n})=>{e.fillStyle=n,e.beginPath(),e.arc(t/4,t/4,We,0,Math.PI*2),e.moveTo(3*t/4+We,3*t/4),e.arc(3*t/4,3*t/4,We,0,Math.PI*2),e.fill()}},Xe=(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),Ye[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},Ze=/* @__PURE__ */ new WeakMap,Qe=e=>{if(typeof e.matchMedia!=`function`)return!1;let t=e.matchMedia,n=Ze.get(t);return n??(n=e.matchMedia(`(prefers-reduced-motion: reduce)`),Ze.set(t,n)),n.matches},$e=/* @__PURE__ */ new WeakMap,et=(e,t)=>{let n=e.matchMedia(`(resolution: ${e.devicePixelRatio}dppx)`),r=()=>{if(n.removeEventListener(`change`,r),t.listeners.size!==0){et(e,t);for(let e of t.listeners)e()}};n.addEventListener(`change`,r),t.disarm=()=>n.removeEventListener(`change`,r)},tt=(e,t)=>{if(typeof e.matchMedia!=`function`)return()=>{};let n=$e.get(e);if(n==null){let t={listeners:/* @__PURE__ */ new Set,disarm:()=>{}};et(e,t),$e.set(e,t),n=t}return n.listeners.add(t),()=>{n.listeners.delete(t),n.listeners.size===0&&(n.disarm(),$e.delete(e))}},nt=/* @__PURE__ */ new WeakMap,rt=(e,t)=>{let n=nt.get(e);if(n==null){let t={listeners:/* @__PURE__ */ new Set,onBefore:()=>{for(let e of t.listeners)e.before()},onAfter:()=>{for(let e of t.listeners)e.after()}};e.addEventListener(`beforeprint`,t.onBefore),e.addEventListener(`afterprint`,t.onAfter),nt.set(e,t),n=t}return n.listeners.add(t),()=>{n.listeners.delete(t),n.listeners.size===0&&(e.removeEventListener(`beforeprint`,n.onBefore),e.removeEventListener(`afterprint`,n.onAfter),nt.delete(e))}},it=/* @__PURE__ */ new WeakMap,at=(e,t)=>{let n=e.fonts;if(n==null||typeof n.addEventListener!=`function`)return()=>{};let r=it.get(n);if(r==null){let e={listeners:/* @__PURE__ */ new Set,onLoad:()=>{for(let t of e.listeners)t()}};n.addEventListener(`loadingdone`,e.onLoad),it.set(n,e),r=e}return r.listeners.add(t),()=>{r.listeners.delete(t),r.listeners.size===0&&(n.removeEventListener(`loadingdone`,r.onLoad),it.delete(n))}},ot=/* @__PURE__ */ new WeakMap,st=(e,t)=>{if(typeof ResizeObserver>`u`)return()=>{};let n=e.ownerDocument,r=ot.get(n);if(r==null){let e=/* @__PURE__ */ new Map;r={handlers:e,observer:new ResizeObserver(t=>{for(let n of t)e.get(n.target)?.(n)})},ot.set(n,r)}let i=r;return i.handlers.set(e,t),i.observer.observe(e),()=>{i.handlers.get(e)===t&&(i.handlers.delete(e),i.observer.unobserve(e),i.handlers.size===0&&(i.observer.disconnect(),ot.get(n)===i&&ot.delete(n)))}},ct=e=>{let{pointCount:t,columnCount:n,wasDecimated:r}=e;return n<=0?!1:r?t>=n*3:t>=n*4},lt=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);p===s&&(p=s-1),!(p<0||p>=s)&&(c[p]===0?(c[p]=1,l[p]=r,u[p]=r,d[p]=r,f[p]=r):(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}},ut=(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},dt=Math.PI/2-.05,ft=e=>({cosYaw:Math.cos(e.yaw),sinYaw:Math.sin(e.yaw),cosPitch:Math.cos(e.pitch),sinPitch:Math.sin(e.pitch)}),pt=(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}},mt=e=>Math.min(dt,Math.max(-dt,e)),ht=(e,t)=>{let n=t[1]-t[0];return n===0?0:(e-t[0])/n*2-1},gt=[[-1,-1,-1],[1,-1,-1],[1,1,-1],[-1,1,-1],[-1,-1,1],[1,-1,1],[1,1,1],[-1,1,1]],_t=[[0,1],[1,2],[2,3],[3,0],[4,5],[5,6],[6,7],[7,4],[0,4],[1,5],[2,6],[3,7]],vt=Math.sqrt(50),yt=Math.sqrt(10),bt=Math.sqrt(2),xt=e=>e>=vt?10:e>=yt?5:e>=bt?2:1,St=(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=xt(s),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?St(e,t,n*2,r):[l,u,d]},Ct=(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?St(t,e,n,r):St(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},wt=(e,t,n,r)=>{if(!(n>0))return 0;if(e===t)return r?.integer&&!Number.isInteger(e)?0:1;let[i,a]=t<e?St(t,e,n,r):St(e,t,n,r);return a>=i?a-i+1:0},Tt=(e,t,n)=>St(e,t,n)[2],Et=(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}},Dt=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}},Q=(e,t)=>e.rangeStart+e.offset+t*e.step,Ot=(e,t)=>Q(e,t)+e.bandwidth/2,kt=(e,t)=>({start:Q(e,t)-(e.step-e.bandwidth)/2,size:e.step}),At=(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))},jt=(e,t,n)=>Ct(e[0],e[1],t,n),Mt=(e,t,n)=>{let r=Math.floor(Math.min(n?.count??t,t));for(;r>1&&wt(e[0],e[1],r,n)>t;)--r;return jt(e,r,n).slice(0,Math.max(0,Math.floor(t)))};let Nt=null,Pt=null;const Ft=e=>{if(Pt!=null&&Nt!=null&&Nt[0]===e[0]&&Nt[1]===e[1])return Pt;let t=T().domain([new Date(e[0]),new Date(e[1])]);return Nt=[e[0],e[1]],Pt=t,t},It=(e,t)=>Ft(e).ticks(t).map(e=>e.getTime()),Lt=e=>{let t=Ft(e).tickFormat();return e=>t(new Date(e))},Rt=(e,t)=>{if(e[0]>e[1])return Rt([e[1],e[0]],t);if(e[0]===e[1]){let n=e[0],r=n===0?1:Math.abs(n)*.5;return Rt([n-r,n+r],t)}let n=e[0],r=e[1],i=NaN;for(let e=0;e<10;e++){let e=Tt(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]},zt=(e,t)=>{let n=Rt(e,t);return e[0]===0?[0,n[1]]:n},Bt=e=>e===`monotone`?O:e===`step`?k:D,$=e=>Math.round(e)+.5,Vt=(e,t)=>{let{plot:n,color:r,xLines:i,yLines:a}=t;e.save(),e.strokeStyle=r,e.lineWidth=1,Ht(e,i,t=>{e.moveTo($(t),n.top),e.lineTo($(t),n.top+n.height)}),Ht(e,a,t=>{e.moveTo(n.left,$(t)),e.lineTo(n.left+n.width,$(t))}),e.restore()},Ht=(e,t,n)=>{let r=NaN;for(let i of t)i.alpha!==r&&(Number.isNaN(r)||e.stroke(),r=i.alpha,e.globalAlpha=r,e.beginPath()),n(i.position);Number.isNaN(r)||e.stroke()},Ut=(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()},Wt=(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()},Gt=(e,t)=>{let{fill:n,rects:r,count:i=r.length}=t;e.fillStyle=n,e.beginPath();for(let t=0;t<i;t++){let n=r[t];if(n==null)continue;let i=Math.max(.5,n.width),a=Math.min(n.valueY,n.baselineY),o=Math.abs(n.baselineY-n.valueY);if(o===0)continue;let s=n.rounded&&i>=8?Math.min(4,i/2,o):0;s===0?e.rect(n.x,a,i,o):n.valueY<=n.baselineY?e.roundRect(n.x,a,i,o,[s,s,0,0]):e.roundRect(n.x,a,i,o,[0,0,s,s])}e.fill()},Kt=(e,t)=>{let{fill:n,rects:r,count:i=r.length}=t;e.fillStyle=n,e.beginPath();for(let t=0;t<i;t++){let n=r[t];if(n==null)continue;let i=Math.max(.5,n.height),a=Math.min(n.valueX,n.baselineX),o=Math.abs(n.valueX-n.baselineX);if(o===0)continue;let s=n.rounded&&i>=8?Math.min(4,i/2,o):0;s===0?e.rect(a,n.y,o,i):n.valueX>=n.baselineX?e.roundRect(a,n.y,o,i,[0,s,s,0]):e.roundRect(a,n.y,o,i,[s,0,0,s])}e.fill()},qt=(e,t)=>{let{color:n,curve:r,indexes:i,xAt:a,yAt:o,definedAt:s}=t,c=A().x(a).y(o).defined(s).curve(Bt(r)).context(e);e.strokeStyle=n,e.lineWidth=2,e.lineJoin=`round`,e.lineCap=`round`,e.beginPath(),c(i),e.stroke()},Jt=(e,t)=>{let{color:n,curve:r,indexes:i,xAt:a,y0At:o,y1At:s,definedAt:c}=t,l=E().x(a).y0(o).y1(s).defined(c).curve(Bt(r)).context(e);e.beginPath(),l(i),e.save(),e.globalAlpha=.1,e.fillStyle=n,e.fill(),e.restore();let u=A().x(a).y(s).defined(c).curve(Bt(r)).context(e);e.strokeStyle=n,e.lineWidth=2,e.lineJoin=`round`,e.lineCap=`round`,e.beginPath(),u(i),e.stroke()},Yt=(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()},Xt=(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++)i.hasData[e]===0?l(e-1):c<0&&(c=e);l(i.columnCount-1),e.save(),e.globalAlpha=.1,e.fillStyle=n,e.fill(),e.restore(),Yt(e,{color:n,columns:i,columnToX:a,valueK:o,valueB:s})},Zt=(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()},Qt=[[-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]],$t=Qt.map(([e,t])=>[(e-t)/Math.SQRT2,(e+t)/Math.SQRT2]),en=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]}),tn={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)=>{Zt(e,t,n,r*1.189,Qt)},cross:(e,t,n,r)=>{Zt(e,t,n,r*1.189,$t)},star:(e,t,n,r)=>{Zt(e,t,n,r*1.673,en)}},nn=(e,t,n,r,i)=>{tn[i](e,t,n,r)},rn=(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(),nn(e,o(t),s(t),4,i),e.fill(),e.stroke())},an=5e3,on=2e4,sn=(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>on){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<=an;e.strokeStyle=r,e.lineWidth=2;for(let t of o){let n=l(t);n<=0||(e.beginPath(),nn(e,s(t),c(t),n,i),e.fill(),u&&e.stroke())}},cn=(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>on){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<=an;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(),nn(e,i[t]??0,a[t]??0,o[t]??0,c(t)),e.fill(),d&&e.stroke()}e.restore()},ln=(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()},un=(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()},dn=(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))},fn=(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)}},pn=(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()},mn=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;else 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}},hn=e=>1-(1-e)**3;var gn=class{#e=/* @__PURE__ */ new Float64Array;#t=/* @__PURE__ */ new Float64Array;#n=/* @__PURE__ */ 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.#e[t]=this.#n[t]??NaN,this.#t[t]=e[t]??NaN;this.#r=r,this.#i=n,this.#a=!0}else{for(let t=0;t<i;t++)this.#t[t]=e[t]??NaN;this.#a=!1}}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=hn(t);for(let e=0;e<this.#n.length;e++){let t=this.#e[e]??NaN,r=this.#t[e]??NaN;Number.isNaN(t)||Number.isNaN(r)?this.#n[e]=r:this.#n[e]=t+(r-t)*n}return t>=1&&(this.#a=!1),this.#a}},_n=class{#e=/* @__PURE__ */ new Float64Array;#t=/* @__PURE__ */ new Float64Array;#n=0;#r=!1;#i;#a;#o=0;#s=null;constructor(e={}){this.#i=e.speed??.14,this.#a=e.epsilon??.001}get active(){return this.#r}values(){return this.#t}jump(e){this.#s=null,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}if(this.#c(e))return;this.#s!=null&&(this.#l(t),this.#s=null,this.#r=!1);let n=0;for(let t=0;t<e.length;t++){let r=e[t]??NaN;this.#e[t]=r;let i=Math.abs(r-(this.#t[t]??NaN));Number.isFinite(i)&&i>n&&(n=i)}this.#o=n,this.#r||(this.#r=!0,this.#n=t)}glide(e,t){let{now:n,duration:r}=t;if(this.#t.length!==e.length||r<=0)this.jump(e);else if(!this.#c(e)){this.#s!=null&&this.#l(n);for(let t=0;t<e.length;t++)this.#e[t]=e[t]??NaN;this.#s={from:Float64Array.from(this.#t),start:n,duration:r},this.#r=!0,this.#n=n}}#c(e){for(let t=0;t<e.length;t++){let n=e[t]??NaN,r=this.#e[t]??NaN;if(r!==n&&!(Number.isNaN(r)&&Number.isNaN(n)))return!1}return!0}#l(e){let t=this.#s;if(t==null)return;let n=Math.min(1,Math.max(0,(e-t.start)/t.duration));for(let e=0;e<this.#t.length;e++){let r=t.from[e]??NaN,i=this.#e[e]??NaN;this.#t[e]=Number.isNaN(r)||Number.isNaN(i)?i:r+(i-r)*n}n>=1&&(this.#s=null,this.#r=!1)}tick(e){if(!this.#r)return!1;if(this.#s!=null)return this.#n=e,this.#l(e),this.#r;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 vn=e=>`${e.colorInput}|${e.texture}`,yn={bar:`BarChart.Bar`,line:`LineChart.Line`,area:`AreaChart.Area`,scatter:`ScatterPlot.Point`},bn=1e3,xn=({bandwidth:e,groupCount:t})=>e>=8*t?2:+(e>=3*t);var Sn=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=null;#o=!1;#s=null;#c=null;#l=null;#u=null;#d=null;#f=null;#p=null;#m;#h=!1;#g;#_=!1;#v=0;#y=0;#b=1;#x=[];#S=0;#C=/* @__PURE__ */ new Float64Array;#w=[];#T=null;#E=null;#D=!1;#O=!1;#k=/* @__PURE__ */ new Map;#A=0;#j=0;#M=!0;#N=!0;#P=null;#F=new _n({speed:.16});#I=new _n({speed:.2});#L=/* @__PURE__ */ new Map;#R=/* @__PURE__ */ new Map;#z=!1;#B=/* @__PURE__ */ new Map;#V=/* @__PURE__ */ new Map;#H=0;#U=null;#W=null;#G=/* @__PURE__ */ new Map;#K=!1;#q=/* @__PURE__ */ new Map;#J={alpha:0,target:0};#Y=-1/0;#X=!1;#Z=null;#Q=null;#$=null;#ee=null;#te={left:0,top:0,width:0,height:0};#ne=null;#re=/* @__PURE__ */ new Float64Array;#ie=[0,1];#ae={yaw:.65,pitch:-.35};#oe=new _n({speed:.12});#se=new _n({speed:.16});#ce=null;#le=!1;#ue=null;#de=[];#fe=[];#pe=[];#me=null;#he=null;#ge=/* @__PURE__ */ new Int32Array;#_e=/* @__PURE__ */ new Map;#ve=``;#ye=null;#be=null;#xe=null;#Se=void 0;#Ce=null;#we=!1;#Te=null;#Ee=null;#De={width:0,height:0};#Oe=!1;#ke=!1;#Ae=0;#je=!1;constructor(e){this.#e=e.kind,this.#t=e.elements,this.#n=e.store,this.#m=e.inView??!0,this.#g=this.#m,e.size!=null&&(this.#v=e.size.width,this.#y=e.size.height),this.#b=this.#Qe(),this.#n.onSeriesChange=()=>{this.#O=!0,this.#Je()},this.#n.onPresentationChange=()=>{this.#Je()},this.#s=st(e.elements.plot,e=>{let t=this.#Qe();(e.contentRect.width!==this.#v||e.contentRect.height!==this.#y||t!==this.#b)&&(this.#v=e.contentRect.width,this.#y=e.contentRect.height,this.#b=t,this.#q.clear(),this.#ye=null,this.#Je())}),this.#m&&this.#Pe();let t=e.elements.root.ownerDocument.documentElement;this.#c=Ve(t,()=>{this.#$=null,this.#Je()}),this.#f=at(e.elements.root.ownerDocument,()=>{this.#G.clear(),this.#Je()}),this.#p=e.elements.root.ownerDocument.defaultView,this.#p!=null&&(this.#d=rt(this.#p,{before:this.#Me,after:this.#Ne}),this.#u=tt(this.#p,()=>{this.#b=this.#Qe(),this.#q.clear(),this.#Je()})),this.#se.jump([1,1])}destroy(){this.#je=!0,this.#s?.(),this.#l?.disconnect(),this.#c?.(),this.#u?.(),this.#d?.(),this.#f?.(),this.#n.onSeriesChange=null,this.#n.onPresentationChange=null,this.#Q!=null&&(clearTimeout(this.#Q),this.#Q=null),this.#Ae!==0&&cancelAnimationFrame(this.#Ae)}setInView(e){e===this.#m||this.#je||(this.#m=e,e&&(this.#Pe(),(this.#ke||this.#O)&&this.#Xe()))}markSeen(){if(this.#g||this.#je)return;this.#g=!0;let e=performance.now(),t=this.#Be();for(let n of this.#R.values())n.retarget([1],{duration:t,now:e});this.#Je()}releaseBackingStores(){if(this.#je)return;let e=this.#t.canvas;(e.width!==0||e.height!==0)&&(e.width=0,e.height=0),this.#ke=!0}commitNow(){this.#je||(this.#Ae!==0&&(cancelAnimationFrame(this.#Ae),this.#Ae=0),this.#Oe=!1,this.#Ze())}attachTooltip(e){this.#t.tooltip===e||this.#je||(this.#l?.disconnect(),this.#l=null,this.#De={width:0,height:0},this.#t.tooltip=e,e!=null&&this.#m&&this.#Pe(),this.#Ye())}paintForPrint(){if(!(this.#je||this.#h)){if(this.#h=!0,this.#v===0||this.#y===0){let e=this.#t.plot.getBoundingClientRect();this.#v=e.width,this.#y=e.height}if(!this.#g){this.#g=!0;let e=performance.now();for(let t of this.#R.values())t.retarget([1],{duration:0,now:e})}this.#ke=!0,this.#Ze()}}#Me=()=>{this.paintForPrint()};#Ne=()=>{this.#h=!1,this.#m||this.releaseBackingStores()};#Pe(){let e=this.#t.tooltip;e!=null&&this.#l==null&&typeof ResizeObserver<`u`&&(this.#l=new ResizeObserver(()=>{this.#De={width:e.offsetWidth,height:e.offsetHeight},this.#Ye()}),this.#l.observe(e))}#Fe(){return this.#o||(this.#o=!0,this.#a=this.#t.canvas.getContext(`2d`)),this.#a}setOptions(e){let t=this.#r;if(this.#r=e,t.xScale!==e.xScale&&this.#B.clear(),t.animate&&!e.animate&&this.#Ie(),t.dimensions!==e.dimensions){let t=[+(e.dimensions>=2),+(e.dimensions>=3)],n=Cn(e.dimensions);if(this.#ze()===0||!this.#z)this.#se.jump(t),this.#ae=n,this.#oe.jump([n.yaw,n.pitch]);else{let e=n.yaw+Math.round((this.#ae.yaw-n.yaw)/(Math.PI*2))*Math.PI*2;this.#se.aim(t,performance.now()),this.#oe.jump([this.#ae.yaw,this.#ae.pitch]),this.#oe.aim([e,n.pitch],performance.now())}}(t.xKey!==e.xKey||t.xScale!==e.xScale||t.zKey!==e.zKey||t.stacked!==e.stacked)&&(this.#O=!0),(t.yDomain[0]!==e.yDomain[0]||t.yDomain[1]!==e.yDomain[1])&&(this.#ye=null,this.#z&&(this.#ze()===0?this.#F.jump(this.#He()):this.#F.aim(this.#He(),performance.now()))),this.#Je()}setCallbacks(e){this.#i=e}setRows(e){e!==this.#x&&(this.#x=e,this.#O=!0,this.#Je())}flushIngest(){!this.#O||this.#je||(this.#O=!1,this.#Le())}setControlledActiveIndex(e){let t=this.#Ce;this.#Ce=null;let n=this.#Se!==void 0;if(this.#Se=e,e!==void 0){let n=t!=null&&t.index===e&&t.viaKeyboard;this.#jt(e==null?null:this.#Dt(e),{viaKeyboard:n,notify:!1})}else n&&this.#jt(null,{viaKeyboard:!1,notify:!1});this.#Ye()}handlePointerMove(e,t){if(this.#ce!=null){let n=e-this.#ce.lastX,r=t-this.#ce.lastY;(this.#ce.moved||Math.abs(n)+Math.abs(r)>3)&&(this.#ce.moved=!0,this.#ae={yaw:this.#ae.yaw+n*.008,pitch:mt(this.#ae.pitch+r*.008)},this.#oe.jump([this.#ae.yaw,this.#ae.pitch]),this.#ce.lastX=e,this.#ce.lastY=t,this.#jt(null,{viaKeyboard:!1,notify:!1}),this.#Je());return}if(this.#Te=e,this.#Ee=t,this.#e===`scatter`){let n=this.#Rt(e,t);this.#be=n?.seriesKey??null,this.#ye=n==null?null:{x:n.screenX,y:n.screenY},this.#jt(n?.index??null,{viaKeyboard:!1,notify:!0});return}let n=this.#kt(e,t);this.#jt(n,{viaKeyboard:!1,notify:!0})}handlePointerDown(e,t){this.#le=!0,this.#We()?this.#ce={lastX:e,lastY:t,moved:!1}:this.handlePointerMove(e,t)}handlePointerUp(e,t){let n=this.#ce;this.#ce=null;let r=this.#le;if(this.#le=!1,n!=null){if(n.moved)return;this.handlePointerMove(e,t)}r&&this.handleActivate(e,t)}handlePointerLeave(){this.#Te=null,this.#Ee=null,this.#ce=null,this.#le=!1,this.#be=null,this.#ye=null,this.#jt(null,{viaKeyboard:!1,notify:!0})}handleActivate(e,t){let n=this.#Tt();if(n==null)return;let r=this.#Et(n),i=this.#x[r];if(i==null)return;let a=this.#e===`scatter`?this.#be:e==null||t==null?null:this.#At(n,e,t);this.#i.onDatumActivate?.({index:r,xValue:this.#Ot(n),datum:i,dataKey:a})}handleKeyDown(e){if(this.#S===0)return!1;let t=this.#S-1,n=this.#Tt(),r=this.#K?Math.max(1,Math.floor(this.#S/Math.max(1,this.#te.width*this.#b))):1,i=Math.max(1,Math.floor(this.#S/10)),a=(()=>{switch(e){case`ArrowLeft`:return Math.max(0,(n??this.#S)-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.#Te=null,this.#Ee=null,this.#be=null,this.#ye=null,this.#jt(a,{viaKeyboard:!0,notify:!0}),!0)}invalidateColors(){this.#$!=null&&(this.#$=null,this.#_e.clear(),this.#Je())}setColorScope(e,t){let n=this.#ee;(n==null||n.className!==e||n.style!==t)&&(this.#ee={className:e,style:t},this.invalidateColors())}#Ie(){this.#F.jump(this.#He()),this.#I.jump(this.#Ue()),this.#se.jump([+(this.#r.dimensions>=2),+(this.#r.dimensions>=3)]);let e=Cn(this.#r.dimensions);this.#ae=e,this.#oe.jump([e.yaw,e.pitch]);for(let e of this.#L.values())e.snap();for(let e of this.#R.values())e.snap();this.#J.alpha=this.#J.target,this.#Je()}#Le(){let e=this.#x,{xKey:t,xScale:n}=this.#r,r=this.#n.seriesSpecs();this.#q.clear();let i=this.#C;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:j(n,t);s!==void 0&&(a=!0),i[o]=typeof s==`string`||typeof s==`number`||s instanceof Date?s:String(s),r[o]=o}y(n===0||a,()=>N(this.#Ke(),`xKey`,t,e)),this.#T=null,this.#E=null,this.#S=n,this.#C=r,this.#w=i,this.#N=!0}else{let r=new Float64Array(e.length),i=new Int32Array(e.length),a=0,o=!0,s=!1,c=!1;for(let l=0;l<e.length;l++){let u=e[l],d=u==null?void 0:j(u,t);d!==void 0&&(s=!0),d!=null&&(c=!0);let f=M(d,n===`time`);Number.isFinite(f)&&(a>0&&f<(r[a-1]??0)&&(o=!1),r[a]=f,i[a]=l,a+=1)}y(e.length===0||s,()=>N(this.#Ke(),`xKey`,t,e)),y(!c||a>0,()=>ee(this.#Ke(),t,n));let l=a,u=l===e.length?r:r.slice(0,l),d=l===e.length?i:i.slice(0,l);if(!o){let e=u,t=d,n=Array.from({length:l},(e,t)=>t).toSorted((t,n)=>(e[t]??0)-(e[n]??0)||t-n);u=new Float64Array(l),d=new Int32Array(l);for(let r=0;r<l;r++){let i=n[r]??r;u[r]=e[i]??0,d[r]=t[i]??0}}let f=!0;for(let e=0;e<l;e++)if(!Number.isInteger(u[e])){f=!1;break}if(l===e.length&&o)this.#T=null,this.#E=null;else{this.#T=d;let t=new Int32Array(e.length).fill(-1);for(let e=0;e<l;e++){let n=d[e];n!=null&&(t[n]=e)}this.#E=t}this.#S=l,this.#C=u,this.#w=[],this.#N=f}let a=!1;for(let e of this.#w)if(e instanceof Date&&J(e)){a=!0;break}this.#D=a;let o=this.#C[0],s=this.#C[this.#S-1],c=i[0],l=i[i.length-1];if(!this.#We()&&(n===`linear`||n===`time`)&&o!=null&&s!=null&&c!=null&&l!=null&&o>c&&o<=l&&s>=l){this.#J.target=1;let e=performance.now(),t=e-this.#Y;this.#Z=t>2e3?null:this.#Z==null?t:this.#Z*.7+t*.3,this.#Y=e,this.#X=!0}else(o!==c||s!==l)&&(this.#J.target=0,this.#Z=null),this.#X=!1;let u=this.#S,d=i.length===u&&u<=2500;if(d){for(let e=0;e<u;e++)if(i[e]!==this.#C[e]){d=!1;break}}let f=this.#k;this.#k=/* @__PURE__ */ 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.#T==null?i:this.#T[i]??i],o=a==null?void 0:j(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))}y(u===0||r,()=>N(yn[t.mark],`dataKey`,t.dataKey,e)),this.#k.set(t.dataKey,n)}this.#A=p===1/0?0:p,this.#j=m===-1/0?0:m,this.#M=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.#T==null?a:this.#T[a]??a],s=o==null?void 0:j(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))}y(u===0||i,()=>N(`ScatterPlot.Root`,`zKey`,g,e)),this.#re=t,this.#ie=n===1/0?[0,1]:Rt([n,r],5)}else this.#re=/* @__PURE__ */ new Float64Array;this.#ue=null,this.#ye=null,this.#P=this.#r.stacked?mn(r.map(e=>this.#k.get(e.dataKey)??/* @__PURE__ */ new Float64Array)):null,this.#K=ct({pointCount:u,columnCount:Math.max(1,Math.round(this.#te.width*this.#b)),wasDecimated:this.#K});let _=this.#$;if(_!=null){for(let e of this.#n.seriesMeta())if(_.inputs.get(e.dataKey)!==vn(e)){this.#$=null;break}}this.#Re(r,f,d);let v=this.#Tt();v!=null&&this.#jt(Math.min(v,Math.max(0,u-1)),{viaKeyboard:this.#we,notify:!1}),this.#Ft({force:!0})}#Re(e,t,n){let r=performance.now(),i=this.#ze(),a=!this.#z;this.#z=this.#z||this.#S>0,a||i===0?(this.#F.jump(this.#He()),this.#I.jump(this.#Ue())):(this.#F.aim(this.#He(),r),this.#X&&this.#Z!=null?this.#I.glide(this.#Ue(),{now:r,duration:this.#Z}):this.#I.aim(this.#Ue(),r));let o=this.#S>0&&this.#S<=2500&&n,s=/* @__PURE__ */ new Set,c=/* @__PURE__ */ new Set,l=(e,t,n)=>{s.add(e);let a=this.#L.get(e);a??(a=new gn,this.#L.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 i=t.has(e.dataKey);if(this.#P==null?l(e.dataKey,this.#k.get(e.dataKey)??/* @__PURE__ */ new Float64Array,i):(l(`${e.dataKey}:lower`,this.#P.lower[n]??/* @__PURE__ */ new Float64Array,i),l(`${e.dataKey}:upper`,this.#P.upper[n]??/* @__PURE__ */ new Float64Array,i)),!this.#R.has(e.dataKey)&&this.#S>0){let t=new gn,n=this.#Be();t.retarget([0],{duration:0,now:r}),(this.#g||n===0)&&t.retarget([1],{duration:this.#g?n:0,now:r}),this.#R.set(e.dataKey,t)}});for(let e of this.#L.keys())s.has(e)||this.#L.delete(e);for(let e of this.#R.keys())c.has(e)||this.#R.delete(e)}#ze(){return!this.#m&&!this.#h?0:this.#Be()}#Be(){return!this.#r.animate||this.#Ve()?0:280}#Ve(){return this.#p!=null&&Qe(this.#p)}#He(){let[e,t]=this.#r.yDomain,n,r;if(this.#P==null?this.#e===`line`||this.#e===`scatter`?(n=this.#A,r=this.#j):(n=Math.min(0,this.#A),r=Math.max(0,this.#j)):(n=Math.min(0,this.#P.min),r=Math.max(0,this.#P.max)),typeof e==`number`&&(n=e),typeof t==`number`&&(r=t),this.#S===0)return[0,1];let i=this.#e===`bar`||this.#e===`area`?zt([n,r],5):Rt([n,r],5);return[typeof e==`number`?e:i[0],typeof t==`number`?t:i[1]]}#Ue(){if(this.#S===0)return[0,1];let e=this.#C[0]??0,t=this.#C[this.#S-1]??0;return e===t?[e-.5,t+.5]:this.#e===`scatter`?Rt([e,t],5):[e,t]}#We(){return this.#e===`scatter`&&this.#r.zKey!=null}#Ge(){return this.#e===`bar`&&this.#r.orientation===`horizontal`}#Ke(){return`${yn[this.#e].split(`.`)[0]??`Chart`}.Root`}#qe(e,t){let n=this.#G.get(t);return n??(this.#G.size>=512&&this.#G.clear(),n=e.measureText(t).width,this.#G.set(t,n)),n}#Je(){this.#ke=!0,this.#_=!0,this.#Xe()}#Ye(){this.#Xe()}#Xe(){this.#Oe||this.#je||(this.#Oe=!0,this.#Ae=requestAnimationFrame(()=>{this.#Oe=!1,this.#Ae=0,this.#Ze()}))}#Ze(){if(!this.#je){if(this.flushIngest(),this.#ke&&!this.#m&&!this.#h)this.#_&&(this.#_=!1,this.#nt());else if(this.#ke){this.#ke=!1,this.#_=!1;let e=performance.now(),t=!1;t=this.#F.tick(e)||t,t=this.#I.tick(e)||t;for(let n of this.#L.values())t=n.tick(e)||t;for(let n of this.#R.values())t=n.tick(e)||t;if(t=this.#se.tick(e)||t,this.#oe.tick(e)){t=!0;let e=this.#oe.values();this.#ae={yaw:e[0]??this.#ae.yaw,pitch:e[1]??this.#ae.pitch}}this.#v>0&&this.#y>0&&this.#$e(),this.#nt(),t=this.#dt(e)||t,t&&this.#Je()}this.#Bt()}}#Qe(){return typeof devicePixelRatio==`number`&&devicePixelRatio>0?Math.min(devicePixelRatio,3):1}#$e(){let e=this.#t.root,t=`${ze(e.ownerDocument.documentElement)}|${this.#b}|${this.#r.orientation}`;if(this.#$?.signature===t)return;let n=this.#et();if(n==null)return;let r=this.#Fe(),i=/* @__PURE__ */ new Map,a=/* @__PURE__ */ new Map,o=/* @__PURE__ */ new Map;for(let e of this.#n.seriesMeta()){let t=Le(n,e.colorInput);if(i.set(e.dataKey,t),a.set(e.dataKey,vn(e)),r!=null&&e.mark===`bar`&&e.texture!==`solid`){let i=Xe(r,{texture:e.texture,color:t,ink:n.resolve(Ge(t)),devicePixelRatio:this.#b,orientation:this.#r.orientation});i!=null&&o.set(e.dataKey,i)}}this.#G.clear(),this.#$={signature:t,resolver:n,series:i,inputs:a,barTextures:o,chrome:Re(n),fontFamily:n.fontFamily}}#et(){let e=this.#t.root,t=e.ownerDocument.defaultView;return t==null?null:Ie(this.#t.plot,{computed:t.getComputedStyle(e),parseContext:Y(e.ownerDocument)})}#tt(e){let t=this.#$?.signature??``;t!==this.#ve&&(this.#_e.clear(),this.#ve=t);let n=this.#_e.get(e);if(n!=null)return n;let r=this.#$?.resolver??this.#et(),i=r==null?e:Le(r,e);return this.#_e.set(e,i),i}#nt(){let e=this.#n.getSnapshot(),t=this.#We(),n=this.#Ge(),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.#y-8-o);this.#te={left:8,top:8,width:Math.max(0,this.#v-16),height:s};let c=8;if(a){c=40;let e=this.#$==null?null:this.#Fe();if(e!=null&&this.#$!=null){e.font=`11px ${this.#$.fontFamily}`;let t=0,r=n?this.#ct().map(e=>e.text):this.#st().map(e=>e.text);for(let n of r){let r=this.#qe(e,n);r>t&&(t=r)}c=Math.ceil(t)+14}}this.#te={left:c,top:8,width:Math.max(0,this.#v-c-8),height:s};let l=n?this.#te.top:this.#te.left,u=n?this.#te.top+this.#te.height:this.#te.left+this.#te.width;this.#ne=this.#r.xScale===`band`?Dt({count:this.#S,rangeStart:l,rangeEnd:u,paddingInner:.2,paddingOuter:.1}):this.#r.xScale===`point`?Dt({count:this.#S,rangeStart:l,rangeEnd:u,paddingInner:1,paddingOuter:.5}):null,this.#K=ct({pointCount:this.#S,columnCount:Math.max(1,Math.round(this.#te.width*this.#b)),wasDecimated:this.#K})}#rt(){let e=this.#F.values();return Et([e[0]??0,e[1]??1],[this.#te.top+this.#te.height,this.#te.top])}#it(){let e=this.#F.values(),t=this.#Ge()?[this.#te.left,this.#te.left+this.#te.width]:[this.#te.top+this.#te.height,this.#te.top];return Et([e[0]??0,e[1]??1],t)}#at(){let e=this.#I.values();return Et([e[0]??0,e[1]??1],[this.#te.left,this.#te.left+this.#te.width])}#ot(e){let t=this.#ne;if(t!=null)return Ot(t,e);let{k:n,b:r}=this.#at();return(this.#C[e]??0)*n+r}#st(){let e=this.#n.getSnapshot(),t=this.#F.values(),n=e.yAxis?.tickCount,r=this.#Ge()?1/0:Math.max(2,Math.floor(this.#te.height/28)),i=Math.min(n??1/0,r),a=n??5,o=e.yAxis?.tickFormat,s=`${t[0]}|${t[1]}|${i}|${a}|${this.#M}`,c=this.#U;if(c!=null&&c.key===s&&c.format===o)return c.ticks;let l=Mt([t[0]??0,t[1]??1],i,{count:a,integer:this.#M}),u=l.length>1?Math.abs((l[1]??0)-(l[0]??0)):0,d=Math.abs((t[1]??1)-(t[0]??0)),f=l.length>1?u:d,p=f>0?G(f):void 0,m=l.map(e=>{let t=W(e,p==null?void 0:{maximumFractionDigits:p});return{value:e,text:o==null?t:o(e,{defaultLabel:t,step:u})}});return this.#U={key:s,format:o,ticks:m},m}#ct(){let e=this.#n.getSnapshot().xAxis?.tickFormat,t=this.#lt(),n=this.#W;if(n!=null&&n.key===t&&n.format===e&&n.xValues===this.#w)return n.ticks;let r=this.#ut();return this.#W={key:t,format:e,xValues:this.#w,ticks:r},r}#lt(){if(this.#ne!=null){let e=this.#Ge();return`band|${e}|${e?this.#te.height:this.#te.width}|${this.#S}|${this.#D}`}let e=this.#I.values(),t=this.#n.getSnapshot().xAxis?.tickCount;return`${this.#r.xScale}|${e[0]}|${e[1]}|${t}|${this.#te.width}|${this.#N}`}#ut(){let e=this.#n.getSnapshot(),t=e.xAxis?.tickFormat;if(this.#ne!=null){let e=this.#Ge(),n=e?this.#te.height:this.#te.width,r=Math.max(1,Math.floor(n/(e?15:60))),i=Math.max(1,Math.ceil(this.#S/r)),a=[];for(let e=0;e<this.#S;e+=i){let n=this.#w[e]??``,r=de(n,{datasetHasTimeOfDay:this.#D});a.push({index:e,value:e,text:t==null?r:t(n,{defaultLabel:r})})}return a}let n=this.#I.values(),r=[n[0]??0,n[1]??1],i=e.xAxis?.tickCount??Math.max(2,Math.floor(this.#te.width/90));if(this.#r.xScale===`time`){let e=Lt(r);return It(r,i).map(n=>{let r=e(n);return{index:null,value:n,text:t==null?r:t(new Date(n),{defaultLabel:r})}})}let a=jt(r,i,{integer:this.#N}),o=a.length>1?G(Math.abs((a[1]??0)-(a[0]??0))):void 0;return a.map(e=>{let n=W(e,o==null?void 0:{maximumFractionDigits:o});return{index:null,value:e,text:t==null?n:t(e,{defaultLabel:n})}})}#dt(e){let t=this.#Fe(),n=this.#$;if(t==null||n==null||this.#v<=0||this.#y<=0)return!1;let r=Math.min(50,Math.max(0,e-this.#H));this.#H=e;let i=this.#t.canvas,a=Math.round(this.#v*this.#b),o=Math.round(this.#y*this.#b);(i.width!==a||i.height!==o)&&(i.width=a,i.height=o),t.setTransform(this.#b,0,0,this.#b,0,0),t.clearRect(0,0,this.#v,this.#y);let s=this.#n.getSnapshot(),c=this.#te;if(c.width<=0||c.height<=0)return!1;let l=this.#rt(),u=this.#at(),d=this.#n.seriesSpecs(),f=this.#We(),p=this.#ze()===0,m=s.xAxis!=null||s.yAxis!=null||s.grid!=null,h=f||!m?[]:this.#ft(t,n.fontFamily),g=f||!m?[]:this.#pt(t,n.fontFamily),_=wn(this.#B,h,r,p);_=wn(this.#V,g,r,p)||_;let v=this.#J;if(v.target===1){if(e-this.#Y>bn)v.target=0;else if(this.#Q==null){let t=bn-(e-this.#Y)+17;this.#Q=setTimeout(()=>{this.#Q=null,this.#Je()},t)}}if(p)v.alpha=v.target;else{let e=1-(1-(v.target>v.alpha?.16:.08))**(r/16.67);v.alpha+=(v.target-v.alpha)*e,Math.abs(v.target-v.alpha)<.02&&(v.alpha=v.target)}v.alpha!==v.target&&(_=!0);let y=this.#Ge(),b=y?this.#it():l,x=e=>this.#ne==null?e*u.k+u.b:Ot(this.#ne,e),S=e=>e*b.k+b.b,C=[...this.#B.entries()].map(([e,t])=>({position:x(e),alpha:t.alpha})),w=[...this.#V.entries()].map(([e,t])=>({position:S(e),alpha:t.alpha})),T=()=>{if(s.grid==null||f)return;let e=s.grid.lines??(y?`vertical`:`horizontal`),r=y?C:w,i=y?w:C;Vt(t,{plot:c,color:n.chrome.grid,xLines:e===`horizontal`?[]:i,yLines:e===`vertical`?[]:r})},E=Math.min(40,c.width*.25),D=v.alpha>.01&&E>1;D||T(),t.save(),t.beginPath(),t.rect(c.left,c.top,c.width,c.height+1),t.clip();let O=null;if(this.#e===`bar`?y?this.#xt(t,d):this.#bt(t,d,l):this.#e===`scatter`?O=this.#It(t,d,l):this.#St(t,d,l),t.restore(),D){t.save(),t.globalCompositeOperation=`destination-out`;let e=t.createLinearGradient(c.left,0,c.left+E,0);e.addColorStop(0,`rgba(0, 0, 0, ${v.alpha})`),e.addColorStop(1,`rgba(0, 0, 0, 0)`),t.fillStyle=e,t.fillRect(c.left,c.top,E,c.height+1),t.globalCompositeOperation=`destination-over`,T(),t.restore()}O!=null&&un(t,{textColor:n.chrome.tickText,fontFamily:n.fontFamily,plot:c,center:O.center,axes:O.axes}),this.#e===`bar`&&this.#S>0&&(y?Wt(t,{plot:c,color:n.chrome.baseline,x:S(0)}):Ut(t,{plot:c,color:n.chrome.baseline,y:S(0)}));for(let e of f?[]:s.referenceLines){let r=S(e.y);if(y?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.#tt(e.color);y?fn(t,{plot:c,color:i,textColor:n.chrome.tickText,x:r,label:e.label,fontFamily:n.fontFamily}):dn(t,{plot:c,color:i,textColor:n.chrome.tickText,y:r,label:e.label,fontFamily:n.fontFamily})}let k=s.xAxis==null||f?[]:[...this.#B.entries()].map(([e,t])=>({position:x(e),text:t.text,alpha:t.alpha})),A=s.yAxis==null||f?[]:[...this.#V.entries()].map(([e,t])=>({position:S(e),text:t.text,alpha:t.alpha})),j=y?A:k,M=y?k:A;return(j.length>0||M.length>0)&&pn(t,{plot:c,color:n.chrome.tickText,fontFamily:n.fontFamily,xLabels:j,yLabels:M}),_}#ft(e,t){e.font=`11px ${t}`;let n=this.#Ge(),r=this.#at(),i=[],a=-1/0;for(let t of this.#ct()){let o=t.index!=null&&this.#ne!=null,s=o&&this.#ne!=null?Ot(this.#ne,t.index??0):t.value*r.k+r.b,c=n?15/2:this.#qe(e,t.text)/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}#pt(e,t){let n=this.#st(),r=this.#it();if(!this.#Ge()){let e=[],t=NaN;for(let i of n){let n=i.value*r.k+r.b;Math.abs(n-t)<13||(t=n,e.push({key:i.value,text:i.text}))}return e}e.font=`11px ${t}`;let i=[],a=-1/0;for(let t of n){let n=t.value*r.k+r.b,o=this.#qe(e,t.text)/2;n-o<a+8||(a=n+o,i.push({key:t.value,text:t.text}))}return i}#mt(e,t,n){let r=t===`value`?e.dataKey:`${e.dataKey}:${t}`;if(!this.#K&&this.#S<=2500){let e=this.#L.get(r);if(e!=null&&e.values().length===this.#S)return e.values()}return t===`value`?this.#k.get(e.dataKey)??/* @__PURE__ */ new Float64Array:(t===`lower`?this.#P?.lower:this.#P?.upper)?.[n]??/* @__PURE__ */ new Float64Array}#ht(e){let t=[];for(let n=0;n<this.#S;n++)Number.isNaN(e[n]??NaN)||t.push(n);return t}#gt(e){return this.#pe.length!==e&&(this.#pe=Array.from({length:e},(e,t)=>t)),this.#pe}#_t(e){return this.#R.get(e)?.values()[0]??1}#vt(e,t){if(e==null)return 0;let n=e[t]??0;return Number.isNaN(n)?0:n}#yt(e,t,n){let r=this.#P;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 Ce({lower:i,upper:a,pileOuter:c,toPixel:n})}#bt(e,t,n){let r=this.#ne,i=this.#$;if(r==null||i==null||this.#S===0||t.length===0)return;let a=this.#P!=null,o=a?1:t.length,s=xn({bandwidth:r.bandwidth,groupCount:o}),c=(r.bandwidth-s*(o-1))/o,l=ye({step:r.step,slot:c}),u=e=>e*n.k+n.b,d=this.#de;t.forEach((t,n)=>{let f=this.#_t(t.dataKey),p=0,m=a?this.#mt(t,`lower`,n):null,h=a?this.#mt(t,`upper`,n):this.#mt(t,`value`,n);for(let e=0;e<this.#S;e++){let t=h[e]??NaN;if(Number.isNaN(t))continue;let i=this.#vt(m,e),g=a?Q(r,e)+(r.bandwidth-l)/2:Q(r,e)+(r.bandwidth-(c*o+s*(o-1)))/2+n*(c+s)+(c-l)/2,_=Se({lower:i,upper:t,toPixel:u,reveal:f,gap:a?s:0}),v=d[p]??kn();d[p]=v,p+=1,v.x=g,v.width=l,v.baselineY=_.baseline,v.valueY=_.value,v.rounded=this.#yt(n,e,u)}Gt(e,{fill:i.barTextures.get(t.dataKey)??i.series.get(t.dataKey)??`currentColor`,rects:d,count:p})})}#xt(e,t){let n=this.#ne,r=this.#$;if(n==null||r==null||this.#S===0||t.length===0)return;let i=this.#it(),a=this.#P!=null,o=a?1:t.length,s=xn({bandwidth:n.bandwidth,groupCount:o}),c=(n.bandwidth-s*(o-1))/o,l=ye({step:n.step,slot:c}),u=e=>e*i.k+i.b,d=this.#fe;t.forEach((t,i)=>{let f=this.#_t(t.dataKey),p=0,m=a?this.#mt(t,`lower`,i):null,h=a?this.#mt(t,`upper`,i):this.#mt(t,`value`,i);for(let e=0;e<this.#S;e++){let t=h[e]??NaN;if(Number.isNaN(t))continue;let r=this.#vt(m,e),g=a?Q(n,e)+(n.bandwidth-l)/2:Q(n,e)+(n.bandwidth-(c*o+s*(o-1)))/2+i*(c+s)+(c-l)/2,_=Se({lower:r,upper:t,toPixel:u,reveal:f,gap:a?s:0}),v=d[p]??An();d[p]=v,p+=1,v.y=g,v.height=l,v.baselineX=_.baseline,v.valueX=_.value,v.rounded=this.#yt(i,e,u)}Kt(e,{fill:r.barTextures.get(t.dataKey)??r.series.get(t.dataKey)??`currentColor`,rects:d,count:p})})}#St(e,t,n){let r=this.#$;if(r==null||this.#S===0)return;let i=this.#at(),a=this.#ne,o=e=>a==null?(this.#C[e]??0)*i.k+i.b:Ot(a,e);t.forEach((t,i)=>{let a=r.series.get(t.dataKey)??`currentColor`,s=this.#_t(t.dataKey);if(e.save(),s<1&&(e.beginPath(),e.rect(this.#te.left,0,this.#te.width*s,this.#y),e.clip()),this.#K){this.#Ct(e,t,i,a,n),e.restore();return}let c=t.mark===`area`,l=this.#mt(t,this.#P==null?`value`:`upper`,i),u=this.#P==null?null:this.#mt(t,`lower`,i),d=e=>!Number.isNaN(l[e]??NaN),f=t.connectNulls?this.#ht(l):this.#gt(this.#S),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;Jt(e,{color:a,curve:t.curve,indexes:f,xAt:o,y0At:r,y1At:p,definedAt:d})}else qt(e,{color:a,curve:t.curve,indexes:f,xAt:o,yAt:p,definedAt:d}),t.markers&&this.#te.width/this.#S>=12&&rn(e,{color:a,surface:r.chrome.surface,shape:this.#n.seriesShape(t.dataKey),indexes:f,xAt:o,yAt:p,definedAt:d});e.restore()})}#Ct(e,t,n,r,i){let a=Math.max(1,Math.round(this.#te.width*this.#b)),o=e=>this.#te.left+(e+.5)/this.#b;if(t.mark===`area`){let s=this.#wt(`${t.dataKey}:upper`,this.#mt(t,this.#P==null?`value`:`upper`,n),a),c=this.#P==null?null:this.#wt(`${t.dataKey}:lower`,this.#mt(t,`lower`,n),a);if(c==null){let t=this.#he;t?.columnCount!==a&&(t=jn(a),this.#he=t),Xt(e,{color:r,lowerColumns:t,upperColumns:s,columnToX:o,valueK:i.k,valueB:i.b})}else Xt(e,{color:r,lowerColumns:c,upperColumns:s,columnToX:o,valueK:i.k,valueB:i.b});return}let s=this.#wt(t.dataKey,this.#mt(t,`value`,n),a);Yt(e,{color:r,columns:s,columnToX:o,valueK:i.k,valueB:i.b})}#wt(e,t,n){let r=this.#I.values(),i=`${r[0]??0}:${r[1]??1}:${n}`,a=this.#q.get(e);if(a!=null&&a.key===i)return a.columns;let o=[r[0]??0,r[1]??1],s=Et(o,[0,n]),c=lt({xs:this.#C,values:t,startIndex:0,endIndex:this.#S-1,positionK:s.k,positionB:s.b,columnCount:n});return this.#q.set(e,{key:i,columns:c}),c}#Tt(){if(this.#S===0)return null;let e;return e=this.#Se===void 0?this.#xe:this.#Se==null?null:this.#Dt(this.#Se),e==null?null:Math.min(Math.max(0,e),this.#S-1)}#Et(e){return this.#T==null?e:this.#T[e]??e}#Dt(e){if(this.#x.length===0)return null;let t=Math.min(Math.max(0,e),this.#x.length-1);if(this.#E==null)return t;let n=this.#E[t]??-1;return n===-1?null:n}#Ot(e){if(e<0||e>=this.#S)return``;let{xScale:t}=this.#r;if(t===`band`||t===`point`)return this.#w[e]??``;let n=this.#C[e]??0;return t===`time`?new Date(n):n}#kt(e,t){if(this.#S===0)return null;let n=this.#ne;if(n!=null)return At(n,this.#Ge()?t:e);let{k:r,b:i}=this.#at();if(r===0)return 0;let a=e;if(this.#K){let t=Math.floor((e-this.#te.left)*this.#b);a=this.#te.left+(t+.5)/this.#b}return ut(this.#C,this.#S,(a-i)/r)}#At(e,t,n){let r=this.#n.seriesSpecs(),i=this.#Ge(),a=this.#ne;if(this.#e===`bar`&&this.#P==null&&a!=null&&r.length>1){let o=(i?n:t)-Q(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.#it():this.#rt(),c=i?t:n,l=this.#P;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.#P==null?this.#k.get(t.dataKey):this.#P.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}#jt(e,t){let n=e==null||this.#S===0?null:Math.min(Math.max(0,e),this.#S-1),r=this.#Se!==void 0;if(t.notify&&n!==this.#Tt()){let e=n==null?null:this.#Et(n);if(this.#i.onActiveIndexChange?.(e),r){this.#Ce={index:e,viaKeyboard:t.viaKeyboard};return}}this.#we=t.viaKeyboard,r||(this.#xe=n),this.#Ft(),this.#Ye()}#Mt=null;#Nt=!1;#Pt=null;#Ft(e={force:!1}){let t=this.#Tt();if(!e.force&&t===this.#Mt&&this.#we===this.#Nt&&this.#be===this.#Pt)return;if(this.#Mt=t,this.#Nt=this.#we,this.#Pt=this.#be,t==null||this.#S===0){this.#n.publishHover(null);return}let n=this.#Et(t),r=this.#x[n]??{},i=this.#n.getSnapshot().series.map(e=>{let n=this.#k.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.#be==null?i.filter(e=>e.value!=null):i.filter(e=>e.dataKey===this.#be));let a={index:n,xValue:this.#Ot(t),datum:r,points:i,viaKeyboard:this.#we};if(this.#We()){let e=this.#re[t]??NaN;a.zValue=Number.isNaN(e)?null:e}this.#n.publishHover(a)}#It(e,t,n){let r=this.#$;if(r==null||this.#S===0||t.length===0)return null;if(this.#We())return this.#Lt(e,t);let i=this.#at(),a=this.#me;if(a==null||a.columns!==this.#k||a.specs!==t){let e=t.map(e=>this.#ht(this.#k.get(e.dataKey)??/* @__PURE__ */ new Float64Array));a={columns:this.#k,specs:t,indexes:e,total:e.reduce((e,t)=>e+t.length,0)},this.#me=a}let o=a.indexes,s=a.total;return t.forEach((t,a)=>{let c=this.#mt(t,`value`,a),l=o[a]??[];e.save(),e.globalAlpha=this.#_t(t.dataKey),sn(e,{color:r.series.get(t.dataKey)??`currentColor`,surface:r.chrome.surface,shape:this.#n.seriesShape(t.dataKey),totalPointCount:s,indexes:l,xAt:e=>(this.#C[e]??0)*i.k+i.b,yAt:e=>(c[e]??0)*n.k+n.b,radiusAt:()=>4}),e.restore()}),null}#Lt(e,t){let n=this.#$;if(n==null)return null;let r=this.#te,i=ft(this.#ae),a=r.left+r.width/2,o=r.top+r.height/2,s=this.#se.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.#I.values(),p=[f[0]??0,f[1]??1],m=this.#F.values(),h=[m[0]??0,m[1]??1],g=this.#ie,_=t.map(e=>this.#_t(e.dataKey)),v=this.#se.values(),y=v[0]??1,b=v[1]??1,x=(e,t,n)=>{let r=pt(e,t,n,i);return{x:a+r.x*d,y:o-r.y*d}},S=gt.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)}];ln(e,{gridColor:n.chrome.grid,axisColor:n.chrome.baseline,corners:S,edges:_t,cubeAlpha:b,axes:T});let E=this.#S*t.length,D=this.#ue;(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.#mt(e,`value`,t);for(let e=0;e<this.#S;e++){let r=n[e]??NaN,s=this.#re[e]??NaN;if(Number.isNaN(r)||Number.isNaN(s))continue;let c=pt(ht(this.#C[e]??0,p),ht(r,h)*y,ht(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.#ue=D,this.#ge.length<k&&(this.#ge=new Int32Array(E));let A=this.#ge.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 cn(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}}#Rt(e,t){let n=this.#n.seriesSpecs(),r=576,i=null;if(this.#We()){let a=this.#ue;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.#at(),o=this.#rt();for(let s of n){let n=this.#k.get(s.dataKey);if(n!=null)for(let c=0;c<this.#S;c++){let l=n[c]??NaN;if(Number.isNaN(l))continue;let u=(this.#C[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}#zt(e){let t=this.#n.seriesSpecs();if(this.#We()){let t=this.#ue;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.#at(),r=this.#rt();for(let i of t){let t=this.#k.get(i.dataKey)?.[e]??NaN;if(!Number.isNaN(t))return{x:(this.#C[e]??0)*n.k+n.b,y:t*r.k+r.b}}return null}#Bt(){let{hover:e,tooltip:t}=this.#t;if(e==null)return;let{crosshair:n,band:r,markers:i}=e,a=this.#Tt(),o=a!=null&&this.#S>0,s=this.#e===`bar`,c=this.#e===`scatter`;if(n.style.opacity=o&&!s&&!c?`1`:`0`,r.style.opacity=o&&s?`1`:`0`,i.style.opacity=o&&!s?`1`:`0`,t!=null&&(t.style.opacity=o?`1`:`0`),!o)return;let l=this.#te;if(c){let e=this.#ye??this.#zt(a);if(e==null){i.style.opacity=`0`,t!=null&&(t.style.opacity=`0`);return}for(;i.children.length>1;)i.lastElementChild?.remove();i.children.length===0&&i.appendChild(En(i.ownerDocument));let n=i.children[0];if(n instanceof HTMLElement){let t=this.#n.getSnapshot().series,r=this.#be==null?t.find(e=>{let t=this.#k.get(e.dataKey)?.[a]??NaN;return!Number.isNaN(t)}):t.find(e=>e.dataKey===this.#be);n.style.opacity=`1`,On(n,r?.shape??`circle`,r?.color??`currentColor`),n.style.transform=`translate3d(${e.x}px, ${e.y}px, 0)`}this.#Vt(e.x,e.y);return}let u=this.#ot(a),d=this.#Ge();if(s){let e=this.#ne;if(e!=null){let t=kt(e,a),n=Math.max(1,t.size),i=t.start-(n-t.size)/2;d?(r.style.transform=`translate3d(${l.left}px, ${i}px, 0)`,r.style.width=`${l.width}px`,r.style.height=`${n}px`):(r.style.transform=`translate3d(${i}px, ${l.top}px, 0)`,r.style.width=`${n}px`,r.style.height=`${l.height}px`)}}else{n.style.transform=`translate3d(${u}px, ${l.top}px, 0)`,n.style.height=`${l.height}px`;let e=this.#n.getSnapshot().series;for(;i.children.length>e.length;)i.lastElementChild?.remove();for(;i.children.length<e.length;)i.appendChild(En(i.ownerDocument));let t=this.#rt();e.forEach((e,n)=>{let r=i.children[n];if(!(r instanceof HTMLElement))return;let o=this.#k.get(e.dataKey)?.[a]??NaN,s=this.#mt(e,this.#P==null?`value`:`upper`,n)[a]??NaN;Number.isNaN(o)||Number.isNaN(s)?r.style.opacity=`0`:(r.style.opacity=`1`,On(r,e.shape,e.color),r.style.transform=`translate3d(${u}px, ${s*t.k+t.b}px, 0)`)})}s&&d&&this.#ne!=null?this.#Vt(this.#Te??l.left+l.width/2,Ot(this.#ne,a)):this.#Vt(u,this.#Ee??l.top+8)}#Vt(e,t){let n=this.#te,r=this.#t.tooltip;if(r==null)return;let i=this.#De,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 Cn=e=>e===3?{yaw:.65,pitch:-.35}:{yaw:0,pitch:0},wn=(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}n.target===1&&n.alpha>.98&&(n.alpha=1),n.target===0&&n.alpha<.03?e.delete(t):n.alpha!==n.target&&(o=!0)}return o},Tn={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%)`},En=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},Dn=/* @__PURE__ */ new WeakMap,On=(e,t,n)=>{let r=Dn.get(e);if(r?.shape===t&&r.color===n)return;Dn.set(e,{shape:t,color:n});let i=Tn[t];e.setAttribute(`data-shape`,t);let[a,o]=e.children;a instanceof HTMLElement&&(a.style.clipPath=i),o instanceof HTMLElement&&(o.style.clipPath=i,o.style.backgroundColor=n)},kn=()=>({x:0,width:0,baselineY:0,valueY:0,rounded:!1}),An=()=>({y:0,height:0,baselineX:0,valueX:0,rounded:!1}),jn=e=>{let t=new Float64Array(e);return{columnCount:e,hasData:new Uint8Array(e).fill(1),minValue:t,maxValue:t,inValue:t,outValue:t}},Mn=e=>e.replaceAll(`|`,`\\|`).replaceAll(/\s*\n\s*/g,` `),Nn=e=>e instanceof Date?Number.isNaN(e.getTime())?`—`:e.toISOString():typeof e==`number`?Number.isFinite(e)?String(e):`—`:typeof e==`string`?Mn(e):`—`,Pn=e=>typeof e==`number`&&Number.isFinite(e)?String(e):`—`,Fn=e=>`| ${e.join(` | `)} |`,In=({data:e,xKey:t,series:n,zKey:r})=>{let i=[Mn(t),...n.map(e=>Mn(e.label)),...r==null?[]:[Mn(r)]],a=e.map(e=>[Nn(j(e,t)),...n.map(t=>Pn(j(e,t.dataKey))),...r==null?[]:[Pn(j(e,r))]]);return[Fn(i),Fn(i.map(()=>`---`)),...a.map(e=>Fn(e))].join(`
2
+ `)},Ln=(e,t)=>e==null?`var(${Ee(t)})`:Te(e)?`var(${Ee(e)})`:e,Rn={"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`},zn=(e,t)=>e??Rn[t],Bn={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`},Vn=e=>{let t=/* @__PURE__ */ new Set;for(let n of e)n.seriesSlot!=null&&n.seriesSlot!==`other`&&t.add(Bn[n.seriesSlot]);let n=/* @__PURE__ */ new Map,r=new Set(t);for(let t of e){if(t.seriesSlot!=null){n.set(t.dataKey,Bn[t.seriesSlot]);continue}let e=Oe.find(e=>!r.has(e))??`chart-other`;n.set(t.dataKey,e),r.add(e)}return n};var Hn=class{#e=/* @__PURE__ */ new Set;#t={series:[],hover:null,grid:null,xAxis:null,yAxis:null,referenceLines:[],tooltip:null,orientation:`vertical`};#n=/* @__PURE__ */ new Map;#r=null;#i=/* @__PURE__ */ new Map;#a=0;#o=null;#s=!1;#c=`vertical`;#l=null;#u=null;#d=/* @__PURE__ */ new Map;#f=/* @__PURE__ */ new Map;#p=null;#m=null;#h=!1;get hoverEver(){return this.#h}onSeriesChange=null;onPresentationChange=null;subscribe=e=>(this.#e.add(e),()=>{this.#e.delete(e)});getSnapshot=()=>this.#t;seriesSpecs(){return this.#r??=[...this.#n.values()].toSorted((e,t)=>e.sequence-t.sequence).map(e=>e.spec),this.#r}seriesShape(e){return this.#t.series.find(t=>t.dataKey===e)?.shape??Rn[`chart-other`]}registerSeries(e){let t=this.#i.get(e.dataKey)??this.#a++;return this.#i.set(e.dataKey,t),this.#n.set(e.dataKey,{spec:e,sequence:t}),this.#r=null,this.#g({seriesChanged:!0}),()=>{this.#n.get(e.dataKey)?.spec===e&&(this.#n.delete(e.dataKey),this.#r=null,this.#g({seriesChanged:!0}))}}setDecorative(e){this.#s!==e&&(this.#s=e,this.#g({seriesChanged:!0}))}setOrientation(e){this.#c!==e&&(this.#c=e,this.#g())}registerGrid(e){let t={lines:e};return this.#o=t,this.#g(),()=>{this.#o===t&&(this.#o=null,this.#g())}}registerXAxis(e){return this.#l=e,this.#g(),()=>{this.#l===e&&(this.#l=null,this.#g())}}registerYAxis(e){return this.#u=e,this.#g(),()=>{this.#u===e&&(this.#u=null,this.#g())}}registerReferenceLine(e,t){let n=this.#f.get(e)??this.#a++;return this.#f.set(e,n),this.#d.set(e,{spec:t,sequence:n}),this.#g(),()=>{this.#d.get(e)?.spec===t&&(this.#d.delete(e),this.#g())}}registerTooltip(e){return this.#p=e,this.#g(),()=>{this.#p===e&&(this.#p=null,this.#g())}}publishHover(e){this.#m!==e&&(this.#m=e,e!=null&&(this.#h=!0),this.#t={...this.#t,hover:e},this.#_())}seriesMeta(){let e=this.seriesSpecs(),t=Vn(e);return e.map(e=>{let n=t.get(e.dataKey)??`chart-other`,r=this.#s?De:Ln(e.color,n),i=this.#s?De:e.color??n;return{dataKey:e.dataKey,label:e.label,mark:e.mark,color:r,colorInput:i,shape:zn(e.shape,n),texture:e.texture}})}#g(e={seriesChanged:!1}){this.#t={series:e.seriesChanged?this.seriesMeta():this.#t.series,hover:this.#m,grid:this.#o,xAxis:this.#l,yAxis:this.#u,referenceLines:[...this.#d.values()].toSorted((e,t)=>e.sequence-t.sequence).map(e=>e.spec),tooltip:this.#p,orientation:this.#c},this.#_(),e.seriesChanged?this.onSeriesChange?.():this.onPresentationChange?.()}#_(){for(let e of this.#e)e()}};const Un=`100%`,Wn=`300%`,Gn=[`near`,`far`],Kn=/* @__PURE__ */ new WeakMap,qn=/* @__PURE__ */ new WeakMap,Jn=/* @__PURE__ */ new WeakMap;let Yn=null;const Xn=()=>{if(Yn==null){let e=new IntersectionObserver(()=>{},{scrollMargin:`0px`});Yn=`scrollMargin`in e,e.disconnect()}return Yn},Zn=/auto|scroll/,Qn=e=>{let t=e.ownerDocument,n=t.defaultView;if(n==null)return null;for(let r=e.parentElement;r!=null&&r!==t.documentElement&&r!==t.body;r=r.parentElement){let e=n.getComputedStyle(r);if(Zn.test(e.overflowY)||Zn.test(e.overflowX))return r}return null},$n=(e,t,n)=>new IntersectionObserver(t=>{for(let n of t)Jn.get(n.target)?.({band:e,inView:n.isIntersecting,rect:n.boundingClientRect});V()},{root:n,rootMargin:t,scrollMargin:t,threshold:0}),er=e=>{let t=Kn.get(e);return t??(t={near:$n(`near`,Un,null),far:$n(`far`,Wn,null),visible:$n(`visible`,`0px`,null),count:0},Kn.set(e,t)),t.count+=1,t},tr=(e,t)=>{--t.count,!(t.count>0)&&(t.near.disconnect(),t.far.disconnect(),t.visible.disconnect(),Kn.get(e)===t&&Kn.delete(e))},nr=(e,t)=>{let n=qn.get(e);if(n!=null)return n;let r={near:$n(`near`,Un,e),far:$n(`far`,Wn,e),open:{near:!1,far:!1},elements:/* @__PURE__ */ new Set};return Jn.set(e,({band:e,inView:t})=>{if(e!==`visible`&&r.open[e]!==t){r.open[e]=t;for(let n of r.elements)t?r[e].observe(n):(r[e].unobserve(n),Jn.get(n)?.({band:e,inView:!1,rect:null}))}}),t.near.observe(e),t.far.observe(e),t.count+=1,qn.set(e,r),r},rr=(e,t,n,r)=>{t.elements.size>0||(t.near.disconnect(),t.far.disconnect(),n.near.unobserve(e),n.far.unobserve(e),Jn.delete(e),qn.get(e)===t&&qn.delete(e),tr(r,n))},ir=(e,t)=>{if(typeof IntersectionObserver>`u`)return t({band:`near`,inView:!0,rect:null}),t({band:`far`,inView:!0,rect:null}),t({band:`visible`,inView:!0,rect:null}),V(),()=>{ae(e)};let n=e.ownerDocument,r=er(n);Jn.set(e,t),r.visible.observe(e);let i=Xn()?null:Qn(e);if(i==null)return r.near.observe(e),r.far.observe(e),()=>{Jn.get(e)===t&&(Jn.delete(e),ae(e),r.near.unobserve(e),r.far.unobserve(e),r.visible.unobserve(e),tr(n,r))};let a=nr(i,r);a.elements.add(e);for(let t of Gn)a.open[t]&&a[t].observe(e);return()=>{Jn.get(e)===t&&(Jn.delete(e),ae(e),a.elements.delete(e),a.near.unobserve(e),a.far.unobserve(e),r.visible.unobserve(e),tr(n,r),rr(i,a,r,n))}},ar=d(null),or=e=>{let t=f(ar);return y(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},sr=e=>v(e.subscribe,e.getSnapshot,e.getSnapshot),cr=e=>{let t=u(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),v(e.subscribe,n,r)},lr=e=>{let t=u(3),n,r;return t[0]===e?(n=t[1],r=t[2]):(n=()=>ur(e),r=()=>ur(e),t[0]=e,t[1]=n,t[2]=r),v(e.subscribe,n,r)},ur=e=>{let t=e.getSnapshot().hover;return t?.viaKeyboard===!0?t:null},dr=e=>{let t=u(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),v(e.subscribe,n,r)},fr=(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)))},pr=e=>{let[t,n]=_(e);return fr(t,e)?t:(n(e),e)},mr={},hr=(e,t)=>{for(let n of e){let e=j(n,t);if(e!=null)return e instanceof Date?`time`:typeof e==`number`?`linear`:`point`}return`point`},gr=[`auto`,`auto`],_r=(e,t,n)=>{let r=(n,r)=>{let i=e.createElement(`div`);return i.setAttribute(`data-slot`,`${t}-${n}`),i.setAttribute(`aria-hidden`,`true`),i.className=r,i},i=e.createElement(`canvas`);return i.setAttribute(`data-slot`,`${t}-canvas`),i.setAttribute(`aria-hidden`,`true`),i.className=`absolute inset-0 size-full`,{canvas:i,hover:n.hover?{crosshair:r(`crosshair`,`bg-neutral-500 pointer-events-none absolute left-0 top-0 w-px opacity-0`),band:r(`hover-band`,`bg-neutral-500/10 pointer-events-none absolute left-0 top-0 rounded-sm opacity-0`),markers:r(`markers`,`pointer-events-none absolute inset-0 opacity-0`)}:null}},vr={bar:`Bar`,line:`Line`,area:`Area`,scatter:`Point`},yr=e=>{let n=u(210),a,o,s,c,l,d,f,p,b,C,w,T,E,D,O,k,A,j,M,N,ee,P,F,I,L,R,z,ne,B;n[0]===e?(a=n[1],o=n[2],s=n[3],c=n[4],l=n[5],d=n[6],f=n[7],p=n[8],b=n[9],C=n[10],w=n[11],T=n[12],E=n[13],D=n[14],O=n[15],k=n[16],A=n[17],j=n[18],M=n[19],N=n[20],ee=n[21],P=n[22],F=n[23],I=n[24],L=n[25],R=n[26],z=n[27],ne=n[28],B=n[29]):({kind:w,componentName:p,slotName:j,data:b,xKey:z,xScale:ne,zKey:B,dimensions:N,yDomain:ee,stacked:P,orientation:F,animate:o,pending:I,mode:L,activeIndex:a,onActiveIndexChange:T,onDatumActivate:D,className:f,children:d,ref:A,"data-slot":C,"aria-label":c,"aria-labelledby":l,"aria-hidden":s,tabIndex:R,onFocus:O,onBlur:E,style:M,...k}=e,n[0]=e,n[1]=a,n[2]=o,n[3]=s,n[4]=c,n[5]=l,n[6]=d,n[7]=f,n[8]=p,n[9]=b,n[10]=C,n[11]=w,n[12]=T,n[13]=E,n[14]=D,n[15]=O,n[16]=k,n[17]=A,n[18]=j,n[19]=M,n[20]=N,n[21]=ee,n[22]=P,n[23]=F,n[24]=I,n[25]=L,n[26]=R,n[27]=z,n[28]=ne,n[29]=B);let V=N===void 0?3:N,oe=ee===void 0?gr:ee,H=P!==void 0&&P,U=F===void 0?`vertical`:F,se=I!==void 0&&I,ce=L===void 0?`interactive`:L,W=ce===`interactive`,G=ce===`decorative`,K=o??ce!==`static`,[q]=_(Wr),[le,ue]=_(!1),J=g(null),de=g(null),fe=g(!1),pe=g(null),he;n[30]===Symbol.for(`react.memo_cache_sentinel`)?(he={near:!1,withinFar:!0,seen:!1,focused:!1},n[30]=he):he=n[30];let ge=g(he),ve=g(null),ye;n[31]===q.hoverEver?ye=n[32]:(ye=()=>q.hoverEver,n[31]=q.hoverEver,n[32]=ye);let be=v(q.subscribe,ye,Gr),xe;n[33]!==b||n[34]!==z||n[35]!==B?(xe={data:b,xKey:z,zKey:B},n[33]=b,n[34]=z,n[35]=B,n[36]=xe):xe=n[36];let Se=g(xe),Ce;n[37]!==p||n[38]!==w||n[39]!==q?(Ce=()=>({kind:w,componentName:p,store:q,engineRef:J,dataRef:Se}),n[37]=p,n[38]=w,n[39]=q,n[40]=Ce):Ce=n[40];let[we]=_(Ce),Te,Ee;n[41]!==b||n[42]!==z||n[43]!==B?(Te=()=>{Se.current={data:b,xKey:z,zKey:B}},Ee=[b,z,B],n[41]=b,n[42]=z,n[43]=B,n[44]=Te,n[45]=Ee):(Te=n[44],Ee=n[45]),h(Te,Ee);let De=g(null),Oe=t(De,A),ke=g(null),Ae=g(null),je=m(),Me;n[46]!==b||n[47]!==w||n[48]!==z||n[49]!==ne?(Me=w===`bar`?`band`:ne??hr(b,z),n[46]=b,n[47]=w,n[48]=z,n[49]=ne,n[50]=Me):Me=n[50];let Y=Me;y(w!==`scatter`||b.length===0||Y!==`point`,()=>`${p}.Root requires numeric or Date x values — the "${z}" values are not numbers or dates, so they have no position on a continuous scatter axis.`);let[X,Z]=oe,Ne;n[51]!==b||n[52]!==Y||n[53]!==z?(Ne=me(b,z,Y),n[51]=b,n[52]=Y,n[53]=z,n[54]=Ne):Ne=n[54];let Pe=Ne,Fe=Pe.hasTimeOfDay,Ie;n[55]!==Z||n[56]!==X?(Ie=[X,Z],n[55]=Z,n[56]=X,n[57]=Ie):Ie=n[57];let Le=B??null,Re;n[58]!==K||n[59]!==V||n[60]!==U||n[61]!==Y||n[62]!==H||n[63]!==Ie||n[64]!==Le||n[65]!==z?(Re={xKey:z,xScale:Y,yDomain:Ie,zKey:Le,dimensions:V,stacked:H,orientation:U,animate:K},n[58]=K,n[59]=V,n[60]=U,n[61]=Y,n[62]=H,n[63]=Ie,n[64]=Le,n[65]=z,n[66]=Re):Re=n[66];let ze;n[67]===Symbol.for(`react.memo_cache_sentinel`)?(ze={onDatumActivate:null,onActiveIndexChange:null},n[67]=ze):ze=n[67];let Be;n[68]===Re?Be=n[69]:(Be={options:Re,callbacks:ze,controlledActiveIndex:void 0},n[68]=Re,n[69]=Be);let Ve=g(Be),He;n[70]!==a||n[71]!==K||n[72]!==V||n[73]!==W||n[74]!==T||n[75]!==D||n[76]!==U||n[77]!==Y||n[78]!==H||n[79]!==z||n[80]!==Z||n[81]!==X||n[82]!==B?(He=()=>{Ve.current={options:{xKey:z,xScale:Y,yDomain:[X,Z],zKey:B??null,dimensions:V,stacked:H,orientation:U,animate:K},callbacks:W?{onDatumActivate:D??null,onActiveIndexChange:T??null}:{onDatumActivate:null,onActiveIndexChange:null},controlledActiveIndex:W?a:void 0}},n[70]=a,n[71]=K,n[72]=V,n[73]=W,n[74]=T,n[75]=D,n[76]=U,n[77]=Y,n[78]=H,n[79]=z,n[80]=Z,n[81]=X,n[82]=B,n[83]=He):He=n[83],h(He);let Ue,We;n[84]!==W||n[85]!==w||n[86]!==j||n[87]!==q?(Ue=()=>(pe.current=e=>{let t=De.current,n=ke.current;if(J.current!=null||t==null||n==null)return;ae(n);let r=_r(n.ownerDocument,j,{hover:W});n.prepend(r.canvas),r.hover!=null&&n.append(r.hover.crosshair,r.hover.band,r.hover.markers);let i=e!=null&&e.width>0&&e.height>0?{width:e.width,height:e.height}:void 0,a=new Sn({kind:w,store:q,elements:{root:t,plot:n,canvas:r.canvas,hover:r.hover,tooltip:Ae.current},inView:!1,size:i}),o=Ve.current;a.setOptions(o.options),a.setRows(Se.current.data),a.setCallbacks(o.callbacks),a.setControlledActiveIndex(o.controlledActiveIndex),J.current=a,de.current=r,a.flushIngest(),a.setInView(ge.current.near||ge.current.focused),ge.current.seen&&a.markSeen(),a.commitNow()},fe.current&&(fe.current=!1,pe.current(null)),()=>{fe.current=J.current!=null,pe.current=null;let e=J.current,t=de.current;J.current=null,de.current=null,e?.destroy(),t!=null&&(t.canvas.remove(),t.hover?.crosshair.remove(),t.hover?.band.remove(),t.hover?.markers.remove())}),We=[w,q,j,W],n[84]=W,n[85]=w,n[86]=j,n[87]=q,n[88]=Ue,n[89]=We):(Ue=n[88],We=n[89]),h(Ue,We);let Ge,Ke;n[90]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=()=>{let e=ke.current;if(e!=null)return ir(e,t=>{let{band:n,inView:r,rect:i}=t,a=J.current,o=ge.current;n===`near`?(o.near=r,a==null?r?re(e,{rect:i,run:e=>pe.current?.(e)}):ae(e):a.setInView(r||o.focused)):n===`visible`&&r?(o.seen=!0,a==null?ie(e):a.markSeen()):n===`far`&&(o.withinFar=r,!r&&!o.focused&&a?.releaseBackingStores())})},Ke=[],n[90]=Ge,n[91]=Ke):(Ge=n[90],Ke=n[91]),h(Ge,Ke);let qe,Je;n[92]===Symbol.for(`react.memo_cache_sentinel`)?(qe=()=>{let e=De.current?.ownerDocument.defaultView;if(e!=null)return rt(e,{before:()=>{pe.current?.(null),J.current?.paintForPrint()},after:Kr})},Je=[],n[92]=qe,n[93]=Je):(qe=n[92],Je=n[93]),h(qe,Je);let Ye,Xe;n[94]!==K||n[95]!==G||n[96]!==V||n[97]!==U||n[98]!==Y||n[99]!==H||n[100]!==q||n[101]!==z||n[102]!==Z||n[103]!==X||n[104]!==B?(Ye=()=>{J.current?.setOptions({xKey:z,xScale:Y,yDomain:[X,Z],zKey:B??null,dimensions:V,stacked:H,orientation:U,animate:K}),q.setOrientation(U),q.setDecorative(G)},Xe=[q,G,z,Y,X,Z,B,V,H,U,K],n[94]=K,n[95]=G,n[96]=V,n[97]=U,n[98]=Y,n[99]=H,n[100]=q,n[101]=z,n[102]=Z,n[103]=X,n[104]=B,n[105]=Ye,n[106]=Xe):(Ye=n[105],Xe=n[106]),h(Ye,Xe);let Ze,Qe;n[107]===b?(Ze=n[108],Qe=n[109]):(Ze=()=>{J.current?.setRows(b)},Qe=[b],n[107]=b,n[108]=Ze,n[109]=Qe),h(Ze,Qe);let $e;n[110]!==W||n[111]!==T||n[112]!==D?($e=()=>{J.current?.setCallbacks(W?{onDatumActivate:D??null,onActiveIndexChange:T??null}:{onDatumActivate:null,onActiveIndexChange:null})},n[110]=W,n[111]=T,n[112]=D,n[113]=$e):$e=n[113],h($e);let et,tt;n[114]!==a||n[115]!==W?(et=()=>{J.current?.setControlledActiveIndex(W?a:void 0)},tt=[W,a],n[114]=a,n[115]=W,n[116]=et,n[117]=tt):(et=n[116],tt=n[117]),h(et,tt);let nt=pr(M??mr),it,at;n[118]!==f||n[119]!==nt?(it=()=>{J.current?.setColorScope(f,nt)},at=[f,nt],n[118]=f,n[119]=nt,n[120]=it,n[121]=at):(it=n[120],at=n[121]),h(it,at);let ot,st;n[122]!==G||n[123]!==q?(ot=()=>{let e=ve.current;if(G||e==null)return;let t=null,n=()=>{let n=_e(q.getSnapshot().series.map(qr));n!==t&&(t=n,e.textContent=n)};return n(),q.subscribe(n)},st=[q,G],n[122]=G,n[123]=q,n[124]=ot,n[125]=st):(ot=n[124],st=n[125]),h(ot,st);let ct=g(null),lt;n[126]!==p||n[127]!==b||n[128]!==w||n[129]!==Y||n[130]!==q||n[131]!==z||n[132]!==B?(lt=()=>{let e=J.current;if(e!=null){e.flushIngest();return}let t=q.seriesSpecs().map(Jr),n=`${z}|${Y}|${B??``}|${t.join(`|`)}`,r=ct.current;(r==null||r.data!==b||r.signature!==n)&&(te({rootName:`${p}.Root`,partName:`${p}.${vr[w]}`,rows:b,xKey:z,xScale:Y,dataKeys:t,zKey:B??null}),ct.current={data:b,signature:n})},n[126]=p,n[127]=b,n[128]=w,n[129]=Y,n[130]=q,n[131]=z,n[132]=B,n[133]=lt):lt=n[133],h(lt);let ut=le?`engaged`:`dormant`,dt;n[134]!==C||n[135]!==j?(dt=i(C,j),n[134]=C,n[135]=j,n[136]=dt):dt=n[136];let ft;n[137]===f?ft=n[138]:(ft=r(`relative flex aspect-video w-full flex-col`,f),n[137]=f,n[138]=ft);let pt=G?!0:s,mt=G?void 0:R,ht=G?!0:void 0,gt;n[139]!==W||n[140]!==O?(gt=e=>{O?.(e),W&&ue(!0),ge.current.focused=!0,pe.current?.(null),J.current?.setInView(!0)},n[139]=W,n[140]=O,n[141]=gt):gt=n[141];let _t;n[142]===E?_t=n[143]:(_t=e=>{if(E?.(e),e.relatedTarget instanceof Node&&e.currentTarget.contains(e.relatedTarget))return;let t=ge.current;t.focused=!1;let n=J.current;n!=null&&(n.setInView(t.near),t.withinFar||n.releaseBackingStores())},n[142]=E,n[143]=_t);let vt=W?ut:void 0,yt=`${j}-plot`,bt=se&&`opacity-60 transition-opacity duration-300`,xt;n[144]===bt?xt=n[145]:(xt=r(`relative min-h-0 w-full flex-1`,bt),n[144]=bt,n[145]=xt);let St=ce===`static`?`img`:void 0,Ct=ce===`static`?c:void 0,wt=ce===`static`?l:void 0,Tt=ce===`static`?je:void 0,Et;n[146]!==c||n[147]!==l||n[148]!==je||n[149]!==W||n[150]!==w||n[151]!==B?(Et=W&&/* @__PURE__ */ x(`div`,{role:`application`,"aria-label":c,"aria-labelledby":l,"aria-describedby":je,tabIndex:0,className:r(`focus-visible:ring-focus-accent absolute inset-0 rounded-sm outline-none focus-visible:ring-2`,(w===`line`||w===`area`)&&`cursor-crosshair`,w===`scatter`&&B!=null&&`touch-none cursor-grab active:cursor-grabbing`),onPointerDown:e=>{e.isTrusted&&w===`scatter`&&B!=null&&e.currentTarget.setPointerCapture(e.pointerId),J.current??pe.current?.(ke.current?.getBoundingClientRect()??null),J.current?.handlePointerDown(e.nativeEvent.offsetX,e.nativeEvent.offsetY)},onPointerMove:e=>{J.current?.handlePointerMove(e.nativeEvent.offsetX,e.nativeEvent.offsetY)},onPointerUp:e=>{J.current?.handlePointerUp(e.nativeEvent.offsetX,e.nativeEvent.offsetY)},onPointerLeave:()=>{J.current?.handlePointerLeave()},onPointerCancel:()=>{J.current?.handlePointerLeave()},onBlur:()=>{J.current?.handlePointerLeave()},onKeyDown:e=>{J.current?.handleKeyDown(e.key)&&e.preventDefault()}}),n[146]=c,n[147]=l,n[148]=je,n[149]=W,n[150]=w,n[151]=B,n[152]=Et):Et=n[152];let Dt;n[153]!==G||n[154]!==je||n[155]!==W||n[156]!==w||n[157]!==j||n[158]!==Pe?(Dt=!G&&/* @__PURE__ */ x(Ir,{id:je,kind:w,slotName:j,seriesRef:ve,summary:Pe,instructions:W}),n[153]=G,n[154]=je,n[155]=W,n[156]=w,n[157]=j,n[158]=Pe,n[159]=Dt):Dt=n[159];let Q;n[160]!==W||n[161]!==j||n[162]!==q||n[163]!==be||n[164]!==Fe?(Q=be&&W&&/* @__PURE__ */ x(Dr,{slotName:j,store:q,tooltipRef:e=>{Ae.current=e,J.current?.attachTooltip(e)},xHasTimeOfDay:Fe}),n[160]=W,n[161]=j,n[162]=q,n[163]=be,n[164]=Fe,n[165]=Q):Q=n[165];let Ot;n[166]!==yt||n[167]!==xt||n[168]!==St||n[169]!==Ct||n[170]!==wt||n[171]!==Tt||n[172]!==Et||n[173]!==Dt||n[174]!==Q?(Ot=/* @__PURE__ */ S(`div`,{"data-slot":yt,className:xt,role:St,"aria-label":Ct,"aria-labelledby":wt,"aria-describedby":Tt,ref:ke,children:[Et,Dt,Q]}),n[166]=yt,n[167]=xt,n[168]=St,n[169]=Ct,n[170]=wt,n[171]=Tt,n[172]=Et,n[173]=Dt,n[174]=Q,n[175]=Ot):Ot=n[175];let kt;n[176]!==W||n[177]!==q||n[178]!==Fe?(kt=W&&/* @__PURE__ */ x(Lr,{store:q,xHasTimeOfDay:Fe}),n[176]=W,n[177]=q,n[178]=Fe,n[179]=kt):kt=n[179];let At;n[180]!==c||n[181]!==l||n[182]!==b||n[183]!==le||n[184]!==W||n[185]!==j||n[186]!==q||n[187]!==Fe||n[188]!==z||n[189]!==B?(At=W&&le&&/* @__PURE__ */ x(Ur,{data:b,label:c,labelledBy:l,slotName:j,store:q,xHasTimeOfDay:Fe,xKey:z,zKey:B}),n[180]=c,n[181]=l,n[182]=b,n[183]=le,n[184]=W,n[185]=j,n[186]=q,n[187]=Fe,n[188]=z,n[189]=B,n[190]=At):At=n[190];let jt;n[191]!==d||n[192]!==we||n[193]!==Ot||n[194]!==kt||n[195]!==At?(jt=/* @__PURE__ */ S(ar.Provider,{value:we,children:[Ot,d,kt,At]}),n[191]=d,n[192]=we,n[193]=Ot,n[194]=kt,n[195]=At,n[196]=jt):jt=n[196];let Mt;return n[197]!==Oe||n[198]!==k||n[199]!==M||n[200]!==dt||n[201]!==ft||n[202]!==pt||n[203]!==mt||n[204]!==ht||n[205]!==gt||n[206]!==_t||n[207]!==vt||n[208]!==jt?(Mt=/* @__PURE__ */ x(`div`,{"data-slot":dt,className:ft,"aria-hidden":pt,tabIndex:mt,inert:ht,ref:Oe,onFocus:gt,onBlur:_t,style:M,...k,"data-state":vt,children:jt}),n[197]=Oe,n[198]=k,n[199]=M,n[200]=dt,n[201]=ft,n[202]=pt,n[203]=mt,n[204]=ht,n[205]=gt,n[206]=_t,n[207]=vt,n[208]=jt,n[209]=Mt):Mt=n[209],Mt},br=(e,t,n)=>{let r=u(13),i=or(e);y(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:c,curve:l,markers:d,connectNulls:f,shape:p,texture:m}=n,g=l===void 0?`linear`:l,_=d!==void 0&&d,v=f!==void 0&&f,b=m===void 0?`solid`:m,x,S;return r[0]!==c||r[1]!==v||r[2]!==i.store||r[3]!==g||r[4]!==a||r[5]!==o||r[6]!==t||r[7]!==_||r[8]!==s||r[9]!==p||r[10]!==b?(x=()=>i.store.registerSeries({dataKey:a,label:o??a,seriesSlot:s,color:c,mark:t,curve:g,markers:_,connectNulls:v,shape:p,texture:b}),S=[i.store,a,o,s,c,t,g,_,v,p,b],r[0]=c,r[1]=v,r[2]=i.store,r[3]=g,r[4]=a,r[5]=o,r[6]=t,r[7]=_,r[8]=s,r[9]=p,r[10]=b,r[11]=x,r[12]=S):(x=r[11],S=r[12]),h(x,S),null},xr=(e,t)=>{let n=u(4),r=or(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]),h(a,o),null},Sr=(e,t)=>{let n=u(5),r=or(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]),h(o,s),null},Cr=(e,t)=>{let n=u(5),r=or(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]),h(o,s),null},wr=(e,t)=>{let n=u(7),r=or(e),i=m(),{y:a,label:o,color:s}=t,c,l;return n[0]!==s||n[1]!==r.store||n[2]!==i||n[3]!==o||n[4]!==a?(c=()=>r.store.registerReferenceLine(i,{y:a,label:o,color:s}),l=[r.store,i,a,o,s],n[0]=s,n[1]=r.store,n[2]=i,n[3]=o,n[4]=a,n[5]=c,n[6]=l):(c=n[5],l=n[6]),h(c,l),null},Tr=(e,t)=>{let n=u(16),r=or(e),i,a,o,s,c,l;n[0]===t?(i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6]):({labelFormat:s,valueFormat:l,indicator:c,footer:o,children:i,...a}=t,n[0]=t,n[1]=i,n[2]=a,n[3]=o,n[4]=s,n[5]=c,n[6]=l);let d=c===void 0?`line`:c,f=pr(a),p,m;return n[7]!==i||n[8]!==r.store||n[9]!==o||n[10]!==d||n[11]!==s||n[12]!==f||n[13]!==l?(p=()=>r.store.registerTooltip({labelFormat:s,valueFormat:l,indicator:d,footer:o,children:i,divProps:f}),m=[r.store,s,l,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]=l,n[14]=p,n[15]=m):(p=n[14],m=n[15]),h(p,m),null},Er=(e,t,n)=>e==null?`—`:n==null?W(e):n(e,t),Dr=e=>{let i=u(26),{slotName:a,store:o,tooltipRef:s,xHasTimeOfDay:c}=e,l=sr(o),d=l.tooltip,f=l.hover,p;i[0]===d?.divProps?p=i[1]:(p=d?.divProps??{},i[0]=d?.divProps,i[1]=p);let m,_,v,y;i[2]===p?(m=i[3],_=i[4],v=i[5],y=i[6]):({className:m,ref:_,style:y,...v}=p,i[2]=p,i[3]=m,i[4]=_,i[5]=v,i[6]=y);let b=g(null),S=t(s,b),C,w;i[7]===_?(C=i[8],w=i[9]):(C=()=>{if(_==null)return;let e=n(_),t=e(b.current);return()=>{typeof t==`function`?t():e(null)}},w=[_],i[7]=_,i[8]=C,i[9]=w),h(C,w);let T=`${a}-tooltip`,E;i[10]===m?E=i[11]:(E=r(`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`,m),i[10]=m,i[11]=E);let D;i[12]===y?D=i[13]:(D={opacity:0,...y},i[12]=y,i[13]=D);let O=D,k;i[14]!==d||i[15]!==f||i[16]!==a||i[17]!==c?(k=f!=null&&/* @__PURE__ */ x(Or,{slotName:a,config:d,hover:f,xHasTimeOfDay:c}),i[14]=d,i[15]=f,i[16]=a,i[17]=c,i[18]=k):k=i[18];let A;return i[19]!==S||i[20]!==v||i[21]!==T||i[22]!==E||i[23]!==O||i[24]!==k?(A=/* @__PURE__ */ x(`div`,{"data-slot":T,ref:S,className:E,style:O,...v,children:k}),i[19]=S,i[20]=v,i[21]=T,i[22]=E,i[23]=O,i[24]=k,i[25]=A):A=i[25],A},Or=e=>{let t=u(31),{slotName:n,config:r,hover:i,xHasTimeOfDay:a}=e;if(r?.children!=null){let e=`${n}-tooltip-label`,a;t[0]!==r||t[1]!==i?(a=r.children(i),t[0]=r,t[1]=i,t[2]=a):a=t[2];let o;return t[3]!==e||t[4]!==a?(o=/* @__PURE__ */ x(`div`,{"data-slot":e,className:`contents`,children:a}),t[3]=e,t[4]=a,t[5]=o):o=t[5],o}let o=r?.footer,s;t[6]!==r||t[7]!==i.xValue||t[8]!==a?(s=r?.labelFormat==null?de(i.xValue,{datasetHasTimeOfDay:a}):r.labelFormat(i.xValue),t[6]=r,t[7]=i.xValue,t[8]=a,t[9]=s):s=t[9];let c;t[10]===s?c=t[11]:(c=/* @__PURE__ */ x(`div`,{className:`text-muted font-medium`,children:s}),t[10]=s,t[11]=c);let l;if(t[12]!==r?.indicator||t[13]!==r?.valueFormat||t[14]!==i.points){let e;t[16]!==r?.indicator||t[17]!==r?.valueFormat?(e=e=>/* @__PURE__ */ S(`div`,{className:`flex items-center gap-1.5`,children:[r?.indicator!==`none`&&/* @__PURE__ */ x(`span`,{"aria-hidden":!0,className:`h-2.5 w-0.5 shrink-0 rounded-full`,style:{backgroundColor:e.color}}),/* @__PURE__ */ x(`span`,{className:`text-muted`,children:e.label}),/* @__PURE__ */ x(`span`,{className:`text-strong ml-auto pl-3 font-medium tabular-nums`,children:Er(e.value,e.dataKey,r?.valueFormat)})]},e.dataKey),t[16]=r?.indicator,t[17]=r?.valueFormat,t[18]=e):e=t[18],l=i.points.map(e),t[12]=r?.indicator,t[13]=r?.valueFormat,t[14]=i.points,t[15]=l}else l=t[15];let d;t[19]===l?d=t[20]:(d=/* @__PURE__ */ x(`div`,{className:`mt-1 grid gap-1`,children:l}),t[19]=l,t[20]=d);let f;t[21]===i.zValue?f=t[22]:(f=i.zValue!==void 0&&/* @__PURE__ */ S(`div`,{className:`mt-1 flex items-center gap-1.5`,children:[/* @__PURE__ */ x(`span`,{className:`text-muted`,children:`z`}),/* @__PURE__ */ x(`span`,{className:`text-strong ml-auto pl-3 font-medium tabular-nums`,children:i.zValue==null?`—`:W(i.zValue)})]}),t[21]=i.zValue,t[22]=f);let p;t[23]!==o||t[24]!==i?(p=o!=null&&/* @__PURE__ */ x(`div`,{className:`text-muted mt-1`,children:typeof o==`function`?o(i):o}),t[23]=o,t[24]=i,t[25]=p):p=t[25];let m;return t[26]!==c||t[27]!==d||t[28]!==f||t[29]!==p?(m=/* @__PURE__ */ S(b,{children:[c,d,f,p]}),t[26]=c,t[27]=d,t[28]=f,t[29]=p,t[30]=m):m=t[30],m},kr=(e,t,n=3)=>`repeating-linear-gradient(${e}, ${t} 0, ${t} 1px, transparent 1px, transparent ${n}px)`,Ar=`forced-color-adjust-none [print-color-adjust:exact] [-webkit-print-color-adjust:exact]`,jr={hatch:({ink:e})=>({backgroundImage:kr(`135deg`,e)}),"hatch-reverse":({ink:e})=>({backgroundImage:kr(`45deg`,e)}),crosshatch:({ink:e})=>({backgroundImage:`${kr(`135deg`,e,4)}, ${kr(`45deg`,e,4)}`}),perpendicular:({ink:e,orientation:t})=>({backgroundImage:kr(t===`horizontal`?`90deg`:`0deg`,e)}),parallel:({ink:e,orientation:t})=>({backgroundImage:kr(t===`horizontal`?`0deg`:`90deg`,e)}),grid:({ink:e})=>({backgroundImage:`${kr(`0deg`,e,4)}, ${kr(`90deg`,e,4)}`}),dots:({ink:e})=>({backgroundImage:`radial-gradient(circle at 1px 1px, ${e} 0.75px, transparent 0.8px)`,backgroundSize:`3px 3px`})},Mr=(e,t,n)=>e===`solid`?{}:jr[e]({ink:Ge(t),orientation:n}),Nr=e=>{let t=u(31),{series:n,orientation:i}=e;if(n.mark===`bar`){let e=n.texture,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=r(`size-2 shrink-0 rounded-[2px]`,Ar),t[0]=a):a=t[0];let o=n.color,s;t[1]!==i||t[2]!==n.color||t[3]!==n.texture?(s=Mr(n.texture,n.color,i),t[1]=i,t[2]=n.color,t[3]=n.texture,t[4]=s):s=t[4];let c;t[5]!==n.color||t[6]!==s?(c={backgroundColor:o,...s},t[5]=n.color,t[6]=s,t[7]=c):c=t[7];let l;return t[8]!==n.texture||t[9]!==c?(l=/* @__PURE__ */ x(`span`,{"aria-hidden":!0,"data-texture":e,className:a,style:c}),t[8]=n.texture,t[9]=c,t[10]=l):l=t[10],l}if(n.mark===`line`){let e;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=r(`absolute inset-x-0 top-1/2 h-0.5 -translate-y-1/2 rounded-full`,Ar),t[11]=e):e=t[11];let i;t[12]===n.color?i=t[13]:(i=/* @__PURE__ */ x(`span`,{className:e,style:{backgroundColor:n.color}}),t[12]=n.color,t[13]=i);let a=n.shape,o;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(o=r(`relative size-2`,Ar),t[14]=o):o=t[14];let s=Tn[n.shape],c;t[15]!==n.color||t[16]!==s?(c={backgroundColor:n.color,clipPath:s},t[15]=n.color,t[16]=s,t[17]=c):c=t[17];let l;t[18]!==n.shape||t[19]!==c?(l=/* @__PURE__ */ x(`span`,{"data-shape":a,className:o,style:c}),t[18]=n.shape,t[19]=c,t[20]=l):l=t[20];let u;return t[21]!==i||t[22]!==l?(u=/* @__PURE__ */ S(`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=n.shape,o;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(o=r(`size-2 shrink-0`,Ar),t[24]=o):o=t[24];let s=Tn[n.shape],c;t[25]!==n.color||t[26]!==s?(c={backgroundColor:n.color,clipPath:s},t[25]=n.color,t[26]=s,t[27]=c):c=t[27];let l;return t[28]!==n.shape||t[29]!==c?(l=/* @__PURE__ */ x(`span`,{"aria-hidden":!0,"data-shape":a,className:o,style:c}),t[28]=n.shape,t[29]=c,t[30]=l):l=t[30],l},Pr=e=>{let n=u(27),i,a,o,s,c,l;n[0]===e?(i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6]):({partName:o,slotName:l,className:a,children:i,ref:c,...s}=e,n[0]=e,n[1]=i,n[2]=a,n[3]=o,n[4]=s,n[5]=c,n[6]=l);let d=or(o),f=cr(d.store),m=dr(d.store),h=g(null),v=t(h,c),[y,b]=_(!1),C;n[7]===f.length?C=n[8]:(C=()=>{let e=h.current;if(!(e==null||f.length<2))return st(e,()=>{b(e.scrollHeight>e.clientHeight)})},n[7]=f.length,n[8]=C);let w;if(n[9]===f?w=n[10]:(w=[f],n[9]=f,n[10]=w),p(C,w),f.length<2)return null;let T=`${l}-legend`,E;n[11]===a?E=n[12]:(E=r(`text-muted focus-visible:ring-focus-accent flex max-h-16 shrink-0 flex-wrap items-center gap-x-4 gap-y-1 overflow-y-auto rounded-sm pt-3 text-xs outline-none focus-visible:ring-2`,a),n[11]=a,n[12]=E);let D;n[13]===y?D=n[14]:(D=y&&{role:`group`,"aria-label":`Legend`,tabIndex:0},n[13]=y,n[14]=D);let O;n[15]!==i||n[16]!==m||n[17]!==f||n[18]!==l?(O=i==null?f.map(e=>/* @__PURE__ */ S(`div`,{className:`flex items-center gap-1.5`,children:[/* @__PURE__ */ x(Nr,{series:e,orientation:m}),e.label]},e.dataKey)):/* @__PURE__ */ x(`div`,{"data-slot":`${l}-legend-label`,className:`contents`,children:i(f)}),n[15]=i,n[16]=m,n[17]=f,n[18]=l,n[19]=O):O=n[19];let k;return n[20]!==v||n[21]!==s||n[22]!==T||n[23]!==E||n[24]!==D||n[25]!==O?(k=/* @__PURE__ */ x(`div`,{ref:v,"data-slot":T,className:E,...D,...s,children:O}),n[20]=v,n[21]=s,n[22]=T,n[23]=E,n[24]=D,n[25]=O,n[26]=k):k=n[26],k},Fr=e=>{let t=u(32),n,r,i,d,f,m,h,v;t[0]===e?(n=t[1],r=t[2],i=t[3],d=t[4],f=t[5],m=t[6],h=t[7],v=t[8]):({partName:d,slotName:h,label:v,onCopy:r,onCopyError:i,onClick:n,ref:m,...f}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=d,t[5]=f,t[6]=m,t[7]=h,t[8]=v);let y=v===void 0?`Copy data as Markdown`:v,T=or(d),E=s(),[D,O]=_(``),k=D!==``,A=g(!1),j=g(void 0),M,N;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(M=()=>()=>{j.current!=null&&clearTimeout(j.current)},N=[],t[9]=M,t[10]=N):(M=t[9],N=t[10]),p(M,N);let ee=`${h}-copy-button`,P=k?`check`:`copy`,te;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(te={check:/* @__PURE__ */ x(C,{}),copy:/* @__PURE__ */ x(w,{})},t[11]=te):te=t[11];let F;t[12]===P?F=t[13]:(F=/* @__PURE__ */ x(a,{active:P,icons:te}),t[12]=P,t[13]=F);let I;t[14]!==T||t[15]!==E||t[16]!==n||t[17]!==r||t[18]!==i?(I=async e=>{try{if(n?.(e),e.defaultPrevented){j.current!=null&&(clearTimeout(j.current),j.current=void 0),O(``);return}let{data:t,xKey:i,zKey:a}=T.dataRef.current,o=In({data:t,xKey:i,zKey:a,series:T.store.getSnapshot().series});await E(o),r?.(o),O(c(`Copied`,A)),j.current!=null&&clearTimeout(j.current),j.current=setTimeout(()=>{O(``)},2e3)}catch(e){i?.(e)}},t[14]=T,t[15]=E,t[16]=n,t[17]=r,t[18]=i,t[19]=I):I=t[19];let L;t[20]!==y||t[21]!==f||t[22]!==m||t[23]!==ee||t[24]!==F||t[25]!==I?(L=/* @__PURE__ */ x(o,{type:`button`,appearance:`ghost`,intent:`neutral`,size:`sm`,"data-slot":ee,label:y,icon:F,ref:m,onClick:I,...f}),t[20]=y,t[21]=f,t[22]=m,t[23]=ee,t[24]=F,t[25]=I,t[26]=L):L=t[26];let R;t[27]===D?R=t[28]:(R=/* @__PURE__ */ x(l,{children:D}),t[27]=D,t[28]=R);let z;return t[29]!==R||t[30]!==L?(z=/* @__PURE__ */ S(b,{children:[L,R]}),t[29]=R,t[30]=L,t[31]=z):z=t[31],z},Ir=t=>{let n=u(17),{id:r,kind:i,slotName:a,seriesRef:o,summary:s,instructions:c}=t,l=e(),d;n[0]!==l||n[1]!==i||n[2]!==s?(d=ve({kind:i,summary:s,hydrated:l}),n[0]=l,n[1]=i,n[2]=s,n[3]=d):d=n[3];let f=d,p=`${a}-description`,m;n[4]===f.sentence?m=n[5]:(m=/* @__PURE__ */ x(`span`,{children:f.sentence}),n[4]=f.sentence,n[5]=m);let h;n[6]===o?h=n[7]:(h=/* @__PURE__ */ x(`span`,{ref:o}),n[6]=o,n[7]=h);let g;n[8]!==c||n[9]!==f.instructions?(g=c&&/* @__PURE__ */ x(`span`,{children:f.instructions}),n[8]=c,n[9]=f.instructions,n[10]=g):g=n[10];let _;return n[11]!==r||n[12]!==p||n[13]!==m||n[14]!==h||n[15]!==g?(_=/* @__PURE__ */ S(`span`,{id:r,"data-slot":p,className:`sr-only`,children:[m,h,g]}),n[11]=r,n[12]=p,n[13]=m,n[14]=h,n[15]=g,n[16]=_):_=n[16],_},Lr=e=>{let t=u(6),{store:n,xHasTimeOfDay:r}=e,i=lr(n),[a,o]=_(``);i==null&&a!==``&&o(``);let s,c;t[0]!==i||t[1]!==r?(s=()=>{if(i==null)return;let e=i.points.map(Yr).join(`, `),t=i.zValue===void 0?``:`, z: ${i.zValue==null?`no data`:W(i.zValue)}`,n=setTimeout(()=>{o(`${de(i.xValue,{datasetHasTimeOfDay:r})}. ${e}${t}`)},120);return()=>clearTimeout(n)},c=[i,r],t[0]=i,t[1]=r,t[2]=s,t[3]=c):(s=t[2],c=t[3]),p(s,c);let l;return t[4]===a?l=t[5]:(l=/* @__PURE__ */ x(`span`,{role:`status`,"aria-live":`polite`,className:`sr-only`,children:a}),t[4]=a,t[5]=l),l};function Rr(){return()=>{}}const zr=(e,t)=>{let n=u(2),r;n[0]===t?r=n[1]:(r=()=>Vr(t),n[0]=t,n[1]=r);let i=v(Rr,r,Xr);return e??i},Br=`[data-slot$="-chart-data-table"]`;function Vr(e){if(e!=null)return e.split(/\s+/).map(e=>Hr(document.getElementById(e))).filter(Boolean).join(` `)||void 0}function Hr(e){if(e==null)return``;if(e.querySelector(Br)==null)return e.textContent?.trim()??``;let t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,{acceptNode:e=>e instanceof Element?e.matches(Br)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT}),n=``;for(let e=t.nextNode();e!=null;e=t.nextNode())n+=e.textContent??``;return n.trim()}const Ur=e=>{let t=u(39),{data:n,label:r,labelledBy:i,slotName:a,store:o,xHasTimeOfDay:s,xKey:c,zKey:l}=e,d=cr(o),f=zr(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]!==c||t[6]!==l){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=/* @__PURE__ */ x(`caption`,{children:r}),t[12]=r,t[13]=m);let i;t[14]===c?i=t[15]:(i=/* @__PURE__ */ x(`th`,{scope:`col`,children:c}),t[14]=c,t[15]=i);let o;t[16]===d?o=t[17]:(o=d.map(Zr),t[16]=d,t[17]=o);let u;t[18]===l?u=t[19]:(u=l!=null&&/* @__PURE__ */ x(`th`,{scope:`col`,children:l}),t[18]=l,t[19]=u),t[20]!==i||t[21]!==o||t[22]!==u?(h=/* @__PURE__ */ x(`thead`,{children:/* @__PURE__ */ S(`tr`,{children:[i,o,u]})}),t[20]=i,t[21]=o,t[22]=u,t[23]=h):h=t[23];let v;t[24]!==d||t[25]!==s||t[26]!==c||t[27]!==l?(v=(e,t)=>{let n=j(e,c),r=n instanceof Date&&!Number.isNaN(n.getTime()),i=typeof n==`string`||typeof n==`number`||n instanceof Date?de(n,{datasetHasTimeOfDay:s}):String(n);return/* @__PURE__ */ S(`tr`,{children:[/* @__PURE__ */ x(`th`,{scope:`row`,"data-value":typeof n==`number`&&Number.isFinite(n)?n:void 0,children:r?/* @__PURE__ */ x(`time`,{dateTime:n.toISOString(),children:i}):i}),d.map(t=>{let n=j(e,t.dataKey),r=typeof n==`number`&&Number.isFinite(n);return/* @__PURE__ */ x(`td`,{"data-value":r?n:void 0,children:r?W(n):`—`},t.dataKey)}),l!=null&&(()=>{let t=j(e,l),n=typeof t==`number`&&Number.isFinite(t);return/* @__PURE__ */ x(`td`,{"data-value":n?t:void 0,children:n?W(t):`—`})})()]},t)},t[24]=d,t[25]=s,t[26]=c,t[27]=l,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]=c,t[6]=l,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=/* @__PURE__ */ x(`tbody`,{children:p}),t[29]=p,t[30]=v);let y;t[31]!==m||t[32]!==h||t[33]!==v?(y=/* @__PURE__ */ S(`table`,{children:[m,h,v]}),t[31]=m,t[32]=h,t[33]=v,t[34]=y):y=t[34];let b;return t[35]!==g||t[36]!==_||t[37]!==y?(b=/* @__PURE__ */ x(`div`,{className:g,"data-slot":_,children:y}),t[35]=g,t[36]=_,t[37]=y,t[38]=b):b=t[38],b};function Wr(){return new Hn}function Gr(){return!1}function Kr(){}function qr(e){return e.label}function Jr(e){return e.dataKey}function Yr(e){return`${e.label}: ${e.value==null?`no data`:W(e.value)}`}function Xr(){}function Zr(e){return/* @__PURE__ */ x(`th`,{scope:`col`,children:e.label},e.dataKey)}export{wr as a,Sr as c,xr as i,Cr as l,Pr as n,br as o,yr as r,Tr as s,Fr as t};
@@ -356,6 +356,10 @@ type ChartAccessibilityProps<TMode extends ChartMode = ChartMode> = {
356
356
  * `className` (`[--color-chart-decorative:var(--color-neutral-100)]`) and
357
357
  * re-measure the message against the new value.
358
358
  *
359
+ * A decorative chart sets `aria-hidden` on the Root, so assistive technology
360
+ * does not read its children either. Render an empty-state message as a
361
+ * sibling of the Root, not as a child.
362
+ *
359
363
  * @default "interactive"
360
364
  *
361
365
  * @example
@@ -421,6 +425,11 @@ type ChartAccessibilityProps<TMode extends ChartMode = ChartMode> = {
421
425
  * erase the `mode` discriminant.
422
426
  */
423
427
  type ChartRootBaseProps = Omit<ComponentProps<"div">, "aria-label" | "aria-labelledby"> & WithDataSlot & {
428
+ /**
429
+ * Classes for the Root. The Root is `aspect-video` by default. To size it
430
+ * another way, set `aspect-auto` and a height: `className="aspect-auto h-52"`.
431
+ */
432
+ className?: string;
424
433
  /** Override the automatic y domain. */
425
434
  yDomain?: YDomain;
426
435
  /** Stack the series in registration order, from the baseline out (bar/area charts). */
@@ -492,6 +501,11 @@ type TooltipPrimitiveProps = Omit<ComponentProps<"div">, "children"> & {
492
501
  children?: (snapshot: HoverSnapshot) => ReactNode;
493
502
  };
494
503
  type LegendPrimitiveProps = Omit<ComponentProps<"div">, "children"> & {
504
+ /**
505
+ * Classes for the legend. The legend wraps its items and does not shrink.
506
+ * Past `max-h-16` it scrolls; set another `max-h-*` to change the bound.
507
+ */
508
+ className?: string;
495
509
  /** Replace the default legend items; receives the registered series. */
496
510
  children?: (series: SeriesMeta[]) => ReactNode;
497
511
  };
@@ -1 +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"./data-slot-EM6s2WEU.js";import{t as r}from"./clsx-DUGZgXfJ.js";import{a as i,r as a}from"./field-CPvjazWN.js";import{c as o}from"react/compiler-runtime";import{useRef as s,useState as c}from"react";import{jsx as l}from"react/jsx-runtime";const u=e=>e===`indeterminate`,d=d=>{let f=o(41),p,m,h,g,_,v,y,b,x,S,C;f[0]===d?(p=f[1],m=f[2],h=f[3],g=f[4],_=f[5],v=f[6],y=f[7],b=f[8],x=f[9],S=f[10],C=f[11]):({"data-slot":v,"aria-invalid":p,className:_,checked:m,defaultChecked:h,defaultValue:C,onClick:y,readOnly:x,ref:S,validation:g,...b}=d,f[0]=d,f[1]=p,f[2]=m,f[3]=h,f[4]=g,f[5]=_,f[6]=v,f[7]=y,f[8]=b,f[9]=x,f[10]=S,f[11]=C);let w=C===void 0?`on`:C,T=s(null),E=t(T,S),[D]=c(h),O=i(),k=g??O,A;f[12]!==p||f[13]!==k?(A=a({"aria-invalid":p,validation:k}),f[12]=p,f[13]=k,f[14]=A):A=f[14];let{ariaInvalid:j,validation:M}=A,N=m??D,P,F;f[15]===N?(P=f[16],F=f[17]):(P=()=>{T.current&&(T.current.indeterminate=u(N))},F=[N],f[15]=N,f[16]=P,f[17]=F),e(P,F);let I;f[18]!==m||f[19]!==D?(I=m==null?{defaultChecked:u(D)?void 0:D}:{checked:!u(m)&&m},f[18]=m,f[19]=D,f[20]=I):I=f[20];let L=I,R=u(m)?`mixed`:m,z=x||void 0,B;f[21]===v?B=f[22]:(B=n(v,`checkbox`),f[21]=v,f[22]=B);let V;f[23]===_?V=f[24]:(V=r(`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`,_),f[23]=_,f[24]=V);let H=M||void 0,U;f[25]!==y||f[26]!==x?(U=e=>{x?e.preventDefault():y?.(e)},f[25]=y,f[26]=x,f[27]=U):U=f[27];let W;return f[28]!==j||f[29]!==L||f[30]!==E||f[31]!==w||f[32]!==b||f[33]!==x||f[34]!==V||f[35]!==H||f[36]!==U||f[37]!==R||f[38]!==z||f[39]!==B?(W=/* @__PURE__ */ l(`input`,{"aria-checked":R,"aria-invalid":j,"aria-readonly":z,"data-slot":B,className:V,...L,"data-validation":H,defaultValue:w,onClick:U,readOnly:x,ref:E,type:`checkbox`,...b}),f[28]=j,f[29]=L,f[30]=E,f[31]=w,f[32]=b,f[33]=x,f[34]=V,f[35]=H,f[36]=U,f[37]=R,f[38]=z,f[39]=B,f[40]=W):W=f[40],W};function f({allSelected:e,someSelected:t}){return e?!0:t?`indeterminate`:!1}export{f as n,d as t};
1
+ import{t as e}from"./use-isomorphic-layout-effect-CLSmHzo4.js";import{n as t}from"./compose-refs-sFdxsL7k.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{t as r}from"./clsx-DUGZgXfJ.js";import{a as i,r as a}from"./field-CPvjazWN.js";import{c as o}from"react/compiler-runtime";import{useRef as s,useState as c}from"react";import{jsx as l}from"react/jsx-runtime";const u=e=>e===`indeterminate`,d=d=>{let f=o(41),p,m,h,g,_,v,y,b,x,S,C;f[0]===d?(p=f[1],m=f[2],h=f[3],g=f[4],_=f[5],v=f[6],y=f[7],b=f[8],x=f[9],S=f[10],C=f[11]):({"data-slot":v,"aria-invalid":p,className:_,checked:m,defaultChecked:h,defaultValue:C,onClick:y,readOnly:x,ref:S,validation:g,...b}=d,f[0]=d,f[1]=p,f[2]=m,f[3]=h,f[4]=g,f[5]=_,f[6]=v,f[7]=y,f[8]=b,f[9]=x,f[10]=S,f[11]=C);let w=C===void 0?`on`:C,T=s(null),E=t(T,S),[D]=c(h),O=i(),k=g??O,A;f[12]!==p||f[13]!==k?(A=a({"aria-invalid":p,validation:k}),f[12]=p,f[13]=k,f[14]=A):A=f[14];let{ariaInvalid:j,validation:M}=A,N=m??D,P,F;f[15]===N?(P=f[16],F=f[17]):(P=()=>{T.current&&(T.current.indeterminate=u(N))},F=[N],f[15]=N,f[16]=P,f[17]=F),e(P,F);let I;f[18]!==m||f[19]!==D?(I=m==null?{defaultChecked:u(D)?void 0:D}:{checked:!u(m)&&m},f[18]=m,f[19]=D,f[20]=I):I=f[20];let L=I,R=u(m)?`mixed`:m,z=x||void 0,B;f[21]===v?B=f[22]:(B=n(v,`checkbox`),f[21]=v,f[22]=B);let V;f[23]===_?V=f[24]:(V=r(`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`,_),f[23]=_,f[24]=V);let H=M||void 0,U;f[25]!==y||f[26]!==x?(U=e=>{x?e.preventDefault():y?.(e)},f[25]=y,f[26]=x,f[27]=U):U=f[27];let W;return f[28]!==j||f[29]!==L||f[30]!==E||f[31]!==w||f[32]!==b||f[33]!==x||f[34]!==V||f[35]!==H||f[36]!==U||f[37]!==R||f[38]!==z||f[39]!==B?(W=/* @__PURE__ */ l(`input`,{"aria-checked":R,"aria-invalid":j,"aria-readonly":z,"data-slot":B,className:V,...L,"data-validation":H,defaultValue:w,onClick:U,readOnly:x,ref:E,type:`checkbox`,...b}),f[28]=j,f[29]=L,f[30]=E,f[31]=w,f[32]=b,f[33]=x,f[34]=V,f[35]=H,f[36]=U,f[37]=R,f[38]=z,f[39]=B,f[40]=W):W=f[40],W};function f({allSelected:e,someSelected:t}){return e?!0:t?`indeterminate`:!1}export{f as n,d as t};
package/dist/checkbox.js CHANGED
@@ -1 +1 @@
1
- export{t as Checkbox,n as selectAllChecked}from"./checkbox-BpW9TmW6.js";
1
+ export{t as Checkbox,n as selectAllChecked}from"./checkbox-DmSQXs26.js";
@@ -1 +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"./interactive-target-BXScNeOr.js";import{t as o}from"./field-Bihblt8U.js";import{t as s}from"./label-nHqqYS7e.js";import{t as c}from"./radio-group-HDVxTNPi.js";import{c as l}from"react/compiler-runtime";import{cloneElement as u,createContext as d,isValidElement as f,useContext as p,useId as m,useRef as h}from"react";import g from"tiny-invariant";import{jsx as _}from"react/jsx-runtime";const v=d(null);function y(e){let t=p(v);return g(t,`Choice.${e} must be rendered inside Choice.Root.`),t}const b=e=>{let t=l(40),i,a,s,c,u,d,f,g,y,b,x;t[0]===e?(i=t[1],a=t[2],s=t[3],c=t[4],u=t[5],d=t[6],f=t[7],g=t[8],y=t[9],b=t[10],x=t[11]):({"data-slot":d,"aria-describedby":i,"aria-errormessage":a,"aria-invalid":s,children:c,className:u,disabled:x,id:f,name:g,ref:b,...y}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=s,t[4]=c,t[5]=u,t[6]=d,t[7]=f,t[8]=g,t[9]=y,t[10]=b,t[11]=x);let S=x!==void 0&&x,C=p(o),w=C?.id,T=C?.name,E=C?.[`aria-describedby`],D=C?.[`aria-invalid`],O=C?.[`aria-errormessage`],k=m(),A=m(),j=h(null),M=w??f??k,N=E??i,P;t[12]!==A||t[13]!==N?(P=[N,A].filter(Boolean).join(` `)||void 0,t[12]=A,t[13]=N,t[14]=P):P=t[14];let F=P,I=T??g,L=D??s,R=O??a,z;t[15]!==M||t[16]!==F||t[17]!==S||t[18]!==I||t[19]!==L||t[20]!==R?(z={id:M,name:I,disabled:S,"aria-describedby":F,"aria-invalid":L,"aria-errormessage":R},t[15]=M,t[16]=F,t[17]=S,t[18]=I,t[19]=L,t[20]=R,t[21]=z):z=t[21];let B;t[22]!==M||t[23]!==A||t[24]!==S||t[25]!==z?(B={controlId:M,descriptionId:A,disabled:S,labelRef:j,controlProps:z},t[22]=M,t[23]=A,t[24]=S,t[25]=z,t[26]=B):B=t[26];let V=B,H;t[27]===d?H=t[28]:(H=r(d,`choice`),t[27]=d,t[28]=H);let U;t[29]===u?U=t[30]:(U=n(`flex w-full items-start gap-2`,u),t[29]=u,t[30]=U);let W;t[31]!==c||t[32]!==y||t[33]!==b||t[34]!==H||t[35]!==U?(W=/* @__PURE__ */ _(`div`,{ref:b,"data-slot":H,className:U,...y,children:c}),t[31]=c,t[32]=y,t[33]=b,t[34]=H,t[35]=U,t[36]=W):W=t[36];let G;return t[37]!==V||t[38]!==W?(G=/* @__PURE__ */ _(v.Provider,{value:V,children:W}),t[37]=V,t[38]=W,t[39]=G):G=t[39],G},x=e=>{let t=l(19),i,a,o,s,c;t[0]===e?(i=t[1],a=t[2],o=t[3],s=t[4],c=t[5]):({"data-slot":o,children:i,className:a,ref:c,...s}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=c);let{controlProps:d}=y(`Indicator`),p;t[6]!==i||t[7]!==d?(p=f(i)?u(i,{...d,disabled:d.disabled||i.props.disabled===!0,name:d.name??i.props.name,"aria-invalid":d[`aria-invalid`]??i.props[`aria-invalid`],"aria-errormessage":d[`aria-errormessage`]??i.props[`aria-errormessage`]}):i,t[6]=i,t[7]=d,t[8]=p):p=t[8];let m=p,h;t[9]===o?h=t[10]:(h=r(o,`choice-indicator`),t[9]=o,t[10]=h);let g;t[11]===a?g=t[12]:(g=n(`flex h-lh shrink-0 items-center text-sm`,a),t[11]=a,t[12]=g);let v;return t[13]!==m||t[14]!==s||t[15]!==c||t[16]!==h||t[17]!==g?(v=/* @__PURE__ */ _(`span`,{ref:c,"data-slot":h,className:g,...s,children:m}),t[13]=m,t[14]=s,t[15]=c,t[16]=h,t[17]=g,t[18]=v):v=t[18],v},S=e=>{let t=l(16),a,o,s,c,u;t[0]===e?(a=t[1],o=t[2],s=t[3],c=t[4],u=t[5]):({"data-slot":s,asChild:a,className:o,ref:u,...c}=e,t[0]=e,t[1]=a,t[2]=o,t[3]=s,t[4]=c,t[5]=u);let d=a?i:`div`,f;t[6]===s?f=t[7]:(f=r(s,`choice-content`),t[6]=s,t[7]=f);let p;t[8]===o?p=t[9]:(p=n(`flex min-w-0 flex-1 flex-col gap-0.5`,o),t[8]=o,t[9]=p);let m;return t[10]!==d||t[11]!==c||t[12]!==u||t[13]!==f||t[14]!==p?(m=/* @__PURE__ */ _(d,{ref:u,"data-slot":f,className:p,...c}),t[10]=d,t[11]=c,t[12]=u,t[13]=f,t[14]=p,t[15]=m):m=t[15],m},C=e=>{let i=l(17),a,o,c,u;i[0]===e?(a=i[1],o=i[2],c=i[3],u=i[4]):({"data-slot":o,className:a,ref:u,...c}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=c,i[4]=u);let{controlId:d,disabled:f,labelRef:p}=y(`Label`),m=t(p,u),h;i[5]===o?h=i[6]:(h=r(o,`choice-label`),i[5]=o,i[6]=h);let g=f&&`opacity-50`,v;i[7]!==a||i[8]!==g?(v=n(g,a),i[7]=a,i[8]=g,i[9]=v):v=i[9];let b;return i[10]!==m||i[11]!==d||i[12]!==f||i[13]!==c||i[14]!==h||i[15]!==v?(b=/* @__PURE__ */ _(s,{ref:m,"data-slot":h,className:v,...c,htmlFor:d,disabled:f}),i[10]=m,i[11]=d,i[12]=f,i[13]=c,i[14]=h,i[15]=v,i[16]=b):b=i[16],b},w=t=>{let a=l(23),o,s,u,d,f,h;a[0]===t?(o=a[1],s=a[2],u=a[3],d=a[4],f=a[5],h=a[6]):({"data-slot":u,asChild:o,className:s,id:d,ref:h,...f}=t,a[0]=t,a[1]=o,a[2]=s,a[3]=u,a[4]=d,a[5]=f,a[6]=h);let{disabled:g}=y(`Title`),v=p(c),b=m(),x=d??b,S,C;a[7]!==v||a[8]!==x?(S=()=>v?.registerLabelId(x),C=[v,x],a[7]=v,a[8]=x,a[9]=S,a[10]=C):(S=a[9],C=a[10]),e(S,C);let w=o?i:`p`,T;a[11]===u?T=a[12]:(T=r(u,`choice-title`),a[11]=u,a[12]=T);let E=g&&`opacity-50`,D;a[13]!==s||a[14]!==E?(D=n(`text-strong text-sm font-medium font-sans`,E,s),a[13]=s,a[14]=E,a[15]=D):D=a[15];let O;return a[16]!==w||a[17]!==f||a[18]!==h||a[19]!==T||a[20]!==D||a[21]!==x?(O=/* @__PURE__ */ _(w,{ref:h,"data-slot":T,className:D,...f,id:x}),a[16]=w,a[17]=f,a[18]=h,a[19]=T,a[20]=D,a[21]=x,a[22]=O):O=a[22],O};function T(e){return e.defaultPrevented||a(e.target,e.currentTarget)?!1:e.currentTarget.closest(`label`)==null}const E={Root:b,Indicator:x,Content:S,Label:C,Title:w,Description:t=>{let a=l(28),o,s,u,d,f,m;a[0]===t?(o=a[1],s=a[2],u=a[3],d=a[4],f=a[5],m=a[6]):({"data-slot":u,asChild:o,className:s,onClick:d,ref:m,...f}=t,a[0]=t,a[1]=o,a[2]=s,a[3]=u,a[4]=d,a[5]=f,a[6]=m);let{descriptionId:h,disabled:g,labelRef:v}=y(`Description`),b=p(c),x,S;a[7]!==h||a[8]!==b?(x=()=>b?.registerDescriptionId(h),S=[b,h],a[7]=h,a[8]=b,a[9]=x,a[10]=S):(x=a[9],S=a[10]),e(x,S);let C=o?i:`p`,w;a[11]===u?w=a[12]:(w=r(u,`choice-description`),a[11]=u,a[12]=w);let E=!g&&`[[data-slot~=choice-label]~&]:cursor-pointer`,D=g&&`opacity-50`,O;a[13]!==s||a[14]!==E||a[15]!==D?(O=n(`text-body text-sm leading-4`,E,D,s),a[13]=s,a[14]=E,a[15]=D,a[16]=O):O=a[16];let k;a[17]!==v||a[18]!==d?(k=e=>{d?.(e),T(e)&&(v.current?.click(),e.preventDefault())},a[17]=v,a[18]=d,a[19]=k):k=a[19];let A;return a[20]!==C||a[21]!==h||a[22]!==f||a[23]!==m||a[24]!==w||a[25]!==O||a[26]!==k?(A=/* @__PURE__ */ _(C,{ref:m,"data-slot":w,className:O,onClick:k,...f,id:h}),a[20]=C,a[21]=h,a[22]=f,a[23]=m,a[24]=w,a[25]=O,a[26]=k,a[27]=A):A=a[27],A}};export{E as t};
1
+ import{t as e}from"./use-isomorphic-layout-effect-CLSmHzo4.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"./interactive-target-BXScNeOr.js";import{t as o}from"./field-Bihblt8U.js";import{t as s}from"./label-nHqqYS7e.js";import{t as c}from"./radio-group-HDVxTNPi.js";import{c as l}from"react/compiler-runtime";import{cloneElement as u,createContext as d,isValidElement as f,useContext as p,useId as m,useRef as h}from"react";import g from"tiny-invariant";import{jsx as _}from"react/jsx-runtime";const v=d(null);function y(e){let t=p(v);return g(t,`Choice.${e} must be rendered inside Choice.Root.`),t}const b=e=>{let t=l(40),i,a,s,c,u,d,f,g,y,b,x;t[0]===e?(i=t[1],a=t[2],s=t[3],c=t[4],u=t[5],d=t[6],f=t[7],g=t[8],y=t[9],b=t[10],x=t[11]):({"data-slot":d,"aria-describedby":i,"aria-errormessage":a,"aria-invalid":s,children:c,className:u,disabled:x,id:f,name:g,ref:b,...y}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=s,t[4]=c,t[5]=u,t[6]=d,t[7]=f,t[8]=g,t[9]=y,t[10]=b,t[11]=x);let S=x!==void 0&&x,C=p(o),w=C?.id,T=C?.name,E=C?.[`aria-describedby`],D=C?.[`aria-invalid`],O=C?.[`aria-errormessage`],k=m(),A=m(),j=h(null),M=w??f??k,N=E??i,P;t[12]!==A||t[13]!==N?(P=[N,A].filter(Boolean).join(` `)||void 0,t[12]=A,t[13]=N,t[14]=P):P=t[14];let F=P,I=T??g,L=D??s,R=O??a,z;t[15]!==M||t[16]!==F||t[17]!==S||t[18]!==I||t[19]!==L||t[20]!==R?(z={id:M,name:I,disabled:S,"aria-describedby":F,"aria-invalid":L,"aria-errormessage":R},t[15]=M,t[16]=F,t[17]=S,t[18]=I,t[19]=L,t[20]=R,t[21]=z):z=t[21];let B;t[22]!==M||t[23]!==A||t[24]!==S||t[25]!==z?(B={controlId:M,descriptionId:A,disabled:S,labelRef:j,controlProps:z},t[22]=M,t[23]=A,t[24]=S,t[25]=z,t[26]=B):B=t[26];let V=B,H;t[27]===d?H=t[28]:(H=r(d,`choice`),t[27]=d,t[28]=H);let U;t[29]===u?U=t[30]:(U=n(`flex w-full items-start gap-2`,u),t[29]=u,t[30]=U);let W;t[31]!==c||t[32]!==y||t[33]!==b||t[34]!==H||t[35]!==U?(W=/* @__PURE__ */ _(`div`,{ref:b,"data-slot":H,className:U,...y,children:c}),t[31]=c,t[32]=y,t[33]=b,t[34]=H,t[35]=U,t[36]=W):W=t[36];let G;return t[37]!==V||t[38]!==W?(G=/* @__PURE__ */ _(v.Provider,{value:V,children:W}),t[37]=V,t[38]=W,t[39]=G):G=t[39],G},x=e=>{let t=l(19),i,a,o,s,c;t[0]===e?(i=t[1],a=t[2],o=t[3],s=t[4],c=t[5]):({"data-slot":o,children:i,className:a,ref:c,...s}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=c);let{controlProps:d}=y(`Indicator`),p;t[6]!==i||t[7]!==d?(p=f(i)?u(i,{...d,disabled:d.disabled||i.props.disabled===!0,name:d.name??i.props.name,"aria-invalid":d[`aria-invalid`]??i.props[`aria-invalid`],"aria-errormessage":d[`aria-errormessage`]??i.props[`aria-errormessage`]}):i,t[6]=i,t[7]=d,t[8]=p):p=t[8];let m=p,h;t[9]===o?h=t[10]:(h=r(o,`choice-indicator`),t[9]=o,t[10]=h);let g;t[11]===a?g=t[12]:(g=n(`flex h-lh shrink-0 items-center text-sm`,a),t[11]=a,t[12]=g);let v;return t[13]!==m||t[14]!==s||t[15]!==c||t[16]!==h||t[17]!==g?(v=/* @__PURE__ */ _(`span`,{ref:c,"data-slot":h,className:g,...s,children:m}),t[13]=m,t[14]=s,t[15]=c,t[16]=h,t[17]=g,t[18]=v):v=t[18],v},S=e=>{let t=l(16),a,o,s,c,u;t[0]===e?(a=t[1],o=t[2],s=t[3],c=t[4],u=t[5]):({"data-slot":s,asChild:a,className:o,ref:u,...c}=e,t[0]=e,t[1]=a,t[2]=o,t[3]=s,t[4]=c,t[5]=u);let d=a?i:`div`,f;t[6]===s?f=t[7]:(f=r(s,`choice-content`),t[6]=s,t[7]=f);let p;t[8]===o?p=t[9]:(p=n(`flex min-w-0 flex-1 flex-col gap-0.5`,o),t[8]=o,t[9]=p);let m;return t[10]!==d||t[11]!==c||t[12]!==u||t[13]!==f||t[14]!==p?(m=/* @__PURE__ */ _(d,{ref:u,"data-slot":f,className:p,...c}),t[10]=d,t[11]=c,t[12]=u,t[13]=f,t[14]=p,t[15]=m):m=t[15],m},C=e=>{let i=l(17),a,o,c,u;i[0]===e?(a=i[1],o=i[2],c=i[3],u=i[4]):({"data-slot":o,className:a,ref:u,...c}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=c,i[4]=u);let{controlId:d,disabled:f,labelRef:p}=y(`Label`),m=t(p,u),h;i[5]===o?h=i[6]:(h=r(o,`choice-label`),i[5]=o,i[6]=h);let g=f&&`opacity-50`,v;i[7]!==a||i[8]!==g?(v=n(g,a),i[7]=a,i[8]=g,i[9]=v):v=i[9];let b;return i[10]!==m||i[11]!==d||i[12]!==f||i[13]!==c||i[14]!==h||i[15]!==v?(b=/* @__PURE__ */ _(s,{ref:m,"data-slot":h,className:v,...c,htmlFor:d,disabled:f}),i[10]=m,i[11]=d,i[12]=f,i[13]=c,i[14]=h,i[15]=v,i[16]=b):b=i[16],b},w=t=>{let a=l(23),o,s,u,d,f,h;a[0]===t?(o=a[1],s=a[2],u=a[3],d=a[4],f=a[5],h=a[6]):({"data-slot":u,asChild:o,className:s,id:d,ref:h,...f}=t,a[0]=t,a[1]=o,a[2]=s,a[3]=u,a[4]=d,a[5]=f,a[6]=h);let{disabled:g}=y(`Title`),v=p(c),b=m(),x=d??b,S,C;a[7]!==v||a[8]!==x?(S=()=>v?.registerLabelId(x),C=[v,x],a[7]=v,a[8]=x,a[9]=S,a[10]=C):(S=a[9],C=a[10]),e(S,C);let w=o?i:`p`,T;a[11]===u?T=a[12]:(T=r(u,`choice-title`),a[11]=u,a[12]=T);let E=g&&`opacity-50`,D;a[13]!==s||a[14]!==E?(D=n(`text-strong text-sm font-medium font-sans`,E,s),a[13]=s,a[14]=E,a[15]=D):D=a[15];let O;return a[16]!==w||a[17]!==f||a[18]!==h||a[19]!==T||a[20]!==D||a[21]!==x?(O=/* @__PURE__ */ _(w,{ref:h,"data-slot":T,className:D,...f,id:x}),a[16]=w,a[17]=f,a[18]=h,a[19]=T,a[20]=D,a[21]=x,a[22]=O):O=a[22],O};function T(e){return e.defaultPrevented||a(e.target,e.currentTarget)?!1:e.currentTarget.closest(`label`)==null}const E={Root:b,Indicator:x,Content:S,Label:C,Title:w,Description:t=>{let a=l(28),o,s,u,d,f,m;a[0]===t?(o=a[1],s=a[2],u=a[3],d=a[4],f=a[5],m=a[6]):({"data-slot":u,asChild:o,className:s,onClick:d,ref:m,...f}=t,a[0]=t,a[1]=o,a[2]=s,a[3]=u,a[4]=d,a[5]=f,a[6]=m);let{descriptionId:h,disabled:g,labelRef:v}=y(`Description`),b=p(c),x,S;a[7]!==h||a[8]!==b?(x=()=>b?.registerDescriptionId(h),S=[b,h],a[7]=h,a[8]=b,a[9]=x,a[10]=S):(x=a[9],S=a[10]),e(x,S);let C=o?i:`p`,w;a[11]===u?w=a[12]:(w=r(u,`choice-description`),a[11]=u,a[12]=w);let E=!g&&`[[data-slot~=choice-label]~&]:cursor-pointer`,D=g&&`opacity-50`,O;a[13]!==s||a[14]!==E||a[15]!==D?(O=n(`text-body text-sm leading-4`,E,D,s),a[13]=s,a[14]=E,a[15]=D,a[16]=O):O=a[16];let k;a[17]!==v||a[18]!==d?(k=e=>{d?.(e),T(e)&&(v.current?.click(),e.preventDefault())},a[17]=v,a[18]=d,a[19]=k):k=a[19];let A;return a[20]!==C||a[21]!==h||a[22]!==f||a[23]!==m||a[24]!==w||a[25]!==O||a[26]!==k?(A=/* @__PURE__ */ _(C,{ref:m,"data-slot":w,className:O,onClick:k,...f,id:h}),a[20]=C,a[21]=h,a[22]=f,a[23]=m,a[24]=w,a[25]=O,a[26]=k,a[27]=A):A=a[27],A}};export{E as t};
package/dist/choice.js CHANGED
@@ -1 +1 @@
1
- export{t as Choice}from"./choice-U6_8mOOO.js";
1
+ export{t as Choice}from"./choice-2Lrv8_nl.js";