semiotic 3.13.0 → 3.13.1

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 (160) hide show
  1. package/README.md +53 -41
  2. package/ai/artifact-surface-inventory.json +1 -1
  3. package/ai/dist/mcp-server.js +132 -106
  4. package/ai/reference.md +12 -4
  5. package/ai/schema.json +16 -2
  6. package/ai/surface-manifest.json +1 -1
  7. package/ai/task-packets/compare-category-totals.json +5 -5
  8. package/ai/task-packets/compare-category-totals.md +2 -2
  9. package/ai/task-packets/correct-published-chart.json +5 -5
  10. package/ai/task-packets/correct-published-chart.md +2 -2
  11. package/ai/task-packets/index.json +6 -6
  12. package/ai/task-packets/update-live-chart.json +5 -5
  13. package/ai/task-packets/update-live-chart.md +2 -2
  14. package/dist/{c-CRKR5M42.min.js → c-2M2OPWVA.min.js} +37 -37
  15. package/dist/c-3GIPT46Z.min.js +1 -0
  16. package/dist/c-3UXQGCQT.min.js +1 -0
  17. package/dist/{c-MHNU6KYQ.min.js → c-4P2EM44G.min.js} +3 -3
  18. package/dist/c-4RVDKSMQ.min.js +1 -0
  19. package/dist/{c-6MEEA5VY.min.js → c-4YPPVFZH.min.js} +1 -1
  20. package/dist/{c-6MPP6QF5.min.js → c-62JIVHK5.min.js} +1 -1
  21. package/dist/{c-KYRH3XKJ.min.js → c-6QCSRJSC.min.js} +1 -1
  22. package/dist/c-6WJKNYIG.min.js +1 -0
  23. package/dist/c-7BVQDXFU.min.js +1 -0
  24. package/dist/c-7UN2WUMI.min.js +1 -0
  25. package/dist/c-AQUX6L2O.min.js +1 -0
  26. package/dist/c-BR5QDUCR.min.js +1 -0
  27. package/dist/c-C3YQVUB6.min.js +1 -0
  28. package/dist/{c-RQ2XZHWY.min.js → c-COP4OISO.min.js} +1 -1
  29. package/dist/c-ENRZPF5E.min.js +1 -0
  30. package/dist/c-HBLICBM6.min.js +1 -0
  31. package/dist/{c-EQVM754Z.min.js → c-HGWITEJI.min.js} +1 -1
  32. package/dist/{c-3K2FJDLE.min.js → c-I54V24WG.min.js} +1 -1
  33. package/dist/c-IDCFMBA4.min.js +2 -0
  34. package/dist/{c-TPL7X32J.min.js → c-ISHYKYII.min.js} +1 -1
  35. package/dist/c-KSSS3HSA.min.js +1 -0
  36. package/dist/c-LEICSI5V.min.js +1 -0
  37. package/dist/c-LJ4XY3Z3.min.js +1 -0
  38. package/dist/c-MBE6PPHN.min.js +1 -0
  39. package/dist/c-MOK4RWNO.min.js +1 -0
  40. package/dist/c-N2TVSOYL.min.js +2 -0
  41. package/dist/{c-EAAKQIUZ.min.js → c-NHZ2E3CI.min.js} +1 -1
  42. package/dist/{c-MDY3ULP6.min.js → c-OBA7XSLH.min.js} +1 -1
  43. package/dist/c-OIJL2WZH.min.js +1 -0
  44. package/dist/c-ONOWKUUZ.min.js +1 -0
  45. package/dist/{c-CPJR4LHF.min.js → c-OSLNYZ3Q.min.js} +17 -17
  46. package/dist/c-PBFRYNKM.min.js +1 -0
  47. package/dist/c-QUAEYF34.min.js +1 -0
  48. package/dist/c-RDFFLRKC.min.js +1 -0
  49. package/dist/c-SDGGMIYI.min.js +1 -0
  50. package/dist/c-SQQZPFVY.min.js +1 -0
  51. package/dist/c-SU6Z75M2.min.js +1 -0
  52. package/dist/{c-BWM7MU2Y.min.js → c-SX4TPG3Z.min.js} +1 -1
  53. package/dist/{c-DTYG34WG.min.js → c-VGHU2LTF.min.js} +2 -2
  54. package/dist/c-VLWWXOM5.min.js +1 -0
  55. package/dist/c-VZNIIKL6.min.js +1 -0
  56. package/dist/{c-GBO32OML.min.js → c-W5ATXREF.min.js} +1 -1
  57. package/dist/c-WSWMQDFZ.min.js +1 -0
  58. package/dist/{c-3SDC7AQQ.min.js → c-XM76UG3P.min.js} +1 -1
  59. package/dist/c-XORVM6C5.min.js +1 -0
  60. package/dist/{c-MYRI7NF2.min.js → c-XZJWL7UL.min.js} +1 -1
  61. package/dist/c-Y43GTKGR.min.js +1 -0
  62. package/dist/c-YGTMWEEF.min.js +1 -0
  63. package/dist/c-ZFIURPZA.min.js +1 -0
  64. package/dist/c-ZWJDTDEV.min.js +1 -0
  65. package/dist/c-ZYMXDR42.min.js +1 -0
  66. package/dist/components/ai/chartClinic.d.ts +4 -0
  67. package/dist/components/ai/evaluateChart.d.ts +3 -1
  68. package/dist/components/ai/generativeChart.d.ts +13 -0
  69. package/dist/components/ai/renderEvidenceMemoKey.d.ts +9 -0
  70. package/dist/components/ai/reportRenderError.d.ts +2 -0
  71. package/dist/components/charts/physics/eventDropSources.d.ts +1 -1
  72. package/dist/components/evidence/claimReferences.d.ts +9 -0
  73. package/dist/components/realtime/BinAccumulator.d.ts +5 -0
  74. package/dist/components/recipes/atlas/dependencyEvidence.d.ts +5 -0
  75. package/dist/components/recipes/atlas/support.d.ts +5 -0
  76. package/dist/components/server/staticXYAxisTicks.d.ts +1 -1
  77. package/dist/components/stream/MarginalGraphics.d.ts +4 -2
  78. package/dist/components/stream/PipelineStore.d.ts +6 -18
  79. package/dist/components/stream/axisTickUtils.d.ts +1 -1
  80. package/dist/components/stream/countNoun.d.ts +2 -0
  81. package/dist/components/stream/heatmapBandTicks.d.ts +68 -0
  82. package/dist/components/stream/pipelineDomainResolution.d.ts +52 -3
  83. package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +8 -0
  84. package/dist/components/stream/uniqueRegionLabel.d.ts +6 -0
  85. package/dist/components/stream/xyAxisTicks.d.ts +8 -1
  86. package/dist/components/stream/xyFrameAxisTypes.d.ts +4 -2
  87. package/dist/components/stream/xySceneBuilders/types.d.ts +6 -0
  88. package/dist/geo.min.js +152 -152
  89. package/dist/geo.module.min.js +1 -1
  90. package/dist/network.module.min.js +1 -1
  91. package/dist/ordinal.module.min.js +1 -1
  92. package/dist/physics.module.min.js +1 -1
  93. package/dist/physicsWorker.js +1 -1
  94. package/dist/processSankeyLayoutWorker.js +1 -1
  95. package/dist/semiotic-access.module.min.js +2 -2
  96. package/dist/semiotic-ai-core.min.js +5 -5
  97. package/dist/semiotic-ai-core.module.min.js +4 -4
  98. package/dist/semiotic-ai.module.min.js +2 -2
  99. package/dist/semiotic-artifact.min.js +6 -6
  100. package/dist/semiotic-artifact.module.min.js +2 -2
  101. package/dist/semiotic-atlas-core.min.js +1 -1
  102. package/dist/semiotic-atlas-core.module.min.js +1 -1
  103. package/dist/semiotic-atlas-selection.module.min.js +1 -1
  104. package/dist/semiotic-client-cjs-shared.min.js +1023 -1023
  105. package/dist/semiotic-evidence.min.js +4 -4
  106. package/dist/semiotic-evidence.module.min.js +3 -3
  107. package/dist/semiotic-experimental-auxiliary.module.min.js +1 -1
  108. package/dist/semiotic-experimental-node-auxiliary.module.min.js +1 -1
  109. package/dist/semiotic-experimental-react-shared.module.min.js +1 -1
  110. package/dist/semiotic-experimental-vacp.min.js +1 -1
  111. package/dist/semiotic-experimental-vacp.module.min.js +1 -1
  112. package/dist/semiotic-line.module.min.js +1 -1
  113. package/dist/semiotic-realtime-core.module.min.js +1 -1
  114. package/dist/semiotic-recipes-core-cjs-base.min.js +101 -101
  115. package/dist/semiotic-recipes-core.module.min.js +1 -1
  116. package/dist/semiotic-server-edge-node.module.min.js +3 -3
  117. package/dist/semiotic-server-edge.min.js +397 -397
  118. package/dist/semiotic-server-edge.module.min.js +3 -3
  119. package/dist/semiotic-server-node.min.js +397 -397
  120. package/dist/semiotic-utils-core.min.js +11 -11
  121. package/dist/semiotic-utils-core.module.min.js +3 -3
  122. package/dist/semiotic.module.min.js +1 -1
  123. package/dist/server.min.js +397 -397
  124. package/dist/server.module.min.js +3 -3
  125. package/dist/xy.module.min.js +1 -1
  126. package/package.json +2 -2
  127. package/dist/c-3OBJLOXI.min.js +0 -1
  128. package/dist/c-4VFGNUWG.min.js +0 -1
  129. package/dist/c-5BN7GWJH.min.js +0 -1
  130. package/dist/c-65GMYND6.min.js +0 -1
  131. package/dist/c-AGRMJIUH.min.js +0 -1
  132. package/dist/c-BJKGYOPX.min.js +0 -1
  133. package/dist/c-C332PFY6.min.js +0 -1
  134. package/dist/c-DDZ5TZ7P.min.js +0 -1
  135. package/dist/c-F4DZ3NMI.min.js +0 -1
  136. package/dist/c-GZJ2XEQ5.min.js +0 -1
  137. package/dist/c-HFQ3Z65X.min.js +0 -1
  138. package/dist/c-HNW73MXJ.min.js +0 -1
  139. package/dist/c-HWFZB7SD.min.js +0 -1
  140. package/dist/c-IIV4DB7T.min.js +0 -1
  141. package/dist/c-J2QH3PEI.min.js +0 -1
  142. package/dist/c-JZNWRFVJ.min.js +0 -2
  143. package/dist/c-KHLBCSIO.min.js +0 -1
  144. package/dist/c-L7FQHKGH.min.js +0 -1
  145. package/dist/c-LYPOBMKC.min.js +0 -1
  146. package/dist/c-NGMMPKNJ.min.js +0 -1
  147. package/dist/c-NOME4L5M.min.js +0 -1
  148. package/dist/c-OKIJBK5K.min.js +0 -2
  149. package/dist/c-OXV4W7YX.min.js +0 -1
  150. package/dist/c-P73SQZEP.min.js +0 -1
  151. package/dist/c-PD5EZI24.min.js +0 -1
  152. package/dist/c-RAL7HCTV.min.js +0 -1
  153. package/dist/c-S4OGXAVO.min.js +0 -1
  154. package/dist/c-UWE3VZEO.min.js +0 -1
  155. package/dist/c-VP7WX6QI.min.js +0 -1
  156. package/dist/c-VW7ZSLDC.min.js +0 -1
  157. package/dist/c-WDVYLMCM.min.js +0 -1
  158. package/dist/c-XEACLH4B.min.js +0 -1
  159. package/dist/c-YJDGSPNB.min.js +0 -1
  160. package/dist/c-ZYBEKQCT.min.js +0 -1
