@ngrok/mantle 0.93.6 → 0.94.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 (193) hide show
  1. package/dist/accordion.d.ts +13 -1
  2. package/dist/accordion.js +1 -1
  3. package/dist/agent.json +1181 -36
  4. package/dist/alert-CH99Rw-R.js +1 -0
  5. package/dist/{alert-BcSBNR3S.d.ts → alert-HffaioZM.d.ts} +31 -21
  6. package/dist/alert-center.d.ts +15 -3
  7. package/dist/alert-center.js +1 -1
  8. package/dist/alert-dialog.d.ts +15 -2
  9. package/dist/alert-dialog.js +1 -1
  10. package/dist/alert.d.ts +6 -1
  11. package/dist/alert.js +1 -1
  12. package/dist/anchor.d.ts +12 -0
  13. package/dist/app-layout.d.ts +16 -1
  14. package/dist/app-layout.js +1 -1
  15. package/dist/area-chart.d.ts +144 -88
  16. package/dist/area-chart.js +1 -1
  17. package/dist/avatar.d.ts +12 -0
  18. package/dist/badge.d.ts +13 -1
  19. package/dist/bar-chart.d.ts +144 -89
  20. package/dist/bar-chart.js +1 -1
  21. package/dist/breadcrumb.d.ts +11 -0
  22. package/dist/breadcrumb.js +1 -1
  23. package/dist/browser-only.d.ts +8 -0
  24. package/dist/{button-Yxyu1XMd.d.ts → button-BGwOPjGV.d.ts} +7 -1
  25. package/dist/{button-B8k98Pby.js → button-BWGUuWnu.js} +1 -1
  26. package/dist/{button-CPsKGDK0.d.ts → button-Cgf2IcEC.d.ts} +8 -1
  27. package/dist/button-Cu9e3SM7.js +1 -0
  28. package/dist/{button-BX-4lYUn.d.ts → button-K0pKc3GN.d.ts} +3 -3
  29. package/dist/button.d.ts +9 -3
  30. package/dist/button.js +1 -1
  31. package/dist/calendar.d.ts +7 -0
  32. package/dist/calendar.js +1 -1
  33. package/dist/card.d.ts +6 -1
  34. package/dist/centered-layout.d.ts +11 -0
  35. package/dist/chart-BO9EwQ60.js +1 -0
  36. package/dist/chart-CE5Uaqz9.js +1 -0
  37. package/dist/chart-DCTGGlWL.js +1 -0
  38. package/dist/chart-DudCw24t.js +2 -0
  39. package/dist/{chart-BpfbtOUN.d.ts → chart-jitNqimS.d.ts} +99 -103
  40. package/dist/{checkbox-DmSQXs26.js → checkbox-CS504fKk.js} +1 -1
  41. package/dist/checkbox.d.ts +14 -1
  42. package/dist/checkbox.js +1 -1
  43. package/dist/{choice-BLR0_MeB.d.ts → choice-BwfmbepO.d.ts} +7 -1
  44. package/dist/choice-uyYccm0A.js +1 -0
  45. package/dist/choice.d.ts +6 -1
  46. package/dist/choice.js +1 -1
  47. package/dist/code-block.d.ts +13 -2
  48. package/dist/code-block.js +1 -1
  49. package/dist/code-block_highlight-utils.d.ts +5 -0
  50. package/dist/code.d.ts +13 -0
  51. package/dist/color-CHZbU1Ww.js +1 -0
  52. package/dist/color.js +1 -1
  53. package/dist/combobox.d.ts +28 -14
  54. package/dist/combobox.js +1 -1
  55. package/dist/command.d.ts +14 -2
  56. package/dist/command.js +1 -1
  57. package/dist/cx.js +1 -1
  58. package/dist/data-table.d.ts +50 -19
  59. package/dist/data-table.js +1 -1
  60. package/dist/description-list.d.ts +12 -1
  61. package/dist/dialog-B9JAGy_x.d.ts +28 -0
  62. package/dist/{dialog-7TUgiSzX.js → dialog-CsugEt2A.js} +1 -1
  63. package/dist/{dialog-2fRO4ca4.d.ts → dialog-DD5H3EH1.d.ts} +10 -2
  64. package/dist/dialog.d.ts +7 -2
  65. package/dist/dialog.js +1 -1
  66. package/dist/dropdown-menu-DHdgaw4P.js +1 -0
  67. package/dist/{dropdown-menu-CpjRwMWe.d.ts → dropdown-menu-DmDxYPde.d.ts} +34 -26
  68. package/dist/dropdown-menu.d.ts +6 -1
  69. package/dist/dropdown-menu.js +1 -1
  70. package/dist/empty.d.ts +5 -0
  71. package/dist/empty.js +1 -1
  72. package/dist/{field-V_gnkcmN.d.ts → field-BshcNVe_.d.ts} +1 -1
  73. package/dist/field.d.ts +17 -6
  74. package/dist/field.js +1 -1
  75. package/dist/flag.d.ts +8 -0
  76. package/dist/hooks.d.ts +5 -0
  77. package/dist/hooks.js +1 -1
  78. package/dist/hover-card.d.ts +23 -12
  79. package/dist/{icon-ByLVhdYq.d.ts → icon-NYvyyRMG.d.ts} +6 -0
  80. package/dist/icon.d.ts +7 -2
  81. package/dist/icon.js +1 -1
  82. package/dist/{icons-DP3lQw5O.js → icons-4JA-SGfv.js} +1 -1
  83. package/dist/icons.d.ts +13 -1
  84. package/dist/icons.js +1 -1
  85. package/dist/{index-BhfgyurF.d.ts → index-KJ06KK6t.d.ts} +3 -3
  86. package/dist/input-BjCDSOPA.js +1 -0
  87. package/dist/input-DHovzBjS.js +1 -0
  88. package/dist/{input-Dx5owTCc.d.ts → input-q8o5uMhW.d.ts} +11 -1
  89. package/dist/input.d.ts +34 -2
  90. package/dist/input.js +1 -1
  91. package/dist/kbd.d.ts +12 -0
  92. package/dist/{label-nHqqYS7e.js → label-DmDwzPD8.js} +1 -1
  93. package/dist/{label-Dn5CPJUj.d.ts → label-r2sJcSQ4.d.ts} +6 -0
  94. package/dist/label.d.ts +6 -1
  95. package/dist/label.js +1 -1
  96. package/dist/line-chart.d.ts +139 -82
  97. package/dist/line-chart.js +1 -1
  98. package/dist/{list-RFRIQxU2.js → list-CO_yLdln.js} +1 -1
  99. package/dist/list.d.ts +19 -1
  100. package/dist/list.js +1 -1
  101. package/dist/live-region.d.ts +14 -1
  102. package/dist/llms.txt +78 -76
  103. package/dist/main.d.ts +12 -0
  104. package/dist/mantle.css +110 -65
  105. package/dist/media-object.d.ts +12 -0
  106. package/dist/migrations/0014-chart-named-colors.yml +1389 -0
  107. package/dist/migrations/0015-segmented-control.yml +788 -0
  108. package/dist/multi-select.d.ts +15 -2
  109. package/dist/multi-select.js +1 -1
  110. package/dist/otp-input.d.ts +17 -5
  111. package/dist/otp-input.js +1 -1
  112. package/dist/pagination.d.ts +92 -3
  113. package/dist/pagination.js +1 -1
  114. package/dist/popover-BhTFutCz.d.ts +1 -0
  115. package/dist/{popover-BfB2I9G0.d.ts → popover-lwkwWcRW.d.ts} +16 -7
  116. package/dist/popover.d.ts +7 -2
  117. package/dist/progress.d.ts +27 -10
  118. package/dist/progress.js +1 -1
  119. package/dist/qr-code.d.ts +9 -1
  120. package/dist/query.d.ts +2 -2
  121. package/dist/query.js +1 -1
  122. package/dist/radio-group-jj2abc0t.js +1 -0
  123. package/dist/radio-group-sLz5AA9I.d.ts +27 -0
  124. package/dist/radio-group.d.ts +20 -99
  125. package/dist/radio-group.js +1 -1
  126. package/dist/sandbar.d.ts +14 -1
  127. package/dist/sandbar.js +1 -1
  128. package/dist/sandboxed-on-click.d.ts +8 -0
  129. package/dist/scatter-plot.d.ts +126 -64
  130. package/dist/scatter-plot.js +1 -1
  131. package/dist/segmented-control.d.ts +136 -0
  132. package/dist/segmented-control.js +1 -0
  133. package/dist/{select-BkhBxtOT.d.ts → select-BqmpVJJT.d.ts} +29 -21
  134. package/dist/select-C6Su0dU0.js +1 -0
  135. package/dist/select.d.ts +6 -1
  136. package/dist/select.js +1 -1
  137. package/dist/selectable-list.d.ts +13 -2
  138. package/dist/selectable-list.js +1 -1
  139. package/dist/{separator-D9AWEkcJ.d.ts → separator-QfH0ot5K.d.ts} +3 -1
  140. package/dist/separator.d.ts +6 -1
  141. package/dist/{sheet-CSJc_sB4.js → sheet-Bd2LIhzF.js} +1 -1
  142. package/dist/sheet.d.ts +15 -2
  143. package/dist/sheet.js +1 -1
  144. package/dist/sidebar.d.ts +19 -3
  145. package/dist/sidebar.js +1 -1
  146. package/dist/skeleton.d.ts +11 -0
  147. package/dist/skip-to-main-link.d.ts +11 -0
  148. package/dist/skip-to-main-link.js +1 -1
  149. package/dist/slider.d.ts +10 -0
  150. package/dist/{slot-C0OCJjdJ.d.ts → slot-D12N_fZJ.d.ts} +3 -1
  151. package/dist/slot.d.ts +6 -1
  152. package/dist/split-button.d.ts +14 -3
  153. package/dist/split-button.js +1 -1
  154. package/dist/strata.d.ts +13 -0
  155. package/dist/switch.d.ts +13 -1
  156. package/dist/switch.js +1 -1
  157. package/dist/{table-vT6Okwfa.d.ts → table-rWiVWEgB.d.ts} +79 -0
  158. package/dist/table.d.ts +6 -1
  159. package/dist/tabs.d.ts +23 -11
  160. package/dist/tabs.js +1 -1
  161. package/dist/text-area.d.ts +11 -1
  162. package/dist/theme-DdZgLvKH.js +1 -0
  163. package/dist/theme-switcher.d.ts +16 -2
  164. package/dist/theme-switcher.js +1 -1
  165. package/dist/theme.d.ts +12 -0
  166. package/dist/theme.js +1 -1
  167. package/dist/toast.d.ts +14 -1
  168. package/dist/toast.js +1 -1
  169. package/dist/{tooltip-NcLIeBy5.d.ts → tooltip-CpK3XTor.d.ts} +15 -8
  170. package/dist/tooltip.d.ts +6 -1
  171. package/dist/truncated-text.d.ts +27 -13
  172. package/dist/truncated-text.js +1 -1
  173. package/dist/types.d.ts +1 -1
  174. package/dist/types.js +1 -1
  175. package/dist/use-inert-siblings-CNmNuS2h.js +1 -0
  176. package/dist/use-swipe-to-dismiss-i__cTF2v.js +1 -0
  177. package/dist/utils.d.ts +1 -1
  178. package/dist/utils.js +1 -1
  179. package/dist/visually-hidden.d.ts +13 -0
  180. package/dist/well.d.ts +6 -1
  181. package/package.json +7 -7
  182. package/src/components/chart/d3-license.md +25 -0
  183. package/dist/alert-P9lwn25X.js +0 -1
  184. package/dist/button-Dge0D5bl.js +0 -1
  185. package/dist/chart-BpWfQAwf.js +0 -2
  186. package/dist/choice-2Lrv8_nl.js +0 -1
  187. package/dist/dialog-Dp0QGWwo.d.ts +0 -28
  188. package/dist/dropdown-menu-BHBzCDSZ.js +0 -1
  189. package/dist/input-CpQ6jlpI.js +0 -1
  190. package/dist/popover-C96V8SXi.d.ts +0 -1
  191. package/dist/select-CAAYk4Yj.js +0 -1
  192. package/dist/theme-C-glc5Q-.js +0 -1
  193. package/dist/use-swipe-to-dismiss-DceYk1Id.js +0 -1
