semiotic 3.13.1 → 3.13.2

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 (142) hide show
  1. package/README.md +20 -21
  2. package/ai/artifact-surface-inventory.json +1 -1
  3. package/ai/reference.md +1 -1
  4. package/ai/schema.json +1 -1
  5. package/ai/surface-manifest.json +1 -1
  6. package/ai/task-packets/compare-category-totals.json +5 -5
  7. package/ai/task-packets/compare-category-totals.md +2 -2
  8. package/ai/task-packets/correct-published-chart.json +5 -5
  9. package/ai/task-packets/correct-published-chart.md +2 -2
  10. package/ai/task-packets/index.json +6 -6
  11. package/ai/task-packets/update-live-chart.json +5 -5
  12. package/ai/task-packets/update-live-chart.md +2 -2
  13. package/dist/c-27SDQN3J.min.js +1 -0
  14. package/dist/{c-N2TVSOYL.min.js → c-4EUQNA7N.min.js} +2 -2
  15. package/dist/c-5EPR4KFB.min.js +1 -0
  16. package/dist/c-5HTUQRJT.min.js +1 -0
  17. package/dist/{c-XORVM6C5.min.js → c-5KZ3NO6X.min.js} +1 -1
  18. package/dist/c-5NAU4JAY.min.js +1 -0
  19. package/dist/c-73ORHEHO.min.js +1 -0
  20. package/dist/{c-ZWJDTDEV.min.js → c-AMQAAW7G.min.js} +1 -1
  21. package/dist/c-BQWX6NBX.min.js +1 -0
  22. package/dist/c-BR2TOCUN.min.js +1 -0
  23. package/dist/c-BRBTXINY.min.js +1 -0
  24. package/dist/c-C3Z7ZRAA.min.js +1 -0
  25. package/dist/c-C4WRRUZ5.min.js +1 -0
  26. package/dist/c-CXDAWBOW.min.js +1 -0
  27. package/dist/c-DHNROAXY.min.js +1 -0
  28. package/dist/{c-OSLNYZ3Q.min.js → c-DJ6DT5BL.min.js} +16 -16
  29. package/dist/c-DNBFFE3P.min.js +1 -0
  30. package/dist/{c-4P2EM44G.min.js → c-H5THWQI4.min.js} +3 -3
  31. package/dist/{c-XZJWL7UL.min.js → c-HOMJ3C6B.min.js} +1 -1
  32. package/dist/c-HR5AH3MA.min.js +1 -0
  33. package/dist/c-HTL37JCD.min.js +1 -0
  34. package/dist/{c-VZNIIKL6.min.js → c-JDI7HKEM.min.js} +1 -1
  35. package/dist/{c-RAIBDXDV.min.js → c-JDU4Y4IW.min.js} +1 -1
  36. package/dist/{c-ENRZPF5E.min.js → c-JS2D7A2P.min.js} +1 -1
  37. package/dist/c-L6OT4OVA.min.js +1 -0
  38. package/dist/c-LDGV6TDQ.min.js +1 -0
  39. package/dist/c-LW3GP7RY.min.js +1 -0
  40. package/dist/{c-I54V24WG.min.js → c-MSZ3ZDAP.min.js} +1 -1
  41. package/dist/{c-W5ATXREF.min.js → c-NB2UEX5C.min.js} +1 -1
  42. package/dist/{c-XOGN3524.min.js → c-NBBYSAQY.min.js} +2 -2
  43. package/dist/c-OMTJIC3P.min.js +1 -0
  44. package/dist/{c-HGWITEJI.min.js → c-OOR2LN4A.min.js} +1 -1
  45. package/dist/c-OU7A3IUL.min.js +1 -0
  46. package/dist/{c-2M2OPWVA.min.js → c-PNLTF6YG.min.js} +33 -33
  47. package/dist/c-QVKOXC3S.min.js +1 -0
  48. package/dist/{c-OIJL2WZH.min.js → c-TBMFC5CR.min.js} +1 -1
  49. package/dist/c-TFESQSWE.min.js +1 -0
  50. package/dist/c-TX53234M.min.js +1 -0
  51. package/dist/c-TZBEQ5UY.min.js +1 -0
  52. package/dist/c-UALVQIIJ.min.js +1 -0
  53. package/dist/{c-62JIVHK5.min.js → c-WFSEQ2XG.min.js} +1 -1
  54. package/dist/{c-4YPPVFZH.min.js → c-XF5ILLBG.min.js} +1 -1
  55. package/dist/c-YCBCZFOC.min.js +1 -0
  56. package/dist/c-YQHGEETR.min.js +2 -0
  57. package/dist/c-ZBSL4Y32.min.js +1 -0
  58. package/dist/c-ZMB3VTD4.min.js +1 -0
  59. package/dist/components/charts/shared/types.d.ts +1 -1
  60. package/dist/components/recipes/atlas/resolution/appearance.d.ts +1 -1
  61. package/dist/components/recipes/atlas/resolution/scene.d.ts +1 -1
  62. package/dist/components/semiotic-network-zoom.d.ts +1 -1
  63. package/dist/components/store/ThemeStore.d.ts +4 -1
  64. package/dist/components/store/themeCore.d.ts +2 -0
  65. package/dist/components/stream/mediaQuery.d.ts +2 -0
  66. package/dist/components/stream/networkEdgeHitIndex.d.ts +6 -2
  67. package/dist/components/stream/networkZoom/ZoomableNetworkCustomChart.d.ts +6 -4
  68. package/dist/components/stream/networkZoom/gestures.d.ts +5 -0
  69. package/dist/components/stream/networkZoom/types.d.ts +10 -0
  70. package/dist/components/stream/pipelineTransitionTypes.d.ts +3 -5
  71. package/dist/components/stream/pipelineTransitionUtils.d.ts +4 -0
  72. package/dist/components/stream/pipelineTransitions.d.ts +1 -13
  73. package/dist/components/stream/renderers/networkArcRenderer.d.ts +1 -3
  74. package/dist/components/stream/renderers/networkCircleRenderer.d.ts +1 -3
  75. package/dist/components/stream/renderers/networkPrimitiveRenderer.d.ts +5 -0
  76. package/dist/components/stream/renderers/networkRectRenderer.d.ts +1 -3
  77. package/dist/components/stream/renderers/renderPulse.d.ts +8 -14
  78. package/dist/components/stream/sceneToSVGShared.d.ts +9 -0
  79. package/dist/components/stream/shallowEqual.d.ts +2 -0
  80. package/dist/components/stream/useMediaPreferences.d.ts +1 -4
  81. package/dist/geo.min.js +152 -152
  82. package/dist/geo.module.min.js +1 -1
  83. package/dist/network.module.min.js +1 -1
  84. package/dist/ordinal.module.min.js +1 -1
  85. package/dist/physics.module.min.js +1 -1
  86. package/dist/semiotic-ai.module.min.js +2 -2
  87. package/dist/semiotic-atlas-selection.module.min.js +1 -1
  88. package/dist/semiotic-client-cjs-shared.min.js +1018 -1025
  89. package/dist/semiotic-client-shared.module.min.js +1 -1
  90. package/dist/semiotic-experimental-auxiliary.module.min.js +2 -2
  91. package/dist/semiotic-experimental-network-resolution-react.module.min.js +1 -1
  92. package/dist/semiotic-experimental-node-auxiliary.module.min.js +3 -3
  93. package/dist/semiotic-line.module.min.js +1 -1
  94. package/dist/semiotic-network-zoom.d.ts +1 -1
  95. package/dist/semiotic-network-zoom.min.js +7 -7
  96. package/dist/semiotic-network-zoom.module.min.js +1 -1
  97. package/dist/semiotic-realtime-core.module.min.js +1 -1
  98. package/dist/semiotic-server-edge-node.module.min.js +2 -2
  99. package/dist/semiotic-server-edge.min.js +394 -397
  100. package/dist/semiotic-server-edge.module.min.js +3 -3
  101. package/dist/semiotic-server-node.min.js +394 -397
  102. package/dist/semiotic-themes-core.min.js +2 -2
  103. package/dist/semiotic-themes-core.module.min.js +1 -1
  104. package/dist/semiotic-themes.min.js +2 -2
  105. package/dist/semiotic-themes.module.min.js +1 -1
  106. package/dist/semiotic-utils-core.min.js +11 -11
  107. package/dist/semiotic-utils-core.module.min.js +3 -3
  108. package/dist/semiotic-value.module.min.js +1 -1
  109. package/dist/semiotic.module.min.js +1 -1
  110. package/dist/server.min.js +394 -397
  111. package/dist/server.module.min.js +3 -3
  112. package/dist/xy.module.min.js +1 -1
  113. package/package.json +1 -1
  114. package/dist/c-3UXQGCQT.min.js +0 -1
  115. package/dist/c-4RVDKSMQ.min.js +0 -1
  116. package/dist/c-6WJKNYIG.min.js +0 -1
  117. package/dist/c-AQUX6L2O.min.js +0 -1
  118. package/dist/c-BR5QDUCR.min.js +0 -1
  119. package/dist/c-C3YQVUB6.min.js +0 -1
  120. package/dist/c-COP4OISO.min.js +0 -1
  121. package/dist/c-FAOZZE77.min.js +0 -1
  122. package/dist/c-HBLICBM6.min.js +0 -1
  123. package/dist/c-I4BEWAKT.min.js +0 -1
  124. package/dist/c-IDCFMBA4.min.js +0 -2
  125. package/dist/c-KLJDKRD5.min.js +0 -1
  126. package/dist/c-LEICSI5V.min.js +0 -1
  127. package/dist/c-MOK4RWNO.min.js +0 -1
  128. package/dist/c-NHZ2E3CI.min.js +0 -1
  129. package/dist/c-OWRVBUSL.min.js +0 -1
  130. package/dist/c-QIVKWHDL.min.js +0 -1
  131. package/dist/c-QUAEYF34.min.js +0 -1
  132. package/dist/c-RDFFLRKC.min.js +0 -1
  133. package/dist/c-RTU5425Z.min.js +0 -1
  134. package/dist/c-SU6Z75M2.min.js +0 -1
  135. package/dist/c-SWVXFUDL.min.js +0 -1
  136. package/dist/c-TC47SNSI.min.js +0 -1
  137. package/dist/c-VLWWXOM5.min.js +0 -1
  138. package/dist/c-VNFIRKU5.min.js +0 -1
  139. package/dist/c-WFX456JK.min.js +0 -5
  140. package/dist/c-WSWMQDFZ.min.js +0 -1
  141. package/dist/c-YGTMWEEF.min.js +0 -1
  142. package/dist/c-ZDCTFRA6.min.js +0 -1