@@ -1 +0,0 @@
1
- function e({scene:e,sceneRevision:p,chartType:h,revealRows:u}){let[d,g]=i.useState(5),f=p??e,{allRows:y,summary:j}=i.useMemo(()=>{let s=n(e);return{allRows:s,summary:t(s.length,a(s))}},[f]),b=Math.min(d,y.length),w=y.length-b;return m(o,{children:[c("div",{className:"semiotic-accessible-data-table-summary",role:"note",style:l,children:j}),c(s,{rows:y.slice(0,b),label:`Sample data for ${h}`,typeLabel:"type",caption:w>0?`First ${b} of ${y.length} data points`:`All ${y.length} data points`}),c(r,{remaining:w,onClick:e=>{u(e.currentTarget,b,Math.min(b+25,y.length),y.length),g(e=>e+25)},kind:"row"})]})}import{c as t,b as a,d as s}from"./c-HNW73MXJ.min.js";import{a as r}from"./c-TPL7X32J.min.js";import{e as n,k as l}from"./c-LYPOBMKC.min.js";import*as i from"react";import{jsxs as m,Fragment as o,jsx as c}from"react/jsx-runtime";export{e as default};
@@ -1 +0,0 @@
1
- var e,t,i;import{a as pe}from"./c-GNTXRXRN.min.js";import{c as ye}from"./c-3K2FJDLE.min.js";import{e as fe}from"./c-YSMCBJOI.min.js";import{b as ve,c as be,a as xe}from"./c-F4DZ3NMI.min.js";import{a as we}from"./c-S4OGXAVO.min.js";import{a as ke}from"./c-65GMYND6.min.js";import{d as Ae,g as Se,e as Pe,h as Re,l as Ce,c as _e,i as Le,j as Me,b as Ie}from"./c-6MEEA5VY.min.js";import{h as Te,j as He,k as Be}from"./c-YJDGSPNB.min.js";import{b as $e,d as Fe,g as Oe,a as De,f as Ee,h as We,e as Ne,i as je,k as ze,m as Ve,j as Ge}from"./c-RAL7HCTV.min.js";import{a as qe}from"./c-RQ2XZHWY.min.js";import{a as Xe}from"./c-VP7WX6QI.min.js";import{a as Ye}from"./c-3OBJLOXI.min.js";import{a as Qe}from"./c-2N7IU2NY.min.js";import{d as Ke,b as Ze,a as Je}from"./c-YLZIV3VS.min.js";import{f as Ue,e as et,d as tt,a as it,b as ot,o as rt,k as at,l as nt,n as lt,s as st,v as ct,t as ht,u as ut,E as dt,y as gt,B as mt,h as pt,i as yt,O as ft,C as vt,q as bt,g as xt,r as wt,S as kt,J as At,Q as St,R as Pt,P as Rt}from"./c-GBO32OML.min.js";import{d as Ct}from"./c-SWVXFUDL.min.js";import{c as _t}from"./c-363Q2L4Z.min.js";import{a as Lt,b as Mt}from"./c-O7SPJAUO.min.js";import{l as It,E as Tt,w as Ht,t as Bt,q as $t,K as Ft,Q as Ot,J as Dt,U as Et,A as Wt,ag as Nt,ac as jt,ai as zt,W as Vt,X as Gt,V as qt,Y as Xt,aa as Yt,$ as Qt,_ as Kt,aJ as Zt,aX as Jt,aB as Ut,aj as ei,ak as ti,b as ii,m as oi,am as ri,aF as ai,ae as ni,ah as li,G as si,aT as ci,af as hi,at as ui,aE as di,aC as gi,aS as mi,k as pi,av as yi,ax as fi,o as vi,an as bi,aG as xi,az as wi,bN as ki,bi as Ai,bH as Si,bb as Pi,bE as Ri,bA as Ci,bI as _i,aY as Li,a$ as Mi,bC as Ii,aR as Ti,B as Hi,bO as Bi,bF as $i,ba as Fi,a_ as Oi}from"./c-VW7ZSLDC.min.js";import{f as Di,d as Ei}from"./c-KLJDKRD5.min.js";import{c as Wi}from"./c-SIQVOV6A.min.js";import{s as Ni,p as ji,r as zi,v as Vi,k as Gi,j as qi,i as Xi,h as Yi,g as Qi,f as Ki,e as Zi,u as Ji}from"./c-WPL6PGP3.min.js";import{c as Ui,p as eo,r as to,h as io,i as oo,f as ro,k as ao,w as no,a as lo}from"./c-BJKGYOPX.min.js";import{c as so,b as co,i as ho}from"./c-ELGOCAEY.min.js";import{t as uo,y as go,h as mo,s as po,z as yo}from"./c-TC47SNSI.min.js";import{d as fo,b as vo,a as bo,c as xo}from"./c-I4BEWAKT.min.js";import{c as wo,a as ko}from"./c-GRTKU3C7.min.js";import*as Ao from"react";import{useCallback as So,useImperativeHandle as Po,useMemo as Ro,useRef as Co,useId as _o,memo as Lo,forwardRef as Mo,useEffect as Io,useState as To}from"react";import{jsx as Ho,jsxs as Bo,Fragment as $o}from"react/jsx-runtime";import{scaleLinear as Fo,scaleBand as Oo}from"d3-scale";import{quantileSorted as Do}from"d3-array";import{quadtree as Eo}from"d3-quadtree";import{arc as Wo}from"d3-shape";function No(e){if(Array.isArray(e))return e.length>0&&e.every(No);if(!Ao.isValidElement(e))return!1;if(e.type===Ao.Fragment){let t=Ao.Children.toArray(e.props.children);return t.length>0&&t.every(No)}return"string"==typeof e.type&&o.has(e.type)}function jo(e,t,i,o){if(("string"==typeof e||"number"==typeof e)&&(e=Ho("text",{fill:"currentColor",...o,children:e})),!No(e))return null;if(!Ao.isValidElement(e)||e.type===Ao.Fragment)return Ho("g",{className:"semiotic-radial-center-content",transform:`translate(${t},${i})`,pointerEvents:"none",children:e});let r=e,a="text"===r.type?Ao.cloneElement(r,{x:r.props.x??0,y:r.props.y??0,textAnchor:r.props.textAnchor??"middle",dominantBaseline:r.props.dominantBaseline??"middle"}):r;return Ho("g",{className:"semiotic-radial-center-content",transform:`translate(${t},${i})`,pointerEvents:"none",children:a})}function zo({content:e,centerX:t,centerY:i,width:o,height:r}){let a=jo(e,t,i);return a?Ho("svg",{width:o,height:r,style:{position:"absolute",left:0,top:0,pointerEvents:"none",overflow:"visible"},children:a}):Ho("div",{style:{position:"absolute",left:t,top:i,transform:"translate(-50%, -50%)",pointerEvents:"none",textAlign:"center"},children:e})}function Vo(e,t,i,o,r,a){let n=e.color??"rgba(255,255,255,0.6)",l=e.glowRadius??4,s=!1;for(let c of t){if("connector"===c.type||"violin"===c.type||"boxplot"===c.type)continue;if("wedge"===c.type){let t=c.category;if(!t)continue;let o=0;for(let n of r(t)??[]){let t=i.get(n);null!=t&&(o=Math.max(o,$e(e,t,a)))}s=Fe(c,o,n)||s;continue}if(null==c.datum)continue;let t=o.get(c.datum);if(null==t)continue;let h=i.get(t),u=null==h?0:$e(e,h,a);s=Fe(c,u,n,l)||s}return s}function Go(e,t,i){let{scales:o,config:r,getConnector:a,getO:n}=e;if(!a||!o)return[];let l=[],{projection:s}=o,c=new Map;for(let e of t){if("point"!==e.type&&"rect"!==e.type)continue;let t=e.datum;if(!t)continue;let i,o,r=a(t);r&&("point"===e.type?(i=e.x,o=e.y):(i=e.x+e.w/2,o=e.y+("vertical"===s?0:e.h/2)),c.has(r)||c.set(r,[]),c.get(r).push({x:i,y:o,datum:t,category:n(t)}))}let h=new Map(o.o.domain().map((e,t)=>[e,t])),u=r.connectorStyle,d={stroke:e.config.themeSemantic?.border||e.config.themeSemantic?.secondary||"#999",strokeWidth:1,opacity:.5},g=e=>"function"==typeof u?u(e):u||d,m=(e,t,i)=>{l.push({type:"connector",x1:e.x,y1:e.y,x2:t.x,y2:t.y,style:g(e.datum),datum:e.datum,group:i})};for(let[e,t]of c)if(!(t.length<2)){t.sort((e,t)=>(h.get(e.category)??-1)-(h.get(t.category)??-1));for(let i=0;i<t.length-1;i++)m(t[i],t[i+1],e);"radial"===s&&t.length>=3&&m(t[t.length-1],t[0],e)}return l}function qo(e,t,i,o=!1){let r=new Map;for(let o of e){let e=t(o);if(!Number.isFinite(e))continue;let a=i?i(o):"_default",n=r.get(a);n||(n={total:0,value:0,pieces:[]},r.set(a,n)),n.total+=e,n.pieces.push(o)}let a=0;for(let e of r.values())a+=Math.abs(e.total);for(let e of r.values())e.value=o&&a>0?e.total/a:e.total;return r}function Xo(e,t,i,o=!1){let r=new Set;return{steps:e.map(e=>{let a=qo(e.pieceData,t,i,o),n=0;for(let[e,t]of a)r.add(e),n+=t.total;return{col:e,groups:a,stepTotal:n}}),keys:[...r]}}function Yo(e,t,i){let o="function"==typeof e?e(i?t.w:t.h):e;return"number"==typeof o&&Number.isFinite(o)?Math.max(0,o):0}function Qo(e){let t=e.getSymbol;return t?so(t,e.config.symbolMap):null}function Ko(e,t,i,o,r,a,n){t?e.push({type:"symbol",x:o,y:r,size:Math.PI*a*a,symbolType:t(i),style:n,datum:i}):e.push({type:"point",x:o,y:r,r:a,style:n,datum:i})}function Zo(e,t){let{scales:i,columns:o,config:r,resolvePieceStyle:a,getR:n}=e,l=[],s=Math.min(t.width,t.height)/2-4,c="donut"===r.chartType?r.innerRadius||60:0,h=-Math.PI/2+(r.startAngle||0)*Math.PI/180,u=null!=r.sweepAngle?r.sweepAngle*Math.PI/180:2*Math.PI,d=null!=r.sweepAngle&&r.sweepAngle<360,g=Object.values(o),m=g.some(e=>{let t=e.pieceData[0];return t&&("number"==typeof t._pct||"number"==typeof t._pctStart||null!=t._roundedEnds)}),p=g.length,y=d&&!m&&p>1&&(r.cornerRadius??0)>0;for(let e=0;e<g.length;e++){let t=g[e],i=t.pieceData[0],o="number"==typeof i?._pctStart?i._pctStart:t.pctStart,d="number"==typeof i?._pct?i._pct:t.pct,m=h+o*u,p=h+(o+d)*u,f=a(t.pieceData[0],t.name),v=0===e,b=e===g.length-1,x={type:"wedge",cx:0,cy:0,innerRadius:c,outerRadius:s,startAngle:m,endAngle:p,...r.cornerRadius&&{cornerRadius:r.cornerRadius},style:f,datum:i?._nonInteractive?null:t.pieceData,accessibleDatum:{...1===t.pieceData.length?t.pieceData[0]:{},category:t.name,value:t.pieceData.reduce((e,t)=>e+n(t),0),percent:100*d,count:t.pieceData.length,...t.pieceData[0]?.__gaugeAccessibleDatum},category:t.name};i?._roundedEnds?x.roundedEnds=i._roundedEnds:y&&(x.roundedEnds={start:v,end:b}),i?._gradientBand&&(x._gradientBand=i._gradientBand),l.push(x)}return l}function Jo(e,t,i){return{...e[0],...i,category:t,data:e}}function Uo(e){let t=e.length,i=e[0],o=e[t-1];return{n:t,min:i,q1:Do(e,.25)??i,median:Do(e,.5)??(i+o)/2,q3:Do(e,.75)??o,max:o,mean:e.reduce((e,t)=>e+t,0)/t}}function er(e,t,i,o,r){let a=new Array(r).fill(0);for(let n of e)n<t||n>i||a[Math.min(Math.floor((n-t)/o),r-1)]++;return a}function tr(e){let{data:t,chartType:i,projection:o,normalize:r,rExtent:a,extentPadding:n=.05,baselinePadding:l,axisExtent:s,getO:c,getR:h,getStack:u,rawRExtent:d}=e,g=n;if("radial"===o&&("pie"===i||"donut"===i))return[0,1];let m=0,p=0;if("bar"===i||"bar-funnel"===i){let e=new Map;for(let i of t){let t=c(i);e.has(t)||e.set(t,[]),e.get(t).push(i)}for(let t of e.values()){let e=qo(t,h,u,"bar"===i&&r),o=0,a=0;for(let{value:t}of e.values())"bar-funnel"===i?(o=Math.max(o,t),a=Math.min(a,t)):t>=0?o+=t:a+=t;p=Math.max(p,o),m=Math.min(m,a)}}else if("swimlane"===i){let e=new Map;for(let i of t){let t=c(i),o=Math.abs(h(i));e.set(t,(e.get(t)||0)+o)}for(let t of e.values())t>p&&(p=t)}else if("clusterbar"===i)for(let e of t){let t=h(e);Number.isFinite(t)&&(t>p&&(p=t),t<m&&(m=t))}else{let e=d[0],t=d[1];e!==1/0&&(m=e),t!==-1/0&&(p=t)}a&&(null!=a[0]&&(m=a[0]),null!=a[1]&&(p=a[1]));let y="bar"===i||"clusterbar"===i||"bar-funnel"===i||"swimlane"===i;if(y&&(null!=a?.[0]||null!=a?.[1]||(m>0&&(m=0),p<0&&(p=0))),"bar-funnel"!==i&&"exact"!==s){let e=p-m,t=e>0?e*g:1,o=y&&!l&&0===m,r=y&&!l&&0===p||"swimlane"===i;null==a?.[0]&&!o&&(m-=t),null==a?.[1]&&!r&&(p+=t)}return[m,p]}function ir(e){let{data:t,oExtent:i,oScale:o,projection:r,layout:a,dynamicColumnWidth:n,getO:l,getR:s}=e,c=Object.create(null),h=new Map;for(let e of t){let t=l(e);h.has(t)||h.set(t,[]),h.get(t).push(e)}let u=0;if("radial"===r)for(let e of t)u+=Math.abs(s(e));let d=null;if(n&&"radial"!==r){d=new Map;let e=0;for(let t of i){let i,o=h.get(t)||[];i="string"==typeof n?o.reduce((e,t)=>{let i=Number(t[n]);return e+(Number.isFinite(i)?i:0)},0):n(o);let r=Number.isFinite(i)?Math.max(0,i):0;d.set(t,r),e=Math.max(e,r)}let t="horizontal"===r?a.height:a.width,l=o.padding()*o.step()*Math.max(0,i.length-1),s=Math.max(0,t-l);if(e>0){let t=0;for(let i of d.values())t+=i/e;for(let[i,o]of d)d.set(i,o/e/t*s)}}let g=0,m=0;for(let e of i){let t,i,r=h.get(e)||[],a=r.reduce((e,t)=>e+Math.abs(s(t)),0),n=u>0?a/u:0;d?(t=m,i=d.get(e)??o.bandwidth(),m+=i+o.padding()*o.step()):(t=o(e)??0,i=o.bandwidth()),c[e]={name:e,x:t,y:0,width:i,middle:t+i/2,padding:o.padding()*o.step(),pieceData:r,pct:n,pctStart:g},g+=n}return c}function or(e,t){let i="function"==typeof t,o=i?null:t||"category",r=new Map;for(let a=0;a<e.length;a++){let n=e[a],l=i?t(n):n[o],s=r.get(l);s?s.push(a):r.set(l,[a])}return r}function rr(e){let t="preserve",i=new Set;for(let o of e){let e=Object.prototype.hasOwnProperty.call(g,o)?g[o]:m;"rebuild"===e.retainedData&&(t="rebuild");for(let t of e.invalidations)i.add(t)}return{retainedData:t,invalidations:i}}function ar(e){let t=0,i=0;for(let o of e)"point"===o.type&&!1!==o.interactive&&(t++,o.r>i&&(i=o.r));if(t<=y)return{quadtree:null,maxRadius:i};let o=new Array(t),r=0;for(let t of e)"point"===t.type&&!1!==t.interactive&&(o[r++]=t);return{maxRadius:i,quadtree:Eo().x(e=>e.x).y(e=>e.y).addAll(o)}}function nr(e,{storeRef:t,adapterRef:i,dirtyRef:o,scheduleRender:r,hoverRef:a,setHoverPoint:n}){let l=So(e=>{i.current?.push(e)},[i]),s=So(e=>{i.current?.pushMany(e)},[i]),c=So(()=>{i.current?.clear(),t.current?.clear(),o.current=!0,r()},[i,t,o,r]),h=So(e=>{i.current?.clearLastData(),i.current?.setReplacementData(e)},[i]);Po(e,()=>({push:l,pushMany:s,replace:h,remove:e=>{i.current?.flush();let l=t.current?.remove(e)??[];if(l.length>0){let e=a.current?.data;a.current&&(Array.isArray(e)?l.some(t=>e.includes(t)):l.some(t=>t===e))&&(a.current=null,n(null)),o.current=!0,r()}return l},update:(e,a)=>{i.current?.flush();let n=t.current?.update(e,a)??[];return n.length>0&&(o.current=!0,r()),n},clear:c,getData:()=>(i.current?.flush(),t.current?.getData()??[]),getScales:()=>t.current?.scales??null,getCustomLayout:()=>t.current?.lastCustomLayoutResult??null,getLayoutFailure:()=>t.current?.lastCustomLayoutFailure??null}),[l,s,h,c,r,i,t,o,a,n])}function lr(e,t,i,o=30,r,a=0){let n=null,l=null;if(r){let e=rt(r,t,i,o,a);e&&!1!==e.node.interactive&&(n={node:e.node,datum:e.node.datum,x:e.node.x,y:e.node.y,distance:e.distance})}for(let a of e){let e=null;switch(a.type){case"rect":if(null==a.datum)break;e=sr(a,t,i);break;case"point":if(!1===a.interactive||r)break;e=cr(a,t,i,o);break;case"symbol":e=hr(a,t,i,o);break;case"glyph":e=ur(a,t,i,o);break;case"wedge":if(null===a.datum)break;e=dr(a,t,i);break;case"boxplot":e=gr(a,t,i);break;case"violin":e=mr(a,t,i);break;case"connector":e=pr(a,t,i,o);break;case"trapezoid":e=fr(a,t,i)}e&&(e.node=a,"connector"===a.type?(!l||e.distance<l.distance)&&(l=e):(!n||e.distance<n.distance)&&(n=e))}return n??l??yr(e,t,i)}function sr(e,t,i){let o=at(t,i,e);return o.hit?{datum:e.datum,x:o.cx,y:e.y,distance:0,category:e.group}:null}function cr(e,t,i,o=30){let r=t-e.x,a=i-e.y,n=Math.sqrt(r*r+a*a);return n<=nt(e.r,o)?{datum:e.datum,x:e.x,y:e.y,distance:n}:null}function hr(e,t,i,o=30){let r=t-e.x,a=i-e.y,n=Math.sqrt(r*r+a*a);return n<=nt(co(e.size),o)?{datum:e.datum,x:e.x,y:e.y,distance:n}:null}function ur(e,t,i,o=30){if(null==e.datum)return null;let r=ho(e.glyph,e.size),a=e.x+r.centerDx,n=e.y+r.centerDy,l=t-a,s=i-n,c=Math.sqrt(l*l+s*s);return c<=nt(r.radius,o)?{datum:e.datum,x:a,y:n,distance:c}:null}function dr(e,t,i){let o=t-e.cx,r=i-e.cy,a=Math.sqrt(o*o+r*r);if(a<e.innerRadius||a>e.outerRadius)return null;let n=lt(Math.atan2(r,o)),l=lt(e.startAngle),s=lt(e.endAngle);if(!(l<=s?n>=l&&n<=s:n>=l||n<=s))return null;let c=(e.startAngle+e.endAngle)/2,h=(e.innerRadius+e.outerRadius)/2;return{datum:e.datum,x:e.cx+Math.cos(c)*h,y:e.cy+Math.sin(c)*h,distance:0,category:e.category}}function gr(e,t,i){let o=e.columnWidth/2;if("vertical"===e.projection){let r=e.x-o,a=e.x+o,n=Math.min(e.minPos,e.maxPos),l=Math.max(e.minPos,e.maxPos);if(t>=r&&t<=a&&i>=n&&i<=l)return{datum:e.datum,x:e.x,y:e.medianPos,distance:0,category:e.category,stats:e.stats}}else{let r=e.y-o,a=e.y+o,n=Math.min(e.minPos,e.maxPos),l=Math.max(e.minPos,e.maxPos);if(t>=n&&t<=l&&i>=r&&i<=a)return{datum:e.datum,x:e.medianPos,y:e.y,distance:0,category:e.category,stats:e.stats}}return null}function mr(e,t,i){if(!e.bounds)return null;let{x:o,y:r,width:a,height:n}=e.bounds;return t>=o&&t<=o+a&&i>=r&&i<=r+n?{datum:e.datum,x:o+a/2,y:r+n/2,distance:0,category:e.category,stats:e.stats}:null}function pr(e,t,i,o){let r=e.style.strokeWidth??1;if(r<=0||"none"===e.style.stroke)return null;let a=br(t,i,e.x1,e.y1,e.x2,e.y2);return!a||a.distance>Math.max(o,r/2)?null:{datum:e.datum,x:a.x,y:a.y,distance:a.distance,category:e.group}}function yr(e,t,i){let o=new Map;for(let t of e){if("connector"!==t.type)continue;let e=t.group||"_default",i=o.get(e);i?i.push(t):o.set(e,[t])}for(let e of o.values()){let o=e[0];if(e.length<2||!o.style.fill||"none"===o.style.fill)continue;let r=[[o.x1,o.y1],...e.map(e=>[e.x2,e.y2])];if(!wr(r,t,i))continue;let a=vr(r);return{node:o,datum:o.datum,x:a.x,y:a.y,distance:0,category:o.group}}return null}function fr(e,t,i){if(e.points.length<3)return null;let o=xr(e.points,t,i),r=wr(e.points,t,i),a=e.style.strokeWidth??1,n=!!(e.style.stroke&&"none"!==e.style.stroke&&a>0);if(!r&&(!n||o>a/2))return null;let l=vr(e.points);return{datum:e.datum,x:l.x,y:l.y,distance:r?0:o,category:e.category}}function vr(e){let t=e.reduce((e,t)=>({x:e.x+t[0],y:e.y+t[1]}),{x:0,y:0});return{x:t.x/e.length,y:t.y/e.length}}function br(e,t,i,o,r,a){let n=r-i,l=a-o,s=n*n+l*l;if(0===s)return null;let c=((e-i)*n+(t-o)*l)/s,h=Math.max(0,Math.min(1,c)),u=i+h*n,d=o+h*l;return{x:u,y:d,distance:Math.hypot(e-u,t-d)}}function xr(e,t,i){let o=1/0;for(let r=0;r<e.length;r++){let a=e[r],n=e[(r+1)%e.length],l=br(t,i,a[0],a[1],n[0],n[1]);l&&l.distance<o&&(o=l.distance)}return o}function wr(e,t,i){if(xr(e,t,i)<=16*Number.EPSILON)return!0;let o=!1;for(let r=0,a=e.length-1;r<e.length;a=r++){let[n,l]=e[r],[s,c]=e[a];l>i!=c>i&&t<(s-n)*(i-l)/(c-l)+n&&(o=!o)}return o}function kr(e){let t=e.pointer.clientX-e.canvasRect.left-e.margin.left,i=e.pointer.clientY-e.canvasRect.top-e.margin.top;if(t<0||t>e.width||i<0||i>e.height)return{kind:"outside"};if(0===e.scene.length)return{kind:"miss"};let o="radial"===e.projection,r=lr(e.scene,o?t-e.width/2:t,o?i-e.height/2:i,e.hoverRadius,e.pointQuadtree,e.maxPointRadius);return r?{kind:"hit",hit:r}:{kind:"miss"}}function Ar(e,t){return Wi(e.datum||{},e.x,e.y,{...e.stats&&{stats:e.stats},...e.category&&{category:e.category},__oAccessor:"string"==typeof t.oAccessor?t.oAccessor:void 0,__rAccessor:"string"==typeof t.rAccessor?t.rAccessor:void 0,__chartType:t.chartType})}function Sr(e){let{width:t,height:i,totalWidth:o,totalHeight:r,margin:a,scales:n,showAxes:l,showGrid:s}=e,{rTickValues:c,axisExtent:h}=e,u="radial"===n?.projection,d="horizontal"===n?.projection,g=Ro(()=>n&&!u&&s?(c||Re(n.r,5,h)).map(e=>({value:e,pixel:n.r(e)})):[],[n,u,c,h,s]),m=s&&n&&!u,p=l&&n&&!u;return m||p?Ho("svg",{role:"presentation",width:o,height:r,overflow:"visible",style:{position:"absolute",top:0,left:0,pointerEvents:"none",overflow:"visible"},children:Bo("g",{transform:`translate(${a.left},${a.top})`,children:[m&&Ho("g",{className:"ordinal-grid",children:g.map((e,o)=>Ho("line",{x1:d?e.pixel:0,y1:d?0:e.pixel,x2:d?e.pixel:t,y2:d?i:e.pixel,stroke:"var(--semiotic-grid, #e0e0e0)",strokeWidth:1},`grid-${o}`))}),p&&Ho($o,{children:Bo($o,d?{children:[Ho("line",{x1:0,y1:0,x2:0,y2:i,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),Ho("line",{x1:0,y1:i,x2:t,y2:i,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1})]}:{children:[Ho("line",{x1:0,y1:i,x2:t,y2:i,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),Ho("line",{x1:0,y1:0,x2:0,y2:i,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1})]})})]})}):null}function Pr(e){let{width:t,height:i,totalWidth:o,totalHeight:r,margin:a,scales:n,columns:l,showAxes:s,showCategoryTicks:c,oLabel:h,rLabel:u,oFormat:d,rFormat:g,showGrid:m,title:p,description:y,idPrefix:f,decorative:v=!1,legend:b,legendHoverBehavior:x,legendClickBehavior:w,legendHighlightedCategory:k,legendIsolatedCategories:A,legendPosition:S="right",legendLayout:P,foregroundGraphics:R,annotations:C,onAnnotationActivate:_,onObservation:L,chartId:M,chartType:I,autoPlaceAnnotations:T,svgAnnotationRules:H,annotationFrame:B,xAccessor:$,yAccessor:F,annotationData:O,underlayRendered:D,canvasObscuresUnderlay:E=!0,children:W}=e,N=Tt({onAnnotationActivate:_,onObservation:L,chartId:M,chartType:I}),j="radial"===n?.projection,z="horizontal"===n?.projection,V=!1!==c,G=!D||E,q=Ht({showAxes:s,projection:j?"radial":z?"horizontal":"vertical",hasCategoryLabel:!!h,hasValueLabel:!!u}),X=Bt(P,q.leftAxis),Y=b&&"left"===S&&X>0?X:a.left,Q=Ro(()=>{if(!s||!V||!n||j)return[];let e=n.o.bandwidth(),t=n.o.domain().map((t,i)=>({value:t,pixel:l?.[t]?.middle??(n.o(t)??0)+e/2,label:d?d(t,i):t}));if(t.length<=2)return t;let i=z?0:6,o=-1/0,r=0;return t.filter(e=>{let t=(a=e.label,z?"string"==typeof a||"number"==typeof a?16:24:"string"==typeof a||"number"==typeof a?6.5*String(a).length:60);var a;return!(e.pixel-o<(r+t)/2+i||(o=e.pixel,r=t,0))})},[s,V,n,l,d,j,z]),K=e.rTickValues,Z=e.tickLabelEdgeAlign,J=e.axisExtent,U=Ro(()=>{if(!s&&!m||!n||j)return[];let e=K||Re(n.r,5,J),t=g||$t(e);return e.map(e=>({value:e,pixel:n.r(e),label:t(e)}))},[s,m,n,g,j,K,J]),ee=Co(new Map),te=Co(C?.length??0),ie=C?.length??0;te.current!==ie&&(te.current=ie,ee.current=new Map);let oe=Ro(()=>{if(!C||0===C.length)return null;let e=st(C),o=Ft("ordinal",N),r="horizontal"===n?.projection,a=n?.o?e=>(n.o(e)??0)+n.o.bandwidth()/2:null,l={scales:n?{x:r?n.r:a||n.r,y:r&&a||n.r,time:n.r,value:n.r,o:n.o}:null,timeAxis:"x",xAccessor:$,yAccessor:F,width:t,height:i,data:O,frameType:"ordinal",projection:r?"horizontal":"vertical",stickyPositionCache:ee.current},s=T?Ot({annotations:e,context:l,..."object"==typeof T?T:{}}):e;return Dt(s,o,H,l)},[C,T,H,t,i,n,$,F,O,N]),re=s||p||y||b||R||oe&&oe.length>0||m||W,ae=_o(),{titleId:ne,descId:le,labelledBy:se}=ct(f||M||ae);return re?Bo("svg",{role:v?"presentation":"img","data-semiotic-overlay":"","aria-labelledby":v?void 0:se,width:o,height:r,overflow:"visible",style:{position:"absolute",top:0,left:0,pointerEvents:"none",overflow:"visible"},children:[!v&&Bo($o,{children:[Ho("title",{id:ne,children:ht(p,"Ordinal Chart")}),Ho("desc",{id:le,children:ut(p,y,{familyPhrase:"ordinal data visualization",fallback:"Ordinal data visualization"})})]}),Bo("g",{transform:`translate(${a.left},${a.top})`,children:[m&&n&&!j&&G&&Ho("g",{className:"ordinal-grid",children:U.map((e,o)=>Ho("line",{x1:z?e.pixel:0,y1:z?0:e.pixel,x2:z?e.pixel:t,y2:z?i:e.pixel,stroke:"var(--semiotic-grid, #e0e0e0)",strokeWidth:1},`grid-${o}`))}),s&&n&&!j&&(()=>{let e={fontSize:"var(--semiotic-tick-font-size, 12px)"},o={fontSize:"var(--semiotic-axis-label-font-size, 12px)"};return Ho("g",{className:"ordinal-axes",children:Bo($o,z?{children:[Bo("g",{className:"semiotic-axis semiotic-axis-left","data-orient":"left",children:[G&&Ho("line",{x1:0,y1:0,x2:0,y2:i,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),Q.map((t,i)=>Bo("g",{transform:`translate(0,${t.pixel})`,children:[Ho("line",{x2:-5,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),"string"==typeof t.label||"number"==typeof t.label?Ho("text",{x:-8,textAnchor:"end",dominantBaseline:"middle",fill:"var(--semiotic-text-secondary, #666)",fontSize:12,className:"semiotic-axis-tick",style:{userSelect:"none",...e},children:t.label}):Ho("foreignObject",{x:-68,y:-12,width:60,height:24,style:{overflow:"visible"},children:Ho("div",{style:{textAlign:"right",userSelect:"none",...e},children:t.label})})]},`cat-${i}`)),h&&Ho("text",{x:15-Y,y:i/2,textAnchor:"middle",fill:"var(--semiotic-text, #333)",transform:`rotate(-90, ${15-Y}, ${i/2})`,fontSize:12,className:"semiotic-axis-label",style:{userSelect:"none",...o},children:h})]}),Bo("g",{className:"semiotic-axis semiotic-axis-bottom","data-orient":"bottom",children:[G&&Ho("line",{x1:0,y1:i,x2:t,y2:i,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),G&&n?.r&&(()=>{let e=n.r(0);return e>1&&e<t-1?Ho("line",{x1:e,y1:0,x2:e,y2:i,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1,strokeDasharray:"4,4"}):null})(),U.map((t,o)=>{let r=Z?0===o?"start":o===U.length-1?"end":"middle":"middle";return Bo("g",{transform:`translate(${t.pixel},${i})`,children:[Ho("line",{y2:5,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),Ho("text",{y:18,textAnchor:r,fill:"var(--semiotic-text-secondary, #666)",fontSize:12,className:"semiotic-axis-tick",style:{userSelect:"none",...e},children:t.label})]},`val-${o}`)}),u&&Ho("text",{x:t/2,y:i+40,textAnchor:"middle",fill:"var(--semiotic-text, #333)",fontSize:12,className:"semiotic-axis-label",style:{userSelect:"none",...o},children:u})]})]}:{children:[Bo("g",{className:"semiotic-axis semiotic-axis-bottom","data-orient":"bottom",children:[G&&(()=>{let e=n?.r?n.r(0):i,o=e>=0&&e<=i?e:i;return Ho("line",{x1:0,y1:o,x2:t,y2:o,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1})})(),Q.map((t,o)=>Bo("g",{transform:`translate(${t.pixel},${i})`,children:[Ho("line",{y2:5,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),"string"==typeof t.label||"number"==typeof t.label?Ho("text",{y:18,textAnchor:"middle",fill:"var(--semiotic-text-secondary, #666)",fontSize:12,className:"semiotic-axis-tick",style:{userSelect:"none",...e},children:t.label}):Ho("foreignObject",{x:-30,y:6,width:60,height:24,style:{overflow:"visible"},children:Ho("div",{style:{textAlign:"center",userSelect:"none",...e},children:t.label})})]},`cat-${o}`)),h&&Ho("text",{x:t/2,y:i+40,textAnchor:"middle",fill:"var(--semiotic-text, #333)",fontSize:12,className:"semiotic-axis-label",style:{userSelect:"none",...o},children:h})]}),Bo("g",{className:"semiotic-axis semiotic-axis-left","data-orient":"left",children:[G&&Ho("line",{x1:0,y1:0,x2:0,y2:i,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),U.map((t,i)=>Bo("g",{transform:`translate(0,${t.pixel})`,children:[Ho("line",{x2:-5,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),Ho("text",{x:-8,textAnchor:"end",dominantBaseline:"middle",fill:"var(--semiotic-text-secondary, #666)",fontSize:12,className:"semiotic-axis-tick",style:{userSelect:"none",...e},children:t.label})]},`val-${i}`)),u&&Ho("text",{x:15-Y,y:i/2,textAnchor:"middle",fill:"var(--semiotic-text, #333)",transform:`rotate(-90, ${15-Y}, ${i/2})`,fontSize:12,className:"semiotic-axis-label",style:{userSelect:"none",...o},children:u})]})]})})})(),oe,R,W]}),Ho(Et,{title:p,totalWidth:o,marginTop:a.top}),Wt({legend:b,totalWidth:o,totalHeight:r,margin:a,legendPosition:S,title:p,legendLayout:P,axisChrome:q,legendHoverBehavior:x,legendClickBehavior:w,legendHighlightedCategory:k,legendIsolatedCategories:A})]}):null}function Rr(e){let[t,i]=Ao.useState(()=>v);return Ao.useEffect(()=>{if(t)return;let e=!1;return(v?Promise.resolve(v):(b||(b=import("./c-TBVLI5DM.min.js").then(e=>v=e.OrdinalBrushOverlay).catch(e=>{throw b=null,e})),b)).then(t=>{e||i(()=>t)}),()=>{e=!0}},[t]),t?Ho(t,{...e}):null}function Cr(e){let{innerRadius:t,outerRadius:i,startAngle:o,endAngle:r}=e,a=t<=0;if(!((e.cornerRadius??0)>0&&(e.roundStart||e.roundEnd))){if(a){let e=x(i,o),t=x(i,r),a=r-o>Math.PI?1:0;return`M0,0 L${e.x},${e.y} A${i},${i} 0 ${a} 1 ${t.x},${t.y} Z`}let e=x(i,o),n=x(i,r),l=x(t,r),s=x(t,o),c=r-o>Math.PI?1:0;return`M${e.x},${e.y} A${i},${i} 0 ${c} 1 ${n.x},${n.y} L${l.x},${l.y} A${t},${t} 0 ${c} 0 ${s.x},${s.y} Z`}let n=i-t,l=Math.max(0,Math.min(e.cornerRadius??0,n/2));if(0===l)return Cr({...e,cornerRadius:0,roundStart:!1,roundEnd:!1});let s=Math.asin(Math.min(1,l/Math.max(1e-9,i-l))),c=a?0:Math.asin(Math.min(1,l/Math.max(1e-9,t+l))),h=r-o,u=e.roundStart&&e.roundEnd?h/2:h,d=!!e.roundStart&&s<u,g=!!e.roundEnd&&s<u;if(!d&&!g)return Cr({...e,cornerRadius:0,roundStart:!1,roundEnd:!1});let m=o+(d?s:0),p=r-(g?s:0),y=o+(d?c:0),f=r-(g?c:0),v=x(i,m),b=x(i,p),w=(i-l)*Math.cos(s),k=x(w,o),A=x(w,r),S=a?null:x(t,f),P=a?null:x(t,y),R=a?0:(t+l)*Math.cos(c),C=a?null:x(R,o),_=a?null:x(R,r),L=p-m>Math.PI?1:0,M=a?0:f-y>Math.PI?1:0,I="";if(d)I+=`M${k.x},${k.y}`,I+=` A${l},${l} 0 0 1 ${v.x},${v.y}`;else{let e=x(i,o);I+=`M${e.x},${e.y}`}if(g)I+=` A${i},${i} 0 ${L} 1 ${b.x},${b.y}`,I+=` A${l},${l} 0 0 1 ${A.x},${A.y}`;else{let e=x(i,r);I+=` A${i},${i} 0 ${L} 1 ${e.x},${e.y}`}if(a)I+=" L0,0";else{if(g)I+=` L${_.x},${_.y}`,I+=` A${l},${l} 0 0 1 ${S.x},${S.y}`;else{let e=x(t,r);I+=` L${e.x},${e.y}`}if(d)I+=` A${t},${t} 0 ${M} 0 ${P.x},${P.y}`,I+=` A${l},${l} 0 0 1 ${C.x},${C.y}`;else{let e=x(t,o);I+=` A${t},${t} 0 ${M} 0 ${e.x},${e.y}`}}return I+=" Z",I}function _r(e){let t=Cr({innerRadius:e.innerRadius,outerRadius:e.outerRadius,startAngle:e.startAngle,endAngle:e.endAngle,cornerRadius:e.cornerRadius,roundStart:e.roundStart,roundEnd:e.roundEnd}),i=[],o=e.colors;if(o.length>0){let t=(e.endAngle-e.startAngle)/o.length;for(let r=0;r<o.length;r++){let a=e.startAngle+r*t;i.push({d:Cr({innerRadius:e.innerRadius,outerRadius:e.outerRadius,startAngle:a,endAngle:e.endAngle}),color:o[r]})}}return{clipPath:t,slices:i}}function Lr(e,t){let i=t._gradientBand.colors;if(0===i.length)return;let{clipPath:o,slices:r}=_r({innerRadius:t.innerRadius,outerRadius:t.outerRadius,startAngle:t.startAngle,endAngle:t.endAngle,cornerRadius:t.cornerRadius,roundStart:t.roundedEnds?.start??!0,roundEnd:t.roundedEnds?.end??!0,colors:i}),a=new Path2D(o);e.save(),e.translate(t.cx,t.cy),e.clip(a);for(let t of r)e.fillStyle=Ui(e,t.color)||t.color||"#007bff",e.fill(new Path2D(t.d));e.restore();let n=t.style.strokeWidth??1;t.style.stroke&&"none"!==t.style.stroke&&n>0&&(e.save(),e.translate(t.cx,t.cy),e.strokeStyle=Ui(e,t.style.stroke)||t.style.stroke,e.lineWidth=n,e.stroke(a),e.restore())}function Mr(e,t){e.beginPath(),t.innerRadius>0?(e.arc(t.cx,t.cy,t.outerRadius,t.startAngle,t.endAngle),e.arc(t.cx,t.cy,t.innerRadius,t.endAngle,t.startAngle,!0)):(e.moveTo(t.cx,t.cy),e.arc(t.cx,t.cy,t.outerRadius,t.startAngle,t.endAngle)),e.closePath()}function Ir(e,t){let i={innerRadius:t.innerRadius,outerRadius:t.outerRadius,startAngle:t.startAngle+Math.PI/2,endAngle:t.endAngle+Math.PI/2},o=Wo().cornerRadius(t.cornerRadius)(i);if(!o)return;e.save(),e.translate(t.cx,t.cy);let r=new Path2D(o);e.fill(r);let a=t.style.strokeWidth??1;t.style.stroke&&"none"!==t.style.stroke&&a>0&&(e.lineWidth=a,e.stroke(r)),e.restore()}function Tr(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e4?`${(e/1e3).toFixed(0)}K`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}function Hr(e){return Math.abs(e-Math.round(e))<.05?`${Math.round(e)}%`:`${e.toFixed(1)}%`}function Br(e,t){let i=`${e}@${typeof window<"u"&&window.devicePixelRatio||1}`,o=L.get(i);if(void 0!==o)return o;let r=io({..._,background:e},t),a=oo(r)?null:r;return L.set(i,a),a}function $r(e,t,i,o,r,a){e.moveTo(t+a,i),e.lineTo(t+o-a,i),e.quadraticCurveTo(t+o,i,t+o,i+a),e.lineTo(t+o,i+r-a),e.quadraticCurveTo(t+o,i+r,t+o-a,i+r),e.lineTo(t+a,i+r),e.quadraticCurveTo(t,i+r,t,i+r-a),e.lineTo(t,i+a),e.quadraticCurveTo(t,i,t+a,i),e.closePath()}function Fr(e,t){let[i,o,r]=ro(e,t);return(.2126*i+.7152*o+.0722*r)/255>.6}function Or(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e4?`${(e/1e3).toFixed(0)}K`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(Math.round(e))}function Dr(e){return Math.abs(e-Math.round(e))<.05?`${Math.round(e)}%`:`${e.toFixed(1)}%`}function Er(e){return"rect"===e.type||"point"===e.type||"symbol"===e.type||"glyph"===e.type}function Wr(e){return(t,i,o,r)=>{e(t,i.filter(Er),{x:o.r,y:o.r},r)}}function Nr(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e4?`${(e/1e3).toFixed(0)}K`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}function jr(e,t){let i=e.datum;if(!i)return null;let o=[],r=i.__funnelStepLabel,a=Number(i.__funnelStepLabelX),n=Number(i.__funnelStepLabelY),l=Number(i.__funnelRowWidth);"string"==typeof r&&Number.isFinite(a)&&Number.isFinite(n)&&(!Number.isFinite(l)||8.4*r.length+16<=l)&&o.push(Ho("text",{x:a,y:n+3,textAnchor:"middle",dominantBaseline:"hanging",fontSize:14,fontWeight:"bold",fill:"#fff",fontFamily:"var(--semiotic-font-family, sans-serif)",stroke:"rgba(0,0,0,0.6)",strokeWidth:3,paintOrder:"stroke",children:r},`${t}-funnel-step`));let s=Number(i.__funnelValue),c=Number(i.__funnelValueLabelX),h=Number(i.__funnelValueLabelY),u=Number(i.__funnelBarW);if(Number.isFinite(s)&&0!==s&&Number.isFinite(c)&&Number.isFinite(h)&&u>=60){let e=Number(i.__funnelPercent),r=!0!==i.__funnelIsFirstStep&&Number.isFinite(e)?`${Nr(s)} (${Math.abs(e-Math.round(e))<.05?Math.round(e):e.toFixed(1)}%)`:Nr(s);7.8*r.length+16>u&&(r=Nr(s)),7.8*r.length+16<=u&&o.push(Ho("text",{x:c,y:h+22,textAnchor:"middle",dominantBaseline:"hanging",fontSize:13,fontWeight:"bold",fill:"#fff",fontFamily:"var(--semiotic-font-family, sans-serif)",stroke:"rgba(0,0,0,0.5)",strokeWidth:3,paintOrder:"stroke",children:r},`${t}-funnel-value`))}return o.length?Ho("g",{children:o},`${t}-funnel-labels`):null}function zr(e,t,i){return zt(Vr(e,t,i),e,`ordinal-cursor-${t}`)}function Vr(e,t,i){let o=("category"in e?e.category:void 0)||("group"in e?e.group:void 0)||"",r=i=>`ord-${e.type}-${o}-${t}-${i}`,a=`ord-${e.type}-${o}-${t}`;switch(e.type){case"rect":{let t,i,o=e,r=`${Gt(a)}-grad`,n=Qt(o,r);if(n)i=`url(#${r})`;else if(oo(o.style.fill)){let e=`${Gt(a)}-hatch`;t=ao(o.style.fill,e),i=`url(#${e})`}else i=Vt(o.style.fill);let l=n||t?Bo("defs",{children:[n,t]}):null;if(o.cornerRadii&&no(o.cornerRadii)){let e=Kt(o);return Bo(Ao.Fragment,{children:[l,Ho("path",{d:e,fill:i,opacity:o.style.opacity,stroke:o.style.stroke,strokeWidth:o.style.strokeWidth})]},a)}if(o.roundedTop&&o.roundedTop>0){let e,t=Math.min(o.roundedTop,o.w/2,o.h/2),{x:r,y:n,w:s,h:c}=o;switch(o.roundedEdge){case"right":e=`M${r},${n} L${r+s-t},${n} A${t},${t} 0 0 1 ${r+s},${n+t} L${r+s},${n+c-t} A${t},${t} 0 0 1 ${r+s-t},${n+c} L${r},${n+c} Z`;break;case"left":e=`M${r+s},${n} L${r+t},${n} A${t},${t} 0 0 0 ${r},${n+t} L${r},${n+c-t} A${t},${t} 0 0 0 ${r+t},${n+c} L${r+s},${n+c} Z`;break;case"bottom":e=`M${r},${n} L${r+s},${n} L${r+s},${n+c-t} A${t},${t} 0 0 1 ${r+s-t},${n+c} L${r+t},${n+c} A${t},${t} 0 0 1 ${r},${n+c-t} Z`;break;default:e=`M${r},${n+c} L${r},${n+t} A${t},${t} 0 0 1 ${r+t},${n} L${r+s-t},${n} A${t},${t} 0 0 1 ${r+s},${n+t} L${r+s},${n+c} Z`}return Bo(Ao.Fragment,{children:[l,Ho("path",{d:e,fill:i,opacity:o.style.opacity,stroke:o.style.stroke,strokeWidth:o.style.strokeWidth})]},a)}return Bo(Ao.Fragment,{children:[l,Ho("rect",{x:o.x,y:o.y,width:o.w,height:o.h,fill:i,opacity:o.style.opacity,stroke:o.style.stroke,strokeWidth:o.style.strokeWidth}),jr(o,a)]},a)}case"point":{let t=e;return Ho("circle",{cx:t.x,cy:t.y,r:t.r,fill:Vt(t.style.fill),opacity:t.style.opacity??t.style.fillOpacity??.8,stroke:t.style.stroke,strokeWidth:t.style.strokeWidth},a)}case"symbol":return Yt(e,t,i);case"glyph":{let o=e;return Xt(o,o.x,o.y,`${i??""}ord-glyph-${o.pointId??t}`)}case"wedge":{let o,r=e;if(r._gradientBand&&r._gradientBand.colors.length>0){let e=Gt(`${i?`${i}-`:""}gauge-grad-${r.category||a}-${t}`),{clipPath:o,slices:n}=_r({innerRadius:r.innerRadius,outerRadius:r.outerRadius,startAngle:r.startAngle,endAngle:r.endAngle,cornerRadius:r.cornerRadius,roundStart:r.roundedEnds?.start??!0,roundEnd:r.roundedEnds?.end??!0,colors:r._gradientBand.colors});return Bo("g",{transform:`translate(${r.cx},${r.cy})`,opacity:r.style.opacity,fillOpacity:r.style.fillOpacity,children:[Ho("defs",{children:Ho("clipPath",{id:e,children:Ho("path",{d:o})})}),Ho("g",{clipPath:`url(#${e})`,children:n.map((e,t)=>Ho("path",{d:e.d,fill:Vt(e.color)},t))}),r.style.stroke&&"none"!==r.style.stroke&&Ho("path",{d:o,fill:"none",stroke:r.style.stroke,strokeWidth:r.style.strokeWidth})]},a)}if(r.roundedEnds)o=Cr({innerRadius:r.innerRadius,outerRadius:r.outerRadius,startAngle:r.startAngle,endAngle:r.endAngle,cornerRadius:r.cornerRadius,roundStart:r.roundedEnds.start,roundEnd:r.roundedEnds.end});else{let e=Wo().innerRadius(r.innerRadius).outerRadius(r.outerRadius).startAngle(r.startAngle+Math.PI/2).endAngle(r.endAngle+Math.PI/2);r.cornerRadius&&e.cornerRadius(r.cornerRadius),o=e(qt)||""}return Ho("path",{d:o,transform:`translate(${r.cx},${r.cy})`,fill:Vt(r.style.fill),stroke:r.style.stroke,strokeWidth:r.style.strokeWidth,opacity:r.style.opacity},a)}case"boxplot":{let t=e,i=t.columnWidth/2,o=t.style.strokeWidth??1;return"vertical"===t.projection?Bo("g",{children:[Ho("line",{x1:t.x,y1:t.minPos,x2:t.x,y2:t.maxPos,stroke:t.style.stroke||"#333",strokeWidth:o}),Ho("rect",{x:t.x-i,y:Math.min(t.q1Pos,t.q3Pos),width:t.columnWidth,height:Math.abs(t.q3Pos-t.q1Pos),fill:Vt(t.style.fill),fillOpacity:t.style.fillOpacity??.6,stroke:t.style.stroke||"#333",strokeWidth:o}),Ho("line",{x1:t.x-i,y1:t.medianPos,x2:t.x+i,y2:t.medianPos,stroke:t.style.stroke||"#333",strokeWidth:2*o}),Ho("line",{x1:t.x-.5*i,y1:t.minPos,x2:t.x+.5*i,y2:t.minPos,stroke:t.style.stroke||"#333",strokeWidth:o}),Ho("line",{x1:t.x-.5*i,y1:t.maxPos,x2:t.x+.5*i,y2:t.maxPos,stroke:t.style.stroke||"#333",strokeWidth:o})]},a):Bo("g",{children:[Ho("line",{x1:t.minPos,y1:t.y,x2:t.maxPos,y2:t.y,stroke:t.style.stroke||"#333",strokeWidth:o}),Ho("rect",{x:Math.min(t.q1Pos,t.q3Pos),y:t.y-i,width:Math.abs(t.q3Pos-t.q1Pos),height:t.columnWidth,fill:Vt(t.style.fill),fillOpacity:t.style.fillOpacity??.6,stroke:t.style.stroke||"#333",strokeWidth:o}),Ho("line",{x1:t.medianPos,y1:t.y-i,x2:t.medianPos,y2:t.y+i,stroke:t.style.stroke||"#333",strokeWidth:2*o}),Ho("line",{x1:t.minPos,y1:t.y-.5*i,x2:t.minPos,y2:t.y+.5*i,stroke:t.style.stroke||"#333",strokeWidth:o}),Ho("line",{x1:t.maxPos,y1:t.y-.5*i,x2:t.maxPos,y2:t.y+.5*i,stroke:t.style.stroke||"#333",strokeWidth:o})]},a)}case"violin":{let t=e,i=[Ho("path",{d:t.pathString,transform:t.translateX||t.translateY?`translate(${t.translateX},${t.translateY})`:void 0,fill:Vt(t.style.fill),fillOpacity:t.style.fillOpacity??t.style.opacity??.6,stroke:t.style.stroke||"#333",strokeWidth:t.style.strokeWidth??1},r("path"))];if(t.iqrLine&&t.bounds){let e=t.bounds,o=e.x+e.width/2,a=e.y+e.height/2;t.iqrLine.isVertical?i.push(Ho("line",{x1:o,y1:t.iqrLine.q1Pos,x2:o,y2:t.iqrLine.q3Pos,stroke:t.style.stroke||"#333",strokeWidth:2},r("iqr")),Ho("circle",{cx:o,cy:t.iqrLine.medianPos,r:3,fill:"white",stroke:t.style.stroke||"#333",strokeWidth:1},r("med"))):i.push(Ho("line",{x1:t.iqrLine.q1Pos,y1:a,x2:t.iqrLine.q3Pos,y2:a,stroke:t.style.stroke||"#333",strokeWidth:2},r("iqr")),Ho("circle",{cx:t.iqrLine.medianPos,cy:a,r:3,fill:"white",stroke:t.style.stroke||"#333",strokeWidth:1},r("med")))}return Ho("g",{children:i},a)}case"connector":{let t=e,i=t.style.fill&&"none"!==t.style.fill?Vt(t.style.fill,"var(--semiotic-border, #999)"):"var(--semiotic-border, #999)";return Ho("line",{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,stroke:t.style.stroke||i,strokeWidth:t.style.strokeWidth??1,opacity:t.style.opacity??.5},a)}case"trapezoid":{let t=e,i=t.points.map(e=>`${e[0]},${e[1]}`).join(" ");return Ho("polygon",{points:i,fill:Vt(t.style.fill,"#999"),opacity:t.style.opacity,stroke:t.style.stroke,strokeWidth:t.style.strokeWidth},a)}default:return null}}function Gr(e){return"connector"===e.node.type}function qr(e,t,i,o){if(e.length<2)return null;let r=e[0].node,a=r.style.fill;if(!a||"none"===a)return null;let n=Gt(`${t?`${t}-`:""}connector-${i}-${o}-hatch`),l=oo(a)?ao(a,n):null,s=[`${r.x1},${r.y1}`,...e.map(({node:e})=>`${e.x2},${e.y2}`)].join(" "),c=Bo(Ao.Fragment,{children:[l&&Ho("defs",{children:l}),Ho("polygon",{points:s,fill:l?`url(#${n})`:Vt(a,"#999"),opacity:r.style.fillOpacity??r.style.opacity??.3,"data-semiotic-connector-fill":r.group||"_default"})]});return zt(c,r,`ordinal-connector-fill-${i}-${o}`)}function Xr(e,t,i){let o=new Map;for(let t of e){if(!Gr(t))continue;let e=t.node.group||"_default",i=o.get(e);i?i.push(t):o.set(e,[t])}if(0===o.size)return;let r=Array.from(o.values()).map((e,o)=>Bo("g",{children:[qr(e,t,i,o),e.map(e=>e.element)]},`ordinal-connectors-${i}-${o}`)),a=e[0],n=Gr(a)?null:a.element;for(let e of o.values())for(let t of e)t.element=null;a.element=Bo(Ao.Fragment,{children:[r,n]},`ordinal-connector-run-${i}`)}function Yr(e){let t=dt({nodes:e.nodes,renderMode:e.renderMode,fallback:(t,i)=>zr(t,i,e.idPrefix)}),i=0;for(let o=0;o<t.length;){if(t[o].renderedByBackend){o++;continue}let r=o+1;for(;r<t.length&&!t[r].renderedByBackend;)r++;Xr(t.slice(o,r),e.idPrefix,i++),o=r}return t}function Qr(e){return t=>{let i=t.category||t.data&&t.data[0]?.category||"",o=t.stats||(t.data||t).stats;if(o&&null!=o.median)return Bo("div",{className:"semiotic-tooltip",style:uo,children:[i&&Ho("div",{style:{fontWeight:"bold"},children:String(i)}),null!=o.n&&Bo("div",{children:["n = ",o.n]}),null!=o.min&&Bo("div",{children:["Min: ",o.min.toLocaleString()]}),null!=o.q1&&Bo("div",{children:["Q1: ",o.q1.toLocaleString()]}),Bo("div",{children:["Median: ",o.median.toLocaleString()]}),null!=o.q3&&Bo("div",{children:["Q3: ",o.q3.toLocaleString()]}),null!=o.max&&Bo("div",{children:["Max: ",o.max.toLocaleString()]}),null!=o.mean&&Bo("div",{style:{opacity:.8},children:["Mean: ",o.mean.toLocaleString(void 0,{maximumFractionDigits:2})]})]});if(e?.valueAccessor){let o=Array.isArray(t.data)?t.data:[],r=e.valueAccessor,a=o.map(e=>Number("function"==typeof r?r(e):e[r])).filter(e=>Number.isFinite(e)).sort((e,t)=>e-t),n=a.length,l=n>0?n%2!=0?a[Math.floor(n/2)]:(a[n/2-1]+a[n/2])/2:null;return Bo("div",{className:"semiotic-tooltip",style:uo,children:[i&&Ho("div",{style:{fontWeight:"bold"},children:String(i)}),n>0&&Bo("div",{children:["n = ",n]}),null!=l&&Bo("div",{children:["Median: ",l.toLocaleString()]})]})}return Ho("div",{className:"semiotic-tooltip",style:uo,children:Ho("div",{style:{fontWeight:"bold"},children:String(i)})})}}function Kr(e){let t=Zt(e,{skipPositional:!1});return null==t.title&&0===t.entries.length?null:Bo("div",{className:"semiotic-tooltip",style:uo,children:[null!=t.title&&Ho("div",{style:{fontWeight:"bold"},children:String(t.title)}),t.entries.map(e=>Bo("div",{children:[Bo("span",{style:{opacity:.7},children:[e.key,":"]})," ","number"==typeof e.value?e.value.toLocaleString():String(e.value)]},e.key))]})}function Zr({ref:e,frameRef:t,setup:i}){return Po(e,()=>({push:e=>t.current?.push(e),pushMany:e=>t.current?.pushMany(e),remove:e=>t.current?.remove(e)??[],update:(e,i)=>t.current?.update(e,i)??[],replace:e=>t.current?.replace(e),clear:()=>t.current?.clear(),getData:()=>t.current?.getData()??[],getScales:()=>t.current?.getScales()??null}),[t]),{effectiveLegendProps:i.legendBehaviorProps,effectiveMargin:i.margin}}function Jr(e){let{colorBy:t,colorScale:i,color:o,themeCategorical:r,colorScheme:a,categoryIndexMap:n,userPieceStyle:l,stroke:s,strokeWidth:c,opacity:h,effectiveSelectionHook:u,resolvedSelection:d,cycleByCategory:g=!1,baseStyleExtras:m,linkStrokeToFill:p=!1,styleRules:y,resolveRuleValue:f}=e,v=Ro(()=>(e,l)=>{let s="function"==typeof m?m(e,l):m,c=s?{...s}:{};if(void 0===c.fill)if(t){if(!i)return c;c.fill=zi(e,t,i)}else c.fill=Vi(o,r,a,g?l:void 0,n);if(y&&y.length>0){let t=ki(e,y,{value:f?f(e,l):void 0,category:l});Object.assign(c,t)}return p&&void 0===c.stroke&&void 0!==c.fill&&(c.stroke=c.fill),c},[t,i,o,r,a,n,g,m,p,y,f]),b=Ro(()=>kt(l?"function"==typeof l?(e,t)=>({...v(e,t),...l(e,t)||{}}):(e,t)=>({...v(e,t),...l}):v,{stroke:s,strokeWidth:c,opacity:h}),[v,l,s,c,h]);return Ro(()=>Di(b,u??null,d),[b,u,d])}function Ur({brushProp:e,onBrushProp:t,linkedBrush:i,valueAccessor:o}){let r=Ro(()=>{let e="string"==typeof i?i:i?{name:i.name,xField:i.rField}:void 0;return Ei(e)},[i]),a="string"==typeof o?o:"value",n=Ai({name:r?.name||"__unused_ordinal_brush__",xField:r?.xField||a}),l=Co(n.brushInteraction);l.current=n.brushInteraction;let s=So(e=>{if(r){let t=l.current;e?t.end(e.r):t.end(null)}t?.(e)},[t,r]),c=!!(e||i||t);return{hasBrush:c,handleBrush:s,brushStreamProps:c?{brush:{dimension:"r"},onBrush:s}:{}}}function ea(e,t){if("function"==typeof e)return e;let i=e||t;return e=>e[i]}function ta(e,t){if(e<=0)return[];if(t&&Object.prototype.hasOwnProperty.call(V,t)){let i=V[t];if(1===e)return[i(.5)];let o=[];for(let t=0;t<e;t++)o.push(i(t/(e-1)));return o}let i=["#da1e28","#ff8389","#ffb3b8"],o=["#a6c8ff","#4589ff","#0043ce"],r="#a8a8a8";if(1===e)return[r];let a=e%2!=0,n=Math.floor(e/2),l=[];for(let e=0;e<n;e++)l.push(i[Math.min(Math.floor(e*i.length/n),i.length-1)]);a&&l.push(r);for(let e=0;e<n;e++)l.push(o[Math.min(Math.floor(e*o.length/n),o.length-1)]);return l}function ia(e,t,i,o,r,a,n={}){let l=new Map,s=new Set(t);for(let n of e){let e=i(n);l.has(e)||l.set(e,new Map);let c=l.get(e);if(o){let e=o(n);if(null==e||!Number.isFinite(e))continue;if(!Number.isInteger(e)){"production"!==process.env.NODE_ENV&&console.warn("[LikertChart] Ignoring non-integer Likert score:",e);continue}let i=e-1;if(i<0||i>=t.length)continue;let r=t[i];c.set(r,(c.get(r)||0)+1)}else if(r&&a){let e=r(n),t=a(n);if(!s.has(e))continue;c.set(e,(c.get(e)||0)+(Number.isFinite(t)?t:0))}}let c=[];for(let[e,i]of l){let o=0;for(let e of t)o+=i.get(e)||0;if(0!==o)for(let r=0;r<t.length;r++){let a=t[r],l=i.get(a)||0,s={};n.category&&(s[n.category]=e),n.level&&(s[n.level]=a),n.count&&(s[n.count]=l),n.score&&(s[n.score]=r+1),c.push({...s,__likertCategory:e,__likertLevel:a,__likertLevelLabel:a,__likertCount:l,__likertPct:l/o*100,__likertLevelIndex:r})}}return c}function oa(e,t){let i=t.length,o=i%2!=0,r=Math.floor(i/2),a=[];for(let t of e){let e=t.__likertLevelIndex;if(o&&e===r){let e=t.__likertPct/2;a.push({...t,__likertLevel:G,__likertPct:-e}),a.push({...t,__likertLevel:q,__likertPct:e})}else e<r?a.push({...t,__likertPct:-t.__likertPct}):a.push(t)}return a}function ra(e,t){let i=t.length,o=i%2!=0,r=Math.floor(i/2),a=new Map;for(let t of e){let e=a.get(t.__likertCategory)||[];e.push(t),a.set(t.__likertCategory,e)}let n=[];for(let[,e]of a){let t,a,l=new Map;for(let i of e)i.__likertLevel===G?t=i:i.__likertLevel===q?a=i:l.set(i.__likertLevelIndex,i);o&&t&&n.push(t);for(let e=r-1;e>=0;e--){let t=l.get(e);t&&n.push(t)}o&&a&&n.push(a);for(let e=o?r+1:r;e<i;e++){let t=l.get(e);t&&n.push(t)}}return n}function aa({data:e,levels:t,categoryAccessor:i,valueAccessor:o,levelAccessor:r,countAccessor:a,isDiverging:n,frameRef:l}){let s=!r,c=Ro(()=>ea(i,"question"),[i]),h=Ro(()=>s?ea(o,"score"):null,[s,o]),u=Ro(()=>s?null:ea(r,"level"),[s,r]),d=Ro(()=>s?null:ea(a,"count"),[s,a]),g=Co([]),m=Ro(()=>({category:"string"==typeof i?i:void 0,level:"string"==typeof r?r:void 0,count:"string"==typeof a?a:void 0,score:r||"string"!=typeof o?void 0:o}),[i,a,r,o]);return{processedData:Ro(()=>{let i=e||[];if(0===i.length)return[];let o=ia(i,t,c,h,u,d,m);return n&&(o=oa(o,t),o=ra(o,t)),o},[e,t,c,h,u,d,m,n]),reAggregate:So(e=>{let i=ia(e,t,c,h,u,d,m);n&&(i=oa(i,t),i=ra(i,t)),l.current?.replace(i)},[t,c,h,u,d,m,n,l]),accumulatorRef:g}}function na(e){let t=e.__likertPct??e.data?.__likertPct;return"number"==typeof t&&Number.isFinite(t)?t:void 0}function la(e,t,i){let o=Math.max(16,.3*t);if(null==i||i<=0)return o;let r=Hi(e,o),a=2*i*se;return r<=a?o:o*a/r}function sa({value:e,min:t,max:i,radius:o,innerRadius:r,showScaleLabels:a,label:n}){let l=la(e,o,r),s=.7*l+11;return Bo("g",{textAnchor:"middle",children:[Ho("text",{y:0,dominantBaseline:"central",fontSize:l,fontWeight:700,fill:"var(--semiotic-text, #333)",children:e}),a&&Bo("text",{y:s,fontSize:11,fill:"var(--semiotic-text-secondary, #666)",children:[t," – ",i]}),null!=n&&""!==n&&Ho("text",{y:s+(a?14:0),fontSize:11,fill:"var(--semiotic-text-secondary, #666)",children:n})]})}function ca({centerContent:e,centerLabel:t,value:i,min:o,max:r,radius:a,innerRadius:n,showScaleLabels:l,valueFormat:s,compact:c}){if(null!=e){let l="function"==typeof e?e(i,o,r):e;return"string"==typeof l||"number"==typeof l?sa({value:String(l),min:o,max:r,radius:a,innerRadius:n,showScaleLabels:!1,label:t}):l}return c?null:sa({value:s?s(i):String(Math.round(i)),min:o,max:r,radius:a,innerRadius:n,showScaleLabels:l,label:t})}function ha(e=240){let t=e*Math.PI/180,i=360-e,o=180+i/2,r=o*Math.PI/180;return{sweepRad:t,gapDeg:i,startAngleDeg:o,startAngleRad:r,offsetRad:-Math.PI/2+r}}function ua(e=240){let{sweepRad:t,offsetRad:i}=ha(e),o=[[Math.cos(i),Math.sin(i)],[Math.cos(i+t),Math.sin(i+t)],[0,0]];for(let e=0;e<2*Math.PI;e+=Math.PI/2)((e-i)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)<=t+.001&&o.push([Math.cos(e),Math.sin(e)]);let r=o.map(e=>e[0]),a=o.map(e=>e[1]),[n,l]=ko(r),[s,c]=ko(a);return{minX:n,maxX:l,minY:s,maxY:c,width:l-n,height:c-s,cx:(n+l)/2,cy:(s+c)/2}}function da(e){return Math.max(0,Math.min(1,e))}function ga(e){let t=e.trim();if(t.startsWith("#")){let e=t.slice(1);if(3===e.length&&(e=e.split("").map(e=>e+e).join("")),6===e.length&&/^[0-9a-f]{6}$/i.test(e))return[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]}let i=e.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i);if(i){let e=[Number(i[1]),Number(i[2]),Number(i[3])];if(e.every(Number.isFinite))return e}return null}function ma(e,t,i){let o=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,"0");return`#${o(e)}${o(t)}${o(i)}`}function pa(e,t,i){let o=e.filter(e=>Number.isFinite(e.offset)).map(e=>({offset:da(e.offset),color:e.color??i,opacity:null==e.opacity?1:da(e.opacity)})).sort((e,t)=>e.offset-t.offset);if(0===o.length)return"#999999";let r=e=>{if(1===e.opacity)return e.color;let t=ga(e.color);return t?`rgba(${t[0]},${t[1]},${t[2]},${e.opacity})`:e.color};if(1===o.length)return r(o[0]);let a=da(t);if(a<=o[0].offset)return r(o[0]);if(a>=o[o.length-1].offset)return r(o[o.length-1]);for(let e=0;e<o.length-1;e++){let t=o[e],i=o[e+1];if(a<t.offset||a>i.offset)continue;let n=i.offset-t.offset,l=n<=0?0:(a-t.offset)/n,s=ga(t.color),c=ga(i.color);if(!s||!c)return r(l<.5?t:i);let[h,u,d]=s,[g,m,p]=c,y=h+(g-h)*l,f=u+(m-u)*l,v=d+(p-d)*l,b=t.opacity+(i.opacity-t.opacity)*l;return 1===b?ma(y,f,v):`rgba(${Math.round(y)},${Math.round(f)},${Math.round(v)},${b})`}return r(o[o.length-1])}function ya(e,t,i){return null==i?`${e}-${t}`:`${e}-${t}-${i}`}function fa(e){let{min:t,max:i,value:o,thresholds:r,fillColor:a,backgroundColor:n,fillZones:l,showScaleLabels:s,gradientFill:c,gradientSteps:h=240}=e,u=Math.max(t,Math.min(i,o)),d=i-t||1,g=(u-t)/d,m=r&&r.length>0?[...r].sort((e,t)=>e.value-t.value):[{value:i,color:a||"#007bff"}];m=m.map(e=>({...e,value:Math.max(t,Math.min(i,e.value))})),m[m.length-1].value<i&&m.push({value:i,color:m[m.length-1].color});let p=!!c&&c.stops.length>=2,y=[],f=new Map,v=[];if(p){let e=l?g:1,t=ya("bg",0);if(y.push({category:t,value:1,_zone:"Track",_isFill:!1,_pctStart:0,_pct:1,_roundedEnds:{start:!0,end:!0},_nonInteractive:!0}),f.set(t,{fill:n,opacity:.4}),e>0){let t=Math.max(1,Math.floor(h)),i=Math.max(1,Math.min(t,Math.round(e*t))),o=[];for(let t=0;t<i;t++){let r=e*(t+.5)/i;o.push(pa(c.stops,r,a||m[0]?.color||"#007bff"))}let r=ya("fill",0);y.push({category:r,value:e,_zone:"Gradient",_isFill:!0,_pctStart:0,_pct:e,_roundedEnds:{start:!0,end:!0},_nonInteractive:!0,_gradientBand:{colors:o}}),f.set(r,{fill:o[0]||n})}}else{let e=t;for(let r=0;r<m.length;r++){let a=m[r],s=(a.value-e)/d,c=(e-t)/d,h=(a.value-t)/d,p=l?Math.min(g,h):h,v=Math.max(0,p-c),b=l?Math.max(0,s-v):0;if(v>0){let n=ya("fill",r);y.push({category:n,value:v,_zone:a.label||`Zone ${r+1}`,_isFill:!0,__gaugeAccessibleDatum:{category:a.label||`Zone ${r+1}`,value:o,min:t,max:i,segmentStart:e,segmentEnd:t+p*d,filled:!0}}),f.set(n,{fill:a.color})}if(b>0){let l=ya("bg",r);y.push({category:l,value:b,_zone:a.label||`Zone ${r+1}`,_isFill:!1,__gaugeAccessibleDatum:{category:a.label||`Zone ${r+1}`,value:o,min:t,max:i,segmentStart:Math.max(e,u),segmentEnd:a.value,filled:!1}}),f.set(l,{fill:n,opacity:.4})}e=a.value}}if(s&&r&&r.length>0)for(let e of r)e.value>t&&e.value<i&&v.push({type:"gauge-label",value:e.value,label:e.label||String(e.value)});return{gaugeData:y,pieceStyle:(e,t)=>{let i=t||e.category;return f.get(i)||{fill:n}},gaugeAnnotations:v}}var o=/*#__PURE__*/new Set(["svg","g","text","tspan","path","circle","ellipse","rect","line","polyline","polygon","use","image","defs","symbol"]),r=class{constructor(){this.colorSchemeMap=new Map,this.colorSchemeIndex=0}resetColors(){this.colorSchemeMap.clear(),this.colorSchemeIndex=0}resolvePieceStyle(e,t,i){if(t&&"function"==typeof e.pieceStyle){let o=e.pieceStyle(t,i);return o&&!o.fill&&i?{...o,fill:this.getColorFromScheme(e,i)}:o}return e.pieceStyle&&"object"==typeof e.pieceStyle?e.pieceStyle:e.barColors&&i?{fill:Ni(e.barColors,i)??"#007bff"}:{fill:i?this.getColorFromScheme(e,i):"#007bff"}}resolveSummaryStyle(e,t,i){return t&&"function"==typeof e.summaryStyle?e.summaryStyle(t,i):e.summaryStyle&&"object"==typeof e.summaryStyle?e.summaryStyle:{fill:"#007bff",fillOpacity:.6,stroke:"#007bff",strokeWidth:1}}getColorFromScheme(e,t){let i=this.colorSchemeMap.get(t);if(i)return i;let o=Array.isArray(e.colorScheme)?e.colorScheme:e.themeCategorical||ji,r=o[this.colorSchemeIndex%o.length];return this.colorSchemeIndex++,this.colorSchemeMap.set(t,r),r}},a={bar:function(e,t){let{scales:i,columns:o,config:r,getR:a,getStack:n,resolvePieceStyle:l}=e,{r:s,projection:c}=i,h=[],u="vertical"===c,d="horizontal"===c,g=r.normalize,{steps:m,keys:p}=Xo(Object.values(o),a,n,g);for(let{col:e,groups:t}of m){let i=0,o=0;for(let r of p){let a=t.get(r);if(!a)continue;let c=a.value,g=l(a.pieces[0],n?r:e.name),m={...a.pieces[0],__aggregateValue:a.total,__pieceCount:a.pieces.length,category:e.name};if(u){let t=s(c>=0?i+c:o),a=c>=0?s(i)-s(i+c):s(o+c)-s(o);h.push(Te(e.x,t,e.width,Math.abs(a),g,m,r)),c>=0?i+=c:o+=c}else if(d){let t=s(c>=0?i:o+c),a=c>=0?s(i+c)-s(i):s(o)-s(o+c);h.push(Te(t,e.x,Math.abs(a),e.width,g,m,r)),c>=0?i+=c:o+=c}}}let y="vertical"===c;for(let e of h){if("rect"!==e.type)continue;let t=e.datum?.__aggregateValue??0;e.roundedEdge=y?t>=0?"top":"bottom":t>=0?"right":"left",r.gradientFill&&(e.fillGradient=r.gradientFill)}if(void 0!==r.roundedTop){let e=new Map;for(let t of h){if("rect"!==t.type)continue;let i=t.datum?.category||"";e.has(i)||e.set(i,[]),e.get(i).push(t)}for(let t of e.values()){if(0===t.length)continue;let e=t.filter(e=>(e.datum?.__aggregateValue??0)>=0),i=t.filter(e=>(e.datum?.__aggregateValue??0)<0);if(e.length>0){let t=y?e.reduce((e,t)=>e.y<t.y?e:t):e.reduce((e,t)=>e.x+e.w>t.x+t.w?e:t),i=Yo(r.roundedTop,t,y);i>0&&(t.roundedTop=i)}if(i.length>0){let e=y?i.reduce((e,t)=>e.y+e.h>t.y+t.h?e:t):i.reduce((e,t)=>e.x<t.x?e:t),t=Yo(r.roundedTop,e,y);t>0&&(e.roundedTop=t)}}}return h},clusterbar:function(e,t){let{scales:i,columns:o,config:r,getR:a,getGroup:n,resolvePieceStyle:l}=e,{r:s,projection:c}=i,h=[],u="vertical"===c,{steps:d,keys:g}=Xo(Object.values(o),a,n),m=g.length||1;for(let{col:e,groups:t}of d){let i=e.width/m,o=.2*i,r=i-o;for(let n=0;n<g.length;n++){let c=t.get(g[n])?.pieces||[];for(let t of c){let c=a(t),d=l(t,g[n]);if(u){let a=e.x+n*i+o/2,l=s(0),u=s(c);h.push(Te(a,Math.min(l,u),r,Math.abs(l-u),d,t,g[n]))}else{let a=e.x+n*i+o/2,l=s(0),u=s(c);h.push(Te(Math.min(l,u),a,Math.abs(u-l),r,d,t,g[n]))}}}}for(let e of h){if("rect"!==e.type||null==e.datum)continue;let t=a(e.datum),i=Yo(r.roundedTop,e,u);i>0&&(e.roundedTop=i),e.roundedEdge=u?t>=0?"top":"bottom":t>=0?"right":"left",r.gradientFill&&(e.fillGradient=r.gradientFill)}return h},point:function(e,t){let{scales:i,columns:o,getR:r,multiScales:a,resolvePieceStyle:n}=e,{r:l,projection:s}=i,c=[],h="vertical"===s,u="radial"===s,d=a.length>0,g=Qo(e),m=2*Math.PI,p=-Math.PI/2;for(let e of Object.values(o))for(let t of e.pieceData){let i,o,s=t.__rIndex??0,y=t.__rValue??r(t),f=d&&a[s]||l,v=n(t,e.name),b=v.r||5;if(u){let t=p+(e.pctStart+e.pct/2)*m,r=f(y);i=Math.cos(t)*r,o=Math.sin(t)*r}else h?(i=e.middle,o=f(y)):(i=f(y),o=e.middle);Ko(c,g,t,i,o,b,v)}return c},swarm:function(e,t){let{scales:i,columns:o,getR:r,resolvePieceStyle:a}=e,{r:n,projection:l}=i,s=[],c="vertical"===l,h=Qo(e);for(let e of Object.values(o)){let t=e.width/2;for(let i=0;i<e.pieceData.length;i++){let o=e.pieceData[i],l=r(o),u=a(o,e.name),d=u.r||4,g=(7919*i%100/100-.5)*t*.8;Ko(s,h,o,c?e.middle+g:n(l),c?n(l):e.middle+g,d,u)}}return s},pie:Zo,donut:Zo,boxplot:function(e,t){let{scales:i,columns:o,config:r,getR:a,resolveSummaryStyle:n}=e,{r:l,projection:s}=i,c=[],h="vertical"===s,u=!1!==r.showOutliers;for(let t of Object.values(o)){let i=t.pieceData.map(e=>a(e)).filter(e=>null!=e&&!isNaN(e)).sort((e,t)=>e-t);if(0===i.length)continue;let o=Uo(i),{min:r,max:s,q1:d,median:g,q3:m}=o,p=m-d,y=d-1.5*p,f=m+1.5*p,v=i.find(e=>e>=y)??r,b=s;for(let e=i.length-1;e>=0;e--)if(i[e]<=f){b=i[e];break}o.min=v,o.max=b;let x=n(Jo(t.pieceData,t.name,o),t.name),w=[];if(u)for(let e of t.pieceData){let i=a(e);if(i<y||i>f){let o=h?t.middle:l(i),r=h?l(i):t.middle;w.push({px:o,py:r,value:i,datum:e})}}if(c.push({type:"boxplot",x:h?t.middle:0,y:h?0:t.middle,projection:h?"vertical":"horizontal",columnWidth:.6*t.width,minPos:l(v),q1Pos:l(d),medianPos:l(g),q3Pos:l(m),maxPos:l(b),stats:o,style:x,datum:t.pieceData,category:t.name,outliers:w}),u)for(let t of w)c.push({type:"point",x:t.px,y:t.py,r:3,style:{fill:x.fill||e.config.themeSemantic?.secondary||"#999",opacity:.6,cursor:x.cursor},datum:t.datum})}return c},violin:function(e,t){let{scales:i,columns:o,config:r,getR:a,resolveSummaryStyle:n}=e,{r:l,projection:s}=i,c=[],h="vertical"===s,u=r.bins||20,d=!1!==r.showIQR;for(let e of Object.values(o)){let t=e.pieceData.map(e=>a(e)).filter(e=>null!=e&&!isNaN(e)).sort((e,t)=>e-t);if(t.length<2)continue;let i,o=t[0],r=t[t.length-1],s=(r-o)/u||1,g=er(t,o,r,s,u),m=wo(g,1),p=e.width/2*.9;if(h){i=`M ${e.middle} ${l(o)}`;for(let t=0;t<u;t++){let r=l(o+(t+.5)*s),a=g[t]/m*p;i+=` L ${e.middle+a} ${r}`}i+=` L ${e.middle} ${l(r)}`;for(let t=u-1;t>=0;t--){let r=l(o+(t+.5)*s),a=g[t]/m*p;i+=` L ${e.middle-a} ${r}`}i+=" Z"}else{i=`M ${l(o)} ${e.middle}`;for(let t=0;t<u;t++){let r=l(o+(t+.5)*s),a=g[t]/m*p;i+=` L ${r} ${e.middle-a}`}i+=` L ${l(r)} ${e.middle}`;for(let t=u-1;t>=0;t--){let r=l(o+(t+.5)*s),a=g[t]/m*p;i+=` L ${r} ${e.middle+a}`}i+=" Z"}let y,f=Uo(t),v=n(Jo(e.pieceData,e.name,f),e.name);d&&t.length>=4&&(y={q1Pos:l(f.q1),medianPos:l(f.median),q3Pos:l(f.q3),centerPos:e.middle,isVertical:h});let b=h?{x:e.x,y:Math.min(l(r),l(o)),width:e.width,height:Math.abs(l(r)-l(o))}:{x:Math.min(l(o),l(r)),y:e.x,width:Math.abs(l(r)-l(o)),height:e.width};c.push({type:"violin",pathString:i,translateX:0,translateY:0,bounds:b,iqrLine:y,stats:f,style:v,datum:e.pieceData,category:e.name})}return c},histogram:function(e,t){let{scales:i,columns:o,config:r,getR:a,resolveSummaryStyle:n}=e,{r:l}=i,s=[],c=r.bins||25,h=r.normalize,u=l.domain?.(),d=u?+u[0]:void 0,g=u?+u[1]:void 0;for(let e of Object.values(o)){let t=e.pieceData.map(e=>a(e)).filter(e=>null!=e&&!isNaN(e));if(0===t.length)continue;let[i,o]=ko(t),r=null!=d&&isFinite(d)?d:i,u=null!=g&&isFinite(g)?g:o,m=(u-r)/c||1,p=er(t,r,u,m,c),y=t.length,f=wo(p,1);for(let t=0;t<c;t++){if(0===p[t])continue;let i=(h?p[t]/y:p[t]/f)*e.width*.9,o=l(r+t*m),a=l(r+(t+1)*m),c=Math.min(o,a),u=Math.abs(a-o),d=e.x+e.width-i,g={...e.pieceData[0],bin:t,count:p[t],range:[r+t*m,r+(t+1)*m],category:e.name,data:e.pieceData},v=n(g,e.name);s.push(Te(c,d,u,i,v,g,e.name))}}return s},ridgeline:function(e,t){let{scales:i,columns:o,config:r,getR:a,resolveSummaryStyle:n}=e,{r:l,projection:s}=i,c=[],h=r.bins||20,u="horizontal"===s,d=r.amplitude||1.5;for(let e of Object.values(o)){let t=e.pieceData.map(e=>a(e)).filter(e=>null!=e&&!isNaN(e)).sort((e,t)=>e-t);if(t.length<2)continue;let i,o=t[0],r=t[t.length-1],s=(r-o)/h||1,g=er(t,o,r,s,h),m=wo(g,1),p=Uo(t),y=n(Jo(e.pieceData,e.name,p),e.name),f=e.width*d;if(u){let t=e.x+e.width;i=`M ${l(o)} ${t}`;for(let e=0;e<h;e++)i+=` L ${l(o+(e+.5)*s)} ${t-g[e]/m*f}`;i+=` L ${l(r)} ${t} Z`}else{let t=e.x;i=`M ${t} ${l(o)}`;for(let e=0;e<h;e++){let r=l(o+(e+.5)*s);i+=` L ${t+g[e]/m*f} ${r}`}i+=` L ${t} ${l(r)} Z`}let v=u?{x:Math.min(l(o),l(r)),y:e.x,width:Math.abs(l(r)-l(o)),height:e.width}:{x:e.x,y:Math.min(l(r),l(o)),width:e.width,height:Math.abs(l(r)-l(o))};c.push({type:"violin",pathString:i,translateX:0,translateY:0,bounds:v,stats:p,style:{...y,fillOpacity:y.fillOpacity??.5},datum:e.pieceData,category:e.name})}return c},timeline:function(e,t){let{scales:i,columns:o,getRawRange:r,resolvePieceStyle:a}=e,{r:n,projection:l}=i,s=[],c="horizontal"===l;for(let e of Object.values(o))for(let t of e.pieceData){let i=r(t);if(!i)continue;let[o,l]=i,h=a(t,e.name);if(c){let i=n(Math.min(o,l)),r=n(Math.max(o,l));s.push(Te(i,e.x,r-i,e.width,h,t,e.name))}else{let i=n(Math.max(o,l)),r=n(Math.min(o,l));s.push(Te(e.x,i,e.width,r-i,h,t,e.name))}}return s},funnel:function(e,t){let{columns:i,getR:o,getStack:r,resolvePieceStyle:a}=e,n=[],l=t.width/2,s=!1!==e.config.showLabels,c=e.scales.o.domain().map(e=>i[e]).filter(Boolean);if(0===c.length)return n;let{steps:h,keys:u}=Xo(c,o,r),d=u.length>1&&"_default"!==u[0],g=0;if(!d)for(let{stepTotal:e}of h)e>g&&(g=e);if(d)for(let e of h){let t=0,i=0;for(let o=0;o<u.length;o++){let r=e.groups.get(u[o]);r&&(o%2==0?t+=r.total:i+=r.total)}let o=Math.max(t,i);o>g&&(g=o)}if(0===g)return n;let m=h[0].stepTotal,p=d?.95*l:.9*t.width,y=Fo().domain([0,g]).range([0,p]),f=e.config.connectorOpacity??.3,v=new Map;for(let t=0;t<h.length;t++){let i=h[t],o=i.col,r=0===t,c=o.x,g=o.width,p=.55*g,b=c+(g-p)/2,x=new Map;if(d){let e=0;for(let t of u){let o=i.groups.get(t);o&&(e+=y(o.total))}let t=l,c=l;for(let d=0;d<u.length;d++){let g=u[d],m=i.groups.get(g);if(!m)continue;let f=y(m.total),v=d%2==0,w=v?t:c-f;v?t+=f:c-=f;let k=a(m.pieces[0],g),A=h[0].groups.get(g)?.total??0,S=A>0?m.total/A*100:0,P={...m.pieces[0],__funnelValue:m.total,__funnelPercent:S,__funnelStep:o.name,__funnelIsFirstStep:r,__aggregateValue:m.total,__pieceCount:m.pieces.length,category:g};s&&(0===d&&(P.__funnelStepLabel=o.name,P.__funnelStepLabelX=l,P.__funnelStepLabelY=b,P.__funnelRowWidth=e),P.__funnelValueLabelX=w+f/2,P.__funnelValueLabelY=b,P.__funnelBarW=f),n.push(Te(w,b,f,p,k,P,g)),x.set(g,{x:w,y:b,w:f,h:p})}}else{let e=i.stepTotal,t=y(e),c=l-t/2,h=u[0],d="_default"!==h,g=i.groups.get(h)?.pieces[0]??o.pieceData[0],f=d?h:o.name,v=a(g,f),w=m>0?e/m*100:0,k={...g,__funnelValue:e,__funnelPercent:w,__funnelStep:o.name,__funnelIsFirstStep:r,category:d?h:o.name};s&&(k.__funnelStepLabel=o.name,k.__funnelStepLabelX=l,k.__funnelStepLabelY=b,k.__funnelRowWidth=t,k.__funnelValueLabelX=l,k.__funnelValueLabelY=b,k.__funnelBarW=t),n.push(Te(c,b,t,p,v,k,f)),x.set(h,{x:c,y:b,w:t,h:p})}if(t>0&&v.size>0){let t=d?u:[u[0]];for(let r of t){let t=v.get(r),l=x.get(r);if(!t||!l)continue;let s=(()=>{let e=i.groups.get(r),t="_default"===r?o.name:r;return a(e?e.pieces[0]:o.pieceData[0],t)})(),c={type:"trapezoid",points:[[t.x,t.y+t.h],[t.x+t.w,t.y+t.h],[l.x+l.w,l.y],[l.x,l.y]],style:{fill:s.fill||e.config.themeSemantic?.secondary||"#999",opacity:f,cursor:s.cursor},datum:i.groups.get(r)?.pieces[0]??o.pieceData[0],category:"_default"===r?o.name:r};n.push(c)}}v=x}return n},"bar-funnel":function(e,t){let{columns:i,getR:o,getStack:r,resolvePieceStyle:a,scales:n}=e,l=[],s=n.o.domain().map(e=>i[e]).filter(Boolean);if(0===s.length)return l;let{steps:c,keys:h}=Xo(s,o,r),u=h.length>1&&"_default"!==h[0],d=n.r,g=u?h.length:1,m=u?.15:0;for(let e=0;e<c.length;e++){let t=c[e],i=t.col,o=0===e,r=e>0?c[e-1]:null,n=i.width/g,s=n*m,p=n-s;for(let e=0;e<h.length;e++){let g=h[e],m=t.groups.get(g);if(!m)continue;let y=m.total,f=c[0].groups.get(g)?.total??0,v=f>0?y/f*100:0,b=r?.groups.get(g)?.total??y,x=o?0:Math.max(0,b-y),w=i.x+e*n+s/2,k=d(y),A=d(0),S=A-k,P=a(m.pieces[0],u?g:i.name),R={...m.pieces[0],__barFunnelValue:y,__barFunnelPercent:v,__barFunnelIsFirstStep:o,__barFunnelIsDropoff:!1,__barFunnelStep:i.name,__barFunnelDropoffValue:x,__barFunnelCategory:"_default"===g?void 0:g,category:u?g:i.name,__barFunnelLabelX:w+p/2,__barFunnelLabelY:d(y+x)};if(l.push(Te(w,Math.min(k,A),p,Math.abs(S),P,R,u?g:i.name)),x>0){let e=d(y+x),t=k-e,o={...P},r={...m.pieces[0],__barFunnelValue:x,__barFunnelPercent:f>0?x/f*100:0,__barFunnelIsFirstStep:!1,__barFunnelIsDropoff:!0,__barFunnelStep:i.name,__barFunnelCategory:"_default"===g?void 0:g,category:u?g:i.name};l.push(Te(w,e,p,t,o,r,u?g:i.name))}}}return l},swimlane:function(e,t){let{scales:i,columns:o,getR:r,getStack:a,resolvePieceStyle:n}=e,{r:l,projection:s}=i,c=[],h="horizontal"===s,u=e.config.gradientFill,d=h?"left":"bottom",g=new Map,m=t=>{let i=g.get(t);if(void 0!==i)return i;let o="function"==typeof e.config.roundedTop?e.config.roundedTop(t.width):e.config.roundedTop,r="number"==typeof o&&Number.isFinite(o)?Math.max(0,o):0;return g.set(t,r),r},p=e.config.trackFill;if(p){let e="string"==typeof p?p:p.color,t="string"==typeof p?1:p.opacity??1,[i,r]=l.range(),a=Math.min(i,r),n=Math.abs(r-i);for(let i of Object.values(o)){let o={fill:e,opacity:t},r=h?Te(a,i.x,n,i.width,o,null,"__track__"):Te(i.x,a,i.width,n,o,null,"__track__"),l=m(i);l>0&&(r.cornerRadii={tl:l,tr:l,br:l,bl:l}),c.push(r)}}for(let e of Object.values(o)){let t=0,i=c.length,o=m(e);for(let i of e.pieceData){let o=Math.abs(r(i));if(0===o)continue;let s,g=a?a(i):e.name,m=n(i,g);if(h){let r=l(t),a=l(t+o);s=Te(r,e.x,a-r,e.width,m,i,g)}else{let r=l(t+o),a=l(t);s=Te(e.x,r,e.width,a-r,m,i,g)}u&&(s.fillGradient=u,s.roundedEdge=d),c.push(s),t+=o}if(o>0&&c.length>i){let e=c.slice(i),t=e[0],r=e[e.length-1];1===e.length?t.cornerRadii={tl:o,tr:o,br:o,bl:o}:h?(t.cornerRadii={tl:o,bl:o},r.cornerRadii={tr:o,br:o}):(t.cornerRadii={bl:o,br:o},r.cornerRadii={tl:o,tr:o})}}return c}},n=["data","domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"],l=["scene-style","data-paint","accessibility","evidence"],s=["domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"],c=["layout","scene-geometry","data-paint","overlay","accessibility","evidence"],h=["scene-geometry","data-paint","accessibility","evidence"],u=["scene-style","data-paint","accessibility","evidence"],d=[],g={chartType:/*#__PURE__*/(e=(e,t)=>({retainedData:e,invalidations:t}))("rebuild",t=["domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"]),runtimeMode:/*#__PURE__*/e("rebuild",t),categoryAccessor:/*#__PURE__*/e("rebuild",t),valueAccessor:/*#__PURE__*/e("rebuild",t),oAccessor:/*#__PURE__*/e("rebuild",t),rAccessor:/*#__PURE__*/e("rebuild",t),stackBy:/*#__PURE__*/e("rebuild",t),groupBy:/*#__PURE__*/e("rebuild",t),timeAccessor:/*#__PURE__*/e("rebuild",t),accessorRevision:/*#__PURE__*/e("rebuild",t),colorAccessor:/*#__PURE__*/e("rebuild",u),symbolAccessor:/*#__PURE__*/e("rebuild",h),connectorAccessor:/*#__PURE__*/e("rebuild",h),dataIdAccessor:/*#__PURE__*/e("rebuild",h),projection:/*#__PURE__*/e("preserve",s),extentPadding:/*#__PURE__*/e("preserve",s),axisExtent:/*#__PURE__*/e("preserve",s),rExtent:/*#__PURE__*/e("preserve",s),oExtent:/*#__PURE__*/e("preserve",s),multiAxis:/*#__PURE__*/e("preserve",s),normalize:/*#__PURE__*/e("preserve",s),bins:/*#__PURE__*/e("preserve",s),oSort:/*#__PURE__*/e("preserve",c),barPadding:/*#__PURE__*/e("preserve",c),roundedTop:/*#__PURE__*/e("preserve",c),baselinePadding:/*#__PURE__*/e("preserve",c),innerRadius:/*#__PURE__*/e("preserve",c),cornerRadius:/*#__PURE__*/e("preserve",c),startAngle:/*#__PURE__*/e("preserve",c),sweepAngle:/*#__PURE__*/e("preserve",c),trackFill:/*#__PURE__*/e("preserve",c),showOutliers:/*#__PURE__*/e("preserve",c),showIQR:/*#__PURE__*/e("preserve",c),amplitude:/*#__PURE__*/e("preserve",c),connectorOpacity:/*#__PURE__*/e("preserve",c),showLabels:/*#__PURE__*/e("preserve",c),dynamicColumnWidth:/*#__PURE__*/e("rebuild",c),customLayout:/*#__PURE__*/e("preserve",c),layoutConfig:/*#__PURE__*/e("preserve",c),layoutMargin:/*#__PURE__*/e("preserve",c),symbolMap:/*#__PURE__*/e("preserve",h),pieceStyle:/*#__PURE__*/e("preserve",u),summaryStyle:/*#__PURE__*/e("preserve",u),connectorStyle:/*#__PURE__*/e("preserve",u),gradientFill:/*#__PURE__*/e("preserve",u),colorScheme:/*#__PURE__*/e("preserve",u),themeCategorical:/*#__PURE__*/e("preserve",u),themeSemantic:/*#__PURE__*/e("preserve",u),themeSequential:/*#__PURE__*/e("preserve",u),themeDiverging:/*#__PURE__*/e("preserve",u),barColors:/*#__PURE__*/e("preserve",u),decay:/*#__PURE__*/e("preserve",u),pulse:/*#__PURE__*/e("preserve",u),staleness:/*#__PURE__*/e("preserve",u),layoutSelection:/*#__PURE__*/e("preserve",u),windowSize:/*#__PURE__*/e("preserve",d),windowMode:/*#__PURE__*/e("preserve",d),clock:/*#__PURE__*/e("preserve",d),transition:/*#__PURE__*/e("preserve",d),introAnimation:/*#__PURE__*/e("preserve",d),onLayoutError:/*#__PURE__*/e("preserve",d)},m=/*#__PURE__*/e("preserve",c),p=class{constructor(){this.tracker=new It}get last(){return this.tracker.last}subscribe(e){return this.tracker.subscribe(e)}recordData(e,t){return this.tracker.record({kind:e,...void 0===t?{}:{count:t}},n)}recordNoop(e){return this.tracker.record({kind:e,..."restyle"===e?{}:{count:0}},[])}recordRestyle(e){return e?this.tracker.record({kind:"restyle"},l):this.recordNoop("restyle")}recordConfig(e){let t=rr(e);return this.tracker.record({kind:"config",keys:e},t.invalidations)}},y=500,f=class extends Ue{constructor(e){super(),this.rExtent=new Ae,this.rExtents=[],this.windowSizeWarned=!1,this.updateResults=new p,this.rAccessors=[],this.categories=new Set,this._hasStreamingData=!1,this.styleResolver=new r,this.timestampBuffer=null,this.activeTransition=null,this.prevPositionMap=new Map,this.exitNodes=[],this.lastIngestTime=0,this.scales=null,this.multiScales=[],this.scene=[],this.columns={},this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customLayoutFailedThisBuild=!1,this._customLayoutDiagnosticsWarned=new Set,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,this.version=0,this._dataVersion=0,this._bufferArrayCache=null,this._pointQuadtree=null,this._maxPointRadius=0,this._datumIndexCache=null,this._categoryIndexCache=null,this._hasRenderedOnce=!1,this.config=e,this.buffer=new De(e.windowSize),this.getO=Ke(e.categoryAccessor||e.oAccessor,"category");let t="streaming"===e.runtimeMode,i=e.valueAccessor||e.rAccessor;Array.isArray(i)?(this.rAccessors=i.map(e=>Ze(e,"value")),this.getR=this.rAccessors[0],this.rExtents=i.map(()=>new Ae)):(t&&e.timeAccessor,this.getR=Ze(i,"value"),this.rAccessors=[this.getR],this.rExtents=[this.rExtent]),this.getStack=Ke(e.stackBy),this.getGroup=Ke(e.groupBy),this.getColor=Ke(e.colorAccessor),this.getSymbol=Ke(e.symbolAccessor),this.getConnector=Ke(e.connectorAccessor),this.getDataId=Ke(e.dataIdAccessor),e.pulse&&(this.timestampBuffer=new De(e.windowSize))}syncPulseTimestampBuffer(){var e,t,i,o;this.timestampBuffer=(e=!!this.config.pulse,t=this.buffer,i=this.timestampBuffer,o=this.currentTime(),e?null!=i&&i.capacity===t.capacity&&i.size===t.size?i:Oe(t,o):null)}currentTime(){return this.config.clock?.()??fo()}ingest(e){let t=this.currentTime();if(this.lastIngestTime=t,this._dataVersion++,e.bounded){this.buffer.clear(),this.rExtent.clear();for(let e of this.rExtents)e.clear();e.preserveCategoryOrder?this._hasStreamingData=!0:this.categories.clear(),this.timestampBuffer&&this.timestampBuffer.clear();let i=e.totalSize||e.inserts.length;Ee(this.buffer,i,this.timestampBuffer);for(let i of e.inserts)We(this.buffer,i,this.timestampBuffer,t),this.categories.add(this.getO(i)),this.pushValueExtent(i)}else{this._hasStreamingData=!0;for(let i of e.inserts){let e=We(this.buffer,i,this.timestampBuffer,t);this.categories.add(this.getO(i)),this.pushValueExtent(i),null!=e&&this.evictValueExtent(e)}}return this.updateResults.recordData(e.bounded?"replace":"ingest",e.inserts.length),!0}ingestWithResult(e){return this.ingest(e),this.updateResults.last}pushValueExtent(e){if("timeline"===this.config.chartType){let t=this.getRawRange(e);t&&(this.rExtent.push(t[0]),this.rExtent.push(t[1]))}else if(this.rAccessors.length>1){for(let t=0;t<this.rAccessors.length;t++)this.rExtents[t].push(this.rAccessors[t](e));this.rExtent.push(this.getR(e))}else this.rExtent.push(this.getR(e))}evictValueExtent(e){if("timeline"===this.config.chartType){let t=this.getRawRange(e);t&&(this.rExtent.evict(t[0]),this.rExtent.evict(t[1]))}else if(this.rAccessors.length>1){for(let t=0;t<this.rAccessors.length;t++)this.rExtents[t].evict(this.rAccessors[t](e));this.rExtent.evict(this.getR(e))}else this.rExtent.evict(this.getR(e))}getRawRange(e){let t=this.config.valueAccessor||this.config.rAccessor;if(!t)return null;let i="function"==typeof t?t(e):e[t];return Array.isArray(i)&&i.length>=2?[+i[0],+i[1]]:null}computeScene(e){let{config:t,buffer:i}=this,o=this.scales,r=this.multiScales,a=this.columns;if(0===i.size)return this.scales=null,this.multiScales=[],this.scene=[],this.columns={},this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,void this.version++;this.rExtent.dirty&&("timeline"===t.chartType?(this.rExtent.clear(),i.forEach(e=>this.pushValueExtent(e))):this.rExtent.recalculate(i,this.getR));let n,l,s=this.getBufferArray(),c=t.projection||"vertical",h=t.oExtent||this.resolveCategories(s),u=this.computeValueDomain(s,h),d="vertical"===c,g="horizontal"===c,m="radial"===c,p=null!=t.barPadding?t.barPadding/(d?e.width:e.height):.1,y=Math.min(.9,Math.max(0,p));if(m){n=Oo().domain(h).range([0,1]).padding(0);let i=Math.min(e.width,e.height)/2,o=t.innerRadius||0;l=Fo().domain(u).range([o,i])}else g?(n=Oo().domain(h).range([0,e.height]).padding(y),l=Fo().domain(u).range([0,e.width])):(n=Oo().domain(h).range([0,e.width]).padding(y),l=Fo().domain(u).range([e.height,0]));this.scales={o:n,r:l,projection:c},this.rAccessors.length>1&&t.multiAxis?this.multiScales=this.rAccessors.map((o,r)=>{let a=this.rExtents[r];a.dirty&&a.recalculate(i,o);let[n,l]=a.extent;n===1/0&&(n=0,l=1);let s=t.extentPadding??.05,c=l-n,h=c>0?c*s:1;return n-=h,l+=h,n>0&&(n=0),g?Fo().domain([n,l]).range([0,e.width]):Fo().domain([n,l]).range([e.height,0])}):this.multiScales=[];let f=s;this.rAccessors.length>1&&(f=s.flatMap(e=>this.rAccessors.map((t,i)=>({...e,__rIndex:i,__rValue:t(e),__rName:this.resolveRAccessorName(i)})))),this.columns=this.buildColumns(f,h,n,c,e),this._customLayoutFailedThisBuild=!1;let v=this.buildSceneNodes(f,e);this._customLayoutFailedThisBuild?!0===this.lastCustomLayoutFailure?.preservedLastGoodScene?(this.scales=o,this.multiScales=r,this.columns=a):(this.scene=[],this.rebuildPointQuadtree()):(this.config.transition&&this.scene.length>0&&this.snapshotPositions(),this.scene=v,this.rebuildPointQuadtree(),this.config.decay&&this.applyDecay(this.scene,s),this.config.pulse&&this.applyPulse(this.scene,s),this.config.transition&&!this._hasRenderedOnce&&this.scene.length>0&&(this.config.introAnimation&&this.synthesizeIntroPositions(),this._hasRenderedOnce=!0),this.config.transition&&this.prevPositionMap.size>0&&this.startTransition(),this.version++)}resolveRAccessorName(e){let t=this.config.valueAccessor||this.config.rAccessor,i=Array.isArray(t)?t[e]:t;return"string"==typeof i?i:`value${e}`}resolveCategories(e){let t=this.config.oSort,i="streaming"===this.config.runtimeMode||this._hasStreamingData,o="auto"===t?void 0:t,r=null;if(i){r=new Set;for(let t of e)r.add(this.getO(t))}let a=r?Array.from(this.categories).filter(e=>r.has(e)):Array.from(this.categories);if(i&&void 0===o){let e=Math.max(50,3*r.size);if(this.categories.size>e){let t=this.categories.size-e;for(let e of this.categories){if(t<=0)break;r.has(e)||(this.categories.delete(e),t--)}}return a}if(!1===o)return a;if("function"==typeof o)return a.sort(o);let n=new Map;for(let t of e){let e=this.getO(t);n.set(e,(n.get(e)||0)+Math.abs(this.getR(t)))}return"asc"===o?a.sort((e,t)=>(n.get(e)||0)-(n.get(t)||0)):a.sort((e,t)=>(n.get(t)||0)-(n.get(e)||0))}computeValueDomain(e,t){return tr({data:e,chartType:this.config.chartType,projection:this.config.projection,normalize:this.config.normalize,rExtent:this.config.rExtent,extentPadding:this.config.extentPadding,baselinePadding:this.config.baselinePadding,axisExtent:this.config.axisExtent,getO:this.getO,getR:this.getR,getStack:this.getStack,rawRExtent:this.rExtent.extent})}buildColumns(e,t,i,o,r){return ir({data:e,oExtent:t,oScale:i,projection:o,layout:r,dynamicColumnWidth:this.config.dynamicColumnWidth,getO:this.getO,getR:this.getR})}getSceneContext(){return{scales:this.scales,columns:this.columns,config:this.config,getR:this.getR,getStack:this.getStack,getGroup:this.getGroup,getColor:this.getColor,getSymbol:this.getSymbol,getConnector:this.getConnector,getO:this.getO,multiScales:this.multiScales,rAccessors:this.rAccessors,resolvePieceStyle:(e,t)=>this.styleResolver.resolvePieceStyle(this.config,e,t),resolveSummaryStyle:(e,t)=>this.styleResolver.resolveSummaryStyle(this.config,e,t),getRawRange:e=>this.getRawRange(e)}}buildSceneNodes(e,t){if(!this.scales)return[];if(this.config.customLayout){let i=this.buildLayoutContext(e,t),o=et({family:"ordinal",logLabel:"ordinal customLayout",revision:this.version,hasPreviousResult:null!==this.lastCustomLayoutResult,onLayoutError:this.config.onLayoutError,run:()=>this.config.customLayout(i)});if("failure"===o.kind)return this.lastCustomLayoutFailure=o.diagnostic,this._customLayoutFailedThisBuild=!0,o.preservedLastGoodScene?this.scene:(this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,[]);let r=o.result;this.customLayoutOverlays=r.overlays??null,this.lastCustomLayoutResult=r,this.lastCustomLayoutFailure=null;let a=r.nodes??[];if(this._customRestyle=r.restyle,this.hasCustomRestyle=!!r.restyle,this.hasCustomRestyle){this._baseStyles=new WeakMap;for(let e of a)e.style&&this._baseStyles.set(e,e.style);this.applyCustomRestyle(a,this.config.layoutSelection??null)}return tt({label:"ordinal customLayout",nodes:a,overlays:this.customLayoutOverlays,warned:this._customLayoutDiagnosticsWarned}),a}this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customRestyle=void 0,this.hasCustomRestyle=!1;let i=this.getSceneContext(),o=a[this.config.chartType],r=o?o(i,t):[];return this.getConnector&&this.scales&&(r=[...Go(i,r),...r]),r}buildLayoutContext(e,t){let i=this.config,o=i.layoutMargin??{top:0,right:0,bottom:0,left:0},r=Lt(i.colorScheme,i.themeCategorical,ji),a=this.scales,n="radial"===a.projection?{x:-t.width/2,y:-t.height/2,width:t.width,height:t.height}:{x:0,y:0,width:t.width,height:t.height};return{data:e,scales:{o:a.o,r:a.r,projection:a.projection},dimensions:{width:t.width,height:t.height,margin:o,plot:n},theme:{semantic:i.themeSemantic??{},categorical:[...r]},resolveColor:Mt(r,i.colorScheme),config:i.layoutConfig??{},selection:i.layoutSelection??null}}computeDecayOpacity(e,t){let i=this.config.decay;return!i||t<=1?1:it(i,e,t)}getDatumIndexMap(e){if(this._datumIndexCache&&this._datumIndexCache.version===this._dataVersion)return this._datumIndexCache.map;let t=ot(e);return this._datumIndexCache={version:this._dataVersion,map:t},t}getCategoryIndexMap(e){if(this._categoryIndexCache&&this._categoryIndexCache.version===this._dataVersion)return this._categoryIndexCache.map;let t=or(e,this.config.categoryAccessor||this.config.oAccessor);return this._categoryIndexCache={version:this._dataVersion,map:t},t}rebuildPointQuadtree(){let e=ar(this.scene);this._pointQuadtree=e.quadtree,this._maxPointRadius=e.maxRadius}get pointQuadtree(){return this._pointQuadtree}get maxPointRadius(){return this._maxPointRadius}applyDecay(e,t){if(!this.config.decay)return;let i=t.length;if(i<=1)return;let o=this.getDatumIndexMap(t);for(let t of e){if("connector"===t.type||"violin"===t.type||"boxplot"===t.type||"wedge"===t.type||!t.datum)continue;let e=o.get(t.datum);if(null==e)continue;let r=this.computeDecayOpacity(e,i),a=t.style?.opacity??1;t.style={...t.style,opacity:a*r}}}applyPulse(e,t,i=this.currentTime()){return!(!this.config.pulse||!this.timestampBuffer)&&Vo(this.config.pulse,e,this.timestampBuffer,this.getDatumIndexMap(t),e=>this.getCategoryIndexMap(t).get(e),i)}refreshPulse(e){return!0!==this.lastCustomLayoutFailure?.preservedLastGoodScene&&this.applyPulse(this.scene,this.getBufferArray(),e)}hasActivePulsesAt(e){return!!this.config.pulse&&Ne(this.config.pulse,this.timestampBuffer,e)}get hasActivePulses(){return this.hasActivePulsesAt(this.currentTime())}synthesizeIntroPositions(){this.prevPositionMap.clear();let e,t=new Map,i=this.scales?.r(0)??0,o="horizontal"!==this.scales?.projection;for(let r=0;r<this.scene.length;r++){let a=this.scene[r],n=this.getNodeKey(a,t);n&&("rect"===a.type?o?this.prevPositionMap.set(n,{x:a.x,y:i,w:a.w,h:0,opacity:a.style.opacity??1}):this.prevPositionMap.set(n,{x:i,y:a.y,w:0,h:a.h,opacity:a.style.opacity??1}):"point"===a.type?this.prevPositionMap.set(n,{x:a.x,y:a.y,r:0,opacity:0}):"wedge"===a.type&&(void 0===e&&(e=a.startAngle),this.prevPositionMap.set(n,{x:a.cx,y:a.cy,startAngle:e,endAngle:e,innerRadius:a.innerRadius,outerRadius:a.outerRadius,opacity:0})))}}getNodeKey(e,t){if("point"===e.type){let i=`p:${e.datum?this.getO(e.datum):""}:${e.datum?this.getR(e.datum):0}`,o=t.get(i)||0;return t.set(i,o+1),`${i}:${o}`}if("rect"===e.type){let i=e.datum?null!=e.datum.category&&""!==e.datum.category?String(e.datum.category):String(this.getO(e.datum)??""):"",o=`r:${e.group||""}:${i}`,r=t.get(o)||0;return t.set(o,r+1),0===r?o:`${o}:${r}`}return"wedge"===e.type?`w:${e.category??""}`:null}snapshotPositions(){this.prevPositionMap.clear();let e=new Map;for(let t=0;t<this.scene.length;t++){let i=this.scene[t],o=this.getNodeKey(i,e);o&&("point"===i.type?this.prevPositionMap.set(o,{x:i.x,y:i.y,r:i.r,opacity:i.style.opacity??i.style.fillOpacity}):"rect"===i.type?this.prevPositionMap.set(o,{x:i.x,y:i.y,w:i.w,h:i.h,opacity:i.style.opacity??i.style.fillOpacity}):"wedge"===i.type&&this.prevPositionMap.set(o,{x:i.cx,y:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius,opacity:i.style.opacity??1}))}}startTransition(){if(!this.config.transition||0===this.prevPositionMap.size)return;let e=this.config.transition.duration??300;if(this.exitNodes.length>0){let e=new Set(this.exitNodes);this.scene=this.scene.filter(t=>!e.has(t)),this.exitNodes=[]}let t=!1,i=new Set,o=new Map;for(let e=0;e<this.scene.length;e++){let r=this.scene[e],a=this.getNodeKey(r,o);if(!a)continue;r._transitionKey=a;let n=this.prevPositionMap.get(a);if("point"===r.type)n?(i.add(a),r._targetOpacity=r.style.opacity??r.style.fillOpacity??1,(n.x!==r.x||n.y!==r.y||void 0!==n.r&&n.r!==r.r)&&(r._targetX=r.x,r._targetY=r.y,r._targetR=r.r,r.x=n.x,r.y=n.y,void 0!==n.r&&(r.r=n.r),t=!0)):(r._targetOpacity=r.style.opacity??r.style.fillOpacity??1,r._targetR=r.r,r.r=0,r.style={...r.style,opacity:0},t=!0);else if("rect"===r.type)n?(i.add(a),r._targetOpacity=r.style.opacity??r.style.fillOpacity??1,(n.x!==r.x||n.y!==r.y||n.w!==r.w||n.h!==r.h)&&(r._targetX=r.x,r._targetY=r.y,r._targetW=r.w,r._targetH=r.h,r.x=n.x,r.y=n.y,r.w=n.w??r.w,r.h=n.h??r.h,t=!0)):(r._targetOpacity=r.style.opacity??r.style.fillOpacity??1,r.style={...r.style,opacity:0},t=!0);else if("wedge"===r.type)if(n)i.add(a),r._targetOpacity=r.style.opacity??r.style.fillOpacity??1,(n.startAngle!==r.startAngle||n.endAngle!==r.endAngle)&&(r._targetStartAngle=r.startAngle,r._targetEndAngle=r.endAngle,r.startAngle=n.startAngle,r.endAngle=n.endAngle,t=!0);else{r._targetOpacity=r.style.opacity??r.style.fillOpacity??1,r._targetStartAngle=r.startAngle,r._targetEndAngle=r.endAngle;let e=r.startAngle;r.startAngle=e,r.endAngle=e,r.style={...r.style,opacity:0},this.prevPositionMap.set(a,{x:r.cx,y:r.cy,startAngle:e,endAngle:e,innerRadius:r.innerRadius,outerRadius:r.outerRadius,opacity:0}),t=!0}}this.exitNodes=[];for(let[e,o]of this.prevPositionMap)if(!i.has(e)){if(e.startsWith("p:"))this.exitNodes.push({type:"point",x:o.x,y:o.y,r:o.r??3,style:{opacity:o.opacity??1},datum:null,_targetOpacity:0,_transitionKey:e});else if(e.startsWith("r:"))this.exitNodes.push({type:"rect",x:o.x,y:o.y,w:o.w??0,h:o.h??0,style:{opacity:o.opacity??1,fill:"#999"},datum:null,_targetOpacity:0,_transitionKey:e});else if(e.startsWith("w:")){let t=((o.startAngle??0)+(o.endAngle??0))/2,i={type:"wedge",cx:o.x,cy:o.y,innerRadius:o.innerRadius??0,outerRadius:o.outerRadius??100,startAngle:o.startAngle??0,endAngle:o.endAngle??0,style:{opacity:o.opacity??1},datum:null,category:e.slice(2),_targetStartAngle:t,_targetEndAngle:t,_targetOpacity:0,_transitionKey:e};this.exitNodes.push(i)}t=!0}this.exitNodes.length>0&&(this.scene=[...this.scene,...this.exitNodes]),t&&(this.activeTransition={startTime:this.currentTime(),duration:e})}advanceTransition(e){if(!this.activeTransition)return!1;let t=vo(e,this.activeTransition),i="linear"===this.config.transition?.easing?"linear":"ease-out-cubic",o=bo(t,i);for(let e of this.scene){let t=e._transitionKey;if(t)if("point"===e.type){if(void 0!==e._targetOpacity){let i=this.prevPositionMap.get(t),r=i?i.opacity??1:0;e.style.opacity=xo(r,e._targetOpacity,o)}let i=this.prevPositionMap.get(t);void 0!==e._targetX&&i&&(e.x=xo(i.x,e._targetX,o),e.y=xo(i.y,e._targetY,o)),void 0!==e._targetR&&void 0!==i?.r&&(e.r=xo(i.r,e._targetR,o))}else if("rect"===e.type){if(void 0!==e._targetOpacity){let i=this.prevPositionMap.get(t),r=i?i.opacity??1:0;e.style.opacity=xo(r,e._targetOpacity,o)}if(void 0===e._targetX)continue;let i=this.prevPositionMap.get(t);if(!i)continue;e.x=xo(i.x,e._targetX,o),e.y=xo(i.y,e._targetY,o),void 0!==i.w&&(e.w=xo(i.w,e._targetW,o),e.h=xo(i.h,e._targetH,o))}else if("wedge"===e.type){if(void 0!==e._targetOpacity){let i=this.prevPositionMap.get(t),r=i?i.opacity??1:0;e.style={...e.style,opacity:xo(r,e._targetOpacity,o)}}if(void 0!==e._targetStartAngle&&void 0!==e._targetEndAngle){let i=this.prevPositionMap.get(t);i&&void 0!==i.startAngle&&(e.startAngle=xo(i.startAngle,e._targetStartAngle,o),e.endAngle=xo(i.endAngle,e._targetEndAngle,o))}}}if(t>=1){for(let e of this.scene)if(void 0!==e._targetOpacity&&(e.style={...e.style||{},opacity:0===e._targetOpacity?0:e._targetOpacity},e._targetOpacity=void 0),"point"===e.type){if(void 0===e._targetX&&void 0===e._targetR)continue;void 0!==e._targetX&&(e.x=e._targetX,e.y=e._targetY),void 0!==e._targetR&&(e.r=e._targetR),e._targetX=void 0,e._targetY=void 0,e._targetR=void 0}else if("rect"===e.type){if(void 0===e._targetX)continue;e.x=e._targetX,e.y=e._targetY,e.w=e._targetW,e.h=e._targetH,e._targetX=void 0,e._targetY=void 0,e._targetW=void 0,e._targetH=void 0}else"wedge"===e.type&&void 0!==e._targetStartAngle&&(e.startAngle=e._targetStartAngle,e.endAngle=e._targetEndAngle,e._targetStartAngle=void 0,e._targetEndAngle=void 0);if(this.exitNodes.length>0){let e=new Set(this.exitNodes);this.scene=this.scene.filter(t=>!e.has(t)),this.exitNodes=[]}return this.activeTransition=null,!1}return!0}cancelIntroAnimation(){this.prevPositionMap.clear(),this.activeTransition=null,Se(this.scene),this.exitNodes=[]}getBufferArray(){return this._bufferArrayCache?.version!==this._dataVersion&&(this._bufferArrayCache={version:this._dataVersion,data:this.buffer.toArray()}),this._bufferArrayCache.data}getData(){return this.buffer.toArray()}remove(e){if(!this.getDataId)throw new Error("remove() requires dataIdAccessor to be configured");this.config.transition&&this.scene.length>0&&this.snapshotPositions();let t=Pe(e),i=this.getDataId,o=e=>t.has(i(e));je(this.buffer,this.timestampBuffer,o);let r=this.buffer.remove(o);if(0===r.length)return this.updateResults.recordNoop("remove"),r;for(let e of r)this.evictValueExtent(e);return this.categories.clear(),this.buffer.forEach(e=>this.categories.add(this.getO(e))),this._dataVersion++,this.version++,this.lastIngestTime=this.currentTime(),this.updateResults.recordData("remove",r.length),r}update(e,t){if(!this.getDataId)throw new Error("update() requires dataIdAccessor to be configured");let i=Pe(e),o=this.getDataId,r=new Set;this.buffer.forEach((e,t)=>{i.has(o(e))&&r.add(t)});let a=this.buffer.update(e=>i.has(o(e)),t);if(0===a.length)return this.updateResults.recordNoop("update"),a;for(let e of a)this.evictValueExtent(e);return this.categories.clear(),this.buffer.forEach((e,t)=>{this.categories.add(this.getO(e)),r.has(t)&&this.pushValueExtent(e)}),this._dataVersion++,this.version++,this.lastIngestTime=this.currentTime(),this.updateResults.recordData("update",a.length),a}clear(){this.buffer.clear(),this.rExtent.clear(),this.categories.clear(),this._hasStreamingData=!1,this._hasRenderedOnce=!1,this.timestampBuffer&&this.timestampBuffer.clear(),this.prevPositionMap.clear(),this.exitNodes=[],this.activeTransition=null,this.lastIngestTime=0,this.scales=null,this.scene=[],this.columns={},this.multiScales=[],this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,this._pointQuadtree=null,this._maxPointRadius=0,this.styleResolver.resetColors(),this._dataVersion++,this.version++,this.updateResults.recordData("clear")}get size(){return this.buffer.size}getOAccessor(){return this.getO}getRAccessor(){return this.getR}applyCustomRestyle(e,t){let i=this._customRestyle;if(i)for(let o of e){let e=this._baseStyles.get(o)??o.style??{},r=i(o,t);o.style=r?{...e,...r}:e}}restyleScene(e){this._customRestyle?(this.applyCustomRestyle(this.scene,e),this.markStylePaintPending(),this.updateResults.recordRestyle(!0)):this.updateResults.recordRestyle(!1)}rebuildAccessorDerivedState(){this.categories.clear(),this.rExtent.clear();for(let e of this.rExtents)e.clear();this._categoryIndexCache=null,this.buffer.forEach(e=>{this.categories.add(this.getO(e)),this.pushValueExtent(e)})}updateConfig(e){let t={...this.config},i=Object.keys(e).filter(i=>e[i]!==t[i]);"production"!==process.env.NODE_ENV&&!this.windowSizeWarned&&"windowSize"in e&&e.windowSize!==t.windowSize&&(this.windowSizeWarned=!0,console.warn(`[Semiotic] windowSize changed after mount (${t.windowSize} → ${e.windowSize}) but it is a mount-only setting — the ring buffer keeps its original capacity. Remount the chart (e.g. via a React key) to apply a new windowSize.`)),("colorScheme"in e&&e.colorScheme!==t.colorScheme||"themeCategorical"in e&&e.themeCategorical!==t.themeCategorical||"colorAccessor"in e&&!Je(e.colorAccessor,t.colorAccessor))&&this.styleResolver.resetColors(),("categoryAccessor"in e&&!Je(e.categoryAccessor,t.categoryAccessor)||"oAccessor"in e&&!Je(e.oAccessor,t.oAccessor))&&(this._categoryIndexCache=null),Object.assign(this.config,e),"pulse"in e&&this.syncPulseTimestampBuffer();let o=!1;if("categoryAccessor"in e||"oAccessor"in e){let e=this.config.categoryAccessor||this.config.oAccessor,i=t.categoryAccessor||t.oAccessor;Je(e,i)||(this.getO=Ke(this.config.categoryAccessor||this.config.oAccessor,"category"),o=!0)}let r=!1;if("valueAccessor"in e||"rAccessor"in e){let e=this.config.valueAccessor||this.config.rAccessor,i=t.valueAccessor||t.rAccessor,o=Array.isArray(e)?e:[e],a=Array.isArray(i)?i:[i];if(r=o.length!==a.length||o.some((e,t)=>!Je(e,a[t])),r){let e=this.config.valueAccessor||this.config.rAccessor;Array.isArray(e)?(this.rAccessors=e.map(e=>Ze(e,"value")),this.getR=this.rAccessors[0],this.rExtents=e.map(()=>new Ae)):(this.getR=Ze(e,"value"),this.rAccessors=[this.getR],this.rExtents=[this.rExtent])}}"stackBy"in e&&!Je(e.stackBy,t.stackBy)&&(this.getStack=null!=this.config.stackBy?Ke(this.config.stackBy):void 0),"groupBy"in e&&!Je(e.groupBy,t.groupBy)&&(this.getGroup=null!=this.config.groupBy?Ke(this.config.groupBy):void 0),"colorAccessor"in e&&!Je(e.colorAccessor,t.colorAccessor)&&(this.getColor=null!=this.config.colorAccessor?Ke(this.config.colorAccessor):void 0),"symbolAccessor"in e&&!Je(e.symbolAccessor,t.symbolAccessor)&&(this.getSymbol=null!=this.config.symbolAccessor?Ke(this.config.symbolAccessor):void 0),"connectorAccessor"in e&&!Je(e.connectorAccessor,t.connectorAccessor)&&(this.getConnector=null!=this.config.connectorAccessor?Ke(this.config.connectorAccessor):void 0);let a="accessorRevision"in e&&e.accessorRevision!==t.accessorRevision;(o||r||a)&&this.rebuildAccessorDerivedState(),this.updateResults.recordConfig(i)}updateConfigWithResult(e){return this.updateConfig(e),this.updateResults.last}},v=null,b=null,x=(e,t)=>({x:e*Math.cos(t),y:e*Math.sin(t)}),w=(e,t,i,o)=>{let r=t.filter(e=>"wedge"===e.type);for(let t of r){let i=t.style.fillOpacity??1,o=t.style.opacity??1,r=t.style.strokeWidth??1,a=t.style.stroke,n=!!(a&&"none"!==a&&r>0);if(e.globalAlpha=i*o,t._gradientBand&&t._gradientBand.colors.length>0)Lr(e,t),t._pulseIntensity&&t._pulseIntensity>0&&(Mr(e,t),Ct(e,t)),e.globalAlpha=1;else{if(e.fillStyle=eo(e,t.style.fill,"#007bff"),t.roundedEnds){n&&(e.strokeStyle=Ui(e,a)||a,e.lineWidth=r);let i=Cr({innerRadius:t.innerRadius,outerRadius:t.outerRadius,startAngle:t.startAngle,endAngle:t.endAngle,cornerRadius:t.cornerRadius,roundStart:t.roundedEnds.start,roundEnd:t.roundedEnds.end});e.save(),e.translate(t.cx,t.cy);let o=new Path2D(i);e.fill(o),n&&e.stroke(o),e.restore()}else t.cornerRadius?(n&&(e.strokeStyle=Ui(e,a)||a,e.lineWidth=r),Ir(e,t)):(Mr(e,t),e.fill(),n&&(e.strokeStyle=Ui(e,a)||a,e.lineWidth=r,e.stroke()));t._pulseIntensity&&t._pulseIntensity>0&&(Mr(e,t),Ct(e,t)),e.globalAlpha=1}}},k=(e,t,i,o)=>{let r=t.filter(e=>"boxplot"===e.type);for(let t of r){let i=t.columnWidth/2,o="vertical"===t.projection,r=Ui(e,"var(--semiotic-primary, #007bff)"),a=Ui(e,"var(--semiotic-text, #333)"),n=eo(e,t.style.fill,r),l=t.style.stroke,s="string"==typeof l?Ui(e,l)||l:a,c=t.style.strokeWidth??1,h=c>0&&!("string"==typeof l&&"none"===l.trim().toLowerCase()),u=t.style.fillOpacity??t.style.opacity??.6;if(e.save(),h&&(e.strokeStyle=s,e.lineWidth=c,e.beginPath(),o?(e.moveTo(t.x,t.minPos),e.lineTo(t.x,t.maxPos)):(e.moveTo(t.minPos,t.y),e.lineTo(t.maxPos,t.y)),e.stroke(),e.beginPath(),o?(e.moveTo(t.x-.4*i,t.minPos),e.lineTo(t.x+.4*i,t.minPos),e.moveTo(t.x-.4*i,t.maxPos),e.lineTo(t.x+.4*i,t.maxPos)):(e.moveTo(t.minPos,t.y-.4*i),e.lineTo(t.minPos,t.y+.4*i),e.moveTo(t.maxPos,t.y-.4*i),e.lineTo(t.maxPos,t.y+.4*i)),e.stroke()),e.globalAlpha=u,e.fillStyle=n,o){let o=Math.min(t.q1Pos,t.q3Pos),r=Math.abs(t.q3Pos-t.q1Pos);e.fillRect(t.x-i,o,t.columnWidth,r),e.globalAlpha=1,h&&e.strokeRect(t.x-i,o,t.columnWidth,r)}else{let o=Math.min(t.q1Pos,t.q3Pos),r=Math.abs(t.q3Pos-t.q1Pos);e.fillRect(o,t.y-i,r,t.columnWidth),e.globalAlpha=1,h&&e.strokeRect(o,t.y-i,r,t.columnWidth)}h&&(e.strokeStyle=s,e.lineWidth=2*c,e.beginPath(),o?(e.moveTo(t.x-i,t.medianPos),e.lineTo(t.x+i,t.medianPos)):(e.moveTo(t.medianPos,t.y-i),e.lineTo(t.medianPos,t.y+i)),e.stroke()),e.restore()}},A=/*#__PURE__*/new WeakMap,S=(e,t,i,o)=>{for(let i of t){if("violin"!==i.type)continue;e.save(),(i.translateX||i.translateY)&&e.translate(i.translateX,i.translateY);let t=A.get(i);(!t||t.source!==i.pathString)&&(t={source:i.pathString,path:new Path2D(i.pathString)},A.set(i,t));let o=t.path;e.globalAlpha=i.style.fillOpacity??i.style.opacity??.6,e.fillStyle=eo(e,i.style.fill,"#007bff"),e.fill(o),e.globalAlpha=1;let r=i.style.strokeWidth??1;if(i.style.stroke&&"none"!==i.style.stroke&&r>0&&(e.strokeStyle=Ui(e,i.style.stroke)||i.style.stroke,e.lineWidth=r,e.stroke(o)),i.iqrLine){e.strokeStyle="#333",e.lineWidth=2,e.globalAlpha=.8;let t=i.iqrLine.centerPos,o=!1!==i.iqrLine.isVertical;e.beginPath(),o?(e.moveTo(t,i.iqrLine.q1Pos),e.lineTo(t,i.iqrLine.q3Pos)):(e.moveTo(i.iqrLine.q1Pos,t),e.lineTo(i.iqrLine.q3Pos,t)),e.stroke(),e.beginPath(),o?e.arc(t,i.iqrLine.medianPos,3,0,2*Math.PI):e.arc(i.iqrLine.medianPos,t,3,0,2*Math.PI),e.fillStyle="#fff",e.fill(),e.strokeStyle="#333",e.lineWidth=1,e.stroke(),e.globalAlpha=1}e.restore()}},P=(e,t,i,o)=>{let r=t.filter(e=>"connector"===e.type);if(0===r.length)return;let a=new Map;for(let e of r){let t=e.group||"_default";a.has(t)||a.set(t,[]),a.get(t).push(e)}for(let[,t]of a){if(0===t.length)continue;let i=t[0].style;if(i.fill&&"none"!==i.fill){e.beginPath(),e.moveTo(t[0].x1,t[0].y1);for(let i of t)e.lineTo(i.x2,i.y2);e.closePath(),e.globalAlpha=i.fillOpacity??i.opacity??.3,e.fillStyle=to(e,i.fill)??"#999",e.fill(),e.globalAlpha=1}for(let i of t){let t=i.style.strokeWidth??1;t<=0||"none"===i.style.stroke||(e.beginPath(),e.moveTo(i.x1,i.y1),e.lineTo(i.x2,i.y2),e.strokeStyle=Ui(e,i.style.stroke)||eo(e,i.style.fill,"")||Ui(e,"var(--semiotic-border, #999)"),e.lineWidth=t,e.globalAlpha=i.style.opacity??.5,e.stroke(),e.globalAlpha=1)}}},R=(e,t,i,o)=>{let r=t.filter(e=>"trapezoid"===e.type);for(let t of r){let i=t.points;if(i.length<4)continue;e.globalAlpha=t.style?.opacity??1,e.beginPath(),e.moveTo(i[0][0],i[0][1]);for(let t=1;t<i.length;t++)e.lineTo(i[t][0],i[t][1]);e.closePath(),e.fillStyle=to(e,t.style?.fill)||"#999",e.fill();let o=t.style?.strokeWidth??1;t.style?.stroke&&"none"!==t.style.stroke&&o>0&&(e.strokeStyle=Ui(e,t.style.stroke)||t.style.stroke,e.lineWidth=o,e.stroke()),e.globalAlpha=1}},C=(e,t,i,o)=>{let r=t.filter(e=>"rect"===e.type&&null!=e.datum);if(0===r.length||!r.some(e=>null!=e.datum?.__funnelStepLabel||null!=e.datum?.__funnelValueLabelX))return;let a=Ui(e,"var(--semiotic-font-family, sans-serif)")||"sans-serif";e.textBaseline="top",e.lineJoin="round",e.textAlign="center",e.font=`bold 14px ${a}`;for(let t of r){let i=t.datum;if(!i||!i.__funnelStepLabel)continue;let o=i.__funnelStepLabel;if(e.measureText(o).width+16>(i.__funnelRowWidth??i.__funnelBarW??0))continue;let r=i.__funnelStepLabelX,a=i.__funnelStepLabelY+3;e.strokeStyle="rgba(0,0,0,0.6)",e.lineWidth=3,e.strokeText(o,r,a),e.fillStyle="#fff",e.fillText(o,r,a)}e.font=`bold 13px ${a}`;for(let t of r){let i=t.datum;if(!i||null==i.__funnelValueLabelX)continue;let o=i.__funnelBarW??0;if(o<60)continue;let r=i.__funnelValue;if(null==r||0===r)continue;let a,n=i.__funnelPercent,l=!0===i.__funnelIsFirstStep;if(a=l?Tr(r):null!=n?`${Tr(r)} (${Hr(n)})`:Tr(r),e.measureText(a).width+16>o){if(l||null==n)continue;if(a=Tr(r),e.measureText(a).width+16>o)continue}let s=i.__funnelValueLabelX,c=(i.__funnelValueLabelY??t.y)+14+5;e.textAlign="center",e.strokeStyle="rgba(0,0,0,0.5)",e.lineWidth=3,e.strokeText(a,s,c),e.fillStyle="#fff",e.fillText(a,s,c)}e.lineWidth=1,e.lineJoin="miter"},_={stroke:"rgba(255,255,255,0.5)",lineWidth:1.5,spacing:6,angle:45,lineOpacity:1},L=/*#__PURE__*/new Map,M=(e,t,i,o)=>{let r=t.filter(e=>"rect"===e.type&&!0===e.datum?.__barFunnelIsDropoff);for(let t of r){let i=("string"==typeof t.style.fill?t.style.fill:null)||Ui(e,"var(--semiotic-border, #999)"),o=Br(i,e);e.globalAlpha=t.style.opacity??1,e.beginPath(),e.rect(t.x,t.y,t.w,t.h),o?e.fillStyle=o:(e.fillStyle=i,e.globalAlpha=.4*(t.style.opacity??1)),e.fill(),e.globalAlpha=1}},I=(e,t,i,o)=>{let r=t.filter(e=>"rect"===e.type&&!0!==e.datum?.__barFunnelIsDropoff&&null!=e.datum?.__barFunnelLabelX);if(0===r.length)return;let a=Ui(e,"var(--semiotic-font-family, sans-serif)")||"sans-serif",n=Fr(e,Ui(e,"var(--semiotic-text, #333)")),l=n?"#1f2937":"#ffffff",s=n?"rgba(255,255,255,0.18)":"rgba(0,0,0,0.12)",c=n?"#f3f4f6":"#1a1a1a",h=c;for(let t of r){let i=t.datum;if(!i)continue;let o=i.__barFunnelValue;if(null==o||t.w<25)continue;let r=i.__barFunnelPercent,n=!(!0===i.__barFunnelIsFirstStep)&&null!=r,u=n?Dr(r):"",d=Or(o);e.font=`bold 13px ${a}`;let g=n?e.measureText(u).width:0;e.font=`11px ${a}`;let m=e.measureText(d).width,p=Math.max(g,m)+12,y=n?32:17,f=i.__barFunnelLabelX,v=f-p/2,b=i.__barFunnelLabelY-y-4;e.save(),e.shadowColor="rgba(0,0,0,0.15)",e.shadowBlur=4,e.shadowOffsetY=1,e.fillStyle=l,e.beginPath(),$r(e,v,b,p,y,4),e.fill(),e.restore(),e.strokeStyle=s,e.lineWidth=.5,e.beginPath(),$r(e,v,b,p,y,4),e.stroke(),e.textAlign="center",e.textBaseline="top",n?(e.font=`bold 13px ${a}`,e.fillStyle=c,e.fillText(u,f,b+3),e.font=`11px ${a}`,e.fillStyle=h,e.fillText(d,f,b+3+13+2)):(e.font=`bold 11px ${a}`,e.fillStyle=c,e.fillText(d,f,b+3))}e.lineWidth=1},T=/*#__PURE__*/Wr(ke),H=/*#__PURE__*/Wr(qe),B=/*#__PURE__*/Wr(Xe),$=/*#__PURE__*/Wr(Ye),F={bar:/*#__PURE__*/(i=e=>[P,...e])([T]),clusterbar:/*#__PURE__*/i([T]),point:/*#__PURE__*/i([H,B]),swarm:/*#__PURE__*/i([H,B]),pie:[w],donut:[w],boxplot:/*#__PURE__*/i([k,H]),violin:/*#__PURE__*/i([S]),histogram:/*#__PURE__*/i([T]),ridgeline:/*#__PURE__*/i([S]),timeline:/*#__PURE__*/i([T]),funnel:[T,R,C],"bar-funnel":[T,M,I],swimlane:/*#__PURE__*/i([T]),custom:/*#__PURE__*/i([T,H,B,$,w,k,S,R])},O=/*#__PURE__*/Qr(),D=/*#__PURE__*/go(function({hover:e}){let t=e.data||{},i=e.stats,o=e.category;if(Array.isArray(t)){let e=o||t[0]?.category||"";if(i)return O({category:e,stats:i});let r=t.length;return Bo("div",{className:"semiotic-tooltip",style:uo,children:[e&&Ho("div",{style:{fontWeight:"bold"},children:String(e)}),Bo("div",{children:[r," items"]})]})}if(null!=t.bin&&null!=t.count){let e=t.range||[];return Bo("div",{className:"semiotic-tooltip",style:uo,children:[t.category&&Ho("div",{style:{fontWeight:"bold"},children:String(t.category)}),Bo("div",{children:["Count: ",t.count]}),2===e.length&&Bo("div",{style:{opacity:.8},children:[Number(e[0]).toFixed(1)," – ",Number(e[1]).toFixed(1)]})]})}let r=e.__oAccessor,a=e.__rAccessor,n=e.__chartType;if("swarm"===n||"point"===n)return Kr(t);let l=(r&&null!=t[r]?t[r]:null)||t.category||t.name||t.group||t.__rName||"",s=t.__aggregateValue??(a&&null!=t[a]?t[a]:null)??t.value??t.__rValue??t.pct??"";return l||""!==s?Bo("div",{className:"semiotic-tooltip",style:uo,children:[l&&Ho("div",{style:{fontWeight:"bold"},children:String(l)}),""!==s&&Ho("div",{children:"number"==typeof s?s.toLocaleString():String(s)})]}):Kr(t)}),E=Qe,W=/*#__PURE__*/Jt(/*#__PURE__*/Lo(/*#__PURE__*/Mo(function(e,t){let{chartType:i,runtimeMode:o,data:r,oAccessor:a="category",rAccessor:n="value",colorAccessor:l,symbolAccessor:s,symbolMap:c,stackBy:h,groupBy:u,multiAxis:d,timeAccessor:g,valueAccessor:m,categoryAccessor:p,accessorRevision:y,projection:v="vertical",size:b=[600,400],responsiveWidth:x,responsiveHeight:w,margin:k,maxDevicePixelRatio:A,barPadding:S,roundedTop:P,gradientFill:R,trackFill:C,baselinePadding:_,innerRadius:L,cornerRadius:M,normalize:I,startAngle:T,sweepAngle:H,dynamicColumnWidth:B,bins:$,showOutliers:O,showIQR:W,amplitude:N,connectorOpacity:j,showLabels:z,connectorAccessor:V,connectorStyle:G,dataIdAccessor:q,rExtent:X,oExtent:Y,extentPadding:Q=.05,oSort:K,windowMode:Z="sliding",windowSize:J=200,pieceStyle:U,summaryStyle:ee,renderMode:te,colorScheme:ie,barColors:oe,showAxes:re=!0,showCategoryTicks:ae,categoryLabel:ne,valueLabel:le,categoryFormat:se,valueFormat:ce,oLabel:he,rLabel:ue,oFormat:de,rFormat:ge,rTickValues:me,tickLabelEdgeAlign:pe,axisExtent:ye,enableHover:fe=!0,hoverRadius:ve=30,hoverAnnotation:be,tooltipContent:xe,customHoverBehavior:we,customClickBehavior:ke,onObservation:Ae,annotationObservationCallback:Se,chartId:Pe,annotations:Re,onAnnotationActivate:Te,autoPlaceAnnotations:Be,svgAnnotationRules:$e,showGrid:Fe=!1,legend:Oe,legendHoverBehavior:De,legendClickBehavior:Ee,legendHighlightedCategory:We,legendIsolatedCategories:Ne,legendPosition:je,legendLayout:qe,legendCategoryAccessor:Xe,onCategoriesChange:Ye,backgroundGraphics:Qe,foregroundGraphics:Ke,interactiveGraphics:Ze,interactiveGraphicsLabel:Je,title:Ue,className:et,background:tt,centerContent:it,decay:ot,pulse:rt,transition:at,animate:nt,staleness:lt,frameScheduler:st,clock:ct,random:ht,seed:ut,paused:dt=!1,suspendWhenHidden:kt=!0,brush:At,onBrush:St,accessibleTable:Pt=!0,description:Rt,summary:Ct,customLayout:Lt,onLayoutError:Mt,layoutConfig:It,layoutSelection:Tt}=e,{customHoverBehavior:Ht,customClickBehavior:Bt,hasClickBehavior:$t}=ze({customHoverBehavior:we,customClickBehavior:ke,onObservation:Ae,chartId:Pe,chartType:"StreamOrdinalFrame"}),Ft=p??a,Ot=m??n,Dt=ne??he,Et=le??ue,Wt=se??de,zt=ce??ge,Vt=Co(!0),Gt=Ut({sizeProp:b,responsiveWidth:x,responsiveHeight:w,userMargin:k,marginDefault:E,title:Ue,legend:Oe,legendPosition:je,...Ce(e,Oe),animate:nt,transitionProp:at,frameScheduler:st,clock:ct,random:ht,seed:ut,paused:dt,suspendWhenHidden:kt,themeDirtyRef:Vt}),{reducedMotionRef:qt,responsiveRef:Xt,size:Yt,margin:Qt,adjustedWidth:Kt,adjustedHeight:Zt,currentTheme:Jt,transition:ki,introEnabled:Ai,tableId:Si,rafRef:Pi,renderFnRef:Ri,scheduleRender:Ci,frameRuntime:_i}=Gt;Io(()=>lo(()=>{Vt.current=!0,Ci()}),[Ci]);let Li=ei(),Mi=ti(),Ii=Ro(()=>ii(r),[r]),Ti=Co(null),Hi=Co(!1),[Bi,$i]=To(null),[Fi,Oi]=To(null),Di=gt(Ke,Yt,Qt,Fi),Ei=gt(Qe,Yt,Qt,Fi),Wi=Qe||"transparent"===tt?null:Ho("rect",{className:"semiotic-canvas-background","data-semiotic-layer":"canvas-background",x:-Qt.left,y:-Qt.top,width:Yt[0],height:Yt[1],fill:tt||`var(--semiotic-bg, ${Jt.colors.background})`}),Ni=Qe&&tt&&"transparent"!==tt?Ho("rect",{className:"semiotic-canvas-background semiotic-canvas-background--combined","data-semiotic-layer":"canvas-background",x:-Qt.left,y:-Qt.top,width:Yt[0],height:Yt[1],fill:tt}):null,[ji,zi]=To(0),Vi=Co(0),[Gi,qi]=To(!1),Xi=Co({w:-1,h:-1}),Yi=Co(!1),Qi=oi("StreamOrdinalFrame"),Ki=fe||be,Zi="streaming"===o,Ji=Ro(()=>({chartType:i,runtimeMode:Zi?"streaming":"bounded",windowSize:J,windowMode:Z,extentPadding:Q,projection:v,oAccessor:Zi?void 0:Ft,rAccessor:Zi?void 0:Ot,accessorRevision:y,colorAccessor:l,symbolAccessor:s,symbolMap:c,stackBy:h,groupBy:u,multiAxis:d,timeAccessor:Zi?g:void 0,valueAccessor:Zi?m||("string"==typeof Ot||"function"==typeof Ot?Ot:void 0):void 0,categoryAccessor:Zi?Ft:void 0,rExtent:X,oExtent:Y,axisExtent:ye,barPadding:S,roundedTop:P,gradientFill:He(R),trackFill:C,baselinePadding:_,innerRadius:L,cornerRadius:M,normalize:I,startAngle:T,sweepAngle:H,dynamicColumnWidth:B,bins:$,showOutliers:O,showIQR:W,amplitude:N,connectorOpacity:j,showLabels:z,connectorAccessor:V,connectorStyle:G,dataIdAccessor:q,oSort:K,pieceStyle:U,summaryStyle:ee,colorScheme:ie,themeCategorical:Jt?.colors?.categorical,themeSemantic:mo(Jt),themeSequential:Jt?.colors?.sequential,themeDiverging:Jt?.colors?.diverging,barColors:oe,decay:ot,pulse:rt,transition:ki,introAnimation:Ai,staleness:lt,clock:_i.now,customLayout:Lt,onLayoutError:Mt,layoutConfig:It,layoutMargin:Qt}),[i,Zi,J,Z,Q,v,Ft,Ot,y,l,s,c,h,u,d,g,m,X,Y,ye,S,P,R,C,_,L,M,I,T,H,B,$,O,W,N,j,z,V,G,q,K,U,ee,ie,Jt,oe,ot,rt,ki,Ai,lt,_i.now,Lt,Mt,It,Qt]),Ui=ri(Ji),eo=Co(null);eo.current||(eo.current=new f(Ui));let to=mt(eo,Xe,Ye,e=>e.getData());pt(eo,Ui,Vt,Ci),yt(eo,Tt,Vt,Ci);let io=Co(null);io.current||(io.current=new _e(e=>{let t=eo.current;t&&t.ingest(e)&&(Vt.current=!0,Ci())})),nr(t,{storeRef:eo,adapterRef:io,dirtyRef:Vt,scheduleRender:Ci,hoverRef:Ti,setHoverPoint:$i}),Io(()=>{r&&io.current?.setBoundedData(Ii)},[r,Ii]);let{canvasRef:oo,resolutionDirtyRef:ro}=ai(Gt,{storeRef:eo,dirtyRef:Vt,hydrated:Li,wasHydratingFromSSR:Mi,cleanup:()=>io.current?.clear(),maxDevicePixelRatio:A,canvasPaintDependencies:[i,Kt,Zt,re,tt,Qe,te,Ci]}),{hoverHandlerRef:ao,hoverLeaveRef:no,onPointerMove:so,onPointerLeave:co,flushPointerMove:ho,pointerStateRef:uo}=Gt;ao.current=e=>{let t=oo.current;if(!t)return;let o=eo.current;if(!o)return void ni(t);let r=kr({pointer:e,canvasRect:t.getBoundingClientRect(),margin:{left:Qt.left,top:Qt.top},width:Kt,height:Zt,projection:v,hoverRadius:ve,scene:o.scene,pointQuadtree:o.pointQuadtree,maxPointRadius:o.maxPointRadius});if(ni(t,"hit"===r.kind?jt(r.hit.node):void 0),!Ki)return;if("hit"!==r.kind)return void(Ti.current&&(Ti.current=null,$i(null),Ht&&Ht(null),Ci()));let a=Ar(r.hit,{oAccessor:Ft,rAccessor:Ot,chartType:i});Ti.current=a,$i(a),Ht?.(a),Ci()},no.current=()=>{ni(oo.current),Ti.current&&(Ti.current=null,$i(null),Ht?.(null),Ci())},li(oo);let go=So(e=>{if(si(e.target)||!Bt)return;ho();let t=oo.current;if(!t)return Bt(null),void Ci();let o=eo.current;if(!o)return Bt(null),void Ci();let r=kr({pointer:e,canvasRect:t.getBoundingClientRect(),margin:{left:Qt.left,top:Qt.top},width:Kt,height:Zt,projection:v,hoverRadius:ve,scene:o.scene,pointQuadtree:o.pointQuadtree,maxPointRadius:o.maxPointRadius});if("hit"!==r.kind)return Bt(null),void Ci();Bt(Ar(r.hit,{oAccessor:Ft,rAccessor:Ot,chartType:i}),{type:"activate",inputType:ci(e.nativeEvent.pointerType)}),Ci()},[Bt,oo,Qt.left,Qt.top,Kt,Zt,v,ve,Ft,Ot,i,Ci,ho]),{kbFocusIndexRef:fo,focusedNavPointRef:vo,onKeyDown:bo,refreshKeyboardFocus:xo}=Ve({clearPointerHover:co,storeRef:eo,hoverRef:Ti,setHoverPoint:$i,customHoverBehavior:Ht,customClickBehavior:Bt,scheduleRender:Ci,chartType:i,oAccessor:Ft,rAccessor:Ot}),wo=So(e=>{ft(uo,e,!!Ki,Hi.current,oo.current,"mouse")&&(fo.current=-1,vo.current=null,so(e))},[oo,Ki,vo,fo,so,uo]);Ri.current=()=>{if(Pi.current=null,!_i.isActive)return;let e=oo.current;if(!e)return;let t=e.getContext("2d");if(!t)return;let o=eo.current;if(!o)return;let r=_i.now(),a=null!=o.activeTransition,n=o.advanceTransition(qt.current?r+1e6:r),l=!qt.current&&n,s=Xi.current.w!==Kt||Xi.current.h!==Zt,c=Vt.current,h=o.consumeStylePaintPending(),u=!1,d=Qi.current.beforeCompute(o.getLastUpdateResult(),l);var g;(c||s)&&(!l||s)&&(o.computeScene({width:Kt,height:Zt}),xo(),Xi.current={w:Kt,h:Zt},u=!0,to()),(u||h)&&(Hi.current=hi(e,o.scene)),Hi.current&&(a||u||h)&&(g={canvas:e,pointer:uo.current,store:o,margin:{left:Qt.left,top:Qt.top},width:Kt,height:Zt,projection:v,hoverRadius:ve,geometryMoved:a||u},Nt(g.canvas,g.pointer,e=>{let t=kr({pointer:e,canvasRect:g.canvas.getBoundingClientRect(),margin:g.margin,width:g.width,height:g.height,projection:g.projection,hoverRadius:g.hoverRadius,scene:g.store.scene,pointQuadtree:g.geometryMoved?null:g.store.pointQuadtree,maxPointRadius:g.store.maxPointRadius});return"hit"===t.kind?jt(t.hit.node):void 0})),Qi.current.afterCompute(d,u,s),Vt.current=c&&l&&!u,ro.current=!1;let m=Ge(o,r,u,Yi);(u||a)&&e.setAttribute("aria-label",ui(o.scene,i+" chart"));let p=di(A,Yt),{effectiveDprX:y,effectiveDprY:f}=gi(e,Yt,p);t.setTransform(y,0,0,f,0,0),t.clearRect(0,0,Yt[0],Yt[1]);let b=lt?.threshold??5e3,x=lt&&o.lastIngestTime>0&&r-o.lastIngestTime>b;x&&(t.globalAlpha=lt?.dimOpacity??.5);let w="radial"===v;t.save(),t.beginPath(),t.rect(Qt.left,Qt.top,Kt,Zt),t.clip(),w?(t.save(),t.translate(Qt.left+Kt/2,Qt.top+Zt/2)):t.translate(Qt.left,Qt.top);let k=Lt?F.custom:F[i]||[],S={width:Kt,height:Zt},P=o.scales;P&&vt({context:t,nodes:o.scene,renderMode:te,pixelRatio:p,paintBuiltIn:e=>{for(let i of k)i(t,e,P,S)}}),w&&t.restore(),t.restore(),x&&(t.globalAlpha=1),o.scales&&(u||a&&(!n||r-Vi.current>=33))&&(u&&Oi(o.scales),zi(e=>e+1),Vi.current=r),lt?.showBadge&&qi(!!x),(l||null!=o.activeTransition||m.pending)&&Ci()},bt(lt,eo,Vt,Ci,_i.now,Gi,qi);let ko=Ki&&Bi?xe?xe(Bi):Ho(D,{hover:Bi}):null,Ao="radial"===v,Po=Bi?Ao?Bi.x+Kt/2:Bi.x:0,_o=Bi?Ao?Bi.y+Zt/2:Bi.y:0,Lo=po(ko)?Ho(mi,{contentOwnsChrome:yo(xe),x:Po,y:_o,containerWidth:Kt,containerHeight:Zt,margin:Qt,className:"stream-ordinal-tooltip",children:ko}):null,Mo="horizontal"===v?Ft:Ot,$o=Le("horizontal"===v?Ot:Ft,void 0,"__semiotic_resolvedO",""),Fo=Le(Mo,void 0,"__semiotic_resolvedR",""),Oo=$o.key,Do=Fo.key,Eo=Re&&Re.length>0||!1,Wo=Me($o,Fo,Eo);if(pi||!Li&&Mi){let e=eo.current;e&&r&&(e.ingest({inserts:Ii,bounded:!0}),e.computeScene({width:Kt,height:Zt}),e.cancelIntroAnimation());let t=e?.scene??[],o=e?.scales??null,a=gt(Ke,Yt,Qt,o),n=gt(Qe,Yt,Qt,o),l="radial"===v,s=l?Qt.left+Kt/2:Qt.left,c=l?Qt.top+Zt/2:Qt.top;return Bo("div",{ref:Xt,className:"stream-ordinal-frame"+(et?` ${et}`:""),role:"group","aria-label":Rt||("string"==typeof Ue?Ue:"Ordinal chart"),style:{position:"relative",fontFamily:"var(--semiotic-font-family, sans-serif)",width:x?"100%":Yt[0],height:w?"100%":Yt[1]},children:[Ho(yi,{accessibleTable:Pt,scene:t,chartType:i+" chart",tableId:Si,chartTitle:"string"==typeof Ue?Ue:void 0}),Ho(fi,{summary:Ct}),Bo("div",{role:"img","aria-label":Rt||("string"==typeof Ue?Ue:"Ordinal chart"),children:[Bo("svg",{role:"presentation",xmlns:"http://www.w3.org/2000/svg",width:Yt[0],height:Yt[1],style:{position:"absolute",left:0,top:0},children:[Ho("defs",{children:Ho("clipPath",{id:`${Si}-plot-clip`,children:Ho("rect",{x:Qt.left,y:Qt.top,width:Kt,height:Zt})})}),Bo("g",{transform:`translate(${Qt.left},${Qt.top})`,children:[Wi,Ni,n]}),Ho("g",{clipPath:`url(#${Si}-plot-clip)`,children:Ho("g",{transform:`translate(${s},${c})`,children:Yr({nodes:t,renderMode:te,idPrefix:Si}).map(e=>e.element)})})]}),Ho(Pr,{decorative:!0,width:Kt,height:Zt,totalWidth:Yt[0],totalHeight:Yt[1],margin:Qt,scales:o,columns:e?.columns,showAxes:re,showCategoryTicks:ae,oLabel:Dt,rLabel:Et,oFormat:Wt,rFormat:zt,rTickValues:me,tickLabelEdgeAlign:pe,axisExtent:ye,showGrid:Fe,title:Ue,description:Rt,legend:Oe,legendHoverBehavior:De,legendClickBehavior:Ee,legendHighlightedCategory:We,legendIsolatedCategories:Ne,legendPosition:je,legendLayout:qe,foregroundGraphics:xt(a,_t(eo.current?.customLayoutOverlays,Tt??null)),annotations:Re,onAnnotationActivate:Te,onObservation:Se??Ae,chartId:Pe,chartType:"StreamOrdinalFrame",autoPlaceAnnotations:Be,svgAnnotationRules:$e,annotationFrame:0,xAccessor:Oo,yAccessor:Do,annotationData:Wo(e?.getData())}),null!=it&&"radial"===v&&Ho(zo,{content:it,centerX:Qt.left+Kt/2,centerY:Qt.top+Zt/2,width:Yt[0],height:Yt[1]})]})]})}return Bo("div",{ref:Xt,className:"stream-ordinal-frame"+(et?` ${et}`:""),role:"group","aria-label":Rt||("string"==typeof Ue?Ue:"Ordinal chart"),tabIndex:0,style:{position:"relative",fontFamily:"var(--semiotic-font-family, sans-serif)",width:x?"100%":Yt[0],height:w?"100%":Yt[1],overflow:"visible"},onKeyDown:bo,children:["production"!==process.env.NODE_ENV&&eo.current&&Ho(vi,{store:eo.current,diagnostics:Qi.current}),Ho(yi,{accessibleTable:Pt,sceneRevision:eo.current?.getUpdateSnapshot().revisions.accessibility,scene:eo.current?.scene??[],chartType:i+" chart",tableId:Si,chartTitle:"string"==typeof Ue?Ue:void 0}),Ho(fi,{summary:Ct}),Ho(bi,{active:fo.current>=0,hoverPoint:Bi,scene:eo.current?.scene}),Bo("div",{role:"img","aria-label":Rt||("string"==typeof Ue?Ue:"Ordinal chart"),style:{position:"relative",width:"100%",height:"100%"},onMouseMove:wo,onMouseLeave:co,onClick:$t?go:void 0,children:[Bo(xi,{size:Yt,margin:Qt,children:[Ni,Wi,Ei]}),Ho(Sr,{width:Kt,height:Zt,totalWidth:Yt[0],totalHeight:Yt[1],margin:Qt,scales:Fi,showAxes:re,showGrid:Fe,rFormat:zt,rTickValues:me,axisExtent:ye}),Ho("canvas",{"aria-hidden":"true",ref:oo,"aria-label":ui(eo.current?.scene??[],i+" chart"),style:{position:"absolute",top:0,left:0,width:Yt[0],height:Yt[1]}}),Ho(Pr,{decorative:!0,width:Kt,height:Zt,totalWidth:Yt[0],totalHeight:Yt[1],margin:Qt,scales:Fi,columns:eo.current?.columns,showAxes:re,showCategoryTicks:ae,oLabel:Dt,rLabel:Et,oFormat:Wt,rFormat:zt,rTickValues:me,axisExtent:ye,showGrid:Fe,title:Ue,description:Rt,legend:Oe,legendHoverBehavior:De,legendClickBehavior:Ee,legendHighlightedCategory:We,legendIsolatedCategories:Ne,legendPosition:je,legendLayout:qe,foregroundGraphics:xt(Di,_t(eo.current?.customLayoutOverlays,Tt??null)),annotations:Re,onAnnotationActivate:Te,onObservation:Se??Ae,chartId:Pe,chartType:"StreamOrdinalFrame",autoPlaceAnnotations:Be,svgAnnotationRules:$e,annotationFrame:ji,xAccessor:Oo,yAccessor:Do,annotationData:Wo(eo.current?.getData()),underlayRendered:!0,canvasObscuresUnderlay:!1}),(At||St)&&"radial"!==v&&Ho(Rr,{width:Kt,height:Zt,totalWidth:Yt[0],totalHeight:Yt[1],margin:Qt,scales:Fi,onBrush:St||(()=>{})}),null!=it&&"radial"===v&&Ho(zo,{content:it,centerX:Qt.left+Kt/2,centerY:Qt.top+Zt/2,width:Yt[0],height:Yt[1]}),lt?.showBadge&&Ho(wt,{isStale:Gi,position:lt.badgePosition,state:lt.state,settling:lt.settling}),Ho(wi,{active:fo.current>=0,hoverPoint:Bi,margin:Qt,size:Yt,shape:vo.current?.shape,width:vo.current?.w,height:vo.current?.h,pathData:vo.current?.pathData}),Lo]}),Ho(Ie,{graphics:Ze,size:Yt,margin:Qt,scales:Fi,label:Je})]})})),"StreamOrdinalFrame"),N=W,j=/*#__PURE__*/Jt(/*#__PURE__*/Mo(function(e,t){let i=Si(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,categoryLabel:e.categoryLabel,valueLabel:e.valueLabel,showCategoryTicks:e.showCategoryTicks,orientation:e.orientation,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),o=Co(null),{data:r,margin:a,className:n,categoryAccessor:l="category",valueAccessor:s="value",orientation:c="vertical",valueFormat:h,colorBy:u,colorScheme:d,sort:g=!1,barPadding:m=40,roundedTop:p,gradientFill:y=!1,styleRules:f,baselinePadding:v=!1,tooltip:b,annotations:x,regression:w,valueExtent:k,frameProps:A={},selection:S,linkedHover:P,linkedBrush:R,brush:C,onBrush:_,onObservation:L,onClick:M,hoverHighlight:I,chartId:T,loading:H,loadingContent:B,emptyContent:$,legendInteraction:F,legendPosition:O,color:D,stroke:E,strokeWidth:W,opacity:j,showCategoryTicks:z,categoryFormat:V,dataIdAccessor:G}=e,{width:q,height:X,enableHover:Y,showGrid:Q,showLegend:K,title:Z,description:J,summary:U,accessibleTable:ee,categoryLabel:te,valueLabel:ie}=i,oe=Ro(()=>ii(r),[r]),re=ve({responsive:e,data:oe,rawData:r,colorBy:u,colorScheme:d,legendInteraction:F,legendPosition:O,frameLegend:A,selection:S,linkedHover:P,fallbackFields:u?["string"==typeof u?u:""]:[],unwrapData:!0,onObservation:L,onClick:M,hoverHighlight:I,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"BarChart",chartId:T,showLegend:K,userMargin:a,marginDefaults:i.marginDefaults,loading:H,loadingContent:B,emptyContent:$,width:q,height:X,hasTitle:!!Z,axisChrome:Ht({showAxes:i.showAxes,projection:"horizontal"===c?"horizontal":"vertical",hasCategoryLabel:!!te,hasValueLabel:!!ie})}),{effectiveLegendProps:ae,effectiveMargin:ne}=Zr({ref:t,frameRef:o,setup:re});Pi("BarChart",oe,"categoryAccessor",l),Pi("BarChart",oe,"valueAccessor",s);let le=Ri(oe,g,s),se=Ci(),ce=Ro(()=>new Map,[]),he=Ro(()=>_i(s),[s]),ue=Ur({brushProp:C,onBrushProp:_,linkedBrush:R,valueAccessor:s}),de=Jr({colorBy:u,colorScale:re.colorScale,color:D,themeCategorical:se,colorScheme:d,categoryIndexMap:ce,userPieceStyle:A?.pieceStyle,stroke:E,strokeWidth:W,opacity:j,styleRules:f,resolveRuleValue:he,effectiveSelectionHook:re.effectiveSelectionHook,resolvedSelection:re.resolvedSelection}),ge=Ro(()=>At({categoryAccessor:l,valueAccessor:s,groupAccessor:u&&u!==l?u:void 0,groupLabel:"string"==typeof u?u:"group",valueFormat:h}),[l,s,u,h]),me=Ro(()=>He(y),[y]);if(re.earlyReturn)return re.earlyReturn;let ye=fe({componentName:"BarChart",data:r,accessors:{categoryAccessor:l,valueAccessor:s}});if(ye)return Ho(Li,{componentName:"BarChart",message:ye,width:q,height:X});let be=pe(w),xe=be?[be,...x||[]]:x,we={chartType:"bar",...null!=r&&{data:le},oAccessor:l,rAccessor:s,projection:"horizontal"===c?"horizontal":"vertical",pieceStyle:de,size:[q,X],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:ne,barPadding:m,...null!=p&&{roundedTop:p},...me&&{gradientFill:me},...G&&{dataIdAccessor:G},baselinePadding:v,enableHover:Y,showAxes:i.showAxes,oLabel:te,rLabel:ie,rFormat:h,...V&&{oFormat:V},showGrid:Q,showCategoryTicks:z,oSort:g,...ae,...Rt({title:Z,description:J,summary:U,accessibleTable:ee,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Pt({tooltip:b,defaultTooltipContent:ge}),...St({linkedHover:P,selection:S,onObservation:L,onClick:M,hoverHighlight:I,mobileInteraction:re.mobileInteraction,customHoverBehavior:re.customHoverBehavior,customClickBehavior:re.customClickBehavior}),...xe&&xe.length>0&&{annotations:xe},...k&&{rExtent:k},...ue.brushStreamProps,...Object.fromEntries(Object.entries(A).filter(([e])=>"pieceStyle"!==e))};return Ho(Mi,{componentName:"BarChart",width:q,height:X,children:Ho(N,{ref:o,...we})})}),"BarChart"),z=/*#__PURE__*/Jt(/*#__PURE__*/Mo(function(e,t){let i=Si(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,categoryLabel:e.categoryLabel,valueLabel:e.valueLabel,showCategoryTicks:e.showCategoryTicks,orientation:e.orientation,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),o=Co(null),{data:r,margin:a,className:n,categoryAccessor:l="category",stackBy:s,valueAccessor:c="value",orientation:h="vertical",valueFormat:u,colorBy:d,colorScheme:g,normalize:m=!1,sort:p=!1,barPadding:y=40,roundedTop:f,gradientFill:v,styleRules:b,baselinePadding:x=!1,tooltip:w,annotations:k,valueExtent:A,frameProps:S={},selection:P,linkedHover:R,linkedBrush:C,brush:_,onBrush:L,onObservation:M,onClick:I,hoverHighlight:T,chartId:H,loading:B,loadingContent:$,emptyContent:F,legendInteraction:O,legendPosition:D,color:E,stroke:W,strokeWidth:j,opacity:z,categoryFormat:V}=e,{width:G,height:q,enableHover:X,showGrid:Y,showLegend:Q,title:K,description:Z,summary:J,accessibleTable:U,categoryLabel:ee,valueLabel:te}=i,ie=Ro(()=>ii(r),[r]),oe=d||s,re=ve({responsive:e,data:ie,rawData:r,colorBy:oe,colorScheme:g,legendInteraction:O,legendPosition:D,frameLegend:S,selection:P,linkedHover:R,fallbackFields:oe?["string"==typeof oe?oe:""]:[],unwrapData:!0,onObservation:M,onClick:I,hoverHighlight:T,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"StackedBarChart",chartId:H,showLegend:Q,userMargin:a,marginDefaults:i.marginDefaults,loading:B,loadingContent:$,emptyContent:F,width:G,height:q,hasTitle:!!K,axisChrome:Ht({showAxes:i.showAxes,projection:"horizontal"===h?"horizontal":"vertical",hasCategoryLabel:!!ee,hasValueLabel:!!te})}),ae=Ci(),ne=Ro(()=>new Map,[]),le=Ro(()=>_i(c),[c]),se=Ur({brushProp:_,onBrushProp:L,linkedBrush:C,valueAccessor:c}),ce=Jr({colorBy:oe,colorScale:re.colorScale,color:E,themeCategorical:ae,colorScheme:g,categoryIndexMap:ne,userPieceStyle:S?.pieceStyle,stroke:W,strokeWidth:j,opacity:z,styleRules:b,resolveRuleValue:le,effectiveSelectionHook:re.effectiveSelectionHook,resolvedSelection:re.resolvedSelection}),he=Ro(()=>At({categoryAccessor:s,valueAccessor:c,groupAccessor:l,valueFormat:u}),[s,l,c,u]),ue=fe({componentName:"StackedBarChart",data:r,accessors:{categoryAccessor:l,valueAccessor:c},requiredProps:{stackBy:s}}),{effectiveLegendProps:de,effectiveMargin:ge}=Zr({ref:t,frameRef:o,setup:re}),me=Ro(()=>He(v),[v]);if(re.earlyReturn)return re.earlyReturn;let pe={chartType:"bar",...null!=r&&{data:ie},oAccessor:l,rAccessor:c,stackBy:s,normalize:m,oSort:p,projection:"horizontal"===h?"horizontal":"vertical",pieceStyle:ce,size:[G,q],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:ge,barPadding:y,...null!=f&&{roundedTop:f},...me&&{gradientFill:me},baselinePadding:x,enableHover:X,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:i.showAxes,oLabel:ee,rLabel:te,rFormat:u,...V&&{oFormat:V},showGrid:Y,...de,...Rt({title:K,description:Z,summary:J,accessibleTable:U,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Pt({tooltip:w,defaultTooltipContent:he}),...St({linkedHover:R,selection:P,onObservation:M,onClick:I,hoverHighlight:T,mobileInteraction:re.mobileInteraction,customHoverBehavior:re.customHoverBehavior,customClickBehavior:re.customClickBehavior}),...k&&k.length>0&&{annotations:k},...A&&{rExtent:A},...se.brushStreamProps,...Object.fromEntries(Object.entries(S).filter(([e])=>"pieceStyle"!==e))};return ue?Ho(Li,{componentName:"StackedBarChart",message:ue,width:G,height:q}):Ho(Mi,{componentName:"StackedBarChart",width:G,height:q,children:Ho(N,{ref:o,...pe})})}),"StackedBarChart"),V={RdBu:Zi,PiYG:Ki,PRGn:Qi,BrBG:Yi,RdYlBu:Xi,RdYlGn:qi,Spectral:Gi},G="__likert_neutral_neg",q="__likert_neutral_pos",X=["Very Low","Low","Neutral","High","Very High"],Y=/*#__PURE__*/new Map,Q=/*#__PURE__*/Jt(/*#__PURE__*/Mo(function(e,t){let i=Si(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,categoryLabel:e.categoryLabel,valueLabel:e.valueLabel,showCategoryTicks:e.showCategoryTicks,orientation:e.orientation,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),o=Co(null),{data:r,margin:a,className:n,categoryAccessor:l="question",valueAccessor:s,levelAccessor:c,countAccessor:h="count",levels:u=X,orientation:d="horizontal",colorScheme:g,barPadding:m=20,styleRules:p,tooltip:y,annotations:f,valueExtent:v,frameProps:b={},selection:x,linkedHover:w,onObservation:k,onClick:A,hoverHighlight:S,chartId:P,valueFormat:R,loading:C,loadingContent:_,emptyContent:L,legendInteraction:M,legendPosition:I,categoryFormat:T,stroke:H,strokeWidth:B,opacity:$}=e,{width:F,height:O,enableHover:D,showGrid:E,showLegend:W,title:j,description:z,summary:V,accessibleTable:Q,categoryLabel:K,valueLabel:Z}=i,J="horizontal"===d,U=void 0===r,ee=!c,te=Ii(),ie=Ro(()=>g&&Array.isArray(g)&&g.length>=u.length?g:ta(u.length,te),[g,u.length,te]),oe=Ro(()=>{let e=new Map;for(let t=0;t<u.length;t++)e.set(u[t],ie[t]||"#888");return e},[u,ie]),re=Ro(()=>{if(!1!==W)return{legendGroups:[{styleFn:e=>({fill:oe.get(e.label)||"#888"}),items:u.map(e=>({label:e})),label:""}]}},[W,u,oe]),ae=Ro(()=>Object.hasOwn(b,"legend")?b:{...b,legend:re},[b,re]),{processedData:ne,reAggregate:le,accumulatorRef:se}=aa({data:r,levels:u,categoryAccessor:l,valueAccessor:s,levelAccessor:c,countAccessor:h,isDiverging:J,frameRef:o}),ce="__likertLevelLabel",he=we({isPushMode:U,colorBy:ce,colorScheme:ie,showLegend:W,legendPosition:I}),{wrapPush:ue,wrapPushMany:de}=he,ge=So(e=>ue(e=>{se.current.push(e),le(se.current)})(e),[ue,le,se]),me=So(e=>de(e=>{se.current.push(...e),le(se.current)})(e),[de,le,se]);Po(t,()=>({push:ge,pushMany:me,remove:e=>o.current?.remove(e)??[],update:(e,t)=>o.current?.update(e,t)??[],replace:e=>o.current?.replace(e),clear:()=>{se.current=[],he.resetCategories(),o.current?.clear()},getData:()=>o.current?.getData()??[],getScales:()=>o.current?.getScales()??null}),[ge,me,se,he]);let pe=ve({responsive:e,data:ne,rawData:r,colorBy:ce,colorScheme:ie,legendInteraction:M,legendPosition:I,frameLegend:ae,selection:x,linkedHover:w,fallbackFields:["__likertLevelLabel"],unwrapData:!0,onObservation:k,onClick:A,hoverHighlight:S,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"LikertChart",chartId:P,showLegend:W,userMargin:a,marginDefaults:i.marginDefaults,loading:C,loadingContent:_,emptyContent:L,width:F,height:O,hasTitle:!!j,axisChrome:{hasAxis:!1!==i.showAxes,hasAxisLabel:J?!!Z:!!K}}),ye=Ro(()=>{let e=u.length;return e%2!=0&&oe.get(u[Math.floor(e/2)])||"#888"},[u,oe]),be=Jr({colorBy:void 0,colorScale:void 0,color:void 0,themeCategorical:void 0,colorScheme:void 0,categoryIndexMap:Y,userPieceStyle:b?.pieceStyle,stroke:H,strokeWidth:B,opacity:$,effectiveSelectionHook:pe.effectiveSelectionHook,resolvedSelection:pe.resolvedSelection,styleRules:p,resolveRuleValue:na,baseStyleExtras:e=>{let t=e.__likertLevelLabel||e.data?.__likertLevelLabel,i=e.__likertLevel||e.data?.__likertLevel;if(i===G||i===q)return{fill:ye};let o=t||i;return o&&oe.has(o)?{fill:oe.get(o)}:{fill:"#888"}}}),xe=Ro(()=>{let e=u.length;return e%2!=0?u[Math.floor(e/2)]:""},[u]),ke=Ro(()=>e=>{let t=e.data||e,i=t.__likertLevel||"Unknown",o=i===G||i===q?xe:i,r=t.__likertCategory||"",a=Math.abs(t.__likertPct||0),n=i===G||i===q?2*a:a,l=t.__likertCount||0;return Ao.createElement("div",{className:"semiotic-tooltip",style:uo},Ao.createElement("div",{style:{fontWeight:"bold"}},r),Ao.createElement("div",{style:{marginTop:4}},`${o}: ${n.toFixed(1)}% (n=${l})`))},[xe]),Ae=Ro(()=>{if(!u||u.length<2)return"LikertChart requires `levels` with at least 2 entries.";if(s&&c)return"LikertChart: provide either `valueAccessor` (raw responses) or `levelAccessor` + `countAccessor` (pre-aggregated), not both.";if(c&&!h)return"LikertChart: pre-aggregated mode requires both `levelAccessor` and `countAccessor`.";if(void 0!==r&&0===r.length)return null;let e={categoryAccessor:l};return ee?s&&(e.valueAccessor=s):(c&&(e.levelAccessor=c),h&&(e.countAccessor=h)),fe({componentName:"LikertChart",data:r,accessors:e,requiredProps:{levels:u}})},[r,l,s,c,h,u,ee]),Se=pe.legendBehaviorProps,Pe=Ro(()=>{let e={...pe.margin};if(U&&pe.legend){let t=pe.legendPosition;"bottom"===t&&e.bottom<80?e.bottom=80:"top"===t&&e.top<50?e.top=50:"right"===t&&e.right<110?e.right=110:"left"===t&&e.left<110&&(e.left=110)}else if(he.streamingMarginAdjust)for(let[t,i]of Object.entries(he.streamingMarginAdjust)){let o=t;e[o]<i&&(e[o]=i)}return J&&e.left<100&&(e.left=100),e},[pe.margin,pe.legend,pe.legendPosition,he.streamingMarginAdjust,J,U]),Re=Ro(()=>R||(J?e=>`${Math.abs(Number(e)).toFixed(0)}%`:e=>`${Number(e).toFixed(0)}%`),[J,R]);if(pe.earlyReturn)return pe.earlyReturn;let Ce={chartType:"bar",...null!=r&&{data:ne},oAccessor:"__likertCategory",rAccessor:"__likertPct",stackBy:"__likertLevel",normalize:!1,projection:J?"horizontal":"vertical",pieceStyle:be,size:[F,O],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,maxDevicePixelRatio:e.maxDevicePixelRatio,margin:Pe,barPadding:m,enableHover:D,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:i.showAxes,oLabel:K,rLabel:Z||(J?void 0:"Percentage"),rFormat:Re,...T&&{oFormat:T},showGrid:E,...Se,...j&&{title:j},...z&&{description:z},...V&&{summary:V},...void 0!==Q&&{accessibleTable:Q},...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===y?()=>null:!0===y?ke:Ti(y)||ke,...St({linkedHover:w,selection:x,onObservation:k,onClick:A,hoverHighlight:S,mobileInteraction:pe.mobileInteraction,customHoverBehavior:pe.customHoverBehavior,customClickBehavior:pe.customClickBehavior}),...f&&f.length>0&&{annotations:f},...v&&{rExtent:v},...Object.fromEntries(Object.entries(b).filter(([e])=>"pieceStyle"!==e))};return Ae?Ho(Li,{componentName:"LikertChart",message:Ae,width:F,height:O}):Ho(Mi,{componentName:"LikertChart",width:F,height:O,children:Ho(N,{ref:o,...Ce})})}),"LikertChart"),K=/*#__PURE__*/Jt(/*#__PURE__*/Mo(function(e,t){let i=Si(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,categoryLabel:e.categoryLabel,valueLabel:e.valueLabel,showCategoryTicks:e.showCategoryTicks,orientation:e.orientation,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),o=Co(null);be(t,{variant:"xy",frameRef:o});let{data:r,margin:a,className:n,categoryAccessor:l="category",valueAccessor:s="value",orientation:c="vertical",valueFormat:h,colorBy:u,colorScheme:d,styleRules:g,sizeBy:m,sizeRange:p=[3,8],symbolBy:y,symbolMap:f,pointRadius:v=4,pointOpacity:b=.7,categoryPadding:x=20,tooltip:w,annotations:k,valueExtent:A,brush:S,onBrush:P,linkedBrush:R,frameProps:C={},selection:_,linkedHover:L,onObservation:M,onClick:I,hoverHighlight:T,chartId:H,loading:B,loadingContent:$,emptyContent:F,legendInteraction:O,legendPosition:D,color:E,stroke:W,strokeWidth:j,opacity:z,showCategoryTicks:V,categoryFormat:G}=e,{width:q,height:X,enableHover:Y,showGrid:Q,showLegend:K,title:Z,description:J,summary:U,accessibleTable:ee,categoryLabel:te,valueLabel:ie}=i,oe=Ro(()=>ii(r),[r]),re=ve({responsive:e,data:oe,rawData:r,colorBy:u,colorScheme:d,legendInteraction:O,legendPosition:D,frameLegend:C,selection:_,linkedHover:L,fallbackFields:u?["string"==typeof u?u:""]:["string"==typeof l?l:""],unwrapData:!0,onObservation:M,onClick:I,hoverHighlight:T,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"SwarmPlot",chartId:H,showLegend:K,userMargin:a,marginDefaults:i.marginDefaults,loading:B,loadingContent:$,emptyContent:F,width:q,height:X,hasTitle:!!Z,axisChrome:Ht({showAxes:i.showAxes,projection:"horizontal"===c?"horizontal":"vertical",hasCategoryLabel:!!te,hasValueLabel:!!ie})}),ae=Ur({brushProp:S,onBrushProp:P,linkedBrush:R,valueAccessor:s}),ne=Ro(()=>{if(!m)return;let e=oe.map(e=>"function"==typeof m?m(e):e[m]);return ko(e)},[oe,m]),le=Ci(),se=Ro(()=>new Map,[]),ce=Ro(()=>_i(s),[s]),he=Jr({colorBy:u,colorScale:re.colorScale,color:E,themeCategorical:le,colorScheme:d,categoryIndexMap:se,userPieceStyle:C?.pieceStyle,stroke:W,strokeWidth:j,opacity:z,effectiveSelectionHook:re.effectiveSelectionHook,resolvedSelection:re.resolvedSelection,baseStyleExtras:e=>({fillOpacity:b,r:m?Ji(e,m,p,ne):v}),styleRules:g,resolveRuleValue:ce}),ue=Ro(()=>At({categoryAccessor:l,valueAccessor:s,groupAccessor:u||void 0,valueFormat:h}),[l,s,u,h]);if(re.earlyReturn)return re.earlyReturn;let de=fe({componentName:"SwarmPlot",data:r,accessors:{categoryAccessor:l,valueAccessor:s}});if(de)return Ho(Li,{componentName:"SwarmPlot",message:de,width:q,height:X});let ge={chartType:"swarm",...null!=r&&{data:oe},oAccessor:l,rAccessor:s,...y&&{symbolAccessor:y},...f&&{symbolMap:f},projection:"horizontal"===c?"horizontal":"vertical",pieceStyle:he,size:[q,X],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:re.margin,barPadding:x,enableHover:Y,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:i.showAxes,oLabel:te,rLabel:ie,rFormat:h,...G&&{oFormat:G},showGrid:Q,showCategoryTicks:V,...re.legendBehaviorProps,...Rt({title:Z,description:J,summary:U,accessibleTable:ee,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Pt({tooltip:w,defaultTooltipContent:ue}),...St({linkedHover:L,selection:_,onObservation:M,onClick:I,hoverHighlight:T,mobileInteraction:re.mobileInteraction,customHoverBehavior:re.customHoverBehavior,customClickBehavior:re.customClickBehavior}),...k&&k.length>0&&{annotations:k},...A&&{rExtent:A},...ae.brushStreamProps,...Object.fromEntries(Object.entries(C).filter(([e])=>"pieceStyle"!==e))};return Ho(Mi,{componentName:"SwarmPlot",width:q,height:X,children:Ho(N,{ref:o,...ge})})}),"SwarmPlot"),Z=/*#__PURE__*/Jt(/*#__PURE__*/Mo(function(e,t){let i=Si(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,categoryLabel:e.categoryLabel,valueLabel:e.valueLabel,showCategoryTicks:e.showCategoryTicks,orientation:e.orientation,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),o=Co(null);be(t,{variant:"xy",frameRef:o});let{data:r,margin:a,className:n,categoryAccessor:l="category",valueAccessor:s="value",orientation:c="vertical",valueFormat:h,colorBy:u,colorScheme:d,styleRules:g,showOutliers:m=!0,outlierRadius:p=3,categoryPadding:y=20,tooltip:f,annotations:v,valueExtent:b,frameProps:x={},selection:w,linkedHover:k,onObservation:A,onClick:S,hoverHighlight:P,chartId:R,loading:C,loadingContent:_,emptyContent:L,legendInteraction:M,legendPosition:I,color:T,stroke:H,strokeWidth:B,opacity:$,showCategoryTicks:F,categoryFormat:O}=e,{width:D,height:E,enableHover:W,showGrid:j,showLegend:z,title:V,description:G,summary:q,accessibleTable:X,categoryLabel:Y,valueLabel:Q}=i,K=Ro(()=>ii(r),[r]),Z=ve({responsive:e,data:K,rawData:r,colorBy:u,colorScheme:d,legendInteraction:M,legendPosition:I,frameLegend:x,selection:w,linkedHover:k,fallbackFields:u?["string"==typeof u?u:""]:["string"==typeof l?l:""],unwrapData:!0,onObservation:A,onClick:S,hoverHighlight:P,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"BoxPlot",chartId:R,showLegend:z,userMargin:a,marginDefaults:i.marginDefaults,loading:C,loadingContent:_,emptyContent:L,width:D,height:E,hasTitle:!!V,axisChrome:Ht({showAxes:i.showAxes,projection:"horizontal"===c?"horizontal":"vertical",hasCategoryLabel:!!Y,hasValueLabel:!!Q})}),J=Ci(),U=Ro(()=>new Map,[]),ee=Ro(()=>{let e=_i(s);return t=>"number"==typeof t.median?t.median:e(t)},[s]),te=Jr({colorBy:u,colorScale:Z.colorScale,color:T,themeCategorical:J,colorScheme:d,categoryIndexMap:U,userPieceStyle:void 0,stroke:H,strokeWidth:B,opacity:$,effectiveSelectionHook:Z.effectiveSelectionHook,resolvedSelection:Z.resolvedSelection,baseStyleExtras:{fillOpacity:.8},linkStrokeToFill:!0,styleRules:g,resolveRuleValue:ee}),ie=Ro(()=>Qr(),[]);if(Z.earlyReturn)return Z.earlyReturn;let oe=fe({componentName:"BoxPlot",data:r,accessors:{categoryAccessor:l,valueAccessor:s}});if(oe)return Ho(Li,{componentName:"BoxPlot",message:oe,width:D,height:E});let re={chartType:"boxplot",...null!=r&&{data:K},oAccessor:l,rAccessor:s,projection:"horizontal"===c?"horizontal":"vertical",summaryStyle:te,showOutliers:m,size:[D,E],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:Z.margin,barPadding:y,enableHover:W,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:i.showAxes,oLabel:Y,rLabel:Q,rFormat:h,...O&&{oFormat:O},showGrid:j,showCategoryTicks:F,...Z.legendBehaviorProps,...Rt({title:V,description:G,summary:q,accessibleTable:X,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Pt({tooltip:f,defaultTooltipContent:ie}),...St({linkedHover:k,selection:w,onObservation:A,onClick:S,hoverHighlight:P,mobileInteraction:Z.mobileInteraction,customHoverBehavior:Z.customHoverBehavior,customClickBehavior:Z.customClickBehavior}),...v&&v.length>0&&{annotations:v},...b&&{rExtent:b},...Object.fromEntries(Object.entries(x).filter(([e])=>"pieceStyle"!==e))};return Ho(Mi,{componentName:"BoxPlot",width:D,height:E,children:Ho(N,{ref:o,...re})})}),"BoxPlot"),J=e=>{let t=e?.category;return null==t?"All":String(t)},U=/*#__PURE__*/Jt(/*#__PURE__*/Mo(function(e,t){let i=Si(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,categoryLabel:e.categoryLabel,valueLabel:e.valueLabel,showCategoryTicks:e.showCategoryTicks,orientation:"horizontal",mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),o=Co(null);be(t,{variant:"xy",frameRef:o});let{data:r,margin:a,className:n,categoryAccessor:l=J,valueAccessor:s="value",bins:c=25,relative:h=!1,valueFormat:u,colorBy:d,colorScheme:g,styleRules:m,categoryPadding:p=("sparkline"===i.mode?0:20),tooltip:y,annotations:f,valueExtent:v,brush:b,onBrush:x,linkedBrush:w,frameProps:k={},selection:A,linkedHover:S,onObservation:P,onClick:R,hoverHighlight:C,chartId:_,loading:L,loadingContent:M,emptyContent:I,legendInteraction:T,legendPosition:H,color:B,stroke:$,strokeWidth:F,opacity:O,showCategoryTicks:D,categoryFormat:E}=e,{width:W,height:j,enableHover:z,showGrid:V,showLegend:G,title:q,description:X,summary:Y,accessibleTable:Q,categoryLabel:K,valueLabel:Z}=i,U=Ro(()=>ii(r),[r]),ee=ve({responsive:e,data:U,rawData:r,colorBy:d,colorScheme:g,legendInteraction:T,legendPosition:H,frameLegend:k,selection:A,linkedHover:S,fallbackFields:d?["string"==typeof d?d:""]:["string"==typeof l?l:""],unwrapData:!0,onObservation:P,onClick:R,hoverHighlight:C,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"Histogram",chartId:_,showLegend:G,userMargin:a,marginDefaults:i.marginDefaults,loading:L,loadingContent:M,emptyContent:I,width:W,height:j,hasTitle:!!q,axisChrome:Ht({showAxes:i.showAxes,projection:"horizontal",hasCategoryLabel:!!K,hasValueLabel:!!Z})}),te=Ur({brushProp:b,onBrushProp:x,linkedBrush:w,valueAccessor:s}),ie=Ro(()=>{if(0===U.length)return;let e="function"==typeof s?s:e=>e[s],t=1/0,i=-1/0;for(let o of U){let r=e(o);null!=r&&isFinite(r)&&(r<t&&(t=r),r>i&&(i=r))}return t<=i?[t,i]:void 0},[U,s]),oe=Ci(),re=Ro(()=>new Map,[]),ae=Ro(()=>{let e=_i(s);return t=>"number"==typeof t.count?t.count:e(t)},[s]),ne=Jr({colorBy:d,colorScale:ee.colorScale,color:B,themeCategorical:oe,colorScheme:g,categoryIndexMap:re,userPieceStyle:void 0,stroke:$,strokeWidth:F,opacity:O,effectiveSelectionHook:ee.effectiveSelectionHook,resolvedSelection:ee.resolvedSelection,baseStyleExtras:{fillOpacity:.8},linkStrokeToFill:!0,styleRules:m,resolveRuleValue:ae}),le=Ro(()=>e=>{let t=e.data||e,i=t.category||e.category||"",o=t.count,r=t.range;return Bo("div",{className:"semiotic-tooltip",style:uo,children:[i&&Ho("div",{style:{fontWeight:"bold"},children:String(i)}),null!=o&&Bo("div",{children:["Count: ",o]}),r&&2===r.length&&Bo("div",{style:{opacity:.8},children:[Number(r[0]).toFixed(1)," – ",Number(r[1]).toFixed(1)]})]})},[]);if(ee.earlyReturn)return ee.earlyReturn;let se=fe({componentName:"Histogram",data:r,accessors:{categoryAccessor:l,valueAccessor:s}});if(se)return Ho(Li,{componentName:"Histogram",message:se,width:W,height:j});let ce={chartType:"histogram",...null!=r&&{data:U},oAccessor:l,rAccessor:s,projection:"horizontal",summaryStyle:ne,bins:c,normalize:h,...v?{rExtent:v}:ie&&{rExtent:ie},size:[W,j],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:ee.margin,barPadding:p,enableHover:z,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:i.showAxes,oLabel:K,rLabel:Z,rFormat:u,...E&&{oFormat:E},showGrid:V,showCategoryTicks:D,...ee.legendBehaviorProps,...Rt({title:q,description:X,summary:Y,accessibleTable:Q,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Pt({tooltip:y,defaultTooltipContent:le}),...St({linkedHover:S,selection:A,onObservation:P,onClick:R,hoverHighlight:C,mobileInteraction:ee.mobileInteraction,customHoverBehavior:ee.customHoverBehavior,customClickBehavior:ee.customClickBehavior}),...f&&f.length>0&&{annotations:f},...te.brushStreamProps,...Object.fromEntries(Object.entries(k).filter(([e])=>"pieceStyle"!==e))};return Ho(Mi,{componentName:"Histogram",width:W,height:j,children:Ho(N,{ref:o,...ce})})}),"Histogram"),ee=/*#__PURE__*/Jt(/*#__PURE__*/Mo(function(e,t){let i=Si(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,categoryLabel:e.categoryLabel,valueLabel:e.valueLabel,showCategoryTicks:e.showCategoryTicks,orientation:e.orientation,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),o=Co(null);be(t,{variant:"xy",frameRef:o});let{data:r,margin:a,className:n,categoryAccessor:l="category",valueAccessor:s="value",orientation:c="vertical",bins:h=25,curve:u="catmullRom",showIQR:d=!0,valueFormat:g,colorBy:m,colorScheme:p,styleRules:y,categoryPadding:f=20,tooltip:v,annotations:b,valueExtent:x,brush:w,onBrush:k,linkedBrush:A,frameProps:S={},selection:P,linkedHover:R,onObservation:C,onClick:_,hoverHighlight:L,chartId:M,loading:I,loadingContent:T,emptyContent:H,legendInteraction:B,legendPosition:$,color:F,stroke:O,strokeWidth:D,opacity:E,showCategoryTicks:W,categoryFormat:j}=e,{width:z,height:V,enableHover:G,showGrid:q,showLegend:X,title:Y,description:Q,summary:K,accessibleTable:Z,categoryLabel:J,valueLabel:U}=i,ee=Ro(()=>ii(r),[r]),te=ve({responsive:e,data:ee,rawData:r,colorBy:m,colorScheme:p,legendInteraction:B,legendPosition:$,frameLegend:S,selection:P,linkedHover:R,fallbackFields:m?["string"==typeof m?m:""]:["string"==typeof l?l:""],unwrapData:!0,onObservation:C,onClick:_,hoverHighlight:L,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"ViolinPlot",chartId:M,showLegend:X,userMargin:a,marginDefaults:i.marginDefaults,loading:I,loadingContent:T,emptyContent:H,width:z,height:V,hasTitle:!!Y,axisChrome:Ht({showAxes:i.showAxes,projection:"horizontal"===c?"horizontal":"vertical",hasCategoryLabel:!!J,hasValueLabel:!!U})}),ie=Ur({brushProp:w,onBrushProp:k,linkedBrush:A,valueAccessor:s}),oe=Ci(),re=Ro(()=>new Map,[]),ae=Ro(()=>{let e=_i(s);return t=>"number"==typeof t.median?t.median:e(t)},[s]),ne=Jr({colorBy:m,colorScale:te.colorScale,color:F,themeCategorical:oe,colorScheme:p,categoryIndexMap:re,userPieceStyle:void 0,stroke:O,strokeWidth:D,opacity:E,effectiveSelectionHook:te.effectiveSelectionHook,resolvedSelection:te.resolvedSelection,baseStyleExtras:{fillOpacity:.6},linkStrokeToFill:!0,styleRules:y,resolveRuleValue:ae}),le=Ro(()=>Qr({valueAccessor:s}),[s]);if(te.earlyReturn)return te.earlyReturn;let se=fe({componentName:"ViolinPlot",data:r,accessors:{categoryAccessor:l,valueAccessor:s}});if(se)return Ho(Li,{componentName:"ViolinPlot",message:se,width:z,height:V});let ce={chartType:"violin",...null!=r&&{data:ee},oAccessor:l,rAccessor:s,projection:"horizontal"===c?"horizontal":"vertical",summaryStyle:ne,bins:h,showIQR:d,size:[z,V],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:te.margin,barPadding:f,enableHover:G,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:i.showAxes,oLabel:J,rLabel:U,rFormat:g,...j&&{oFormat:j},showGrid:q,showCategoryTicks:W,...te.legendBehaviorProps,...Rt({title:Y,description:Q,summary:K,accessibleTable:Z,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Pt({tooltip:v,defaultTooltipContent:le}),...St({linkedHover:R,selection:P,onObservation:C,onClick:_,hoverHighlight:L,mobileInteraction:te.mobileInteraction,customHoverBehavior:te.customHoverBehavior,customClickBehavior:te.customClickBehavior}),...b&&b.length>0&&{annotations:b},...x&&{rExtent:x},...ie.brushStreamProps,...Object.fromEntries(Object.entries(S).filter(([e])=>"pieceStyle"!==e))};return Ho(Mi,{componentName:"ViolinPlot",width:z,height:V,children:Ho(N,{ref:o,...ce})})}),"ViolinPlot"),te=/*#__PURE__*/Jt(/*#__PURE__*/Mo(function(e,t){let i=Si(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,categoryLabel:e.categoryLabel,valueLabel:e.valueLabel,showCategoryTicks:e.showCategoryTicks,orientation:e.orientation,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),o=Co(null);be(t,{variant:"xy",frameRef:o});let{data:r,margin:a,className:n,categoryAccessor:l="category",valueAccessor:s="value",orientation:c="horizontal",bins:h=20,amplitude:u=1.5,valueFormat:d,colorBy:g,colorScheme:m,styleRules:p,categoryPadding:y=5,tooltip:f,annotations:v,valueExtent:b,frameProps:x={},selection:w,linkedHover:k,onObservation:A,onClick:S,hoverHighlight:P,chartId:R,loading:C,loadingContent:_,emptyContent:L,legendInteraction:M,legendPosition:I,color:T,stroke:H,strokeWidth:B,opacity:$,showCategoryTicks:F,categoryFormat:O}=e,{width:D,height:E,enableHover:W,showGrid:j,showLegend:z,title:V,description:G,summary:q,accessibleTable:X,categoryLabel:Y,valueLabel:Q}=i,K=Ro(()=>ii(r),[r]),Z=ve({responsive:e,data:K,rawData:r,colorBy:g,colorScheme:m,legendInteraction:M,legendPosition:I,frameLegend:x,selection:w,linkedHover:k,fallbackFields:g?["string"==typeof g?g:""]:["string"==typeof l?l:""],unwrapData:!0,onObservation:A,onClick:S,hoverHighlight:P,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"RidgelinePlot",chartId:R,showLegend:z,userMargin:a,marginDefaults:i.marginDefaults,loading:C,loadingContent:_,emptyContent:L,width:D,height:E,hasTitle:!!V,axisChrome:Ht({showAxes:i.showAxes,projection:"horizontal"===c?"horizontal":"vertical",hasCategoryLabel:!!Y,hasValueLabel:!!Q})}),J=Ci(),U=Ro(()=>new Map,[]),ee=Ro(()=>{let e=_i(s);return t=>"number"==typeof t.median?t.median:e(t)},[s]),te=Jr({colorBy:g,colorScale:Z.colorScale,color:T,themeCategorical:J,colorScheme:m,categoryIndexMap:U,userPieceStyle:void 0,stroke:H,strokeWidth:B,opacity:$,effectiveSelectionHook:Z.effectiveSelectionHook,resolvedSelection:Z.resolvedSelection,baseStyleExtras:{fillOpacity:.5},linkStrokeToFill:!0,styleRules:p,resolveRuleValue:ee}),ie=Ro(()=>Qr(),[]);if(Z.earlyReturn)return Z.earlyReturn;let oe=fe({componentName:"RidgelinePlot",data:r,accessors:{categoryAccessor:l,valueAccessor:s}});if(oe)return Ho(Li,{componentName:"RidgelinePlot",message:oe,width:D,height:E});let re={chartType:"ridgeline",...null!=r&&{data:K},oAccessor:l,rAccessor:s,projection:"horizontal"===c?"horizontal":"vertical",summaryStyle:te,bins:h,size:[D,E],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:Z.margin,barPadding:y,enableHover:W,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:i.showAxes,oLabel:Y,rLabel:Q,rFormat:d,...O&&{oFormat:O},showGrid:j,showCategoryTicks:F,oSort:!1,amplitude:u,...Z.legendBehaviorProps,...Rt({title:V,description:G,summary:q,accessibleTable:X,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Pt({tooltip:f,defaultTooltipContent:ie}),...St({linkedHover:k,selection:w,onObservation:A,onClick:S,hoverHighlight:P,mobileInteraction:Z.mobileInteraction,customHoverBehavior:Z.customHoverBehavior,customClickBehavior:Z.customClickBehavior}),...v&&v.length>0&&{annotations:v},...b&&{rExtent:b},...Object.fromEntries(Object.entries(x).filter(([e])=>"pieceStyle"!==e))};return Ho(Mi,{componentName:"RidgelinePlot",width:D,height:E,children:Ho(N,{ref:o,...re})})}),"RidgelinePlot"),ie=/*#__PURE__*/Jt(/*#__PURE__*/Mo(function(e,t){let i=Si(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid??!0,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,categoryLabel:e.categoryLabel,valueLabel:e.valueLabel,showCategoryTicks:e.showCategoryTicks,orientation:e.orientation,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),o=Co(null);be(t,{variant:"xy",frameRef:o});let{data:r,margin:a,className:n,categoryAccessor:l="category",valueAccessor:s="value",orientation:c="horizontal",valueFormat:h,colorBy:u,colorScheme:d,styleRules:g,sort:m="auto",dotRadius:p=5,categoryPadding:y=10,tooltip:f,annotations:v,regression:b,valueExtent:x,frameProps:w={},selection:k,linkedHover:A,onObservation:S,onClick:P,hoverHighlight:R,chartId:C,loading:_,loadingContent:L,emptyContent:M,legendInteraction:I,legendPosition:T,color:H,stroke:B,strokeWidth:$,opacity:F,categoryFormat:O}=e,{width:D,height:E,enableHover:W,showGrid:j,showLegend:z,title:V,description:G,summary:q,accessibleTable:X,categoryLabel:Y,valueLabel:Q}=i,K=Ro(()=>ii(r),[r]),Z=ve({responsive:e,data:K,rawData:r,colorBy:u,colorScheme:d,legendInteraction:I,legendPosition:T,frameLegend:w,selection:k,linkedHover:A,fallbackFields:u?["string"==typeof u?u:""]:["string"==typeof l?l:""],unwrapData:!0,onObservation:S,onClick:P,hoverHighlight:R,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"DotPlot",chartId:C,showLegend:z,userMargin:a,marginDefaults:i.marginDefaults,loading:_,loadingContent:L,emptyContent:M,width:D,height:E,hasTitle:!!V,axisChrome:Ht({showAxes:i.showAxes,projection:"horizontal"===c?"horizontal":"vertical",hasCategoryLabel:!!Y,hasValueLabel:!!Q})}),J=Ri(K,m,s),U=Ci(),ee=Ro(()=>new Map,[]),te=Ro(()=>_i(s),[s]),ie=Jr({colorBy:u,colorScale:Z.colorScale,color:H,themeCategorical:U,colorScheme:d,categoryIndexMap:ee,userPieceStyle:w?.pieceStyle,stroke:B,strokeWidth:$,opacity:F,effectiveSelectionHook:Z.effectiveSelectionHook,resolvedSelection:Z.resolvedSelection,baseStyleExtras:{r:p,fillOpacity:.8},styleRules:g,resolveRuleValue:te}),oe=Ro(()=>At({categoryAccessor:l,valueAccessor:s,valueFormat:h}),[l,s,h]);if(Z.earlyReturn)return Z.earlyReturn;let re=fe({componentName:"DotPlot",data:r,accessors:{categoryAccessor:l,valueAccessor:s}});if(re)return Ho(Li,{componentName:"DotPlot",message:re,width:D,height:E});let ae=pe(b),ne=ae?[ae,...v||[]]:v,le={chartType:"point",...null!=r&&{data:J},oAccessor:l,rAccessor:s,projection:"horizontal"===c?"horizontal":"vertical",pieceStyle:ie,size:[D,E],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:Z.margin,barPadding:y,enableHover:W,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:i.showAxes,oLabel:Y,rLabel:Q,rFormat:h,...O&&{oFormat:O},showGrid:j,oSort:m,...Z.legendBehaviorProps,...Rt({title:V,description:G,summary:q,accessibleTable:X,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Pt({tooltip:f,defaultTooltipContent:oe}),...St({linkedHover:A,selection:k,onObservation:S,onClick:P,hoverHighlight:R,mobileInteraction:Z.mobileInteraction,customHoverBehavior:Z.customHoverBehavior,customClickBehavior:Z.customClickBehavior}),...ne&&ne.length>0&&{annotations:ne},...x&&{rExtent:x},...Object.fromEntries(Object.entries(w).filter(([e])=>"pieceStyle"!==e))};return Ho(Mi,{componentName:"DotPlot",width:D,height:E,children:Ho(N,{ref:o,...le})})}),"DotPlot"),oe={width:400,height:400},re={width:400,height:400},ae={width:300,height:250},ne=/*#__PURE__*/Jt(/*#__PURE__*/Mo(function(e,t){let i=Si(e.mode,{width:e.width,height:e.height,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,showCategoryTicks:e.showCategoryTicks,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules},oe),o=Co(null),{data:r,margin:a,className:n,categoryAccessor:l="category",valueAccessor:s="value",colorBy:c,colorScheme:h,styleRules:u,startAngle:d=0,cornerRadius:g,valueFormat:m,tooltip:p,annotations:y,frameProps:f={},selection:v,linkedHover:b,onObservation:x,onClick:w,hoverHighlight:k,chartId:A,loading:S,loadingContent:P,emptyContent:R,legendInteraction:C,legendPosition:_,color:L,stroke:M,strokeWidth:I,opacity:T}=e,{width:H,height:B,enableHover:$,showLegend:F,title:O,description:D,summary:E,accessibleTable:W}=i,j=Ro(()=>ii(r),[r]),z=c||l,V=ve({responsive:e,data:j,rawData:r,colorBy:z,colorScheme:h,legendInteraction:C,legendPosition:_,frameLegend:f,selection:v,linkedHover:b,fallbackFields:z?["string"==typeof z?z:""]:[],unwrapData:!0,onObservation:x,onClick:w,hoverHighlight:k,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"PieChart",chartId:A,showLegend:F,userMargin:a,marginDefaults:i.marginDefaults,loading:S,loadingContent:P,emptyContent:R,width:H,height:B,hasTitle:!!O,axisChrome:{hasAxis:!1}}),G=Ci(),q=Ro(()=>new Map,[]),X=Ro(()=>{let e=_i(s);return t=>{let i=e(t);return null==i?void 0:Math.abs(i)}},[s]),Y=Jr({colorBy:z,colorScale:V.colorScale,color:L,themeCategorical:G,colorScheme:h,categoryIndexMap:q,userPieceStyle:f?.pieceStyle,stroke:M,strokeWidth:I,opacity:T,effectiveSelectionHook:V.effectiveSelectionHook,resolvedSelection:V.resolvedSelection,cycleByCategory:!0,styleRules:u,resolveRuleValue:X}),Q=Ro(()=>At({categoryAccessor:l,valueAccessor:s,groupAccessor:c&&c!==l?c:void 0,groupLabel:"string"==typeof c?c:"group",pieData:!0,valueFormat:m}),[l,s,c,m]),K=fe({componentName:"PieChart",data:r,accessors:{categoryAccessor:l,valueAccessor:s}}),{effectiveLegendProps:Z,effectiveMargin:J}=Zr({ref:t,frameRef:o,setup:V});if(V.earlyReturn)return V.earlyReturn;let U={chartType:"pie",...null!=r&&{data:j},oAccessor:l,rAccessor:s,projection:"radial",pieceStyle:Y,startAngle:d,...null!=g&&{cornerRadius:g},size:[H,B],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:J,enableHover:$,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:!1,...Z,...Rt({title:O,description:D,summary:E,accessibleTable:W,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Pt({tooltip:p,defaultTooltipContent:Q}),...St({linkedHover:b,selection:v,onObservation:x,onClick:w,hoverHighlight:k,mobileInteraction:V.mobileInteraction,customHoverBehavior:V.customHoverBehavior,customClickBehavior:V.customClickBehavior}),...y&&y.length>0&&{annotations:y},...Object.fromEntries(Object.entries(f).filter(([e])=>"pieceStyle"!==e))};return K?Ho(Li,{componentName:"PieChart",message:K,width:H,height:B}):Ho(Mi,{componentName:"PieChart",width:H,height:B,children:Ho(N,{ref:o,...U})})}),"PieChart"),le=/*#__PURE__*/Jt(/*#__PURE__*/Mo(function(e,t){let i=Si(e.mode,{width:e.width,height:e.height,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,linkedHover:e.linkedHover,showCategoryTicks:e.showCategoryTicks,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules},re),o=Co(null),{data:r,margin:a,className:n,categoryAccessor:l="category",valueAccessor:s="value",innerRadius:c,centerContent:h,colorBy:u,colorScheme:d,styleRules:g,startAngle:m=0,cornerRadius:p,valueFormat:y,tooltip:f,annotations:v,frameProps:b={},selection:x,linkedHover:w,onObservation:k,onClick:A,hoverHighlight:S,chartId:P,loading:R,loadingContent:C,emptyContent:_,legendInteraction:L,legendPosition:M,color:I,stroke:T,strokeWidth:H,opacity:B}=e,{width:$,height:F,enableHover:O,showLegend:D,title:E,description:W,summary:j,accessibleTable:z}=i,V=Ro(()=>ii(r),[r]),G=u||l,q=ve({responsive:e,data:V,rawData:r,colorBy:G,colorScheme:d,legendInteraction:L,legendPosition:M,frameLegend:b,selection:x,linkedHover:w,fallbackFields:G?["string"==typeof G?G:""]:[],unwrapData:!0,onObservation:k,onClick:A,hoverHighlight:S,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"DonutChart",chartId:P,showLegend:D,userMargin:a,marginDefaults:i.marginDefaults,loading:R,loadingContent:C,emptyContent:_,width:$,height:F,hasTitle:!!E,axisChrome:{hasAxis:!1}}),X=c??Math.max(2,.15*Math.min($,F)),Y=Ci(),Q=Ro(()=>new Map,[]),K=Ro(()=>{let e=_i(s);return t=>{let i=e(t);return null==i?void 0:Math.abs(i)}},[s]),Z=Jr({colorBy:G,colorScale:q.colorScale,color:I,themeCategorical:Y,colorScheme:d,categoryIndexMap:Q,userPieceStyle:b?.pieceStyle,stroke:T,strokeWidth:H,opacity:B,effectiveSelectionHook:q.effectiveSelectionHook,resolvedSelection:q.resolvedSelection,cycleByCategory:!0,styleRules:g,resolveRuleValue:K}),J=Ro(()=>At({categoryAccessor:l,valueAccessor:s,groupAccessor:u&&u!==l?u:void 0,groupLabel:"string"==typeof u?u:"group",pieData:!0,valueFormat:y}),[l,s,u,y]),U=fe({componentName:"DonutChart",data:r,accessors:{categoryAccessor:l,valueAccessor:s}}),{effectiveLegendProps:ee,effectiveMargin:te}=Zr({ref:t,frameRef:o,setup:q});if(q.earlyReturn)return q.earlyReturn;let ie={chartType:"donut",...null!=r&&{data:V},oAccessor:l,rAccessor:s,projection:"radial",pieceStyle:Z,innerRadius:X,startAngle:m,...null!=p&&{cornerRadius:p},centerContent:h,size:[$,F],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:te,enableHover:O,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:!1,...ee,...Rt({title:E,description:W,summary:j,accessibleTable:z,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Pt({tooltip:f,defaultTooltipContent:J}),...St({linkedHover:w,selection:x,onObservation:k,onClick:A,hoverHighlight:S,mobileInteraction:q.mobileInteraction,customHoverBehavior:q.customHoverBehavior,customClickBehavior:q.customClickBehavior}),...v&&v.length>0&&{annotations:v},...Object.fromEntries(Object.entries(b).filter(([e])=>"pieceStyle"!==e))};return U?Ho(Li,{componentName:"DonutChart",message:U,width:$,height:F}):Ho(Mi,{componentName:"DonutChart",width:$,height:F,children:Ho(N,{ref:o,...ie})})}),"DonutChart"),se=.8,ce=/*#__PURE__*/Jt(/*#__PURE__*/Mo(function(e,t){let i=Si(e.mode,{width:e.width,height:e.height,enableHover:e.enableHover,showLegend:!1,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules},ae),o=Co(null),r="context"===i.mode,{compactMode:a}=i,{value:n,min:l=0,max:s=100,thresholds:c,gradientFill:h,color:u,backgroundColor:d="var(--semiotic-grid, #e0e0e0)",arcWidth:g=.3,cornerRadius:m,showNeedle:p=!0,needleColor:y="var(--semiotic-text, #333)",centerContent:f,centerLabel:v,valueFormat:b,showScaleLabels:x=!a,sweep:w=240,fillZones:k=!0,tooltip:A,styleRules:S,annotations:P,frameProps:R={},className:C,stroke:_,strokeWidth:L,opacity:M}=e,{width:I,height:T,title:H,description:B,summary:$,accessibleTable:F}=i,O=Be(h),D=Math.max(l,Math.min(s,n)),E=s-l||1,W=(D-l)/E,{gaugeData:j,pieceStyle:z,gaugeAnnotations:V}=Ro(()=>fa({min:l,max:s,value:n,thresholds:c,fillColor:u,backgroundColor:d,fillZones:k,showScaleLabels:x,gradientFill:O}),[n,l,s,c,u,d,x,k,O]),G=Ro(()=>Bi(z,S,(e,t)=>({value:"number"==typeof e.value?e.value:void 0,category:t??(null==e.category?void 0:String(e.category))})),[z,S]),q=Ro(()=>kt(G,{stroke:_,strokeWidth:L,opacity:M}),[G,_,L,M]),{activeSelectionHook:X,customHoverBehavior:Y,customClickBehavior:Q}=$i({selection:e.selection,linkedHover:e.linkedHover,fallbackFields:["category"],onObservation:e.onObservation,chartType:"GaugeChart",chartId:e.chartId,onClick:e.onClick,hoverHighlight:e.hoverHighlight,colorByField:"category",mobileInteraction:i.mobileInteraction}),K=xe(e.selection),Z=Ro(()=>Di(q,X,K),[q,X,K]),{sweepRad:J,startAngleDeg:U}=ha(w),ee=ua(w),te=Math.min(10,Math.max(1,Math.min(I,T)/12)),ie=ee.width,oe=ee.height,re=ee.cx,ne=ee.cy,le=Math.max(4,Math.min((I-2*te)/ie,(T-2*te)/oe)-2),se=Math.max(0,Math.min(le-1.5,le*(1-g))),ce=I/2-re*le,he=T/2-ne*le,ue=2*(le+4),de=Ro(()=>ca({centerContent:f,centerLabel:v,value:D,min:l,max:s,radius:le,innerRadius:se,showScaleLabels:x,valueFormat:b,compact:a}),[f,v,D,l,s,b,x,le,se,a]),ge=Ro(()=>r&&null==f?{type:"gauge-value",text:b?b(D):String(Math.round(D))}:null,[r,f,D,b]),me=Ro(()=>{if(!p)return null;let e=-Math.PI/2+U*Math.PI/180+W*J,t=se>20?se-8:le-1;return{type:"gauge-needle",tipX:Math.cos(e)*t,tipY:Math.sin(e)*t,color:y}},[p,U,W,J,se,le,y]),pe=Ro(()=>(e,t,i)=>{if("gauge-needle"===e.type){let o=(i.width||I)/2,r=(i.height||T)/2,a=Math.max(1,le-se),n=Math.max(1,Math.min(2.5,.4*a)),l=Math.max(1,Math.min(5,.6*a));return Bo("g",{transform:`translate(${o},${r})`,children:[Ho("line",{x1:0,y1:0,x2:e.tipX,y2:e.tipY,stroke:e.color,strokeWidth:n,strokeLinecap:"round"}),Ho("circle",{cx:0,cy:0,r:l,fill:e.color})]},`gauge-needle-${t}`)}if("gauge-label"===e.type){let o,r,a=(e.value-l)/E,n=-Math.PI/2+U*Math.PI/180+a*J,s=(i.width||I)/2,c=(i.height||T)/2,h=se-1,u=le+1,d=Math.cos(n)*h,g=Math.sin(n)*h,m=Math.cos(n)*u,p=Math.sin(n)*u,y=le+10,f=Math.cos(n)*y,v=Math.sin(n)*y,b=((n+Math.PI/2)/(2*Math.PI)*12+12)%12;return b>=11||b<1?(o="middle",r="auto"):b>=1&&b<5?(o="start",r="middle"):b>=5&&b<7?(o="middle",r="hanging"):(o="end",r="middle"),Bo("g",{transform:`translate(${s},${c})`,children:[Ho("line",{x1:d,y1:g,x2:m,y2:p,stroke:"var(--semiotic-border, #ccc)",strokeWidth:2,strokeLinecap:"round"}),Ho("text",{x:f,y:v,textAnchor:o,dominantBaseline:r,fill:"var(--semiotic-text-secondary, #666)",fontSize:10,style:{userSelect:"none",fontSize:"var(--semiotic-gauge-label-font-size, 10px)"},children:e.label})]},`gauge-label-${t}`)}if("gauge-value"===e.type){let o=(i.width||I)/2,r=(i.height||T)/2-.2*se,a=Math.max(12,Math.min(22,.28*le));return Ho("text",{x:o,y:r,textAnchor:"middle",dominantBaseline:"middle",fontSize:a,fontWeight:700,fill:"var(--semiotic-text, #333)",style:{userSelect:"none"},children:e.text},`gauge-value-${t}`)}return null},[I,T,l,E,U,J,se,le]),ye=Ro(()=>{let e=[...V,...P||[]];return me&&e.push(me),ge&&e.push(ge),e},[V,P,me,ge]),fe=Ro(()=>e=>{let t=e?.data?.[0]||e?.data||e,i=t?._zone||"",o=t?._isFill;return Bo("div",{className:"semiotic-tooltip",style:{padding:"6px 10px",background:"var(--semiotic-tooltip-bg, white)",borderRadius:"var(--semiotic-tooltip-radius, 6px)",boxShadow:"var(--semiotic-tooltip-shadow, 0 2px 8px rgba(0,0,0,0.15))"},children:[Ho("div",{style:{fontWeight:600},children:i}),Bo("div",{style:{fontSize:"0.85em",color:"var(--semiotic-text-secondary, #666)"},children:["Current: ",b?b(D):Math.round(D)]}),!o&&Bo("div",{style:{fontSize:"0.85em",color:"var(--semiotic-text-secondary, #666)"},children:["Remaining: ",b?b(s-D):Math.round(s-D)]})]})},[D,s,b]),ve=Fi(e.loading,I,T,e.loadingContent,e),be=ve?null:Oi(Number.isFinite(n)?[{value:n}]:[],I,T,e.emptyContent,e);if(ve)return ve;if(be)return be;if(0===j.length)return Ho(Li,{componentName:"GaugeChart",message:"No data to display",width:I,height:T});let we={chartType:"donut",data:j,oAccessor:"category",rAccessor:"value",oSort:!1,projection:"radial",pieceStyle:Z,innerRadius:se,startAngle:U,sweepAngle:w,...null!=m&&{cornerRadius:m},centerContent:de,size:[I,T],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,maxDevicePixelRatio:e.maxDevicePixelRatio,margin:{top:he-ue/2,bottom:T-he-ue/2,left:ce-ue/2,right:I-ce-ue/2},enableHover:i.enableHover,showAxes:!1,showCategoryTicks:!1,tooltipContent:!1===A?()=>null:Ti(A)||fe,...St({linkedHover:e.linkedHover,selection:e.selection,onObservation:e.onObservation,onClick:e.onClick,hoverRadius:e.hoverRadius,hoverHighlight:e.hoverHighlight,mobileInteraction:i.mobileInteraction,customHoverBehavior:Y,customClickBehavior:Q}),svgAnnotationRules:pe,...ye.length>0&&{annotations:ye},...H&&{title:H},...B&&{description:B},...$&&{summary:$},...void 0!==F&&{accessibleTable:F},...C&&{className:C},...null!=e.animate&&{animate:e.animate},...R};return Ho(Mi,{componentName:"GaugeChart",width:I,height:T,children:Ho(N,{ref:o,...we})})}),"GaugeChart"),he=/*#__PURE__*/Jt(/*#__PURE__*/Mo(function(e,t){let i=Si(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,categoryLabel:e.categoryLabel,valueLabel:e.valueLabel,showCategoryTicks:e.showCategoryTicks,orientation:e.orientation,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),o=Co(null),{data:r,margin:a,className:n,categoryAccessor:l="category",groupBy:s,valueAccessor:c="value",orientation:h="vertical",valueFormat:u,colorBy:d,colorScheme:g,sort:m=!1,barPadding:p=60,roundedTop:y,gradientFill:f,styleRules:v,baselinePadding:b=!1,tooltip:x,annotations:w,valueExtent:k,frameProps:A={},selection:S,linkedHover:P,linkedBrush:R,brush:C,onBrush:_,onObservation:L,onClick:M,hoverHighlight:I,chartId:T,loading:H,loadingContent:B,emptyContent:$,legendInteraction:F,legendPosition:O,color:D,stroke:E,strokeWidth:W,opacity:j,categoryFormat:z}=e,{width:V,height:G,enableHover:q,showGrid:X,showLegend:Y,title:Q,description:K,summary:Z,accessibleTable:J,categoryLabel:U,valueLabel:ee}=i,te=Ro(()=>ii(r),[r]),ie=d||s,oe=ve({responsive:e,data:te,rawData:r,colorBy:ie,colorScheme:g,legendInteraction:F,legendPosition:O,frameLegend:A,selection:S,linkedHover:P,fallbackFields:ie?["string"==typeof ie?ie:""]:[],unwrapData:!0,onObservation:L,onClick:M,hoverHighlight:I,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"GroupedBarChart",chartId:T,showLegend:Y,userMargin:a,marginDefaults:i.marginDefaults,loading:H,loadingContent:B,emptyContent:$,width:V,height:G,hasTitle:!!Q,axisChrome:Ht({showAxes:i.showAxes,projection:"horizontal"===h?"horizontal":"vertical",hasCategoryLabel:!!U,hasValueLabel:!!ee})}),re=Ci(),ae=Ro(()=>new Map,[]),ne=Ro(()=>_i(c),[c]),le=Ur({brushProp:C,onBrushProp:_,linkedBrush:R,valueAccessor:c}),se=Jr({colorBy:ie,colorScale:oe.colorScale,color:D,themeCategorical:re,colorScheme:g,categoryIndexMap:ae,userPieceStyle:A.pieceStyle,stroke:E,strokeWidth:W,opacity:j,styleRules:v,resolveRuleValue:ne,effectiveSelectionHook:oe.effectiveSelectionHook,resolvedSelection:oe.resolvedSelection}),ce=Ro(()=>At({categoryAccessor:s,valueAccessor:c,groupAccessor:l,valueFormat:u}),[s,l,c,u]),he=fe({componentName:"GroupedBarChart",data:r,accessors:{categoryAccessor:l,valueAccessor:c},requiredProps:{groupBy:s}}),{effectiveLegendProps:ue,effectiveMargin:de}=Zr({ref:t,frameRef:o,setup:oe}),ge=Ro(()=>He(f),[f]);if(oe.earlyReturn)return oe.earlyReturn;let me={chartType:"clusterbar",...null!=r&&{data:te},oAccessor:l,rAccessor:c,groupBy:s,oSort:m,projection:"horizontal"===h?"horizontal":"vertical",pieceStyle:se,size:[V,G],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:de,barPadding:p,...null!=y&&{roundedTop:y},...ge&&{gradientFill:ge},baselinePadding:b,enableHover:q,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:i.showAxes,oLabel:U,rLabel:ee,rFormat:u,...z&&{oFormat:z},showGrid:X,...ue,...Rt({title:Q,description:K,summary:Z,accessibleTable:J,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Pt({tooltip:x,defaultTooltipContent:ce}),...St({linkedHover:P,selection:S,onObservation:L,onClick:M,hoverHighlight:I,mobileInteraction:oe.mobileInteraction,customHoverBehavior:oe.customHoverBehavior,customClickBehavior:oe.customClickBehavior}),...w&&w.length>0&&{annotations:w},...k&&{rExtent:k},...le.brushStreamProps,...Object.fromEntries(Object.entries(A).filter(([e])=>"pieceStyle"!==e))};return he?Ho(Li,{componentName:"GroupedBarChart",message:he,width:V,height:G}):Ho(Mi,{componentName:"GroupedBarChart",width:V,height:G,children:Ho(N,{ref:o,...me})})}),"GroupedBarChart"),ue=/*#__PURE__*/Jt(/*#__PURE__*/Mo(function(e,t){let i=Si(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:!1,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,showCategoryTicks:!1,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),o=Co(null);be(t,{variant:"xy",frameRef:o});let{data:r,margin:a,className:n,stepAccessor:l="step",valueAccessor:s="value",categoryAccessor:c,colorBy:h,colorScheme:u,styleRules:d,orientation:g="horizontal",connectorOpacity:m=.3,showLabels:p=!0,valueFormat:y,tooltip:f,annotations:v,frameProps:b={},selection:x,linkedHover:w,onObservation:k,onClick:A,hoverHighlight:S,chartId:P,loading:R,loadingContent:C,emptyContent:_,legendInteraction:L,legendPosition:M,color:I,stroke:T,strokeWidth:H,opacity:B,categoryFormat:$}=e,F="vertical"===g,{width:O,height:D,enableHover:E,showLegend:W,title:j,description:z,summary:V,accessibleTable:G}=i,q=F?{top:j?60:40,right:20,bottom:60,left:60}:{top:j?40:10,right:10,bottom:10,left:10},X=Ro(()=>ii(r),[r]),Y=h||c,Q=!Y,K=ve({responsive:e,data:X,rawData:r,colorBy:Y,colorScheme:u,legendInteraction:L,legendPosition:M,frameLegend:b,selection:x,linkedHover:w,fallbackFields:Y?["string"==typeof Y?Y:""]:[],unwrapData:!0,onObservation:k,onClick:A,hoverHighlight:S,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"FunnelChart",chartId:P,showLegend:W,userMargin:a,marginDefaults:q,loading:R,loadingContent:C,emptyContent:_,width:O,height:D,hasTitle:!!j,axisChrome:Ht({showAxes:F&&i.showAxes,projection:F?"vertical":"horizontal",hasCategoryLabel:!1,hasValueLabel:!1})});Pi("FunnelChart",X,"stepAccessor",l),Pi("FunnelChart",X,"valueAccessor",s);let Z=Ci(),J=Ro(()=>new Map,[]),U=Ro(()=>_i(s),[s]),ee=Ro(()=>{if(Q)return I||(Z?.[0]?Z[0]:Array.isArray(u)&&u[0]?u[0]:"#4e79a7")},[Q,I,Z,u]),te=Jr({colorBy:ee?void 0:Y,colorScale:K.colorScale,color:ee??I,themeCategorical:Z,colorScheme:u,categoryIndexMap:J,userPieceStyle:b?.pieceStyle,stroke:T,strokeWidth:H,opacity:B,effectiveSelectionHook:K.effectiveSelectionHook,resolvedSelection:K.resolvedSelection,styleRules:d,resolveRuleValue:U}),ie=Ro(()=>e=>{let t=e?.data||e,i=t?.__funnelStep||t?.__barFunnelStep||t?.step||"",o=t?.__funnelValue??t?.__barFunnelValue??t?.value??"",r=t?.__funnelPercent??t?.__barFunnelPercent,a=t?.__funnelIsFirstStep??t?.__barFunnelIsFirstStep,n=t?.__barFunnelIsDropoff,l=t?.__barFunnelCategory??t?.category,s=null==r||a?"":` (${Math.abs(r-Math.round(r))<.05?`${Math.round(r)}%`:`${r.toFixed(1)}%`})`;return Bo("div",{className:"semiotic-tooltip",style:uo,children:[i&&Ho("div",{style:{fontWeight:"bold"},children:String(i)}),l&&l!==i&&Ho("div",{style:{marginTop:2,opacity:.8},children:String(l)}),n&&Ho("div",{style:{marginTop:2,fontStyle:"italic",opacity:.7},children:"Dropoff"}),Bo("div",{style:{marginTop:4},children:[!y||"number"!=typeof o&&"string"!=typeof o?String(o):y(o),s]})]})},[y]);if(K.earlyReturn)return K.earlyReturn;let oe=fe({componentName:"FunnelChart",data:r,accessors:{stepAccessor:l,valueAccessor:s}});if(oe)return Ho(Li,{componentName:"FunnelChart",message:oe,width:O,height:D});let re={chartType:F?"bar-funnel":"funnel",...null!=r&&{data:X},oAccessor:l,rAccessor:s,...c&&{stackBy:c},projection:F?"vertical":"horizontal",barPadding:F?40:0,pieceStyle:te,size:[O,D],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,maxDevicePixelRatio:e.maxDevicePixelRatio,margin:K.margin,enableHover:E,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:F&&i.showAxes,showCategoryTicks:F&&i.showAxes,...$&&{oFormat:$},...y&&{rFormat:y},showGrid:F,...!F&&{connectorOpacity:m},showLabels:p,...K.legendBehaviorProps,...j&&{title:j},...z&&{description:z},...V&&{summary:V},...void 0!==G&&{accessibleTable:G},...n&&{className:n},...null!=e.animate&&{animate:e.animate},tooltipContent:!1===f?()=>null:!0===f||null==f?ie:Ti(f)||ie,...St({linkedHover:w,selection:x,onObservation:k,onClick:A,hoverHighlight:S,mobileInteraction:K.mobileInteraction,customHoverBehavior:K.customHoverBehavior,customClickBehavior:K.customClickBehavior}),...v&&v.length>0&&{annotations:v},...Object.fromEntries(Object.entries(b).filter(([e])=>"pieceStyle"!==e))};return Ho(Mi,{componentName:"FunnelChart",width:O,height:D,children:Ho(N,{ref:o,...re})})}),"FunnelChart"),de=/*#__PURE__*/Jt(/*#__PURE__*/Mo(function(e,t){let i=Co(null);be(t,{variant:"xy",frameRef:i});let o=Si(e.mode,{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,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:r,margin:a,className:n,categoryAccessor:l="attribute",valueAccessor:s="value",seriesAccessor:c,colorBy:h,categoryFormat:u,colorScheme:d,styleRules:g,pointRadius:m=4,valueExtent:p,valueFormat:y,tooltip:f,annotations:v,frameProps:b={},selection:x,linkedHover:w,onObservation:k,onClick:A,hoverHighlight:S,chartId:P,loading:R,loadingContent:C,emptyContent:_,legendInteraction:L,legendPosition:M,color:I,stroke:T,strokeWidth:H,opacity:B}=e,{width:$,height:F,enableHover:O,showGrid:D,showLegend:E,title:W,description:j,summary:z,accessibleTable:V}=o,G=Ro(()=>ii(r),[r]),q=c||("string"==typeof h?h:void 0)||("function"==typeof h?h:void 0),X=q??"__radar",Y=h||q,Q=ve({responsive:e,data:G,rawData:r,colorBy:Y,colorScheme:d,legendInteraction:L,legendPosition:M,frameLegend:b,selection:x,linkedHover:w,fallbackFields:["string"==typeof Y?Y:"","string"==typeof l?l:""].filter(Boolean),unwrapData:!0,onObservation:k,onClick:A,hoverHighlight:S,mobileInteraction:o.mobileInteraction,mobileSemantics:o.mobileSemantics,chartType:"RadarChart",chartId:P,showLegend:E,userMargin:a,marginDefaults:o.marginDefaults,loading:R,loadingContent:C,emptyContent:_,width:$,height:F,hasTitle:!!W,axisChrome:Ht({showAxes:!0,projection:"radial",hasCategoryLabel:!1,hasValueLabel:!1})}),K=Ci(),Z=Ro(()=>new Map,[]),J=Ro(()=>_i(s),[s]),U=Jr({colorBy:Y,colorScale:Q.colorScale,color:I,themeCategorical:K,colorScheme:d,categoryIndexMap:Z,userPieceStyle:b?.pieceStyle,stroke:T,strokeWidth:H,opacity:B,effectiveSelectionHook:Q.effectiveSelectionHook,resolvedSelection:Q.resolvedSelection,baseStyleExtras:{r:m,fillOpacity:.85},styleRules:g,resolveRuleValue:J}),ee=Ro(()=>At({categoryAccessor:l,valueAccessor:s,groupAccessor:q,groupLabel:"string"==typeof q?q:"series",valueFormat:y}),[l,s,q,y]);if(Q.earlyReturn)return Q.earlyReturn;let te=fe({componentName:"RadarChart",data:r,accessors:{categoryAccessor:l,valueAccessor:s}});if(te)return Ho(Li,{componentName:"RadarChart",message:te,width:$,height:F});let ie={chartType:"point",projection:"radial",...null!=r&&{data:G},oAccessor:l,rAccessor:s,connectorAccessor:X,connectorStyle:e=>{let t="function"==typeof U?U(e):{},i="string"==typeof t.fill?t.fill:void 0;return{fill:i,fillOpacity:.15,stroke:i,strokeWidth:2,opacity:.7}},pieceStyle:U,...u&&{oFormat:u},rExtent:p??[0],rFormat:y,oLabel:"",size:[$,F],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:Q.margin,enableHover:O,showAxes:!0,showGrid:D,...Q.legendBehaviorProps,...Rt({title:W,description:j,summary:z,accessibleTable:V,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Pt({tooltip:f,defaultTooltipContent:ee}),...St({linkedHover:w,selection:x,onObservation:k,onClick:A,hoverHighlight:S,mobileInteraction:Q.mobileInteraction,customHoverBehavior:Q.customHoverBehavior,customClickBehavior:Q.customClickBehavior}),...v&&v.length>0&&{annotations:v},...Object.fromEntries(Object.entries(b).filter(([e])=>"pieceStyle"!==e&&"connectorStyle"!==e))};return Ho(Mi,{componentName:"RadarChart",width:$,height:F,children:Ho(N,{ref:i,...ie})})}),"RadarChart"),ge=/*#__PURE__*/Jt(/*#__PURE__*/Mo(function(e,t){let i=Si(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,categoryLabel:e.categoryLabel,valueLabel:e.valueLabel,showCategoryTicks:e.showCategoryTicks,orientation:e.orientation,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),o=Co(null),{data:r,margin:a,className:n,categoryAccessor:l="category",subcategoryAccessor:s,valueAccessor:c="value",orientation:h="horizontal",valueFormat:u,colorBy:d,colorScheme:g,styleRules:m,barPadding:p,tooltip:y,annotations:f,brush:v,onBrush:b,linkedBrush:x,frameProps:w={},selection:k,linkedHover:A,onObservation:S,onClick:P,hoverHighlight:R,chartId:C,loading:_,loadingContent:L,emptyContent:M,legendInteraction:I,legendPosition:T,color:H,stroke:B,strokeWidth:$,opacity:F,categoryFormat:O,rTickValues:D,tickLabelEdgeAlign:E,showCategoryTicks:W,gradientFill:j,trackFill:z,roundedTop:V,valueExtent:G}=e,{width:q,height:X,enableHover:Y,showGrid:Q,showLegend:K,title:Z,description:J,summary:U,accessibleTable:ee,categoryLabel:te,valueLabel:ie}=i,oe=Ro(()=>ii(r),[r]),re=d||s,ae=Ro(()=>{if(null!=p)return p;if("sparkline"!==i.mode)return 40;let e=new Set(oe.map(e=>"function"==typeof l?l(e):e[l])),t=Math.max(1,e.size);if(t<=1)return 1;let o=(("horizontal"===h?X:q)-2*t)/(t-1);return Math.max(0,Math.min(1,o))},[p,i.mode,oe,l,h,q,X]),ne=ve({responsive:e,data:oe,rawData:r,colorBy:re,colorScheme:g,legendInteraction:I,legendPosition:T,frameLegend:w,selection:k,linkedHover:A,fallbackFields:re?["string"==typeof re?re:""]:[],unwrapData:!0,onObservation:S,onClick:P,hoverHighlight:R,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"SwimlaneChart",chartId:C,showLegend:K,userMargin:a,marginDefaults:i.marginDefaults,loading:_,loadingContent:L,emptyContent:M,width:q,height:X,hasTitle:!!Z,axisChrome:Ht({showAxes:i.showAxes,projection:"horizontal"===h?"horizontal":"vertical",hasCategoryLabel:!1!==W&&!!te,hasValueLabel:!!ie})}),le=Ur({brushProp:v,onBrushProp:b,linkedBrush:x,valueAccessor:c}),se=Ci(),ce=Ro(()=>new Map,[]),he=Ro(()=>_i(c),[c]),ue=Jr({colorBy:re,colorScale:ne.colorScale,color:H,themeCategorical:se,colorScheme:g,categoryIndexMap:ce,userPieceStyle:w?.pieceStyle,stroke:B,strokeWidth:$,opacity:F,effectiveSelectionHook:ne.effectiveSelectionHook,resolvedSelection:ne.resolvedSelection,cycleByCategory:!0,styleRules:m,resolveRuleValue:he}),de=Ro(()=>At({categoryAccessor:s,valueAccessor:c,groupAccessor:l,valueFormat:u}),[s,l,c,u]),ge=fe({componentName:"SwimlaneChart",data:r,accessors:{categoryAccessor:l,valueAccessor:c,subcategoryAccessor:s},requiredProps:{subcategoryAccessor:s}}),{effectiveLegendProps:me,effectiveMargin:pe}=Zr({ref:t,frameRef:o,setup:ne}),ye=Ro(()=>He(j),[j]);if(ne.earlyReturn)return ne.earlyReturn;let be={chartType:"swimlane",...null!=r&&{data:oe},oAccessor:l,rAccessor:c,stackBy:s,projection:"horizontal"===h?"horizontal":"vertical",pieceStyle:ue,size:[q,X],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:pe,barPadding:ae,enableHover:Y,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:i.showAxes,oLabel:!1===W?void 0:te,rLabel:ie,rFormat:u,...D&&{rTickValues:D},...null!=E&&{tickLabelEdgeAlign:E},...O&&{oFormat:O},...void 0!==W&&{showCategoryTicks:W},showGrid:Q,...me,...Rt({title:Z,description:J,summary:U,accessibleTable:ee,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Pt({tooltip:y,defaultTooltipContent:de}),...St({linkedHover:A,selection:k,onObservation:S,onClick:P,hoverHighlight:R,mobileInteraction:ne.mobileInteraction,customHoverBehavior:ne.customHoverBehavior,customClickBehavior:ne.customClickBehavior}),...f&&f.length>0&&{annotations:f},...ye&&{gradientFill:ye},...null!=z&&{trackFill:z},...null!=V&&{roundedTop:V},...G&&{rExtent:G},...le.brushStreamProps,...Object.fromEntries(Object.entries(w).filter(([e])=>"pieceStyle"!==e))};return ge?Ho(Li,{componentName:"SwimlaneChart",message:ge,width:q,height:X}):Ho(Mi,{componentName:"SwimlaneChart",width:q,height:X,children:Ho(N,{ref:o,...be})})}),"SwimlaneChart"),me=/*#__PURE__*/Jt(/*#__PURE__*/Mo(function(e,t){let{data:i,layout:o,layoutConfig:r,onLayoutError:a,categoryAccessor:n="category",valueAccessor:l="value",oExtent:s,rExtent:c,projection:h="vertical",margin:u,className:d,colorBy:g,colorScheme:m,tooltip:p,showAxes:y=!1,annotations:f,onObservation:v,onClick:b,selection:x,linkedHover:w,chartId:k,loading:A,loadingContent:S,emptyContent:P,frameProps:R={}}=e,{frameRef:C,resolved:_,safeData:L,setup:M,earlyReturn:I}=ye({responsive:e,imperativeRef:t,imperativeVariant:"xy",chartTypeLabel:"OrdinalCustomChart",unwrapData:!0,data:i,colorBy:g,colorScheme:m,frameLegend:R,selection:x,linkedHover:w,onObservation:v,onClick:b,chartId:k,loading:A,loadingContent:S,emptyContent:P,margin:u,width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,mode:e.mode,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),T=M.effectiveSelectionHook,H=Ro(()=>T?.isActive?{isActive:!0,predicate:T.predicate}:null,[T?.isActive,T?.predicate]),B=Ro(()=>Ti(p),[p]);if(I)return I;let{width:$,height:F,enableHover:O,showGrid:D,title:E,description:W,summary:j,accessibleTable:z}=_,V={chartType:"custom",...null!=i&&{data:L},customLayout:o,layoutConfig:r,onLayoutError:a,...H&&{layoutSelection:H},oAccessor:n,rAccessor:l,oExtent:s,rExtent:c,projection:h,colorAccessor:g,colorScheme:m,size:[$,F],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:M.margin,enableHover:O,showAxes:y,showGrid:D,annotations:f,...Rt({title:E,description:W,summary:j,accessibleTable:z,className:d,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...!1===p?{tooltipContent:()=>null}:B?{tooltipContent:B}:{},...M.legendBehaviorProps,...St({linkedHover:w,selection:x,onObservation:v,onClick:b,hoverHighlight:!1,mobileInteraction:M.mobileInteraction,customHoverBehavior:M.customHoverBehavior,customClickBehavior:M.customClickBehavior}),...R};return Ho(Mi,{componentName:"OrdinalCustomChart",width:$,height:F,children:Ho(N,{ref:C,...V})})}),"OrdinalCustomChart");export{N as a,j as b,z as c,Q as d,K as e,Z as f,U as g,ee as h,te as i,ie as j,ne as k,le as l,ce as m,he as n,ue as o,de as p,ge as q,me as r};
@@ -1 +0,0 @@
1
- function e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function t(t,n){return e(t,n)?t[n]:void 0}function n(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0})}function r(){return Object.create(null)}function o(e,t){return e.slice(0,t+1).map(e=>e.replaceAll("%","%25").replaceAll(">","%3E")).join(">")}function i(e,n,r){return n.has(e)?"node":t(r.nodeIdsBySection,e)?"section":"global"}function s(e,o,s){let u=[],a=new Set(o.nodes.map(e=>e.id)),c=new Set;for(let n of o.measureValues){let r=t(e.measures,n.measureId);if(!r)continue;let o=i(n.subjectId,a,s);u.push({measureId:n.measureId,subjectId:n.subjectId,subjectKind:o,value:n.value,status:n.status,unitKind:r.unitKind,countUnit:r.countUnit,timeDenominator:r.timeDenominator}),"section"===o&&c.add(`${n.measureId}\0${n.subjectId}`)}let d=r();for(let e of o.nodes)n(d,e.id,e);let l=r(),f=r();for(let e of u){if("node"!==e.subjectKind)continue;let t=d[e.subjectId];if(!t?.sectionId)continue;let n=`${e.measureId}\0${t.sectionId}`;c.has(n)||(l[n]=(l[n]??0)+e.value,"exact"!==e.status?f[n]=e.status:f[n]||(f[n]="exact"))}for(let[n,r]of Object.entries(l)){let o=n.split("\0"),i=o[0],s=o[1],a=t(e.measures,i);a&&u.push({measureId:i,subjectId:s,subjectKind:"section",value:r,status:f[n]??"exact",unitKind:a.unitKind,countUnit:a.countUnit,timeDenominator:a.timeDenominator})}return{entries:u}}function u(e,t,n){return e.entries.find(e=>e.measureId===t&&e.subjectId===n)}function a(e,t=[],n){let r=void 0===n?void 0:new Set("string"==typeof n?[n]:n),o=t.filter(e=>!e.missingPrehistory&&void 0!==e.partition&&r?.has(e.partition)),i=new Set(o.map(e=>e.id)),s=new Set(o.map(e=>e.entityId)),u=new Map,a=0;for(let t of e){if(void 0!==n&&"string"==typeof t.roles.occurrence&&!i.has(t.roles.occurrence))continue;let e=Object.entries(t.entityWeights);0===e.length&&void 0===n&&(a+=t.entityCount);for(let[t,r]of e)(void 0===n||s.has(t))&&u.set(t,r)}return[...u.values()].reduce((e,t)=>e+t,a)}function c(e){let t=e.spec.comparison;if(!t)return;let n=t.partitions.map(n=>{let r=u(e.ledger,t.denominatorMeasureId,n)?.value??0,o={};return o["repeated-state-episode"]=a(e.motifs.matches.filter(e=>"repeated-state-episode"===e.template),e.source.occurrences,n),{partition:n,assigned:r,motifUsers:o,outcomes:{purchases:u(e.ledger,"purchases",n)?.value??0}}});return{partitions:[...t.partitions],denominatorMeasureId:t.denominatorMeasureId,referencePartition:t.referencePartition,rows:n}}function d(e,t){let n=e.spec.comparison?.denominatorMeasureId??e.spec.motifs.denominatorRef??"assigned";return u(e.ledger,n,t)?.value}function l(e,t,n){return 0===n||1e4*e%n!=0?Math.round((t-e)/Math.max(n,1)*1e4):1e4*(t-e)/n}function f(e,t){return t.length>0&&e.some((n,r)=>t.every((t,n)=>e[r+n]===t))}function m(e){let t=[];for(let n of e.occurrences??[]){if(n.missingPrehistory)continue;let e=n.nodePath;for(let r=0;r<e.length-1;r++)t.push({from:e[r],to:e[r+1],via:r>0?e[r-1]:void 0,occurrenceIds:[n.id]})}return{hops:t,graphAdjacency:e.edges.map(e=>({source:e.source,target:e.target,edgeId:e.id}))}}function p(e,t){for(let n=0;n<t.length-1;n++)if(!e.edges.some(e=>e.source===t[n]&&e.target===t[n+1]))return!1;return t.length>0}function h(e,t){return!(t.length<2)&&(e.occurrences??[]).some(e=>!e.missingPrehistory&&f(e.nodePath,t))}function g(e,t,n){let r=new Set;for(let o of e.occurrences??[]){if(o.missingPrehistory)continue;let e=o.nodePath;for(let o=0;o<e.length-1;o++)e[o]===t&&(null!=n&&(0===o||e[o-1]!==n)||r.add(e[o+1]))}return[...r]}export{a,t as b,n as c,r as d,o as e,s as f,u as g,c as h,d as i,l as j,f as k,m as l,p as m,h as n,g as o};
@@ -1 +0,0 @@
1
- function t(t,e,a,i){let r=i.current,s=!0===t.lastCustomLayoutFailure?.preservedLastGoodScene,u=!s&&t.hasActivePulsesAt(e),o=!(a||s||!u&&!r)&&t.refreshPulse(e);return i.current=u,{changed:o,pending:u}}function e({customHoverBehavior:t,customClickBehavior:e,onObservation:a,chartId:i,chartType:r}){let s=!(!t&&!a),u=!(!e&&!a),o=A((e,s)=>{t?.(e,s),b({onObservation:a,datum:e?e.data||e:null,x:e?.x,y:e?.y,chartType:r,chartId:i,context:s})},[i,r,t,a]),n=A((t,s)=>{e?.(t,s),v({onObservation:a,datum:t?t.data||t:null,x:t?.x,y:t?.y,chartType:r,chartId:i,context:s})},[i,r,e,a]);return{customHoverBehavior:s?o:void 0,customClickBehavior:u?n:void 0,hasClickBehavior:u}}function a(t){let e=[];for(let a of t)switch(a.type){case"point":if(!1===a.interactive)break;e.push({x:a.x,y:a.y,datum:a.datum,shape:"circle",group:"_default"});break;case"symbol":if(a.size<=0)break;e.push({x:a.x,y:a.y,datum:a.datum,shape:"circle",group:"_default"});break;case"glyph":{if(a.size<=0||null==a.datum)break;let t=z(a.glyph,a.size);e.push({x:a.x+t.centerDx,y:a.y+t.centerDy,datum:a.datum,shape:"rect",w:2*t.halfWidth,h:2*t.halfHeight,group:"_default"});break}case"line":{let t=a,i=Array.isArray(t.datum)?t.datum:[],r=t.group??"_default";for(let a=0;a<t.path.length&&a<i.length;a++)e.push({x:t.path[a][0],y:t.path[a][1],datum:i[a],shape:"circle",group:r});break}case"area":{if(!1===a.interactive)break;let t=a,i=Array.isArray(t.datum)?t.datum:[],r=t.group??"_default";for(let a=0;a<t.topPath.length&&a<i.length;a++)e.push({x:t.topPath[a][0],y:t.topPath[a][1],datum:i[a],shape:"circle",group:r});break}case"rect":e.push({x:a.x+a.w/2,y:a.y+a.h/2,datum:a.datum,shape:"rect",w:a.w,h:a.h,group:a.group??"_default"});break;case"candlestick":{if(null==a.datum)break;let t=a.isRange?a.highY:Math.min(a.openY,a.closeY),i=a.isRange?a.lowY:Math.max(a.openY,a.closeY);e.push({x:a.x,y:(t+i)/2,datum:w(a.datum),shape:"rect",w:a.bodyWidth,h:Math.abs(i-t),group:"_default"});break}case"heatcell":e.push({x:a.x+a.w/2,y:a.y+a.h/2,datum:a.datum,shape:"rect",w:a.w,h:a.h,group:"_default"})}return e.sort((t,e)=>t.x-e.x||t.y-e.y),e}function i(t){let e=[];for(let a of t)if("rect"===a.type&&null!=a.x){if(null==a.datum)continue;let t=a.datum?.category??"";e.push({x:a.x+a.w/2,y:a.y+a.h/2,datum:a.datum,shape:"rect",w:a.w,h:a.h,semanticKey:void 0!==a.datum.__aggregateValue?JSON.stringify([t,a.group??t]):void 0,group:a.group??t})}else if("point"===a.type){if(!1===a.interactive)continue;e.push({x:a.x,y:a.y,datum:a.datum,shape:"circle",group:"_default"})}else if("symbol"===a.type){if(a.size<=0)continue;e.push({x:a.x,y:a.y,datum:a.datum,shape:"circle",group:"_default"})}else if("glyph"===a.type){if(a.size<=0||null==a.datum)continue;let t=z(a.glyph,a.size);e.push({x:a.x+t.centerDx,y:a.y+t.centerDy,datum:a.datum,shape:"rect",w:2*t.halfWidth,h:2*t.halfHeight,group:"_default"})}else if("boxplot"===a.type){if(null==a.datum)continue;let t="vertical"===a.projection;e.push({x:t?a.x:(a.q1Pos+a.q3Pos)/2,y:t?(a.q1Pos+a.q3Pos)/2:a.y,datum:w(a.datum),shape:"rect",w:t?a.columnWidth:Math.abs(a.q3Pos-a.q1Pos),h:t?Math.abs(a.q3Pos-a.q1Pos):a.columnWidth,stats:a.stats,category:a.category,group:"_default"})}else if("violin"===a.type&&a.bounds){if(null==a.datum)continue;let{x:t,y:i,width:r,height:s}=a.bounds;e.push({x:t+r/2,y:i+s/2,datum:w(a.datum),shape:"rect",w:r,h:s,stats:a.stats,category:a.category,group:"_default"})}else if("trapezoid"===a.type){if(null==a.datum||a.points.length<3)continue;e.push({x:a.points.reduce((t,e)=>t+e[0],0)/a.points.length,y:a.points.reduce((t,e)=>t+e[1],0)/a.points.length,datum:w(a.datum),shape:"path",pathData:`M${a.points.map(t=>t.join(",")).join("L")}Z`,category:a.category,group:"_default"})}else if("connector"===a.type){if(null==a.datum||(a.style.strokeWidth??1)<=0||"none"===a.style.stroke||a.x1===a.x2&&a.y1===a.y2)continue;e.push({x:(a.x1+a.x2)/2,y:(a.y1+a.y2)/2,datum:w(a.datum),shape:"path",pathData:`M${a.x1},${a.y1}L${a.x2},${a.y2}`,category:a.group,group:a.group??"_default"})}else if("wedge"===a.type&&null!=a.cx){if(null===a.datum)continue;let t=((a.startAngle||0)+(a.endAngle||0))/2,i=((a.innerRadius||0)+(a.outerRadius||50))/2;e.push({x:a.cx+Math.cos(t)*i,y:a.cy+Math.sin(t)*i,datum:a.datum,shape:"wedge",group:"_default"})}return e.sort((t,e)=>t.x-e.x||t.y-e.y),e}function r(t){let e=[];for(let a of t)if("point"===a.type&&null!=a.x&&!1!==a.interactive)e.push({x:a.x,y:a.y,datum:a.datum,shape:"circle"});else if("glyph"===a.type){if(a.size<=0||null==a.datum)continue;let t=z(a.glyph,a.size);e.push({x:a.x+t.centerDx,y:a.y+t.centerDy,datum:a.datum,shape:"rect",w:2*t.halfWidth,h:2*t.halfHeight})}else if("line"===a.type){if(null==a.datum||a.path.length<2)continue;let t=a.path.slice(1).map((t,e)=>Math.hypot(t[0]-a.path[e][0],t[1]-a.path[e][1])),i=t.reduce((t,e)=>t+e,0)/2;if(!Number.isFinite(i)||i<=0)continue;for(let r=0;r<t.length;r++){let s=t[r];if(s>0&&i<=s){let t=a.path[r],u=a.path[r+1],o=i/s;e.push({x:t[0]+(u[0]-t[0])*o,y:t[1]+(u[1]-t[1])*o,datum:w(a.datum),shape:"path",pathData:`M${a.path.map(t=>t.join(",")).join("L")}`});break}i-=s}}else"geoarea"===a.type&&a.centroid&&!1!==a.interactive&&e.push({x:a.centroid[0],y:a.centroid[1],datum:a.datum,shape:"geoarea",pathData:a.pathData});return e.sort((t,e)=>t.x-e.x||t.y-e.y),e}function s(t){return{data:t.datum||{},...t.stats&&{stats:t.stats},...null!=t.category&&{category:t.category},x:t.x,y:t.y,__semioticHoverData:!0}}function u({decorateHover:t,...e}){return x({...e,extractPoints:a,toHover:(e,a)=>{let i=s({...e,datum:_(e.datum,a.resolvedRibbons)});return t?t(i,a):i}})}function o({chartType:t,oAccessor:e,rAccessor:a,...r}){return x({...r,extractPoints:i,toHover:i=>({...s(i),__oAccessor:"string"==typeof e?e:void 0,__rAccessor:"string"==typeof a?a:void 0,__chartType:t})})}function n(t){let e=t.datum;return{...e||{},...e?.properties||{},data:e,properties:e?.properties,x:t.x,y:t.y,__semioticHoverData:!0}}function h(t){return x({...t,extractPoints:r,toHover:n,navigation:"linear"})}function l(t,e,a){let i=t.duration??500,r=a-e;return r>=i?0:1-r/i}function c(t,e,a,i,r,s=(typeof performance<"u"?performance.now():Date.now())){let u=t.color??"rgba(255,255,255,0.6)",o=t.glowRadius??4,n=!1,h=r??(()=>{let t=new Map;for(let e=0;e<a.length;e++)t.set(a[e],e);return t})();for(let a of e){if("line"===a.type)continue;if("area"===a.type){let e=Array.isArray(a.datum)?a.datum:[a.datum],r=0,o=!1;for(let a of e){let e=h.get(a);if(null==e)continue;o=!0;let u=i.get(e);if(null==u)continue;let n=l(t,u,s);n>r&&(r=n)}o&&(n=p(a,r,u)||n);continue}let e=h.get(a.datum);if(null==e)continue;let r=i.get(e);n=p(a,null==r?0:l(t,r,s),u,o)||n}return n}function p(t,e,a,i){let r=!1;return e>0?(t._pulseIntensity!==e&&(t._pulseIntensity=e,r=!0),t._pulseColor!==a&&(t._pulseColor=a,r=!0),t._pulseGlowRadius!==i&&(t._pulseGlowRadius=i,r=!0),r):(0!==t._pulseIntensity&&(t._pulseIntensity=0,r=!0),void 0!==t._pulseColor&&(t._pulseColor=void 0,r=!0),void 0!==t._pulseGlowRadius&&(t._pulseGlowRadius=void 0,r=!0),r)}function f(t,e,a=(typeof performance<"u"?performance.now():Date.now())){if(!e||0===e.size)return!1;let i=t.duration??500,r=e.peek();return null!=r&&a-r<i}function y(t,e,a){e<=t.capacity||(t.resize(e),a&&e>a.capacity&&a.resize(e))}function d(t,e){let a=new k(t.capacity);return t.forEach(()=>a.push(e)),a}function m(t,e,a,i){let r=t.push(e);return a&&a.push(i),r}function g(t,e,a){if(!e||0===e.size)return;let i=new Set;if(t.forEach((t,e)=>{a(t)&&i.add(e)}),0===i.size)return;let r=e.toArray();e.clear();for(let t=0;t<r.length;t++)i.has(t)||e.push(r[t])}import{e as _}from"./c-5XCN6BMT.min.js";import{N as x}from"./c-GBO32OML.min.js";import{aV as b,aW as v}from"./c-VW7ZSLDC.min.js";import{b as w}from"./c-SIQVOV6A.min.js";import{i as z}from"./c-ELGOCAEY.min.js";import{useCallback as A}from"react";var k=class{constructor(t){if(this._capacity=t,this.head=0,this._size=0,t<1)throw new Error("RingBuffer capacity must be at least 1");this.buffer=new Array(t)}push(t){let e;return this._size===this._capacity?e=this.buffer[this.head]:this._size++,this.buffer[this.head]=t,this.head=(this.head+1)%this._capacity,e}pushMany(t){let e=[];for(let a of t){let t=this.push(a);void 0!==t&&e.push(t)}return e}get(t){if(t<0||t>=this._size)return;let e=(this.head-this._size+t+this._capacity)%this._capacity;return this.buffer[e]}peek(){if(0!==this._size)return this.buffer[(this.head-1+this._capacity)%this._capacity]}peekOldest(){if(0!==this._size)return this.buffer[(this.head-this._size+this._capacity)%this._capacity]}[Symbol.iterator](){let t=0;return{next:()=>t>=this._size?{done:!0,value:void 0}:{done:!1,value:this.get(t++)}}}forEach(t){let e=(this.head-this._size+this._capacity)%this._capacity;for(let a=0;a<this._size;a++)t(this.buffer[(e+a)%this._capacity],a)}toArray(){let t=new Array(this._size),e=(this.head-this._size+this._capacity)%this._capacity;for(let a=0;a<this._size;a++)t[a]=this.buffer[(e+a)%this._capacity];return t}resize(t){if(t<1)throw new Error("RingBuffer capacity must be at least 1");let e=this.toArray(),a=0,i=[];e.length>t&&(a=e.length-t,i=e.slice(0,a)),this._capacity=t,this.buffer=new Array(t),this.head=0,this._size=0;for(let t=a;t<e.length;t++)this.push(e[t]);return i}update(t,e){let a=[],i=(this.head-this._size+this._capacity)%this._capacity;for(let r=0;r<this._size;r++){let s=(i+r)%this._capacity,u=this.buffer[s];if(t(u)){let t;t="object"!=typeof u||null===u?u:Array.isArray(u)?[...u]:{...u},a.push(t),this.buffer[s]=e(u)}}return a}remove(t){let e=[],a=[];if(this.forEach(i=>{t(i)?a.push(i):e.push(i)}),0===a.length)return a;this.buffer=new Array(this._capacity),this.head=0,this._size=0;for(let t of e)this.push(t);return a}clear(){this.buffer=new Array(this._capacity),this.head=0,this._size=0}get size(){return this._size}get capacity(){return this._capacity}get full(){return this._size===this._capacity}};export{k as a,l as b,c,p as d,f as e,y as f,d as g,m as h,g as i,t as j,e as k,u as l,o as m,h as n};
@@ -1 +0,0 @@
1
- function e({isPushMode:e,colorBy:m,colorScheme:y,showLegend:h,legendPosition:p="right",trackCategoryDomain:b=!0,registerLinkedCategories:C=!0}){let[S,P]=c(0),A=r(null!=y),w=t(),v=o(),j=e&&!!m&&(b||v),D="function"==typeof m?f:m,L=d(()=>({lifecycle:{colorByDomainKey:D,isPushMode:e,shouldTrackCategoryDomain:j},categories:new Set,ordered:[]}),[D,e,j]),M=u(e=>{if(!m)return null;let r="function"==typeof m?m(e):e[m];return String(r)},[m]),k=u(e=>{if(!j)return;let r=!1;for(let t of e){if(!t||"object"!=typeof t)continue;let e=M(t);null!=e&&!L.categories.has(e)&&(L.categories.add(e),L.ordered.push(e),r=!0)}r&&P(e=>e+1)},[L,M,j]),B=u(e=>{if(!j)return;let r=Array.from(new Set(e.map(String))),t=L.ordered;t.length===r.length&&t.every((e,t)=>e===r[t])||(L.categories=new Set(r),L.ordered=r,P(e=>e+1))},[L,j]),W=u(e=>r=>{k([r]),e(r)},[k]),_=u(e=>r=>{k(r),e(r)},[k]),x=u(()=>{L.categories=new Set,L.ordered=[],P(e=>e+1)},[L]),G=d(()=>j?[...L.ordered]:[],[L,j,S]);a(C&&e&&m?G:[]);let K=d(()=>{if(!e||!m||!1===h)return;let r=L.ordered;if(0===r.length)return;let t=Array.isArray(y)&&y.length>0||"string"==typeof y&&y.length>0?y:w&&w.length>0?w:i,o="string"==typeof m?m:"__streamCat",a=r.map(e=>({[o]:e})),c=s(a,o,t),d=y&&"object"==typeof y&&!Array.isArray(y)?y:void 0;return n({data:a,colorBy:o,colorScale:e=>(A?g(A,e):void 0)??(d?g(d,e):void 0)??c(e)??"#999",getColor:l})},[e,m,h,y,A,w,S,L]),T=d(()=>{if(K)return"right"===p?{right:110}:"left"===p?{left:110}:"top"===p?{top:50}:"bottom"===p?{bottom:80}:{right:110}},[K,p]);return{wrapPush:W,wrapPushMany:_,resetCategories:x,categories:G,categoryDomainProps:j?{legendCategoryAccessor:m,onCategoriesChange:B}:{},streamingLegend:K,streamingMarginAdjust:T}}import{bc as r,bA as t,bt as o,bs as a,bv as n}from"./c-VW7ZSLDC.min.js";import{p as i,t as s,r as l,s as g}from"./c-WPL6PGP3.min.js";import{useState as c,useMemo as d,useCallback as u}from"react";var f=/*#__PURE__*/Symbol("streaming-function-color-domain");export{e as a};
@@ -1 +0,0 @@
1
- function e(e){w[e.chartType]=e}function t(e){return w[e]}function r(e){return w[e]?.buildScene}function o(e,t=!1){if(t){let e=w.custom?.canvasRenderers;if(e&&e.length>0)return e;let t=new Set,r=[];for(let e of Object.values(w))if(e)for(let o of e.canvasRenderers)t.has(o)||(t.add(o),r.push(o));return r}return w[e]?.canvasRenderers??[]}function n(e){return Array.isArray(e)?{nodes:e,binBoundaries:[]}:{nodes:e.nodes,binBoundaries:e.binBoundaries}}function i(e,t,r,o){if(!e.config.pointStyle)return;let n=o??e.getY;for(let o of t){let t=e.resolveGroupColor(o.key);for(let i of o.data){let o=e.config.pointStyle(i);!o.fill&&t&&(o={...o,fill:t});let a=o.r??3,l=e.getPointId?String(e.getPointId(i)):void 0,s=p(i,e.scales,e.getX,n,a,o,l);s&&r.push(s)}}}function a(e){return"threshold"===e.type&&"string"==typeof e.color&&"number"==typeof e.value}function l(e){return v(e)}function s(e,t){if("domain"!==e.extent)return;let[r,o]=t.domain(),n=t(o),i=t(r);return Number.isFinite(n)&&Number.isFinite(i)?[n,i]:void 0}function c(e,t){let r=e.groupData(t),o=e.config.stackOrder??"key",n=()=>r.sort((e,t)=>e.key<t.key?-1:e.key>t.key?1:0);if("input"!==o)if("key"===o)n();else if("asc"===o||"desc"===o||"insideOut"===o){let t=new Map;for(let o of r){let r=0;for(let t of o.data){let o=e.getX(t),n=e.getY(t);Number.isFinite(o)&&Number.isFinite(n)&&(r+=n)}t.set(o.key,r)}let n=(e,t)=>e<t?-1:e>t?1:0;if("asc"===o)r.sort((e,r)=>{let o=(t.get(e.key)??0)-(t.get(r.key)??0);return 0!==o?o:n(e.key,r.key)});else if("desc"===o)r.sort((e,r)=>{let o=(t.get(r.key)??0)-(t.get(e.key)??0);return 0!==o?o:n(e.key,r.key)});else{let e=[...r].sort((e,r)=>{let o=(t.get(r.key)??0)-(t.get(e.key)??0);return 0!==o?o:n(e.key,r.key)}),o=[],i=[],a=0,l=0;for(let r of e)a<l?(o.push(r),a+=t.get(r.key)??0):(i.push(r),l+=t.get(r.key)??0);r.length=0,r.push(...i.reverse(),...o)}}else n();let a=e.config.curve&&"linear"!==e.config.curve?e.config.curve:void 0,l=e.config.normalize?"zero":e.config.baseline??"zero",{nodes:s,stackedTops:c}=k(r,e.scales,e.getX,e.getY,(t,r)=>e.resolveAreaStyle(t,r),e.config.normalize,a,l,e.getPointId),f=s;if(e.config.pointStyle){let t=new WeakMap;for(let o of r){let r=c.get(o.key);if(r)for(let n of o.data){let o=e.getX(n),i=e.getY(n);null!=o&&!Number.isNaN(o)&&null!=i&&!Number.isNaN(i)&&r.has(o)&&t.set(n,r.get(o))}}i(e,r,f,r=>t.get(r)??e.getY(r))}return f}function f(e,t,r="start"){let o="center"===r?t/2:0;return Math.floor((e+o)/t)*t-o}function u(e,t,r,o,n,i=!1,a="start"){let l=new Map;for(let s of e){let e=t(s),c=r(s);if(null==e||null==c||Number.isNaN(e)||Number.isNaN(c))continue;let u=f(e,o,a),g=l.get(u);if(g||(g={start:u,end:u+o,total:0,categories:new Map,...i?{rows:[],categoryRows:new Map}:{}},l.set(u,g)),g.total+=c,g.rows?.push(s),n){let e=n(s);if(g.categories.set(e,(g.categories.get(e)||0)+c),g.categoryRows){let t=g.categoryRows.get(e);t||(t=[],g.categoryRows.set(e,t)),t.push(s)}}}return l}function g(e,t,r,o,n,i="start"){let a=u(e,t,r,o,n,!1,i);if(0===a.size)return[0,0];let l=0;for(let e of a.values())e.total>l&&(l=e.total);return[0,l]}import{a as d}from"./c-EAAKQIUZ.min.js";import{b as y}from"./c-ZYBEKQCT.min.js";import{f as p,a as h,j as v,b as m,e as k}from"./c-YJDGSPNB.min.js";import{b,c as S,d as G}from"./c-5XCN6BMT.min.js";import{a as N}from"./c-RQ2XZHWY.min.js";import{e as Y}from"./c-5PCO2P5Q.min.js";var w=/*#__PURE__*/Object.create(null),T={chartType:"line",buildScene:(e,t)=>function(e,t){let r=e.groupData(t),o=[],n=e.config.annotations?.filter(a).map(e=>({value:e.value,color:e.color,thresholdType:e.thresholdType||"greater"}));if(e.ribbons&&e.ribbons.length>0){let{perSeries:n,aggregate:i}=b(e.ribbons);if(i.length>0&&o.push(...S(e,t,i)),n.length>0)for(let t of r)o.push(...G(e,t.data,t.key,n))}for(let t of r){let r=e.resolveLineStyle(t.key,Y(t.data)),i=h(t.data,e.scales,e.getX,e.getY,r,t.key,e.getPointId);n&&n.length>0&&(i.colorThresholds=n),e.config.curve&&"linear"!==e.config.curve&&(i.curve=e.config.curve),e.config.lineGradient&&(i.strokeGradient=e.config.lineGradient),o.push(i)}return i(e,r,o),o}(e,t),canvasRenderers:[d,y,N]},M={chartType:"area",buildScene:(e,t)=>function(e,t){let r=e.groupData(t),o=[];if(e.ribbons&&e.ribbons.length>0){let{perSeries:n,aggregate:i}=b(e.ribbons);if(i.length>0&&o.push(...S(e,t,i)),n.length>0)for(let t of r)o.push(...G(e,t.data,t.key,n))}let n=e.scales.y.domain(),a=n[0],c=e.config.semanticLineStops?.filter(e=>Number.isFinite(e.offset)).map(e=>({value:n[0]+Math.max(0,Math.min(1,e.offset))*(n[1]-n[0]),color:e.color,opacity:e.opacity,thresholdType:"greater"})).sort((e,t)=>e.value-t.value),f=c&&c.length>0?(()=>{let t=c.reduce((e,t)=>(e.at(-1)?.value===t.value?e[e.length-1]=t:e.push(t),e),[]),r=[{from:n[0],to:t[0].value,color:t[0].color,opacity:t[0].opacity}];for(let e=0;e<t.length;e++)r.push({from:t[e].value,to:t[e+1]?.value??n[1],color:t[e].color,opacity:t[e].opacity});return r.map(({from:t,to:r,color:o,opacity:n})=>{let i=e.scales.y(t),a=e.scales.y(r);return{y:Math.min(i,a),height:Math.abs(a-i),color:o,...null!=n&&{opacity:n}}}).filter(e=>e.height>0)})():void 0,u=e.getY0?t=>e.getY0(t)??a:void 0;for(let t of r){let r=e.resolveAreaStyle(t.key,Y(t.data)),n=m(t.data,e.scales,e.getX,e.getY,a,r,t.key,u,e.getPointId),i=l(e.config.gradientFill);if(i){n.fillGradient=i;let t=s(i,e.scales.y);t&&(n.fillGradientSpan=t)}e.config.curve&&"linear"!==e.config.curve&&(n.curve=e.config.curve),e.config.lineGradient&&(n.strokeGradient=e.config.lineGradient),c&&c.length>0&&(n.colorThresholds=c,n.strokeColorBands=f),o.push(n)}return i(e,r,o),o}(e,t),canvasRenderers:[d,N]},R={chartType:"mixed",buildScene:(e,t)=>function(e,t){let r=e.groupData(t),o=[],n=e.config.areaGroups||new Set;if(e.ribbons&&e.ribbons.length>0){let{perSeries:n,aggregate:i}=b(e.ribbons);if(i.length>0&&o.push(...S(e,t,i)),n.length>0)for(let t of r)o.push(...G(e,t.data,t.key,n))}let a=e.scales.y.domain()[0],c=e.getY0?t=>e.getY0(t)??a:void 0;for(let t of r)if(n.has(t.key)){let r=e.resolveAreaStyle(t.key,Y(t.data)),n=m(t.data,e.scales,e.getX,e.getY,a,r,t.key,c,e.getPointId),i=l(e.config.gradientFill);if(i){n.fillGradient=i;let t=s(i,e.scales.y);t&&(n.fillGradientSpan=t)}e.config.curve&&"linear"!==e.config.curve&&(n.curve=e.config.curve),e.config.lineGradient&&(n.strokeGradient=e.config.lineGradient),o.push(n)}else{let r=e.resolveLineStyle(t.key,Y(t.data)),n=h(t.data,e.scales,e.getX,e.getY,r,t.key,e.getPointId);e.config.curve&&"linear"!==e.config.curve&&(n.curve=e.config.curve),e.config.lineGradient&&(n.strokeGradient=e.config.lineGradient),o.push(n)}return i(e,r,o),o}(e,t),canvasRenderers:[d,y,N]};export{e as a,t as b,r as c,o as d,n as e,f,u as g,g as h,T as i,c as j,M as k,R as l};
@@ -1 +0,0 @@
1
- import{p as l,c as o,t as r}from"./c-BJKGYOPX.min.js";import{g as a,a as i}from"./c-ELGOCAEY.min.js";function s(e,l,o){try{if(o)return a(o);let r=`${e??"circle"}:${l}`,s=t.get(r);return s||(s=new Path2D(i(e,l)),t.size>256&&t.clear(),t.set(r,s)),s}catch{return null}}function n(t,e,r,a,i,n){if(e.size<=0)return;let y=s(e.symbolType,e.size,e.path);if(!y)return;t.save(),t.translate(r,a),e.rotation&&t.rotate(e.rotation);let f=e._decayOpacity??1,c=(e.style.opacity??1)*f;e.style.fill&&(t.globalAlpha=i*c*(e.style.fillOpacity??1),t.fillStyle=l(t,e.style.fill,n),t.fill(y)),e.style.stroke&&"none"!==e.style.stroke&&(t.globalAlpha=i*c,t.strokeStyle=o(t,e.style.stroke)||e.style.stroke,t.lineWidth=e.style.strokeWidth??1,t.stroke(y)),t.restore()}function y(t,e){let l=t.globalAlpha,o="source-over"===t.globalCompositeOperation;for(let a of e){if("symbol"!==a.type)continue;let e=a;o&&r(e.style)||n(t,e,e.cx,e.cy,l,"#007bff")}t.globalAlpha=l}var t=/*#__PURE__*/new Map,e=(t,e)=>{let l=t.globalAlpha;for(let o of e){if("symbol"!==o.type)continue;let e=o;n(t,e,e.x,e.y,l,"#4e79a7")}t.globalAlpha=l};export{e as a,y as b};