@@ -1,2 +0,0 @@
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};
@@ -1 +0,0 @@
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};
@@ -1,28 +0,0 @@
1
- import { ComponentProps, ComponentPropsWithoutRef, Ref } from "react";
2
- import { Content, Description, Overlay, Portal } from "@radix-ui/react-dialog";
3
- type DialogPrimitiveContentProps = ComponentProps<typeof Content>;
4
- declare const Root$1: import("react").FC<import("@radix-ui/react-dialog").DialogProps>;
5
- declare const Trigger$1: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
6
- /**
7
- * Mounts dialog layers into the nearest layer container — an enclosing
8
- * overlay's positioner when one is open, else `document.body`. An explicit
9
- * `container` prop wins over both.
10
- */
11
- declare const Portal$1: ({ container, ...props }: ComponentProps<typeof Portal>) => import("react").JSX.Element;
12
- declare const Close$1: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
13
- declare const Overlay$1: (props: ComponentProps<typeof Overlay>) => import("react").JSX.Element;
14
- declare const Content$1: ({ onEscapeKeyDown, onInteractOutside, onPointerDownOutside, ref, ...props }: DialogPrimitiveContentProps) => import("react").JSX.Element;
15
- declare const Title$1: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
16
- /**
17
- * An accessible description for the dialog primitive.
18
- * This is a low-level primitive used by higher-level dialog components.
19
- * Renders as a `div` by default, but can be changed to any other element using the `asChild` prop.
20
- */
21
- declare const Description$1: ({ asChild, children, ref, ...props }: ComponentPropsWithoutRef<typeof Description> & {
22
- ref?: Ref<HTMLDivElement>;
23
- }) => import("react").JSX.Element;
24
- /**
25
- * Type guard to check if the event target is the overlay component
26
- */
27
- declare function isDialogOverlayTarget(target: EventTarget | null): boolean;
28
- export { Portal$1 as a, Trigger$1 as c, Overlay$1 as i, isDialogOverlayTarget as l, Content$1 as n, Root$1 as o, Description$1 as r, Title$1 as s, Close$1 as t };
@@ -1 +0,0 @@
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{i as r}from"./layer-container-kEQiE4zV.js";import{n as i}from"./separator-DfzxVutO.js";import{c as a}from"react/compiler-runtime";import{jsx as o,jsxs as s}from"react/jsx-runtime";import{Slottable as c}from"@radix-ui/react-slot";import{CheckIcon as l}from"@phosphor-icons/react/Check";import{CaretRightIcon as u}from"@phosphor-icons/react/CaretRight";import{CheckboxItem as d,Content as f,Group as p,Item as m,ItemIndicator as h,Label as g,Portal as _,RadioGroup as v,RadioItem as y,Root as b,Sub as x,SubContent as S,SubTrigger as C,Trigger as w}from"@radix-ui/react-dropdown-menu";const T=b,E=e=>{let n=a(8),r,i;n[0]===e?(r=n[1],i=n[2]):({"data-slot":r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let s;n[3]===r?s=n[4]:(s=t(r,`dropdown-menu-trigger`),n[3]=r,n[4]=s);let c;return n[5]!==i||n[6]!==s?(c=/* @__PURE__ */ o(w,{"data-slot":s,...i}),n[5]=i,n[6]=s,n[7]=c):c=n[7],c},D=n=>{let r=a(12),i,s,c;r[0]===n?(i=r[1],s=r[2],c=r[3]):({"data-slot":s,className:i,...c}=n,r[0]=n,r[1]=i,r[2]=s,r[3]=c);let l;r[4]===s?l=r[5]:(l=t(s,`dropdown-menu-group`),r[4]=s,r[5]=l);let u;r[6]===i?u=r[7]:(u=e(`space-y-px`,i),r[6]=i,r[7]=u);let d;return r[8]!==c||r[9]!==l||r[10]!==u?(d=/* @__PURE__ */ o(p,{"data-slot":l,className:u,...c}),r[8]=c,r[9]=l,r[10]=u,r[11]=d):d=r[11],d},O=e=>{let t=a(6),n,i;t[0]===e?(n=t[1],i=t[2]):({container:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let s=r(),c=n??s,l;return t[3]!==i||t[4]!==c?(l=/* @__PURE__ */ o(_,{container:c,...i}),t[3]=i,t[4]=c,t[5]=l):l=t[5],l},k={Root:T,CheckboxItem:r=>{let i=a(19),u,f,p,m,g;i[0]===r?(u=i[1],f=i[2],p=i[3],m=i[4],g=i[5]):({"data-slot":m,className:p,children:f,checked:u,...g}=r,i[0]=r,i[1]=u,i[2]=f,i[3]=p,i[4]=m,i[5]=g);let _;i[6]===m?_=i[7]:(_=t(m,`dropdown-menu-checkbox-item`),i[6]=m,i[7]=_);let v;i[8]===p?v=i[9]:(v=e(`text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded-md py-1.5 pl-2 pr-9 text-sm font-normal outline-hidden`,`data-highlighted:bg-active-menu-item`,`aria-checked:bg-selected-menu-item`,`data-highlighted:aria-checked:bg-active-selected-menu-item!`,`[&>[data-slot=dropdown-menu-checkbox-item-label]>svg]:size-5 [&_svg]:shrink-0`,p),i[8]=p,i[9]=v);let y;i[10]===Symbol.for(`react.memo_cache_sentinel`)?(y=/* @__PURE__ */ o(`span`,{className:`absolute right-2 flex items-center`,children:/* @__PURE__ */ o(h,{children:/* @__PURE__ */ o(n,{svg:/* @__PURE__ */ o(l,{weight:`bold`}),className:`size-4 text-accent-600`})})}),i[10]=y):y=i[10];let b;i[11]===f?b=i[12]:(b=/* @__PURE__ */ o(c,{child:f,children:j}),i[11]=f,i[12]=b);let x;return i[13]!==u||i[14]!==g||i[15]!==_||i[16]!==v||i[17]!==b?(x=/* @__PURE__ */ s(d,{"data-slot":_,className:v,checked:u,...g,children:[y,b]}),i[13]=u,i[14]=g,i[15]=_,i[16]=v,i[17]=b,i[18]=x):x=i[18],x},Content:n=>{let r=a(20),i,s,c,l,u,d;r[0]===n?(i=r[1],s=r[2],c=r[3],l=r[4],u=r[5],d=r[6]):({className:i,"data-slot":s,onClick:c,loop:u,width:d,...l}=n,r[0]=n,r[1]=i,r[2]=s,r[3]=c,r[4]=l,r[5]=u,r[6]=d);let p=u===void 0||u,m;r[7]===s?m=r[8]:(m=t(s,`dropdown-menu-content`),r[7]=s,r[8]=m);let h=d===`trigger`&&`w-(--radix-dropdown-menu-trigger-width)`,g;r[9]!==i||r[10]!==h?(g=e(`scrollbar`,`text-popover-foreground border-popover bg-popover p-1.25 z-50 min-w-32 overflow-hidden rounded-md border shadow-xl outline-hidden space-y-px font-sans`,`data-side-bottom:slide-in-from-top-1 data-side-left:slide-in-from-right-1 data-side-right:slide-in-from-left-1 data-side-top:slide-in-from-bottom-1 data-side-bottom:slide-out-to-top-1 data-side-left:slide-out-to-right-1 data-side-right:slide-out-to-left-1 data-side-top:slide-out-to-bottom-1 duration-200 ease-out-strong data-state-closed:duration-150 motion-reduce:animate-none! data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95`,`my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)-16px)] overflow-auto`,h,i),r[9]=i,r[10]=h,r[11]=g):g=r[11];let _;r[12]===c?_=r[13]:(_=e=>{e.stopPropagation(),c?.(e)},r[12]=c,r[13]=_);let v;return r[14]!==p||r[15]!==l||r[16]!==m||r[17]!==g||r[18]!==_?(v=/* @__PURE__ */ o(O,{children:/* @__PURE__ */ o(f,{"data-slot":m,className:g,loop:p,onClick:_,...l})}),r[14]=p,r[15]=l,r[16]=m,r[17]=g,r[18]=_,r[19]=v):v=r[19],v},Group:D,Item:n=>{let r=a(14),i,s,c,l;r[0]===n?(i=r[1],s=r[2],c=r[3],l=r[4]):({"data-slot":s,className:i,inset:c,...l}=n,r[0]=n,r[1]=i,r[2]=s,r[3]=c,r[4]=l);let u;r[5]===s?u=r[6]:(u=t(s,`dropdown-menu-item`),r[5]=s,r[6]=u);let d=c&&`pl-8`,f;r[7]!==i||r[8]!==d?(f=e(`relative flex cursor-pointer select-none items-center rounded-md px-2 py-1.5 text-strong text-sm font-normal outline-hidden transition-colors`,`data-highlighted:bg-active-menu-item`,`focus:bg-accent focus:text-accent-foreground`,`data-disabled:cursor-default data-disabled:opacity-50`,`[&>svg]:size-5 [&_svg]:shrink-0`,d,i),r[7]=i,r[8]=d,r[9]=f):f=r[9];let p;return r[10]!==l||r[11]!==u||r[12]!==f?(p=/* @__PURE__ */ o(m,{"data-slot":u,className:f,...l}),r[10]=l,r[11]=u,r[12]=f,r[13]=p):p=r[13],p},Label:n=>{let r=a(14),i,s,c,l;r[0]===n?(i=r[1],s=r[2],c=r[3],l=r[4]):({"data-slot":s,className:i,inset:c,...l}=n,r[0]=n,r[1]=i,r[2]=s,r[3]=c,r[4]=l);let u;r[5]===s?u=r[6]:(u=t(s,`dropdown-menu-label`),r[5]=s,r[6]=u);let d=c&&`pl-8`,f;r[7]!==i||r[8]!==d?(f=e(`px-2 py-1.5 text-sm font-medium`,d,i),r[7]=i,r[8]=d,r[9]=f):f=r[9];let p;return r[10]!==l||r[11]!==u||r[12]!==f?(p=/* @__PURE__ */ o(g,{"data-slot":u,className:f,...l}),r[10]=l,r[11]=u,r[12]=f,r[13]=p):p=r[13],p},RadioGroup:n=>{let r=a(12),i,s,c;r[0]===n?(i=r[1],s=r[2],c=r[3]):({"data-slot":s,className:i,...c}=n,r[0]=n,r[1]=i,r[2]=s,r[3]=c);let l;r[4]===s?l=r[5]:(l=t(s,`dropdown-menu-radio-group`),r[4]=s,r[5]=l);let u;r[6]===i?u=r[7]:(u=e(`space-y-px`,i),r[6]=i,r[7]=u);let d;return r[8]!==c||r[9]!==l||r[10]!==u?(d=/* @__PURE__ */ o(v,{"data-slot":l,className:u,...c}),r[8]=c,r[9]=l,r[10]=u,r[11]=d):d=r[11],d},RadioItem:r=>{let i=a(17),u,d,f,p;i[0]===r?(u=i[1],d=i[2],f=i[3],p=i[4]):({"data-slot":f,className:d,children:u,...p}=r,i[0]=r,i[1]=u,i[2]=d,i[3]=f,i[4]=p);let m;i[5]===f?m=i[6]:(m=t(f,`dropdown-menu-radio-item`),i[5]=f,i[6]=m);let g;i[7]===d?g=i[8]:(g=e(`group/dropdown-menu-radio-item`,`text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded-md py-1.5 px-2 text-sm font-normal outline-none`,`data-highlighted:bg-active-menu-item`,`aria-checked:bg-selected-menu-item aria-checked:pr-9`,`data-highlighted:aria-checked:bg-active-selected-menu-item!`,`[&>[data-slot=dropdown-menu-radio-item-label]>svg]:size-5 [&_svg]:shrink-0`,d),i[7]=d,i[8]=g);let _;i[9]===Symbol.for(`react.memo_cache_sentinel`)?(_=/* @__PURE__ */ o(`span`,{className:`absolute right-2 items-center hidden group-aria-checked/dropdown-menu-radio-item:flex`,children:/* @__PURE__ */ o(h,{children:/* @__PURE__ */ o(n,{svg:/* @__PURE__ */ o(l,{weight:`bold`}),className:`size-4 text-accent-600`})})}),i[9]=_):_=i[9];let v;i[10]===u?v=i[11]:(v=/* @__PURE__ */ o(c,{child:u,children:M}),i[10]=u,i[11]=v);let b;return i[12]!==p||i[13]!==m||i[14]!==g||i[15]!==v?(b=/* @__PURE__ */ s(y,{"data-slot":m,className:g,...p,children:[_,v]}),i[12]=p,i[13]=m,i[14]=g,i[15]=v,i[16]=b):b=i[16],b},Separator:n=>{let r=a(12),s,c,l;r[0]===n?(s=r[1],c=r[2],l=r[3]):({"data-slot":c,className:s,...l}=n,r[0]=n,r[1]=s,r[2]=c,r[3]=l);let u;r[4]===c?u=r[5]:(u=t(c,`dropdown-menu-separator`),r[4]=c,r[5]=u);let d;r[6]===s?d=r[7]:(d=e(`-mx-1.25 my-1 w-auto`,s),r[6]=s,r[7]=d);let f;return r[8]!==l||r[9]!==u||r[10]!==d?(f=/* @__PURE__ */ o(i,{"data-slot":u,className:d,...l}),r[8]=l,r[9]=u,r[10]=d,r[11]=f):f=r[11],f},Shortcut:n=>{let r=a(12),i,s,c;r[0]===n?(i=r[1],s=r[2],c=r[3]):({"data-slot":s,className:i,...c}=n,r[0]=n,r[1]=i,r[2]=s,r[3]=c);let l;r[4]===s?l=r[5]:(l=t(s,`dropdown-menu-shortcut`),r[4]=s,r[5]=l);let u;r[6]===i?u=r[7]:(u=e(`ml-auto text-xs tracking-widest opacity-60`,i),r[6]=i,r[7]=u);let d;return r[8]!==c||r[9]!==l||r[10]!==u?(d=/* @__PURE__ */ o(`span`,{"data-slot":l,className:u,...c,translate:`no`}),r[8]=c,r[9]=l,r[10]=u,r[11]=d):d=r[11],d},Sub:x,SubContent:n=>{let r=a(14),i,s,c,l;r[0]===n?(i=r[1],s=r[2],c=r[3],l=r[4]):({"data-slot":s,className:i,loop:l,...c}=n,r[0]=n,r[1]=i,r[2]=s,r[3]=c,r[4]=l);let u=l===void 0||l,d;r[5]===s?d=r[6]:(d=t(s,`dropdown-menu-sub-content`),r[5]=s,r[6]=d);let f;r[7]===i?f=r[8]:(f=e(`scrollbar`,`text-popover-foreground border-popover bg-popover p-1.25 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95 data-side-bottom:slide-in-from-top-1 data-side-left:slide-in-from-right-1 data-side-right:slide-in-from-left-1 data-side-top:slide-in-from-bottom-1 data-side-bottom:slide-out-to-top-1 data-side-left:slide-out-to-right-1 data-side-right:slide-out-to-left-1 data-side-top:slide-out-to-bottom-1 duration-200 ease-out-strong data-state-closed:duration-150 motion-reduce:animate-none! z-50 min-w-32 overflow-hidden rounded-md border shadow-xl space-y-px font-sans`,`my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)-16px)] overflow-auto`,i),r[7]=i,r[8]=f);let p;return r[9]!==u||r[10]!==c||r[11]!==d||r[12]!==f?(p=/* @__PURE__ */ o(O,{children:/* @__PURE__ */ o(S,{"data-slot":d,className:f,loop:u,...c})}),r[9]=u,r[10]=c,r[11]=d,r[12]=f,r[13]=p):p=r[13],p},SubTrigger:r=>{let i=a(19),l,d,f,p,m;i[0]===r?(l=i[1],d=i[2],f=i[3],p=i[4],m=i[5]):({"data-slot":f,className:d,inset:p,children:l,...m}=r,i[0]=r,i[1]=l,i[2]=d,i[3]=f,i[4]=p,i[5]=m);let h;i[6]===f?h=i[7]:(h=t(f,`dropdown-menu-sub-trigger`),i[6]=f,i[7]=h);let g=p&&`pl-8`,_;i[8]!==d||i[9]!==g?(_=e(`focus:bg-accent data-state-open:bg-accent relative flex select-none items-center rounded-md py-1.5 pl-2 pr-9 text-sm outline-hidden`,`data-highlighted:bg-active-menu-item data-state-open:bg-active-menu-item`,`[&>[data-slot=dropdown-menu-sub-trigger-label]>svg]:size-5 [&_svg]:shrink-0`,g,d),i[8]=d,i[9]=g,i[10]=_):_=i[10];let v;i[11]===l?v=i[12]:(v=/* @__PURE__ */ o(c,{child:l,children:A}),i[11]=l,i[12]=v);let y;i[13]===Symbol.for(`react.memo_cache_sentinel`)?(y=/* @__PURE__ */ o(`span`,{className:`absolute right-2 flex items-center`,children:/* @__PURE__ */ o(n,{svg:/* @__PURE__ */ o(u,{weight:`bold`}),className:`size-4`})}),i[13]=y):y=i[13];let b;return i[14]!==m||i[15]!==h||i[16]!==_||i[17]!==v?(b=/* @__PURE__ */ s(C,{"data-slot":h,className:_,...m,children:[v,y]}),i[14]=m,i[15]=h,i[16]=_,i[17]=v,i[18]=b):b=i[18],b},Trigger:E};function A(e){return/* @__PURE__ */ o(`span`,{"data-slot":`dropdown-menu-sub-trigger-label`,className:`contents`,children:e})}function j(e){return/* @__PURE__ */ o(`span`,{"data-slot":`dropdown-menu-checkbox-item-label`,className:`contents`,children:e})}function M(e){return/* @__PURE__ */ o(`span`,{"data-slot":`dropdown-menu-radio-item-label`,className:`contents`,children:e})}export{k as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./compose-refs-sFdxsL7k.js";import{t}from"./cx-CK7o_rVv.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{t as r}from"./icon-kK0c-POG.js";import{t as i}from"./booleanish-BfvnW6vy.js";import{t as a}from"./clsx-DUGZgXfJ.js";import{a as o,r as s}from"./field-CPvjazWN.js";import{c}from"react/compiler-runtime";import{createContext as l,useContext as u,useRef as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{CheckCircleIcon as m}from"@phosphor-icons/react/CheckCircle";import{WarningIcon as h}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as g}from"@phosphor-icons/react/WarningDiamond";const _=e=>{let t=c(17),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({children:n,className:r,ref:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=!!n,s=d(null);if(o){let e;return t[5]!==n||t[6]!==r||t[7]!==i||t[8]!==a?(e=/* @__PURE__ */ f(b,{className:r,forwardedRef:a,innerRef:s,...i,children:n}),t[5]=n,t[6]=r,t[7]=i,t[8]=a,t[9]=e):e=t[9],e}let l;t[10]===i?l=t[11]:(l=/* @__PURE__ */ f(v,{...i}),t[10]=i,t[11]=l);let u;return t[12]!==r||t[13]!==i||t[14]!==a||t[15]!==l?(u=/* @__PURE__ */ f(b,{...i,className:r,forwardedRef:a,innerRef:s,children:l}),t[12]=r,t[13]=i,t[14]=a,t[15]=l,t[16]=u):u=t[16],u},v=r=>{let i=c(31),a,l,d,p,m,h;i[0]===r?(a=i[1],l=i[2],d=i[3],p=i[4],m=i[5],h=i[6]):({"aria-invalid":a,"data-slot":p,className:d,ref:m,validation:l,...h}=r,i[0]=r,i[1]=a,i[2]=l,i[3]=d,i[4]=p,i[5]=m,i[6]=h);let g=u(y),_,v,b,x,S;i[7]===g?(_=i[8],v=i[9],b=i[10],x=i[11],S=i[12]):({"aria-invalid":v,forwardedRef:b,innerRef:x,validation:S,..._}=g,i[7]=g,i[8]=_,i[9]=v,i[10]=b,i[11]=x,i[12]=S);let C=o(),w=v??a,T=S??l??C,E;i[13]!==w||i[14]!==T?(E=s({"aria-invalid":w,validation:T}),i[13]=w,i[14]=T,i[15]=E):E=i[15];let{ariaInvalid:D,validation:O}=E,k=h.type??_.type??`text`,A;i[16]!==_||i[17]!==h||i[18]!==k?(A={..._,...h,type:k},i[16]=_,i[17]=h,i[18]=k,i[19]=A):A=i[19];let j=A,M=e(m,b,x),N;i[20]===p?N=i[21]:(N=n(p,`input-capture`),i[20]=p,i[21]=N);let P;i[22]===d?P=i[23]:(P=t(`placeholder:text-placeholder min-w-0 flex-1 bg-transparent text-left autofill:shadow-[inset_0_0_0px_1000px_var(--color-blue-50)] focus:outline-hidden`,d),i[22]=d,i[23]=P);let F;return i[24]!==D||i[25]!==M||i[26]!==j||i[27]!==N||i[28]!==P||i[29]!==O?(F=/* @__PURE__ */ f(`input`,{"aria-invalid":D,"data-slot":N,"data-validation":O,className:P,ref:M,...j}),i[24]=D,i[25]=M,i[26]=j,i[27]=N,i[28]=P,i[29]=O,i[30]=F):F=i[30],F},y=l({validation:void 0,innerRef:{current:null}}),b=e=>{let r=c(51),a,l,u,d,m,h,g,_,v,b,S,C;r[0]===e?(a=r[1],l=r[2],u=r[3],d=r[4],m=r[5],h=r[6],g=r[7],_=r[8],v=r[9],b=r[10],S=r[11],C=r[12]):({"aria-invalid":l,"aria-disabled":a,"data-slot":h,children:d,className:m,disabled:g,forwardedRef:_,innerRef:v,style:S,type:C,validation:u,...b}=e,r[0]=e,r[1]=a,r[2]=l,r[3]=u,r[4]=d,r[5]=m,r[6]=h,r[7]=g,r[8]=_,r[9]=v,r[10]=b,r[11]=S,r[12]=C);let w=o(),T=u??w,E;r[13]!==l||r[14]!==T?(E=s({"aria-invalid":l,validation:T}),r[13]=l,r[14]=T,r[15]=E):E=r[15];let{validation:D}=E,O;r[16]!==a||r[17]!==l||r[18]!==u||r[19]!==g||r[20]!==_||r[21]!==v||r[22]!==b||r[23]!==C?(O={"aria-invalid":l,"aria-disabled":a,disabled:g,type:C,validation:u,...b,forwardedRef:_,innerRef:v},r[16]=a,r[17]=l,r[18]=u,r[19]=g,r[20]=_,r[21]=v,r[22]=b,r[23]=C,r[24]=O):O=r[24];let k=O,A;r[25]===h?A=r[26]:(A=n(h,`input`),r[25]=h,r[26]=A);let j;r[27]!==a||r[28]!==g?(j=i(g??a)||void 0,r[27]=a,r[28]=g,r[29]=j):j=r[29];let M=D||void 0,N;r[30]===m?N=r[31]:(N=t(`pointer-coarse:text-base h-9 text-sm`,`bg-form relative flex w-full items-center gap-1.5 rounded-md border px-3 py-2 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-within:outline-hidden focus-within:ring-4`,`data-disabled:opacity-50`,`has-[input:not(:first-child)]:ps-2.5 has-[input:not(:last-child)]:pe-2.5 [&>:not(input)]:shrink-0 [&_svg]:size-5`,`border-form text-strong focus-within:border-accent-600 focus-within:ring-focus-accent`,`data-validation-success:border-success-600 focus-within:data-validation-success:border-success-600 focus-within:data-validation-success:ring-focus-success`,`data-validation-warning:border-warning-600 focus-within:data-validation-warning:border-warning-600 focus-within:data-validation-warning:ring-focus-warning`,`data-validation-error:border-danger-600 focus-within:data-validation-error:border-danger-600 focus-within:data-validation-error:ring-focus-danger motion-safe:data-validation-error:animate-shake`,`has-[>[data-validation=error]]:border-danger-600 focus-within:has-[>[data-validation=error]]:border-danger-600 focus-within:has-[>[data-validation=error]]:ring-focus-danger motion-safe:has-[>[data-validation=error]]:animate-shake`,`autofill:shadow-[inset_0_0_0px_1000px_var(--color-blue-50)] has-autofill:bg-blue-50 has-autofill:[-webkit-text-fill-color:var(--text-color-strong)]`,m),r[30]=m,r[31]=N);let P,F;r[32]===v?(P=r[33],F=r[34]):(P=e=>{e.target!==v?.current&&e.preventDefault()},F=e=>{let t=v.current;t!=null&&e.detail!==0&&t.focus()},r[32]=v,r[33]=P,r[34]=F);let I;r[35]!==b.name||r[36]!==D?(I=/* @__PURE__ */ f(x,{name:b.name,validation:D}),r[35]=b.name,r[36]=D,r[37]=I):I=r[37];let L;r[38]!==d||r[39]!==S||r[40]!==I||r[41]!==A||r[42]!==j||r[43]!==M||r[44]!==N||r[45]!==P||r[46]!==F?(L=/* @__PURE__ */ p(`div`,{role:`none`,"data-slot":A,"data-disabled":j,"data-validation":M,className:N,onMouseDown:P,onClick:F,style:S,children:[d,I]}),r[38]=d,r[39]=S,r[40]=I,r[41]=A,r[42]=j,r[43]=M,r[44]=N,r[45]=P,r[46]=F,r[47]=L):L=r[47];let R;return r[48]!==k||r[49]!==L?(R=/* @__PURE__ */ f(y.Provider,{value:k,children:L}),r[48]=k,r[49]=L,r[50]=R):R=r[50],R},x=e=>{let t=c(9),{name:n,validation:i}=e;switch(i){case`error`:{let e;t[0]===n?e=t[1]:(e=a(`The value entered for the`,n,`input has failed validation.`),t[0]=n,t[1]=e);let i;t[2]===e?i=t[3]:(i=/* @__PURE__ */ f(`span`,{className:`sr-only`,children:e}),t[2]=e,t[3]=i);let o;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=/* @__PURE__ */ f(r,{svg:/* @__PURE__ */ f(h,{"aria-hidden":!0,weight:`fill`})}),t[4]=o):o=t[4];let s;return t[5]===i?s=t[6]:(s=/* @__PURE__ */ p(`div`,{className:`text-danger-600 order-last select-none`,children:[i,o]}),t[5]=i,t[6]=s),s}case`success`:{let e;return t[7]===Symbol.for(`react.memo_cache_sentinel`)?(e=/* @__PURE__ */ f(`div`,{className:`text-success-600 order-last select-none`,children:/* @__PURE__ */ f(r,{svg:/* @__PURE__ */ f(m,{weight:`fill`})})}),t[7]=e):e=t[7],e}case`warning`:{let e;return t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=/* @__PURE__ */ f(`div`,{className:`text-warning-600 order-last select-none`,children:/* @__PURE__ */ f(r,{svg:/* @__PURE__ */ f(g,{weight:`fill`})})}),t[8]=e):e=t[8],e}default:return null}};export{v as n,_ as t};
@@ -1 +0,0 @@
1
- import "./popover-BfB2I9G0.js";
@@ -1 +0,0 @@
1
- import{n as e}from"./compose-refs-sFdxsL7k.js";import{t}from"./cx-CK7o_rVv.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{t as r}from"./icon-kK0c-POG.js";import{i}from"./layer-container-kEQiE4zV.js";import{a,r as o}from"./field-CPvjazWN.js";import{t as s}from"./field-Bihblt8U.js";import{n as c}from"./separator-DfzxVutO.js";import{c as l}from"react/compiler-runtime";import{CaretDownIcon as u}from"@phosphor-icons/react/CaretDown";import{createContext as d,useContext as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import{Slottable as h}from"@radix-ui/react-slot";import{CheckIcon as g}from"@phosphor-icons/react/Check";import{CaretUpIcon as _}from"@phosphor-icons/react/CaretUp";import{Content as v,Group as y,Icon as b,Item as x,ItemIndicator as S,ItemText as C,Label as w,Portal as T,Root as E,ScrollDownButton as D,ScrollUpButton as O,Trigger as k,Value as A,Viewport as j}from"@radix-ui/react-select";const M=d({}),N=e=>{let t=l(26),n,r,i,a,o,s,c,u,d;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],u=t[8],d=t[9]):({"aria-invalid":n,children:r,id:i,validation:d,onBlur:a,onValueChange:s,onChange:o,ref:u,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=u,t[9]=d);let f;t[10]!==n||t[11]!==i||t[12]!==a||t[13]!==u||t[14]!==d?(f={"aria-invalid":n,id:i,validation:d,onBlur:a,ref:u},t[10]=n,t[11]=i,t[12]=a,t[13]=u,t[14]=d,t[15]=f):f=t[15];let m=f,h;t[16]!==o||t[17]!==s?(h=e=>{o?.(e),s?.(e)},t[16]=o,t[17]=s,t[18]=h):h=t[18];let g;t[19]!==r||t[20]!==m?(g=/* @__PURE__ */ p(M.Provider,{value:m,children:r}),t[19]=r,t[20]=m,t[21]=g):g=t[21];let _;return t[22]!==c||t[23]!==h||t[24]!==g?(_=/* @__PURE__ */ p(E,{...c,onValueChange:h,children:g}),t[22]=c,t[23]=h,t[24]=g,t[25]=_):_=t[25],_},P=e=>{let r=l(14),i,a,o,s;r[0]===e?(i=r[1],a=r[2],o=r[3],s=r[4]):({className:i,"data-slot":a,ref:s,...o}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let c;r[5]===a?c=r[6]:(c=n(a,`select-group`),r[5]=a,r[6]=c);let u;r[7]===i?u=r[8]:(u=t(`space-y-px`,i),r[7]=i,r[8]=u);let d;return r[9]!==o||r[10]!==s||r[11]!==c||r[12]!==u?(d=/* @__PURE__ */ p(y,{ref:s,"data-slot":c,className:u,...o}),r[9]=o,r[10]=s,r[11]=c,r[12]=u,r[13]=d):d=r[13],d},F=e=>{let t=l(21),r,i,a,o,s,c;t[0]===e?(r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6]):({asChild:r,children:i,"data-slot":a,placeholder:o,ref:c,...s}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c);let u;t[7]===a?u=t[8]:(u=n(a,`select-value`),t[7]=a,t[8]=u);let d;t[9]===o?d=t[10]:(d=o!=null&&/* @__PURE__ */ p(`span`,{"data-slot":`select-placeholder`,className:`contents`,children:o}),t[9]=o,t[10]=d);let f;t[11]!==r||t[12]!==i?(f=r||i==null?i:/* @__PURE__ */ p(`span`,{"data-slot":`select-value-label`,className:`contents`,children:i}),t[11]=r,t[12]=i,t[13]=f):f=t[13];let m;return t[14]!==r||t[15]!==s||t[16]!==c||t[17]!==u||t[18]!==d||t[19]!==f?(m=/* @__PURE__ */ p(A,{ref:c,asChild:r,"data-slot":u,placeholder:d,...s,children:f}),t[14]=r,t[15]=s,t[16]=c,t[17]=u,t[18]=d,t[19]=f,t[20]=m):m=t[20],m},I=i=>{let c=l(36),d,g,_,v,y,x,S,C,w;c[0]===i?(d=c[1],g=c[2],_=c[3],v=c[4],y=c[5],x=c[6],S=c[7],C=c[8],w=c[9]):({"aria-invalid":d,className:_,children:g,"data-slot":v,id:x,onBlur:y,ref:w,validation:S,...C}=i,c[0]=i,c[1]=d,c[2]=g,c[3]=_,c[4]=v,c[5]=y,c[6]=x,c[7]=S,c[8]=C,c[9]=w);let T=f(M),E=f(s),D=e(w,T.ref),O=a(),A=E?E[`aria-invalid`]:T[`aria-invalid`]??d,j=T.validation??S??O,N;c[10]!==A||c[11]!==j?(N=o({"aria-invalid":A,validation:j}),c[10]=A,c[11]=j,c[12]=N):N=c[12];let{ariaInvalid:P,validation:F}=N,I=E?E.id:T.id??x,L;c[13]===v?L=c[14]:(L=n(v,`select-trigger`),c[13]=v,c[14]=L);let R;c[15]===_?R=c[16]:(R=t(`h-9 text-sm`,`border-form bg-form text-strong font-sans placeholder:text-placeholder hover:bg-form-hover hover:text-strong flex w-full items-center justify-between gap-1.5 rounded-md border px-3 py-2 disabled:pointer-events-none disabled:opacity-50`,`[&>[data-slot=select-trigger-label]>span]:line-clamp-1 [&>[data-slot=select-trigger-label]>span]:text-left`,`hover:border-neutral-400`,`focus:outline-hidden focus:ring-4 aria-expanded:ring-4`,`focus:border-accent-600 focus:ring-focus-accent aria-expanded:border-accent-600 aria-expanded:ring-focus-accent`,`data-validation-success:border-success-600 data-validation-success:focus:border-success-600 data-validation-success:focus:ring-focus-success data-validation-success:aria-expanded:border-success-600 data-validation-success:aria-expanded:ring-focus-success`,`data-validation-warning:border-warning-600 data-validation-warning:focus:border-warning-600 data-validation-warning:focus:ring-focus-warning data-validation-warning:aria-expanded:border-warning-600 data-validation-warning:aria-expanded:ring-focus-warning`,`data-validation-error:border-danger-600 data-validation-error:focus:border-danger-600 data-validation-error:focus:ring-focus-danger data-validation-error:aria-expanded:border-danger-600 data-validation-error:aria-expanded:ring-focus-danger motion-safe:data-validation-error:animate-shake`,_),c[15]=_,c[16]=R);let z=F||void 0,V;c[17]!==T||c[18]!==y?(V=e=>{y?.(e),T.onBlur?.(e)},c[17]=T,c[18]=y,c[19]=V):V=c[19];let H;c[20]===E?H=c[21]:(H=E?{"aria-describedby":E[`aria-describedby`],"aria-errormessage":E[`aria-errormessage`]}:void 0,c[20]=E,c[21]=H);let U;c[22]===g?U=c[23]:(U=/* @__PURE__ */ p(h,{child:g,children:B}),c[22]=g,c[23]=U);let W;c[24]===Symbol.for(`react.memo_cache_sentinel`)?(W=/* @__PURE__ */ p(b,{asChild:!0,children:/* @__PURE__ */ p(r,{svg:/* @__PURE__ */ p(u,{weight:`bold`}),className:`size-4`})}),c[24]=W):W=c[24];let G;return c[25]!==P||c[26]!==I||c[27]!==C||c[28]!==L||c[29]!==R||c[30]!==z||c[31]!==V||c[32]!==H||c[33]!==U||c[34]!==D?(G=/* @__PURE__ */ m(k,{"data-slot":L,className:R,"data-validation":z,id:I,ref:D,...C,onBlur:V,...H,"aria-invalid":P,children:[U,W]}),c[25]=P,c[26]=I,c[27]=C,c[28]=L,c[29]=R,c[30]=z,c[31]=V,c[32]=H,c[33]=U,c[34]=D,c[35]=G):G=c[35],G},L=e=>{let n=l(11),i,a,o;n[0]===e?(i=n[1],a=n[2],o=n[3]):({className:i,ref:o,...a}=e,n[0]=e,n[1]=i,n[2]=a,n[3]=o);let s;n[4]===i?s=n[5]:(s=t(`flex cursor-default items-center justify-center py-1`,i),n[4]=i,n[5]=s);let c;n[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=/* @__PURE__ */ p(r,{svg:/* @__PURE__ */ p(_,{weight:`bold`}),className:`size-4`}),n[6]=c):c=n[6];let u;return n[7]!==a||n[8]!==o||n[9]!==s?(u=/* @__PURE__ */ p(O,{ref:o,className:s,...a,children:c}),n[7]=a,n[8]=o,n[9]=s,n[10]=u):u=n[10],u},R=e=>{let n=l(11),i,a,o;n[0]===e?(i=n[1],a=n[2],o=n[3]):({className:i,ref:o,...a}=e,n[0]=e,n[1]=i,n[2]=a,n[3]=o);let s;n[4]===i?s=n[5]:(s=t(`flex cursor-default items-center justify-center py-1`,i),n[4]=i,n[5]=s);let c;n[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=/* @__PURE__ */ p(r,{svg:/* @__PURE__ */ p(u,{weight:`bold`}),className:`size-4`}),n[6]=c):c=n[6];let d;return n[7]!==a||n[8]!==o||n[9]!==s?(d=/* @__PURE__ */ p(D,{ref:o,className:s,...a,children:c}),n[7]=a,n[8]=o,n[9]=s,n[10]=d):d=n[10],d},z={Root:N,Content:e=>{let r=l(31),a,o,s,c,u,d,f;r[0]===e?(a=r[1],o=r[2],s=r[3],c=r[4],u=r[5],d=r[6],f=r[7]):({className:o,children:a,"data-slot":s,position:d,ref:u,width:f,...c}=e,r[0]=e,r[1]=a,r[2]=o,r[3]=s,r[4]=c,r[5]=u,r[6]=d,r[7]=f);let h=d===void 0?`popper`:d,g=f===void 0?`trigger`:f,_=i(),y;r[8]===s?y=r[9]:(y=n(s,`select-content`),r[8]=s,r[9]=y);let b=h===`popper`&&`data-side-bottom:translate-y-2 data-side-left:-translate-x-2 data-side-right:translate-x-2 data-side-top:-translate-y-2 max-h-(--radix-select-content-available-height)`,x=g===`trigger`&&`w-(--radix-select-trigger-width)`,S;r[10]!==o||r[11]!==b||r[12]!==x?(S=t(`border-popover data-side-bottom:slide-in-from-top-1 data-side-left:slide-in-from-right-1 data-side-right:slide-in-from-left-1 data-side-top:slide-in-from-bottom-1 data-side-bottom:slide-out-to-top-1 data-side-left:slide-out-to-right-1 data-side-right:slide-out-to-left-1 data-side-top:slide-out-to-bottom-1 duration-200 ease-out-strong data-state-closed:duration-150 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95 motion-reduce:animate-none! relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border shadow-md`,`bg-popover font-sans`,b,x,o),r[10]=o,r[11]=b,r[12]=x,r[13]=S):S=r[13];let C;r[14]===Symbol.for(`react.memo_cache_sentinel`)?(C=/* @__PURE__ */ p(L,{}),r[14]=C):C=r[14];let w=h===`popper`&&`h-(--radix-select-trigger-height) w-full`,E;r[15]===w?E=r[16]:(E=t(`p-1 space-y-px`,w),r[15]=w,r[16]=E);let D;r[17]!==a||r[18]!==E?(D=/* @__PURE__ */ p(j,{className:E,children:a}),r[17]=a,r[18]=E,r[19]=D):D=r[19];let O;r[20]===Symbol.for(`react.memo_cache_sentinel`)?(O=/* @__PURE__ */ p(R,{}),r[20]=O):O=r[20];let k;r[21]!==h||r[22]!==c||r[23]!==u||r[24]!==D||r[25]!==y||r[26]!==S?(k=/* @__PURE__ */ m(v,{ref:u,"data-slot":y,className:S,position:h,...c,children:[C,D,O]}),r[21]=h,r[22]=c,r[23]=u,r[24]=D,r[25]=y,r[26]=S,r[27]=k):k=r[27];let A;return r[28]!==_||r[29]!==k?(A=/* @__PURE__ */ p(T,{container:_,children:k}),r[28]=_,r[29]=k,r[30]=A):A=r[30],A},Group:P,Item:e=>{let i=l(28),a,o,s,c,u,d,f;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],u=i[5],d=i[6],f=i[7]):({className:o,children:a,"data-slot":s,icon:c,ref:d,translate:f,...u}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=u,i[6]=d,i[7]=f);let _;i[8]===s?_=i[9]:(_=n(s,`select-item`),i[8]=s,i[9]=_);let v;i[10]===o?v=i[11]:(v=t(`relative flex gap-2 w-full cursor-pointer select-none items-center rounded-md py-1.5 pl-2 pr-8 text-strong text-sm outline-hidden`,`focus:bg-active-menu-item`,`data-disabled:pointer-events-none data-disabled:opacity-50`,`data-state-checked:bg-selected-menu-item`,`focus:data-state-checked:bg-active-selected-menu-item`,o),i[10]=o,i[11]=v);let y;i[12]===c?y=i[13]:(y=c&&/* @__PURE__ */ p(r,{svg:c}),i[12]=c,i[13]=y);let b;i[14]===f?b=i[15]:(b=e=>/* @__PURE__ */ p(C,{children:/* @__PURE__ */ p(`span`,{"data-slot":`select-item-label`,className:`contents`,translate:f,children:e})}),i[14]=f,i[15]=b);let w;i[16]!==a||i[17]!==b?(w=/* @__PURE__ */ p(h,{child:a,children:b}),i[16]=a,i[17]=b,i[18]=w):w=i[18];let T;i[19]===Symbol.for(`react.memo_cache_sentinel`)?(T=/* @__PURE__ */ p(S,{className:`absolute right-2 flex h-3.5 w-3.5 items-center justify-center`,children:/* @__PURE__ */ p(r,{svg:/* @__PURE__ */ p(g,{weight:`bold`}),className:`size-4 text-accent-600`})}),i[19]=T):T=i[19];let E;return i[20]!==u||i[21]!==d||i[22]!==_||i[23]!==v||i[24]!==y||i[25]!==w||i[26]!==f?(E=/* @__PURE__ */ m(x,{ref:d,"data-slot":_,translate:f,className:v,...u,children:[y,w,T]}),i[20]=u,i[21]=d,i[22]=_,i[23]=v,i[24]=y,i[25]=w,i[26]=f,i[27]=E):E=i[27],E},Label:e=>{let r=l(14),i,a,o,s;r[0]===e?(i=r[1],a=r[2],o=r[3],s=r[4]):({className:i,"data-slot":a,ref:s,...o}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let c;r[5]===a?c=r[6]:(c=n(a,`select-label`),r[5]=a,r[6]=c);let u;r[7]===i?u=r[8]:(u=t(`px-2 py-1.5 text-sm font-medium`,i),r[7]=i,r[8]=u);let d;return r[9]!==o||r[10]!==s||r[11]!==c||r[12]!==u?(d=/* @__PURE__ */ p(w,{ref:s,"data-slot":c,className:u,...o}),r[9]=o,r[10]=s,r[11]=c,r[12]=u,r[13]=d):d=r[13],d},Separator:e=>{let r=l(14),i,a,o,s;r[0]===e?(i=r[1],a=r[2],o=r[3],s=r[4]):({className:i,"data-slot":a,ref:s,...o}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let u;r[5]===a?u=r[6]:(u=n(a,`select-separator`),r[5]=a,r[6]=u);let d;r[7]===i?d=r[8]:(d=t(`-mx-1 my-1 h-px w-auto`,i),r[7]=i,r[8]=d);let f;return r[9]!==o||r[10]!==s||r[11]!==u||r[12]!==d?(f=/* @__PURE__ */ p(c,{ref:s,"data-slot":u,className:d,...o}),r[9]=o,r[10]=s,r[11]=u,r[12]=d,r[13]=f):f=r[13],f},Trigger:I,Value:F};function B(e){return/* @__PURE__ */ p(`span`,{"data-slot":`select-trigger-label`,className:`contents`,children:e})}export{z as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./browser-only-BTSrYWLj.js";import{t}from"./cx-CK7o_rVv.js";import{t as n}from"./use-matches-media-query-m860lols.js";import{n as r,t as i}from"./cookie-ca4g5CKp.js";import{t as a}from"./use-prefers-reduced-motion-CU6mWmOe.js";import{c as o}from"react/compiler-runtime";import{createContext as s,useContext as c,useEffect as l,useRef as u,useState as d}from"react";import f from"tiny-invariant";import{jsx as p}from"react/jsx-runtime";import{flushSync as m}from"react-dom";let h=null;function g(e,{origin:t}={}){if(typeof document.startViewTransition!=`function`||a()||document.visibilityState!==`visible`){e();return}if(h!=null){h.skipTransition(),h.updateCallbackDone.finally(()=>m(e));return}let n=document.documentElement,r={width:window.innerWidth,height:window.innerHeight},i=v(_(t,r),r);n.dataset.themeTransition=``;let o=document.startViewTransition(()=>m(e));h=o;function s(e){if(e.target!==n)return;o.skipTransition();let t=document.elementFromPoint(e.clientX,e.clientY);t!=null&&t!==n&&t.dispatchEvent(new MouseEvent(`click`,e))}document.addEventListener(`click`,s,{capture:!0});let c=o.ready.then(()=>n.animate({clipPath:[i.from,i.to]},{duration:400,easing:`ease-out`,pseudoElement:`::view-transition-new(root)`}),()=>void 0),l=async()=>{(await c)?.cancel(),document.removeEventListener(`click`,s,{capture:!0}),h=null,delete n.dataset.themeTransition};o.finished.finally(()=>{l()})}function _(e,t){let n=document.activeElement,r=e??(n!=null&&n!==document.body?n:void 0);return r==null?{left:t.width/2,top:t.height/2,width:0,height:0}:r.getBoundingClientRect()}function v(e,t){let n=e.left+e.width/2,r=e.top+e.height/2,i=Math.hypot(Math.max(n,t.width-n),Math.max(r,t.height-r)),a=`at ${n}px ${r}px`;return{from:`circle(0px ${a})`,to:`circle(${Math.round(i*100)/100}px ${a})`}}const y=[`light`,`dark`],b=[`system`,...y],x=e=>e;function S(e){return typeof e==`string`&&b.some(t=>t===e)}const C=e=>e;function w(e){return typeof e==`string`&&y.some(t=>t===e)}function T({theme:e,prefersDarkMode:t}){let n=t?`dark`:`light`,r=(e===`system`?n:e)===`dark`?`light`:`dark`;return r===n?`system`:r}const E=`(prefers-color-scheme: dark)`,D=`mantle-ui-theme`,O=`system`,k={system:`system`,light:`light`,dark:`dark`,"light-high-contrast":`light`,"dark-high-contrast":`dark`},A=s(null),j=s(void 0);function M(t){let n=o(19),{children:i,forceTheme:a,ssrCookie:s}=t,c;n[0]!==a||n[1]!==s?(c=()=>{let t=U({cookie:e()?Y()??s:s});return P(t,{forceTheme:a}),t},n[0]=a,n[1]=s,n[2]=c):c=n[2];let[f,m]=d(c),h=u(null),_,v;n[3]!==a||n[4]!==s?(_=()=>{let e=function(){let e=U({cookie:Y()??s});m(e),P(e,{forceTheme:a})};e();let t=r(Y(),D);t!=null&&!S(t)&&Object.hasOwn(k,t)&&X(U({cookie:Y()}));try{`BroadcastChannel`in window&&(h.current=new BroadcastChannel(D),h.current.addEventListener(`message`,e))}catch{}let n=function(t){t.key===`${D}__ping`&&e()};window.addEventListener(`storage`,n);let i=window.matchMedia(E),o=function(){e()},c=function(){document.visibilityState===`visible`&&e()};return i.addEventListener(`change`,o),window.addEventListener(`pageshow`,o),document.addEventListener(`visibilitychange`,c),()=>{window.removeEventListener(`storage`,n),i.removeEventListener(`change`,o),window.removeEventListener(`pageshow`,o),document.removeEventListener(`visibilitychange`,c),Z(h.current),h.current=null}},v=[a,s],n[3]=a,n[4]=s,n[5]=_,n[6]=v):(_=n[5],v=n[6]),l(_,v);let y;n[7]!==a||n[8]!==f?(y=(e,t)=>{let{origin:n}=t===void 0?{}:t,r=()=>{if(typeof e!=`function`)return e;let t=document.documentElement.dataset.theme;return e(S(t)?t:f)},i=()=>{let e=r();X(e),m(e),P(e,{forceTheme:a}),G(e,{broadcastChannel:h.current,pingKey:`${D}__ping`})},o=window.matchMedia(E).matches;(a??I(r(),{prefersDarkMode:o}))===document.documentElement.dataset.appliedTheme?i():g(i,{origin:n})},n[7]=a,n[8]=f,n[9]=y):y=n[9];let b;n[10]!==y||n[11]!==f?(b=[f,y],n[10]=y,n[11]=f,n[12]=b):b=n[12];let x=b,C;n[13]!==i||n[14]!==x?(C=/* @__PURE__ */ p(A.Provider,{value:x,children:i}),n[13]=i,n[14]=x,n[15]=C):C=n[15];let w;return n[16]!==a||n[17]!==C?(w=/* @__PURE__ */ p(j.Provider,{value:a,children:C}),n[16]=a,n[17]=C,n[18]=w):w=n[18],w}function N(){let e=c(A);return f(e,`useTheme must be used within a ThemeProvider`),e}function P(t,{forceTheme:n}={}){if(!e())return;let r=window.document.documentElement,i=window.matchMedia(E).matches,a=n??I(t,{prefersDarkMode:i}),o=r.dataset.theme,s=r.dataset.appliedTheme,c=S(o)?o:void 0,l=w(s)?s:void 0;(c!==t||l!==a)&&(r.classList.remove(...y),r.classList.add(a),r.dataset.theme=t,r.dataset.appliedTheme=a)}function F(){if(!e())return{appliedTheme:void 0,theme:void 0};let t=window.document.documentElement,n=S(t.dataset.theme)?t.dataset.theme:void 0;return{appliedTheme:w(t.dataset.appliedTheme)?t.dataset.appliedTheme:void 0,theme:n}}function I(e,{prefersDarkMode:t}){return e===`system`?t?`dark`:`light`:e}function L(){let e=o(4),t=c(A),r=R(),i=t==null?`system`:t[0],a=n(E),s;return e[0]!==r||e[1]!==a||e[2]!==i?(s=r??I(i,{prefersDarkMode:a}),e[0]=r,e[1]=a,e[2]=i,e[3]=s):s=e[3],s}function R(){return c(j)}function z({storageKey:e,themeByCookieValue:t,forceTheme:n}){let r=`system`;try{let n=document.cookie.split(`;`).map(e=>e.trim()).find(t=>t.startsWith(`${e}=`)),i=decodeURIComponent(n?.slice(e.length+1)??``);Object.hasOwn(t,i)&&(r=t[i]??`system`)}catch{}let i=matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`;n==null?r!==`system`&&(i=r):i=n;let a=document.documentElement;a.classList.remove(`light`,`dark`),a.classList.add(i),a.dataset.theme=r,a.dataset.appliedTheme=i}function B(e){let t={storageKey:D,themeByCookieValue:k,forceTheme:e};return`(${z.toString()})(${JSON.stringify(t)})`}const V=e=>{let t=o(7),{forceTheme:n,nonce:r}=e,i;t[0]===n?i=t[1]:(i=B(n),t[0]=n,t[1]=i);let a;t[2]===i?a=t[3]:(a={__html:i},t[2]=i,t[3]=a);let s;return t[4]!==r||t[5]!==a?(s=/* @__PURE__ */ p(`script`,{dangerouslySetInnerHTML:a,nonce:r,suppressHydrationWarning:!0}),t[4]=r,t[5]=a,t[6]=s):s=t[6],s};function H(n){let r=o(17),i;r[0]===n?i=r[1]:(i=n===void 0?{}:n,r[0]=n,r[1]=i);let a=i,s;r[2]===a?s=r[3]:(s=a??{},r[2]=a,r[3]=s);let{className:c,forceTheme:l,ssrCookie:u}=s,d=c===void 0?``:c,f,p;if(e()){let e;if(r[7]!==u){let t=window.matchMedia(E).matches;f=U({cookie:Y()??u}),e=I(f,{prefersDarkMode:t}),r[7]=u,r[8]=e,r[9]=f}else e=r[8],f=r[9];p=e}else{let e;r[4]===u?(e=r[5],f=r[6]):(f=U({cookie:u}),e=I(f,{prefersDarkMode:!1}),r[4]=u,r[5]=e,r[6]=f),p=e}let m=l??p,h;r[10]!==m||r[11]!==d?(h=t(d,m),r[10]=m,r[11]=d,r[12]=h):h=r[12];let g;return r[13]!==m||r[14]!==f||r[15]!==h?(g={className:h,"data-applied-theme":m,"data-theme":f},r[13]=m,r[14]=f,r[15]=h,r[16]=g):g=r[16],g}function U({cookie:e}){if(!e)return O;let t=r(e,D);return t==null||!Object.hasOwn(k,t)?O:k[t]??O}function W(e){return i(e,D)}function G(e,t){let{broadcastChannel:n,pingKey:r}=t;try{if(n){n.postMessage({theme:e,timestamp:Date.now()});return}}catch{}try{localStorage.setItem(r,JSON.stringify({theme:e,timestamp:Date.now()}))}catch{}}const K=[`ngrok.com`,`ngrok.ai`];function q(e){let t=K.find(t=>e===t||e.endsWith(`.${t}`));return t==null?void 0:`.${t}`}function J(e){let t=/* @__PURE__ */ new Date;t.setFullYear(t.getFullYear()+1);let{hostname:n,protocol:r}=window.location,i=q(n),a=i==null?``:`; domain=${i}`,o=r===`https:`?`; Secure`:``;return`${D}=${encodeURIComponent(e)}; expires=${t.toUTCString()}; path=/${a}; SameSite=Lax${o}`}function Y(){try{return document.cookie}catch{return}}function X(t){if(e())try{document.cookie=J(t)}catch{}}function Z(e){if(e!=null)try{e.close()}catch{}}export{b as _,B as a,R as c,C as d,x as f,y as g,S as h,U as i,H as l,w as m,M as n,F as o,T as p,W as r,L as s,V as t,N as u};
@@ -1 +0,0 @@
1
- import{t as e}from"./alert-DO00UiQe.js";import{c as t}from"react/compiler-runtime";import{useEffect as n,useLayoutEffect as r,useRef as i}from"react";function a({tabStops:e,current:t,backwards:n}){let r=e[0],i=e[e.length-1];if(r==null||i==null)return null;let a=e.findIndex(e=>e===t);if(a!==-1)return n?a===0?i:null:a===e.length-1?r:null;if(t==null)return n?i:r;if(n){let n=e.filter(e=>(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)!==0);return n[n.length-1]??i}return e.find(e=>(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING)!==0)??r}function o(r,i){let o=t(6),s;o[0]===i?s=o[1]:(s=i===void 0?{}:i,o[0]=i,o[1]=s);let{active:c}=s,l=c===void 0||c,u,d;o[2]!==l||o[3]!==r?(u=()=>{let t=r.current;if(!l||t==null)return;let n=!t.hasAttribute(`tabindex`);n&&(t.tabIndex=-1);let i=0,o=60,s=()=>{if(t.contains(document.activeElement))return;let[n]=e(t);(n??t).focus(),--o,!t.contains(document.activeElement)&&o>0&&(i=requestAnimationFrame(s))};s();let c=n=>{if(n.key!==`Tab`||n.defaultPrevented||!(n.target instanceof Node)||!t.contains(n.target))return;let r=e(t);if(r.length===0){n.preventDefault();return}let i=a({tabStops:r,current:document.activeElement,backwards:n.shiftKey});i!=null&&(n.preventDefault(),i.focus())};return document.addEventListener(`keydown`,c),()=>{cancelAnimationFrame(i),document.removeEventListener(`keydown`,c),n&&t.removeAttribute(`tabindex`)}},d=[l,r],o[2]=l,o[3]=r,o[4]=u,o[5]=d):(u=o[4],d=o[5]),n(u,d)}function s(e,n){let i=t(6),a;i[0]===n?a=i[1]:(a=n===void 0?{}:n,i[0]=n,i[1]=a);let{active:o}=a,s=o===void 0||o,l,u;i[2]!==s||i[3]!==e?(l=()=>{let t=e.current;if(s&&t!=null)return c(t)},u=[s,e],i[2]=s,i[3]=e,i[4]=l,i[5]=u):(l=i[4],u=i[5]),r(l,u)}function c(e){let t=e.parentElement;if(t==null)return;let n=/* @__PURE__ */ new Set,r=()=>{for(let r of t.children)r!==e&&r instanceof HTMLElement&&!r.inert&&(r.inert=!0,n.add(r))};r();let i=new MutationObserver(r);return i.observe(t,{childList:!0}),()=>{i.disconnect();for(let e of n)e.inert=!1}}function l({offset:e,size:t,velocity:n,threshold:r,flickVelocity:i}){return e>0&&(e>=t*r||n>=i)}function u(e,t){return t<=0?0:(1-1/(.55*e/t+1))*t}function d(e,t){switch(t){case`right`:return e.clientX;case`left`:return-e.clientX;case`down`:return e.clientY;case`up`:return-e.clientY}}function f(e,t){return t===`left`||t===`right`?e.clientY:e.clientX}function p(e,t){switch(t){case`right`:return`${e}px`;case`left`:return`${-e}px`;case`down`:return`0 ${e}px`;case`up`:return`0 ${-e}px`}}function m(e,t,n){e.property===`flex-basis`?e.target.style.flexBasis=`${e.size-t}px`:e.target.style.translate=p(t,n)}function h(e){e.target.style.removeProperty(`transition`),e.target.style.removeProperty(e.property===`flex-basis`?`flex-basis`:`translate`)}function g(e,a){let o=t(6),s=i(a),c;o[0]===a?c=o[1]:(c=()=>{s.current=a},o[0]=a,o[1]=c),r(c);let p;o[2]===e.current?p=o[3]:(p=()=>{let t=e.current;if(t==null)return;let n=null,r=!1,i=()=>{document.removeEventListener(`pointermove`,a),document.removeEventListener(`pointerup`,o),document.removeEventListener(`pointercancel`,o),n=null},a=e=>{let{direction:t}=s.current,r=t===void 0?`right`:t;if(n==null||e.pointerId!==n.pointerId)return;let a=d(e,r),o=a-n.start;if(!n.dragging){let t=Math.abs(f(e,r)-n.crossStart);if(t>=8&&t>Math.abs(o)){i();return}if(Math.abs(o)<8)return;n.dragging=!0,n.target.style.transition=`none`}let c=e.timeStamp-n.lastTime;c>0&&(n.velocity=(a-n.last)/c),n.last=a,n.lastTime=e.timeStamp,n.offset=Math.max(0,o);let l=o>=0?o:-u(-o,n.size);m(n,l,r)},o=e=>{let{onDismiss:t,threshold:a,flickVelocity:o}=s.current,c=a===void 0?.25:a,u=o===void 0?.4:o;if(n==null||e.pointerId!==n.pointerId)return;let d=n;if(i(),!d.dragging||(r=!0,window.setTimeout(()=>{r=!1},0),h(d),e.type===`pointercancel`))return;let f=e.timeStamp-d.lastTime>100?0:d.velocity;l({...d,velocity:f,threshold:c,flickVelocity:u})&&t()},c=e=>{let{active:r,direction:i,property:c,target:l}=s.current,u=r===void 0||r,p=i===void 0?`right`:i,m=c===void 0?`translate`:c;if(!(typeof u==`function`?u():u)||!e.isPrimary||e.button!==0||n!=null)return;let h=l?.current??t,g=h.getBoundingClientRect(),_=d(e,p);n={target:h,property:typeof m==`function`?m():m,pointerId:e.pointerId,start:_,crossStart:f(e,p),size:p===`left`||p===`right`?g.width:g.height,dragging:!1,last:_,lastTime:e.timeStamp,velocity:0,offset:0},document.addEventListener(`pointermove`,a),document.addEventListener(`pointerup`,o),document.addEventListener(`pointercancel`,o)},p=e=>{r&&(r=!1,e.preventDefault(),e.stopPropagation())};return t.addEventListener(`pointerdown`,c),t.addEventListener(`click`,p,!0),()=>{n?.dragging&&h(n),i(),t.removeEventListener(`pointerdown`,c),t.removeEventListener(`click`,p,!0)}},o[2]=e.current,o[3]=p);let g;o[4]===e?g=o[5]:(g=[e],o[4]=e,o[5]=g),n(p,g)}export{s as n,o as r,g as t};