@@ -1,4 +1,4 @@
1
- import{a as O}from"./c-BWJQSSAD.min.js";import{a as E}from"./c-LBXDHQZG.min.js";import{a as z,b as G,c as $,d as j}from"./c-RDFFLRKC.min.js";import{a as V}from"./c-GNTXRXRN.min.js";import{c as X,a as Y}from"./c-I54V24WG.min.js";import{e as K}from"./c-YSMCBJOI.min.js";import{c as Q,b as U,a as q}from"./c-C3YQVUB6.min.js";import{a as Z}from"./c-62JIVHK5.min.js";import{b as J,a as ee,d as te,c as oe,h as ie,g as ae}from"./c-ENRZPF5E.min.js";import{e as re}from"./c-YGTMWEEF.min.js";import{b as ne,g as le,f as se,e as ce,c as he,d as de}from"./c-LEICSI5V.min.js";import{e as me,l as ue,m as pe,j as ye}from"./c-ZWJDTDEV.min.js";import{k as ge,m as fe,i as be,j as xe,l as ve}from"./c-ZYMXDR42.min.js";import{I as we,F as Ae,Q as Se,R as ke,P as Ce,S as Le,H as Re}from"./c-W5ATXREF.min.js";import{b as _e}from"./c-363Q2L4Z.min.js";import{aX as He,bH as Ie,b as Fe,v as Pe,bb as Be,bJ as De,aY as Me,a$ as Te,r as Ne,aO as We,aM as Oe,aR as Ee,aN as ze,x as Ge,bN as $e,bA as je,aQ as Ve,bO as Xe,ba as Ye,a_ as Ke,bB as Qe,bF as Ue,bG as qe,by as Ze,bx as Je,bf as et,bi as tt,bm as ot,bD as it,as as at,ay as rt,ax as nt,aS as lt,aw as st,bu as ct,bn as ht,bI as dt}from"./c-SU6Z75M2.min.js";import{e as mt,f as ut}from"./c-KLJDKRD5.min.js";import{u as pt,b as yt,o as gt,v as ft,s as bt,r as xt,n as vt,d as wt,m as At}from"./c-WPL6PGP3.min.js";import{c as St}from"./c-VZNIIKL6.min.js";import{w as kt,z as Ct,y as Lt,D as Rt,t as _t,C as Ht,s as It}from"./c-TC47SNSI.min.js";import{a as Ft,c as Pt}from"./c-GRTKU3C7.min.js";import*as Bt from"react";import{useRef as Dt,useState as Mt,useCallback as Tt,useMemo as Nt,forwardRef as Wt,useImperativeHandle as Ot,useEffect as Et}from"react";import{jsx as zt,Fragment as Gt,jsxs as $t}from"react/jsx-runtime";import{scaleSequential as jt}from"d3-scale";function Vt(e){let{accessor:t,data:o,isPushMode:i}=e,a=Dt(null),[r,n]=Mt(0),l=Tt(e=>{if(!i||!t)return;let o=!1;for(let i of e){let e="function"==typeof t?t(i):i[t];if(null==e)continue;let r="number"==typeof e?e:Number(e);Number.isFinite(r)&&(a.current?(r<a.current[0]&&(a.current[0]=r,o=!0),r>a.current[1]&&(a.current[1]=r,o=!0)):(a.current=[r,r],o=!0))}o&&n(e=>e+1)},[i,t]),s=Tt(()=>{i&&(a.current=null,n(e=>e+1))},[i]);return{domain:Nt(()=>{if(i)return a.current??void 0;if(!t||0===o.length)return;let e="function"==typeof t?t:e=>e[t],r=1/0,n=-1/0;for(let t of o){let o=e(t);if(null==o)continue;let i="number"==typeof o?o:Number(o);Number.isFinite(i)&&(i<r&&(r=i),i>n&&(n=i))}return Number.isFinite(r)&&Number.isFinite(n)?[r,n]:void 0},[o,t,i,r]),trackPushed:l,reset:s}}function Xt(e,t){return yt(1===t?.5:e/(t-1))}function Yt(e){return e instanceof Date?`date:${e.getTime()}`:`${typeof e}:${String(e)}`}function Kt(e,t){let o=t=>e[Math.max(0,Math.min(e.length-1,Math.round(Number(t))))],i=e.every(e=>"number"==typeof e||e instanceof Date),a=t?void 0:Qt(e);return(r,n,l)=>{if(0===e.length)return"";let s=o(r);return t?t(s,n,l&&i?l.map(e=>Number(o(e).valueOf())):void 0):s instanceof Date&&a?a(s):String(s)}}function Qt(e){let t=e.filter(e=>e instanceof Date&&Number.isFinite(e.valueOf()));if(0===t.length)return;let o=t.every(e=>e.valueOf()%864e5==0),i=o&&t.every(e=>1===e.getUTCDate());if(i&&t.every(e=>0===e.getUTCMonth()))return e=>String(e.getUTCFullYear());if(i)return e=>`${he(e).split(" ")[0]} ${e.getUTCFullYear()}`;let a=t.map(e=>e.valueOf()),r=Ft(a);if(o){let e=new Date(r[0]).getUTCFullYear()===new Date(r[1]).getUTCFullYear();return t=>e?he(t):`${he(t)}, ${t.getUTCFullYear()}`}return de(r)}function Ut(e,t,o){return"function"==typeof e?e(t,o):t[e]}function qt(e,t){if(!e?.length)return;let o=new Map(t.map((e,t)=>[Yt(e),t]));return e.map(e=>{let t={...e},i=i=>{if(!(i in e))return;let a=o.get(Yt(e[i]));void 0!==a&&(t[i]=a)};return i("x"),i("x0"),i("x1"),"string"==typeof e.type&&("x-threshold"===e.type||"x"===e.type)&&i("value"),t})}function Zt(e){let t="number"==typeof e?e:"string"==typeof e&&""!==e.trim()?Number(e):NaN;return Number.isFinite(t)?Math.max(0,Math.floor(t)):void 0}function Jt(e){return"string"==typeof e&&""!==e.trim()?e:void 0}function eo(e){let{seriesOrder:t,overallOrder:o,highlightTop:i,color:a,colorScheme:r,neutralColor:n,themeCategorical:l,themeNeutral:s}=e;if(null==i&&null==a)return r;let c="string"==typeof r?[...gt(r,l)]:r,h=null==i?o.length:Math.max(0,Math.floor(i)),d=new Set(o.slice(0,h)),m= new Map,u={};for(let e of t)Object.defineProperty(u,e,{configurable:!0,enumerable:!0,writable:!0,value:a??(d.has(e)?ft(void 0,l,c,e,m):n??s??"#b8bec8")});return u}function to(e,t={}){let o=t.xAccessor??"x",a=t.yAccessor??"y",r=t.lineBy??"series",n=t.rankDirection??"descending",l=[],s= new Map,c= new Map,h=[],d= new Map,m=1/0,u=-1/0;e.forEach((e,t)=>{let i=Ut(o,e,t),n=Yt(i),p=s.get(n);null==p&&(p=l.length,s.set(n,p),l.push(i),c.set(p,[]));let y=String(Ut(r,e,t));d.has(y)||(d.set(y,h.length),h.push(y));let g=Number(Ut(a,e,t));Number.isFinite(g)&&(m=Math.min(m,g),u=Math.max(u,g),c.get(p)?.push({datum:e,inputIndex:t,series:y,value:g}))});let p=[],y= new Map,g= new Map;for(let e=0;e<l.length;e++){let t=c.get(e)??[];t.sort((e,t)=>("descending"===n?t.value-e.value:e.value-t.value)||(d.get(e.series)??0)-(d.get(t.series)??0)),t.forEach((t,o)=>{let i=o+1;p.push({datum:t.datum,xIndex:e,xValue:l[e],series:t.series,value:t.value,rank:i}),y.set(t.series,(y.get(t.series)??0)+i),g.set(t.series,(g.get(t.series)??0)+1)})}let f=h.length+1,b=[...h].sort((e,t)=>{let o=g.get(e)??0,i=g.get(t)??0;return((y.get(e)??0)+(l.length-o)*f)/Math.max(1,l.length)-((y.get(t)??0)+(l.length-i)*f)/Math.max(1,l.length)||(d.get(e)??0)-(d.get(t)??0)}),x=null==t.highlightTop?b.length:Math.max(0,Math.floor(t.highlightTop)),v=new Set(b.slice(0,x));return{data:p.map(e=>{let t=v.has(e.series);return{...e.datum,x:e.xIndex,y:e.rank,__bumpRaw:e.datum,__bumpSeries:e.series,__bumpColorGroup:t?e.series:i,__bumpValue:e.value,__bumpRank:e.rank,__bumpXValue:e.xValue,__bumpHighlighted:t}}),xValues:l,seriesOrder:h,overallOrder:b,valueExtent:m===1/0?[0,0]:[m,u]}}function oo({tooltip:e,xValues:t,xFormat:o,yFormat:i}){let a=Nt(()=>Kt(t,o),[o,t]),r=Tt(e=>i?i(e):e.toLocaleString(),[i]),n=Oe(e),l=Nt(()=>n?void 0:Ee(e),[n,e]),s=Tt(t=>{let o=t?.data??t;return o&&!1!==e?l?l({...t,data:o.__bumpRaw,__semioticHoverData:!0}): $t(kt,{children:[
1
+ import{a as O}from"./c-BWJQSSAD.min.js";import{a as E}from"./c-LBXDHQZG.min.js";import{a as z,b as G,c as $,d as j}from"./c-5EPR4KFB.min.js";import{a as V}from"./c-GNTXRXRN.min.js";import{c as X,a as Y}from"./c-MSZ3ZDAP.min.js";import{e as Q}from"./c-YSMCBJOI.min.js";import{c as U,b as K,a as q}from"./c-BR2TOCUN.min.js";import{a as J}from"./c-WFSEQ2XG.min.js";import{b as Z,a as ee,d as te,c as oe,h as ie,g as ae}from"./c-JS2D7A2P.min.js";import{e as re}from"./c-5NAU4JAY.min.js";import{b as ne,g as le,f as se,e as ce,c as he,d as de}from"./c-BRBTXINY.min.js";import{e as me,l as ue,m as pe,j as ye}from"./c-AMQAAW7G.min.js";import{k as ge,m as fe,i as be,j as xe,l as ve}from"./c-ZYMXDR42.min.js";import{I as Ae,F as we,Q as Se,R as ke,P as Ce,S as Le,H as Re}from"./c-NB2UEX5C.min.js";import{b as _e}from"./c-363Q2L4Z.min.js";import{aY as He,bI as Ie,b as Fe,v as Pe,bc as Be,bK as De,aZ as Me,a_ as Te,r as Ne,aP as We,aN as Oe,aS as Ee,aO as ze,x as Ge,bO as $e,bB as je,aR as Ve,bP as Xe,bb as Ye,ba as Qe,bC as Ue,bG as Ke,bH as qe,bz as Je,by as Ze,bg as et,bj as tt,bn as ot,bE as it,at,az as rt,ay as nt,aT as lt,ax as st,bv as ct,bo as ht,bJ as dt}from"./c-L6OT4OVA.min.js";import{e as mt,f as ut}from"./c-OU7A3IUL.min.js";import{u as pt,b as yt,o as gt,v as ft,s as bt,r as xt,n as vt,d as At,m as wt}from"./c-WPL6PGP3.min.js";import{c as St}from"./c-JDI7HKEM.min.js";import{A as kt,D as Ct,C as Lt,H as Rt,x as _t,G as Ht,w as It}from"./c-HTL37JCD.min.js";import{a as Ft,c as Pt}from"./c-GRTKU3C7.min.js";import*as Bt from"react";import{useRef as Dt,useState as Mt,useCallback as Tt,useMemo as Nt,forwardRef as Wt,useImperativeHandle as Ot,useEffect as Et}from"react";import{jsx as zt,Fragment as Gt,jsxs as $t}from"react/jsx-runtime";import{scaleSequential as jt}from"d3-scale";function Vt(e){let{accessor:t,data:o,isPushMode:i}=e,a=Dt(null),[r,n]=Mt(0),l=Tt(e=>{if(!i||!t)return;let o=!1;for(let i of e){let e="function"==typeof t?t(i):i[t];if(null==e)continue;let r="number"==typeof e?e:Number(e);Number.isFinite(r)&&(a.current?(r<a.current[0]&&(a.current[0]=r,o=!0),r>a.current[1]&&(a.current[1]=r,o=!0)):(a.current=[r,r],o=!0))}o&&n(e=>e+1)},[i,t]),s=Tt(()=>{i&&(a.current=null,n(e=>e+1))},[i]);return{domain:Nt(()=>{if(i)return a.current??void 0;if(!t||0===o.length)return;let e="function"==typeof t?t:e=>e[t],r=1/0,n=-1/0;for(let t of o){let o=e(t);if(null==o)continue;let i="number"==typeof o?o:Number(o);Number.isFinite(i)&&(i<r&&(r=i),i>n&&(n=i))}return Number.isFinite(r)&&Number.isFinite(n)?[r,n]:void 0},[o,t,i,r]),trackPushed:l,reset:s}}function Xt(e,t){return yt(1===t?.5:e/(t-1))}function Yt(e){return e instanceof Date?`date:${e.getTime()}`:`${typeof e}:${String(e)}`}function Qt(e,t){let o=t=>e[Math.max(0,Math.min(e.length-1,Math.round(Number(t))))],i=e.every(e=>"number"==typeof e||e instanceof Date),a=t?void 0:Ut(e);return(r,n,l)=>{if(0===e.length)return"";let s=o(r);return t?t(s,n,l&&i?l.map(e=>Number(o(e).valueOf())):void 0):s instanceof Date&&a?a(s):String(s)}}function Ut(e){let t=e.filter(e=>e instanceof Date&&Number.isFinite(e.valueOf()));if(0===t.length)return;let o=t.every(e=>e.valueOf()%864e5==0),i=o&&t.every(e=>1===e.getUTCDate());if(i&&t.every(e=>0===e.getUTCMonth()))return e=>String(e.getUTCFullYear());if(i)return e=>`${he(e).split(" ")[0]} ${e.getUTCFullYear()}`;let a=t.map(e=>e.valueOf()),r=Ft(a);if(o){let e=new Date(r[0]).getUTCFullYear()===new Date(r[1]).getUTCFullYear();return t=>e?he(t):`${he(t)}, ${t.getUTCFullYear()}`}return de(r)}function Kt(e,t,o){return"function"==typeof e?e(t,o):t[e]}function qt(e,t){if(!e?.length)return;let o=new Map(t.map((e,t)=>[Yt(e),t]));return e.map(e=>{let t={...e},i=i=>{if(!(i in e))return;let a=o.get(Yt(e[i]));void 0!==a&&(t[i]=a)};return i("x"),i("x0"),i("x1"),"string"==typeof e.type&&("x-threshold"===e.type||"x"===e.type)&&i("value"),t})}function Jt(e){let t="number"==typeof e?e:"string"==typeof e&&""!==e.trim()?Number(e):NaN;return Number.isFinite(t)?Math.max(0,Math.floor(t)):void 0}function Zt(e){return"string"==typeof e&&""!==e.trim()?e:void 0}function eo(e){let{seriesOrder:t,overallOrder:o,highlightTop:i,color:a,colorScheme:r,neutralColor:n,themeCategorical:l,themeNeutral:s}=e;if(null==i&&null==a)return r;let c="string"==typeof r?[...gt(r,l)]:r,h=null==i?o.length:Math.max(0,Math.floor(i)),d=new Set(o.slice(0,h)),m= new Map,u={};for(let e of t)Object.defineProperty(u,e,{configurable:!0,enumerable:!0,writable:!0,value:a??(d.has(e)?ft(void 0,l,c,e,m):n??s??"#b8bec8")});return u}function to(e,t={}){let o=t.xAccessor??"x",a=t.yAccessor??"y",r=t.lineBy??"series",n=t.rankDirection??"descending",l=[],s= new Map,c= new Map,h=[],d= new Map,m=1/0,u=-1/0;e.forEach((e,t)=>{let i=Kt(o,e,t),n=Yt(i),p=s.get(n);null==p&&(p=l.length,s.set(n,p),l.push(i),c.set(p,[]));let y=String(Kt(r,e,t));d.has(y)||(d.set(y,h.length),h.push(y));let g=Number(Kt(a,e,t));Number.isFinite(g)&&(m=Math.min(m,g),u=Math.max(u,g),c.get(p)?.push({datum:e,inputIndex:t,series:y,value:g}))});let p=[],y= new Map,g= new Map;for(let e=0;e<l.length;e++){let t=c.get(e)??[];t.sort((e,t)=>("descending"===n?t.value-e.value:e.value-t.value)||(d.get(e.series)??0)-(d.get(t.series)??0)),t.forEach((t,o)=>{let i=o+1;p.push({datum:t.datum,xIndex:e,xValue:l[e],series:t.series,value:t.value,rank:i}),y.set(t.series,(y.get(t.series)??0)+i),g.set(t.series,(g.get(t.series)??0)+1)})}let f=h.length+1,b=[...h].sort((e,t)=>{let o=g.get(e)??0,i=g.get(t)??0;return((y.get(e)??0)+(l.length-o)*f)/Math.max(1,l.length)-((y.get(t)??0)+(l.length-i)*f)/Math.max(1,l.length)||(d.get(e)??0)-(d.get(t)??0)}),x=null==t.highlightTop?b.length:Math.max(0,Math.floor(t.highlightTop)),v=new Set(b.slice(0,x));return{data:p.map(e=>{let t=v.has(e.series);return{...e.datum,x:e.xIndex,y:e.rank,__bumpRaw:e.datum,__bumpSeries:e.series,__bumpColorGroup:t?e.series:i,__bumpValue:e.value,__bumpRank:e.rank,__bumpXValue:e.xValue,__bumpHighlighted:t}}),xValues:l,seriesOrder:h,overallOrder:b,valueExtent:m===1/0?[0,0]:[m,u]}}function oo({tooltip:e,xValues:t,xFormat:o,yFormat:i}){let a=Nt(()=>Qt(t,o),[o,t]),r=Tt(e=>i?i(e):e.toLocaleString(),[i]),n=Oe(e),l=Nt(()=>n?void 0:Ee(e),[n,e]),s=Tt(t=>{let o=t?.data??t;return o&&!1!==e?l?l({...t,data:o.__bumpRaw,__semioticHoverData:!0}): $t(kt,{children:[
2
2
  zt("div",{style:{fontWeight:700},children:o.__bumpSeries}),
3
3
  $t("div",{children:[a(o.x)," · Rank ",o.__bumpRank]}),
4
4
  $t("div",{children:["Value: ",r(o.__bumpValue)]})]}):null},[r,a,l,e]),c=Tt(t=>{let o=(Array.isArray(t.allSeries)?t.allSeries:[]).map(e=>{let t=e.datum;return{...e,value:t?.__bumpValue??e.value,rank:t?.__bumpRank,datum:t?.__bumpRaw??e.datum}}),i=t?.data??t,n={...i?.__bumpRaw??{},xValue:i?.__bumpXValue??t.xValue,allSeries:o};if(ze(e)&&"function"==typeof e.content)return e.content(n);let l=t.xValue??i?.x;
@@ -7,45 +7,45 @@ return $t(kt,{children:[null!=l&& zt("div",{style:{fontWeight:700,marginBottom:4
7
7
  zt("span",{style:{flex:1},children:e.group}),
8
8
  $t("span",{children:[null!=e.rank?`Rank ${e.rank} · `:"",r(e.value)]})]},`${e.group}-${t}`))]})},[r,a,e]);return{tooltip:Nt(()=>{if(!1===e)return!1;let t=n?c:s,o=(n?ze(e)&&Ct(e.content):Ct(l))?Lt(t):t;return n?{mode:"multi",content:o,chrome:ze(e)?e.chrome:void 0}:o},[n,c,l,s,e]),formatX:a}}function io(e,t,o,i,a){let r=1-a;return r*r*r*e+3*r*r*a*t+3*r*a*a*o+a*a*a*i}function ao(e,t,o,i,a){let r=1-a;return 3*r*r*(t-e)+6*r*a*(o-t)+3*a*a*(i-o)}function ro(e,t,o,i,a){let r=[],n=(e.x+t.x)/2;for(let l=0;l<=a;l++){let s,c,h,d,m=l/a;"linear"===i?(s=e.x+(t.x-e.x)*m,c=e.y+(t.y-e.y)*m,h=t.x-e.x,d=t.y-e.y):(s=io(e.x,n,n,t.x,m),c=io(e.y,e.y,t.y,t.y,m),h=ao(e.x,n,n,t.x,m),d=ao(e.y,e.y,t.y,t.y,m)),r.push({x:s,y:c,dx:h,dy:d,radius:e.radius+(t.radius-e.radius)*m,datumIndex:m<.5?o:o+1})}return r}function no(e,t){let o=e.length-1,i=Math.sign(e[o][0]-e[t][0])||1,a=i*e[o][0],r=i*e[t][0];for(let n=t+1;n<o;n++){let t=Math.max(r,Math.min(a,i*e[n][0]));e[n][0]=i*t,r=t}for(let i=t;i<o;i++){let t=i;for(;t<o&&e[t+1][0]===e[i][0];)t++;for(let o=i+1;o<t;o++)e[o][1]=e[i][1]+(e[t][1]-e[i][1])*(o-i)/(t-i);i=t}let n=1e-6*(a-i*e[t][0])/(o-t);r=i*e[t][0];for(let l=t+1;l<o;l++){let t=Math.max(r+n,Math.min(i*e[l][0],a-(o-l)*n));e[l][0]=i*t,r=t}}function lo(e,t={}){let o=[],i=[],a=[];if(e.length<2)return{topPath:o,bottomPath:i,datumIndices:a};let r=t.curve??"smooth",n=Math.max(2,Math.floor(t.samplesPerSegment??12));for(let t=0;t<e.length-1;t++){let l=Math.max(0,o.length-1),s=ro(e[t],e[t+1],t,r,n);for(let e=0===t?0:1;e<s.length;e++){let t=s[e],r=Math.hypot(t.dx,t.dy)||1,n=-t.dy/r,l=t.dx/r,c=Math.max(0,t.radius);o.push([t.x+n*c,t.y+l*c]),i.push([t.x-n*c,t.y-l*c]),a.push(t.datumIndex)}no(o,l),no(i,l)}return{topPath:o,bottomPath:i,datumIndices:a}}function so(e,t){let o=0;for(let t of e)o+=(t.codePointAt(0)??0)>=11904?c:h.find(([e])=>e.test(t))?.[1]??(t.toLowerCase()!==t?d:m);return o*t*u}function co(e){let t=e.fontSize??12,o=!0===e.showLabels?"end":e.showLabels,i="end"===o||"both"===o||"auto"===o,c="start"===o||"both"===o,h=e.labels.reduce((e,o)=>Math.max(e,so(o,t)),0),d=Math.round(e.width*(e.maxSideFraction??.38)),m=so(String(Math.max(1,e.rankCount)),t),u=e.showAxes?r+m+s:r,p=e.showAxes&&e.yLabel?l:0,y={start:u+n+p,end:r+n},g=e.legendSide?Ge({legendGroups:[{label:"",styleFn:()=>({}),items:e.labels.map(e=>({label:e}))}]},{sideGutter:0}):0,f=so("MMM",t),b=(t,o)=>Math.min(o+h,e.legendSide===t?Math.max(o+f,d-g):d),x={start:c?b("left",y.start):0,end:i?b("right",y.end):0},v=!1===e.showLabels?24:110;return{margin:{...a,right:Math.max(v,x.end),left:Math.max(a.left,x.start)},startLabelOffset:u,chrome:y,room:x,labelWidth:h,fontSize:t,hasStart:c,hasEnd:i}}function ho(e,t){let o={start:t.hasStart?Math.max(0,Math.min(e.left,t.room.start)-t.chrome.start):0,end:t.hasEnd?Math.max(0,Math.min(e.right,t.room.end)-t.chrome.end):0};return{budget:o,sideGutter:{...t.hasStart&&{left:t.chrome.start+Math.min(o.start,t.labelWidth)},...t.hasEnd&&{right:t.chrome.end+Math.min(o.end,t.labelWidth)}}}}function mo(e,t,o){if(so(e,o)<=t)return{text:e,truncated:!1};let i=Array.from(e),a=i.length-1;for(;a>0&&so(`${i.slice(0,a).join("")}…`,o)>t;)a--;return{text:`${i.slice(0,a).join("").trimEnd()}…`,truncated:!0}}function uo(e,t,o,i){let a=Math.max(1,Math.floor(t/18)),r="auto"===o?Number.isFinite(i)&&(i??0)>=0?Math.min(a,Math.floor(i)):a:1/0,n=e.map((e,t)=>({candidate:e,index:t})).sort((e,t)=>{let o=e.candidate.priority??0;return(t.candidate.priority??0)-o||Number(t.candidate.highlighted)-Number(e.candidate.highlighted)||e.candidate.rank-t.candidate.rank||e.index-t.index}),l=[];for(let{candidate:e}of n){if(l.length>=r)break;l.some(t=>t.side===e.side&&Math.abs(t.y-e.y)<14)||l.push(e)}return new Set(l.map(e=>e.id))}function po({datum:e,x:t,y:o,side:i,color:a,highlighted:r,labelStyle:n,offset:l,budget:s,fontSize:c}){let h=_e(),d=h.isActive&&!h.predicate(e),m="function"==typeof n?n(e.__bumpRaw):n,u=null==s?{text:e.__bumpSeries,truncated:!1}:mo(e.__bumpSeries,s,c);
9
9
  return $t("text",{className:"semiotic-bump-label",x:t+("end"===i?l:-l),y:o,dy:"0.35em",textAnchor:"end"===i?"start":"end",fill:a,fillOpacity:d?.16:1,fontWeight:r?650:450,fontSize:12,style:{pointerEvents:"none",fontFamily:"var(--semiotic-font-family, sans-serif)",fontSize:"var(--semiotic-axis-label-font-size, 12px)",...m},children:[u.truncated&& zt("title",{children:e.__bumpSeries}),u.text]})}function yo(e){let t=Array.isArray(e.datum)?e.datum[0]:e.datum;return t&&"object"==typeof t&&"__bumpSeries"in t?t:void 0}function go(e,t,o){let[i,a]=t,[r,n]=o;return a===i?(r+n)/2:r+(n-r)*Math.max(0,Math.min(1,(e-i)/(a-i)))}function fo(e){let t=e.__bumpXValue instanceof Date?e.__bumpXValue.getTime():Number(e.__bumpXValue);return{value:e.__bumpValue,x:Number.isFinite(t)?t:void 0,y:e.__bumpValue,category:e.__bumpSeries}}function bo(e){let t=e.config,o= new Map;for(let t of e.data){let e=o.get(t.__bumpSeries)??[];e.push(t),o.set(t.__bumpSeries,e)}let i=t.seriesOrder.filter(e=>o.has(e)).sort((e,i)=>(o.get(e)?.[0]?.__bumpHighlighted?1:0)-(o.get(i)?.[0]?.__bumpHighlighted?1:0)||t.seriesOrder.indexOf(e)-t.seriesOrder.indexOf(i)),a=[],r=[],n=[];for(let r of i){let i=(o.get(r)??[]).sort((e,t)=>e.x-t.x);if(i.length<2)continue;let l=i[0].__bumpHighlighted,s=(t.colorMap&&bt(t.colorMap,r))??e.resolveColor(i[0].__bumpSeries,i[0]),c=t.color??(l?s:t.neutralColor??e.theme.semantic.textSecondary??e.theme.semantic.border??s),h=i.map(o=>({x:e.scales.x(o.x),y:e.scales.y(o.y),radius:t.ribbon?go(o.__bumpValue,t.valueExtent,t.ribbonSizeRange)/2:Math.max(.5,t.lineWidth/2)})),d=lo(h,{curve:t.curve,samplesPerSegment:t.samplesPerSegment}),m={fill:c,fillOpacity:1,opacity:l?t.ribbon?t.ribbonOpacity:t.lineOpacity:Math.min(t.ribbon?t.ribbonOpacity:t.lineOpacity,.58)};t.styleRules?.length&&Object.assign(m,$e(i[0].__bumpRaw,t.styleRules,fo(i[0]))),t.areaStyle&&Object.assign(m,t.areaStyle(i[0].__bumpRaw)??{}),void 0!==t.stroke&&(m.stroke=t.stroke),void 0!==t.strokeWidth&&(m.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(m.opacity=t.opacity),a.push({type:"area",topPath:d.topPath,bottomPath:d.bottomPath,_hitArea:!0,style:m,datum:d.datumIndices.map(e=>i[e]),accessibleDatum:i.map(e=>e.__bumpRaw),accessibility:{label:`${r} ranking trajectory`,tableFields:i.map(e=>e.__bumpRaw)},group:r,interactive:!0}),t.showPoints&&i.forEach((e,o)=>{let i={fill:c,stroke:"none",opacity:l?1:.75};t.styleRules?.length&&Object.assign(i,$e(e.__bumpRaw,t.styleRules,fo(e))),t.pointStyle&&Object.assign(i,t.pointStyle(e.__bumpRaw)??{}),void 0!==t.stroke&&(i.stroke=t.stroke),void 0!==t.strokeWidth&&(i.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(i.opacity=t.opacity),a.push({type:"point",x:h[o].x,y:h[o].y,r:i.r??t.pointRadius,style:i,datum:e,accessibleDatum:e.__bumpRaw,accessibility:{label:`${r}, rank ${e.__bumpRank}, value ${e.__bumpValue}`},pointId:`${r}:${e.x}`})});let u=!0===t.showLabels?"end":t.showLabels,p=(e,o,i)=>{let a=null==t.labelPriorityAccessor?void 0:"function"==typeof t.labelPriorityAccessor?t.labelPriorityAccessor(e.__bumpRaw):Number(e.__bumpRaw[t.labelPriorityAccessor]);n.push({id:`${r}\0${i}`,datum:e,x:h[o].x,y:h[o].y,side:i,rank:e.__bumpRank,highlighted:l,priority:Number.isFinite(a)?a:void 0,color:"string"==typeof m.fill?m.fill:c})};("start"===u||"both"===u)&&p(i[0],0,"start"),("end"===u||"both"===u||"auto"===u)&&p(i.at(-1),i.length-1,"end")}let l=!0===t.showLabels?"end":t.showLabels,s=uo(n,e.dimensions.plot.height,"auto"!==l||"auto",t.maxLabels);for(let e of n)s.has(e.id)&&r.push(
10
- zt(po,{datum:e.datum,x:e.x,y:e.y,side:e.side,color:e.color,highlighted:e.highlighted,labelStyle:t.labelStyle,offset:"end"===e.side?8:t.startLabelOffset??8,budget:t.labelBudget?.[e.side],fontSize:t.labelFontSize??12},e.id));return{nodes:a,overlays:r.length? zt("g",{className:"semiotic-bump-labels",children:r}):void 0,restyle:(e,t)=>{let o=yo(e);if(t?.isActive&&o&&!t.predicate(o))return{opacity:.14}}}}function xo({data:e,safeData:t,areaBy:o,lineDataAccessor:i}){if(null==e)return[];let a,r=void 0!==t[0]?.[i];if(!r&&!o)return t;if(r)a=t;else{let e=t.reduce((e,t)=>{let a="function"==typeof o?o(t):t[o],r=String(a);if(!e[r]){let t={[i]:[]};"string"==typeof o&&(t[o]=a),e[r]=t}return e[r][i].push(t),e},{});a=Object.values(e)}return a.flatMap(e=>{let t=Array.isArray(e[i])?e[i]:[];return"string"==typeof o?t.map(t=>({...t,[o]:t[o]??e[o]})):t})}function vo(e){let{safeData:t,data:o,areaBy:i,lineDataAccessor:a,colorBy:r,colorScale:n,color:l,stroke:s,strokeWidth:c,opacity:h,effectiveSelectionHook:d,resolvedSelection:m,areaOpacity:u,showLine:p,lineWidth:y,showPoints:g,pointRadius:f,xAccessor:b,yAccessor:x,xLabel:v,yLabel:w,xFormat:A,yFormat:S,groupField:k,styleRules:C,ruleContext:L}=e,R=Nt(()=>xo({data:o,safeData:t,areaBy:i,lineDataAccessor:a}),[o,t,i,a]),_=Nt(()=>e=>{let t={};if(r){if(n){let o=xt(e,r,n);t.fill=o,p?(t.stroke=o,t.strokeWidth=y):t.stroke="none"}}else{let e=l||vt;t.fill=e,p?(t.stroke=e,t.strokeWidth=y):t.stroke="none"}return t.fillOpacity=u,C&&C.length>0&&Object.assign(t,$e(e,C,L?L(e):{value:void 0})),t},[r,n,l,u,p,y,C,L]),H=Nt(()=>Le(_,{stroke:s,strokeWidth:c,opacity:h}),[_,s,c,h]),I=Nt(()=>ut(H,d??null,m),[H,d,m]),F=Nt(()=>{if(g)return e=>{let t={r:f,fillOpacity:1};return r?n&&(t.fill=xt(e.parentLine||e,r,n)):t.fill=l||vt,t}},[g,f,r,n,l]);return{flattenedData:R,lineStyle:I,pointStyle:F,defaultTooltipContent:Nt(()=>we([{label:v||Ae(b),accessor:b,role:"x",format:A},{label:w||Ae(x),accessor:x,role:"y",format:S},...k?[{label:Ae(k),accessor:k,role:"group"}]:[],...Re(e.band,S)]),[b,x,v,w,k,A,S,e.band])}}function wo(e,t,o,i){if(!e.length)return[];let a=e.filter(e=>Number.isFinite(t(e))).sort((e,o)=>t(e)-t(o)),r=[],n=0,l=null,s=null,c=[],h=(e,t)=>e>t?"A":t>e?"B":null,d=e=>`seg-${n}-${e}`,m=e=>r.push(e),u=(e,t)=>{m({__x:e.x,__y:e.y,__y0:e.y,__diffSegment:d(t),__diffWinner:t,__valA:e.y,__valB:e.y,__sourceDatum:e.datum})};for(let e=0;e<a.length;e++){let r=a[e],p=t(r),y=o(r),g=i(r);if(!Number.isFinite(p)||!Number.isFinite(y)||!Number.isFinite(g))continue;let f=h(y,g);if(null!==f){if(null==l){l=f;for(let e of c)u(e,l);c=[],m({__x:p,__y:y>=g?y:g,__y0:y>=g?g:y,__diffSegment:d(l),__diffWinner:l,__valA:y,__valB:g,__sourceDatum:r}),s={x:p,a:y,b:g,w:f};continue}if(s&&s.w!==f){let e,t;if(c.length>0)e=c[0].x,t=c[0].y;else{let o=y-s.a-(g-s.b);if(0!==o){let i=(s.b-s.a)/o,a=Math.max(0,Math.min(1,i));e=s.x+a*(p-s.x),t=s.a+a*(y-s.a)}else e=s.x,t=s.a}m({__x:e,__y:t,__y0:t,__diffSegment:d(l),__diffWinner:l,__valA:t,__valB:t}),n++,l=f,m({__x:e,__y:t,__y0:t,__diffSegment:d(l),__diffWinner:l,__valA:t,__valB:t});for(let e=1;e<c.length;e++)u(c[e],l)}else for(let e of c)u(e,l);c=[],m({__x:p,__y:y>=g?y:g,__y0:y>=g?g:y,__diffSegment:d(l),__diffWinner:l,__valA:y,__valB:g,__sourceDatum:r}),s={x:p,a:y,b:g,w:f}}else c.push({x:p,y:y,datum:r})}for(let e of c)u(e,l??"A");return r}function Ao(e){if("A"===e.__diffWinner||"B"===e.__diffWinner)return e.__diffWinner;let t=String(e.__diffSegment??"");return"line-A"===t||t.endsWith("-A")?"A":"B"}function So(e,t){return Xe(e,t,e=>{let t=Number(e.__x),o=Number(e.__y);return{value:Number.isFinite(o)?o:void 0,x:Number.isFinite(t)?t:void 0,y:Number.isFinite(o)?o:void 0,category:Ao(e)}},e=>e.__sourceDatum?{...e.__sourceDatum,...e}:e)}function ko(e){let{seriesAColor:t,seriesBColor:o,areaOpacity:i,styleRules:a}=e;return So(e=>({fill:"A"===Ao(e)?t:o,stroke:"none",fillOpacity:i}),a)}function Co(e){let{seriesAColor:t,seriesBColor:o,lineWidth:i,styleRules:a}=e;return So(e=>({stroke:"A"===Ao(e)?t:o,strokeWidth:i,fill:"none"}),a)}function Lo(e){let{seriesAColor:t,seriesBColor:o,pointRadius:i,styleRules:a}=e;return So(e=>({fill:"A"===Ao(e)?t:o,r:i}),a)}function Ro(e){if(null==e)return NaN;if("number"==typeof e)return e;if(e instanceof Date)return e.getTime();if("string"==typeof e){if(""===e.trim())return NaN;let t=+e;return Number.isFinite(t)?t:NaN}return NaN}function _o(e,t,o,i){if(!e.length)return[];let a=e.filter(e=>Number.isFinite(t(e))).sort((e,o)=>t(e)-t(o)),r=[];for(let e of a){let a=t(e),n=o(e),l=i(e);Number.isFinite(n)&&r.push({__x:a,__y:n,__diffSegment:"line-A",__diffWinner:"A",__sourceDatum:e}),Number.isFinite(l)&&r.push({__x:a,__y:l,__diffSegment:"line-B",__diffWinner:"B",__sourceDatum:e})}return r}function Ho(e){let[t,o]=Bt.useState(()=>A);return Bt.useEffect(()=>{if(t)return;let e=!1;return(A?Promise.resolve(A):(S||(S=import("./c-HPT33CWH.min.js").then(e=>A=e.ScatterplotMatrixBrushOverlay).catch(e=>{throw S=null,e})),S)).then(t=>{e||o(()=>t)}).catch(()=>{}),()=>{e=!0}},[t]),t? zt(t,{...e}):null}function Io({data:e,xField:t,yField:o,fieldLabels:i,cellSize:a,pointRadius:r,pointOpacity:n,styleRules:l,colorBy:s,colorScale:c,brushSelectionName:h,hoverSelectionName:d,unselectedOpacity:m,showGrid:u,maxDevicePixelRatio:p,mobileInteraction:y,mode:g,onPointHover:f,onPointClick:b}){me(J);let x=Dt(null),v=et({name:h,clientId:`splom-${t}-${o}`,fields:[t,o]}),w=tt({name:h,xField:t,yField:o}),A=et({name:d,clientId:C,fields:[k]}),S=A.selectPoints,R=Tt(e=>{e?w.brushInteraction.during(e):w.brushInteraction.end(null)},[w.brushInteraction]),_=Tt(e=>{if(!e)return void f?.(null);let t=e.data,o=t?.[k];void 0!==o&&(S({[k]:[o]}),f?.(t,e.x+L.left,e.y+L.top))},[S,f]),H=Tt(e=>{if(!e)return void b?.(null);let t=e.data;t&&b?.(t,e.x+L.left,e.y+L.top)},[b]),I=Nt(()=>De(t,o),[t,o]),F=Nt(()=>Xe(e=>({opacity:n,r:r,fill:s?xt(e,s,c):vt}),l,I),[n,r,s,c,l,I]),P=Tt(e=>{let t={...F(e)};return"hover"===g?A.isActive&&A.predicate(e)?(t.opacity=1,t.r=2.5*r,t.stroke="#333",t.strokeWidth=1.5):A.isActive&&(t.opacity=.6*("number"==typeof t.opacity?t.opacity:n)):v.isActive&&!v.predicate(e)&&(t.opacity=m),t},[F,g,A,v,m,r,n]);
10
+ zt(po,{datum:e.datum,x:e.x,y:e.y,side:e.side,color:e.color,highlighted:e.highlighted,labelStyle:t.labelStyle,offset:"end"===e.side?8:t.startLabelOffset??8,budget:t.labelBudget?.[e.side],fontSize:t.labelFontSize??12},e.id));return{nodes:a,overlays:r.length? zt("g",{className:"semiotic-bump-labels",children:r}):void 0,restyle:(e,t)=>{let o=yo(e);if(t?.isActive&&o&&!t.predicate(o))return{opacity:.14}}}}function xo({data:e,safeData:t,areaBy:o,lineDataAccessor:i}){if(null==e)return[];let a,r=void 0!==t[0]?.[i];if(!r&&!o)return t;if(r)a=t;else{let e=t.reduce((e,t)=>{let a="function"==typeof o?o(t):t[o],r=String(a);if(!e[r]){let t={[i]:[]};"string"==typeof o&&(t[o]=a),e[r]=t}return e[r][i].push(t),e},{});a=Object.values(e)}return a.flatMap(e=>{let t=Array.isArray(e[i])?e[i]:[];return"string"==typeof o?t.map(t=>({...t,[o]:t[o]??e[o]})):t})}function vo(e){let{safeData:t,data:o,areaBy:i,lineDataAccessor:a,colorBy:r,colorScale:n,color:l,stroke:s,strokeWidth:c,opacity:h,effectiveSelectionHook:d,resolvedSelection:m,areaOpacity:u,showLine:p,lineWidth:y,showPoints:g,pointRadius:f,xAccessor:b,yAccessor:x,xLabel:v,yLabel:A,xFormat:w,yFormat:S,groupField:k,styleRules:C,ruleContext:L}=e,R=Nt(()=>xo({data:o,safeData:t,areaBy:i,lineDataAccessor:a}),[o,t,i,a]),_=Nt(()=>e=>{let t={};if(r){if(n){let o=xt(e,r,n);t.fill=o,p?(t.stroke=o,t.strokeWidth=y):t.stroke="none"}}else{let e=l||vt;t.fill=e,p?(t.stroke=e,t.strokeWidth=y):t.stroke="none"}return t.fillOpacity=u,C&&C.length>0&&Object.assign(t,$e(e,C,L?L(e):{value:void 0})),t},[r,n,l,u,p,y,C,L]),H=Nt(()=>Le(_,{stroke:s,strokeWidth:c,opacity:h}),[_,s,c,h]),I=Nt(()=>ut(H,d??null,m),[H,d,m]),F=Nt(()=>{if(g)return e=>{let t={r:f,fillOpacity:1};return r?n&&(t.fill=xt(e.parentLine||e,r,n)):t.fill=l||vt,t}},[g,f,r,n,l]);return{flattenedData:R,lineStyle:I,pointStyle:F,defaultTooltipContent:Nt(()=>Ae([{label:v||we(b),accessor:b,role:"x",format:w},{label:A||we(x),accessor:x,role:"y",format:S},...k?[{label:we(k),accessor:k,role:"group"}]:[],...Re(e.band,S)]),[b,x,v,A,k,w,S,e.band])}}function Ao(e,t,o,i){if(!e.length)return[];let a=e.filter(e=>Number.isFinite(t(e))).sort((e,o)=>t(e)-t(o)),r=[],n=0,l=null,s=null,c=[],h=(e,t)=>e>t?"A":t>e?"B":null,d=e=>`seg-${n}-${e}`,m=e=>r.push(e),u=(e,t)=>{m({__x:e.x,__y:e.y,__y0:e.y,__diffSegment:d(t),__diffWinner:t,__valA:e.y,__valB:e.y,__sourceDatum:e.datum})};for(let e=0;e<a.length;e++){let r=a[e],p=t(r),y=o(r),g=i(r);if(!Number.isFinite(p)||!Number.isFinite(y)||!Number.isFinite(g))continue;let f=h(y,g);if(null!==f){if(null==l){l=f;for(let e of c)u(e,l);c=[],m({__x:p,__y:y>=g?y:g,__y0:y>=g?g:y,__diffSegment:d(l),__diffWinner:l,__valA:y,__valB:g,__sourceDatum:r}),s={x:p,a:y,b:g,w:f};continue}if(s&&s.w!==f){let e,t;if(c.length>0)e=c[0].x,t=c[0].y;else{let o=y-s.a-(g-s.b);if(0!==o){let i=(s.b-s.a)/o,a=Math.max(0,Math.min(1,i));e=s.x+a*(p-s.x),t=s.a+a*(y-s.a)}else e=s.x,t=s.a}m({__x:e,__y:t,__y0:t,__diffSegment:d(l),__diffWinner:l,__valA:t,__valB:t}),n++,l=f,m({__x:e,__y:t,__y0:t,__diffSegment:d(l),__diffWinner:l,__valA:t,__valB:t});for(let e=1;e<c.length;e++)u(c[e],l)}else for(let e of c)u(e,l);c=[],m({__x:p,__y:y>=g?y:g,__y0:y>=g?g:y,__diffSegment:d(l),__diffWinner:l,__valA:y,__valB:g,__sourceDatum:r}),s={x:p,a:y,b:g,w:f}}else c.push({x:p,y:y,datum:r})}for(let e of c)u(e,l??"A");return r}function wo(e){if("A"===e.__diffWinner||"B"===e.__diffWinner)return e.__diffWinner;let t=String(e.__diffSegment??"");return"line-A"===t||t.endsWith("-A")?"A":"B"}function So(e,t){return Xe(e,t,e=>{let t=Number(e.__x),o=Number(e.__y);return{value:Number.isFinite(o)?o:void 0,x:Number.isFinite(t)?t:void 0,y:Number.isFinite(o)?o:void 0,category:wo(e)}},e=>e.__sourceDatum?{...e.__sourceDatum,...e}:e)}function ko(e){let{seriesAColor:t,seriesBColor:o,areaOpacity:i,styleRules:a}=e;return So(e=>({fill:"A"===wo(e)?t:o,stroke:"none",fillOpacity:i}),a)}function Co(e){let{seriesAColor:t,seriesBColor:o,lineWidth:i,styleRules:a}=e;return So(e=>({stroke:"A"===wo(e)?t:o,strokeWidth:i,fill:"none"}),a)}function Lo(e){let{seriesAColor:t,seriesBColor:o,pointRadius:i,styleRules:a}=e;return So(e=>({fill:"A"===wo(e)?t:o,r:i}),a)}function Ro(e){if(null==e)return NaN;if("number"==typeof e)return e;if(e instanceof Date)return e.getTime();if("string"==typeof e){if(""===e.trim())return NaN;let t=+e;return Number.isFinite(t)?t:NaN}return NaN}function _o(e,t,o,i){if(!e.length)return[];let a=e.filter(e=>Number.isFinite(t(e))).sort((e,o)=>t(e)-t(o)),r=[];for(let e of a){let a=t(e),n=o(e),l=i(e);Number.isFinite(n)&&r.push({__x:a,__y:n,__diffSegment:"line-A",__diffWinner:"A",__sourceDatum:e}),Number.isFinite(l)&&r.push({__x:a,__y:l,__diffSegment:"line-B",__diffWinner:"B",__sourceDatum:e})}return r}function Ho(e){let[t,o]=Bt.useState(()=>w);return Bt.useEffect(()=>{if(t)return;let e=!1;return(w?Promise.resolve(w):(S||(S=import("./c-HPT33CWH.min.js").then(e=>w=e.ScatterplotMatrixBrushOverlay).catch(e=>{throw S=null,e})),S)).then(t=>{e||o(()=>t)}).catch(()=>{}),()=>{e=!0}},[t]),t? zt(t,{...e}):null}function Io({data:e,xField:t,yField:o,fieldLabels:i,cellSize:a,pointRadius:r,pointOpacity:n,styleRules:l,colorBy:s,colorScale:c,brushSelectionName:h,hoverSelectionName:d,unselectedOpacity:m,showGrid:u,maxDevicePixelRatio:p,mobileInteraction:y,mode:g,onPointHover:f,onPointClick:b}){me(Z);let x=Dt(null),v=et({name:h,clientId:`splom-${t}-${o}`,fields:[t,o]}),A=tt({name:h,xField:t,yField:o}),w=et({name:d,clientId:C,fields:[k]}),S=w.selectPoints,R=Tt(e=>{e?A.brushInteraction.during(e):A.brushInteraction.end(null)},[A.brushInteraction]),_=Tt(e=>{if(!e)return void f?.(null);let t=e.data,o=t?.[k];void 0!==o&&(S({[k]:[o]}),f?.(t,e.x+L.left,e.y+L.top))},[S,f]),H=Tt(e=>{if(!e)return void b?.(null);let t=e.data;t&&b?.(t,e.x+L.left,e.y+L.top)},[b]),I=Nt(()=>De(t,o),[t,o]),F=Nt(()=>Xe(e=>({opacity:n,r:r,fill:s?xt(e,s,c):vt}),l,I),[n,r,s,c,l,I]),P=Tt(e=>{let t={...F(e)};return"hover"===g?w.isActive&&w.predicate(e)?(t.opacity=1,t.r=2.5*r,t.stroke="#333",t.strokeWidth=1.5):w.isActive&&(t.opacity=.6*("number"==typeof t.opacity?t.opacity:n)):v.isActive&&!v.predicate(e)&&(t.opacity=m),t},[F,g,w,v,m,r,n]);
11
11
  return $t("div",{style:{position:"relative",width:a,height:a},children:[
12
- zt(se,{ref:x,chartType:"scatter",data:e,size:[a,a],xAccessor:t,yAccessor:o,pointStyle:P,margin:L,showAxes:!1,maxDevicePixelRatio:p,enableHover:"hover"===g,accessibleTable:!1,description:`${bt(i,t)??t} versus ${bt(i,o)??o} scatterplot`,...Se({forceHoverBehavior:"hover"===g,forceClickBehavior:!!b,mobileInteraction:y,customHoverBehavior:_,customClickBehavior:H}),tooltipContent:"hover"===g?()=>null:void 0}),"brush"===g&& zt(Ho,{frameRef:x,cellSize:a,onBrush:R})]})}function Fo({data:e,field:t,label:o,cellSize:i,bins:a,colorBy:r,colorScale:n,brushSelectionName:l,hoverSelectionName:s,unselectedOpacity:c,mode:h}){let d=et({name:l,clientId:`splom-diag-${t}`,fields:[t]}),m=et({name:s,clientId:`splom-diag-${t}-hover`,fields:[k]}),u="hover"===h?m:d,p=u.isActive,y=u.predicate,g=Nt(()=>{let o="string"==typeof r?r:null,n=[],l= new Set;for(let i of e){let e=i[t];if(null!=e&&!isNaN(e)&&n.push(Number(e)),o){let e=i[o];null!=e&&l.add(String(e))}}if(0===n.length)return{bars:[],selectedBars:[],categoryBars:[],selectedCategoryBars:[],max:0,categories:[]};let[s,c]=Ft(n),h=(c-s)/a||1,d=Array.from(l),m=new Map(d.map((e,t)=>[e,t])),u=new Array(a).fill(0),g=new Array(a).fill(0),f=Array.from({length:a},()=>new Array(d.length).fill(0)),b=Array.from({length:a},()=>new Array(d.length).fill(0));for(let i of e){let e=i[t];if(null==e||isNaN(e))continue;let r=Math.min(Math.floor((e-s)/h),a-1);if(u[r]++,(!p||y(i))&&g[r]++,o){let e=m.get(String(i[o]));void 0!==e&&(f[r][e]++,(!p||y(i))&&b[r][e]++)}}let x=Pt(u,1),v=f.map((e,t)=>{let o=0;return e.map((e,r)=>{let n=e/x*(i-24),l={x:t/a*i,w:i/a-1,h:n,y0:o,category:d[r]};return o+=n,l})}),w=b.map((e,t)=>{let o=0;return e.map((e,r)=>{let n=e/x*(i-24),l={x:t/a*i,w:i/a-1,h:n,y0:o,category:d[r]};return o+=n,l})});return{bars:u.map((e,t)=>({x:t/a*i,w:i/a-1,h:e/x*(i-24),count:e})),selectedBars:g.map((e,t)=>({x:t/a*i,w:i/a-1,h:e/x*(i-24),count:e})),categoryBars:v,selectedCategoryBars:w,max:x,categories:d}},[e,t,a,i,p,y,r]);
12
+ zt(se,{ref:x,chartType:"scatter",data:e,size:[a,a],xAccessor:t,yAccessor:o,pointStyle:P,margin:L,showAxes:!1,maxDevicePixelRatio:p,enableHover:"hover"===g,accessibleTable:!1,description:`${bt(i,t)??t} versus ${bt(i,o)??o} scatterplot`,...Se({forceHoverBehavior:"hover"===g,forceClickBehavior:!!b,mobileInteraction:y,customHoverBehavior:_,customClickBehavior:H}),tooltipContent:"hover"===g?()=>null:void 0}),"brush"===g&& zt(Ho,{frameRef:x,cellSize:a,onBrush:R})]})}function Fo({data:e,field:t,label:o,cellSize:i,bins:a,colorBy:r,colorScale:n,brushSelectionName:l,hoverSelectionName:s,unselectedOpacity:c,mode:h}){let d=et({name:l,clientId:`splom-diag-${t}`,fields:[t]}),m=et({name:s,clientId:`splom-diag-${t}-hover`,fields:[k]}),u="hover"===h?m:d,p=u.isActive,y=u.predicate,g=Nt(()=>{let o="string"==typeof r?r:null,n=[],l= new Set;for(let i of e){let e=i[t];if(null!=e&&!isNaN(e)&&n.push(Number(e)),o){let e=i[o];null!=e&&l.add(String(e))}}if(0===n.length)return{bars:[],selectedBars:[],categoryBars:[],selectedCategoryBars:[],max:0,categories:[]};let[s,c]=Ft(n),h=(c-s)/a||1,d=Array.from(l),m=new Map(d.map((e,t)=>[e,t])),u=new Array(a).fill(0),g=new Array(a).fill(0),f=Array.from({length:a},()=>new Array(d.length).fill(0)),b=Array.from({length:a},()=>new Array(d.length).fill(0));for(let i of e){let e=i[t];if(null==e||isNaN(e))continue;let r=Math.min(Math.floor((e-s)/h),a-1);if(u[r]++,(!p||y(i))&&g[r]++,o){let e=m.get(String(i[o]));void 0!==e&&(f[r][e]++,(!p||y(i))&&b[r][e]++)}}let x=Pt(u,1),v=f.map((e,t)=>{let o=0;return e.map((e,r)=>{let n=e/x*(i-24),l={x:t/a*i,w:i/a-1,h:n,y0:o,category:d[r]};return o+=n,l})}),A=b.map((e,t)=>{let o=0;return e.map((e,r)=>{let n=e/x*(i-24),l={x:t/a*i,w:i/a-1,h:n,y0:o,category:d[r]};return o+=n,l})});return{bars:u.map((e,t)=>({x:t/a*i,w:i/a-1,h:e/x*(i-24),count:e})),selectedBars:g.map((e,t)=>({x:t/a*i,w:i/a-1,h:e/x*(i-24),count:e})),categoryBars:v,selectedCategoryBars:A,max:x,categories:d}},[e,t,a,i,p,y,r]);
13
13
  return $t("svg",{width:i,height:i,style:{overflow:"hidden"},children:[
14
14
  zt("text",{x:i/2,y:14,textAnchor:"middle",fontSize:11,fontWeight:"bold",fill:"var(--semiotic-text, #333)",fontFamily:"var(--semiotic-font-family, sans-serif)",children:o}),g.categories.length>0?g.categoryBars.map((e,t)=>e.map((e,o)=> zt("rect",{x:e.x,y:i-e.y0-e.h,width:Math.max(e.w,1),height:e.h,fill:n?n(e.category):vt,opacity:p?.3:.6},`bg-${t}-${o}`))):g.bars.map((e,t)=> zt("rect",{x:e.x,y:i-e.h,width:Math.max(e.w,1),height:e.h,fill:vt,opacity:p?.3:.6},`bg-${t}`)),p&&(g.categories.length>0?g.selectedCategoryBars.map((e,t)=>e.map((e,o)=> zt("rect",{x:e.x,y:i-e.y0-e.h,width:Math.max(e.w,1),height:e.h,fill:n?n(e.category):vt,opacity:.7},`sel-${t}-${o}`))):g.selectedBars.map((e,t)=> zt("rect",{x:e.x,y:i-e.h,width:Math.max(e.w,1),height:e.h,fill:vt,opacity:.7},`sel-${t}`)))]})}function Po({label:e,cellSize:t}){
15
- return zt("svg",{width:t,height:t,children: zt("text",{x:t/2,y:t/2,textAnchor:"middle",dominantBaseline:"middle",fontSize:12,fontWeight:"bold",fill:"var(--semiotic-text, #333)",fontFamily:"var(--semiotic-font-family, sans-serif)",children:e})})}function Bo(e){let{data:t,fields:o,fieldLabels:i={},colorBy:a,colorScheme:r,cellSize:n=w.cellSize,cellGap:l=w.cellGap,pointRadius:s=2,pointOpacity:c=.5,diagonal:h="histogram",histogramBins:d=20,brushMode:m="crossfilter",hoverMode:u=!0,unselectedOpacity:p=.1,showGrid:y=!1,maxDevicePixelRatio:g,tooltip:f,showLegend:b,idAccessor:x,styleRules:v,width:A,height:S,className:C,title:L,description:R,summary:_,accessibleTable:H=!0,onObservation:I,onClick:F,chartId:P}=e,B="splom",D="splom-hover",M=ot(e.mobileInteraction,{mode:e.mode,width:A??o.length*n,mobileSemantics:e.mobileSemantics}),T=u?"hover":m?"brush":"hover",N=Ht(e=>e.clearSelection),[W,O]=Mt(null),E=Tt(()=>{N(D),O(null)},[N,D]),z=Nt(()=>(t||[]).map((e,t)=>void 0!==e[k]?e:{...e,[k]:t}),[t]),G=it(z,a,r),$=`${Bt.useId().replace(/:/g,"")}-data-table`,j=Nt(()=>(t||[]).map(e=>({type:"point",datum:e})),[t]),V=Nt(()=>Ee(f),[f]),X=(o.length,w.labelWidth),Y=Tt((e,t,o,i)=>[X+l+e*(n+l)+(o??0),t*(n+l)+(i??0)],[X,n,l]),K=void 0!==b?b:!!a,Q=Nt(()=>{if(!K||!a)return null;let e="string"==typeof a?a:null;return e?Array.from(new Set(z.map(t=>t[e]).filter(e=>null!=e))).map(e=>({label:String(e),color:G?G(String(e)):vt})):null},[K,a,z,G]),U=Nt(()=>({display:"grid",gridTemplateColumns:`${X}px ${o.map(()=>`${n}px`).join(" ")}`,gridTemplateRows:`${o.map(()=>`${n}px`).join(" ")} ${X}px`,gap:`${l}px`,width:"fit-content"}),[o,n,l,X]);
15
+ return zt("svg",{width:t,height:t,children: zt("text",{x:t/2,y:t/2,textAnchor:"middle",dominantBaseline:"middle",fontSize:12,fontWeight:"bold",fill:"var(--semiotic-text, #333)",fontFamily:"var(--semiotic-font-family, sans-serif)",children:e})})}function Bo(e){let{data:t,fields:o,fieldLabels:i={},colorBy:a,colorScheme:r,cellSize:n=A.cellSize,cellGap:l=A.cellGap,pointRadius:s=2,pointOpacity:c=.5,diagonal:h="histogram",histogramBins:d=20,brushMode:m="crossfilter",hoverMode:u=!0,unselectedOpacity:p=.1,showGrid:y=!1,maxDevicePixelRatio:g,tooltip:f,showLegend:b,idAccessor:x,styleRules:v,width:w,height:S,className:C,title:L,description:R,summary:_,accessibleTable:H=!0,onObservation:I,onClick:F,chartId:P}=e,B="splom",D="splom-hover",M=ot(e.mobileInteraction,{mode:e.mode,width:w??o.length*n,mobileSemantics:e.mobileSemantics}),T=u?"hover":m?"brush":"hover",N=Ht(e=>e.clearSelection),[W,O]=Mt(null),E=Tt(()=>{N(D),O(null)},[N,D]),z=Nt(()=>(t||[]).map((e,t)=>void 0!==e[k]?e:{...e,[k]:t}),[t]),G=it(z,a,r),$=`${Bt.useId().replace(/:/g,"")}-data-table`,j=Nt(()=>(t||[]).map(e=>({type:"point",datum:e})),[t]),V=Nt(()=>Ee(f),[f]),X=(o.length,A.labelWidth),Y=Tt((e,t,o,i)=>[X+l+e*(n+l)+(o??0),t*(n+l)+(i??0)],[X,n,l]),Q=void 0!==b?b:!!a,U=Nt(()=>{if(!Q||!a)return null;let e="string"==typeof a?a:null;return e?Array.from(new Set(z.map(t=>t[e]).filter(e=>null!=e))).map(e=>({label:String(e),color:G?G(String(e)):vt})):null},[Q,a,z,G]),K=Nt(()=>({display:"grid",gridTemplateColumns:`${X}px ${o.map(()=>`${n}px`).join(" ")}`,gridTemplateRows:`${o.map(()=>`${n}px`).join(" ")} ${X}px`,gap:`${l}px`,width:"fit-content"}),[o,n,l,X]);
16
16
  return $t("div",{className:C,style:{position:"relative",color:"var(--semiotic-text, #333)",fontFamily:"var(--semiotic-font-family, sans-serif)"},role:"group","aria-label":R||L||`Scatterplot matrix comparing ${o.length} fields`,children:[L&& zt("div",{className:"semiotic-chart-title",style:{fontWeight:600,marginBottom:8},children:L}),H&& zt(at,{accessibleTable:H,children: zt(rt,{tableId:$})}),
17
- zt(nt,{summary:_}),Q&& zt("div",{style:{display:"flex",gap:12,marginBottom:8,flexWrap:"wrap"},children:Q.map(e=> $t("div",{style:{display:"flex",alignItems:"center",gap:4},children:[
17
+ zt(nt,{summary:_}),U&& zt("div",{style:{display:"flex",gap:12,marginBottom:8,flexWrap:"wrap"},children:U.map(e=> $t("div",{style:{display:"flex",alignItems:"center",gap:4},children:[
18
18
  zt("span",{style:{display:"inline-block",width:10,height:10,borderRadius:"50%",backgroundColor:e.color}}),
19
19
  zt("span",{style:{fontSize:11},children:e.label})]},e.label))}),
20
20
  $t("div",{style:{position:"relative",width:"fit-content"},children:[
21
- $t("div",{style:U,onMouseLeave:"hover"===T?E:void 0,children:[o.map((e,t)=> $t(Bt.Fragment,{children:[
21
+ $t("div",{style:K,onMouseLeave:"hover"===T?E:void 0,children:[o.map((e,t)=> $t(Bt.Fragment,{children:[
22
22
  zt("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",writingMode:"vertical-rl",transform:"rotate(180deg)",fontSize:11,fontWeight:"bold",color:"var(--semiotic-text, #333)"},children:bt(i,e)??e}),o.map((o,r)=>t===r?"label"===h? zt(Po,{label:bt(i,e)??e,cellSize:n},`diag-${e}`): zt(Fo,{data:z,field:e,label:bt(i,e)??e,cellSize:n,bins:d,colorBy:a,colorScale:G,brushSelectionName:B,hoverSelectionName:D,unselectedOpacity:p,mode:T},`diag-${e}`): zt(Io,{data:z,xField:o,yField:e,fieldLabels:i,cellSize:n,pointRadius:s,pointOpacity:c,styleRules:v,colorBy:a,colorScale:G,brushSelectionName:B,hoverSelectionName:D,unselectedOpacity:p,showGrid:y,maxDevicePixelRatio:g,mobileInteraction:M,mode:T,onPointHover:"hover"===T?(i,a,n)=>{if(i){if(O({datum:i,xField:o,yField:e,colIndex:r,rowIndex:t,px:a??0,py:n??0}),I){let[e,o]=Y(r,t,a,n);I({type:"hover",datum:i,x:e,y:o,timestamp:Date.now(),chartType:"ScatterplotMatrix",chartId:P})}}else O(null),I&&I({type:"hover-end",timestamp:Date.now(),chartType:"ScatterplotMatrix",chartId:P})}:void 0,onPointClick:F||I?(e,o,i)=>{if(!e)return;let[a,n]=Y(r,t,o,i);F&&F(e,{x:a,y:n}),I&&I({type:"click",datum:e,x:a,y:n,timestamp:Date.now(),chartType:"ScatterplotMatrix",chartId:P})}:void 0},`cell-${e}-${o}`))]},`row-${e}`)),
23
23
  zt("div",{})," ",o.map(e=> zt("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:"bold",color:"#333"},children:bt(i,e)??e},`col-label-${e}`))]}),W&&"hover"===T&&!1!==f&&(()=>{let e=W.datum,t=bt(i,W.xField)??W.xField,r=bt(i,W.yField)??W.yField,s=a?"function"==typeof a?a(e):e[a]:null,c=x?"function"==typeof x?x(e):e[x]:`Row ${e[k]}`,h=X+l+W.colIndex*(n+l),d=W.rowIndex*(n+l),m=h+W.px,u=d+W.py,p={...e};delete p[k];let y="function"==typeof V,g=y?V(p):null,f= $t(kt,{style:{color:"var(--semiotic-tooltip-text, #333)",background:"var(--semiotic-tooltip-bg, rgba(255,255,255,0.95))",border:"1px solid var(--semiotic-border, #ddd)",borderRadius:3,padding:"4px 8px",fontSize:11,lineHeight:1.4,whiteSpace:"nowrap",boxShadow:"none"},children:[
24
24
  zt("div",{style:{fontWeight:"bold",marginBottom:2},children:String(c)}),
25
25
  $t("div",{children:[t,": ",null!=e[W.xField]?Number(e[W.xField]).toFixed(1):"–"]}),
26
- $t("div",{children:[r,": ",null!=e[W.yField]?Number(e[W.yField]).toFixed(1):"–"]}),null!=s&& $t("div",{style:{opacity:.8},children:["string"==typeof a?a:"group",": ",String(s)]})]}),b=y?g:f;return It(b)? zt(lt,{contentOwnsChrome:Ct(V),x:m,y:u,containerWidth:X+o.length*n+o.length*l,containerHeight:o.length*n+X+o.length*l,margin:{top:0,right:0,bottom:0,left:0},className:"scatterplot-matrix-tooltip",zIndex:10,children:b}):null})()]}),H&& zt(at,{accessibleTable:H,children: zt(st,{scene:j,chartType:"scatterplot matrix",tableId:$,chartTitle:L})})]})}function Do(e){let[t,o]=Bt.useState(()=>_);return Bt.useEffect(()=>{if(t)return;let e=!1;return(_?Promise.resolve(_):(H||(H=import("./c-E3G25LFD.min.js").then(e=>_=e.MinimapBrush).catch(e=>{throw H=null,e})),H)).then(t=>{e||o(()=>t)}).catch(()=>{}),()=>{e=!0}},[t]),t? zt(t,{...e}):null}function Mo(e){let t=To(e);return(e.height||I)+(e.margin?.top??t.top)+(e.margin?.bottom??t.bottom)}function To(e){let t=e.handles&&"object"==typeof e.handles?e.handles:e.handles?{}:null,o="number"==typeof t?.size&&Number.isFinite(t.size)?t.size:12;return{top:t?.move?Math.ceil(O(o)/2)+2:0,bottom:e.showExtentLabels?34:20}}function No(e,t){return{label:t?.label??e.label,color:t?.color??e.color,opacity:t?.opacity??e.opacity}}function Wo(e,t,o){let i=gt(t,o,At),a=t&&"object"==typeof t&&!Array.isArray(t)?t:null;return e.map((e,t)=>{if("string"==typeof e.color&&e.color.length>0)return e.color;let o=e.label||`Series ${t+1}`,r=a?.[o];return"string"==typeof r&&r.length>0?r:i[t%i.length]})}function Oo(e,t){let o=dt(e),i=t.map((e,t)=>({label:e.label||`Series ${t+1}`,readY:dt(e.yAccessor)}));return(e,t)=>{let a=String(e[M]??t??""),r=(i.find(e=>e.label===a)??i[0])?.readY(e);return{value:r,x:o(e),y:r,category:a||void 0}}}function Eo(e,t){let o=1/0,i=-1/0,a="function"==typeof t?t:e=>e[t];for(let t of e){let e=a(t);null!=e&&isFinite(e)&&(e<o&&(o=e),e>i&&(i=e))}if(!isFinite(o)||!isFinite(i))return[0,1];if(o===i){let e=0===o?1:.1*Math.abs(o);return[o-e,i+e]}return[o,i]}function zo(e,t){let o=t[1]-t[0];return 0===o?.5:(e-t[0])/o}function Go(e,t){return t[0]+e*(t[1]-t[0])}var e=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){ne(E),me(J);let o=Dt(null),i=Ie(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",yAccessor:h="y",xScaleType:d,yScaleType:m,colorBy:u,colorScheme:p,styleRules:y,sizeBy:g,sizeRange:f=[3,15],symbolBy:b,symbolMap:x,pointRadius:v=5,pointOpacity:w=.8,tooltip:A,marginalGraphics:S,pointIdAccessor:k,annotations:C,regression:L,forecast:R,anomaly:_,xExtent:H,yExtent:I,pulse:F,decay:P,staleness:B,frameProps:D={},selection:M,linkedHover:T,linkedBrush:N,brush:W,onBrush:O,onObservation:$,onClick:j,hoverHighlight:X,chartId:Y,loading:q,loadingContent:Z,emptyContent:ee,legendInteraction:te,legendPosition:oe,color:ie,stroke:ae,strokeWidth:re,opacity:ce}=e,{width:he,height:de,enableHover:ue,showGrid:pe,showLegend:ye,title:ge,description:fe,summary:be,accessibleTable:xe,xLabel:ve,yLabel:Le}=i,Re=Nt(()=>Fe(a),[a]),_e=void 0===a,{domain:He,trackPushed:Ne,reset:We}=Vt({accessor:g,data:Re,isPushMode:_e}),Oe=Tt(e=>{Ne([e]),o.current?.push(e)},[Ne]),Ee=Tt(e=>{Ne(e),o.current?.pushMany(e)},[Ne]);Q(t,{variant:"xy",frameRef:o,overrides:{push:Oe,pushMany:Ee,clear:()=>{We(),o.current?.clear()}}});let ze=U({responsive:e,data:Re,rawData:a,colorBy:u,colorScheme:p,legendInteraction:te,legendPosition:oe,frameLegend:D,selection:M,linkedHover:T,fallbackFields:u?["string"==typeof u?u:""]:[],unwrapData:!1,onObservation:$,onClick:j,hoverHighlight:X,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"Scatterplot",chartId:Y,showLegend:ye,userMargin:r,marginDefaults:i.marginDefaults,loading:q,loadingContent:Z,emptyContent:ee,width:he,height:de,hasTitle:!!ge,axisChrome:Pe(D,{showAxes:i.showAxes,xLabel:ve,yLabel:Le})}),{brushStreamProps:Ge}=le({brush:W,onBrush:O,linkedBrush:N,xAccessor:c,yAccessor:h,defaultDimension:"xy"});Be("Scatterplot",Re,"xAccessor",c),Be("Scatterplot",Re,"yAccessor",h);let $e=Nt(()=>g?He??[0,1]:void 0,[g,He]),je=Nt(()=>g?e=>pt(e,g,f,$e):void 0,[g,f,$e]),Ve=Nt(()=>De(c,h),[c,h]),Xe=z({colorBy:u,colorScale:ze.colorScale,color:ie,pointRadius:v,fillOpacity:w,radiusFn:je,stroke:ae,strokeWidth:re,opacity:ce,styleRules:y,ruleContext:Ve,effectiveSelectionHook:ze.effectiveSelectionHook,resolvedSelection:ze.resolvedSelection}),{effectiveData:Ye,statisticalAnnotations:Ke,hasForecast:Qe,xAccessorKey:Ue,yAccessorKey:qe}=G({data:Re,xAccessor:c,yAccessor:h,forecast:R,anomaly:_}),Ze=Qe?Ue:c,Je=Qe?qe:h,et=Nt(()=>we([{label:ve||Ae(c),accessor:Ze,role:"x",format:l},{label:Le||Ae(h),accessor:Je,role:"y",format:s},...u?[{label:Ae(u),accessor:u,role:"color"}]:[],...g?[{label:Ae(g),accessor:g,role:"size"}]:[]]),[c,h,Ze,Je,ve,Le,u,g,l,s]),tt=Nt(()=>{let e=V(L),t=C||[];return e||0!==Ke.length?[...e?[e]:[],...t,...Ke]:C},[L,C,Ke]);if(ze.earlyReturn)return ze.earlyReturn;let ot=K({componentName:"Scatterplot",data:a,accessors:{xAccessor:c,yAccessor:h}});if(ot) return zt(Me,{componentName:"Scatterplot",message:ot,width:he,height:de});let it={chartType:"scatter",...null!=a&&{data:Ye},xAccessor:Ze,yAccessor:Je,xScaleType:d,yScaleType:m,colorAccessor:u||void 0,sizeAccessor:g||void 0,...b&&{symbolAccessor:b},...x&&{symbolMap:x},sizeRange:f,pointStyle:Xe,colorScheme:p,size:[he,de],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:ze.margin,showAxes:i.showAxes,xLabel:ve,yLabel:Le,xFormat:l,yFormat:s,enableHover:ue,showGrid:pe,...ze.legendBehaviorProps,...Ce({title:ge,description:fe,summary:be,accessibleTable:xe,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...ke({tooltip:A,defaultTooltipContent:et}),...Se({linkedHover:T,selection:M,onObservation:$,onClick:j,hoverHighlight:X,hoverRadius:e.hoverRadius,mobileInteraction:ze.mobileInteraction,customHoverBehavior:ze.customHoverBehavior,customClickBehavior:ze.customClickBehavior}),...S&&{marginalGraphics:S},...k&&{pointIdAccessor:k},...F&&{pulse:F},...P&&{decay:P},...B&&{staleness:B},...tt&&tt.length>0&&{annotations:tt},...H&&{xExtent:H},...I&&{yExtent:I},...Ge,...ze.crosshairProps,...D};
27
- return zt(Te,{componentName:"Scatterplot",width:he,height:de,children: zt(se,{ref:o,...it})})}),"Scatterplot"),t=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){me(J);let o=Dt(null);Q(t,{variant:"xy",frameRef:o});let i=Ie(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:e.showGrid,enableHover:e.enableHover,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",yAccessor:h="y",orderAccessor:d,orderLabel:m,styleRules:u,pointRadius:p=4,tooltip:y,pointIdAccessor:g,annotations:f,regression:b,forecast:x,anomaly:v,xExtent:w,yExtent:A,pulse:S,decay:k,staleness:C,frameProps:L={},selection:R,linkedHover:_,onObservation:H,onClick:I,hoverHighlight:F,chartId:P,loading:B,loadingContent:D,emptyContent:M,legendInteraction:T,stroke:N,strokeWidth:W,opacity:O}=e,{width:E,height:$,enableHover:j,showGrid:X,title:Y,description:q,summary:Z,accessibleTable:ee,xLabel:te,yLabel:oe}=i,{safeData:ie,orderMap:ae}=Nt(()=>{let e=a||[],t="function"==typeof c?c:e=>e[c],o="function"==typeof h?h:e=>e[h],i=e;if(d&&e.length>0){let t="function"==typeof d?d:e=>e[d];i=[...e].sort((e,o)=>{let i=t(e),a=t(o);return(i instanceof Date?i.getTime():+i)-(a instanceof Date?a.getTime():+a)})}let r= new WeakMap,n=0;for(let e of i){let i=t(e),a=o(e);null!=i&&null!=a&&isFinite(i)&&isFinite(a)&&n++}let l=0;for(let e of i){let i=t(e),a=o(e);null!=i&&null!=a&&isFinite(i)&&isFinite(a)&&r.set(e,{idx:l++,total:n})}return{safeData:i,orderMap:r}},[a,d,c,h]);Be("ConnectedScatterplot",ie,"xAccessor",c),Be("ConnectedScatterplot",ie,"yAccessor",h);let re=U({responsive:e,data:ie,rawData:a,colorBy:void 0,colorScheme:void 0,legendInteraction:T,selection:R,linkedHover:_,fallbackFields:[],unwrapData:!1,onObservation:H,onClick:I,hoverHighlight:F,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"ConnectedScatterplot",chartId:P,showLegend:void 0,userMargin:r,marginDefaults:i.marginDefaults,loading:B,loadingContent:D,emptyContent:M,width:E,height:$,hasTitle:!!Y,axisChrome:Pe(L,{showAxes:i.showAxes,xLabel:te,yLabel:oe})}),ne=re.resolvedSelection?.unselectedOpacity??mt,le=Nt(()=>(e,t)=>{let o=t.filter(e=>"point"===e.type);if(o.length<2)return;let i=re.effectiveSelectionHook?.isActive,a=re.effectiveSelectionHook?.predicate,r=o.length<100,n=o.length;e.lineCap="round";for(let t=0;t<n-1;t++){let l=o[t],s=o[t+1],c=Xt(t,n),h=!i||!a||a(l.datum??l)||a(s.datum??s),d=i?h?1:ne:1;r&&(e.beginPath(),e.moveTo(l.x,l.y),e.lineTo(s.x,s.y),e.strokeStyle="white",e.lineWidth=p+2,e.globalAlpha=.5*d,e.stroke()),e.beginPath(),e.moveTo(l.x,l.y),e.lineTo(s.x,s.y),e.strokeStyle=c,e.lineWidth=p,e.globalAlpha=d,e.stroke()}e.globalAlpha=1},[p,re.effectiveSelectionHook,ne]),ce=Nt(()=>[le],[le]),he=Nt(()=>(e,t,o)=>{let i=e.filter(e=>"point"===e.type);if(i.length<2)return null;let a=i.length,r=a<100,n=[];for(let e=0;e<a-1;e++){let t=i[e],o=i[e+1],l=Xt(e,a),s="number"==typeof t.style?.opacity?t.style.opacity:1,c="number"==typeof o.style?.opacity?o.style.opacity:1,h=Math.min(s,c);r&&n.push(
26
+ $t("div",{children:[r,": ",null!=e[W.yField]?Number(e[W.yField]).toFixed(1):"–"]}),null!=s&& $t("div",{style:{opacity:.8},children:["string"==typeof a?a:"group",": ",String(s)]})]}),b=y?g:f;return It(b)? zt(lt,{contentOwnsChrome:Ct(V),x:m,y:u,containerWidth:X+o.length*n+o.length*l,containerHeight:o.length*n+X+o.length*l,margin:{top:0,right:0,bottom:0,left:0},className:"scatterplot-matrix-tooltip",zIndex:10,children:b}):null})()]}),H&& zt(at,{accessibleTable:H,children: zt(st,{scene:j,chartType:"scatterplot matrix",tableId:$,chartTitle:L})})]})}function Do(e){let[t,o]=Bt.useState(()=>_);return Bt.useEffect(()=>{if(t)return;let e=!1;return(_?Promise.resolve(_):(H||(H=import("./c-E3G25LFD.min.js").then(e=>_=e.MinimapBrush).catch(e=>{throw H=null,e})),H)).then(t=>{e||o(()=>t)}).catch(()=>{}),()=>{e=!0}},[t]),t? zt(t,{...e}):null}function Mo(e){let t=To(e);return(e.height||I)+(e.margin?.top??t.top)+(e.margin?.bottom??t.bottom)}function To(e){let t=e.handles&&"object"==typeof e.handles?e.handles:e.handles?{}:null,o="number"==typeof t?.size&&Number.isFinite(t.size)?t.size:12;return{top:t?.move?Math.ceil(O(o)/2)+2:0,bottom:e.showExtentLabels?34:20}}function No(e,t){return{label:t?.label??e.label,color:t?.color??e.color,opacity:t?.opacity??e.opacity}}function Wo(e,t,o){let i=gt(t,o,wt),a=t&&"object"==typeof t&&!Array.isArray(t)?t:null;return e.map((e,t)=>{if("string"==typeof e.color&&e.color.length>0)return e.color;let o=e.label||`Series ${t+1}`,r=a?.[o];return"string"==typeof r&&r.length>0?r:i[t%i.length]})}function Oo(e,t){let o=dt(e),i=t.map((e,t)=>({label:e.label||`Series ${t+1}`,readY:dt(e.yAccessor)}));return(e,t)=>{let a=String(e[M]??t??""),r=(i.find(e=>e.label===a)??i[0])?.readY(e);return{value:r,x:o(e),y:r,category:a||void 0}}}function Eo(e,t){let o=1/0,i=-1/0,a="function"==typeof t?t:e=>e[t];for(let t of e){let e=a(t);null!=e&&isFinite(e)&&(e<o&&(o=e),e>i&&(i=e))}if(!isFinite(o)||!isFinite(i))return[0,1];if(o===i){let e=0===o?1:.1*Math.abs(o);return[o-e,i+e]}return[o,i]}function zo(e,t){let o=t[1]-t[0];return 0===o?.5:(e-t[0])/o}function Go(e,t){return t[0]+e*(t[1]-t[0])}var e=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){ne(E),me(Z);let o=Dt(null),i=Ie(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",yAccessor:h="y",xScaleType:d,yScaleType:m,colorBy:u,colorScheme:p,styleRules:y,sizeBy:g,sizeRange:f=[3,15],symbolBy:b,symbolMap:x,pointRadius:v=5,pointOpacity:A=.8,tooltip:w,marginalGraphics:S,pointIdAccessor:k,annotations:C,regression:L,forecast:R,anomaly:_,xExtent:H,yExtent:I,pulse:F,decay:P,staleness:B,frameProps:D={},selection:M,linkedHover:T,linkedBrush:N,brush:W,onBrush:O,onObservation:$,onClick:j,hoverHighlight:X,chartId:Y,loading:q,loadingContent:J,emptyContent:ee,legendInteraction:te,legendPosition:oe,color:ie,stroke:ae,strokeWidth:re,opacity:ce}=e,{width:he,height:de,enableHover:ue,showGrid:pe,showLegend:ye,title:ge,description:fe,summary:be,accessibleTable:xe,xLabel:ve,yLabel:Le}=i,Re=Nt(()=>Fe(a),[a]),_e=void 0===a,{domain:He,trackPushed:Ne,reset:We}=Vt({accessor:g,data:Re,isPushMode:_e}),Oe=Tt(e=>{Ne([e]),o.current?.push(e)},[Ne]),Ee=Tt(e=>{Ne(e),o.current?.pushMany(e)},[Ne]);U(t,{variant:"xy",frameRef:o,overrides:{push:Oe,pushMany:Ee,clear:()=>{We(),o.current?.clear()}}});let ze=K({responsive:e,data:Re,rawData:a,colorBy:u,colorScheme:p,legendInteraction:te,legendPosition:oe,frameLegend:D,selection:M,linkedHover:T,fallbackFields:u?["string"==typeof u?u:""]:[],unwrapData:!1,onObservation:$,onClick:j,hoverHighlight:X,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"Scatterplot",chartId:Y,showLegend:ye,userMargin:r,marginDefaults:i.marginDefaults,loading:q,loadingContent:J,emptyContent:ee,width:he,height:de,hasTitle:!!ge,axisChrome:Pe(D,{showAxes:i.showAxes,xLabel:ve,yLabel:Le})}),{brushStreamProps:Ge}=le({brush:W,onBrush:O,linkedBrush:N,xAccessor:c,yAccessor:h,defaultDimension:"xy"});Be("Scatterplot",Re,"xAccessor",c),Be("Scatterplot",Re,"yAccessor",h);let $e=Nt(()=>g?He??[0,1]:void 0,[g,He]),je=Nt(()=>g?e=>pt(e,g,f,$e):void 0,[g,f,$e]),Ve=Nt(()=>De(c,h),[c,h]),Xe=z({colorBy:u,colorScale:ze.colorScale,color:ie,pointRadius:v,fillOpacity:A,radiusFn:je,stroke:ae,strokeWidth:re,opacity:ce,styleRules:y,ruleContext:Ve,effectiveSelectionHook:ze.effectiveSelectionHook,resolvedSelection:ze.resolvedSelection}),{effectiveData:Ye,statisticalAnnotations:Qe,hasForecast:Ue,xAccessorKey:Ke,yAccessorKey:qe}=G({data:Re,xAccessor:c,yAccessor:h,forecast:R,anomaly:_}),Je=Ue?Ke:c,Ze=Ue?qe:h,et=Nt(()=>Ae([{label:ve||we(c),accessor:Je,role:"x",format:l},{label:Le||we(h),accessor:Ze,role:"y",format:s},...u?[{label:we(u),accessor:u,role:"color"}]:[],...g?[{label:we(g),accessor:g,role:"size"}]:[]]),[c,h,Je,Ze,ve,Le,u,g,l,s]),tt=Nt(()=>{let e=V(L),t=C||[];return e||0!==Qe.length?[...e?[e]:[],...t,...Qe]:C},[L,C,Qe]);if(ze.earlyReturn)return ze.earlyReturn;let ot=Q({componentName:"Scatterplot",data:a,accessors:{xAccessor:c,yAccessor:h}});if(ot) return zt(Me,{componentName:"Scatterplot",message:ot,width:he,height:de});let it={chartType:"scatter",...null!=a&&{data:Ye},xAccessor:Je,yAccessor:Ze,xScaleType:d,yScaleType:m,colorAccessor:u||void 0,sizeAccessor:g||void 0,...b&&{symbolAccessor:b},...x&&{symbolMap:x},sizeRange:f,pointStyle:Xe,colorScheme:p,size:[he,de],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:ze.margin,showAxes:i.showAxes,xLabel:ve,yLabel:Le,xFormat:l,yFormat:s,enableHover:ue,showGrid:pe,...ze.legendBehaviorProps,...Ce({title:ge,description:fe,summary:be,accessibleTable:xe,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...ke({tooltip:w,defaultTooltipContent:et}),...Se({linkedHover:T,selection:M,onObservation:$,onClick:j,hoverHighlight:X,hoverRadius:e.hoverRadius,mobileInteraction:ze.mobileInteraction,customHoverBehavior:ze.customHoverBehavior,customClickBehavior:ze.customClickBehavior}),...S&&{marginalGraphics:S},...k&&{pointIdAccessor:k},...F&&{pulse:F},...P&&{decay:P},...B&&{staleness:B},...tt&&tt.length>0&&{annotations:tt},...H&&{xExtent:H},...I&&{yExtent:I},...Ge,...ze.crosshairProps,...D};
27
+ return zt(Te,{componentName:"Scatterplot",width:he,height:de,children: zt(se,{ref:o,...it})})}),"Scatterplot"),t=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){me(Z);let o=Dt(null);U(t,{variant:"xy",frameRef:o});let i=Ie(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:e.showGrid,enableHover:e.enableHover,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",yAccessor:h="y",orderAccessor:d,orderLabel:m,styleRules:u,pointRadius:p=4,tooltip:y,pointIdAccessor:g,annotations:f,regression:b,forecast:x,anomaly:v,xExtent:A,yExtent:w,pulse:S,decay:k,staleness:C,frameProps:L={},selection:R,linkedHover:_,onObservation:H,onClick:I,hoverHighlight:F,chartId:P,loading:B,loadingContent:D,emptyContent:M,legendInteraction:T,stroke:N,strokeWidth:W,opacity:O}=e,{width:E,height:$,enableHover:j,showGrid:X,title:Y,description:q,summary:J,accessibleTable:ee,xLabel:te,yLabel:oe}=i,{safeData:ie,orderMap:ae}=Nt(()=>{let e=a||[],t="function"==typeof c?c:e=>e[c],o="function"==typeof h?h:e=>e[h],i=e;if(d&&e.length>0){let t="function"==typeof d?d:e=>e[d];i=[...e].sort((e,o)=>{let i=t(e),a=t(o);return(i instanceof Date?i.getTime():+i)-(a instanceof Date?a.getTime():+a)})}let r= new WeakMap,n=0;for(let e of i){let i=t(e),a=o(e);null!=i&&null!=a&&isFinite(i)&&isFinite(a)&&n++}let l=0;for(let e of i){let i=t(e),a=o(e);null!=i&&null!=a&&isFinite(i)&&isFinite(a)&&r.set(e,{idx:l++,total:n})}return{safeData:i,orderMap:r}},[a,d,c,h]);Be("ConnectedScatterplot",ie,"xAccessor",c),Be("ConnectedScatterplot",ie,"yAccessor",h);let re=K({responsive:e,data:ie,rawData:a,colorBy:void 0,colorScheme:void 0,legendInteraction:T,selection:R,linkedHover:_,fallbackFields:[],unwrapData:!1,onObservation:H,onClick:I,hoverHighlight:F,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"ConnectedScatterplot",chartId:P,showLegend:void 0,userMargin:r,marginDefaults:i.marginDefaults,loading:B,loadingContent:D,emptyContent:M,width:E,height:$,hasTitle:!!Y,axisChrome:Pe(L,{showAxes:i.showAxes,xLabel:te,yLabel:oe})}),ne=re.resolvedSelection?.unselectedOpacity??mt,le=Nt(()=>(e,t)=>{let o=t.filter(e=>"point"===e.type);if(o.length<2)return;let i=re.effectiveSelectionHook?.isActive,a=re.effectiveSelectionHook?.predicate,r=o.length<100,n=o.length;e.lineCap="round";for(let t=0;t<n-1;t++){let l=o[t],s=o[t+1],c=Xt(t,n),h=!i||!a||a(l.datum??l)||a(s.datum??s),d=i?h?1:ne:1;r&&(e.beginPath(),e.moveTo(l.x,l.y),e.lineTo(s.x,s.y),e.strokeStyle="white",e.lineWidth=p+2,e.globalAlpha=.5*d,e.stroke()),e.beginPath(),e.moveTo(l.x,l.y),e.lineTo(s.x,s.y),e.strokeStyle=c,e.lineWidth=p,e.globalAlpha=d,e.stroke()}e.globalAlpha=1},[p,re.effectiveSelectionHook,ne]),ce=Nt(()=>[le],[le]),he=Nt(()=>(e,t,o)=>{let i=e.filter(e=>"point"===e.type);if(i.length<2)return null;let a=i.length,r=a<100,n=[];for(let e=0;e<a-1;e++){let t=i[e],o=i[e+1],l=Xt(e,a),s="number"==typeof t.style?.opacity?t.style.opacity:1,c="number"==typeof o.style?.opacity?o.style.opacity:1,h=Math.min(s,c);r&&n.push(
28
28
  zt("line",{x1:t.x,y1:t.y,x2:o.x,y2:o.y,stroke:"white",strokeWidth:p+2,strokeLinecap:"round",opacity:.5*h},`halo-${e}`)),n.push(
29
29
  zt("line",{x1:t.x,y1:t.y,x2:o.x,y2:o.y,stroke:l,strokeWidth:p,strokeLinecap:"round",opacity:h},`seg-${e}`))}
30
- return zt(Gt,{children:n})},[p]),de=Nt(()=>[he],[he]),ue=Nt(()=>e=>{let t=ae.get(e),o=t?.idx??0,i=t?.total??1;return{fill:i>0?Xt(o,i):"#6366f1",stroke:"white",strokeWidth:1,r:p,fillOpacity:1}},[p,ae]),pe=Nt(()=>De(c,h),[c,h]),ye=z({colorScale:void 0,baseStyleExtras:ue,stroke:N,strokeWidth:W,opacity:O,styleRules:u,ruleContext:pe,effectiveSelectionHook:re.effectiveSelectionHook,resolvedSelection:re.resolvedSelection}),ge=m||("string"==typeof d?d:"Order"),{effectiveData:fe,statisticalAnnotations:be,hasForecast:xe,xAccessorKey:ve,yAccessorKey:Le}=G({data:ie,xAccessor:c,yAccessor:h,forecast:x,anomaly:v}),Re=xe?ve:c,_e=xe?Le:h,He=Nt(()=>we([{label:te||Ae(c),accessor:Re,role:"x",format:l},{label:oe||Ae(h),accessor:_e,role:"y",format:s},...d?[{label:ge,accessor:d,role:"group"}]:[]]),[c,h,Re,_e,te,oe,d,ge,l,s]),Fe=K({componentName:"ConnectedScatterplot",data:a,accessors:{xAccessor:c,yAccessor:h}});if(re.earlyReturn)return re.earlyReturn;let Ne=V(b),We=f||[],Oe=Ne||be.length>0?[...Ne?[Ne]:[],...We,...be]:f,Ee={chartType:"scatter",...null!=a&&{data:fe},xAccessor:Re,yAccessor:_e,pointStyle:ye,size:[E,$],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:re.margin,showAxes:i.showAxes,xLabel:te,yLabel:oe,xFormat:l,yFormat:s,enableHover:j,showGrid:X,...Ce({title:Y,description:q,summary:Z,accessibleTable:ee,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...ke({tooltip:y,defaultTooltipContent:He}),...Se({linkedHover:_,selection:R,onObservation:H,onClick:I,hoverHighlight:F,hoverRadius:e.hoverRadius,mobileInteraction:re.mobileInteraction,customHoverBehavior:re.customHoverBehavior,customClickBehavior:re.customClickBehavior}),...g&&{pointIdAccessor:g},...S&&{pulse:S},...k&&{decay:k},...C&&{staleness:C},canvasPreRenderers:ce,svgPreRenderers:de,...Oe&&Oe.length>0&&{annotations:Oe},...w&&{xExtent:w},...A&&{yExtent:A},...re.crosshairProps,...L};return Fe? zt(Me,{componentName:"ConnectedScatterplot",message:Fe,width:E,height:$}): zt(Te,{componentName:"ConnectedScatterplot",width:E,height:$,children: zt(se,{ref:o,...Ee})})}),"ConnectedScatterplot"),o=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){me(re);let{data:o,layout:i,layoutConfig:a,onLayoutError:r,xExtent:n,yExtent:l,showAxes:s=!1,margin:c,className:h,annotations:d,onObservation:m,onClick:u,selection:p,linkedHover:y,hoverHighlight:g,chartId:f,loading:b,loadingContent:x,emptyContent:v,colorBy:w,colorScheme:A,legend:S,legendInteraction:k,legendPosition:C,frameProps:L={}}=e,{legend:R,..._}=L,H=Nt(()=>Ne(R,S),[R,S]),{frameRef:I,resolved:F,safeData:P,setup:B,earlyReturn:D}=X({responsive:e,imperativeRef:t,imperativeVariant:"xy",chartTypeLabel:"XYCustomChart",unwrapData:!1,data:o,colorBy:w,colorScheme:A,legend:H,legendInteraction:k,legendPosition:C,frameLegend:_,selection:p,linkedHover:y,hoverHighlight:g,onObservation:m,onClick:u,chartId:f,loading:b,loadingContent:x,emptyContent:v,margin:c,width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,mode:e.mode,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules,xLabel:e.xLabel,yLabel:e.yLabel}),M=B.effectiveSelectionHook,T=Nt(()=>M?.isActive?{isActive:!0,predicate:M.predicate}:null,[M?.isActive,M?.predicate]),N=Nt(()=>We({tooltip:e.tooltip,defaultTooltipContent:e=> zt(ce,{hover:e})}),[e.tooltip]);if(D)return D;let{width:W,height:O,enableHover:E,showGrid:z,title:G,description:$,summary:j,accessibleTable:V,xLabel:Y,yLabel:K}=F,Q={chartType:"custom",...null!=o&&{data:P},customLayout:i,layoutConfig:a,onLayoutError:r,...T&&{layoutSelection:T},xExtent:n,yExtent:l,colorAccessor:w,colorScheme:A,size:[W,O],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:B.margin,showAxes:s,xLabel:Y,yLabel:K,enableHover:E,showGrid:z,...B.legendBehaviorProps,...Ce({title:G,description:$,summary:j,accessibleTable:V,className:h,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...N,...Se({linkedHover:y,selection:p,onObservation:m,onClick:u,hoverRadius:e.hoverRadius,hoverHighlight:g,mobileInteraction:B.mobileInteraction,customHoverBehavior:B.customHoverBehavior,customClickBehavior:B.customClickBehavior}),...d&&d.length>0&&{annotations:d},...B.crosshairProps,..._};
31
- return zt(Te,{componentName:"XYCustomChart",width:W,height:O,children: zt(se,{ref:I,...Q})})}),"XYCustomChart"),i="Other",a={top:20,bottom:48,left:48},r=8,n=4,l=24,s=6,c=1.1,h=[[/[mwMW@%…]/,.95],[/[ijlI'.,|\s]/,.28],[/[frt():;/[\]{}*`!\\-]/,.39]],d=.75,m=.62,u=1.05,p=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){let i=je(),a=Rt(),{data:r,xAccessor:n,yAccessor:l,lineBy:s,rankDirection:c="descending",ribbon:h=!1,curve:d="smooth",ribbonSizeRange:m=[4,28],samplesPerSegment:u=12,lineWidth:p=3,highlightTop:y,neutralColor:g,styleRules:f,labelStyle:b,colorScheme:x,ribbonOpacity:v=.82,lineOpacity:w=.9,showPoints:A=!1,pointRadius:S=3,showLabels:k=!0,labelPriorityAccessor:C,maxLabels:L,showGrid:R=!0,showLegend:_=!1,enableHover:H=!0,hoverHighlight:I=!0,tooltip:F,frameProps:P={},xFormat:B,yFormat:D,onClick:M}=e,T=Zt(y),N=Jt(g),W=Jt(e.color),O=Ie(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,responsiveRules:e.responsiveRules}),E=Nt(()=>to(r,{xAccessor:n,yAccessor:l,lineBy:s,rankDirection:c,highlightTop:T}),[r,n,l,s,c,T]),{axes:z,areaStyle:G,pointStyle:$,margin:j,...V}=P,X="object"==typeof b&&"number"==typeof b?.fontSize?b.fontSize:12,K=e.legendPosition??"right",Q=!_||"left"!==K&&"right"!==K?void 0:K,U=Nt(()=>co({labels:E.seriesOrder,showLabels:k,width:O.width,showAxes:O.showAxes,rankCount:E.seriesOrder.length,yLabel:e.yLabel??"Rank",fontSize:X,legendSide:Q}),[E.seriesOrder,k,O.width,O.showAxes,e.yLabel,X,Q]),q=e.margin??j,Z=Nt(()=>({...U.margin,...Y(q)}),[U,q]),J=Nt(()=>ho(Z,U),[Z,U]),ee=Q?J.sideGutter[Q]:void 0,te=Nt(()=>eo({seriesOrder:E.seriesOrder,overallOrder:E.overallOrder,highlightTop:T,color:W,colorScheme:x,neutralColor:N,themeCategorical:i,themeNeutral:a.colors.textSecondary}),[E.seriesOrder,E.overallOrder,T,W,x,N,i,a.colors.textSecondary]),oe=Nt(()=>({ribbon:h,curve:d,samplesPerSegment:u,ribbonSizeRange:m,valueExtent:E.valueExtent,seriesOrder:E.seriesOrder,lineWidth:p,ribbonOpacity:v,lineOpacity:w,neutralColor:N,color:W,colorMap:te&&"object"==typeof te&&!Array.isArray(te)?te:void 0,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity,styleRules:f,areaStyle:G,pointStyle:$,labelStyle:b,showPoints:A,pointRadius:S,showLabels:k,labelPriorityAccessor:C,maxLabels:L,startLabelOffset:U.startLabelOffset,labelBudget:J.budget,labelFontSize:X}),[h,d,u,m,E.valueExtent,E.seriesOrder,p,v,w,N,te,W,e.stroke,e.strokeWidth,e.opacity,f,G,$,b,A,S,k,C,L,U.startLabelOffset,J.budget,X]),{tooltip:ie,formatX:ae}=oo({tooltip:F,xValues:E.xValues,xFormat:B,yFormat:D}),re=Nt(()=>{if(M)return(e,t)=>{M(e.__bumpRaw??e,t)}},[M]),ne=Math.max(1,E.seriesOrder.length),le=E.xValues.map((e,t)=>t),se=Array.from({length:ne},(e,t)=>t+1),ce=z??[{orient:"left",tickValues:se,tickFormat:e=>String(e),label:e.yLabel??"Rank",baseline:!1},{orient:"bottom",tickValues:le,tickFormat:ae,label:e.xLabel,tickAnchor:"edges"}],he=Nt(()=>qt(e.annotations,E.xValues),[e.annotations,E.xValues]);
32
- return zt(o,{ref:t,data:E.data,layout:bo,layoutConfig:oe,xExtent:[0,Math.max(1,E.xValues.length-1)],yExtent:[ne+.5,.5],showAxes:O.showAxes,showGrid:R,showLegend:_,enableHover:H,hoverHighlight:I,colorBy:"__bumpSeries",colorScheme:te,tooltip:ie,onClick:re,hoverRadius:e.hoverRadius,width:e.width,height:e.height,responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,maxDevicePixelRatio:e.maxDevicePixelRatio,responsiveRules:e.responsiveRules,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,mode:e.mode,margin:Z,className:e.className,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,selection:e.selection,linkedHover:e.linkedHover,legend:e.legend,legendInteraction:e.legendInteraction,legendPosition:e.legendPosition,onObservation:e.onObservation,chartId:e.chartId,loading:e.loading,loadingContent:e.loadingContent,emptyContent:e.emptyContent,animate:e.animate,autoPlaceAnnotations:e.autoPlaceAnnotations,annotations:he,xLabel:e.xLabel,yLabel:e.yLabel??"Rank",frameProps:{axes:ce,axisExtent:"exact",...V,...null!=ee&&null==V.legendLayout?.sideGutter&&{legendLayout:{...V.legendLayout,sideGutter:ee}}}})}),"BumpChart"),y=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){me(ue);let o=Dt(null);Q(t,{variant:"xy",frameRef:o});let i=Ie(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",yAccessor:h="y",areaBy:d,y0Accessor:m,gradientFill:u=!1,semanticGradient:p,semanticLine:y=!0,lineDataAccessor:g="coordinates",colorBy:f,colorScheme:b,styleRules:x,curve:v="monotoneX",areaOpacity:w=.7,lineGradient:A,showLine:S=!0,lineWidth:k=2,showPoints:C=!1,pointRadius:L=3,tooltip:R,annotations:_,forecast:H,anomaly:I,band:F,xExtent:P,yExtent:B,frameProps:D={},selection:M,linkedHover:T,onObservation:N,onClick:W,hoverHighlight:O,chartId:E,loading:z,loadingContent:$,emptyContent:j,legendInteraction:V,legendPosition:X,color:Y,stroke:q,strokeWidth:Z,opacity:J}=e,{width:ee,height:te,enableHover:oe,showGrid:ie,showLegend:ae,title:re,description:ne,summary:le,accessibleTable:ce,xLabel:he,yLabel:de}=i,pe=Nt(()=>Fe(a),[a]),ye=f||d,we=Nt(()=>ge(p),[p]),ke=Nt(()=>we?.stops.length?fe(we):be(u),[we,u]),Le=Nt(()=>xe(A),[A]),Re=Nt(()=>y?ve(we):void 0,[we,y]);Be("AreaChart",pe,"xAccessor",c),Be("AreaChart",pe,"yAccessor",h);let _e=U({responsive:e,data:pe,rawData:a,colorBy:ye,colorScheme:b,legendInteraction:V,legendPosition:X,frameLegend:D,selection:M,linkedHover:T,fallbackFields:ye?["string"==typeof ye?ye:""]:[],unwrapData:!1,onObservation:N,onClick:W,hoverHighlight:O,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"AreaChart",chartId:E,showLegend:ae,userMargin:r,marginDefaults:i.marginDefaults,loading:z,loadingContent:$,emptyContent:j,width:ee,height:te,hasTitle:!!re,axisChrome:Pe(D,{showAxes:i.showAxes,xLabel:he,yLabel:de})}),{effectiveData:He,statisticalAnnotations:Ne,hasForecast:Oe,xAccessorKey:Ee,yAccessorKey:ze}=G({data:pe,xAccessor:c,yAccessor:h,forecast:H,anomaly:I,groupBy:d}),Ge=Oe?Ee:c,$e=Oe?ze:h,je=Nt(()=>De(c,h),[c,h]),{flattenedData:Xe,lineStyle:Ye,pointStyle:Ke,defaultTooltipContent:Qe}=vo({safeData:He,data:a,areaBy:d,lineDataAccessor:g,colorBy:ye,colorScale:_e.colorScale,color:Y,stroke:q,strokeWidth:Z,opacity:J,effectiveSelectionHook:_e.effectiveSelectionHook,resolvedSelection:_e.resolvedSelection,areaOpacity:w,showLine:S,lineWidth:k,showPoints:C,pointRadius:L,xAccessor:Ge,yAccessor:$e,xLabel:he||Ae(c),yLabel:de||Ae(h),xFormat:l,yFormat:s,groupField:d||f,band:F,styleRules:x,ruleContext:je}),Ue=K({componentName:"AreaChart",data:a,accessors:{xAccessor:c,yAccessor:h}}),qe={chartType:"area",...null!=a&&{data:Xe},xAccessor:Ge,yAccessor:$e,groupAccessor:d||void 0,...m&&{y0Accessor:m},...F&&{band:F},...ke&&{gradientFill:ke},...Le&&{lineGradient:Le},...Re&&{semanticLineStops:Re},curve:v,lineStyle:Ye,...C&&Ke&&{pointStyle:Ke},size:[ee,te],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:_e.margin,showAxes:i.showAxes,xLabel:he,yLabel:de,xFormat:l,yFormat:s,enableHover:oe,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},showGrid:ie,..._e.legendBehaviorProps,...Ce({title:re,description:ne,summary:le,accessibleTable:ce,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...We({tooltip:R,defaultTooltipContent:Qe,multiDefaultContent:Ve({xFormat:l,yFormat:s})}),...Se({linkedHover:T,selection:M,onObservation:N,onClick:W,hoverHighlight:O,hoverRadius:e.hoverRadius,mobileInteraction:_e.mobileInteraction,customHoverBehavior:_e.customHoverBehavior,customClickBehavior:_e.customClickBehavior}),...(_&&_.length>0||Ne.length>0)&&{annotations:[..._||[],...Ne]},...P&&{xExtent:P},...B&&{yExtent:B},..._e.crosshairProps,...D};return _e.earlyReturn?_e.earlyReturn:Ue? zt(Me,{componentName:"AreaChart",message:Ue,width:ee,height:te}): zt(Te,{componentName:"AreaChart",width:ee,height:te,children: zt(se,{ref:o,...qe})})}),"AreaChart"),g=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){me(pe);let o=Dt(null),i=Ie(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",seriesAAccessor:h="a",seriesBAccessor:d="b",seriesALabel:m="A",seriesBLabel:u="B",seriesAColor:p="var(--semiotic-danger, #dc2626)",seriesBColor:y="var(--semiotic-info, #2563eb)",showLines:g=!0,lineWidth:f=1.5,showPoints:b=!1,pointRadius:x=3,curve:v="linear",areaOpacity:w=.6,gradientFill:A,styleRules:S,tooltip:k,annotations:C,xExtent:L,yExtent:R,frameProps:_={},selection:H,linkedHover:I,onObservation:F,onClick:P,hoverHighlight:B,chartId:D,loading:M,loadingContent:T,emptyContent:N,legendInteraction:W,legendPosition:O,pointIdAccessor:E,windowSize:z}=e,{width:G,height:$,enableHover:j,showGrid:V,showLegend:X,title:Y,description:K,summary:Q,accessibleTable:q,xLabel:Z,yLabel:J}=i,ee=Nt(()=>"function"==typeof c?e=>Ro(c(e)):e=>Ro(e[c]),[c]),te=Nt(()=>"function"==typeof h?e=>Ro(h(e)):e=>Ro(e[h]),[h]),oe=Nt(()=>"function"==typeof d?e=>Ro(d(e)):e=>Ro(e[d]),[d]),[ie,ae]=Mt([]),re=Dt([]),ne=null==a,le=Nt(()=>Fe(ne?ie:a),[ne,ie,a]),ce=Nt(()=>wo(le,ee,te,oe),[le,ee,te,oe]),he=Nt(()=>g?_o(le,ee,te,oe):[],[g,le,ee,te,oe]),de=Nt(()=>[...ce,...he],[ce,he]),ue=Nt(()=>{let e= new Set;for(let t of ce)e.add(t.__diffSegment);return Array.from(e)},[ce]);Ot(t,()=>{let e=e=>{let t=z&&e.length>z?e.slice(e.length-z):e;re.current=t,ae(t)},t=E?"function"==typeof E?E:e=>e[E]:null;return{push:t=>e([...re.current,t]),pushMany:t=>e([...re.current,...t]),remove:o=>{if(!t)return[];let i=Array.isArray(o)?o:[o],a=[],r=[];for(let e of re.current)i.includes(t(e))?a.push(e):r.push(e);return e(r),a},update:(o,i)=>{if(!t)return[];let a=Array.isArray(o)?o:[o],r=[],n=re.current.map(e=>{if(a.includes(t(e))){let t=i(e);return r.push(t),t}return e});return e(n),r},clear:()=>e([]),getData:()=>ne?re.current:le,getScales:()=>o.current?.getScales()??null}},[ne,le,E,z]);let ye=Nt(()=>!1===X?void 0:{legendGroups:[{label:"",type:"fill",styleFn:e=>({fill:e.color||"currentColor"}),items:[{label:m,color:p},{label:u,color:y}]}]},[X,m,u,p,y]),ge=Object.hasOwn(_,"legend")?_:{..._,legend:ye},fe=U({responsive:e,data:le,rawData:a,colorBy:"__diffWinner",colorScheme:[p,y],legendInteraction:W,legendPosition:O,frameLegend:ge,selection:H,linkedHover:I,fallbackFields:["__diffWinner"],unwrapData:!1,onObservation:F,onClick:P,hoverHighlight:B,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"DifferenceChart",chartId:D,showLegend:X,userMargin:r,marginDefaults:i.marginDefaults,loading:M,loadingContent:T,emptyContent:N,width:G,height:$,hasTitle:!!Y,axisChrome:Pe(_,{showAxes:i.showAxes,xLabel:Z,yLabel:J})}),xe=Nt(()=>ko({seriesAColor:p,seriesBColor:y,areaOpacity:w,styleRules:S}),[p,y,w,S]),ve=Nt(()=>Co({seriesAColor:p,seriesBColor:y,lineWidth:f,styleRules:S}),[p,y,f,S]),we=Nt(()=>Lo({seriesAColor:p,seriesBColor:y,pointRadius:x,styleRules:S}),[p,y,x,S]),[Ae,ke,Le]=Nt(()=>[xe,ve,we].map(e=>ut(e,fe.effectiveSelectionHook,fe.resolvedSelection)),[xe,ve,we,fe.effectiveSelectionHook,fe.resolvedSelection]),Re=Tt(e=>{let t=e.data,o=e.allSeries,i=e.xValue??t?.__x,a=t?.__valA,r=t?.__valB;if(o&&o.length>0){let e=o.find(e=>"line-A"===e.group),t=o.find(e=>"line-B"===e.group);null!=e?.value&&Number.isFinite(e.value)&&(a=e.value),null!=t?.value&&Number.isFinite(t.value)&&(r=t.value)}if(null!=i&&(null==a||null==r)){let e=le.find(e=>ee(e)===i);e&&(null==a&&(a=te(e)),null==r&&(r=oe(e)))}let n=e=>null!=e&&Number.isFinite(e)?(Math.round(100*e)/100).toString():"—",s=l&&null!=i?l(i):null!=i?String(i):"";
30
+ return zt(Gt,{children:n})},[p]),de=Nt(()=>[he],[he]),ue=Nt(()=>e=>{let t=ae.get(e),o=t?.idx??0,i=t?.total??1;return{fill:i>0?Xt(o,i):"#6366f1",stroke:"white",strokeWidth:1,r:p,fillOpacity:1}},[p,ae]),pe=Nt(()=>De(c,h),[c,h]),ye=z({colorScale:void 0,baseStyleExtras:ue,stroke:N,strokeWidth:W,opacity:O,styleRules:u,ruleContext:pe,effectiveSelectionHook:re.effectiveSelectionHook,resolvedSelection:re.resolvedSelection}),ge=m||("string"==typeof d?d:"Order"),{effectiveData:fe,statisticalAnnotations:be,hasForecast:xe,xAccessorKey:ve,yAccessorKey:Le}=G({data:ie,xAccessor:c,yAccessor:h,forecast:x,anomaly:v}),Re=xe?ve:c,_e=xe?Le:h,He=Nt(()=>Ae([{label:te||we(c),accessor:Re,role:"x",format:l},{label:oe||we(h),accessor:_e,role:"y",format:s},...d?[{label:ge,accessor:d,role:"group"}]:[]]),[c,h,Re,_e,te,oe,d,ge,l,s]),Fe=Q({componentName:"ConnectedScatterplot",data:a,accessors:{xAccessor:c,yAccessor:h}});if(re.earlyReturn)return re.earlyReturn;let Ne=V(b),We=f||[],Oe=Ne||be.length>0?[...Ne?[Ne]:[],...We,...be]:f,Ee={chartType:"scatter",...null!=a&&{data:fe},xAccessor:Re,yAccessor:_e,pointStyle:ye,size:[E,$],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:re.margin,showAxes:i.showAxes,xLabel:te,yLabel:oe,xFormat:l,yFormat:s,enableHover:j,showGrid:X,...Ce({title:Y,description:q,summary:J,accessibleTable:ee,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...ke({tooltip:y,defaultTooltipContent:He}),...Se({linkedHover:_,selection:R,onObservation:H,onClick:I,hoverHighlight:F,hoverRadius:e.hoverRadius,mobileInteraction:re.mobileInteraction,customHoverBehavior:re.customHoverBehavior,customClickBehavior:re.customClickBehavior}),...g&&{pointIdAccessor:g},...S&&{pulse:S},...k&&{decay:k},...C&&{staleness:C},canvasPreRenderers:ce,svgPreRenderers:de,...Oe&&Oe.length>0&&{annotations:Oe},...A&&{xExtent:A},...w&&{yExtent:w},...re.crosshairProps,...L};return Fe? zt(Me,{componentName:"ConnectedScatterplot",message:Fe,width:E,height:$}): zt(Te,{componentName:"ConnectedScatterplot",width:E,height:$,children: zt(se,{ref:o,...Ee})})}),"ConnectedScatterplot"),o=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){me(re);let{data:o,layout:i,layoutConfig:a,onLayoutError:r,xExtent:n,yExtent:l,showAxes:s=!1,margin:c,className:h,annotations:d,onObservation:m,onClick:u,selection:p,linkedHover:y,hoverHighlight:g,chartId:f,loading:b,loadingContent:x,emptyContent:v,colorBy:A,colorScheme:w,legend:S,legendInteraction:k,legendPosition:C,frameProps:L={}}=e,{legend:R,..._}=L,H=Nt(()=>Ne(R,S),[R,S]),{frameRef:I,resolved:F,safeData:P,setup:B,earlyReturn:D}=X({responsive:e,imperativeRef:t,imperativeVariant:"xy",chartTypeLabel:"XYCustomChart",unwrapData:!1,data:o,colorBy:A,colorScheme:w,legend:H,legendInteraction:k,legendPosition:C,frameLegend:_,selection:p,linkedHover:y,hoverHighlight:g,onObservation:m,onClick:u,chartId:f,loading:b,loadingContent:x,emptyContent:v,margin:c,width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,mode:e.mode,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules,xLabel:e.xLabel,yLabel:e.yLabel}),M=B.effectiveSelectionHook,T=Nt(()=>M?.isActive?{isActive:!0,predicate:M.predicate}:null,[M?.isActive,M?.predicate]),N=Nt(()=>We({tooltip:e.tooltip,defaultTooltipContent:e=> zt(ce,{hover:e})}),[e.tooltip]);if(D)return D;let{width:W,height:O,enableHover:E,showGrid:z,title:G,description:$,summary:j,accessibleTable:V,xLabel:Y,yLabel:Q}=F,U={chartType:"custom",...null!=o&&{data:P},customLayout:i,layoutConfig:a,onLayoutError:r,...T&&{layoutSelection:T},xExtent:n,yExtent:l,colorAccessor:A,colorScheme:w,size:[W,O],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:B.margin,showAxes:s,xLabel:Y,yLabel:Q,enableHover:E,showGrid:z,...B.legendBehaviorProps,...Ce({title:G,description:$,summary:j,accessibleTable:V,className:h,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...N,...Se({linkedHover:y,selection:p,onObservation:m,onClick:u,hoverRadius:e.hoverRadius,hoverHighlight:g,mobileInteraction:B.mobileInteraction,customHoverBehavior:B.customHoverBehavior,customClickBehavior:B.customClickBehavior}),...d&&d.length>0&&{annotations:d},...B.crosshairProps,..._};
31
+ return zt(Te,{componentName:"XYCustomChart",width:W,height:O,children: zt(se,{ref:I,...U})})}),"XYCustomChart"),i="Other",a={top:20,bottom:48,left:48},r=8,n=4,l=24,s=6,c=1.1,h=[[/[mwMW@%…]/,.95],[/[ijlI'.,|\s]/,.28],[/[frt():;/[\]{}*`!\\-]/,.39]],d=.75,m=.62,u=1.05,p=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){let i=je(),a=Rt(),{data:r,xAccessor:n,yAccessor:l,lineBy:s,rankDirection:c="descending",ribbon:h=!1,curve:d="smooth",ribbonSizeRange:m=[4,28],samplesPerSegment:u=12,lineWidth:p=3,highlightTop:y,neutralColor:g,styleRules:f,labelStyle:b,colorScheme:x,ribbonOpacity:v=.82,lineOpacity:A=.9,showPoints:w=!1,pointRadius:S=3,showLabels:k=!0,labelPriorityAccessor:C,maxLabels:L,showGrid:R=!0,showLegend:_=!1,enableHover:H=!0,hoverHighlight:I=!0,tooltip:F,frameProps:P={},xFormat:B,yFormat:D,onClick:M}=e,T=Jt(y),N=Zt(g),W=Zt(e.color),O=Ie(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,responsiveRules:e.responsiveRules}),E=Nt(()=>to(r,{xAccessor:n,yAccessor:l,lineBy:s,rankDirection:c,highlightTop:T}),[r,n,l,s,c,T]),{axes:z,areaStyle:G,pointStyle:$,margin:j,...V}=P,X="object"==typeof b&&"number"==typeof b?.fontSize?b.fontSize:12,Q=e.legendPosition??"right",U=!_||"left"!==Q&&"right"!==Q?void 0:Q,K=Nt(()=>co({labels:E.seriesOrder,showLabels:k,width:O.width,showAxes:O.showAxes,rankCount:E.seriesOrder.length,yLabel:e.yLabel??"Rank",fontSize:X,legendSide:U}),[E.seriesOrder,k,O.width,O.showAxes,e.yLabel,X,U]),q=e.margin??j,J=Nt(()=>({...K.margin,...Y(q)}),[K,q]),Z=Nt(()=>ho(J,K),[J,K]),ee=U?Z.sideGutter[U]:void 0,te=Nt(()=>eo({seriesOrder:E.seriesOrder,overallOrder:E.overallOrder,highlightTop:T,color:W,colorScheme:x,neutralColor:N,themeCategorical:i,themeNeutral:a.colors.textSecondary}),[E.seriesOrder,E.overallOrder,T,W,x,N,i,a.colors.textSecondary]),oe=Nt(()=>({ribbon:h,curve:d,samplesPerSegment:u,ribbonSizeRange:m,valueExtent:E.valueExtent,seriesOrder:E.seriesOrder,lineWidth:p,ribbonOpacity:v,lineOpacity:A,neutralColor:N,color:W,colorMap:te&&"object"==typeof te&&!Array.isArray(te)?te:void 0,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity,styleRules:f,areaStyle:G,pointStyle:$,labelStyle:b,showPoints:w,pointRadius:S,showLabels:k,labelPriorityAccessor:C,maxLabels:L,startLabelOffset:K.startLabelOffset,labelBudget:Z.budget,labelFontSize:X}),[h,d,u,m,E.valueExtent,E.seriesOrder,p,v,A,N,te,W,e.stroke,e.strokeWidth,e.opacity,f,G,$,b,w,S,k,C,L,K.startLabelOffset,Z.budget,X]),{tooltip:ie,formatX:ae}=oo({tooltip:F,xValues:E.xValues,xFormat:B,yFormat:D}),re=Nt(()=>{if(M)return(e,t)=>{M(e.__bumpRaw??e,t)}},[M]),ne=Math.max(1,E.seriesOrder.length),le=E.xValues.map((e,t)=>t),se=Array.from({length:ne},(e,t)=>t+1),ce=z??[{orient:"left",tickValues:se,tickFormat:e=>String(e),label:e.yLabel??"Rank",baseline:!1},{orient:"bottom",tickValues:le,tickFormat:ae,label:e.xLabel,tickAnchor:"edges"}],he=Nt(()=>qt(e.annotations,E.xValues),[e.annotations,E.xValues]);
32
+ return zt(o,{ref:t,data:E.data,layout:bo,layoutConfig:oe,xExtent:[0,Math.max(1,E.xValues.length-1)],yExtent:[ne+.5,.5],showAxes:O.showAxes,showGrid:R,showLegend:_,enableHover:H,hoverHighlight:I,colorBy:"__bumpSeries",colorScheme:te,tooltip:ie,onClick:re,hoverRadius:e.hoverRadius,width:e.width,height:e.height,responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,maxDevicePixelRatio:e.maxDevicePixelRatio,responsiveRules:e.responsiveRules,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,mode:e.mode,margin:J,className:e.className,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,selection:e.selection,linkedHover:e.linkedHover,legend:e.legend,legendInteraction:e.legendInteraction,legendPosition:e.legendPosition,onObservation:e.onObservation,chartId:e.chartId,loading:e.loading,loadingContent:e.loadingContent,emptyContent:e.emptyContent,animate:e.animate,autoPlaceAnnotations:e.autoPlaceAnnotations,annotations:he,xLabel:e.xLabel,yLabel:e.yLabel??"Rank",frameProps:{axes:ce,axisExtent:"exact",...V,...null!=ee&&null==V.legendLayout?.sideGutter&&{legendLayout:{...V.legendLayout,sideGutter:ee}}}})}),"BumpChart"),y=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){me(ue);let o=Dt(null);U(t,{variant:"xy",frameRef:o});let i=Ie(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",yAccessor:h="y",areaBy:d,y0Accessor:m,gradientFill:u=!1,semanticGradient:p,semanticLine:y=!0,lineDataAccessor:g="coordinates",colorBy:f,colorScheme:b,styleRules:x,curve:v="monotoneX",areaOpacity:A=.7,lineGradient:w,showLine:S=!0,lineWidth:k=2,showPoints:C=!1,pointRadius:L=3,tooltip:R,annotations:_,forecast:H,anomaly:I,band:F,xExtent:P,yExtent:B,frameProps:D={},selection:M,linkedHover:T,onObservation:N,onClick:W,hoverHighlight:O,chartId:E,loading:z,loadingContent:$,emptyContent:j,legendInteraction:V,legendPosition:X,color:Y,stroke:q,strokeWidth:J,opacity:Z}=e,{width:ee,height:te,enableHover:oe,showGrid:ie,showLegend:ae,title:re,description:ne,summary:le,accessibleTable:ce,xLabel:he,yLabel:de}=i,pe=Nt(()=>Fe(a),[a]),ye=f||d,Ae=Nt(()=>ge(p),[p]),ke=Nt(()=>Ae?.stops.length?fe(Ae):be(u),[Ae,u]),Le=Nt(()=>xe(w),[w]),Re=Nt(()=>y?ve(Ae):void 0,[Ae,y]);Be("AreaChart",pe,"xAccessor",c),Be("AreaChart",pe,"yAccessor",h);let _e=K({responsive:e,data:pe,rawData:a,colorBy:ye,colorScheme:b,legendInteraction:V,legendPosition:X,frameLegend:D,selection:M,linkedHover:T,fallbackFields:ye?["string"==typeof ye?ye:""]:[],unwrapData:!1,onObservation:N,onClick:W,hoverHighlight:O,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"AreaChart",chartId:E,showLegend:ae,userMargin:r,marginDefaults:i.marginDefaults,loading:z,loadingContent:$,emptyContent:j,width:ee,height:te,hasTitle:!!re,axisChrome:Pe(D,{showAxes:i.showAxes,xLabel:he,yLabel:de})}),{effectiveData:He,statisticalAnnotations:Ne,hasForecast:Oe,xAccessorKey:Ee,yAccessorKey:ze}=G({data:pe,xAccessor:c,yAccessor:h,forecast:H,anomaly:I,groupBy:d}),Ge=Oe?Ee:c,$e=Oe?ze:h,je=Nt(()=>De(c,h),[c,h]),{flattenedData:Xe,lineStyle:Ye,pointStyle:Qe,defaultTooltipContent:Ue}=vo({safeData:He,data:a,areaBy:d,lineDataAccessor:g,colorBy:ye,colorScale:_e.colorScale,color:Y,stroke:q,strokeWidth:J,opacity:Z,effectiveSelectionHook:_e.effectiveSelectionHook,resolvedSelection:_e.resolvedSelection,areaOpacity:A,showLine:S,lineWidth:k,showPoints:C,pointRadius:L,xAccessor:Ge,yAccessor:$e,xLabel:he||we(c),yLabel:de||we(h),xFormat:l,yFormat:s,groupField:d||f,band:F,styleRules:x,ruleContext:je}),Ke=Q({componentName:"AreaChart",data:a,accessors:{xAccessor:c,yAccessor:h}}),qe={chartType:"area",...null!=a&&{data:Xe},xAccessor:Ge,yAccessor:$e,groupAccessor:d||void 0,...m&&{y0Accessor:m},...F&&{band:F},...ke&&{gradientFill:ke},...Le&&{lineGradient:Le},...Re&&{semanticLineStops:Re},curve:v,lineStyle:Ye,...C&&Qe&&{pointStyle:Qe},size:[ee,te],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:_e.margin,showAxes:i.showAxes,xLabel:he,yLabel:de,xFormat:l,yFormat:s,enableHover:oe,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},showGrid:ie,..._e.legendBehaviorProps,...Ce({title:re,description:ne,summary:le,accessibleTable:ce,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...We({tooltip:R,defaultTooltipContent:Ue,multiDefaultContent:Ve({xFormat:l,yFormat:s})}),...Se({linkedHover:T,selection:M,onObservation:N,onClick:W,hoverHighlight:O,hoverRadius:e.hoverRadius,mobileInteraction:_e.mobileInteraction,customHoverBehavior:_e.customHoverBehavior,customClickBehavior:_e.customClickBehavior}),...(_&&_.length>0||Ne.length>0)&&{annotations:[..._||[],...Ne]},...P&&{xExtent:P},...B&&{yExtent:B},..._e.crosshairProps,...D};return _e.earlyReturn?_e.earlyReturn:Ke? zt(Me,{componentName:"AreaChart",message:Ke,width:ee,height:te}): zt(Te,{componentName:"AreaChart",width:ee,height:te,children: zt(se,{ref:o,...qe})})}),"AreaChart"),g=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){me(pe);let o=Dt(null),i=Ie(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",seriesAAccessor:h="a",seriesBAccessor:d="b",seriesALabel:m="A",seriesBLabel:u="B",seriesAColor:p="var(--semiotic-danger, #dc2626)",seriesBColor:y="var(--semiotic-info, #2563eb)",showLines:g=!0,lineWidth:f=1.5,showPoints:b=!1,pointRadius:x=3,curve:v="linear",areaOpacity:A=.6,gradientFill:w,styleRules:S,tooltip:k,annotations:C,xExtent:L,yExtent:R,frameProps:_={},selection:H,linkedHover:I,onObservation:F,onClick:P,hoverHighlight:B,chartId:D,loading:M,loadingContent:T,emptyContent:N,legendInteraction:W,legendPosition:O,pointIdAccessor:E,windowSize:z}=e,{width:G,height:$,enableHover:j,showGrid:V,showLegend:X,title:Y,description:Q,summary:U,accessibleTable:q,xLabel:J,yLabel:Z}=i,ee=Nt(()=>"function"==typeof c?e=>Ro(c(e)):e=>Ro(e[c]),[c]),te=Nt(()=>"function"==typeof h?e=>Ro(h(e)):e=>Ro(e[h]),[h]),oe=Nt(()=>"function"==typeof d?e=>Ro(d(e)):e=>Ro(e[d]),[d]),[ie,ae]=Mt([]),re=Dt([]),ne=null==a,le=Nt(()=>Fe(ne?ie:a),[ne,ie,a]),ce=Nt(()=>Ao(le,ee,te,oe),[le,ee,te,oe]),he=Nt(()=>g?_o(le,ee,te,oe):[],[g,le,ee,te,oe]),de=Nt(()=>[...ce,...he],[ce,he]),ue=Nt(()=>{let e= new Set;for(let t of ce)e.add(t.__diffSegment);return Array.from(e)},[ce]);Ot(t,()=>{let e=e=>{let t=z&&e.length>z?e.slice(e.length-z):e;re.current=t,ae(t)},t=E?"function"==typeof E?E:e=>e[E]:null;return{push:t=>e([...re.current,t]),pushMany:t=>e([...re.current,...t]),remove:o=>{if(!t)return[];let i=Array.isArray(o)?o:[o],a=[],r=[];for(let e of re.current)i.includes(t(e))?a.push(e):r.push(e);return e(r),a},update:(o,i)=>{if(!t)return[];let a=Array.isArray(o)?o:[o],r=[],n=re.current.map(e=>{if(a.includes(t(e))){let t=i(e);return r.push(t),t}return e});return e(n),r},clear:()=>e([]),getData:()=>ne?re.current:le,getScales:()=>o.current?.getScales()??null}},[ne,le,E,z]);let ye=Nt(()=>!1===X?void 0:{legendGroups:[{label:"",type:"fill",styleFn:e=>({fill:e.color||"currentColor"}),items:[{label:m,color:p},{label:u,color:y}]}]},[X,m,u,p,y]),ge=Object.hasOwn(_,"legend")?_:{..._,legend:ye},fe=K({responsive:e,data:le,rawData:a,colorBy:"__diffWinner",colorScheme:[p,y],legendInteraction:W,legendPosition:O,frameLegend:ge,selection:H,linkedHover:I,fallbackFields:["__diffWinner"],unwrapData:!1,onObservation:F,onClick:P,hoverHighlight:B,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"DifferenceChart",chartId:D,showLegend:X,userMargin:r,marginDefaults:i.marginDefaults,loading:M,loadingContent:T,emptyContent:N,width:G,height:$,hasTitle:!!Y,axisChrome:Pe(_,{showAxes:i.showAxes,xLabel:J,yLabel:Z})}),xe=Nt(()=>ko({seriesAColor:p,seriesBColor:y,areaOpacity:A,styleRules:S}),[p,y,A,S]),ve=Nt(()=>Co({seriesAColor:p,seriesBColor:y,lineWidth:f,styleRules:S}),[p,y,f,S]),Ae=Nt(()=>Lo({seriesAColor:p,seriesBColor:y,pointRadius:x,styleRules:S}),[p,y,x,S]),[we,ke,Le]=Nt(()=>[xe,ve,Ae].map(e=>ut(e,fe.effectiveSelectionHook,fe.resolvedSelection)),[xe,ve,Ae,fe.effectiveSelectionHook,fe.resolvedSelection]),Re=Tt(e=>{let t=e.data,o=e.allSeries,i=e.xValue??t?.__x,a=t?.__valA,r=t?.__valB;if(o&&o.length>0){let e=o.find(e=>"line-A"===e.group),t=o.find(e=>"line-B"===e.group);null!=e?.value&&Number.isFinite(e.value)&&(a=e.value),null!=t?.value&&Number.isFinite(t.value)&&(r=t.value)}if(null!=i&&(null==a||null==r)){let e=le.find(e=>ee(e)===i);e&&(null==a&&(a=te(e)),null==r&&(r=oe(e)))}let n=e=>null!=e&&Number.isFinite(e)?(Math.round(100*e)/100).toString():"—",s=l&&null!=i?l(i):null!=i?String(i):"";
33
33
  return $t("div",{className:"semiotic-tooltip",style:_t,children:[s&& zt("div",{style:{fontWeight:600,marginBottom:4},children:s}),
34
34
  $t("div",{style:{display:"flex",alignItems:"center",gap:6},children:[
35
35
  zt("span",{style:{width:10,height:10,background:p,display:"inline-block",borderRadius:2}}),
36
36
  $t("span",{children:[m,": ",n(a)]})]}),
37
37
  $t("div",{style:{display:"flex",alignItems:"center",gap:6},children:[
38
38
  zt("span",{style:{width:10,height:10,background:y,display:"inline-block",borderRadius:2}}),
39
- $t("span",{children:[u,": ",n(r)]})]}),null!=a&&null!=r&&Number.isFinite(a)&&Number.isFinite(r)&& $t("div",{style:{marginTop:4,opacity:.7},children:["Δ = ",n(a-r)]})]})},[le,ee,te,oe,l,p,y,m,u]),{tooltipContent:_e,tooltipMode:He}=Nt(()=>We({tooltip:k,defaultTooltipContent:Re,multiDefaultContent:Re}),[k,Re]),Be=Nt(()=>be(A,{stops:[{offset:0,opacity:.85},{offset:1,opacity:.15}]}),[A]);if(fe.earlyReturn)return fe.earlyReturn;let De={chartType:"mixed",data:de,xAccessor:"__x",yAccessor:"__y",y0Accessor:"__y0",groupAccessor:"__diffSegment",areaGroups:ue,curve:v,areaStyle:Ae,lineStyle:ke,...b&&{pointStyle:Le},size:[G,$],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:fe.margin,showAxes:i.showAxes,xLabel:Z,yLabel:J,xFormat:l,yFormat:s,enableHover:j,showGrid:V,...Be&&{gradientFill:Be},...fe.legendBehaviorProps,...Ce({title:Y,description:K,summary:Q,accessibleTable:q,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),tooltipContent:_e,..."multi"===He&&{tooltipMode:"multi"},...Se({linkedHover:I,selection:H,onObservation:F,onClick:P,hoverHighlight:B,hoverRadius:e.hoverRadius,mobileInteraction:fe.mobileInteraction,customHoverBehavior:fe.customHoverBehavior,customClickBehavior:fe.customClickBehavior}),...C&&C.length>0&&{annotations:C},...L&&{xExtent:L},...R&&{yExtent:R},...fe.crosshairProps,..._};
40
- return zt(Te,{componentName:"DifferenceChart",width:G,height:$,children: zt(se,{ref:o,...De})})}),"DifferenceChart"),f=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){me(ee);let o=Dt(null),i=Ie(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",yAccessor:h="y",areaBy:d,lineDataAccessor:m="coordinates",colorBy:u,colorScheme:p,styleRules:y,curve:g="monotoneX",areaOpacity:f=.7,showLine:b=!0,lineWidth:x=2,showPoints:v=!1,pointRadius:w=3,normalize:A=!1,baseline:S="zero",stackOrder:k,tooltip:C,annotations:L,xExtent:R,yExtent:_,frameProps:H={},selection:I,linkedHover:F,onObservation:P,onClick:B,hoverHighlight:D,chartId:M,loading:T,loadingContent:N,emptyContent:W,legendInteraction:O,legendPosition:E,color:z,stroke:G,strokeWidth:$,opacity:j}=e,{width:V,height:X,enableHover:Y,showGrid:q,showLegend:Z,title:J,description:te,summary:oe,accessibleTable:ie,xLabel:ae,yLabel:re}=i,ne=Nt(()=>Fe(a),[a]),le=u||d;Q(t,{variant:"xy",frameRef:o});let ce=U({responsive:e,data:ne,rawData:a,colorBy:le,colorScheme:p,legendInteraction:O,legendPosition:E,frameLegend:H,selection:I,linkedHover:F,fallbackFields:le?["string"==typeof le?le:""]:[],unwrapData:!1,onObservation:P,onClick:B,hoverHighlight:D,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"StackedAreaChart",chartId:M,showLegend:Z,userMargin:r,marginDefaults:i.marginDefaults,loading:T,loadingContent:N,emptyContent:W,width:V,height:X,hasTitle:!!J,axisChrome:Pe(H,{showAxes:i.showAxes,xLabel:ae,yLabel:re})}),he=Nt(()=>De(c,h),[c,h]),{flattenedData:de,lineStyle:ue,pointStyle:pe,defaultTooltipContent:ye}=vo({safeData:ne,data:a,areaBy:d,lineDataAccessor:m,colorBy:le,colorScale:ce.colorScale,color:z,stroke:G,strokeWidth:$,opacity:j,effectiveSelectionHook:ce.effectiveSelectionHook,resolvedSelection:ce.resolvedSelection,areaOpacity:f,showLine:b,lineWidth:x,showPoints:v,pointRadius:w,xAccessor:c,yAccessor:h,xLabel:ae,yLabel:re,xFormat:l,yFormat:s,groupField:d||u,styleRules:y,ruleContext:he}),ge=K({componentName:"StackedAreaChart",data:a,accessors:{xAccessor:c,yAccessor:h}}),fe={chartType:"stackedarea",...null!=a&&{data:de},xAccessor:c,yAccessor:h,groupAccessor:d||void 0,curve:g,normalize:A,baseline:A?"zero":S,stackOrder:k,lineStyle:ue,...v&&pe&&{pointStyle:pe},size:[V,X],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:ce.margin,showAxes:i.showAxes,xLabel:ae,yLabel:re,xFormat:l,yFormat:s,enableHover:Y,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},showGrid:q,...ce.legendBehaviorProps,...Ce({title:J,description:te,summary:oe,accessibleTable:ie,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...We({tooltip:C,defaultTooltipContent:ye,multiDefaultContent:Ve({xFormat:l,yFormat:s})}),...Se({linkedHover:F,selection:I,onObservation:P,onClick:B,hoverHighlight:D,hoverRadius:e.hoverRadius,mobileInteraction:ce.mobileInteraction,customHoverBehavior:ce.customHoverBehavior,customClickBehavior:ce.customClickBehavior}),...L&&L.length>0&&{annotations:L},...R&&{xExtent:R},..._&&{yExtent:_},...ce.crosshairProps,...H};return ce.earlyReturn?ce.earlyReturn:ge? zt(Me,{componentName:"StackedAreaChart",message:ge,width:V,height:X}): zt(Te,{componentName:"StackedAreaChart",width:V,height:X,children: zt(se,{ref:o,...fe})})}),"StackedAreaChart"),b=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){me(te);let o=Dt(null);Q(t,{variant:"xy",frameRef:o});let i=Ie(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:void 0,enableHover:e.enableHover,showLegend:void 0,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:n,xAccessor:l="x",yAccessor:s="y",valueAccessor:c="value",xFormat:h,yFormat:d,colorScheme:m,customColorScale:u,showValues:p=!1,valueFormat:y,cellBorderColor:g="#fff",cellBorderWidth:f=1,tooltip:b,annotations:x,heatmapAggregation:v,heatmapXBins:w,heatmapYBins:A,styleRules:S,xExtent:k,yExtent:C,frameProps:L={},selection:R,linkedHover:_,onObservation:H,onClick:I,hoverHighlight:F,chartId:P,loading:B,loadingContent:D,emptyContent:M,showLegend:T,legendPosition:N,legend:W,legendInteraction:O,stroke:E,strokeWidth:z,opacity:G}=e,{width:$,height:j,enableHover:V,title:X,description:Y,summary:U,accessibleTable:J,xLabel:ee,yLabel:oe}=i,ie=Ye(B,$,j,D,e),ae=ie?null:Ke(a,$,j,M,e),re=Nt(()=>Fe(a),[a]),ne=Qe(),le=m??ne??"blues",ce=("string"==typeof L.colorScheme?L.colorScheme:void 0)??le,he="function"==typeof L.heatmapColorScale?L.heatmapColorScale:"custom"===ce&&"function"==typeof u?u:void 0,de=T??!1,ue=N??"right",{activeSelectionHook:pe,customHoverBehavior:ye,customClickBehavior:ge,crosshairSourceId:fe}=Ue({selection:R,linkedHover:_,fallbackFields:[],onObservation:H,onClick:I,chartType:"Heatmap",chartId:P,hoverHighlight:F,colorByField:void 0,mobileInteraction:i.mobileInteraction}),be=q(R),xe=qe(_,fe);Ze(O,void 0,[]);let ve=Nt(()=>"function"==typeof c?e=>c(e):e=>e[c],[c]),Le=Nt(()=>{let e=re.map(ve);return Ft(e)},[re,ve]),Re=Nt(()=>{if(he)return he;let e=wt(ce);return jt(e).domain(Le)},[ce,he,Le]),_e=Nt(()=>{let e=Number.isFinite(f)?Math.max(0,f):1;return()=>({stroke:g,strokeWidth:e})},[g,f]),He=Nt(()=>Z(l,s,c),[l,s,c]),Be=Nt(()=>Xe(_e,S,He),[_e,S,He]),De=Nt(()=>ut(Be,pe,be),[pe,Be,be]),Ne=Nt(()=>we([{label:ee||Ae(l),accessor:l,role:"x",format:h},{label:oe||Ae(s),accessor:s,role:"y",format:d},{label:Ae(c),accessor:c,role:"value",format:y}]),[l,s,ee,oe,c,h,d,y]),We=K({componentName:"Heatmap",data:a,accessors:{xAccessor:l,yAccessor:s,valueAccessor:c}}),Oe=Nt(()=>de?{gradient:{colorFn:e=>Re(e),domain:Le,label:"string"==typeof c?c:"value",format:y},legendDistance:W?.legendDistance}:void 0,[de,Re,Le,c,y,W?.legendDistance]),{margin:Ee,legend:ze,legendPosition:Ge,legendMarginReserved:$e}=Je({data:[],colorBy:void 0,colorScale:void 0,showLegend:!1,legendPosition:ue,userMargin:r,defaults:i.marginDefaults,additionalLegend:Oe,chartWidth:$,chartHeight:j,legendLayout:L.legendLayout,frameLegend:L,hasTitle:!!X,axisChrome:Pe(L,{showAxes:i.showAxes,xLabel:ee,yLabel:oe})}),je={chartType:"heatmap",...null!=a&&{data:re},xAccessor:l,yAccessor:s,valueAccessor:c,colorScheme:"custom"!==ce?ce:void 0,...he&&{heatmapColorScale:he},areaStyle:De,showValues:p,heatmapValueFormat:y,size:[$,j],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:Ee,showAxes:i.showAxes,xLabel:ee,yLabel:oe,xFormat:h,yFormat:d,enableHover:V,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},...ze&&{legend:ze,legendPosition:Ge},...$e&&{__legendMarginReservedFor:ze},...Ce({title:X,description:Y,summary:U,accessibleTable:J,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...ke({tooltip:b,defaultTooltipContent:Ne}),...Se({linkedHover:_,selection:R,onObservation:H,onClick:I,hoverHighlight:F,hoverRadius:e.hoverRadius,mobileInteraction:i.mobileInteraction,customHoverBehavior:ye,customClickBehavior:ge}),...x&&x.length>0&&{annotations:x},...v&&{heatmapAggregation:v},...null!=w&&{heatmapXBins:w},...null!=A&&{heatmapYBins:A},...k&&{xExtent:k},...C&&{yExtent:C},...xe,...L};return ie||ae||(We? zt(Me,{componentName:"Heatmap",message:We,width:$,height:j}): zt(Te,{componentName:"Heatmap",width:$,height:j,children: zt(se,{ref:o,...je})}))}),"Heatmap"),x=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){ne(E),me(oe);let o=Dt(null),i=Ie(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",yAccessor:h="y",sizeBy:d,sizeRange:m=[5,40],colorBy:u,colorScheme:p,styleRules:y,bubbleOpacity:g=.6,bubbleStrokeWidth:f=1,bubbleStrokeColor:b="white",tooltip:x,marginalGraphics:v,pointIdAccessor:w,annotations:A,regression:S,xExtent:k,yExtent:C,pulse:L,decay:R,staleness:_,frameProps:H={},selection:I,linkedHover:F,linkedBrush:P,brush:B,onBrush:D,onObservation:M,onClick:T,hoverHighlight:N,chartId:W,loading:O,loadingContent:G,emptyContent:$,legendInteraction:j,legendPosition:X,color:Y,stroke:q,strokeWidth:Z,opacity:J}=e,{width:ee,height:te,enableHover:ie,showGrid:ae,showLegend:re,title:ce,description:he,summary:de,accessibleTable:ue,xLabel:pe,yLabel:ye}=i,ge=Nt(()=>Fe(a),[a]),fe=void 0===a,be=U({responsive:e,data:ge,rawData:a,colorBy:u,colorScheme:p,legendInteraction:j,legendPosition:X,frameLegend:H,selection:I,linkedHover:F,fallbackFields:u?["string"==typeof u?u:""]:[],unwrapData:!1,onObservation:M,onClick:T,hoverHighlight:N,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"BubbleChart",chartId:W,showLegend:re,userMargin:r,marginDefaults:i.marginDefaults,loading:O,loadingContent:G,emptyContent:$,width:ee,height:te,hasTitle:!!ce,axisChrome:Pe(H,{showAxes:i.showAxes,xLabel:pe,yLabel:ye})}),{domain:xe,trackPushed:ve,reset:Le}=Vt({accessor:d,data:ge,isPushMode:fe}),Re=Tt(e=>{ve([e]),o.current?.push(e)},[ve]),_e=Tt(e=>{ve(e),o.current?.pushMany(e)},[ve]);Q(t,{variant:"xy",frameRef:o,overrides:{push:Re,pushMany:_e,clear:()=>{Le(),o.current?.clear()}}});let{brushStreamProps:He}=le({brush:B,onBrush:D,linkedBrush:P,xAccessor:c,yAccessor:h,defaultDimension:"xy"}),Be=Nt(()=>({stroke:b,strokeWidth:f}),[b,f]),Ne=Nt(()=>xe??[0,1],[xe]),We=Tt(e=>pt(e,d,m,Ne),[d,m,Ne]),Oe=Nt(()=>De(c,h),[c,h]),Ee=z({colorBy:u,colorScale:be.colorScale,color:Y,fillOpacity:g,radiusFn:We,baseStyleExtras:Be,stroke:q,strokeWidth:Z,opacity:J,styleRules:y,ruleContext:Oe,effectiveSelectionHook:be.effectiveSelectionHook,resolvedSelection:be.resolvedSelection}),ze=Nt(()=>we([{label:pe||Ae(c),accessor:c,role:"x",format:l},{label:ye||Ae(h),accessor:h,role:"y",format:s},{label:Ae(d),accessor:d,role:"size"},...u?[{label:Ae(u),accessor:u,role:"color"}]:[]]),[c,h,pe,ye,d,u,l,s]);if(be.earlyReturn)return be.earlyReturn;let Ge=K({componentName:"BubbleChart",data:a,accessors:{xAccessor:c,yAccessor:h},requiredProps:{sizeBy:d}});if(Ge) return zt(Me,{componentName:"BubbleChart",message:Ge,width:ee,height:te});let $e=V(S),je=$e?[$e,...A||[]]:A,Ve={chartType:"bubble",...null!=a&&{data:ge},xAccessor:c,yAccessor:h,colorAccessor:u||void 0,sizeAccessor:d,sizeRange:m,pointStyle:Ee,colorScheme:p,size:[ee,te],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:be.margin,showAxes:i.showAxes,xLabel:pe,yLabel:ye,xFormat:l,yFormat:s,enableHover:ie,showGrid:ae,...be.legendBehaviorProps,...Ce({title:ce,description:he,summary:de,accessibleTable:ue,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...ke({tooltip:x,defaultTooltipContent:ze}),...Se({linkedHover:F,selection:I,onObservation:M,onClick:T,hoverHighlight:N,hoverRadius:e.hoverRadius,mobileInteraction:be.mobileInteraction,customHoverBehavior:be.customHoverBehavior,customClickBehavior:be.customClickBehavior}),...v&&{marginalGraphics:v},...w&&{pointIdAccessor:w},...L&&{pulse:L},...R&&{decay:R},..._&&{staleness:_},...je&&je.length>0&&{annotations:je},...k&&{xExtent:k},...C&&{yExtent:C},...be.crosshairProps,...He,...H};
41
- return zt(Te,{componentName:"BubbleChart",width:ee,height:te,children: zt(se,{ref:o,...Ve})})}),"BubbleChart"),v={width:800,height:400},w={cellSize:150,cellGap:4,labelWidth:40},A=null,S=null,k="__splomIdx",C="splom-hover-source",L={top:4,bottom:4,left:4,right:4},R=/*#__PURE__*/He(function(e){let{brushMode:t="crossfilter",hoverMode:o=!0}=e,i={};return!o&&t&&(i.splom={resolution:t}),o&&(i["splom-hover"]={resolution:"union"}), zt(ct,{selections:i,children: zt(Bo,{...e})})},"ScatterplotMatrix"),_=null,H=null,I=60,F=/*#__PURE__*/He(function(e){$();let t=ht(void 0,{}),{data:o,width:i=t.width,height:a=t.height,margin:r,className:n,title:l,description:s,summary:c,xLabel:h,yLabel:d,xFormat:m,yFormat:u,xAccessor:p="x",yAccessor:y="y",lineBy:g,lineDataAccessor:f="coordinates",colorBy:b,colorScheme:x,curve:v="linear",lineWidth:w=2,styleRules:A,fillArea:S=!1,areaOpacity:k=.3,showPoints:C=!1,pointRadius:L=3,enableHover:R=!0,showAxes:_=!0,showGrid:H=!1,showLegend:F,legendPosition:P,tooltip:B,minimap:D={},renderBefore:M=!1,onBrush:T,onBrushEnd:N,onObservation:W,chartId:O,brushExtent:E,yExtent:z,frameProps:G={},loading:V,loadingContent:X,emptyContent:Y}=e,Q=a+Mo(D),U=Ye(V,i,Q,X,e),q=U?null:Ke(o,i,Q,Y,e),Z=Nt(()=>Fe(o),[o]),[J,ee]=Mt(null),te=E??J,oe=Dt(null),[ie,ae]=Mt(null),re=void 0!==Z[0]?.[f],ne=Nt(()=>{if(re)return Z;if(g){let e=Z.reduce((e,t)=>{let o="function"==typeof g?g(t):t[g];if(!e[o]){let t={[f]:[]};"string"==typeof g&&(t[g]=o),e[o]=t}return e[o][f].push(t),e},{});return Object.values(e)}return[{[f]:Z}]},[Z,g,f,re]),le=Nt(()=>re||g?ne.flatMap(e=>{let t=e[f]||[];return g&&"string"==typeof g?t.map(t=>({...t,[g]:e[g]})):t}):Z,[ne,f,re,g,Z]),ce=it(Z,b,x),he=Nt(()=>De(p,y),[p,y]),de=j({lineWidth:w,colorBy:b,colorScale:ce,fillArea:S,areaOpacity:k,styleRules:A,ruleContext:he}),me=Nt(()=>{if(D.lineStyle)return D.lineStyle},[D.lineStyle]),ue=j({lineWidth:1,colorBy:b,colorScale:ce,styleRules:A,ruleContext:he}),pe=me??ue,ye=Nt(()=>C?Xe(e=>{let t={r:L,fillOpacity:1};return t.fill=b?xt(e.parentLine||e,b,ce):vt,t},A,he,e=>e.parentLine||e):void 0,[C,L,b,ce,A,he]),{legend:ge,margin:fe,legendPosition:be,legendMarginReserved:xe}=Je({data:ne,colorBy:b,colorScale:ce,showLegend:F,legendPosition:P,userMargin:r,chartWidth:i,chartHeight:a,frameLegend:G,hasTitle:!!l,axisChrome:Pe(G,{showAxes:_,xLabel:h,yLabel:d})}),ve=D.height||I,Se=To(D),ke=Nt(()=>({top:D.margin?.top??Se.top,bottom:D.margin?.bottom??Se.bottom,left:D.margin?.left??fe.left,right:D.margin?.right??fe.right}),[D.margin,Se.top,Se.bottom,fe]),Ce=D.brushDirection||"x",Le=Math.max(0,i-ke.left-ke.right),Re=z?.[0],_e=z?.[1];Et(()=>{let e=0,t=!1,o=0,i=()=>{if(t)return;let a=oe.current?.getScales?.(),r=(e,t)=>Math.abs(Math.max(...e)-Math.min(...e)-t)<.5;a&&(o>=60||r(a.x.range(),Le)&&r(a.y.range(),ve))?ae(a):(o++,e=requestAnimationFrame(i))};return e=requestAnimationFrame(i),()=>{t=!0,e&&cancelAnimationFrame(e)}},[o,Le,ve,ke.top,ke.bottom,Re,_e]);let He=Tt(e=>{if(E||ee(e),T?.(e),!W)return;if(!e)return void W({type:"brush-end",timestamp:Date.now(),chartType:"MinimapChart",chartId:O});let t=ie?.["x"===Ce?"y":"x"].domain().map(Number)??[e[0],e[1]];W({type:"brush",extent:"x"===Ce?{x:e,y:t}:{x:t,y:e},timestamp:Date.now(),chartType:"MinimapChart",chartId:O})},[E,T,W,O,ie,Ce]),Ie=Nt(()=>we([{label:h||Ae(p),accessor:p,role:"x",format:m},{label:d||Ae(y),accessor:y,role:"y",format:u}]),[p,y,h,d,m,u]),Be=K({componentName:"MinimapChart",data:o,accessors:{xAccessor:p,yAccessor:y}}),Ne=S?"area":"line",Oe={chartType:Ne,data:le,xAccessor:p,yAccessor:y,groupAccessor:g||void 0,curve:v,lineStyle:de,...C&&{pointStyle:ye},size:[i,a],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},margin:fe,showAxes:_,xLabel:h,yLabel:d,xFormat:m,yFormat:u,enableHover:R,showGrid:H,...ge&&{legend:ge,legendPosition:be},...xe&&{__legendMarginReservedFor:ge},...l&&{title:l},...s&&{description:s},...c&&{summary:c},...void 0!==e.accessibleTable&&{accessibleTable:e.accessibleTable},...void 0!==e.animate&&{animate:e.animate},...void 0!==e.hoverRadius&&{hoverRadius:e.hoverRadius},...We({tooltip:B,defaultTooltipContent:Ie}),...te&&"x"===Ce&&{xExtent:te},...z&&{yExtent:z},...te&&"y"===Ce&&{yExtent:te},...void 0!==e.axisExtent&&{axisExtent:e.axisExtent},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},...G},Ee={chartType:Ne,data:le,xAccessor:p,yAccessor:y,groupAccessor:g||void 0,curve:v,lineStyle:pe,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},size:[i,ve+ke.top+ke.bottom],margin:ke,showAxes:D.showAxes??!1,background:D.background,enableHover:!1,accessibleTable:!1,description:`${s||l||"Chart"} overview minimap`,animate:!1,...z&&{yExtent:z}},ze=!!D.handles||!!D.showExtentLabels||!!D.renderHandle,Ge= $t("div",{style:{position:"relative",width:i,overflow:ze?"visible":"hidden"},children:[
39
+ $t("span",{children:[u,": ",n(r)]})]}),null!=a&&null!=r&&Number.isFinite(a)&&Number.isFinite(r)&& $t("div",{style:{marginTop:4,opacity:.7},children:["Δ = ",n(a-r)]})]})},[le,ee,te,oe,l,p,y,m,u]),{tooltipContent:_e,tooltipMode:He}=Nt(()=>We({tooltip:k,defaultTooltipContent:Re,multiDefaultContent:Re}),[k,Re]),Be=Nt(()=>be(w,{stops:[{offset:0,opacity:.85},{offset:1,opacity:.15}]}),[w]);if(fe.earlyReturn)return fe.earlyReturn;let De={chartType:"mixed",data:de,xAccessor:"__x",yAccessor:"__y",y0Accessor:"__y0",groupAccessor:"__diffSegment",areaGroups:ue,curve:v,areaStyle:we,lineStyle:ke,...b&&{pointStyle:Le},size:[G,$],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:fe.margin,showAxes:i.showAxes,xLabel:J,yLabel:Z,xFormat:l,yFormat:s,enableHover:j,showGrid:V,...Be&&{gradientFill:Be},...fe.legendBehaviorProps,...Ce({title:Y,description:Q,summary:U,accessibleTable:q,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),tooltipContent:_e,..."multi"===He&&{tooltipMode:"multi"},...Se({linkedHover:I,selection:H,onObservation:F,onClick:P,hoverHighlight:B,hoverRadius:e.hoverRadius,mobileInteraction:fe.mobileInteraction,customHoverBehavior:fe.customHoverBehavior,customClickBehavior:fe.customClickBehavior}),...C&&C.length>0&&{annotations:C},...L&&{xExtent:L},...R&&{yExtent:R},...fe.crosshairProps,..._};
40
+ return zt(Te,{componentName:"DifferenceChart",width:G,height:$,children: zt(se,{ref:o,...De})})}),"DifferenceChart"),f=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){me(ee);let o=Dt(null),i=Ie(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",yAccessor:h="y",areaBy:d,lineDataAccessor:m="coordinates",colorBy:u,colorScheme:p,styleRules:y,curve:g="monotoneX",areaOpacity:f=.7,showLine:b=!0,lineWidth:x=2,showPoints:v=!1,pointRadius:A=3,normalize:w=!1,baseline:S="zero",stackOrder:k,tooltip:C,annotations:L,xExtent:R,yExtent:_,frameProps:H={},selection:I,linkedHover:F,onObservation:P,onClick:B,hoverHighlight:D,chartId:M,loading:T,loadingContent:N,emptyContent:W,legendInteraction:O,legendPosition:E,color:z,stroke:G,strokeWidth:$,opacity:j}=e,{width:V,height:X,enableHover:Y,showGrid:q,showLegend:J,title:Z,description:te,summary:oe,accessibleTable:ie,xLabel:ae,yLabel:re}=i,ne=Nt(()=>Fe(a),[a]),le=u||d;U(t,{variant:"xy",frameRef:o});let ce=K({responsive:e,data:ne,rawData:a,colorBy:le,colorScheme:p,legendInteraction:O,legendPosition:E,frameLegend:H,selection:I,linkedHover:F,fallbackFields:le?["string"==typeof le?le:""]:[],unwrapData:!1,onObservation:P,onClick:B,hoverHighlight:D,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"StackedAreaChart",chartId:M,showLegend:J,userMargin:r,marginDefaults:i.marginDefaults,loading:T,loadingContent:N,emptyContent:W,width:V,height:X,hasTitle:!!Z,axisChrome:Pe(H,{showAxes:i.showAxes,xLabel:ae,yLabel:re})}),he=Nt(()=>De(c,h),[c,h]),{flattenedData:de,lineStyle:ue,pointStyle:pe,defaultTooltipContent:ye}=vo({safeData:ne,data:a,areaBy:d,lineDataAccessor:m,colorBy:le,colorScale:ce.colorScale,color:z,stroke:G,strokeWidth:$,opacity:j,effectiveSelectionHook:ce.effectiveSelectionHook,resolvedSelection:ce.resolvedSelection,areaOpacity:f,showLine:b,lineWidth:x,showPoints:v,pointRadius:A,xAccessor:c,yAccessor:h,xLabel:ae,yLabel:re,xFormat:l,yFormat:s,groupField:d||u,styleRules:y,ruleContext:he}),ge=Q({componentName:"StackedAreaChart",data:a,accessors:{xAccessor:c,yAccessor:h}}),fe={chartType:"stackedarea",...null!=a&&{data:de},xAccessor:c,yAccessor:h,groupAccessor:d||void 0,curve:g,normalize:w,baseline:w?"zero":S,stackOrder:k,lineStyle:ue,...v&&pe&&{pointStyle:pe},size:[V,X],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:ce.margin,showAxes:i.showAxes,xLabel:ae,yLabel:re,xFormat:l,yFormat:s,enableHover:Y,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},showGrid:q,...ce.legendBehaviorProps,...Ce({title:Z,description:te,summary:oe,accessibleTable:ie,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...We({tooltip:C,defaultTooltipContent:ye,multiDefaultContent:Ve({xFormat:l,yFormat:s})}),...Se({linkedHover:F,selection:I,onObservation:P,onClick:B,hoverHighlight:D,hoverRadius:e.hoverRadius,mobileInteraction:ce.mobileInteraction,customHoverBehavior:ce.customHoverBehavior,customClickBehavior:ce.customClickBehavior}),...L&&L.length>0&&{annotations:L},...R&&{xExtent:R},..._&&{yExtent:_},...ce.crosshairProps,...H};return ce.earlyReturn?ce.earlyReturn:ge? zt(Me,{componentName:"StackedAreaChart",message:ge,width:V,height:X}): zt(Te,{componentName:"StackedAreaChart",width:V,height:X,children: zt(se,{ref:o,...fe})})}),"StackedAreaChart"),b=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){me(te);let o=Dt(null);U(t,{variant:"xy",frameRef:o});let i=Ie(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:void 0,enableHover:e.enableHover,showLegend:void 0,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:n,xAccessor:l="x",yAccessor:s="y",valueAccessor:c="value",xFormat:h,yFormat:d,colorScheme:m,customColorScale:u,showValues:p=!1,valueFormat:y,cellBorderColor:g="#fff",cellBorderWidth:f=1,tooltip:b,annotations:x,heatmapAggregation:v,heatmapXBins:A,heatmapYBins:w,styleRules:S,xExtent:k,yExtent:C,frameProps:L={},selection:R,linkedHover:_,onObservation:H,onClick:I,hoverHighlight:F,chartId:P,loading:B,loadingContent:D,emptyContent:M,showLegend:T,legendPosition:N,legend:W,legendInteraction:O,stroke:E,strokeWidth:z,opacity:G}=e,{width:$,height:j,enableHover:V,title:X,description:Y,summary:K,accessibleTable:Z,xLabel:ee,yLabel:oe}=i,ie=Ye(B,$,j,D,e),ae=ie?null:Qe(a,$,j,M,e),re=Nt(()=>Fe(a),[a]),ne=Ue(),le=m??ne??"blues",ce=("string"==typeof L.colorScheme?L.colorScheme:void 0)??le,he="function"==typeof L.heatmapColorScale?L.heatmapColorScale:"custom"===ce&&"function"==typeof u?u:void 0,de=T??!1,ue=N??"right",{activeSelectionHook:pe,customHoverBehavior:ye,customClickBehavior:ge,crosshairSourceId:fe}=Ke({selection:R,linkedHover:_,fallbackFields:[],onObservation:H,onClick:I,chartType:"Heatmap",chartId:P,hoverHighlight:F,colorByField:void 0,mobileInteraction:i.mobileInteraction}),be=q(R),xe=qe(_,fe);Je(O,void 0,[]);let ve=Nt(()=>"function"==typeof c?e=>c(e):e=>e[c],[c]),Le=Nt(()=>{let e=re.map(ve);return Ft(e)},[re,ve]),Re=Nt(()=>{if(he)return he;let e=At(ce);return jt(e).domain(Le)},[ce,he,Le]),_e=Nt(()=>{let e=Number.isFinite(f)?Math.max(0,f):1;return()=>({stroke:g,strokeWidth:e})},[g,f]),He=Nt(()=>J(l,s,c),[l,s,c]),Be=Nt(()=>Xe(_e,S,He),[_e,S,He]),De=Nt(()=>ut(Be,pe,be),[pe,Be,be]),Ne=Nt(()=>Ae([{label:ee||we(l),accessor:l,role:"x",format:h},{label:oe||we(s),accessor:s,role:"y",format:d},{label:we(c),accessor:c,role:"value",format:y}]),[l,s,ee,oe,c,h,d,y]),We=Q({componentName:"Heatmap",data:a,accessors:{xAccessor:l,yAccessor:s,valueAccessor:c}}),Oe=Nt(()=>de?{gradient:{colorFn:e=>Re(e),domain:Le,label:"string"==typeof c?c:"value",format:y},legendDistance:W?.legendDistance}:void 0,[de,Re,Le,c,y,W?.legendDistance]),{margin:Ee,legend:ze,legendPosition:Ge,legendMarginReserved:$e}=Ze({data:[],colorBy:void 0,colorScale:void 0,showLegend:!1,legendPosition:ue,userMargin:r,defaults:i.marginDefaults,additionalLegend:Oe,chartWidth:$,chartHeight:j,legendLayout:L.legendLayout,frameLegend:L,hasTitle:!!X,axisChrome:Pe(L,{showAxes:i.showAxes,xLabel:ee,yLabel:oe})}),je={chartType:"heatmap",...null!=a&&{data:re},xAccessor:l,yAccessor:s,valueAccessor:c,colorScheme:"custom"!==ce?ce:void 0,...he&&{heatmapColorScale:he},areaStyle:De,showValues:p,heatmapValueFormat:y,size:[$,j],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:Ee,showAxes:i.showAxes,xLabel:ee,yLabel:oe,xFormat:h,yFormat:d,enableHover:V,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},...ze&&{legend:ze,legendPosition:Ge},...$e&&{__legendMarginReservedFor:ze},...Ce({title:X,description:Y,summary:K,accessibleTable:Z,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...ke({tooltip:b,defaultTooltipContent:Ne}),...Se({linkedHover:_,selection:R,onObservation:H,onClick:I,hoverHighlight:F,hoverRadius:e.hoverRadius,mobileInteraction:i.mobileInteraction,customHoverBehavior:ye,customClickBehavior:ge}),...x&&x.length>0&&{annotations:x},...v&&{heatmapAggregation:v},...null!=A&&{heatmapXBins:A},...null!=w&&{heatmapYBins:w},...k&&{xExtent:k},...C&&{yExtent:C},...xe,...L};return ie||ae||(We? zt(Me,{componentName:"Heatmap",message:We,width:$,height:j}): zt(Te,{componentName:"Heatmap",width:$,height:j,children: zt(se,{ref:o,...je})}))}),"Heatmap"),x=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){ne(E),me(oe);let o=Dt(null),i=Ie(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",yAccessor:h="y",sizeBy:d,sizeRange:m=[5,40],colorBy:u,colorScheme:p,styleRules:y,bubbleOpacity:g=.6,bubbleStrokeWidth:f=1,bubbleStrokeColor:b="white",tooltip:x,marginalGraphics:v,pointIdAccessor:A,annotations:w,regression:S,xExtent:k,yExtent:C,pulse:L,decay:R,staleness:_,frameProps:H={},selection:I,linkedHover:F,linkedBrush:P,brush:B,onBrush:D,onObservation:M,onClick:T,hoverHighlight:N,chartId:W,loading:O,loadingContent:G,emptyContent:$,legendInteraction:j,legendPosition:X,color:Y,stroke:q,strokeWidth:J,opacity:Z}=e,{width:ee,height:te,enableHover:ie,showGrid:ae,showLegend:re,title:ce,description:he,summary:de,accessibleTable:ue,xLabel:pe,yLabel:ye}=i,ge=Nt(()=>Fe(a),[a]),fe=void 0===a,be=K({responsive:e,data:ge,rawData:a,colorBy:u,colorScheme:p,legendInteraction:j,legendPosition:X,frameLegend:H,selection:I,linkedHover:F,fallbackFields:u?["string"==typeof u?u:""]:[],unwrapData:!1,onObservation:M,onClick:T,hoverHighlight:N,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"BubbleChart",chartId:W,showLegend:re,userMargin:r,marginDefaults:i.marginDefaults,loading:O,loadingContent:G,emptyContent:$,width:ee,height:te,hasTitle:!!ce,axisChrome:Pe(H,{showAxes:i.showAxes,xLabel:pe,yLabel:ye})}),{domain:xe,trackPushed:ve,reset:Le}=Vt({accessor:d,data:ge,isPushMode:fe}),Re=Tt(e=>{ve([e]),o.current?.push(e)},[ve]),_e=Tt(e=>{ve(e),o.current?.pushMany(e)},[ve]);U(t,{variant:"xy",frameRef:o,overrides:{push:Re,pushMany:_e,clear:()=>{Le(),o.current?.clear()}}});let{brushStreamProps:He}=le({brush:B,onBrush:D,linkedBrush:P,xAccessor:c,yAccessor:h,defaultDimension:"xy"}),Be=Nt(()=>({stroke:b,strokeWidth:f}),[b,f]),Ne=Nt(()=>xe??[0,1],[xe]),We=Tt(e=>pt(e,d,m,Ne),[d,m,Ne]),Oe=Nt(()=>De(c,h),[c,h]),Ee=z({colorBy:u,colorScale:be.colorScale,color:Y,fillOpacity:g,radiusFn:We,baseStyleExtras:Be,stroke:q,strokeWidth:J,opacity:Z,styleRules:y,ruleContext:Oe,effectiveSelectionHook:be.effectiveSelectionHook,resolvedSelection:be.resolvedSelection}),ze=Nt(()=>Ae([{label:pe||we(c),accessor:c,role:"x",format:l},{label:ye||we(h),accessor:h,role:"y",format:s},{label:we(d),accessor:d,role:"size"},...u?[{label:we(u),accessor:u,role:"color"}]:[]]),[c,h,pe,ye,d,u,l,s]);if(be.earlyReturn)return be.earlyReturn;let Ge=Q({componentName:"BubbleChart",data:a,accessors:{xAccessor:c,yAccessor:h},requiredProps:{sizeBy:d}});if(Ge) return zt(Me,{componentName:"BubbleChart",message:Ge,width:ee,height:te});let $e=V(S),je=$e?[$e,...w||[]]:w,Ve={chartType:"bubble",...null!=a&&{data:ge},xAccessor:c,yAccessor:h,colorAccessor:u||void 0,sizeAccessor:d,sizeRange:m,pointStyle:Ee,colorScheme:p,size:[ee,te],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:be.margin,showAxes:i.showAxes,xLabel:pe,yLabel:ye,xFormat:l,yFormat:s,enableHover:ie,showGrid:ae,...be.legendBehaviorProps,...Ce({title:ce,description:he,summary:de,accessibleTable:ue,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...ke({tooltip:x,defaultTooltipContent:ze}),...Se({linkedHover:F,selection:I,onObservation:M,onClick:T,hoverHighlight:N,hoverRadius:e.hoverRadius,mobileInteraction:be.mobileInteraction,customHoverBehavior:be.customHoverBehavior,customClickBehavior:be.customClickBehavior}),...v&&{marginalGraphics:v},...A&&{pointIdAccessor:A},...L&&{pulse:L},...R&&{decay:R},..._&&{staleness:_},...je&&je.length>0&&{annotations:je},...k&&{xExtent:k},...C&&{yExtent:C},...be.crosshairProps,...He,...H};
41
+ return zt(Te,{componentName:"BubbleChart",width:ee,height:te,children: zt(se,{ref:o,...Ve})})}),"BubbleChart"),v={width:800,height:400},A={cellSize:150,cellGap:4,labelWidth:40},w=null,S=null,k="__splomIdx",C="splom-hover-source",L={top:4,bottom:4,left:4,right:4},R=/*#__PURE__*/He(function(e){let{brushMode:t="crossfilter",hoverMode:o=!0}=e,i={};return!o&&t&&(i.splom={resolution:t}),o&&(i["splom-hover"]={resolution:"union"}), zt(ct,{selections:i,children: zt(Bo,{...e})})},"ScatterplotMatrix"),_=null,H=null,I=60,F=/*#__PURE__*/He(function(e){$();let t=ht(void 0,{}),{data:o,width:i=t.width,height:a=t.height,margin:r,className:n,title:l,description:s,summary:c,xLabel:h,yLabel:d,xFormat:m,yFormat:u,xAccessor:p="x",yAccessor:y="y",lineBy:g,lineDataAccessor:f="coordinates",colorBy:b,colorScheme:x,curve:v="linear",lineWidth:A=2,styleRules:w,fillArea:S=!1,areaOpacity:k=.3,showPoints:C=!1,pointRadius:L=3,enableHover:R=!0,showAxes:_=!0,showGrid:H=!1,showLegend:F,legendPosition:P,tooltip:B,minimap:D={},renderBefore:M=!1,onBrush:T,onBrushEnd:N,onObservation:W,chartId:O,brushExtent:E,yExtent:z,frameProps:G={},loading:V,loadingContent:X,emptyContent:Y}=e,U=a+Mo(D),K=Ye(V,i,U,X,e),q=K?null:Qe(o,i,U,Y,e),J=Nt(()=>Fe(o),[o]),[Z,ee]=Mt(null),te=E??Z,oe=Dt(null),[ie,ae]=Mt(null),re=void 0!==J[0]?.[f],ne=Nt(()=>{if(re)return J;if(g){let e=J.reduce((e,t)=>{let o="function"==typeof g?g(t):t[g];if(!e[o]){let t={[f]:[]};"string"==typeof g&&(t[g]=o),e[o]=t}return e[o][f].push(t),e},{});return Object.values(e)}return[{[f]:J}]},[J,g,f,re]),le=Nt(()=>re||g?ne.flatMap(e=>{let t=e[f]||[];return g&&"string"==typeof g?t.map(t=>({...t,[g]:e[g]})):t}):J,[ne,f,re,g,J]),ce=it(J,b,x),he=Nt(()=>De(p,y),[p,y]),de=j({lineWidth:A,colorBy:b,colorScale:ce,fillArea:S,areaOpacity:k,styleRules:w,ruleContext:he}),me=Nt(()=>{if(D.lineStyle)return D.lineStyle},[D.lineStyle]),ue=j({lineWidth:1,colorBy:b,colorScale:ce,styleRules:w,ruleContext:he}),pe=me??ue,ye=Nt(()=>C?Xe(e=>{let t={r:L,fillOpacity:1};return t.fill=b?xt(e.parentLine||e,b,ce):vt,t},w,he,e=>e.parentLine||e):void 0,[C,L,b,ce,w,he]),{legend:ge,margin:fe,legendPosition:be,legendMarginReserved:xe}=Ze({data:ne,colorBy:b,colorScale:ce,showLegend:F,legendPosition:P,userMargin:r,chartWidth:i,chartHeight:a,frameLegend:G,hasTitle:!!l,axisChrome:Pe(G,{showAxes:_,xLabel:h,yLabel:d})}),ve=D.height||I,Se=To(D),ke=Nt(()=>({top:D.margin?.top??Se.top,bottom:D.margin?.bottom??Se.bottom,left:D.margin?.left??fe.left,right:D.margin?.right??fe.right}),[D.margin,Se.top,Se.bottom,fe]),Ce=D.brushDirection||"x",Le=Math.max(0,i-ke.left-ke.right),Re=z?.[0],_e=z?.[1];Et(()=>{let e=0,t=!1,o=0,i=()=>{if(t)return;let a=oe.current?.getScales?.(),r=(e,t)=>Math.abs(Math.max(...e)-Math.min(...e)-t)<.5;a&&(o>=60||r(a.x.range(),Le)&&r(a.y.range(),ve))?ae(a):(o++,e=requestAnimationFrame(i))};return e=requestAnimationFrame(i),()=>{t=!0,e&&cancelAnimationFrame(e)}},[o,Le,ve,ke.top,ke.bottom,Re,_e]);let He=Tt(e=>{if(E||ee(e),T?.(e),!W)return;if(!e)return void W({type:"brush-end",timestamp:Date.now(),chartType:"MinimapChart",chartId:O});let t=ie?.["x"===Ce?"y":"x"].domain().map(Number)??[e[0],e[1]];W({type:"brush",extent:"x"===Ce?{x:e,y:t}:{x:t,y:e},timestamp:Date.now(),chartType:"MinimapChart",chartId:O})},[E,T,W,O,ie,Ce]),Ie=Nt(()=>Ae([{label:h||we(p),accessor:p,role:"x",format:m},{label:d||we(y),accessor:y,role:"y",format:u}]),[p,y,h,d,m,u]),Be=Q({componentName:"MinimapChart",data:o,accessors:{xAccessor:p,yAccessor:y}}),Ne=S?"area":"line",Oe={chartType:Ne,data:le,xAccessor:p,yAccessor:y,groupAccessor:g||void 0,curve:v,lineStyle:de,...C&&{pointStyle:ye},size:[i,a],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},margin:fe,showAxes:_,xLabel:h,yLabel:d,xFormat:m,yFormat:u,enableHover:R,showGrid:H,...ge&&{legend:ge,legendPosition:be},...xe&&{__legendMarginReservedFor:ge},...l&&{title:l},...s&&{description:s},...c&&{summary:c},...void 0!==e.accessibleTable&&{accessibleTable:e.accessibleTable},...void 0!==e.animate&&{animate:e.animate},...void 0!==e.hoverRadius&&{hoverRadius:e.hoverRadius},...We({tooltip:B,defaultTooltipContent:Ie}),...te&&"x"===Ce&&{xExtent:te},...z&&{yExtent:z},...te&&"y"===Ce&&{yExtent:te},...void 0!==e.axisExtent&&{axisExtent:e.axisExtent},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},...G},Ee={chartType:Ne,data:le,xAccessor:p,yAccessor:y,groupAccessor:g||void 0,curve:v,lineStyle:pe,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},size:[i,ve+ke.top+ke.bottom],margin:ke,showAxes:D.showAxes??!1,background:D.background,enableHover:!1,accessibleTable:!1,description:`${s||l||"Chart"} overview minimap`,animate:!1,...z&&{yExtent:z}},ze=!!D.handles||!!D.showExtentLabels||!!D.renderHandle,Ge= $t("div",{style:{position:"relative",width:i,overflow:ze?"visible":"hidden"},children:[
42
42
  zt(se,{ref:oe,...Ee}),
43
- zt(Do,{config:D,scales:ie,margin:ke,plotWidth:Le,plotHeight:ve,brushDirection:Ce,extent:te,axisFormat:"x"===Ce?m:u,onBrush:He,onBrushEnd:N,onObservation:W,chartId:O})]},"minimap"),$e= zt("div",{style:{overflow:"hidden"},children: zt(se,{...Oe})},"main");return U||q||(Be? zt(Me,{componentName:"MinimapChart",message:Be,width:i,height:Q}): zt(Te,{componentName:"MinimapChart",width:i,height:a,children: $t("div",{className:"minimap-chart"+(n?` ${n}`:""),role:"group","aria-label":s||l||"Chart with overview minimap",children:[M?Ge:$e,M?$e:Ge]})}))},"MinimapChart"),P={topLeft:{label:"Low / High",color:"#E9C46A",opacity:.08},topRight:{label:"High / High",color:"#2A9D8F",opacity:.08},bottomLeft:{label:"Low / Low",color:"#E76F51",opacity:.08},bottomRight:{label:"High / Low",color:"#86BBD8",opacity:.08}},B=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){me(J);let o=Dt(null);Q(t,{variant:"xy",frameRef:o});let i=Ie(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",yAccessor:h="y",xCenter:d,yCenter:m,quadrants:u,centerlineStyle:p={},showQuadrantLabels:y=!0,quadrantLabelSize:g=12,colorBy:f,colorScheme:b,styleRules:x,sizeBy:v,sizeRange:w=[3,15],pointRadius:A=5,pointOpacity:S=.8,tooltip:k,pointIdAccessor:C,annotations:L,frameProps:R={},selection:_,linkedHover:H,onObservation:I,onClick:F,hoverHighlight:B,chartId:D,loading:M,loadingContent:T,emptyContent:N,legendInteraction:W,legendPosition:O,color:E,stroke:G,strokeWidth:$,opacity:j}=e,{width:V,height:X,enableHover:Y,showGrid:q,showLegend:Z,title:ee,description:te,summary:oe,accessibleTable:ie,xLabel:ae,yLabel:re}=i,ne=Nt(()=>({topLeft:No(P.topLeft,u?.topLeft),topRight:No(P.topRight,u?.topRight),bottomLeft:No(P.bottomLeft,u?.bottomLeft),bottomRight:No(P.bottomRight,u?.bottomRight)}),[u]),le=Nt(()=>Fe(a),[a]),ce=U({responsive:e,data:le,rawData:a,colorBy:f,colorScheme:b,legendInteraction:W,legendPosition:O,frameLegend:R,selection:_,linkedHover:H,fallbackFields:"string"==typeof f?[f]:[],unwrapData:!1,onObservation:I,onClick:F,hoverHighlight:B,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"QuadrantChart",chartId:D,showLegend:Z,userMargin:r,marginDefaults:i.marginDefaults,loading:M,loadingContent:T,emptyContent:N,width:V,height:X,hasTitle:!!ee,axisChrome:Pe(R,{showAxes:i.showAxes,xLabel:ae,yLabel:re})});Be("QuadrantChart",le,"xAccessor",c),Be("QuadrantChart",le,"yAccessor",h);let he=Nt(()=>{if(!le.length)return;let e="function"==typeof c?c:e=>+e[c],t="function"==typeof h?h:e=>+e[h],o=1/0,i=-1/0,a=1/0,r=-1/0;for(let n of le){let l=e(n),s=t(n);isFinite(l)&&(l<o&&(o=l),l>i&&(i=l)),isFinite(s)&&(s<a&&(a=s),s>r&&(r=s))}if(null!=d&&isFinite(d)&&(d<o&&(o=d),d>i&&(i=d)),null!=m&&isFinite(m)&&(m<a&&(a=m),m>r&&(r=m)),o===1/0)return;let n=.1*(i-o)||1,l=.1*(r-a)||1;return{xExtent:[o-n,i+n],yExtent:[a-l,r+l]}},[le,c,h,d,m]),de=Nt(()=>{if(!v||0===le.length)return;let e=le.map(e=>"function"==typeof v?v(e):e[v]).filter(e=>"number"==typeof e&&Number.isFinite(e));return 0!==e.length?Ft(e):void 0},[le,v]),ue=Nt(()=>"function"==typeof c?c:e=>+e[c],[c]),pe=Nt(()=>"function"==typeof h?h:e=>+e[h],[h]),ye=Nt(()=>e=>{let t=ue(e),o=pe(e),i=null!=d?t>=d:void 0,a=null!=m?o>=m:void 0;return void 0===a||void 0===i?E||vt:a&&i?ne.topRight.color:a&&!i?ne.topLeft.color:!a&&i?ne.bottomRight.color:ne.bottomLeft.color},[ue,pe,d,m,ne,E]),ge=Nt(()=>v?e=>pt(e,v,w,de):void 0,[v,w,de]),fe=Nt(()=>De(c,h),[c,h]),be=z({colorBy:f,colorScale:ce.colorScale,color:E,pointRadius:A,fillOpacity:S,radiusFn:ge,fallbackFill:ye,stroke:G,strokeWidth:$,opacity:j,styleRules:x,ruleContext:fe,effectiveSelectionHook:ce.effectiveSelectionHook,resolvedSelection:ce.resolvedSelection}),xe=Nt(()=>{if(!le.length)return;let e= new Set;"string"==typeof c&&e.add(c),"string"==typeof h&&e.add(h),"string"==typeof f&&e.add(f),"string"==typeof v&&e.add(v);let t=le[0];for(let o of Object.keys(t))if(!o.startsWith("_")&&!e.has(o)&&"string"==typeof t[o])return o},[le,c,h,f,v]),ve=Nt(()=>we([...xe?[{label:xe,accessor:xe,role:"title"}]:[],{label:ae||Ae(c),accessor:c,role:"x",format:l},{label:re||Ae(h),accessor:h,role:"y",format:s},...f?[{label:Ae(f),accessor:f,role:"color"}]:[],...v?[{label:Ae(v),accessor:v,role:"size"}]:[]]),[xe,c,h,ae,re,f,v,l,s]),ke=K({componentName:"QuadrantChart",data:a,accessors:{xAccessor:c,yAccessor:h}}),Ce=Nt(()=>{let e={stroke:p.stroke||"#999",strokeWidth:p.strokeWidth??1,dashArray:p.strokeDasharray||[]};return[(t,o,i,a)=>{if(!i?.x||!i?.y)return;let r=a.width,n=a.height,l=null!=d?i.x(d):r/2,s=null!=m?i.y(m):n/2;if(null!=d&&!isFinite(l)||null!=m&&!isFinite(s))return;let c=Math.max(0,Math.min(r,l)),h=Math.max(0,Math.min(n,s)),u=[{config:ne.topLeft,x:0,y:0,w:c,h:h},{config:ne.topRight,x:c,y:0,w:r-c,h:h},{config:ne.bottomLeft,x:0,y:h,w:c,h:n-h},{config:ne.bottomRight,x:c,y:h,w:r-c,h:n-h}];for(let e of u)e.w<=0||e.h<=0||(t.fillStyle=e.config.color,t.globalAlpha=e.config.opacity??.08,t.fillRect(e.x,e.y,e.w,e.h));t.globalAlpha=1,t.strokeStyle=e.stroke,t.lineWidth=e.strokeWidth,e.dashArray.length>0&&t.setLineDash(e.dashArray),t.beginPath(),t.moveTo(c,0),t.lineTo(c,n),t.stroke(),t.beginPath(),t.moveTo(0,h),t.lineTo(r,h),t.stroke(),t.setLineDash([])}]},[d,m,ne,p]),Le=Nt(()=>y?[...Ce,(e,t,o,i)=>{if(!o?.x||!o?.y)return;let a=i.width,r=i.height,n=null!=d?o.x(d):a/2,l=null!=m?o.y(m):r/2;if(null!=d&&!isFinite(n)||null!=m&&!isFinite(l))return;Math.max(0,Math.min(a,n)),Math.max(0,Math.min(r,l));let s=St(e,"var(--semiotic-font-family, sans-serif)")||"sans-serif";e.font=`600 ${g}px ${s}`,e.globalAlpha=.5,e.fillStyle=ne.topLeft.color,e.textAlign="left",e.textBaseline="top",e.fillText(ne.topLeft.label,8,8),e.fillStyle=ne.topRight.color,e.textAlign="right",e.textBaseline="top",e.fillText(ne.topRight.label,a-8,8),e.fillStyle=ne.bottomLeft.color,e.textAlign="left",e.textBaseline="bottom",e.fillText(ne.bottomLeft.label,8,r-8),e.fillStyle=ne.bottomRight.color,e.textAlign="right",e.textBaseline="bottom",e.fillText(ne.bottomRight.label,a-8,r-8),e.globalAlpha=1}]:Ce,[Ce,y,g,ne,d,m]),Re=Nt(()=>{let e=R.canvasPreRenderers||[];return[...Le,...e]},[Le,R.canvasPreRenderers]),_e=Nt(()=>{let e={stroke:p.stroke||"#999",strokeWidth:p.strokeWidth??1,dashArray:p.strokeDasharray?Array.isArray(p.strokeDasharray)?p.strokeDasharray.join(","):p.strokeDasharray:void 0};return[(t,o,i)=>{if(!o?.x||!o?.y)return null;let a=i.width,r=i.height,n=null!=d?o.x(d):a/2,l=null!=m?o.y(m):r/2;if(null!=d&&!isFinite(n)||null!=m&&!isFinite(l))return null;let s=Math.max(0,Math.min(a,n)),c=Math.max(0,Math.min(r,l)),h=[{config:ne.topLeft,x:0,y:0,w:s,h:c},{config:ne.topRight,x:s,y:0,w:a-s,h:c},{config:ne.bottomLeft,x:0,y:c,w:s,h:r-c},{config:ne.bottomRight,x:s,y:c,w:a-s,h:r-c}];
43
+ zt(Do,{config:D,scales:ie,margin:ke,plotWidth:Le,plotHeight:ve,brushDirection:Ce,extent:te,axisFormat:"x"===Ce?m:u,onBrush:He,onBrushEnd:N,onObservation:W,chartId:O})]},"minimap"),$e= zt("div",{style:{overflow:"hidden"},children: zt(se,{...Oe})},"main");return K||q||(Be? zt(Me,{componentName:"MinimapChart",message:Be,width:i,height:U}): zt(Te,{componentName:"MinimapChart",width:i,height:a,children: $t("div",{className:"minimap-chart"+(n?` ${n}`:""),role:"group","aria-label":s||l||"Chart with overview minimap",children:[M?Ge:$e,M?$e:Ge]})}))},"MinimapChart"),P={topLeft:{label:"Low / High",color:"#E9C46A",opacity:.08},topRight:{label:"High / High",color:"#2A9D8F",opacity:.08},bottomLeft:{label:"Low / Low",color:"#E76F51",opacity:.08},bottomRight:{label:"High / Low",color:"#86BBD8",opacity:.08}},B=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){me(Z);let o=Dt(null);U(t,{variant:"xy",frameRef:o});let i=Ie(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",yAccessor:h="y",xCenter:d,yCenter:m,quadrants:u,centerlineStyle:p={},showQuadrantLabels:y=!0,quadrantLabelSize:g=12,colorBy:f,colorScheme:b,styleRules:x,sizeBy:v,sizeRange:A=[3,15],pointRadius:w=5,pointOpacity:S=.8,tooltip:k,pointIdAccessor:C,annotations:L,frameProps:R={},selection:_,linkedHover:H,onObservation:I,onClick:F,hoverHighlight:B,chartId:D,loading:M,loadingContent:T,emptyContent:N,legendInteraction:W,legendPosition:O,color:E,stroke:G,strokeWidth:$,opacity:j}=e,{width:V,height:X,enableHover:Y,showGrid:q,showLegend:J,title:ee,description:te,summary:oe,accessibleTable:ie,xLabel:ae,yLabel:re}=i,ne=Nt(()=>({topLeft:No(P.topLeft,u?.topLeft),topRight:No(P.topRight,u?.topRight),bottomLeft:No(P.bottomLeft,u?.bottomLeft),bottomRight:No(P.bottomRight,u?.bottomRight)}),[u]),le=Nt(()=>Fe(a),[a]),ce=K({responsive:e,data:le,rawData:a,colorBy:f,colorScheme:b,legendInteraction:W,legendPosition:O,frameLegend:R,selection:_,linkedHover:H,fallbackFields:"string"==typeof f?[f]:[],unwrapData:!1,onObservation:I,onClick:F,hoverHighlight:B,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"QuadrantChart",chartId:D,showLegend:J,userMargin:r,marginDefaults:i.marginDefaults,loading:M,loadingContent:T,emptyContent:N,width:V,height:X,hasTitle:!!ee,axisChrome:Pe(R,{showAxes:i.showAxes,xLabel:ae,yLabel:re})});Be("QuadrantChart",le,"xAccessor",c),Be("QuadrantChart",le,"yAccessor",h);let he=Nt(()=>{if(!le.length)return;let e="function"==typeof c?c:e=>+e[c],t="function"==typeof h?h:e=>+e[h],o=1/0,i=-1/0,a=1/0,r=-1/0;for(let n of le){let l=e(n),s=t(n);isFinite(l)&&(l<o&&(o=l),l>i&&(i=l)),isFinite(s)&&(s<a&&(a=s),s>r&&(r=s))}if(null!=d&&isFinite(d)&&(d<o&&(o=d),d>i&&(i=d)),null!=m&&isFinite(m)&&(m<a&&(a=m),m>r&&(r=m)),o===1/0)return;let n=.1*(i-o)||1,l=.1*(r-a)||1;return{xExtent:[o-n,i+n],yExtent:[a-l,r+l]}},[le,c,h,d,m]),de=Nt(()=>{if(!v||0===le.length)return;let e=le.map(e=>"function"==typeof v?v(e):e[v]).filter(e=>"number"==typeof e&&Number.isFinite(e));return 0!==e.length?Ft(e):void 0},[le,v]),ue=Nt(()=>"function"==typeof c?c:e=>+e[c],[c]),pe=Nt(()=>"function"==typeof h?h:e=>+e[h],[h]),ye=Nt(()=>e=>{let t=ue(e),o=pe(e),i=null!=d?t>=d:void 0,a=null!=m?o>=m:void 0;return void 0===a||void 0===i?E||vt:a&&i?ne.topRight.color:a&&!i?ne.topLeft.color:!a&&i?ne.bottomRight.color:ne.bottomLeft.color},[ue,pe,d,m,ne,E]),ge=Nt(()=>v?e=>pt(e,v,A,de):void 0,[v,A,de]),fe=Nt(()=>De(c,h),[c,h]),be=z({colorBy:f,colorScale:ce.colorScale,color:E,pointRadius:w,fillOpacity:S,radiusFn:ge,fallbackFill:ye,stroke:G,strokeWidth:$,opacity:j,styleRules:x,ruleContext:fe,effectiveSelectionHook:ce.effectiveSelectionHook,resolvedSelection:ce.resolvedSelection}),xe=Nt(()=>{if(!le.length)return;let e= new Set;"string"==typeof c&&e.add(c),"string"==typeof h&&e.add(h),"string"==typeof f&&e.add(f),"string"==typeof v&&e.add(v);let t=le[0];for(let o of Object.keys(t))if(!o.startsWith("_")&&!e.has(o)&&"string"==typeof t[o])return o},[le,c,h,f,v]),ve=Nt(()=>Ae([...xe?[{label:xe,accessor:xe,role:"title"}]:[],{label:ae||we(c),accessor:c,role:"x",format:l},{label:re||we(h),accessor:h,role:"y",format:s},...f?[{label:we(f),accessor:f,role:"color"}]:[],...v?[{label:we(v),accessor:v,role:"size"}]:[]]),[xe,c,h,ae,re,f,v,l,s]),ke=Q({componentName:"QuadrantChart",data:a,accessors:{xAccessor:c,yAccessor:h}}),Ce=Nt(()=>{let e={stroke:p.stroke||"#999",strokeWidth:p.strokeWidth??1,dashArray:p.strokeDasharray||[]};return[(t,o,i,a)=>{if(!i?.x||!i?.y)return;let r=a.width,n=a.height,l=null!=d?i.x(d):r/2,s=null!=m?i.y(m):n/2;if(null!=d&&!isFinite(l)||null!=m&&!isFinite(s))return;let c=Math.max(0,Math.min(r,l)),h=Math.max(0,Math.min(n,s)),u=[{config:ne.topLeft,x:0,y:0,w:c,h:h},{config:ne.topRight,x:c,y:0,w:r-c,h:h},{config:ne.bottomLeft,x:0,y:h,w:c,h:n-h},{config:ne.bottomRight,x:c,y:h,w:r-c,h:n-h}];for(let e of u)e.w<=0||e.h<=0||(t.fillStyle=e.config.color,t.globalAlpha=e.config.opacity??.08,t.fillRect(e.x,e.y,e.w,e.h));t.globalAlpha=1,t.strokeStyle=e.stroke,t.lineWidth=e.strokeWidth,e.dashArray.length>0&&t.setLineDash(e.dashArray),t.beginPath(),t.moveTo(c,0),t.lineTo(c,n),t.stroke(),t.beginPath(),t.moveTo(0,h),t.lineTo(r,h),t.stroke(),t.setLineDash([])}]},[d,m,ne,p]),Le=Nt(()=>y?[...Ce,(e,t,o,i)=>{if(!o?.x||!o?.y)return;let a=i.width,r=i.height,n=null!=d?o.x(d):a/2,l=null!=m?o.y(m):r/2;if(null!=d&&!isFinite(n)||null!=m&&!isFinite(l))return;Math.max(0,Math.min(a,n)),Math.max(0,Math.min(r,l));let s=St(e,"var(--semiotic-font-family, sans-serif)")||"sans-serif";e.font=`600 ${g}px ${s}`,e.globalAlpha=.5,e.fillStyle=ne.topLeft.color,e.textAlign="left",e.textBaseline="top",e.fillText(ne.topLeft.label,8,8),e.fillStyle=ne.topRight.color,e.textAlign="right",e.textBaseline="top",e.fillText(ne.topRight.label,a-8,8),e.fillStyle=ne.bottomLeft.color,e.textAlign="left",e.textBaseline="bottom",e.fillText(ne.bottomLeft.label,8,r-8),e.fillStyle=ne.bottomRight.color,e.textAlign="right",e.textBaseline="bottom",e.fillText(ne.bottomRight.label,a-8,r-8),e.globalAlpha=1}]:Ce,[Ce,y,g,ne,d,m]),Re=Nt(()=>{let e=R.canvasPreRenderers||[];return[...Le,...e]},[Le,R.canvasPreRenderers]),_e=Nt(()=>{let e={stroke:p.stroke||"#999",strokeWidth:p.strokeWidth??1,dashArray:p.strokeDasharray?Array.isArray(p.strokeDasharray)?p.strokeDasharray.join(","):p.strokeDasharray:void 0};return[(t,o,i)=>{if(!o?.x||!o?.y)return null;let a=i.width,r=i.height,n=null!=d?o.x(d):a/2,l=null!=m?o.y(m):r/2;if(null!=d&&!isFinite(n)||null!=m&&!isFinite(l))return null;let s=Math.max(0,Math.min(a,n)),c=Math.max(0,Math.min(r,l)),h=[{config:ne.topLeft,x:0,y:0,w:s,h:c},{config:ne.topRight,x:s,y:0,w:a-s,h:c},{config:ne.bottomLeft,x:0,y:c,w:s,h:r-c},{config:ne.bottomRight,x:s,y:c,w:a-s,h:r-c}];
44
44
  return $t(Gt,{children:[h.map((e,t)=>e.w>0&&e.h>0? zt("rect",{x:e.x,y:e.y,width:e.w,height:e.h,fill:e.config.color,opacity:e.config.opacity??.08},`qf-${t}`):null),
45
45
  zt("line",{x1:s,y1:0,x2:s,y2:r,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeDasharray:e.dashArray}),
46
46
  zt("line",{x1:0,y1:c,x2:a,y2:c,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeDasharray:e.dashArray}),y&& $t(Gt,{children:[
47
47
  zt("text",{x:8,y:8+g,fill:ne.topLeft.color,fontWeight:600,fontSize:g,opacity:.5,children:ne.topLeft.label}),
48
48
  zt("text",{x:a-8,y:8+g,fill:ne.topRight.color,fontWeight:600,fontSize:g,opacity:.5,textAnchor:"end",children:ne.topRight.label}),
49
49
  zt("text",{x:8,y:r-8,fill:ne.bottomLeft.color,fontWeight:600,fontSize:g,opacity:.5,children:ne.bottomLeft.label}),
50
- zt("text",{x:a-8,y:r-8,fill:ne.bottomRight.color,fontWeight:600,fontSize:g,opacity:.5,textAnchor:"end",children:ne.bottomRight.label})]})]})}]},[d,m,ne,p,y,g]);if(ce.earlyReturn)return ce.earlyReturn;let He={chartType:"scatter",...null!=a&&{data:le},xAccessor:c,yAccessor:h,colorAccessor:f||void 0,sizeAccessor:v||void 0,sizeRange:w,pointStyle:be,colorScheme:b,size:[V,X],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},margin:ce.margin,showAxes:i.showAxes,xLabel:ae,yLabel:re,xFormat:l,yFormat:s,enableHover:Y,showGrid:q,...he&&{xExtent:he.xExtent,yExtent:he.yExtent},...ce.legendBehaviorProps,...ee&&{title:ee},...te&&{description:te},...oe&&{summary:oe},...void 0!==ie&&{accessibleTable:ie},...n&&{className:n},...null!=e.animate&&{animate:e.animate},...void 0!==e.axisExtent&&{axisExtent:e.axisExtent},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},tooltipContent:!1===k?()=>null:!0===k||void 0===k?ve:Ee(k)||ve,...Se({linkedHover:H,selection:_,onObservation:I,onClick:F,hoverHighlight:B,hoverRadius:e.hoverRadius,mobileInteraction:ce.mobileInteraction,customHoverBehavior:ce.customHoverBehavior,customClickBehavior:ce.customClickBehavior}),...C&&{pointIdAccessor:C},...L&&L.length>0&&{annotations:L},canvasPreRenderers:Re,...ce.crosshairProps,...R,...Re.length>0&&{canvasPreRenderers:Re},svgPreRenderers:_e};return ke? zt(Me,{componentName:"QuadrantChart",message:ke,width:V,height:X}): zt(Te,{componentName:"QuadrantChart",width:V,height:X,children: zt(se,{ref:o,...He})})}),"QuadrantChart"),D="__ma_unitized",M="__ma_series",T=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){me(ye);let o=Dt(null),i=Dt([]),a=Dt(e.series);a.current=e.series,Ot(t,()=>{let e=()=>(a.current??[]).filter(e=>null!=e&&"object"==typeof e);return{push:t=>{if(!o.current)return;let a=e(),r=t;for(let e=0;e<a.length&&e<2;e++){let t=a[e],n=t.extent||i.current[e];if(!n)continue;let l=("function"==typeof t.yAccessor?t.yAccessor:e=>e[t.yAccessor])(r);null==l||!isFinite(l)||o.current.push({...r,[D]:zo(l,n),[M]:t.label||`Series ${e+1}`})}},pushMany:t=>{if(!o.current)return;let a=e(),r=[];for(let e of t)for(let t=0;t<a.length&&t<2;t++){let o=a[t],n=o.extent||i.current[t];if(!n)continue;let l=("function"==typeof o.yAccessor?o.yAccessor:e=>e[o.yAccessor])(e);null==l||!isFinite(l)||r.push({...e,[D]:zo(l,n),[M]:o.label||`Series ${t+1}`})}o.current.pushMany(r)},remove:e=>o.current?.remove(e)??[],update:(e,t)=>o.current?.update(e,t)??[],clear:()=>o.current?.clear(),getData:()=>o.current?.getData()??[],getScales:()=>o.current?.getScales()??null}},[]);let r=Ie(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,xLabel:e.xLabel,accessibleTable:e.accessibleTable,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules},v),{data:n,margin:l,className:s,xFormat:c,xAccessor:h="x",series:d,colorScheme:m,curve:u="monotoneX",lineWidth:p=2,styleRules:y,tooltip:g,annotations:f,frameProps:b={},selection:x,linkedHover:w,onObservation:A,onClick:S,hoverHighlight:k,chartId:C,loading:L,loadingContent:R,emptyContent:_,legendInteraction:H,legendPosition:I,stroke:F,strokeWidth:P,opacity:B}=e,{width:T,height:N,enableHover:W,showGrid:O,showLegend:E=!0,title:z,description:G,summary:$,accessibleTable:V,xLabel:X}=r,Y=Nt(()=>Fe(n),[n]),Q=Nt(()=>Fe(d),[d]),q=Q,Z=2===Q.length,J=Nt(()=>Z?{...b.legendLayout,sideGutter:b.legendLayout?.sideGutter??70}:b.legendLayout,[b.legendLayout,Z]);"production"!==process.env.NODE_ENV&&!Z&&console.warn(`[MultiAxisLineChart] Expected exactly 2 series for dual-axis mode, got ${Q.length}. Rendering as a standard multi-line chart.`);let ee=Ye(L,T,N,R,e),te=ee?null:Ke(n,T,N,_,e),oe=je(),ie=Nt(()=>Wo(q,m,oe),[q,m,oe]),ae=Nt(()=>Q.map((e,t)=>e.label||`Series ${t+1}`),[Q]),{unitizedData:re,extents:ne}=Nt(()=>{if(0===Y.length){let e=Q.map(e=>e.extent||null).filter(Boolean);return e.length===Q.length&&(i.current=e),{unitizedData:[],extents:e.length===Q.length?e:[]}}let e=Q.map(e=>e.extent||Eo(Y,e.yAccessor));if(i.current=e,!Z){let t=[];for(let e of Y)for(let o=0;o<Q.length;o++){let i=Q[o],a=("function"==typeof i.yAccessor?i.yAccessor:e=>e[i.yAccessor])(e);null!=a&&t.push({...e,[D]:a,[M]:ae[o]})}return{unitizedData:t,extents:e}}let t=[];for(let o of Y)for(let i=0;i<2;i++){let a=Q[i],r=("function"==typeof a.yAccessor?a.yAccessor:e=>e[a.yAccessor])(o);null!=r&&t.push({...o,[D]:zo(r,e[i]),[M]:ae[i]})}return{unitizedData:t,extents:e}},[Y,Q,Z,ae]),le=Nt(()=>{if(!Z||ne.length<2)return;let e=e=>t=>{let o=Go(t,ne[e]),i=Q[e]?.format;return"function"==typeof i?i(o):Number.isInteger(o)?String(o):o.toFixed(1)},t=e(0),o=e(1);return[{orient:"left",label:ae[0],tickFormat:t},{orient:"right",label:ae[1],tickFormat:o},{orient:"bottom"}]},[Z,ne,Q,ae]),ce=Nt(()=>re.length>0?re:ae.map(e=>({[M]:e})),[re,ae]),he=U({responsive:e,data:ce,rawData:n,colorBy:M,colorScheme:ie,legendInteraction:H,legendPosition:I,frameLegend:{...b,legendLayout:J},selection:x,linkedHover:w,fallbackFields:[M],unwrapData:!1,onObservation:A,onClick:S,hoverHighlight:k,mobileInteraction:r.mobileInteraction,mobileSemantics:r.mobileSemantics,chartType:"MultiAxisLineChart",chartId:C,showLegend:E,legendLayout:J,userMargin:l,marginDefaults:Z?{...r.marginDefaults,left:70,right:70}:r.marginDefaults,loading:L,loadingContent:R,emptyContent:_,width:T,height:N,hasTitle:!!z,axisChrome:Pe(b,{showAxes:r.showAxes,xLabel:X,yLabel:ae[0],yLabelRight:ae[1],axes:le})}),de=Nt(()=>{let e= new Map;return ae.forEach((t,o)=>e.set(t,ie[o])),e},[ae,ie]),ue=Tt(e=>de.get(e[M])||ie[0],[de,ie]),pe=Nt(()=>Oo(h,Q),[h,Q]),ge=j({lineWidth:p,resolveStroke:ue,stroke:F,strokeWidth:P,opacity:B,effectiveSelectionHook:he.effectiveSelectionHook,resolvedSelection:he.resolvedSelection,styleRules:y,ruleContext:pe}),fe=Nt(()=>e=>{let t=e.data||e,o=t[M],i=ae.indexOf(o),a=t[D],r=Z&&i>=0&&ne[i]?Go(a,ne[i]):a,n=i>=0&&Q[i]?.format?Q[i].format:e=>Number.isInteger(e)?String(e):e.toFixed(2),l="function"==typeof h?h(t):t[h];return Bt.createElement("div",{style:{padding:"6px 10px",fontFamily:"var(--semiotic-font-family, sans-serif)",fontSize:"var(--semiotic-tooltip-font-size, 13px)"}},Bt.createElement("div",{style:{fontWeight:600,marginBottom:4,color:ie[i]||"inherit"}},o),Bt.createElement("div",null,`${"string"==typeof h?h:"x"}: `,c?c(l):String(l)),Bt.createElement("div",null,`${o}: ${n(r)}`))},[ae,ie,ne,Z,Q,h,c]),be=Tt(e=>{let t=(Array.isArray(e.allSeries)?e.allSeries:[]).map(e=>{let t=ae.indexOf(e.group),o=Z&&t>=0&&ne[t]?Go(e.value,ne[t]):e.value,i=e.datum;return i&&(i={...i},delete i[D],delete i[M]),{...e,value:o,datum:i}}),o=e.data&&"object"==typeof e.data&&!Array.isArray(e.data)?{...e.data}:e.data;o&&"object"==typeof o&&!Array.isArray(o)&&(delete o[D],delete o[M]);let i={...e,data:o,allSeries:t};return delete i[D],delete i[M],i},[ne,Z,ae]),xe=Nt(()=>Ve({xFormat:c,yFormat:(e,t)=>Q[ae.indexOf(t??"")]?.format?.(e)}),[c,Q,ae]),ve=Tt(e=>xe(be(e)),[xe,be]),we=Nt(()=>{if(!ze(g)||"function"!=typeof g.content)return g;let e=e=>g.content(be(e));return{mode:"multi",content:Ct(g.content)?Lt(e):e}},[be,g]),Ae=Nt(()=>We({tooltip:we,defaultTooltipContent:fe,multiDefaultContent:ve}),[fe,ve,we]);if(he.earlyReturn)return he.earlyReturn;let ke=K({componentName:"MultiAxisLineChart",data:n,accessors:{xAccessor:h}}),Ce=Z?[0,1]:void 0,Le={chartType:"line",...null!=n&&{data:re},xAccessor:h,yAccessor:D,groupAccessor:M,lineStyle:ge,colorScheme:ie,size:[T,N],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},margin:he.margin,showAxes:r.showAxes,...le&&{axes:le},xLabel:X,...Z?{}:{yLabel:ae[0]},xFormat:c,...Z&&Ce&&{yExtent:Ce},enableHover:W,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},showGrid:O,curve:u,...he.legendBehaviorProps,...z&&{title:z},...G&&{description:G},...$&&{summary:$},...void 0!==V&&{accessibleTable:V},...s&&{className:s},...null!=e.animate&&{animate:e.animate},...void 0!==e.axisExtent&&{axisExtent:e.axisExtent},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},...Ae,...f&&{annotations:f},...Se({linkedHover:w,selection:x,onObservation:A,onClick:S,hoverHighlight:k,hoverRadius:e.hoverRadius,mobileInteraction:he.mobileInteraction,customHoverBehavior:he.customHoverBehavior,customClickBehavior:he.customClickBehavior}),...he.crosshairProps,...b,...J&&{legendLayout:J}};return ee||te||(ke? zt(Me,{componentName:"MultiAxisLineChart",message:ke,width:T,height:N}): zt(Te,{componentName:"MultiAxisLineChart",width:T,height:N,children: zt(se,{ref:o,...Le})}))}),"MultiAxisLineChart"),N=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){me(ie);let o=Dt(null);Q(t,{variant:"xy",frameRef:o});let i=Ie(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:e.showGrid,enableHover:e.enableHover,title:e.title,xLabel:e.xLabel,yLabel:e.yLabel,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",highAccessor:h="high",lowAccessor:d="low",openAccessor:m,closeAccessor:u,candlestickStyle:p,styleRules:y,tooltip:g,annotations:f,xExtent:b,yExtent:x,frameProps:v={},selection:w,linkedHover:A,onObservation:S,onClick:k,chartId:C,loading:L,loadingContent:R,emptyContent:_}=e,{width:H,height:I,enableHover:F,showGrid:P,title:B,description:D,summary:M,accessibleTable:T,xLabel:N,yLabel:W}=i,O=Nt(()=>Fe(a),[a]),E=Nt(()=>{let e=i.marginDefaults;return"sparkline"===i.mode?{...e,top:0,bottom:0}:e},[i.marginDefaults,i.mode]),z=U({responsive:e,data:O,rawData:a,colorBy:void 0,colorScheme:void 0,legendInteraction:void 0,selection:w,linkedHover:A,fallbackFields:[],onObservation:S,onClick:k,chartType:"CandlestickChart",chartId:C,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,showLegend:!1,userMargin:r,marginDefaults:E,loading:L,loadingContent:R,emptyContent:_,width:H,height:I}),{activeSelectionHook:G,resolvedSelection:$,customHoverBehavior:j,customClickBehavior:V,margin:X}=z,Y=null==m||null==u;Be("CandlestickChart",O,"xAccessor",c),Be("CandlestickChart",O,"highAccessor",h),Be("CandlestickChart",O,"lowAccessor",d),Y||(Be("CandlestickChart",O,"openAccessor",m),Be("CandlestickChart",O,"closeAccessor",u));let q=Nt(()=>De(c,Y?h:u),[c,h,u,Y]),Z=Nt(()=>ut(Xe(void 0,y,q),G,$),[y,q,G,$]),J=Nt(()=>{let e=[{label:N||Ae(c),accessor:c,role:"x",format:l}];return Y?(e.push({label:"High",accessor:h,role:"y",format:s}),e.push({label:"Low",accessor:d,format:s})):(e.push({label:"Open",accessor:m,format:s}),e.push({label:"High",accessor:h,format:s}),e.push({label:"Low",accessor:d,format:s}),e.push({label:"Close",accessor:u,format:s})),we(e)},[c,N,l,s,h,d,m,u,Y]),ee=K({componentName:"CandlestickChart",data:a,accessors:{xAccessor:c,highAccessor:h,lowAccessor:d,...!Y&&{openAccessor:m,closeAccessor:u}}}),te=Math.max(2,Math.min(12,Math.round(H/40))),oe=H<=200?.02:.1,ae={chartType:"candlestick",...null!=a&&{data:O},xAccessor:c,yAccessor:h,highAccessor:h,lowAccessor:d,...!Y&&{openAccessor:m,closeAccessor:u},...p&&{candlestickStyle:p},...(G||y?.length)&&{pointStyle:Z},scalePadding:te,extentPadding:oe,size:[H,I],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:X,showAxes:i.showAxes,xLabel:N,yLabel:W,xFormat:l,yFormat:s,enableHover:F,showGrid:P,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},...Ce({title:B,description:D,summary:M,accessibleTable:T,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...ke({tooltip:g,defaultTooltipContent:J}),...Se({linkedHover:A,selection:w,onObservation:S,onClick:k,hoverRadius:e.hoverRadius,mobileInteraction:i.mobileInteraction,customHoverBehavior:j,customClickBehavior:V}),...f&&f.length>0&&{annotations:f},...b&&{xExtent:b},...x&&{yExtent:x},...z.crosshairProps,...v};return z.earlyReturn?z.earlyReturn:ee? zt(Me,{componentName:"CandlestickChart",message:ee,width:H,height:I}): zt(Te,{componentName:"CandlestickChart",width:H,height:I,children: zt(se,{ref:o,...ae})})}),"CandlestickChart"),W=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){me(ae);let o=Dt(null);Q(t,{variant:"xy",frameRef:o});let i=Ie(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",yAccessor:h="y",pointIdAccessor:d,xScaleType:m,positiveColor:u,negativeColor:p,connectorStroke:y,connectorWidth:g,gap:f,styleRules:b,tooltip:x,annotations:v,xExtent:w,yExtent:A,frameProps:S={},selection:k,linkedHover:C,onObservation:L,onClick:R,hoverHighlight:_,chartId:H,loading:I,loadingContent:F,emptyContent:P,legendInteraction:B,legendPosition:D}=e,{areaStyle:M,...T}=S,{width:N,height:W,enableHover:O,showGrid:E,showLegend:z,title:G,description:$,summary:j,accessibleTable:V,xLabel:X,yLabel:Y}=i,q=Nt(()=>Fe(a),[a]),Z=Dt({next:0,indexOf: new WeakMap,idOf: new Map,labels: new Map}),{plotData:J,plotXAccessor:ee,plotXFormat:te,usesIndex:oe}=Nt(()=>{let e="function"==typeof c?c:e=>e[c],t=d?"function"==typeof d?d:e=>e[d]:void 0,o=e=>"number"==typeof e&&Number.isFinite(e)||e instanceof Date,i=(e,t)=>{let o=e??t;return l?l(o):String(o)};if(null!=a&&!q.some((t,i)=>!o(e(t,i))))return{plotData:q,plotXAccessor:c,plotXFormat:l,usesIndex:!1};if(null!=a){let t=q.map((t,o)=>e(t,o));return{plotData:q.map((e,t)=>({...e,__waterfallX:t})),plotXAccessor:"__waterfallX",plotXFormat:e=>i(t[Number(e)],e),usesIndex:!0}}let r=Z.current,n=(e,t,o,i)=>{e&&"object"==typeof e&&(r.indexOf.set(e,t),!Object.isFrozen(e)&&!Object.isSealed(e)&&(e.__waterfallX=t)),o&&r.idOf.set(o,t),r.labels.set(t,i)};return{plotData:q,plotXAccessor:(i,a)=>{let l=e(i,a);if(o(l))return l;let s=t?String(t(i,a)??""):"",c=i&&"object"==typeof i?i.__waterfallX:void 0,h="number"==typeof c&&Number.isFinite(c)?c:(i&&"object"==typeof i?r.indexOf.get(i):void 0)??(s?r.idOf.get(s):void 0);if("number"==typeof h)return n(i,h,s,l),h;let d="number"==typeof a?a:r.next;return r.next=Math.max(r.next,d+1),n(i,d,s,l),d},plotXFormat:e=>i(r.labels.get(Number(e)),e),usesIndex:!0}},[a,q,c,l,d]),ie=Nt(()=>{if(oe&&null!=a)return[{orient:"bottom",tickValues:J.map((e,t)=>t)}]},[a,J,oe]),re=U({responsive:e,data:J,rawData:a,colorBy:void 0,colorScheme:void 0,legendInteraction:B,legendPosition:D,frameLegend:S,selection:k,linkedHover:C,fallbackFields:["string"==typeof c?c:"x"],unwrapData:!1,onObservation:L,onClick:R,hoverHighlight:_,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"WaterfallChart",chartId:H,showLegend:z,userMargin:r,marginDefaults:i.marginDefaults,loading:I,loadingContent:F,emptyContent:P,width:N,height:W,hasTitle:!!G,axisChrome:Pe(S,{showAxes:i.showAxes,xLabel:X,yLabel:Y,axes:S.axes??ie})}),ne=Nt(()=>({positiveColor:u,negativeColor:p,connectorStroke:y,connectorWidth:g,gap:f,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity}),[u,p,y,g,f,e.stroke,e.strokeWidth,e.opacity]),le=Nt(()=>De(c,h),[c,h]),ce=Nt(()=>Xe(void 0,b,le),[b,le]),he=Nt(()=>ut(e=>{let t=ce(e);if(!M)return t;let o="function"==typeof M?M(e):M;return o?{...t,...o}:t},re.effectiveSelectionHook,re.resolvedSelection),[ce,M,re.effectiveSelectionHook,re.resolvedSelection]),de=Nt(()=>we([{label:X||Ae(c),accessor:c,role:"x",format:l},{label:Y||"Change",accessor:h,role:"y",format:s}]),[c,h,X,Y,l,s]);if(re.earlyReturn)return re.earlyReturn;let ue=K({componentName:"WaterfallChart",data:a,accessors:{xAccessor:c,yAccessor:h}});if(ue) return zt(Me,{componentName:"WaterfallChart",message:ue,width:N,height:W});let pe={chartType:"waterfall",...null!=a&&{data:J},xAccessor:ee,yAccessor:h,xScaleType:null!=a&&oe?"linear":m,waterfallStyle:ne,areaStyle:he,size:[N,W],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:re.margin,showAxes:i.showAxes,xLabel:X,yLabel:Y,xFormat:te,yFormat:s,enableHover:O,showGrid:E,...ie&&{axes:ie},...re.legendBehaviorProps,...Ce({title:G,description:$,summary:j,accessibleTable:V,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...ke({tooltip:x,defaultTooltipContent:de}),...Se({linkedHover:C,selection:k,onObservation:L,onClick:R,hoverHighlight:_,hoverRadius:e.hoverRadius,mobileInteraction:re.mobileInteraction,customHoverBehavior:re.customHoverBehavior,customClickBehavior:re.customClickBehavior}),...d&&{pointIdAccessor:d},...v&&v.length>0&&{annotations:v},...w&&{xExtent:w},...A&&{yExtent:A},...T};
50
+ zt("text",{x:a-8,y:r-8,fill:ne.bottomRight.color,fontWeight:600,fontSize:g,opacity:.5,textAnchor:"end",children:ne.bottomRight.label})]})]})}]},[d,m,ne,p,y,g]);if(ce.earlyReturn)return ce.earlyReturn;let He={chartType:"scatter",...null!=a&&{data:le},xAccessor:c,yAccessor:h,colorAccessor:f||void 0,sizeAccessor:v||void 0,sizeRange:A,pointStyle:be,colorScheme:b,size:[V,X],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},margin:ce.margin,showAxes:i.showAxes,xLabel:ae,yLabel:re,xFormat:l,yFormat:s,enableHover:Y,showGrid:q,...he&&{xExtent:he.xExtent,yExtent:he.yExtent},...ce.legendBehaviorProps,...ee&&{title:ee},...te&&{description:te},...oe&&{summary:oe},...void 0!==ie&&{accessibleTable:ie},...n&&{className:n},...null!=e.animate&&{animate:e.animate},...void 0!==e.axisExtent&&{axisExtent:e.axisExtent},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},tooltipContent:!1===k?()=>null:!0===k||void 0===k?ve:Ee(k)||ve,...Se({linkedHover:H,selection:_,onObservation:I,onClick:F,hoverHighlight:B,hoverRadius:e.hoverRadius,mobileInteraction:ce.mobileInteraction,customHoverBehavior:ce.customHoverBehavior,customClickBehavior:ce.customClickBehavior}),...C&&{pointIdAccessor:C},...L&&L.length>0&&{annotations:L},canvasPreRenderers:Re,...ce.crosshairProps,...R,...Re.length>0&&{canvasPreRenderers:Re},svgPreRenderers:_e};return ke? zt(Me,{componentName:"QuadrantChart",message:ke,width:V,height:X}): zt(Te,{componentName:"QuadrantChart",width:V,height:X,children: zt(se,{ref:o,...He})})}),"QuadrantChart"),D="__ma_unitized",M="__ma_series",T=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){me(ye);let o=Dt(null),i=Dt([]),a=Dt(e.series);a.current=e.series,Ot(t,()=>{let e=()=>(a.current??[]).filter(e=>null!=e&&"object"==typeof e);return{push:t=>{if(!o.current)return;let a=e(),r=t;for(let e=0;e<a.length&&e<2;e++){let t=a[e],n=t.extent||i.current[e];if(!n)continue;let l=("function"==typeof t.yAccessor?t.yAccessor:e=>e[t.yAccessor])(r);null==l||!isFinite(l)||o.current.push({...r,[D]:zo(l,n),[M]:t.label||`Series ${e+1}`})}},pushMany:t=>{if(!o.current)return;let a=e(),r=[];for(let e of t)for(let t=0;t<a.length&&t<2;t++){let o=a[t],n=o.extent||i.current[t];if(!n)continue;let l=("function"==typeof o.yAccessor?o.yAccessor:e=>e[o.yAccessor])(e);null==l||!isFinite(l)||r.push({...e,[D]:zo(l,n),[M]:o.label||`Series ${t+1}`})}o.current.pushMany(r)},remove:e=>o.current?.remove(e)??[],update:(e,t)=>o.current?.update(e,t)??[],clear:()=>o.current?.clear(),getData:()=>o.current?.getData()??[],getScales:()=>o.current?.getScales()??null}},[]);let r=Ie(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,xLabel:e.xLabel,accessibleTable:e.accessibleTable,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules},v),{data:n,margin:l,className:s,xFormat:c,xAccessor:h="x",series:d,colorScheme:m,curve:u="monotoneX",lineWidth:p=2,styleRules:y,tooltip:g,annotations:f,frameProps:b={},selection:x,linkedHover:A,onObservation:w,onClick:S,hoverHighlight:k,chartId:C,loading:L,loadingContent:R,emptyContent:_,legendInteraction:H,legendPosition:I,stroke:F,strokeWidth:P,opacity:B}=e,{width:T,height:N,enableHover:W,showGrid:O,showLegend:E=!0,title:z,description:G,summary:$,accessibleTable:V,xLabel:X}=r,Y=Nt(()=>Fe(n),[n]),U=Nt(()=>Fe(d),[d]),q=U,J=2===U.length,Z=Nt(()=>J?{...b.legendLayout,sideGutter:b.legendLayout?.sideGutter??70}:b.legendLayout,[b.legendLayout,J]);"production"!==process.env.NODE_ENV&&!J&&console.warn(`[MultiAxisLineChart] Expected exactly 2 series for dual-axis mode, got ${U.length}. Rendering as a standard multi-line chart.`);let ee=Ye(L,T,N,R,e),te=ee?null:Qe(n,T,N,_,e),oe=je(),ie=Nt(()=>Wo(q,m,oe),[q,m,oe]),ae=Nt(()=>U.map((e,t)=>e.label||`Series ${t+1}`),[U]),{unitizedData:re,extents:ne}=Nt(()=>{if(0===Y.length){let e=U.map(e=>e.extent||null).filter(Boolean);return e.length===U.length&&(i.current=e),{unitizedData:[],extents:e.length===U.length?e:[]}}let e=U.map(e=>e.extent||Eo(Y,e.yAccessor));if(i.current=e,!J){let t=[];for(let e of Y)for(let o=0;o<U.length;o++){let i=U[o],a=("function"==typeof i.yAccessor?i.yAccessor:e=>e[i.yAccessor])(e);null!=a&&t.push({...e,[D]:a,[M]:ae[o]})}return{unitizedData:t,extents:e}}let t=[];for(let o of Y)for(let i=0;i<2;i++){let a=U[i],r=("function"==typeof a.yAccessor?a.yAccessor:e=>e[a.yAccessor])(o);null!=r&&t.push({...o,[D]:zo(r,e[i]),[M]:ae[i]})}return{unitizedData:t,extents:e}},[Y,U,J,ae]),le=Nt(()=>{if(!J||ne.length<2)return;let e=e=>t=>{let o=Go(t,ne[e]),i=U[e]?.format;return"function"==typeof i?i(o):Number.isInteger(o)?String(o):o.toFixed(1)},t=e(0),o=e(1);return[{orient:"left",label:ae[0],tickFormat:t},{orient:"right",label:ae[1],tickFormat:o},{orient:"bottom"}]},[J,ne,U,ae]),ce=Nt(()=>re.length>0?re:ae.map(e=>({[M]:e})),[re,ae]),he=K({responsive:e,data:ce,rawData:n,colorBy:M,colorScheme:ie,legendInteraction:H,legendPosition:I,frameLegend:{...b,legendLayout:Z},selection:x,linkedHover:A,fallbackFields:[M],unwrapData:!1,onObservation:w,onClick:S,hoverHighlight:k,mobileInteraction:r.mobileInteraction,mobileSemantics:r.mobileSemantics,chartType:"MultiAxisLineChart",chartId:C,showLegend:E,legendLayout:Z,userMargin:l,marginDefaults:J?{...r.marginDefaults,left:70,right:70}:r.marginDefaults,loading:L,loadingContent:R,emptyContent:_,width:T,height:N,hasTitle:!!z,axisChrome:Pe(b,{showAxes:r.showAxes,xLabel:X,yLabel:ae[0],yLabelRight:ae[1],axes:le})}),de=Nt(()=>{let e= new Map;return ae.forEach((t,o)=>e.set(t,ie[o])),e},[ae,ie]),ue=Tt(e=>de.get(e[M])||ie[0],[de,ie]),pe=Nt(()=>Oo(h,U),[h,U]),ge=j({lineWidth:p,resolveStroke:ue,stroke:F,strokeWidth:P,opacity:B,effectiveSelectionHook:he.effectiveSelectionHook,resolvedSelection:he.resolvedSelection,styleRules:y,ruleContext:pe}),fe=Nt(()=>e=>{let t=e.data||e,o=t[M],i=ae.indexOf(o),a=t[D],r=J&&i>=0&&ne[i]?Go(a,ne[i]):a,n=i>=0&&U[i]?.format?U[i].format:e=>Number.isInteger(e)?String(e):e.toFixed(2),l="function"==typeof h?h(t):t[h];return Bt.createElement("div",{style:{padding:"6px 10px",fontFamily:"var(--semiotic-font-family, sans-serif)",fontSize:"var(--semiotic-tooltip-font-size, 13px)"}},Bt.createElement("div",{style:{fontWeight:600,marginBottom:4,color:ie[i]||"inherit"}},o),Bt.createElement("div",null,`${"string"==typeof h?h:"x"}: `,c?c(l):String(l)),Bt.createElement("div",null,`${o}: ${n(r)}`))},[ae,ie,ne,J,U,h,c]),be=Tt(e=>{let t=(Array.isArray(e.allSeries)?e.allSeries:[]).map(e=>{let t=ae.indexOf(e.group),o=J&&t>=0&&ne[t]?Go(e.value,ne[t]):e.value,i=e.datum;return i&&(i={...i},delete i[D],delete i[M]),{...e,value:o,datum:i}}),o=e.data&&"object"==typeof e.data&&!Array.isArray(e.data)?{...e.data}:e.data;o&&"object"==typeof o&&!Array.isArray(o)&&(delete o[D],delete o[M]);let i={...e,data:o,allSeries:t};return delete i[D],delete i[M],i},[ne,J,ae]),xe=Nt(()=>Ve({xFormat:c,yFormat:(e,t)=>U[ae.indexOf(t??"")]?.format?.(e)}),[c,U,ae]),ve=Tt(e=>xe(be(e)),[xe,be]),Ae=Nt(()=>{if(!ze(g)||"function"!=typeof g.content)return g;let e=e=>g.content(be(e));return{mode:"multi",content:Ct(g.content)?Lt(e):e}},[be,g]),we=Nt(()=>We({tooltip:Ae,defaultTooltipContent:fe,multiDefaultContent:ve}),[fe,ve,Ae]);if(he.earlyReturn)return he.earlyReturn;let ke=Q({componentName:"MultiAxisLineChart",data:n,accessors:{xAccessor:h}}),Ce=J?[0,1]:void 0,Le={chartType:"line",...null!=n&&{data:re},xAccessor:h,yAccessor:D,groupAccessor:M,lineStyle:ge,colorScheme:ie,size:[T,N],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},margin:he.margin,showAxes:r.showAxes,...le&&{axes:le},xLabel:X,...J?{}:{yLabel:ae[0]},xFormat:c,...J&&Ce&&{yExtent:Ce},enableHover:W,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},showGrid:O,curve:u,...he.legendBehaviorProps,...z&&{title:z},...G&&{description:G},...$&&{summary:$},...void 0!==V&&{accessibleTable:V},...s&&{className:s},...null!=e.animate&&{animate:e.animate},...void 0!==e.axisExtent&&{axisExtent:e.axisExtent},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},...we,...f&&{annotations:f},...Se({linkedHover:A,selection:x,onObservation:w,onClick:S,hoverHighlight:k,hoverRadius:e.hoverRadius,mobileInteraction:he.mobileInteraction,customHoverBehavior:he.customHoverBehavior,customClickBehavior:he.customClickBehavior}),...he.crosshairProps,...b,...Z&&{legendLayout:Z}};return ee||te||(ke? zt(Me,{componentName:"MultiAxisLineChart",message:ke,width:T,height:N}): zt(Te,{componentName:"MultiAxisLineChart",width:T,height:N,children: zt(se,{ref:o,...Le})}))}),"MultiAxisLineChart"),N=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){me(ie);let o=Dt(null);U(t,{variant:"xy",frameRef:o});let i=Ie(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:e.showGrid,enableHover:e.enableHover,title:e.title,xLabel:e.xLabel,yLabel:e.yLabel,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",highAccessor:h="high",lowAccessor:d="low",openAccessor:m,closeAccessor:u,candlestickStyle:p,styleRules:y,tooltip:g,annotations:f,xExtent:b,yExtent:x,frameProps:v={},selection:A,linkedHover:w,onObservation:S,onClick:k,chartId:C,loading:L,loadingContent:R,emptyContent:_}=e,{width:H,height:I,enableHover:F,showGrid:P,title:B,description:D,summary:M,accessibleTable:T,xLabel:N,yLabel:W}=i,O=Nt(()=>Fe(a),[a]),E=Nt(()=>{let e=i.marginDefaults;return"sparkline"===i.mode?{...e,top:0,bottom:0}:e},[i.marginDefaults,i.mode]),z=K({responsive:e,data:O,rawData:a,colorBy:void 0,colorScheme:void 0,legendInteraction:void 0,selection:A,linkedHover:w,fallbackFields:[],onObservation:S,onClick:k,chartType:"CandlestickChart",chartId:C,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,showLegend:!1,userMargin:r,marginDefaults:E,loading:L,loadingContent:R,emptyContent:_,width:H,height:I}),{activeSelectionHook:G,resolvedSelection:$,customHoverBehavior:j,customClickBehavior:V,margin:X}=z,Y=null==m||null==u;Be("CandlestickChart",O,"xAccessor",c),Be("CandlestickChart",O,"highAccessor",h),Be("CandlestickChart",O,"lowAccessor",d),Y||(Be("CandlestickChart",O,"openAccessor",m),Be("CandlestickChart",O,"closeAccessor",u));let q=Nt(()=>De(c,Y?h:u),[c,h,u,Y]),J=Nt(()=>ut(Xe(void 0,y,q),G,$),[y,q,G,$]),Z=Nt(()=>{let e=[{label:N||we(c),accessor:c,role:"x",format:l}];return Y?(e.push({label:"High",accessor:h,role:"y",format:s}),e.push({label:"Low",accessor:d,format:s})):(e.push({label:"Open",accessor:m,format:s}),e.push({label:"High",accessor:h,format:s}),e.push({label:"Low",accessor:d,format:s}),e.push({label:"Close",accessor:u,format:s})),Ae(e)},[c,N,l,s,h,d,m,u,Y]),ee=Q({componentName:"CandlestickChart",data:a,accessors:{xAccessor:c,highAccessor:h,lowAccessor:d,...!Y&&{openAccessor:m,closeAccessor:u}}}),te=Math.max(2,Math.min(12,Math.round(H/40))),oe=H<=200?.02:.1,ae={chartType:"candlestick",...null!=a&&{data:O},xAccessor:c,yAccessor:h,highAccessor:h,lowAccessor:d,...!Y&&{openAccessor:m,closeAccessor:u},...p&&{candlestickStyle:p},...(G||y?.length)&&{pointStyle:J},scalePadding:te,extentPadding:oe,size:[H,I],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:X,showAxes:i.showAxes,xLabel:N,yLabel:W,xFormat:l,yFormat:s,enableHover:F,showGrid:P,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},...Ce({title:B,description:D,summary:M,accessibleTable:T,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...ke({tooltip:g,defaultTooltipContent:Z}),...Se({linkedHover:w,selection:A,onObservation:S,onClick:k,hoverRadius:e.hoverRadius,mobileInteraction:i.mobileInteraction,customHoverBehavior:j,customClickBehavior:V}),...f&&f.length>0&&{annotations:f},...b&&{xExtent:b},...x&&{yExtent:x},...z.crosshairProps,...v};return z.earlyReturn?z.earlyReturn:ee? zt(Me,{componentName:"CandlestickChart",message:ee,width:H,height:I}): zt(Te,{componentName:"CandlestickChart",width:H,height:I,children: zt(se,{ref:o,...ae})})}),"CandlestickChart"),W=/*#__PURE__*/He(/*#__PURE__*/Wt(function(e,t){me(ae);let o=Dt(null);U(t,{variant:"xy",frameRef:o});let i=Ie(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:n,xFormat:l,yFormat:s,xAccessor:c="x",yAccessor:h="y",pointIdAccessor:d,xScaleType:m,positiveColor:u,negativeColor:p,connectorStroke:y,connectorWidth:g,gap:f,styleRules:b,tooltip:x,annotations:v,xExtent:A,yExtent:w,frameProps:S={},selection:k,linkedHover:C,onObservation:L,onClick:R,hoverHighlight:_,chartId:H,loading:I,loadingContent:F,emptyContent:P,legendInteraction:B,legendPosition:D}=e,{areaStyle:M,...T}=S,{width:N,height:W,enableHover:O,showGrid:E,showLegend:z,title:G,description:$,summary:j,accessibleTable:V,xLabel:X,yLabel:Y}=i,q=Nt(()=>Fe(a),[a]),J=Dt({next:0,indexOf: new WeakMap,idOf: new Map,labels: new Map}),{plotData:Z,plotXAccessor:ee,plotXFormat:te,usesIndex:oe}=Nt(()=>{let e="function"==typeof c?c:e=>e[c],t=d?"function"==typeof d?d:e=>e[d]:void 0,o=e=>"number"==typeof e&&Number.isFinite(e)||e instanceof Date,i=(e,t)=>{let o=e??t;return l?l(o):String(o)};if(null!=a&&!q.some((t,i)=>!o(e(t,i))))return{plotData:q,plotXAccessor:c,plotXFormat:l,usesIndex:!1};if(null!=a){let t=q.map((t,o)=>e(t,o));return{plotData:q.map((e,t)=>({...e,__waterfallX:t})),plotXAccessor:"__waterfallX",plotXFormat:e=>i(t[Number(e)],e),usesIndex:!0}}let r=J.current,n=(e,t,o,i)=>{e&&"object"==typeof e&&(r.indexOf.set(e,t),!Object.isFrozen(e)&&!Object.isSealed(e)&&(e.__waterfallX=t)),o&&r.idOf.set(o,t),r.labels.set(t,i)};return{plotData:q,plotXAccessor:(i,a)=>{let l=e(i,a);if(o(l))return l;let s=t?String(t(i,a)??""):"",c=i&&"object"==typeof i?i.__waterfallX:void 0,h="number"==typeof c&&Number.isFinite(c)?c:(i&&"object"==typeof i?r.indexOf.get(i):void 0)??(s?r.idOf.get(s):void 0);if("number"==typeof h)return n(i,h,s,l),h;let d="number"==typeof a?a:r.next;return r.next=Math.max(r.next,d+1),n(i,d,s,l),d},plotXFormat:e=>i(r.labels.get(Number(e)),e),usesIndex:!0}},[a,q,c,l,d]),ie=Nt(()=>{if(oe&&null!=a)return[{orient:"bottom",tickValues:Z.map((e,t)=>t)}]},[a,Z,oe]),re=K({responsive:e,data:Z,rawData:a,colorBy:void 0,colorScheme:void 0,legendInteraction:B,legendPosition:D,frameLegend:S,selection:k,linkedHover:C,fallbackFields:["string"==typeof c?c:"x"],unwrapData:!1,onObservation:L,onClick:R,hoverHighlight:_,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"WaterfallChart",chartId:H,showLegend:z,userMargin:r,marginDefaults:i.marginDefaults,loading:I,loadingContent:F,emptyContent:P,width:N,height:W,hasTitle:!!G,axisChrome:Pe(S,{showAxes:i.showAxes,xLabel:X,yLabel:Y,axes:S.axes??ie})}),ne=Nt(()=>({positiveColor:u,negativeColor:p,connectorStroke:y,connectorWidth:g,gap:f,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity}),[u,p,y,g,f,e.stroke,e.strokeWidth,e.opacity]),le=Nt(()=>De(c,h),[c,h]),ce=Nt(()=>Xe(void 0,b,le),[b,le]),he=Nt(()=>ut(e=>{let t=ce(e);if(!M)return t;let o="function"==typeof M?M(e):M;return o?{...t,...o}:t},re.effectiveSelectionHook,re.resolvedSelection),[ce,M,re.effectiveSelectionHook,re.resolvedSelection]),de=Nt(()=>Ae([{label:X||we(c),accessor:c,role:"x",format:l},{label:Y||"Change",accessor:h,role:"y",format:s}]),[c,h,X,Y,l,s]);if(re.earlyReturn)return re.earlyReturn;let ue=Q({componentName:"WaterfallChart",data:a,accessors:{xAccessor:c,yAccessor:h}});if(ue) return zt(Me,{componentName:"WaterfallChart",message:ue,width:N,height:W});let pe={chartType:"waterfall",...null!=a&&{data:Z},xAccessor:ee,yAccessor:h,xScaleType:null!=a&&oe?"linear":m,waterfallStyle:ne,areaStyle:he,size:[N,W],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:re.margin,showAxes:i.showAxes,xLabel:X,yLabel:Y,xFormat:te,yFormat:s,enableHover:O,showGrid:E,...ie&&{axes:ie},...re.legendBehaviorProps,...Ce({title:G,description:$,summary:j,accessibleTable:V,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...ke({tooltip:x,defaultTooltipContent:de}),...Se({linkedHover:C,selection:k,onObservation:L,onClick:R,hoverHighlight:_,hoverRadius:e.hoverRadius,mobileInteraction:re.mobileInteraction,customHoverBehavior:re.customHoverBehavior,customClickBehavior:re.customClickBehavior}),...d&&{pointIdAccessor:d},...v&&v.length>0&&{annotations:v},...A&&{xExtent:A},...w&&{yExtent:w},...T};
51
51
  return zt(Te,{componentName:"WaterfallChart",width:N,height:W,children: zt(se,{ref:o,...pe})})}),"WaterfallChart");export{e as a,t as b,o as c,Yt as d,to as e,p as f,y as g,g as h,f as i,b as j,x as k,R as l,F as m,P as n,B as o,T as p,N as q,W as r};
@@ -0,0 +1 @@
1
+ export{a as registerBuiltInXYPlugins}from"./c-HR5AH3MA.min.js";import"./c-JS2D7A2P.min.js";import"./c-5NAU4JAY.min.js";