semiotic 3.13.2 → 3.13.3
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.
- package/README.md +47 -46
- package/ai/artifact-surface-inventory.json +1 -1
- package/ai/dist/mcp-server.js +4 -4
- package/ai/reference.md +23 -12
- package/ai/schema.json +258 -96
- package/ai/surface-manifest.json +1 -1
- package/ai/task-packets/compare-category-totals.json +5 -5
- package/ai/task-packets/compare-category-totals.md +2 -2
- package/ai/task-packets/correct-published-chart.json +5 -5
- package/ai/task-packets/correct-published-chart.md +2 -2
- package/ai/task-packets/index.json +6 -6
- package/ai/task-packets/update-live-chart.json +5 -5
- package/ai/task-packets/update-live-chart.md +2 -2
- package/dist/c-2YFVDRU4.min.js +1 -0
- package/dist/c-4OVDIXAR.min.js +1 -0
- package/dist/c-57IIWW46.min.js +1 -0
- package/dist/c-62UTMRQE.min.js +1 -0
- package/dist/c-6QV6F3U7.min.js +1 -0
- package/dist/c-7S46KBYD.min.js +2 -0
- package/dist/c-AJSS332Z.min.js +2 -0
- package/dist/c-B3X2IJRQ.min.js +1 -0
- package/dist/c-BLLDBVFK.min.js +38 -0
- package/dist/c-C7TT4J7K.min.js +1 -0
- package/dist/{c-ZMB3VTD4.min.js → c-CJ5GA7DM.min.js} +1 -1
- package/dist/c-D7YDFHLY.min.js +1 -0
- package/dist/{c-BR2TOCUN.min.js → c-DMDFJQU4.min.js} +1 -1
- package/dist/{c-JDU4Y4IW.min.js → c-FRVHZIGR.min.js} +1 -1
- package/dist/{c-MSZ3ZDAP.min.js → c-HAZCVHI7.min.js} +1 -1
- package/dist/c-HN5U72U7.min.js +1 -0
- package/dist/c-JA5F7ITS.min.js +1 -0
- package/dist/{c-ISHYKYII.min.js → c-JVZRD4GL.min.js} +1 -1
- package/dist/{c-OOR2LN4A.min.js → c-KJGJEOSV.min.js} +1 -1
- package/dist/c-M2TPZE7P.min.js +1 -0
- package/dist/c-OA6RJZ7S.min.js +1 -0
- package/dist/c-OBBSIOYU.min.js +1 -0
- package/dist/{c-SQQZPFVY.min.js → c-QPHM7AWW.min.js} +1 -1
- package/dist/{c-HOMJ3C6B.min.js → c-QSEAAHEU.min.js} +1 -1
- package/dist/c-RQWI623R.min.js +1 -0
- package/dist/{c-WFSEQ2XG.min.js → c-RWFADOKS.min.js} +1 -1
- package/dist/{c-SDGGMIYI.min.js → c-TJGC5JEM.min.js} +1 -1
- package/dist/{c-H5THWQI4.min.js → c-TOXWQRXS.min.js} +3 -3
- package/dist/c-VBDWHTC7.min.js +1 -0
- package/dist/c-VBIPDCE7.min.js +1 -0
- package/dist/c-WTNRBWZZ.min.js +51 -0
- package/dist/{c-3GIPT46Z.min.js → c-XG4LL2VI.min.js} +1 -1
- package/dist/c-XPNBS3W2.min.js +1 -0
- package/dist/c-XT3G3YWU.min.js +1 -0
- package/dist/c-ZP6O6UHV.min.js +1 -0
- package/dist/c-ZVL7ULNH.min.js +1 -0
- package/dist/components/ChartErrorBoundary.d.ts +5 -1
- package/dist/components/ai/intentWeights.d.ts +22 -0
- package/dist/components/ai/streamSchema.d.ts +98 -0
- package/dist/components/ai/streamingTypes.d.ts +27 -4
- package/dist/components/ai/suggestCharts.d.ts +10 -2
- package/dist/components/ai/suggestStreamCharts.d.ts +60 -13
- package/dist/components/ai/suggestStreamDashboard.d.ts +9 -1
- package/dist/components/charts/network/processSankey/frameMargins.d.ts +1 -1
- package/dist/components/charts/network/processSankey/labelPlacement.d.ts +1 -1
- package/dist/components/charts/physics/physicsHocUtils.d.ts +1 -1
- package/dist/components/charts/realtime/RealtimeAccumulator.d.ts +7 -0
- package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +9 -2
- package/dist/components/charts/realtime/RealtimeHistogram.d.ts +13 -1
- package/dist/components/charts/realtime/RealtimeLineChart.types.d.ts +5 -1
- package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +5 -1
- package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +7 -1
- package/dist/components/charts/realtime/TemporalHistogram.capability.d.ts +5 -3
- package/dist/components/charts/realtime/aggregate.d.ts +11 -12
- package/dist/components/charts/realtime/defaultRealtimeTooltip.d.ts +9 -0
- package/dist/components/charts/realtime/eventTime.d.ts +7 -1
- package/dist/components/charts/realtime/useRealtimeLineIngestion.d.ts +13 -0
- package/dist/components/charts/shared/ChartError.d.ts +4 -6
- package/dist/components/charts/shared/GaugeReadout.d.ts +39 -4
- package/dist/components/charts/shared/axisExtent.d.ts +2 -1
- package/dist/components/charts/shared/chartMode.d.ts +2 -2
- package/dist/components/charts/shared/gaugeLayout.d.ts +69 -0
- package/dist/components/charts/shared/types.d.ts +3 -0
- package/dist/components/charts/shared/useNetworkChartSetup.d.ts +3 -0
- package/dist/components/charts/shared/useStreamStatus.d.ts +2 -2
- package/dist/components/charts/shared/withChartErrorBoundary.d.ts +14 -0
- package/dist/components/charts/xy/Scatterplot.streamCapability.d.ts +2 -0
- package/dist/components/charts/xy/WaterfallChart.d.ts +2 -0
- package/dist/components/charts/xy/WaterfallIndex.d.ts +12 -0
- package/dist/components/charts/xy/lineGapStrategy.d.ts +15 -3
- package/dist/components/legendGeometry.d.ts +148 -0
- package/dist/components/legendLayout.d.ts +20 -38
- package/dist/components/realtime/ReorderBuffer.d.ts +14 -0
- package/dist/components/realtime/SlidingExtent.d.ts +18 -0
- package/dist/components/realtime/WindowAccumulator.d.ts +5 -1
- package/dist/components/realtime/renderers/types.d.ts +1 -0
- package/dist/components/realtime/renderers/waterfallRenderer.d.ts +1 -1
- package/dist/components/recipes/compositional/edgeRouting.d.ts +9 -0
- package/dist/components/recipes/compositional/metrics.d.ts +2 -2
- package/dist/components/recipes/compositional/projection.d.ts +3 -1
- package/dist/components/recipes/compositional/routing.d.ts +3 -1
- package/dist/components/recipes/compositional/testFixtures.d.ts +4 -0
- package/dist/components/recipes/compositional/topology.d.ts +2 -0
- package/dist/components/recipes/compositional/types.d.ts +10 -1
- package/dist/components/recipes/compositional/useCompositionalInterfaces.d.ts +20 -0
- package/dist/components/semiotic-ai-core.d.ts +3 -2
- package/dist/components/semiotic-ai-stream.d.ts +3 -2
- package/dist/components/semiotic-recipes-react.d.ts +2 -0
- package/dist/components/semiotic-utils-core.d.ts +2 -0
- package/dist/components/server/serverChartConfigHeatmap.d.ts +13 -0
- package/dist/components/server/staticLegend.d.ts +5 -0
- package/dist/components/server/staticLegendText.d.ts +13 -0
- package/dist/components/server/staticSVGChrome.d.ts +2 -2
- package/dist/components/stream/DataSourceAdapter.d.ts +15 -62
- package/dist/components/stream/FrameRuntime.d.ts +3 -0
- package/dist/components/stream/GeoPipelineStore.d.ts +2 -0
- package/dist/components/stream/IngestActivity.d.ts +9 -0
- package/dist/components/stream/NetworkPipelineStore.d.ts +3 -1
- package/dist/components/stream/OrdinalPipelineStore.d.ts +5 -2
- package/dist/components/stream/OrdinalSVGOverlay.d.ts +1 -1
- package/dist/components/stream/PipelineStore.d.ts +8 -3
- package/dist/components/stream/accessibleDataRows.d.ts +1 -0
- package/dist/components/stream/axisTickUtils.d.ts +25 -5
- package/dist/components/stream/frameDefaultMargins.d.ts +26 -4
- package/dist/components/stream/frameKeyboardNavigation.d.ts +8 -1
- package/dist/components/stream/geoTypes.d.ts +2 -0
- package/dist/components/stream/graphKeyboardNavigation.d.ts +4 -2
- package/dist/components/stream/hitTestUtils.d.ts +7 -0
- package/dist/components/stream/keyboardNav.d.ts +3 -1
- package/dist/components/stream/navigationGraph.d.ts +10 -3
- package/dist/components/stream/networkFrameKeyboardNavigation.d.ts +2 -0
- package/dist/components/stream/networkNavGroups.d.ts +3 -0
- package/dist/components/stream/networkPipelineConfig.d.ts +1 -0
- package/dist/components/stream/networkSceneTypes.d.ts +10 -0
- package/dist/components/stream/networkSpatialNavigation.d.ts +3 -0
- package/dist/components/stream/networkTypes.d.ts +2 -0
- package/dist/components/stream/ordinalAxisTicks.d.ts +27 -0
- package/dist/components/stream/ordinalSceneBuilders/pieScene.d.ts +10 -0
- package/dist/components/stream/ordinalSceneBuilders/types.d.ts +2 -0
- package/dist/components/stream/ordinalTypes.d.ts +11 -2
- package/dist/components/stream/pipelineBufferUtils.d.ts +9 -0
- package/dist/components/stream/pipelineConfig.d.ts +7 -0
- package/dist/components/stream/pipelineDomainResolution.d.ts +3 -2
- package/dist/components/stream/roundScaleDomain.d.ts +9 -0
- package/dist/components/stream/stalenessBands.d.ts +1 -1
- package/dist/components/stream/svgOverlayUtils.d.ts +12 -0
- package/dist/components/stream/types.d.ts +10 -2
- package/dist/components/stream/useFrame.d.ts +7 -4
- package/dist/components/stream/useOrdinalFrameHandle.d.ts +4 -14
- package/dist/components/stream/useStalenessCheck.d.ts +5 -3
- package/dist/components/stream/useStreamingDataHandle.d.ts +24 -0
- package/dist/components/stream/useXYFrameHandle.d.ts +4 -14
- package/dist/components/stream/xyDateTicks.d.ts +33 -4
- package/dist/components/stream/xyFrameAxisTypes.d.ts +2 -0
- package/dist/components/stream/xyPlugins/registry.d.ts +7 -0
- package/dist/components/stream/xySceneBuilders/heatmapScene.d.ts +11 -2
- package/dist/components/stream/xySceneBuilders/types.d.ts +4 -0
- package/dist/components/types/legendTypes.d.ts +12 -1
- package/dist/geo.min.js +155 -152
- package/dist/geo.module.min.js +1 -1
- package/dist/network.module.min.js +1 -1
- package/dist/ordinal.module.min.js +1 -1
- package/dist/physics.module.min.js +1 -1
- package/dist/processSankeyLayoutWorker.js +1 -1
- package/dist/semiotic-ai-core.d.ts +3 -2
- package/dist/semiotic-ai-core.min.js +5 -5
- package/dist/semiotic-ai-core.module.min.js +4 -4
- package/dist/semiotic-ai.module.min.js +2 -2
- package/dist/semiotic-artifact.min.js +6 -6
- package/dist/semiotic-artifact.module.min.js +5 -5
- package/dist/semiotic-atlas-selection.module.min.js +1 -1
- package/dist/semiotic-atlas.module.min.js +1 -1
- package/dist/semiotic-client-cjs-shared.min.js +1022 -1018
- package/dist/semiotic-client-compositional.module.min.js +1 -1
- package/dist/semiotic-client-shared.module.min.js +1 -1
- package/dist/semiotic-experimental-auxiliary.module.min.js +1 -1
- package/dist/semiotic-experimental-node-auxiliary.module.min.js +1 -1
- package/dist/semiotic-line.module.min.js +1 -1
- package/dist/semiotic-realtime-core.module.min.js +1 -1
- package/dist/semiotic-realtime-react.module.min.js +1 -1
- package/dist/semiotic-recipes-core-cjs-base.min.js +101 -101
- package/dist/semiotic-recipes-core.module.min.js +1 -1
- package/dist/semiotic-recipes-react.d.ts +2 -0
- package/dist/semiotic-recipes-react.min.js +8 -8
- package/dist/semiotic-server-edge-node.module.min.js +3 -3
- package/dist/semiotic-server-edge.min.js +399 -394
- package/dist/semiotic-server-edge.module.min.js +3 -3
- package/dist/semiotic-server-node.min.js +399 -394
- package/dist/semiotic-utils-core.d.ts +2 -0
- package/dist/semiotic-utils-core.min.js +11 -11
- package/dist/semiotic-utils-core.module.min.js +3 -3
- package/dist/semiotic-value.module.min.js +1 -1
- package/dist/semiotic.module.min.js +1 -1
- package/dist/server.min.js +399 -394
- package/dist/server.module.min.js +3 -3
- package/dist/xy.module.min.js +1 -1
- package/package.json +11 -11
- package/dist/c-27SDQN3J.min.js +0 -1
- package/dist/c-2N7IU2NY.min.js +0 -1
- package/dist/c-4EUQNA7N.min.js +0 -2
- package/dist/c-5EPR4KFB.min.js +0 -1
- package/dist/c-5KZ3NO6X.min.js +0 -1
- package/dist/c-7UN2WUMI.min.js +0 -1
- package/dist/c-BRBTXINY.min.js +0 -1
- package/dist/c-C3Z7ZRAA.min.js +0 -1
- package/dist/c-C4WRRUZ5.min.js +0 -1
- package/dist/c-CXDAWBOW.min.js +0 -1
- package/dist/c-DJ6DT5BL.min.js +0 -51
- package/dist/c-DNBFFE3P.min.js +0 -1
- package/dist/c-HR5AH3MA.min.js +0 -1
- package/dist/c-HTL37JCD.min.js +0 -1
- package/dist/c-JS2D7A2P.min.js +0 -1
- package/dist/c-L6OT4OVA.min.js +0 -1
- package/dist/c-NB2UEX5C.min.js +0 -1
- package/dist/c-OU7A3IUL.min.js +0 -1
- package/dist/c-PNLTF6YG.min.js +0 -37
- package/dist/c-QVKOXC3S.min.js +0 -1
- package/dist/c-SIQVOV6A.min.js +0 -1
- package/dist/c-TBMFC5CR.min.js +0 -1
- package/dist/c-XF5ILLBG.min.js +0 -1
- package/dist/c-YQHGEETR.min.js +0 -2
package/dist/c-5EPR4KFB.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e}from"./c-YSMCBJOI.min.js";import{c as t,b as o}from"./c-BR2TOCUN.min.js";import{a as r,g as a,f as i}from"./c-BRBTXINY.min.js";import{e as n,j as s,l,m as c}from"./c-AMQAAW7G.min.js";import{j as u}from"./c-ZYMXDR42.min.js";import{S as f,I as m,F as p,H as y,Q as d}from"./c-NB2UEX5C.min.js";import{bO as h,an as g,aY as v,bI as b,r as A,b as x,bc as S,v as k,bK as L,aP as w,aR as C,aZ as B,a_ as O}from"./c-L6OT4OVA.min.js";import{f as D}from"./c-OU7A3IUL.min.js";import{r as R,n as _}from"./c-WPL6PGP3.min.js";import{D as j,C as H}from"./c-HTL37JCD.min.js";import{d as G}from"./c-5PCO2P5Q.min.js";import{useMemo as P,useState as N,useEffect as F,forwardRef as W,useRef as I,useCallback as T}from"react";import{jsx as M}from"react/jsx-runtime";function E(){n(s),n(l),n(c)}function K(e){let{colorBy:t,colorScale:o,color:r,pointRadius:a=5,radiusFn:i,fillOpacity:n=1,fallbackFill:s,baseStyleExtras:l,stroke:c,strokeWidth:u,opacity:m,effectiveSelectionHook:p,resolvedSelection:y,colorDatumAccessor:d,selectionDatumAccessor:g,styleRules:v,ruleContext:b}=e,A=P(()=>e=>{let c="function"==typeof l?l(e):l,u=c?{...c}:{};if(void 0===u.fillOpacity&&(u.fillOpacity=n),void 0===u.fill)if(t){if(o){let r=d?d(e):e;u.fill=R(r,t,o)}}else u.fill=s?s(e):r||_;return void 0===u.r&&(u.r=i?i(e):a),v&&v.length>0&&Object.assign(u,h(e,v,b?b(e):{value:void 0})),u},[t,o,r,a,i,n,s,l,d,v,b]),x=P(()=>f(A,{stroke:c,strokeWidth:u,opacity:m}),[A,c,u,m]);return P(()=>D(x,p??null,y,g),[x,p,y,g])}function U(e){let{lineWidth:t=2,colorBy:o,colorScale:r,color:a,resolveStroke:i,fillArea:n,areaOpacity:s=.3,stroke:l,strokeWidth:c,opacity:u,effectiveSelectionHook:m,resolvedSelection:p,styleRules:y,ruleContext:d}=e,g=P(()=>function(e){let{lineWidth:t=2,colorBy:o,colorScale:r,color:a,resolveStroke:i,fillArea:n,areaOpacity:s=.3,styleRules:l,ruleContext:c}=e;return(e,u)=>{let f,m={strokeWidth:t},p=!0===n||Array.isArray(n)&&null!=u&&n.includes(u);return i?f=i(e,u):o?r&&(f=R(e,o,r)):f=a||_,void 0!==f&&(m.stroke=f,p&&(m.fill=f,m.fillOpacity=s)),l?.length&&Object.assign(m,h(e,l,c?c(e,u):{value:void 0,category:u})),m}}({lineWidth:t,colorBy:o,colorScale:r,color:a,resolveStroke:i,fillArea:n,areaOpacity:s,styleRules:y,ruleContext:d}),[t,o,r,a,i,n,s,y,d]),v=P(()=>f(g,{stroke:l,strokeWidth:c,opacity:u}),[g,l,c,u]);return P(()=>D(v,m??null,p),[v,m,p])}var X="__forecastSegment",Y=null;async function $(){return Y||(Y=await(import("./c-PX2XTYMN.min.js"))),Y}var z=[],q="__semiotic_resolvedX",Q="__semiotic_resolvedY";function J(e){let{data:t,xAccessor:o,yAccessor:r,groupBy:a}=e,i=g(e.forecast),n=g(e.anomaly),s="string"==typeof o?o:q,l="string"==typeof r?r:Q,c=P(()=>{if(!i&&!n)return t;let e="function"==typeof o,a="function"==typeof r;return e||a?t.map(t=>{let i={...t};return e&&(i[q]=o(t)),a&&(i[Q]=r(t)),i}):t},[t,i,n,o,r]),u=P(()=>({overlayData:c,forecast:i,anomaly:n,xAccessorKey:s,yAccessorKey:l,groupBy:a}),[c,i,n,s,l,a]),[f,m]=N(null);F(()=>{if(!i&&!n)return void m(null);let e=!1;return(i?async function(...e){return(await $()).buildForecast(...e)}(c,s,l,a?{...i,_groupBy:a}:i,n):async function(...e){return(await $()).buildAnomalyAnnotations(...e)}(n).then(e=>({processedData:c,annotations:e}))).then(t=>{e||m({request:u,result:t,hasForecast:!!i})}).catch(t=>{e||("production"!==process.env.NODE_ENV&&console.warn("[Semiotic] Unable to compute statistical overlays:",t),m(null))}),()=>{e=!0}},[u,c,i,n,s,l,a]);let p=f?.request===u?f:null;return{effectiveData:p?.result.processedData??t,statisticalAnnotations:p?.result.annotations??z,hasForecast:p?.hasForecast??!1,xAccessorKey:s,yAccessorKey:l}}function V(e,t){if(!t)return e;let o=new Set(e),r=[];for(let[e,a]of t.seriesOf)o.has(a)&&r.push(e);return r}function Z(e,t){if(!t)return e;let o=e.tooltipContent,r=e=>{let r=e?.allSeries;return Array.isArray(r)?o({...e,allSeries:r.map(e=>({...e,group:t.seriesOf.get(e.group)??e.group}))}):o(e)};return{...e,tooltipContent:j(o)?H(r):r}}var ee="__lineObjectSeries",te=e=>e.parentLine||e,oe=/*#__PURE__*/v(/*#__PURE__*/W(function(n,s){E();let l=I(null);t(s,{variant:"xy",frameRef:l});let c=b(n.mode,{width:n.width,height:n.height,showAxes:n.showAxes,showGrid:n.showGrid,enableHover:n.enableHover,showLegend:n.showLegend,title:n.title,description:n.description,summary:n.summary,accessibleTable:n.accessibleTable,xLabel:n.xLabel,yLabel:n.yLabel,mobileInteraction:n.mobileInteraction,mobileSemantics:n.mobileSemantics,responsiveRules:n.responsiveRules}),{data:f,margin:h,className:g,xFormat:v,yFormat:D,axisExtent:R,xAccessor:j="x",yAccessor:H="y",lineBy:W,lineDataAccessor:Y="coordinates",colorBy:z,colorScheme:q,styleRules:Q,curve:oe="linear",showPoints:re=!1,pointRadius:ae=3,fillArea:ie=!1,areaOpacity:ne=.3,lineWidth:se=2,lineGradient:le,tooltip:ce,pointIdAccessor:ue,annotations:fe,directLabel:me,gapStrategy:pe="break",anomaly:ye,forecast:de,band:he,xExtent:ge,yExtent:ve,frameProps:be={},selection:Ae,linkedHover:xe,linkedBrush:Se,brush:ke,onBrush:Le,onObservation:we,onClick:Ce,hoverHighlight:Be,hoverRadius:Oe,chartId:De,loading:Re,loadingContent:_e,emptyContent:je,legendInteraction:He,legendPosition:Ge,legend:Pe,xScaleType:Ne,yScaleType:Fe,color:We,stroke:Ie,strokeWidth:Te,opacity:Me}=n,{legend:Ee,...Ke}=be,Ue=P(()=>A(Ee,Pe),[Ee,Pe]),{width:Xe,height:Ye,enableHover:$e,showGrid:ze,showLegend:qe,title:Qe,description:Je,summary:Ve,accessibleTable:Ze,xLabel:et,yLabel:tt}=c,ot=P(()=>x(f),[f]),rt=Array.isArray(ot[0]?.[Y])?ot[0][Y]:ot;S("LineChart",rt,"xAccessor",j),S("LineChart",rt,"yAccessor",H);let{effectiveData:at,statisticalAnnotations:it,hasForecast:nt,xAccessorKey:st,yAccessorKey:lt}=J({data:ot,xAccessor:j,yAccessor:H,forecast:de,anomaly:ye,groupBy:W}),ct=nt?st:j,ut=nt?lt:H,ft="__compoundGroup",mt=!(!de||!W),pt=mt?ft:de?X:W,yt=P(()=>{if(!mt)return at;let e="function"==typeof W?W:e=>e[W];return at.map(t=>{let o={...t};return o[ft]=`${e(t)}__${t[X]||"observed"}`,o})},[at,mt,W]),dt=mt?yt:at,ht=z||W,gt=P(()=>function(e,t,o){if(!o)return;let r=[t,o.upperBounds??"__forecastUpper",o.lowerBounds??"__forecastLower"].map(e=>"function"==typeof e?e:t=>t[e]),a=!(!o.upperBounds&&!o.lowerBounds),i=1/0,n=-1/0;for(let t of e){let e=r[1](t),o=r[2](t);(null!=e||null!=o)&&(a=!0);for(let a of[Number(r[0](t)),e,o])"number"==typeof a&&Number.isFinite(a)&&(i=Math.min(i,a),n=Math.max(n,a))}return a&&i<=n?[i,n]:void 0}(at,ut,de),[de,at,ut]),vt=T(e=>{let t="function"==typeof ct?ct(e):e[ct],o="function"==typeof ut?ut(e):e[ut];return null==t||null==o||Number.isNaN(t)||Number.isNaN(o)},[ct,ut]),bt=void 0!==dt[0]?.[Y],At=bt?ee:pt,xt=P(()=>{if(bt)return dt.map((e,t)=>{let o="function"==typeof W?W(e):"string"==typeof W?e[W]:void 0,r=null==o?`line-${t}`:String(o),a=Array.isArray(e[Y])?e[Y]:[];return{...e,[ee]:r,[Y]:a.map(t=>({...t,[ee]:r,parentLine:e,..."string"==typeof W&&void 0!==e[W]?{[W]:e[W]}:{}}))}});if(pt){let e=dt.reduce((e,t)=>{let o="function"==typeof pt?pt(t):t[pt];if(!e[o]){let r={[Y]:[]};"string"==typeof pt&&(r[pt]=o),mt&&(r[X]=t[X],"string"==typeof W&&(r[W]=t[W])),e[o]=r}return e[o][Y].push(t),e},{});return Object.values(e)}return[{[Y]:dt}]},[bt,pt,Y,dt,W,mt]),{lines:St,hasGaps:kt,segments:Lt}=P(()=>function({lineData:e,strategy:t,lineDataAccessor:o,isGap:r,yField:a,seriesOfLine:i}){let n=e=>e[o]||[];if("interpolate"===t){let t=!1,a=[];for(let i of e){let e=n(i).filter(e=>!r(e)||(t=!0,!1));e.length>0&&a.push({...i,[o]:e})}return{lines:a,hasGaps:t}}if("zero"===t){let t=!1;return{lines:e.map(e=>({...e,[o]:n(e).map(e=>r(e)?(t=!0,{...e,[a]:0}):e)})),hasGaps:t}}if(!e.some(e=>n(e).some(r)))return{lines:e,hasGaps:!1};let s=[],l=new WeakMap,c=new Map;return e.forEach((e,t)=>{let a=i(e),u=[],f=0,m=()=>{if(0===u.length)return;let r={...e,[o]:u},i=`seg:${t}:${f}`;l.set(r,i),c.set(i,a),s.push(r),u=[],f++};for(let t of n(e))r(t)?m():u.push(t);m()}),{lines:s,hasGaps:!0,segments:{keyOf:l,seriesOf:c}}}({lineData:xt,strategy:pe,lineDataAccessor:Y,isGap:vt,yField:"string"==typeof ut?ut:"y",seriesOfLine:e=>{if(!At)return"";if("string"==typeof At){let t=e[At];return null==t?"":String(t)}let t=e[Y]?.[0],o=t?At(t):void 0;return null==o?"":String(o)}}),[xt,pe,Y,vt,At,ut]),wt="object"==typeof me?me:{},Ct=wt.position||"end",Bt=wt.fontSize||11,Ot=(!me||void 0!==qe)&&qe,Dt=o({responsive:n,data:at,rawData:f,colorBy:ht,colorScheme:q,legendInteraction:He,legendPosition:Ge,frameLegend:Ke,selection:Ae,linkedHover:xe,fallbackFields:ht?["string"==typeof ht?ht:""]:[],unwrapData:!1,onObservation:we,onClick:Ce,hoverHighlight:Be,mobileInteraction:c.mobileInteraction,mobileSemantics:c.mobileSemantics,chartType:"LineChart",chartId:De,showLegend:Ot,legend:Ue,userMargin:h,marginDefaults:c.marginDefaults,loading:Re,loadingContent:_e,emptyContent:je,width:Xe,height:Ye,hasTitle:!!Qe,axisChrome:k(be,{showAxes:c.showAxes,xLabel:et,yLabel:tt})}),Rt=Dt.categoryColorScale,_t=Dt.effectiveSelectionHook,jt=Dt.resolvedSelection,Ht=Dt.customHoverBehavior,Gt=Dt.customClickBehavior,Pt=Dt.crosshairProps,Nt=P(()=>{if(ht)return bt?e=>{let t=e.parentLine||e;return"function"==typeof ht?ht(t):t[ht]}:ht},[ht,bt]),Ft=P(()=>L(ct,ut),[ct,ut]),Wt=U({lineWidth:se,colorBy:Nt,colorScale:Rt,color:We,fillArea:ie,areaOpacity:ne,stroke:Ie,strokeWidth:Te,opacity:Me,effectiveSelectionHook:_t,resolvedSelection:jt,styleRules:Q,ruleContext:Ft}),[It,Tt]=N(null);F(()=>{if(!de)return void Tt(null);let e=!1;return async function(...e){return(await $()).createSegmentLineStyle(...e)}(Wt,de).then(t=>{e||Tt(()=>t)}).catch(()=>{e||Tt(null)}),()=>{e=!0}},[Wt,de]);let Mt=It||Wt,Et=K({colorBy:ht,colorScale:Rt,color:We,pointRadius:ae,colorDatumAccessor:te,selectionDatumAccessor:G,effectiveSelectionHook:_t,resolvedSelection:jt}),Kt=Array.isArray(ie)?"mixed":ie?"area":"line",Ut=P(()=>{if(!me||!ht)return[];let e={position:Ct,fontSize:Bt,colorBy:ht,color:e=>Rt?.(e)??_};return void 0===f?[{type:"text",_directLabelRequest:e}]:r(St.flatMap(e=>(e[Y]||[]).map(t=>({...t,parentLine:t.parentLine||e}))),e,ct,ut)},[f,me,ht,Rt,St,Y,ct,ut,Ct,Bt]),Xt=P(()=>{if(!me)return Dt.margin;let e="end"===Ct?"right":"left";if("number"==typeof h||"number"==typeof h?.[e])return Dt.margin;let t=(void 0===f?Dt.allCategories:Ut.map(e=>String(e.label))).reduce((e,t)=>Math.max(e,Array.from(t).length*Bt*.65),0);return{...Dt.margin,[e]:Math.max(Dt.margin[e],t+10)}},[f,me,Ut,Ct,Bt,h,Dt.margin,Dt.allCategories]),Yt=W||z,$t=P(()=>m([{label:et||p(j),accessor:ct,role:"x",format:v},{label:tt||p(H),accessor:ut,role:"y",format:D},...Yt?[{label:p(Yt),accessor:Yt,role:"group"}]:[],...y(he,D)]),[ct,ut,j,H,et,tt,Yt,v,D,he]),zt=bt?at[0]?.[Y]||[]:f,qt=e({componentName:"LineChart",data:zt,accessors:{xAccessor:j,yAccessor:H}}),{brushStreamProps:Qt}=a({brush:ke,onBrush:Le,linkedBrush:Se,xAccessor:ct,yAccessor:ut,defaultDimension:"x"}),{flattenedData:Jt,segmentGroupAccessor:Vt}=P(()=>{if(!(bt||At||kt))return{flattenedData:dt,segmentGroupAccessor:void 0};let e=Lt?new WeakMap:void 0;return{flattenedData:St.flatMap(t=>{let o=t[Y]||[],r=At&&"string"==typeof At?o.map(e=>({...e,[At]:e[At]??t[At]})):o,a=Lt?.keyOf.get(t);if(e&&void 0!==a)for(let t of r)e.set(t,a);return r}),segmentGroupAccessor:e?t=>e.get(t)??"":void 0}},[St,Y,bt,At,dt,kt,Lt]),Zt=P(()=>function(e,t){return t?(o,r)=>e(o,void 0===r?r:t.seriesOf.get(r)??r):e}(Mt,Lt),[Mt,Lt]),eo=u(le),to={chartType:Kt,...Array.isArray(ie)&&{areaGroups:V(ie,Lt)},...eo&&{lineGradient:eo},...null!=f&&{data:Jt},xAccessor:ct,yAccessor:ut,xScaleType:Ne,yScaleType:Fe,...ge&&{xExtent:ge},...!ve||null==ve[0]&&null==ve[1]?gt?{yExtent:gt}:{}:{yExtent:ve},groupAccessor:Vt??(At||void 0),...he&&{band:he},curve:oe,lineStyle:Zt,...re&&{pointStyle:Et},size:[Xe,Ye],responsiveWidth:n.responsiveWidth,responsiveHeight:n.responsiveHeight,...void 0!==n.maxDevicePixelRatio&&{maxDevicePixelRatio:n.maxDevicePixelRatio},margin:Xt,showAxes:c.showAxes,xLabel:et,yLabel:tt,xFormat:v,yFormat:D,...void 0!==R&&{axisExtent:R},...void 0!==n.autoPlaceAnnotations&&{autoPlaceAnnotations:n.autoPlaceAnnotations},enableHover:$e,showGrid:ze,...Dt.legendBehaviorProps,...Qe&&{title:Qe},...Je&&{description:Je},...Ve&&{summary:Ve},...void 0!==Ze&&{accessibleTable:Ze},...g&&{className:g},...null!=n.animate&&{animate:n.animate},...Z(w({tooltip:ce,defaultTooltipContent:$t,multiDefaultContent:C({xFormat:v,yFormat:D})}),Lt),...d({linkedHover:xe,selection:Ae,onObservation:we,onClick:Ce,hoverRadius:Oe,hoverHighlight:Be,mobileInteraction:Dt.mobileInteraction,customHoverBehavior:Ht,customClickBehavior:Gt}),...ue&&{pointIdAccessor:ue},...(fe?.length||it.length||Ut.length)&&{annotations:[...fe||[],...it,...Ut]},...Pt,...Qt,...Ke};return Dt.earlyReturn?Dt.earlyReturn:qt?M(B,{componentName:"LineChart",message:qt,width:Xe,height:Ye}):M(O,{componentName:"LineChart",width:Xe,height:Ye,children:M(i,{ref:l,...to})})}),"LineChart");export{K as a,J as b,E as c,U as d,oe as e};
|
package/dist/c-5KZ3NO6X.min.js
DELETED
|
@@ -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":{let t=a.datum?.binStart;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:"number"==typeof t&&Number.isFinite(t)?JSON.stringify(["bin",a.group??null,t]):void 0,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 y(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 f(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-NB2UEX5C.min.js";import{aW as b,aX as v}from"./c-L6OT4OVA.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,y as e,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};
|
package/dist/c-7UN2WUMI.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e){let a={};if(null==e||"object"!=typeof e)return a;for(let[t,r]of Object.entries(e))t.startsWith("_")||null==r||""===r||("number"==typeof r?Number.isFinite(r)&&(a[t]=r):"string"==typeof r?a[t]=r:"boolean"==typeof r?a[t]=String(r):r instanceof Date&&(a[t]=r.toISOString().slice(0,10)));return a}function a(e){return e&&"object"==typeof e?e:{}}function t(e){return a(e.accessibility).tableFields??e.accessibleDatum??e.datum}function r(r,i){let o=a(r.accessibility);return{label:"string"==typeof o.label&&o.label.length>0?o.label:"string"==typeof r.label&&r.label.length>0?r.label:i,values:e(t(r))}}function i(e){let a=new Set;if(!e.some(e=>e&&("point"===e.type||"symbol"===e.type||"glyph"===e.type)))return a;for(let t of e)if(t&&["line","area","boxplot","violin"].includes(String(t.type))&&Array.isArray(t.datum))for(let e of t.datum)a.add(e);return a}function o(e){if(!Array.isArray(e))return 0;let a=i(e),r=0;for(let i of e)if(i&&"object"==typeof i&&null!==i.datum)switch(i.type){case"point":case"symbol":case"glyph":a.has(i.datum)||r++;break;case"line":case"area":{let e=t(i);r+=Array.isArray(e)?e.length:null!=e&&"object"==typeof e?1:0;break}case"boxplot":case"violin":{let e=t(i);r+=Array.isArray(e)?e.length+1:1;break}case"rect":case"heatcell":case"wedge":case"circle":case"arc":case"candlestick":case"connector":case"trapezoid":case"bezier":case"ribbon":case"curved":case"geoarea":r++}return r}function l(r){let o=[];if(!Array.isArray(r))return o;let l=i(r);for(let i of r)if(i&&"object"==typeof i&&null!==i.datum)try{switch(i.type){case"point":case"symbol":case"glyph":if(l.has(i.datum))break;o.push({label:"Point",values:e(t(i))});break;case"line":case"area":{let a=t(i),r=Array.isArray(a)?a:null!=a&&"object"==typeof a?[a]:[],l="line"===i.type?"Line point":"Area point";for(let a of r)o.push({label:l,values:e(a)});break}case"boxplot":case"violin":{let a=t(i),r="boxplot"===i.type?"Boxplot":"Distribution",l="string"==typeof i.category?{category:i.category}:{};if(Array.isArray(a)){o.push({label:r,values:{...l,...e(i.stats)}});for(let t of a)o.push({label:`${r} observation`,values:{...l,...e(t)}})}else o.push({label:r,values:{...l,...e(a)}});break}case"rect":{let a=t(i),r=null!=a&&"object"==typeof a?a:{},l=r.category??i.group??"",s=r.value??r.__aggregateValue??r.total,c=e(r);null==c.category&&""!==l&&(c.category=String(l)),null==c.value&&null!=s&&(c.value="number"==typeof s||"string"==typeof s?s:String(s)),o.push({label:"Bar",values:c});break}case"heatcell":{let a=e(t(i));null==a.value&&"number"==typeof i.value&&Number.isFinite(i.value)&&(a.value=i.value),o.push({label:"Cell",values:a});break}case"wedge":{let r=t(i),l=e(r);if(null==l.category){let e=a(r),t=e.category??e.label;null!=t&&(l.category=String(t))}o.push({label:"Wedge",values:l});break}case"circle":o.push({label:"Node",values:e(t(i))});break;case"arc":o.push({label:"Arc",values:e(t(i))});break;case"candlestick":o.push({label:"Candlestick",values:e(t(i))});break;case"connector":case"trapezoid":case"bezier":case"ribbon":case"curved":o.push({label:"Connection",values:e(t(i))});break;case"geoarea":{let r=a(t(i)),l={...e(r.properties),...e(r)};o.push({label:"Region",values:l});break}}}catch{}return o}function s(e,a,t=`${a}s`){return`${e} ${1===e?a:t}`}var c="semiotic-accessible-data-table",n=`${c} semiotic-accessible-data-table-hidden`,b=`${c} semiotic-accessible-data-table-visible`,u=`${b} semiotic-accessible-data-table-network`,d={boxSizing:"border-box",maxWidth:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},p={position:"absolute",top:0,left:0,right:0,zIndex:"var(--semiotic-data-table-z-index, var(--semiotic-overlay-z-index, 20))",padding:"14px 16px 12px",borderBottom:"1px solid var(--semiotic-data-table-border, var(--semiotic-border, #e0e0e0))",fontFamily:"var(--semiotic-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)",fontSize:13,lineHeight:1.5,color:"var(--semiotic-data-table-text, var(--semiotic-text, #333))",background:"var(--semiotic-data-table-bg, var(--semiotic-surface, var(--semiotic-bg, #fff)))",borderRadius:"var(--semiotic-border-radius, 0px) var(--semiotic-border-radius, 0px) 0 0"},f={marginBottom:8,paddingRight:28,color:"var(--semiotic-data-table-muted-text, var(--semiotic-text-secondary, #666))",fontSize:12,letterSpacing:"0.01em"},m={position:"absolute",top:10,right:10,width:22,height:22,display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--semiotic-data-table-border, var(--semiotic-border, #e0e0e0))",background:"var(--semiotic-data-table-bg, var(--semiotic-surface, var(--semiotic-bg, #fff)))",cursor:"pointer",color:"var(--semiotic-data-table-muted-text, var(--semiotic-text-secondary, #666))",fontSize:13,lineHeight:1,padding:0,borderRadius:"var(--semiotic-border-radius, 4px)"},g={width:"100%",borderCollapse:"collapse",fontSize:12,marginTop:4,fontVariantNumeric:"tabular-nums"},v={textAlign:"left",padding:"5px 10px",borderBottom:"2px solid var(--semiotic-data-table-border, var(--semiotic-border, #e0e0e0))",fontWeight:600,fontSize:11,textTransform:"uppercase",letterSpacing:"0.04em",color:"var(--semiotic-data-table-muted-text, var(--semiotic-text-secondary, #666))"},y={padding:"4px 10px",borderBottom:"1px solid var(--semiotic-data-table-border, var(--semiotic-border, #e0e0e0))"},x={textAlign:"left",fontSize:11,color:"var(--semiotic-data-table-muted-text, var(--semiotic-text-secondary, #666))",marginBottom:4,fontStyle:"italic"},h={marginTop:8,padding:"4px 10px",fontSize:12,cursor:"pointer",border:"1px solid var(--semiotic-data-table-border, var(--semiotic-border, #e0e0e0))",borderRadius:"var(--semiotic-border-radius, 4px)",background:"var(--semiotic-data-table-bg, var(--semiotic-surface, var(--semiotic-bg, #fff)))",color:"var(--semiotic-data-table-text, var(--semiotic-text, #333))",fontFamily:"inherit"};export{e as a,t as b,r as c,o as d,l as e,n as f,b as g,u as h,d as i,p as j,f as k,m as l,g as m,v as n,y as o,x as p,h as q,s as r};
|
package/dist/c-BRBTXINY.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as e,c as t,a as i,g as r,i as s,d as n,e as a,h as o}from"./c-AMQAAW7G.min.js";import{a as l}from"./c-ORLEBW72.min.js";import{a as c}from"./c-OMTJIC3P.min.js";import{b as u,a as h}from"./c-KQEOKGYV.min.js";import{a as d}from"./c-TDPGVYQW.min.js";import{a as f}from"./c-QAVFOEUY.min.js";import{d as p,f as g,e as y,h as m,k as x,c as v,i as b,j as k,b as A}from"./c-XF5ILLBG.min.js";import{c as w,j as S,i as C}from"./c-ZYMXDR42.min.js";import{c as M,a as P,g as R,f as T,h as D,e as L,i as E,k as $,l as F,j as N}from"./c-5KZ3NO6X.min.js";import{e as _}from"./c-5XCN6BMT.min.js";import{a as B}from"./c-FBV4S363.min.js";import{a as I,b as z}from"./c-L3WAZ53J.min.js";import{b as O}from"./c-V4XMSLC3.min.js";import{a as Y}from"./c-2N7IU2NY.min.js";import{b as W,d as V,c as j,a as X}from"./c-YLZIV3VS.min.js";import{f as H,e as G,d as U,a as q,b as J,c as K,o as Q,l as Z,j as ee,k as te,s as ie,v as re,t as se,u as ne,m as ae,y as oe,B as le,h as ce,i as ue,O as he,p as de,C as fe,q as pe,w as ge,D as ye,g as me,r as xe}from"./c-NB2UEX5C.min.js";import{c as ve}from"./c-363Q2L4Z.min.js";import{k as be,l as ke,p as Ae,q as we,E as Se,u as Ce,t as Me,K as Pe,Q as Re,J as Te,S as De,R as Le,U as Ee,A as $e,$ as Fe,X as Ne,ak as _e,W as Be,ad as Ie,Z as ze,ab as Oe,Y as Ye,ae as We,H as Ve,an as je,aK as Xe,aT as He,ai as Ge,aY as Ue,aC as qe,al as Je,am as Ke,b as Qe,m as Ze,aG as et,ag as tt,aj as it,G as rt,aU as st,af as nt,aF as at,aD as ot,aE as lt,au as ct,aA as ut,aw as ht,ay as dt,o as ft,ao as pt,aH as gt,bj as yt}from"./c-L6OT4OVA.min.js";import{d as mt}from"./c-OU7A3IUL.min.js";import{c as xt,a as vt,d as bt}from"./c-SIQVOV6A.min.js";import{s as kt,o as At,p as wt}from"./c-WPL6PGP3.min.js";import{o as St,a as Ct,i as Mt,k as Pt,p as Rt,m as Tt,t as Dt,r as Lt,e as Et}from"./c-JDI7HKEM.min.js";import{b as $t,i as Ft}from"./c-ELGOCAEY.min.js";import{n as Nt,C as _t,x as Bt,w as It,D as zt,h as Ot}from"./c-HTL37JCD.min.js";import{f as Yt}from"./c-5PCO2P5Q.min.js";import{a as Wt,d as Vt,i as jt,h as Xt,f as Ht,j as Gt}from"./c-7BVQDXFU.min.js";import{e as Ut}from"./c-YCBCZFOC.min.js";import*as qt from"react";import{useCallback as Jt,useImperativeHandle as Kt,useRef as Qt,useState as Zt,useEffect as ei,useMemo as ti,useId as ii,memo as ri,forwardRef as si}from"react";import{jsx as ni,jsxs as ai,Fragment as oi}from"react/jsx-runtime";import{scaleLog as li,scaleSymlog as ci,scaleUtc as ui,scaleTime as hi,scaleLinear as di}from"d3-scale";import{quadtree as fi}from"d3-quadtree";import{line as pi,area as gi}from"d3-shape";var yi=null,mi=null;function xi(e){let[t,i]=qt.useState(()=>yi);return qt.useEffect(()=>{if(t)return;let e=!1;return(yi?Promise.resolve(yi):(mi||(mi=import("./c-ONOWKUUZ.min.js").then(e=>yi=e.XYBrushOverlay).catch(e=>{throw mi=null,e})),mi)).then(t=>{e||i(()=>t)}),()=>{e=!0}},[t]),t?ni(t,{...e}):null}var vi=null,bi=null;function ki(){return vi}function Ai(){return vi?Promise.resolve(vi):(bi??(bi=import("./c-73ORHEHO.min.js").then(e=>vi=e.xyTransitionEngine).catch(e=>{throw bi=null,e})),bi)}var wi=/*#__PURE__*/new Set;function Si(e,t){let i="function"==typeof e?e:i=>i[e||t];return e=>{let t=i(e);return null==t?Number.NaN:+t}}function Ci(e){let t=[],i=["bar","swarm","waterfall"].includes(e.chartType)||"streaming"===e.runtimeMode,r=Si(i&&e.valueAccessor||e.yAccessor,i?"value":"y");if(e.boundsAccessor){let i=W(e.boundsAccessor,"bounds");t.push({kind:"bounds",getTop:e=>{let t=r(e);if(!Number.isFinite(t))return Number.NaN;let s=i(e);return Number.isFinite(s)&&0!==s?t+s:t},getBottom:e=>{let t=r(e);if(!Number.isFinite(t))return Number.NaN;let s=i(e);return Number.isFinite(s)&&0!==s?t-s:t},style:e.boundsStyle,perSeries:!0,interactive:!1})}if(e.band){let i=Array.isArray(e.band)?e.band:[e.band];for(let e of i)t.push({kind:"band",getTop:Si(e.y1Accessor,"y1"),getBottom:Si(e.y0Accessor,"y0"),style:e.style,perSeries:!1!==e.perSeries,interactive:!0===e.interactive})}return t}function Mi(e,t){return t?[t[0]??e[0],t[1]??e[1]]:e}function Pi(e){let{config:t,groups:i,getX:r,getY:s}=e,n="exact"===(t.yAxisExtent??t.axisExtent),a=n?"exact":"pad",o="log"===t.yScaleType?"log":"lin",l=t.normalize?`${e.bufferSize}:${e.ingestVersion}:norm:${t.stackOrder??"key"}:${a}:${o}`:`${e.bufferSize}:${e.ingestVersion}:${t.baseline??"zero"}:${t.stackOrder??"key"}:${a}:${o}`;if(e.stackExtentCache&&e.stackExtentCache.key===l)return{yDomain:e.stackExtentCache.yDomain,stackExtentCache:e.stackExtentCache};let c=new Map,u=new Set,h=new Map,d=new Map;for(let e of i){let t=new Map,i=0;for(let n of e.data){let e=r(n),a=s(n);if(!Number.isFinite(e)||!Number.isFinite(a))continue;t.set(e,(t.get(e)||0)+a),u.add(e),i+=a;let o=(h.get(e)||0)+a;h.set(e,o)}c.set(e.key,t),d.set(e.key,i)}let f,p=t.stackOrder??"key",g=(e,t)=>e<t?-1:e>t?1:0;if("input"===p)f=i.map(e=>e.key);else if("insideOut"===p){let e=[...i].map(e=>e.key).sort((e,t)=>{let i=(d.get(t)??0)-(d.get(e)??0);return 0!==i?i:g(e,t)}),t=[],r=[],s=0,n=0;for(let i of e)s<n?(t.push(i),s+=d.get(i)??0):(r.push(i),n+=d.get(i)??0);f=[...r.reverse(),...t]}else f="asc"===p?i.map(e=>e.key).sort((e,t)=>{let i=(d.get(e)??0)-(d.get(t)??0);return 0!==i?i:g(e,t)}):"desc"===p?i.map(e=>e.key).sort((e,t)=>{let i=(d.get(t)??0)-(d.get(e)??0);return 0!==i?i:g(e,t)}):i.map(e=>e.key).sort(g);if(t.normalize)for(let e of c.values())for(let[t,i]of e)e.set(t,i/(h.get(t)||1));let y,m=t.normalize?"zero":t.baseline,x="log"===t.yScaleType?[]:null,v=e=>{x&&(x.length>0&&x[x.length-1]===e||x.push(e))},b=e=>{let t={key:l,yDomain:e};return x&&(t.plottedY=x),{yDomain:e,stackExtentCache:t}};if("wiggle"===m||"silhouette"===m){let e=Array.from(u).sort((e,t)=>e-t),i=w(e,f,(e,t)=>c.get(e)?.get(t)||0,m),r=1/0,s=-1/0,a=e=>{v(e),e<r&&(r=e),e>s&&(s=e)};for(let t of e){let e=i.get(t)??0;a(e);for(let i of f){let r=c.get(i)?.get(t)||0;0!==r&&(e+=r,a(e))}}(!Number.isFinite(r)||!Number.isFinite(s))&&(r=0,s=0);let o=s-r,l=n?0:o>0?o*t.extentPadding:1;return b([r-l,s+l])}if("diverging"===m){let e=Array.from(u).sort((e,t)=>e-t),i=0,r=0,s=e=>{v(e),e<i&&(i=e),e>r&&(r=e)};for(let t of e){let e=0,i=0;for(let r of f){let n=c.get(r)?.get(t)||0;0!==n&&(n>0?(e+=n,s(e)):(i+=n,s(i)))}}let a=r-i,o=n?0:a>0?a*t.extentPadding:1;return b([i-o,r+o])}{let e=Array.from(u).sort((e,t)=>e-t),i=0,r=0;for(let t of e){let e=0;for(let s of f){let n=c.get(s)?.get(t)||0;0!==n&&(e+=n,v(e),e<i&&(i=e),e>r&&(r=e))}}let s=r-i,a=n?0:s>0?s*t.extentPadding:1;return y=t.normalize?[0,n?1:1+t.extentPadding]:[i<0?i-a:0,r+a],b(y)}}function Ri(e,t,i){let r=[],s=0;for(let n of e){let e=i(n),a=t(n);null==e||Number.isNaN(e)||null==a||!isFinite(a)||(s+=e,r.push(s))}return r}function Ti(e,t,i,r){if(e[0]!==1/0&&e[1]!==-1/0)return e;let s=i?.[0],n=i?.[1],a="number"==typeof s&&Number.isFinite(s),o="number"==typeof n&&Number.isFinite(n);return a||o?"log"===r&&a&&!o&&s>0?[s,10*s]:[a?s:o&&n>0?0:t[0],o?n:a&&s>0?0:t[1]]:t}function Di(e,t,i){let r=e[0]<=e[1],s=r?e[0]:e[1],n=r?e[1]:e[0],a=s>0&&Number.isFinite(s),o=n>0&&Number.isFinite(n);if(a&&o)return e;let l=new Set;if(i)for(let e of i)null!=e&&e>0&&Number.isFinite(e)&&l.add(e);if(!t){if(o&&l.has(n)){let e=n/10;return r?[e,n]:[n,e]}return r?[1,10]:[10,1]}let c=a?s:t.min,u=o?n:t.max;return u>c||(o&&l.has(n)?c=u/10:u=10*c),r?[c,u]:[u,c]}function Li(e){let t=1/0,i=-1/0,r=!1;for(let s of e)if(Number.isFinite(s)){if(!(s>0)){r=!0;continue}s<t&&(t=s),s>i&&(i=s)}return{positive:Number.isFinite(t)?{min:t,max:i}:null,droppedNonPositive:r}}function Ei(e,t,i){if("log"===e){let e=Di(t,null);return e[0]===e[1]&&e[0]>0&&Number.isFinite(e[0])&&(e=[e[0],10*e[0]]),li().domain(e).range(i).clamp(!0)}return"symlog"===e?ci().domain(t).range(i):"time"===e||"utc"===e?("utc"===e?ui():hi()).domain([new Date(t[0]),new Date(t[1])]).range(i):di().domain(t).range(i)}var $i="_default";function Fi(e,t){return e&&"object"==typeof e&&!Array.isArray(e)?kt(e,t):void 0}var Ni=["data","domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"],_i=["scene-style","data-paint","accessibility","evidence"],Bi=(e,t)=>({retainedData:e,invalidations:t}),Ii=["domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"],zi=["layout","scene-geometry","data-paint","overlay","accessibility","evidence"],Oi=["domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"],Yi=["layout","scene-geometry","data-paint","overlay","accessibility","evidence"],Wi=["scene-geometry","data-paint","accessibility","evidence"],Vi=["scene-style","data-paint","accessibility","evidence"],ji=["overlay","accessibility","evidence"],Xi=[],Hi={chartType:/*#__PURE__*/Bi("rebuild",Ii),runtimeMode:/*#__PURE__*/Bi("rebuild",Ii),xAccessor:/*#__PURE__*/Bi("rebuild",Ii),yAccessor:/*#__PURE__*/Bi("rebuild",Ii),timeAccessor:/*#__PURE__*/Bi("rebuild",Ii),valueAccessor:/*#__PURE__*/Bi("rebuild",Ii),y0Accessor:/*#__PURE__*/Bi("rebuild",Ii),boundsAccessor:/*#__PURE__*/Bi("rebuild",Ii),band:/*#__PURE__*/Bi("rebuild",Ii),openAccessor:/*#__PURE__*/Bi("rebuild",Ii),highAccessor:/*#__PURE__*/Bi("rebuild",Ii),lowAccessor:/*#__PURE__*/Bi("rebuild",Ii),closeAccessor:/*#__PURE__*/Bi("rebuild",Ii),candlestickRangeMode:/*#__PURE__*/Bi("rebuild",Ii),accessorRevision:/*#__PURE__*/Bi("rebuild",Ii),groupAccessor:/*#__PURE__*/Bi("rebuild",zi),categoryAccessor:/*#__PURE__*/Bi("rebuild",zi),lineDataAccessor:/*#__PURE__*/Bi("rebuild",zi),colorAccessor:/*#__PURE__*/Bi("rebuild",Vi),sizeAccessor:/*#__PURE__*/Bi("rebuild",Wi),symbolAccessor:/*#__PURE__*/Bi("rebuild",Wi),pointIdAccessor:/*#__PURE__*/Bi("rebuild",Wi),xScaleType:/*#__PURE__*/Bi("preserve",Oi),yScaleType:/*#__PURE__*/Bi("preserve",Oi),xExtent:/*#__PURE__*/Bi("preserve",Oi),invertY:/*#__PURE__*/Bi("preserve",Oi),yExtent:/*#__PURE__*/Bi("preserve",Oi),extentPadding:/*#__PURE__*/Bi("preserve",Oi),scalePadding:/*#__PURE__*/Bi("preserve",Oi),axisExtent:/*#__PURE__*/Bi("preserve",Oi),yAxisExtent:/*#__PURE__*/Bi("preserve",Oi),binSize:/*#__PURE__*/Bi("preserve",Oi),binAlign:/*#__PURE__*/Bi("preserve",Oi),normalize:/*#__PURE__*/Bi("preserve",Oi),heatmapAggregation:/*#__PURE__*/Bi("preserve",Oi),heatmapXBins:/*#__PURE__*/Bi("preserve",Oi),heatmapYBins:/*#__PURE__*/Bi("preserve",Oi),arrowOfTime:/*#__PURE__*/Bi("preserve",Yi),baseline:/*#__PURE__*/Bi("preserve",Yi),stackOrder:/*#__PURE__*/Bi("preserve",Yi),sizeRange:/*#__PURE__*/Bi("preserve",Yi),curve:/*#__PURE__*/Bi("preserve",Yi),areaGroups:/*#__PURE__*/Bi("preserve",Yi),customLayout:/*#__PURE__*/Bi("preserve",Yi),layoutConfig:/*#__PURE__*/Bi("preserve",Yi),layoutMargin:/*#__PURE__*/Bi("preserve",Yi),symbolMap:/*#__PURE__*/Bi("preserve",Wi),showValues:/*#__PURE__*/Bi("preserve",Wi),heatmapValueFormat:/*#__PURE__*/Bi("preserve",Wi),trackHoverRows:/*#__PURE__*/Bi("preserve",Wi),lineStyle:/*#__PURE__*/Bi("preserve",Vi),pointStyle:/*#__PURE__*/Bi("preserve",Vi),areaStyle:/*#__PURE__*/Bi("preserve",Vi),barStyle:/*#__PURE__*/Bi("preserve",Vi),swarmStyle:/*#__PURE__*/Bi("preserve",Vi),waterfallStyle:/*#__PURE__*/Bi("preserve",Vi),candlestickStyle:/*#__PURE__*/Bi("preserve",Vi),boundsStyle:/*#__PURE__*/Bi("preserve",Vi),gradientFill:/*#__PURE__*/Bi("preserve",Vi),lineGradient:/*#__PURE__*/Bi("preserve",Vi),semanticLineStops:/*#__PURE__*/Bi("preserve",Vi),colorScheme:/*#__PURE__*/Bi("preserve",Vi),themeCategorical:/*#__PURE__*/Bi("preserve",Vi),themeSemantic:/*#__PURE__*/Bi("preserve",Vi),themeSequential:/*#__PURE__*/Bi("preserve",Vi),themeDiverging:/*#__PURE__*/Bi("preserve",Vi),barColors:/*#__PURE__*/Bi("preserve",Vi),decay:/*#__PURE__*/Bi("preserve",Vi),pulse:/*#__PURE__*/Bi("preserve",Vi),staleness:/*#__PURE__*/Bi("preserve",Vi),layoutSelection:/*#__PURE__*/Bi("preserve",Vi),annotations:/*#__PURE__*/Bi("preserve",ji),windowSize:/*#__PURE__*/Bi("preserve",Xi),windowMode:/*#__PURE__*/Bi("preserve",Xi),maxCapacity:/*#__PURE__*/Bi("preserve",Xi),clock:/*#__PURE__*/Bi("preserve",Xi),transition:/*#__PURE__*/Bi("preserve",Xi),introAnimation:/*#__PURE__*/Bi("preserve",Xi),onLayoutError:/*#__PURE__*/Bi("preserve",Xi)},Gi=/*#__PURE__*/Bi("preserve",Yi),Ui=class{constructor(){this.tracker=new ke}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}},Ni)}recordNoop(e){return this.tracker.record({kind:e,..."restyle"===e?{}:{count:0}},[])}recordRestyle(e){return e?this.tracker.record({kind:"restyle"},_i):this.recordNoop("restyle")}recordConfig(e,t=!1){let i=function(e){let t="preserve",i=new Set;for(let r of e){let e=Object.prototype.hasOwnProperty.call(Hi,r)?Hi[r]:Gi;"rebuild"===e.retainedData&&(t="rebuild");for(let t of e.invalidations)i.add(t)}return{retainedData:t,invalidations:i}}(e);return this.tracker.record({kind:"config",keys:e},t?new Set([...i.invalidations,...Wi]):i.invalidations)}},qi=class{constructor(){this.maxRadius=0,this.tree=null}get quadtree(){return this.tree}get maxPointRadius(){return this.maxRadius}clear(){this.tree=null,this.maxRadius=0}rebuild(e,t){if("scatter"!==e&&"bubble"!==e&&"custom"!==e)return void this.clear();let i=0,r=0;for(let e of t)"point"===e.type&&!1!==e.interactive&&(i++,e.r>r&&(r=e.r));if(this.maxRadius=r,i<=500)return void(this.tree=null);let s=new Array(i),n=0;for(let e of t)"point"===e.type&&!1!==e.interactive&&(s[n++]=e);this.tree=fi().x(e=>e.x).y(e=>e.y).addAll(s)}},Ji=class extends H{constructor(e){super(),this.xExtent=new p,this.yExtent=new p,this.growingCapacityWarned=!1,this.windowSizeWarned=!1,this.resolvedRibbons=[],this.timestampBuffer=null,this.activeTransition=null,this._hasRenderedOnce=!1,this.prevPositionMap=new Map,this.prevPathMap=new Map,this.exitNodes=[],this.lastIngestTime=0,this._colorMapCache=null,this._groupDataCache=null,this._groupColorMap=new Map,this._groupColorCounter=0,this._barCategoryCache=null,this._binBoundaries=[],this._stackExtentCache=null,this._ingestVersion=0,this._datumIndexCache=null,this._bufferArrayCache=null,this._bufferDirty=!0,this.needsFullRebuild=!0,this.lastLayout=null,this.updateResults=new Ui,this.scales=null,this.scene=[],this.version=0,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.xIsDate=!1,this.xTypeDetected=!1,this._warnedNonPositiveLogX=!1,this._warnedNonPositiveLogY=!1,this.spatialIndex=new qi,this._lastBoundedInsertsRef=null,this.applyPulse=(e,t,i)=>!(!this.config.pulse||!this.timestampBuffer)&&M(this.config.pulse,e,t,this.timestampBuffer,this.getDatumIndexMap(t),i),this.config=e,this.buffer=new P(e.windowSize),this.growingCap=e.windowSize;let t=["bar","swarm","waterfall"].includes(e.chartType)||"streaming"===e.runtimeMode;if(this.resolveXAccessor(),this.getY=t?W(e.valueAccessor||e.yAccessor,"value"):W(e.yAccessor,"y"),this.getGroup=V(e.groupAccessor),this.getCategory=V(e.categoryAccessor),this.getSize=e.sizeAccessor?W(e.sizeAccessor,"size"):void 0,this.getColor=V(e.colorAccessor),this.getSymbol=V(e.symbolAccessor),this.getY0=e.y0Accessor?W(e.y0Accessor,"y0"):void 0,this.resolvedRibbons=Ci(e),this.getPointId=V(e.pointIdAccessor),"candlestick"===e.chartType){let t=null!=e.openAccessor,i=null!=e.closeAccessor;this.getOpen=t?W(e.openAccessor,"open"):void 0,this.getHigh=W(e.highAccessor,"high"),this.getLow=W(e.lowAccessor,"low"),this.getClose=i?W(e.closeAccessor,"close"):void 0,this.config.candlestickRangeMode=!t&&!i}e.pulse&&(this.timestampBuffer=new P(e.windowSize))}currentTime(){return this.config.clock?.()??Ut()}resolveXAccessor(e=this.buffer){let t=["bar","swarm","waterfall"].includes(this.config.chartType)||"streaming"===this.config.runtimeMode,i=t&&this.config.timeAccessor||this.config.xAccessor,r=j(i,t?"time":"x");this.xIsDate=!1,this.xTypeDetected=!1;for(let t of e){let e=r(t);if(null==e||""===e)continue;let i=e instanceof Date&&Number.isFinite(e.getTime())||"string"==typeof e&&Number.isFinite(I(e));if(i||Number.isFinite(Number(e))){this.xIsDate=i,this.xTypeDetected=!0;break}}this.getX=this.xIsDate?e=>z(r(e)):e=>+r(e)}syncPulseTimestampBuffer(){this.config.pulse?null!=this.timestampBuffer&&this.timestampBuffer.capacity===this.buffer.capacity&&this.timestampBuffer.size===this.buffer.size||(this.timestampBuffer=R(this.buffer,this.currentTime())):this.timestampBuffer=null}pushDatumYExtent(e){if("candlestick"===this.config.chartType&&this.getHigh&&this.getLow)return this.yExtent.push(this.getHigh(e)),void this.yExtent.push(this.getLow(e));this.yExtent.push(this.getY(e)),this.getY0&&this.yExtent.push(this.getY0(e));for(let t of this.resolvedRibbons){let i=t.getTop(e),r=t.getBottom(e);Number.isFinite(i)&&this.yExtent.push(i),Number.isFinite(r)&&this.yExtent.push(r)}}evictDatumYExtent(e){if("candlestick"===this.config.chartType&&this.getHigh&&this.getLow)return this.yExtent.evict(this.getHigh(e)),void this.yExtent.evict(this.getLow(e));this.yExtent.evict(this.getY(e)),this.getY0&&this.yExtent.evict(this.getY0(e));for(let t of this.resolvedRibbons){let i=t.getTop(e),r=t.getBottom(e);Number.isFinite(i)&&this.yExtent.evict(i),Number.isFinite(r)&&this.yExtent.evict(r)}}rebuildYExtent(){this.yExtent.clear();for(let e of this.buffer)this.pushDatumYExtent(e)}rebuildExtents(){this.xExtent.clear(),this.yExtent.clear();for(let e of this.buffer)this.xExtent.push(this.getX(e)),this.pushDatumYExtent(e)}ingest(e){if(e.bounded&&this._lastBoundedInsertsRef===e.inserts)return this.updateResults.recordNoop("replace"),!1;let t=this.currentTime();if(this.lastIngestTime=t,this.needsFullRebuild=!0,this._bufferDirty=!0,this._ingestVersion++,e.bounded){this._lastBoundedInsertsRef=e.inserts,this.buffer.clear(),this.xExtent.clear(),this.yExtent.clear(),this.timestampBuffer&&this.timestampBuffer.clear(),this.resolveXAccessor(e.inserts);let i=e.totalSize||e.inserts.length;T(this.buffer,i,this.timestampBuffer);for(let i of e.inserts)D(this.buffer,i,this.timestampBuffer,t),this.xExtent.push(this.getX(i)),this.pushDatumYExtent(i)}else{this.xTypeDetected||this.resolveXAccessor(e.inserts);for(let i of e.inserts){if("growing"===this.config.windowMode&&this.buffer.full){let e=this.config.maxCapacity??1e5;this.growingCap<e&&(this.growingCap=Math.min(2*this.growingCap,e),this.buffer.resize(this.growingCap),this.timestampBuffer&&this.timestampBuffer.resize(this.growingCap),"production"!==process.env.NODE_ENV&&!this.growingCapacityWarned&&this.growingCap>=5e4&&(this.growingCapacityWarned=!0,console.warn(`[Semiotic] Growing window buffer reached ${this.growingCap} points (cap ${e}). Large canvas scenes are expensive — prefer a sliding window, aggregation, or an explicit maxCapacity if this is intentional.`)))}let e=D(this.buffer,i,this.timestampBuffer,t);this.xExtent.push(this.getX(i)),this.pushDatumYExtent(i),null!=e&&(this.xExtent.evict(this.getX(e)),this.evictDatumYExtent(e))}}return this.updateResults.recordData(e.bounded?"replace":"ingest",e.inserts.length),!0}ingestWithResult(e){return this.ingest(e),this.updateResults.last}computeScene(e){let{config:r,buffer:s}=this,n=this.scales,a=this.lastLayout;if(!(e.width>0&&e.height>0&&Number.isFinite(e.width)&&Number.isFinite(e.height)))return void(this.needsFullRebuild=!0);if(!this.needsFullRebuild&&!r.customLayout&&!this.activeTransition&&"bar"!==r.chartType&&"waterfall"!==r.chartType&&"candlestick"!==r.chartType&&this.lastLayout&&this.lastLayout.width>0&&this.lastLayout.height>0&&this.scene.length>0&&this.scales&&(this.config.scalePadding??0)<=0&&(this.lastLayout.width!==e.width||this.lastLayout.height!==e.height))return this.scales=function(e,t,i,r){let s=r.width/i.width,n=r.height/i.height;for(let t of e)switch(t.type){case"line":for(let e of t.path)e[0]*=s,e[1]*=n;break;case"area":for(let e of t.topPath)e[0]*=s,e[1]*=n;for(let e of t.bottomPath)e[0]*=s,e[1]*=n;t.clipRect&&(t.clipRect={x:t.clipRect.x*s,y:t.clipRect.y*n,width:t.clipRect.width*s,height:t.clipRect.height*n}),t.strokeColorBands&&(t.strokeColorBands=t.strokeColorBands.map(e=>({...e,y:e.y*n,height:e.height*n})));break;case"point":case"symbol":case"glyph":t.x*=s,t.y*=n;break;case"rect":case"heatcell":t.x*=s,t.y*=n,t.w*=s,t.h*=n}return{x:t.x.copy().range(t.x.range().map(e=>e*s)),y:t.y.copy().range(t.y.range().map(e=>e*n))}}(this.scene,this.scales,this.lastLayout,e),this.lastLayout={width:e.width,height:e.height},this.spatialIndex.rebuild(r.chartType,this.scene),void this.version++;this.xExtent.dirty&&this.xExtent.recalculate(s,this.getX),this.yExtent.dirty&&this.rebuildYExtent();let o=this.getBufferArray(),l=this.xExtent.extent,c=this.yExtent.extent,u="waterfall"===r.chartType&&s.size>0?function(e,t,i,r,s){let n=Array.from(new Set(e.map(t).filter(e=>Number.isFinite(e)))).sort((e,t)=>e-t);if(n.length<2)return Mi(i,r);let a=n[0],o=n[1],l=n[n.length-1],c=n[n.length-2];return Mi("log"===s&&a>0?[a/Math.sqrt(o/a),l*Math.sqrt(l/c)]:[a-(o-a)/2,l+(l-c)/2],r)}(o,this.getX,l,r.xExtent,r.xScaleType):Mi(l,r.xExtent);var h,d,f;"bar"===r.chartType&&r.binSize&&"center"===r.binAlign&&(h=l,d=r.binSize,f=r.xExtent,u=h.every(Number.isFinite)?Mi([i(h[0],d,"center"),i(h[1],d,"center")+d],f):Mi(h,f));let p=Mi(c,r.yExtent),g=!(!(m=r.yExtent)||null==m[0]||null==m[1]),y="exact"===(r.yAxisExtent??r.axisExtent);var m;if("stackedarea"===r.chartType&&!g&&s.size>0){let e=Pi({config:r,groups:this.groupData(o),getX:this.getX,getY:this.getY,bufferSize:s.size,ingestVersion:this._ingestVersion,stackExtentCache:this._stackExtentCache});p=e.yDomain,this._stackExtentCache=e.stackExtentCache}else"bar"===r.chartType&&r.binSize&&!g&&s.size>0?p=function(e,i,r,s,n,a,o,l="start"){let[c,u]=t(e,i,r,s,n,l);if(0===c&&0===u)return[0,0];let h=o?0:(u-c)*a;return[c<0?c-h:0,u+h]}(s,this.getX,this.getY,r.binSize,this.getCategory,r.extentPadding,y,r.binAlign):"waterfall"===r.chartType&&!g&&s.size>0?p=function(e,t,i,r,s){let n=0,a=0;for(let r of Ri(e,t,i))r<n&&(n=r),r>a&&(a=r);let o=a-n,l=s?0:o>0?o*r:1;return[Math.min(0,n-Math.abs(l)),Math.max(0,a+Math.abs(l))]}(s,this.getX,this.getY,r.extentPadding,y):!g&&p[0]!==1/0&&(p=function(e,t,i){if(!i.length)return e;let[r,s]=e;for(let e of t)for(let t of i){let i=t.getTop(e),n=t.getBottom(e);Number.isFinite(i)&&(i<r&&(r=i),i>s&&(s=i)),Number.isFinite(n)&&(n<r&&(r=n),n>s&&(s=n))}return[r,s]}(p,o,this.resolvedRibbons),p=function(e,t){let i=e[1]-e[0],r=t.exactMode?0:i>0?i*t.extentPadding:1,s=[null!=t.userMin?e[0]:e[0]-r,null!=t.userMax?e[1]:e[1]+r];if("log"===t.yScaleType&&s[0]<=0&&t.dataYDomain[0]>0&&!t.exactMode){let e=1+t.extentPadding;null==t.userMin&&(s[0]=t.dataYDomain[0]/e)}return s}(p,{exactMode:y,extentPadding:r.extentPadding,userMin:r.yExtent?.[0],userMax:r.yExtent?.[1],yScaleType:r.yScaleType,dataYDomain:c}));if(p=function(e,t,i){if(!t||i)return e;let r=t[0],s=t[1];return null==r&&null==s?e:[r??e[0],s??e[1]]}(p,r.yExtent,!!g),({xDomain:u,yDomain:p}=function(e,t,i,r){return{xDomain:Ti(e,"time"===i?[0,864e5]:[0,1],r?.x,i),yDomain:Ti(t,[0,1],r?.y,r?.yScaleType)}}(u,p,r.xScaleType,{x:r.xExtent,y:r.yExtent,yScaleType:r.yScaleType})),"log"===(r.xScaleType??(this.xIsDate?"utc":void 0))){let e=this.positiveAxisSamples(this.getX);u=Di(u,e.positive,r.xExtent),this.warnDroppedLogSamples("x",e.droppedNonPositive)}if("log"===r.yScaleType){let e=Li(this.plottedAggregateY(s,o)||function(e){let t=[];if("candlestick"===e.chartType&&e.getHigh&&e.getLow){let i=e.getHigh,r=e.getLow,s=e.getOpen,n=e.getClose,a=null!=s&&null!=n;for(let o of e.data)t.push(i(o),r(o)),a&&t.push(s(o),n(o));return t}for(let i of e.data){t.push(e.getY(i)),e.getY0&&t.push(e.getY0(i));for(let r of e.ribbons){let e=r.getTop(i),s=r.getBottom(i);Number.isFinite(e)&&t.push(e),Number.isFinite(s)&&t.push(s)}}return t}({chartType:r.chartType,data:s,getY:this.getY,getY0:this.getY0,getHigh:this.getHigh,getLow:this.getLow,getOpen:this.getOpen,getClose:this.getClose,ribbons:this.resolvedRibbons}));p=Di(p,e.positive,r.yExtent),this.warnDroppedLogSamples("y",e.droppedNonPositive)}this.scales=function(e){let{config:t,layout:i,xDomain:r}=e,s=t.xScaleType??(e.xIsDate?"utc":void 0),n=t.invertY?[e.yDomain[1],e.yDomain[0]]:e.yDomain,a="streaming"===t.runtimeMode,o=t.scalePadding||0,l=Math.max(0,Math.min(o,Math.min(i.width,i.height)/2-1));return a?{x:Ei(s,r,"left"===t.arrowOfTime?[i.width-l,l]:[l,i.width-l]),y:Ei(t.yScaleType,n,[i.height-l,l])}:{x:Ei(s,r,[l,i.width-l]),y:Ei(t.yScaleType,n,[i.height-l,l])}}({config:r,layout:e,xDomain:u,yDomain:p,xIsDate:this.xIsDate}),this._customLayoutFailedThisBuild=!1;let x=this.buildSceneNodes(e,o);if(this._customLayoutFailedThisBuild)return!0===this.lastCustomLayoutFailure?.preservedLastGoodScene?(this.scales=n,this.lastLayout=a):(this.scene=[],this.spatialIndex.rebuild(this.config.chartType,this.scene)),void(this.needsFullRebuild=!0);let v=this.config.transition?ki():null;v&&this.scene.length>0&&this.snapshotPositions(),this.scene=x,this.config.decay&&this.applyDecay(this.scene,o),this.config.pulse&&this.applyPulse(this.scene,o,this.currentTime()),this.config.transition&&!this._hasRenderedOnce&&this.scene.length>0&&(this.config.introAnimation&&v&&this.synthesizeIntroPositions(),this._hasRenderedOnce=!0),v&&(this.prevPositionMap.size>0||this.prevPathMap.size>0)&&this.startTransition(),this.spatialIndex.rebuild(this.config.chartType,this.scene),this.needsFullRebuild=!1,this.lastLayout={width:e.width,height:e.height},this.version++}get quadtree(){return this.spatialIndex.quadtree}get maxPointRadius(){return this.spatialIndex.maxPointRadius}buildSceneNodes(t,i){let{config:n,scales:a}=this;if(!a)return[];if(n.customLayout){let e=n.layoutMargin??{top:0,right:0,bottom:0,left:0},r={data:i,scales:a,dimensions:{width:t.width,height:t.height,margin:e,plot:{x:0,y:0,width:t.width,height:t.height}},theme:{semantic:n.themeSemantic??{},categorical:n.themeCategorical??wt},resolveColor:(e,t)=>{let i=this.resolveGroupColor(e);if(i)return i;let r=this.resolveLineStyle(e,t);return r.stroke?r.stroke:"string"==typeof r.fill?r.fill:n.themeSemantic?.primary??"#4e79a7"},config:n.layoutConfig??{},selection:n.layoutSelection??null},s=G({family:"xy",logLabel:"customLayout",revision:this.version,hasPreviousResult:null!==this.lastCustomLayoutResult,onLayoutError:n.onLayoutError,run:()=>n.customLayout(r)});if("failure"===s.kind)return this.lastCustomLayoutFailure=s.diagnostic,this._customLayoutFailedThisBuild=!0,s.preservedLastGoodScene?this.scene:(this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,[]);let o=s.result;this.customLayoutOverlays=o.overlays??null,this.lastCustomLayoutResult=o,this.lastCustomLayoutFailure=null;let l=o.nodes??[];if(this._customRestyle=o.restyle,this.hasCustomRestyle=!!o.restyle,this.hasCustomRestyle){this._baseStyles=new WeakMap;for(let e of l)e.style&&this._baseStyles.set(e,e.style);this.applyCustomRestyle(l,n.layoutSelection??null)}return U({label:"customLayout",nodes:l,overlays:this.customLayoutOverlays,warned:this._customLayoutDiagnosticsWarned}),l}if(this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customRestyle=void 0,this.hasCustomRestyle=!1,0===i.length)return[];let o={scales:a,config:n,getX:this.getX,getY:this.getY,getY0:this.getY0,getSize:this.getSize,getColor:this.getColor,getSymbol:this.getSymbol,getGroup:this.getGroup,getCategory:this.getCategory,getPointId:this.getPointId,ribbons:this.resolvedRibbons,getOpen:this.getOpen,getHigh:this.getHigh,getLow:this.getLow,getClose:this.getClose,resolveLineStyle:(e,t)=>this.resolveLineStyle(e,t),resolveAreaStyle:(e,t)=>this.resolveAreaStyle(e,t),resolveBoundsStyle:(e,t)=>this.resolveBoundsStyle(e,t),resolveColorMap:e=>this.resolveColorMap(e),resolveGroupColor:e=>this.resolveGroupColor(e),groupData:e=>this.groupData(e),barCategoryCache:this._barCategoryCache},l=r(n.chartType);if(!l)return c=n.chartType,e(c)||be&&(wi.has(c)||(wi.add(c),console.warn(`[semiotic] StreamXYFrame: no XY plugin registered for "${c}" during SSR. Import a chart HOC, or call registerBuiltInXYPlugins() from "semiotic/xy" or "semiotic/realtime/core" before render.`))),[];var c;let u=s(l(o,i,t));return"bar"===n.chartType&&(this._barCategoryCache=o.barCategoryCache??null,this._binBoundaries=u.binBoundaries),u.nodes}resolveBoundsStyle(e,t){return function(e,t,i,r){let s=e.boundsStyle;if("function"==typeof s)return s(i||{},t);if(s&&"object"==typeof s)return s;let n=r(t,i);return{fill:n.stroke||e.themeSemantic?.primary||"#4e79a7",fillOpacity:.2,...null!=n.opacity&&{opacity:n.opacity},stroke:"none",cursor:n.cursor}}(this.config,e,t,(e,t)=>this.resolveLineStyle(e,t))}computeDecayOpacity(e,t){let i=this.config.decay;return!i||t<=1?1:q(i,e,t)}getDatumIndexMap(e){if(this._datumIndexCache&&this._datumIndexCache.version===this._ingestVersion)return this._datumIndexCache.map;let t=J(e);return this._datumIndexCache={version:this._ingestVersion,map:t},t}applyDecay(e,t){this.config.decay&&K(this.config.decay,e,t,this.getDatumIndexMap(t))}refreshPulse(e){return!0!==this.lastCustomLayoutFailure?.preservedLastGoodScene&&this.applyPulse(this.scene,this.getBufferArray(),e)}hasActivePulsesAt(e){return!!this.config.pulse&&L(this.config.pulse,this.timestampBuffer,e)}get hasActivePulses(){return this.hasActivePulsesAt(this.currentTime())}get transitionContext(){return{runtimeMode:this.config.runtimeMode,getX:this.getX,getY:this.getY,getCategory:this.getCategory,getPointId:this.getPointId}}get hasRenderedOnce(){return this._hasRenderedOnce}snapshotPositions(){ki()?.snapshotPositions(this.transitionContext,this.scene,this.prevPositionMap,this.prevPathMap)}synthesizeIntroPositions(){this.prevPositionMap.clear(),this.prevPathMap.clear();let e=this.scales?.y(0)??0,t=ki();if(t)for(let i=0;i<this.scene.length;i++){let r=this.scene[i],s=t.getNodeIdentity(this.transitionContext,r,i);s&&("point"===r.type?this.prevPositionMap.set(s,{x:r.x,y:r.y,r:0,opacity:0}):"rect"===r.type?this.prevPositionMap.set(s,{x:r.x,y:e,w:r.w,h:0,opacity:r.style.opacity??1}):"heatcell"===r.type?this.prevPositionMap.set(s,{x:r.x,y:r.y,w:r.w,h:r.h,opacity:0}):"line"===r.type?(r._introClipFraction=0,this.prevPathMap.set(s,{path:r.path.map(e=>[e[0],e[1]]),pathIds:r.pathIds?.slice(),opacity:r.style.opacity})):"area"===r.type&&(r._introClipFraction=0,this.prevPathMap.set(s,{topPath:r.topPath.map(e=>[e[0],e[1]]),bottomPath:r.bottomPath.map(e=>[e[0],e[1]]),pathIds:r.pathIds?.slice(),opacity:r.style.opacity})))}}startTransition(){let e=ki();if(!this.config.transition||!e)return;let t=e.startTransition(this.transitionContext,this.config.transition,{scene:this.scene,exitNodes:this.exitNodes,activeTransition:this.activeTransition},this.prevPositionMap,this.prevPathMap,this.currentTime());this.scene=t.scene,this.exitNodes=t.exitNodes,this.activeTransition=t.activeTransition}advanceTransition(e){let t=ki();if(!this.activeTransition||!this.config.transition||!t)return!1;let i={scene:this.scene,exitNodes:this.exitNodes,activeTransition:this.activeTransition},r=t.advanceTransition(e,this.config.transition,i,this.prevPositionMap,this.prevPathMap);return this.scene=i.scene,this.exitNodes=i.exitNodes,this.activeTransition=i.activeTransition,r}cancelIntroAnimation(){this.prevPositionMap.clear(),this.prevPathMap.clear(),this.activeTransition=null,g(this.scene),this.exitNodes=[]}groupData(e){let{result:t,cache:i}=function(e,t,i,r){if(r&&r.version===i&&r.group===t&&r.data===e)return{result:r.result,cache:r};let s;if(t){let i=new Map;for(let r of e){let e=t(r);i.has(e)||i.set(e,[]),i.get(e).push(r)}s=Array.from(i.entries()).map(([e,t])=>({key:e,data:t}))}else s=[{key:$i,data:e}];return{result:s,cache:{version:i,group:t,data:e,result:s}}}(e,this.getGroup,this._ingestVersion,this._groupDataCache);return this._groupDataCache=i,t}resolveColorMap(e){let{map:t,cache:i}=function(e,t,i,r,s){if(s&&s.version===r)return{map:s.map,cache:s};let n=new Set;if(t)for(let i of e){let e=t(i);e&&n.add(e)}let a=Array.from(n).sort(),o=a.join("\0");if(s&&s.key===o){let e={...s,version:r};return{map:e.map,cache:e}}let l=At(i.colorScheme,i.themeCategorical,wt),c=new Map;for(let e=0;e<a.length;e++)c.set(a[e],Fi(i.colorScheme,a[e])??l[e%l.length]);return{map:c,cache:{key:o,map:c,version:r}}}(e,this.getColor,this.config,this._ingestVersion,this._colorMapCache);return this._colorMapCache=i,t}resolveLineStyle(e,t){return function(e,t,i,r){let s=e.lineStyle;if("function"==typeof s){let e=s(i||{},t);if(e&&!e.stroke&&t){let i=r(t);if(i)return{...e,stroke:i}}return e}let n=e.themeSemantic?.primary;return s&&"object"==typeof s?{stroke:s.stroke||n||"#007bff",strokeWidth:s.strokeWidth??2,strokeDasharray:s.strokeDasharray,fill:s.fill,fillOpacity:s.fillOpacity,opacity:s.opacity,cursor:s.cursor}:{stroke:r(t)||n||"#007bff",strokeWidth:2}}(this.config,e,t,e=>this.resolveGroupColor(e))}resolveAreaStyle(e,t){return function(e,t,i,r){if(e.areaStyle){let s=e.areaStyle(i||{});if(s&&!s.fill&&t){let e=r(t);if(e)return{...s,fill:e,stroke:s.stroke||e}}return s}let s=e.lineStyle;if("function"==typeof s){let e=s(i||{},t);if(e&&!e.fill&&t){let i=r(t);if(i)return{...e,fill:i,stroke:e.stroke||i}}return e}let n=e.themeSemantic?.primary;if(s&&"object"==typeof s)return{fill:s.fill||s.stroke||n||"#4e79a7",fillOpacity:s.fillOpacity??.7,stroke:s.stroke||n||"#4e79a7",strokeWidth:s.strokeWidth??2,cursor:s.cursor};let a=r(t)||n||"#4e79a7";return{fill:a,fillOpacity:.7,stroke:a,strokeWidth:2}}(this.config,e,t,e=>this.resolveGroupColor(e))}resolveGroupColor(e){let{color:t,groupColorCounter:i}=function(e){let{group:t,colorMapCache:i,groupColorMap:r,groupColorMapCap:s,config:n}=e,{groupColorCounter:a}=e,o=Fi(n.colorScheme,t);if(o)return{color:o,groupColorCounter:a};if(i){let e=i.map.get(t);if(e)return{color:e,groupColorCounter:a}}let l=r.get(t);if(l)return{color:l,groupColorCounter:a};let c=At(n.colorScheme,n.themeCategorical,wt);if(0===c.length)return{color:null,groupColorCounter:a};let u=c[a%c.length];if(a++,r.set(t,u),r.size>s){let e=r.keys().next().value;void 0!==e&&r.delete(e)}return{color:u,groupColorCounter:a}}({group:e,colorMapCache:this._colorMapCache,groupColorMap:this._groupColorMap,groupColorCounter:this._groupColorCounter,groupColorMapCap:1e3,config:this.config});return this._groupColorCounter=i,t}getBufferArray(){return(this._bufferDirty||!this._bufferArrayCache)&&(this._bufferArrayCache=this.buffer.toArray(),this._bufferDirty=!1),this._bufferArrayCache}getData(){return this.getBufferArray()}remove(e){if(!this.getPointId)throw new Error("remove() requires pointIdAccessor to be configured");this.config.transition&&this.scene.length>0&&ki()&&this.snapshotPositions();let t=y(e),i=this.getPointId,r=e=>t.has(i(e));E(this.buffer,this.timestampBuffer,r);let s=this.buffer.remove(r);if(0===s.length)return this.updateResults.recordNoop("remove"),s;for(let e of s)this.xExtent.evict(this.getX(e)),this.evictDatumYExtent(e);return this.needsFullRebuild=!0,this._bufferDirty=!0,this._ingestVersion++,this.lastIngestTime=this.currentTime(),this.updateResults.recordData("remove",s.length),s}update(e,t){if(!this.getPointId)throw new Error("update() requires pointIdAccessor to be configured");let i=y(e),r=this.getPointId,s=new Set;this.buffer.forEach((e,t)=>{i.has(r(e))&&s.add(t)});let n=this.buffer.update(e=>i.has(r(e)),t);if(0===n.length)return this.updateResults.recordNoop("update"),n;for(let e of n)this.xExtent.evict(this.getX(e)),this.evictDatumYExtent(e);return this.buffer.forEach((e,t)=>{s.has(t)&&(this.xExtent.push(this.getX(e)),this.pushDatumYExtent(e))}),this.needsFullRebuild=!0,this._bufferDirty=!0,this._ingestVersion++,this.lastIngestTime=this.currentTime(),this.updateResults.recordData("update",n.length),n}getBinBoundaries(){return this._binBoundaries}getExtents(){return this.xExtent.dirty&&this.xExtent.recalculate(this.buffer,this.getX),this.yExtent.dirty&&this.rebuildYExtent(),this.xExtent.min===1/0?null:{x:this.xExtent.extent,y:this.yExtent.extent}}positiveAxisSamples(e){let t=[];for(let i of this.buffer)t.push(e(i));return Li(t)}plottedAggregateY(e,t){let i=this.config;if("bar"===i.chartType&&i.binSize)return n(e,this.getX,this.getY,i.binSize,this.getCategory,i.binAlign,i.barColors?Object.keys(i.barColors):[]);if("stackedarea"===i.chartType&&e.size>0){let r=Pi({config:i,groups:this.groupData(t),getX:this.getX,getY:this.getY,bufferSize:e.size,ingestVersion:this._ingestVersion,stackExtentCache:this._stackExtentCache});return this._stackExtentCache=r.stackExtentCache,r.stackExtentCache.plottedY??null}return"waterfall"===i.chartType&&e.size>0?Ri(e,this.getX,this.getY):null}warnDroppedLogSamples(e,t){if(t){if("x"===e){if(this._warnedNonPositiveLogX)return;this._warnedNonPositiveLogX=!0}else{if(this._warnedNonPositiveLogY)return;this._warnedNonPositiveLogY=!0}console.warn(`Semiotic log ${e} scale clamped non-positive values to the positive domain edge.`)}}clear(){this.buffer.clear(),this.resolveXAccessor(),this.xExtent.clear(),this.yExtent.clear(),this._hasRenderedOnce=!1,this.timestampBuffer&&this.timestampBuffer.clear(),this.prevPositionMap.clear(),this.prevPathMap.clear(),this.exitNodes=[],this.activeTransition=null,this.lastIngestTime=0,this._lastBoundedInsertsRef=null,this.needsFullRebuild=!0,this._bufferDirty=!0,this._bufferArrayCache=null,this._datumIndexCache=null,this.lastLayout=null,this.scales=null,this.scene=[],this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,this.spatialIndex.clear(),this._colorMapCache=null,this._groupDataCache=null,this._groupColorMap=new Map,this._groupColorCounter=0,this._barCategoryCache=null,this._binBoundaries=[],this._stackExtentCache=null,this.version++,this.updateResults.recordData("clear")}get size(){return this.buffer.size}getBuffer(){return this.buffer}getXAccessor(){return this.getX}getYAccessor(){return this.getY}getCategoryAccessor(){return this.getCategory}applyCustomRestyle(e,t){let i=this._customRestyle;if(i)for(let r of e){let e=this._baseStyles.get(r)??r.style??{},s=i(r,t);r.style=s?{...e,...s}:e}}restyleScene(e){this._customRestyle?(this.applyCustomRestyle(this.scene,e),this.markStylePaintPending(),this.updateResults.recordRestyle(!0)):this.updateResults.recordRestyle(!1)}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||"themeCategorical"in e||"colorAccessor"in e)&&(this._colorMapCache=null,this._groupColorMap=new Map,this._groupColorCounter=0),("barColors"in e||"colorScheme"in e)&&(this._barCategoryCache=null),("normalize"in e||"extentPadding"in e||"xAccessor"in e||"yAccessor"in e||"timeAccessor"in e||"valueAccessor"in e||"boundsAccessor"in e||"band"in e||"y0Accessor"in e||"openAccessor"in e||"highAccessor"in e||"lowAccessor"in e||"closeAccessor"in e||"groupAccessor"in e||"categoryAccessor"in e||"chartType"in e||"runtimeMode"in e)&&(this._stackExtentCache=null);let r=!1,s=!1;Object.assign(this.config,e),"pulse"in e&&this.syncPulseTimestampBuffer();let n="chartType"in e&&e.chartType!==t.chartType||"runtimeMode"in e&&e.runtimeMode!==t.runtimeMode;if(n||"xAccessor"in e||"yAccessor"in e||"timeAccessor"in e||"valueAccessor"in e){let e=["bar","swarm","waterfall"].includes(this.config.chartType)||"streaming"===this.config.runtimeMode,i=e&&this.config.timeAccessor||this.config.xAccessor,a=e&&t.timeAccessor||t.xAccessor,o=e&&this.config.valueAccessor||this.config.yAccessor,l=e&&t.valueAccessor||t.yAccessor,c=n||!X(i,a),u=n||!X(o,l);(c||u)&&(c&&this.resolveXAccessor(),this.getY=e?W(this.config.valueAccessor||this.config.yAccessor,"value"):W(this.config.yAccessor,"y"),u&&this.resolvedRibbons.some(e=>"bounds"===e.kind)&&(this.resolvedRibbons=Ci(this.config)),r=!0,s=!0)}if("groupAccessor"in e&&!X(e.groupAccessor,t.groupAccessor)&&(this.getGroup=null!=this.config.groupAccessor?V(this.config.groupAccessor):void 0,r=!0),"categoryAccessor"in e&&!X(e.categoryAccessor,t.categoryAccessor)&&(this.getCategory=null!=this.config.categoryAccessor?V(this.config.categoryAccessor):void 0,r=!0),"sizeAccessor"in e&&!X(e.sizeAccessor,t.sizeAccessor)&&(this.getSize=this.config.sizeAccessor?W(this.config.sizeAccessor,"size"):void 0,r=!0),"symbolAccessor"in e&&!X(e.symbolAccessor,t.symbolAccessor)&&(this.getSymbol=null!=this.config.symbolAccessor?V(this.config.symbolAccessor):void 0,r=!0),"colorAccessor"in e&&!X(e.colorAccessor,t.colorAccessor)&&(this.getColor=null!=this.config.colorAccessor?V(this.config.colorAccessor):void 0,r=!0),"y0Accessor"in e&&!X(e.y0Accessor,t.y0Accessor)&&(this.getY0=this.config.y0Accessor?W(this.config.y0Accessor,"y0"):void 0,r=!0,s=!0),("boundsAccessor"in e&&!X(e.boundsAccessor,t.boundsAccessor)||"band"in e&&e.band!==t.band||"boundsStyle"in e&&e.boundsStyle!==t.boundsStyle)&&(this.resolvedRibbons=Ci(this.config),r=!0,s=!0),"pointIdAccessor"in e&&!X(e.pointIdAccessor,t.pointIdAccessor)&&(this.getPointId=null!=this.config.pointIdAccessor?V(this.config.pointIdAccessor):void 0,r=!0),"candlestick"===this.config.chartType&&(n||"openAccessor"in e&&!X(e.openAccessor,t.openAccessor)||"closeAccessor"in e&&!X(e.closeAccessor,t.closeAccessor)||"highAccessor"in e&&!X(e.highAccessor,t.highAccessor)||"lowAccessor"in e&&!X(e.lowAccessor,t.lowAccessor))){let e=null!=this.config.openAccessor,t=null!=this.config.closeAccessor;this.getOpen=e?W(this.config.openAccessor,"open"):void 0,this.getHigh=W(this.config.highAccessor,"high"),this.getLow=W(this.config.lowAccessor,"low"),this.getClose=t?W(this.config.closeAccessor,"close"):void 0,this.config.candlestickRangeMode=!e&&!t,r=!0,s=!0}if("accessorRevision"in e&&e.accessorRevision!==t.accessorRevision&&(this.resolveXAccessor(),r=!0,s=!0),!r){let i=Object.keys(e).filter(e=>!e.endsWith("Accessor")&&"timeAccessor"!==e&&"valueAccessor"!==e);for(let s of i)if(e[s]!==t[s]){r=!0;break}}r&&(s&&this.rebuildExtents(),this.needsFullRebuild=!0),this.updateResults.recordConfig(i,("bar"===this.config.chartType||"heatmap"===this.config.chartType)&&!this.config.trackHoverRows&&Yt(t.areaStyle)!==Yt(this.config.areaStyle))}updateConfigWithResult(e){return this.updateConfig(e),this.updateResults.last}},Ki=/*#__PURE__*/new WeakMap;function Qi(e,t){let i=St(t);if(!i)return e;let r=Ki.get(e),s=r?.get(i);if(s)return s;let n=function(e,t,i=8){if(!t||e.length<2)return e.map(([e,t])=>[e,t]);let r=[],s=null,n={moveTo(e,t){s=[e,t],r.push([e,t])},lineTo(e,t){s=[e,t],r.push([e,t])},bezierCurveTo(e,t,n,a,o,l){if(!s)return s=[o,l],void r.push([o,l]);let[c,u]=s;for(let s=1;s<=i;s++){let h=s/i,d=1-h,f=d*d*d*c+3*d*d*h*e+3*d*h*h*n+h*h*h*o,p=d*d*d*u+3*d*d*h*t+3*d*h*h*a+h*h*h*l;r.push([f,p])}s=[o,l]},closePath(){},arc(){},rect(){},arcTo(){},quadraticCurveTo(e,t,i,n){s=[i,n],r.push([i,n])}};return pi().x(e=>e[0]).y(e=>e[1]).curve(t).context(n)(e),r}(e,i);return r||(r=new Map,Ki.set(e,r)),r.set(i,n),n}function Zi(e,t,i,r=30,s,n=0){let a=null;if(s){let e=Q(s,t,i,r,n);e&&!1!==e.node.interactive&&(a={node:e.node,datum:e.node.datum,x:e.node.x,y:e.node.y,distance:e.distance})}for(let n of e){let e=null;switch(n.type){case"point":if(!1===n.interactive||s)break;e=tr(n,t,i,r);break;case"symbol":e=ir(n,t,i,r);break;case"glyph":e=rr(n,t,i,r);break;case"line":e=sr(n,t,i,r);break;case"rect":if(null==n.datum)break;e=nr(n,t,i);break;case"heatcell":e=ar(n,t,i);break;case"area":if(!1===n.interactive)break;e=lr(n,t,i,r);break;case"candlestick":e=or(n,t,i)}e&&(!a||e.distance<a.distance||0===e.distance&&0===a.distance&&"area"===n.type&&n._hitArea&&"area"===a.node.type&&a.node._hitArea)&&(a=e)}return a}function er(e,t,i){if(0===e.length)return null;let r=e[0][0],s=e[e.length-1][0];if(t<r||t>s)return null;let n=cr(e,t);if(n<0||Math.abs(e[n][0]-t)>i)return null;let a=n,o=n;n>0&&e[n][0]>=t?(a=n-1,o=n):n<e.length-1&&(a=n,o=n+1);let[l,c]=e[a],[u,h]=e[o];return u===l?c:c+Math.max(0,Math.min(1,(t-l)/(u-l)))*(h-c)}function tr(e,t,i,r=30){let s=t-e.x,n=i-e.y,a=Math.sqrt(s*s+n*n);return a>Z(e.r,r)?null:{node:e,datum:e.datum,x:e.x,y:e.y,distance:a}}function ir(e,t,i,r=30){let s=t-e.x,n=i-e.y,a=Math.sqrt(s*s+n*n);return a>Z($t(e.size),r)?null:{node:e,datum:e.datum,x:e.x,y:e.y,distance:a}}function rr(e,t,i,r=30){if(null==e.datum)return null;let s=Ft(e.glyph,e.size),n=e.x+s.centerDx,a=e.y+s.centerDy,o=t-n,l=i-a,c=Math.sqrt(o*o+l*l);return c>Z(s.radius,r)?null:{node:e,datum:e.datum,x:n,y:a,distance:c}}function sr(e,t,i,r=30){if(0===e.path.length)return null;let s=cr(e.path,t);if(s<0)return null;let n,[a,o]=e.path[s];if(e.path.length>1){let r=1/0,a=Math.max(0,s-1),o=Math.min(e.path.length-2,s);for(let s=a;s<=o;s++){let[n,a]=e.path[s],[o,l]=e.path[s+1],c=ee(t,i,n,a,o,l);c<r&&(r=c)}n=r}else{let e=t-a,r=i-o;n=Math.sqrt(e*e+r*r)}let l=e.style,c=l.strokeWidth??l.lineWidth??1;return n>Math.max(5,c/2+2,r)?null:{node:e,datum:Array.isArray(e.datum)&&e.datum[s]?e.datum[s]:e.datum,x:a,y:o,distance:n}}function nr(e,t,i){let r=te(t,i,e);return r.hit?{node:e,datum:e.datum,x:r.cx,y:r.cy,distance:0}:null}function ar(e,t,i){let r=te(t,i,e);return r.hit?{node:e,datum:e.datum,x:r.cx,y:r.cy,distance:0}:null}function or(e,t,i){let r=e.bodyWidth/2,s=Math.min(e.openY,e.closeY),n=Math.max(e.openY,e.closeY),a=Math.max(n-s,1);if(t>=e.x-r-3&&t<=e.x+r+3&&i>=e.highY-3&&i<=e.lowY+3){let r=s+a/2,n=t-e.x,o=i-r;return{node:e,datum:e.datum,x:e.x,y:r,distance:Math.sqrt(n*n+o*o)}}return null}function lr(e,t,i,r){if(0===e.topPath.length||e.clipRect&&(t<e.clipRect.x||t>e.clipRect.x+e.clipRect.width||i<e.clipRect.y||i>e.clipRect.y+e.clipRect.height))return null;if(e._hitArea){let r=er(Qi(e.topPath,e.curve),t,1/0),s=er(Qi(e.bottomPath,e.curve),t,1/0);if(null!==r&&null!==s&&i>=Math.min(r,s)&&i<=Math.max(r,s)){let r=cr(e.topPath,t,e.bottomPath);return{node:e,datum:Array.isArray(e.datum)?e.datum[r]??e.datum:e.datum,x:t,y:i,distance:0}}}let s,n=Qi(e.topPath,e.curve),a=cr(n,t),o=cr(e.topPath,t);if(a<0||o<0)return null;if(n.length>1){let e=1/0,r=Math.max(0,a-1),o=Math.min(n.length-2,a);for(let s=r;s<=o;s++){let[r,a]=n[s],[o,l]=n[s+1];e=Math.min(e,ee(t,i,r,a,o,l))}s=e}else{let e=t-n[0][0],r=i-n[0][1];s=Math.sqrt(e*e+r*r)}if(s>r)return null;let[l,c]=e.topPath[o];return{node:e,datum:Array.isArray(e.datum)&&e.datum[o]?e.datum[o]:e.datum,x:l,y:c,distance:s}}function cr(e,t,i){if(0===e.length)return-1;let r=t=>i?(e[t][0]+i[t][0])/2:e[t][0],s=0,n=e.length-1;for(;s<n;){let e=s+n>>1;r(e)<t?s=e+1:n=e}if(s>0){let e=Math.abs(r(s)-t);if(Math.abs(r(s-1)-t)<=e)return s-1}return s}function ur(t,i,r,s){let{scene:n,scales:a}=i;if(0===n.length||!a)return t;let o=e(s.chartType)?.multiHover;if(o)return o(t,i,r,s);let l=function(e,t){let i=1/0,r=-1/0;for(let t of e){let e;if("line"===t.type){let i=t;i.path.length>=2&&(e=Qi(i.path,i.curve))}else if("area"===t.type){let i=t;!1!==i.interactive&&i.topPath.length>=2&&(e=Qi(i.topPath,i.curve))}if(!e||0===e.length)continue;let s=e[0][0],n=e[e.length-1][0];i=Math.min(i,s,n),r=Math.max(r,s,n)}return i>r?t:Math.min(r,Math.max(i,t))}(n,r),c=function(e,t,i=30){let r=[];for(let s of e)if("line"===s.type){let e=s;if(e.path.length<2)continue;let n=er(Qi(e.path,e.curve),t,i);if(null===n)continue;let a=cr(e.path,t),o=Array.isArray(e.datum)&&e.datum[a]?e.datum[a]:e.datum;r.push({node:s,datum:o,x:e.path[a][0],y:n,group:e.group,color:e.style.stroke})}else if("area"===s.type){let e=s;if(!1===e.interactive||e.topPath.length<2)continue;let n=Qi(e.topPath,e.curve),a=Qi(e.bottomPath,e.curve),o=er(n,t,i);if(null===o)continue;let l=er(a,t,i),c=cr(e.topPath,t),u=Array.isArray(e.datum)&&e.datum[c]?e.datum[c]:e.datum,h="string"==typeof e.style.stroke?e.style.stroke:"string"==typeof e.style.fill?e.style.fill:void 0;r.push({node:s,datum:u,x:e.topPath[c][0],y:o,y0:l??void 0,group:e.group,color:h})}return r}(n,l,s.maxXDistance);if(0===c.length)return t;let u,h=a.x?.invert,d="function"==typeof h?h(l):l;if(s.hasHit)u={...t,xValue:d,xPx:l};else{let e={xValue:d};"string"==typeof s.xAccessor&&(e[s.xAccessor]=d),u=xt(e,t.x,t.y,{xValue:d,xPx:l})}let f=a.y.invert;return u.allSeries=c.map(e=>{let t=f?f(e.y):e.y,r=null!=e.y0?f?f(e.y0):e.y0:void 0,n="stackedarea"===s.chartType&&null!=r?t-r:t;return{group:null==e.group||e.group===$i?"":e.group,value:n,valuePx:e.y,color:e.color||s.fallbackColor,datum:_(e.datum,i.resolvedRibbons)}}),u}function hr(e,t,i="x",r="y"){let s="function"==typeof i?i:e=>e[i],n="function"==typeof r?r:e=>e[r],a="function"==typeof t.colorBy?t.colorBy:e=>e[t.colorBy],o=new Map;for(let i of e){let e=a(i)??(i.parentLine&&a(i.parentLine));if(null==e||""===String(e))continue;let r=String(e),n=o.get(r);(!n||("end"===t.position?Number(s(i))>Number(s(n)):Number(s(i))<Number(s(n))))&&o.set(r,i)}return[...o].map(([e,a])=>({type:"text",label:e,["string"==typeof i?i:"x"]:s(a),["string"==typeof r?r:"y"]:n(a),x:s(a),y:n(a),_directLabel:{id:e,position:t.position},color:t.color(e),fontSize:t.fontSize}))}function dr(e=[]){let t=e.filter(e=>e._directLabel);return t.length?` Series endpoints: ${t.map(e=>`${e.label}: x ${String(e.x)}, y ${String(e.y)}`).join("; ")}.`:""}var fr={status:"not-assessed",checked:0,unsupported:0,collisions:0,overflows:0,findings:[]};function pr(e,t,i){if("edges"===e){if(t)return"start";if(i)return"end"}return"middle"}function gr(e,t,i){if("edges"===e){if(t)return"hanging";if(i)return"auto"}return"middle"}function yr(e){if(0===e.length)return{min:null,max:null};let t=1/0,i=-1/0;for(let r of e)r.pixel<t&&(t=r.pixel),r.pixel>i&&(i=r.pixel);return{min:t,max:i}}function mr(e){if(e)return"object"==typeof e?e.strokeDasharray:"dashed"===e?"6,4":"dotted"===e?"2,4":e}function xr(e,t){return e&&"string"!=typeof e?{stroke:e.stroke??t.stroke,strokeWidth:e.strokeWidth??t.strokeWidth,...null!=e.strokeOpacity&&{strokeOpacity:e.strokeOpacity},...e.strokeDasharray&&{strokeDasharray:e.strokeDasharray}}:{...t,..."string"==typeof e&&{strokeDasharray:mr(e)}}}function vr(e,t,i){if("left"===e||"right"===e){let r="left"===e?i:0,s="left"===e?-1:1,n=Math.ceil(t/8),a=`M0,${r}`;for(let e=0;e<n;e++){let i=8*e+4,n=8*(e+1);a+=`L${Math.min(i,t)},${r+4*s}`,a+=`L${Math.min(n,t)},${r}`}return a}let r="bottom"===e?0:t,s="bottom"===e?1:-1,n=Math.ceil(i/8),a=`M${r},0`;for(let e=0;e<n;e++){let t=8*e+4,n=8*(e+1);a+=`L${r+4*s},${Math.min(t,i)}`,a+=`L${r},${Math.min(n,i)}`}return a}function br({axes:e,xTicks:t,yTicks:i,width:r,height:s}){let{xAxis:n,yAxis:a}=Ae(e);return ni("g",{className:"stream-grid",children:[n,a].map((e,n)=>{if(!1===e?.grid)return null;let a=0===n,o=xr(e?.gridStyle,{stroke:"var(--semiotic-grid, #e0e0e0)",strokeWidth:1});return(a?t:i).map((t,i)=>ni("line",{x1:a?t.pixel:0,y1:a?0:t.pixel,x2:a?t.pixel:r,y2:a?s:t.pixel,...o,strokeDasharray:mr(e?.gridStyle)??o.strokeDasharray},`${n}-${i}`))})})}var kr=null,Ar=null;function wr(e){kr=e}function Sr(e,t,i){let r="function"==typeof t?t:e=>e[t||"x"],s="function"==typeof i?i:e=>e[i||"y"],n=[],a=[];for(let t of e){let e=r(t),i=s(t);"number"==typeof e&&isFinite(e)&&n.push(e),"number"==typeof i&&isFinite(i)&&a.push(i)}return{xValues:n,yValues:a}}function Cr(e){let[t,i]=qt.useState(()=>kr);return qt.useEffect(()=>{if(t)return;let e=!1;return(kr?Promise.resolve(kr):(Ar||(Ar=import("./c-XUJHKJQ6.min.js").then(e=>kr=e.MarginalGraphics).catch(e=>{throw Ar=null,e})),Ar)).then(t=>{e||i(()=>t)}),()=>{e=!0}},[t]),t?ni(t,{...e}):null}var Mr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Pr(e){let t=new Date(e instanceof Date?e.valueOf():e);return`${Mr[t.getUTCMonth()]} ${t.getUTCDate()}`}function Rr(e){let t=Math.abs(e[1]-e[0]);return t<864e5?e=>{let i=new Date(e instanceof Date?e.valueOf():e),r=`${String(i.getUTCHours()).padStart(2,"0")}:${String(i.getUTCMinutes()).padStart(2,"0")}`;return t<3e5&&(r+=`:${String(i.getUTCSeconds()).padStart(2,"0")}`),t<1e4&&(r+=`.${String(i.getUTCMilliseconds()).padStart(3,"0")}`),r}:t<3156e7?Pr:t<1578e8?e=>{let t=new Date(e instanceof Date?e.valueOf():e);return`${Mr[t.getUTCMonth()]} ${t.getUTCFullYear()}`}:e=>String(new Date(e instanceof Date?e.valueOf():e).getUTCFullYear())}function Tr(e){return e.dataValue??e.value}function Dr(e){return"string"==typeof e||"number"==typeof e?6.5*String(e).length:60}function Lr(e){let{scale:t,axis:i,size:r,horizontal:s=!1,axisExtent:n}=e,a=i?.extent??n,o=t.domain(),l=function(e){return e?.ticks??e?.tickCount??5}(i),c=Math.max(2,Math.floor(r/(s?70:30))),u="exact"===a?Math.max(2,l):Math.min(l,c),h=Wt(t),d=h&&i?.tickValues?i.tickValues.flatMap(e=>{let t=Vt(h,e);return null==t?[]:[{requested:e,index:t}]}):null,f=d?d.map(e=>e.requested):h?0===u?[]:h.map(e=>e.value):(i?.tickValues??m(t,u,a)).filter(e=>"string"!=typeof e),p=!d&&h?new Map(h.map(e=>[e.value,e.label])):null,g=e=>p?.get(Number(e))??e,y=f.map(e=>{let t=g(e);return t instanceof Date?t.valueOf():"number"==typeof t?t:Number(t)}),x=i?.tickFormat||e.format||(h?function(e){let t=e.map(e=>e.label);if(t.length>0&&t.every(e=>e instanceof Date)){let e=1/0,i=-1/0;for(let r=0;r<t.length;r++){let s=t[r].getTime();s<e&&(e=s),s>i&&(i=s)}let r=Rr([e,i]);return e=>e instanceof Date||"number"==typeof e&&Number.isFinite(e)?r(e):String(e)}if(t.every(e=>"number"==typeof e&&Number.isFinite(e))){let e=we(t);return t=>e("number"==typeof t?t:Number(t))}return e=>String(e)}(h):o[0]instanceof Date||f[0]instanceof Date?Rr([o[0].valueOf(),o[o.length-1].valueOf()]):we(y)),v=(e,t)=>{let i=g(e);return s?x(i,t,y):x(i)},b=f.flatMap((e,i)=>{let r;if(d)r=t(d[i].index);else{if("string"==typeof e)return[];r=t(e)}let s={value:e,pixel:r,label:v(e,i)};return h&&(s.dataValue=d?d[i].requested:h[i].label),[s]}),k=!d&&h?b.filter(e=>e.pixel>=0&&e.pixel<=r):b,A=22;if(s){let e=k.reduce((e,t)=>Math.max(e,Dr(t.label)),0);A=i?.autoRotate?Math.max(20,Math.min(e+8,55)):Math.max(55,e+8)}let w=s&&(i?.tickFormat||e.format)?e=>{let t=e.map(e=>{let t=g(e.value);return t instanceof Date?t.valueOf():Number(t)});return e.map((e,i)=>({...e,label:x(g(e.value),i,t)}))}:void 0,S=function(e,t){if(e.length<=2)return e;let i=[e[0]];for(let r=1;r<e.length-1;r++)Math.abs(e[r].pixel-i[i.length-1].pixel)>=t&&i.push(e[r]);let r=e[e.length-1];return Math.abs(r.pixel-i[i.length-1].pixel)>=t?i.push(r):i[i.length-1]=r,i}(k,A);if(w&&(S=w(S)),S.length>1&&(S=S.filter((e,t)=>0===t||!function(e,t){return!("string"!=typeof e&&"number"!=typeof e||"string"!=typeof t&&"number"!=typeof t||String(e)!==String(t))}(e.label,S[t-1].label))),i?.includeMax&&!h&&S.length>0&&"exact"!==a&&!i.tickValues){let e=o[o.length-1];if(null!=e){let i=t(e),r=Math.abs(i-S[S.length-1].pixel);if(r>1){let t=v(e,S.length);r<A&&S.length>1&&(S=S.slice(0,-1)),S=[...S,{value:e,pixel:i,label:t}]}}}return w?w(S):S}function Er(e){let{width:t,height:i,totalWidth:r,totalHeight:s,margin:n,scales:a,showAxes:o,axes:l,showGrid:c,xFormat:u,yFormat:h,axisExtent:d}=e,f=ti(()=>{if(!a||!c)return[];let e=l?.find(e=>"bottom"===e.orient)??l?.find(e=>"top"===e.orient);return Lr({scale:a.x,axis:e,size:t,horizontal:!0,format:u,axisExtent:d})},[a,l,u,t,d,c]),p=ti(()=>{if(!a||!c)return[];let e=l?.find(e=>"left"===e.orient)??l?.find(e=>"right"===e.orient);return Lr({scale:a.y,axis:e,size:i,format:h,axisExtent:d})},[a,l,h,i,d,c]),g=c&&a,y=o&&a;if(!g&&!y)return null;let{xAxis:m,yAxis:x,xOrient:v,yOrient:b}=Ae(l),k="top"===v?0:i,A="right"===b?t:0,w=y&&!1!==m?.visible&&(!m||!1!==m.baseline),S=y&&!1!==x?.visible&&(!x||!1!==x.baseline),C=m?.jaggedBase||!1,M=x?.jaggedBase||!1,P=xr(m?.axisStyle,{stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),R=xr(x?.axisStyle,{stroke:"var(--semiotic-border, #ccc)",strokeWidth:1});return ni("svg",{role:"presentation",width:r,height:s,style:{position:"absolute",top:0,left:0,pointerEvents:"none"},children:ai("g",{transform:`translate(${n.left},${n.top})`,children:[g&&ni(br,{axes:l,xTicks:f,yTicks:p,width:t,height:i}),w&&!C&&ni("line",{x1:0,y1:k,x2:t,y2:k,...P}),y&&!1!==m?.visible&&C&&ni("path",{d:vr(v,t,i),fill:"none",...P}),S&&!M&&ni("line",{x1:A,y1:0,x2:A,y2:i,...R}),y&&!1!==x?.visible&&M&&ni("path",{d:vr(b,t,i),fill:"none",...R})]})})}function $r(e){let{width:t,height:i,totalWidth:r,totalHeight:s,margin:n,scales:a,showAxes:o,axes:l,xLabel:c,yLabel:p,yLabelRight:g,xFormat:y,yFormat:m,axisExtent:x,showGrid:v,title:b,description:k,idPrefix:A,decorative:w=!1,directLabelDescriptionId:S,legend:C,legendHoverBehavior:M,legendClickBehavior:P,legendHighlightedCategory:R,legendIsolatedCategories:T,legendPosition:D="right",legendLayout:L,foregroundGraphics:E,marginalGraphics:$,xValues:F,yValues:N,annotations:_,onAnnotationActivate:B,onObservation:I,chartId:z,chartType:O,autoPlaceAnnotations:Y,svgAnnotationRules:W,annotationFrame:V,xAccessor:j,yAccessor:X,annotationData:H,pointNodes:G,curve:U,underlayRendered:q,canvasObscuresUnderlay:J=!0,linkedCrosshairName:K,linkedCrosshairSourceId:Q,children:Z}=e,ee=Se({onAnnotationActivate:B,onObservation:I,chartId:z,chartType:O}),te=Ce({showAxes:o,xLabel:c,yLabel:p,yLabelRight:g,axes:l}),oe=Me(L,te.leftAxis),le=Me(L,te.rightAxis),ce=C&&"left"===D&&oe>0?oe:n.left,ue=C&&"right"===D&&le>0?le:n.right,he=ti(()=>{if(!o&&!v||!a)return[];let e=l?.find(e=>"bottom"===e.orient)??l?.find(e=>"top"===e.orient);return Lr({scale:a.x,axis:e,size:t,horizontal:!0,format:y,axisExtent:x})},[o,v,a,l,y,t,x]),de=ti(()=>!(!(l?.find(e=>"bottom"===e.orient)??l?.find(e=>"top"===e.orient))?.autoRotate||!function(e){for(let t=1;t<e.length;t++){let i=e[t-1],r=e[t];if(Math.abs(r.pixel-i.pixel)<(Dr(i.label)+Dr(r.label))/2+8)return!0}return!1}(he)),[l,he]),fe=ti(()=>{if(!o&&!v||!a)return[];let e=l?.find(e=>"left"===e.orient)??l?.find(e=>"right"===e.orient);return Lr({scale:a.y,axis:e,size:i,format:m,axisExtent:x})},[o,v,a,l,m,i,x]),pe=ti(()=>{if(!o||!a||!l?.some(e=>"left"===e.orient))return[];let e=l?.find(e=>"right"===e.orient);return e?Lr({scale:a.y,axis:e,size:i,format:m,axisExtent:x}):[]},[o,a,l,m,i,x]),ge=Qt(new Map),ye=Qt(_?.length??0),me=_?.length??0;ye.current!==me&&(ye.current=me,ge.current=new Map);let xe=Nt(e=>e.theme),ve=!!_?.some(e=>e._directLabel||e._directLabelRequest),be=function(e){let[t,i]=Zt();return ei(()=>{if(!e)return;let t=!0,r=()=>{};return import("./c-3J55HZFJ.min.js").then(({browserLabelMeasurer:e})=>{if(!t)return;let s=()=>i(()=>e());s(),r=Ct(s)}),()=>{t=!1,r()}},[e]),e?t:void 0}(ve),ke=ti(()=>ve?function(e,t=[],i,r){return e.flatMap(e=>e._directLabelRequest?hr(t,e._directLabelRequest,i,r):[e])}(_||[],H,j,X):_,[ve,_,H,j,X]),we=ti(()=>function(e,t){let i=e.filter(e=>e._directLabel);if(!i.length)return{node:null};let r=i[0]._directLabel.position,s=t.measure??d,n=i.map(e=>({family:t.fontFamily||"sans-serif",version:t.fontVersion??0,weight:400,size:e.fontSize||11})),a=i.map((e,i)=>{let r=(e,t)=>{if(null==e||!t)return NaN;try{return t(Number(e))}catch{return NaN}};return{id:String(e._directLabel.id),anchor:{x:r(e.x,t.scales?.x),y:r(e.y,t.scales?.y)},measurement:s(String(e.label),n[i])}}),o=Math.max(0,(t.margin?.["end"===r?"right":"left"]??0)-10),l=u(a,{x:"end"===r?t.width+6:-o-6,y:0,width:o,height:t.height},r),c=l.dispositions.map((e,r)=>{if("omitted"===e.status)return null;let s=e.box,o=e.connector,c=i[r],u=ai("g",{"data-direct-label-id":e.id,children:[o&&ni("line",{...o,stroke:c.color,strokeWidth:.75}),ni("text",{x:s.x+(a[r].measurement.left??0),y:s.y+a[r].measurement.ascent,fontFamily:n[r].family,fontWeight:n[r].weight,fontSize:n[r].size,fill:c.color,textAnchor:"start",children:c.label})]},e.id),d=t.renderLabel?t.renderLabel({...c,dx:s.x+(a[r].measurement.left??0)-a[r].anchor.x,dy:s.y+a[r].measurement.ascent-a[r].anchor.y,fontFamily:n[r].family},r,u):u;if(!d){let t=l.evidence;t.rendered--,t.omitted++,t.omittedIds.length<20&&t.omittedIds.push(e.id),Math.abs(e.offset.y)>.01&&t.displaced--,t.displacedIds=t.displacedIds.filter(t=>t!==e.id);for(let i of["RENDER_FAILURE","LABEL_OMITTED"]){let r=t.findings.find(e=>e.code===i);r||(r={code:i,count:0,labelIds:[],remedy:h[i]},t.findings.push(r)),r.count++,r.labelIds.length<20&&r.labelIds.push(e.id)}}if(d!==u&&(l.evidence.status="incomplete",d)){let t=l.evidence.findings.find(e=>"UNSUPPORTED_GEOMETRY"===e.code);t||(t={code:"UNSUPPORTED_GEOMETRY",count:0,labelIds:[],remedy:h.UNSUPPORTED_GEOMETRY},l.evidence.findings.push(t)),t.count++,t.labelIds.length<20&&t.labelIds.push(e.id)}return d?ni(qt.Fragment,{children:d},e.id):null}),f=ni("g",{role:"list","aria-label":"Series endpoints","data-direct-label-fallback":"accessible-series-list",children:i.map((e,t)=>ni("g",{role:"listitem","aria-label":`${e.label}: x ${String(e.x)}, y ${String(e.y)}`,children:ni("title",{children:`${e.label}: x ${String(e.x)}, y ${String(e.y)}`})},a[t].id))});return{evidence:l.evidence,node:ai("g",{className:"semiotic-direct-labels","data-label-layout":JSON.stringify(l.evidence),children:[c,f]},"direct-labels")}}(ke||[],{width:t,height:i,margin:n,scales:a,measure:be,fontFamily:xe.typography.fontFamily,...W?{renderLabel:(e,r,s)=>W(e,r,{width:t,height:i,scales:a?{...a,time:a.x,value:a.y}:null,frameType:"xy",xAccessor:j,yAccessor:X,data:H})??s}:{}}),[ke,t,i,n,a,be,xe,W,j,X,H]),Fe=ti(()=>{if(!_||0===_.length)return null;let e=ie(_).filter(e=>!e._directLabel&&!e._directLabelRequest),r=Pe("xy",ee,!0),s={scales:a?{x:a.x,y:a.y,time:a.x,value:a.y}:null,timeAxis:"x",xAccessor:j,yAccessor:X,width:t,height:i,data:H,frameType:"xy",pointNodes:G,curve:U,stickyPositionCache:ge.current},n=Y?Re({annotations:e,context:s,..."object"==typeof Y?Y:{}}):e;return Te(n,r,W,s)},[_,Y,W,t,i,j,X,H,a,G,U,ee]),Ne=De(K),{unlockCrosshair:_e,handlesEscape:Be}=Le();ei(()=>{if(Be||!Ne?.locked||!K)return;let e=e=>{"Escape"===e.key&&_e(K)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[Ne?.locked,K,_e,Be]);let Ie=we.node||o||b||k||C||E||$||Fe&&Fe.length>0||v||Z||Ne,ze=ti(()=>({width:t,height:i,xTicks:he,yTicks:fe,yTicksRight:pe,labelMeasurer:be,axes:l}),[t,i,he,fe,pe,be,l]),Oe=function(e,t){let i=Qt(null),[r,s]=Zt(fr);return ei(()=>{let t=i.current;if(!e||!t)return;let r=!0,n=()=>{};return import("./c-Q54EFOEN.min.js").then(({readAxisLabelAssessment:e})=>{if(!r)return;let i=()=>{let i=e(t);s(e=>JSON.stringify(e)===JSON.stringify(i)?e:i)};i(),n=Ct(i)}),()=>{r=!1,n()}},[e,t]),{ref:i,assessment:e?r:fr}}(ve&&!!be,ze),Ye=ii(),{titleId:We,descId:Ve,labelledBy:je}=re(A||z||Ye);return Ie?ai("svg",{"data-semiotic-overlay":"",ref:Oe.ref,"data-axis-label-layout":ve?JSON.stringify(Oe.assessment):void 0,role:w?"presentation":"img","aria-labelledby":w?void 0:je,width:r,height:s,overflow:"visible",style:{position:"absolute",top:0,left:0,pointerEvents:"none",overflow:"visible"},children:[w&&S&&ni("desc",{id:S,children:dr(ke)}),!w&&ai(oi,{children:[ni("title",{id:We,children:se(b,"XY Chart")}),ai("desc",{id:Ve,children:[ne(b,k,{familyPhrase:"XY data visualization",fallback:"XY data visualization"}),dr(ke)]})]}),ai("g",{transform:`translate(${n.left},${n.top})`,children:[v&&a&&(!q||J)&&ni(br,{axes:l,xTicks:he,yTicks:fe,width:t,height:i}),o&&a&&(()=>{let{xAxis:e,yAxis:r,xOrient:s,yOrient:n,leftAxis:a}=Ae(l),o="top"===s?0:i,u="right"===n?t:0,h="top"===s?-1:1,d="right"===n?1:-1,f=!e||!1!==e.baseline,y=!r||!1!==r.baseline,m=e?.jaggedBase||!1,x=r?.jaggedBase||!1,v=e?.landmarkTicks,b=r?.landmarkTicks,k=xr(e?.axisStyle,{stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),A=xr(r?.axisStyle,{stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),w="var(--semiotic-text-secondary, var(--semiotic-text, #666))",S="var(--semiotic-text, #333)",C=de,M={fontSize:"var(--semiotic-tick-font-size, 12px)"},P={fontSize:"calc(var(--semiotic-tick-font-size, 12px) + 1px)"},R={fontSize:"var(--semiotic-axis-label-font-size, 12px)"},T=e?.tickAnchor,D=r?.tickAnchor,L=e?.label??c,E=r?.label??("right"===n?g??p:p),$="right"===n?t+ue-15:15-ce,F=yr(he),N=yr(fe);return ai("g",{className:"stream-axes",style:{fontFamily:"var(--semiotic-font-family, sans-serif)"},children:[!1!==e?.visible&&ai("g",{className:`semiotic-axis semiotic-axis-${s}`,"data-orient":s,children:[(!q||J)&&f&&!m&&ni("line",{x1:0,y1:o,x2:t,y2:o,...k}),(!q||J)&&m&&ni("path",{d:vr(s,t,i),fill:"none",...k}),he.map((e,t)=>{let i=!!v&&("function"==typeof v?v(Tr(e),t):ae(Tr(e),t>0?Tr(he[t-1]):void 0));return ai("g",{transform:`translate(${e.pixel},${o})`,children:[ni("line",{y2:5*h,...k}),"string"==typeof e.label||"number"==typeof e.label?ni("text",{y:h*(C?12:18),textAnchor:C?"end":pr(T,e.pixel===F.min,e.pixel===F.max),fontWeight:i?600:400,fill:w,fontSize:i?13:12,className:"semiotic-axis-tick",style:{userSelect:"none",...i?P:M},transform:C?"top"===s?"rotate(45)":"rotate(-45)":void 0,children:e.label}):ni("foreignObject",{x:-30,y:"top"===s?-30:6,width:60,height:24,style:{overflow:"visible"},children:ni("div",{style:{textAlign:"center",userSelect:"none",...M},children:e.label})})]},`xtick-${t}`)}),L&&ni("text",{x:t/2,y:"top"===s?-(C?58:40):i+(C?58:40),textAnchor:"middle",fill:S,fontSize:12,className:"semiotic-axis-label",style:{userSelect:"none",...R},children:L})]}),!1!==r?.visible&&ai("g",{className:`semiotic-axis semiotic-axis-${n}`,"data-orient":n,children:[(!q||J)&&y&&!x&&ni("line",{x1:u,y1:0,x2:u,y2:i,...A}),(!q||J)&&x&&ni("path",{d:vr(n,t,i),fill:"none",...A}),fe.map((e,t)=>{let i=!!b&&("function"==typeof b?b(Tr(e),t):ae(Tr(e),t>0?Tr(fe[t-1]):void 0));return ai("g",{transform:`translate(${u},${e.pixel})`,children:[ni("line",{x2:5*d,...A}),"string"==typeof e.label||"number"==typeof e.label?ni("text",{x:8*d,textAnchor:"right"===n?"start":"end",dominantBaseline:gr(D,e.pixel===N.min,e.pixel===N.max),fontWeight:i?600:400,fill:w,fontSize:i?13:12,className:"semiotic-axis-tick",style:{userSelect:"none",...i?P:M},children:e.label}):ni("foreignObject",{x:"right"===n?8:-68,y:-12,width:60,height:24,style:{overflow:"visible"},children:ni("div",{style:{textAlign:"right"===n?"left":"right",userSelect:"none",...M},children:e.label})})]},`ytick-${t}`)}),E&&ni("text",{x:$,y:i/2,textAnchor:"middle",fill:S,transform:`rotate(${"right"===n?90:-90}, ${$}, ${i/2})`,fontSize:12,className:"semiotic-axis-label",style:{userSelect:"none",...R},children:E})]}),(()=>{let e=l?.find(e=>"right"===e.orient);if(!a||!e||!1===e.visible||0===pe.length)return null;let r=!1!==e.baseline,s=e.landmarkTicks,n=e.label||g,o=e.tickAnchor,c=xr(e.axisStyle,{stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),u=yr(pe);return ai("g",{className:"semiotic-axis semiotic-axis-right","data-orient":"right",children:[r&&!e.jaggedBase&&ni("line",{x1:t,y1:0,x2:t,y2:i,...c}),e.jaggedBase&&ni("path",{d:vr("right",t,i),fill:"none",...c}),pe.map((e,i)=>{let r=!!s&&("function"==typeof s?s(Tr(e),i):ae(Tr(e),i>0?Tr(pe[i-1]):void 0));return ai("g",{transform:`translate(${t},${e.pixel})`,children:[ni("line",{x2:5,...c}),"string"==typeof e.label||"number"==typeof e.label?ni("text",{x:8,textAnchor:"start",dominantBaseline:gr(o,e.pixel===u.min,e.pixel===u.max),fontWeight:r?600:400,fill:w,fontSize:r?13:12,className:"semiotic-axis-tick",style:{userSelect:"none",...r?P:M},children:e.label}):ni("foreignObject",{x:8,y:-12,width:60,height:24,style:{overflow:"visible"},children:ni("div",{style:{textAlign:"left",userSelect:"none",...M},children:e.label})})]},`ytick-r-${i}`)}),n&&ni("text",{x:t+ue-15,y:i/2,textAnchor:"middle",fill:S,transform:`rotate(90, ${t+ue-15}, ${i/2})`,fontSize:12,className:"semiotic-axis-label",style:{userSelect:"none",...R},children:n})]})})()]})})(),Fe,we.node,$&&a&&F&&N&&ai(oi,{children:[$.top&&ni("g",{transform:"translate(0, 0)",children:ni(Cr,{orient:"top",config:f($.top),values:F,scale:jt(a.x),size:n.top,length:t})}),$.bottom&&ni("g",{transform:`translate(0, ${i})`,children:ni(Cr,{orient:"bottom",config:f($.bottom),values:F,scale:jt(a.x),size:n.bottom,length:t})}),$.left&&ni("g",{transform:"translate(0, 0)",children:ni(Cr,{orient:"left",config:f($.left),values:N,scale:jt(a.y),size:n.left,length:i})}),$.right&&ni("g",{transform:`translate(${t}, 0)`,children:ni(Cr,{orient:"right",config:f($.right),values:N,scale:jt(a.y),size:n.right,length:i})})]}),E,Ne&&(Ne.locked||Ne.sourceId!==Q)&&a?.x&&(()=>{let e=Xt(a.x,Ne.xValue);if(null==e||e<0||e>t)return null;let r=Ne.locked,s={x1:e,y1:0,x2:e,y2:i,strokeDasharray:r?"6,3":"4,4"};return ai("g",{pointerEvents:"none","aria-hidden":"true",children:[ni("line",{...s,stroke:"var(--semiotic-surface, #fff)",strokeWidth:r?3.5:3}),ni("line",{...s,"data-semiotic-crosshair":r?"locked":"hover",stroke:r?"var(--semiotic-text, #333)":"var(--semiotic-text-secondary, #666)",strokeWidth:r?1.5:1})]})})(),Z]}),ni(Ee,{title:b,totalWidth:r,marginTop:n.top}),$e({legend:C,totalWidth:r,totalHeight:s,margin:n,legendPosition:D,title:b,legendLayout:L,axisChrome:te,legendHoverBehavior:M,legendClickBehavior:P,legendHighlightedCategory:R,legendIsolatedCategories:T})]}):null}function Fr(e,t,i,r){if(!e||t.length<2)return null;let s=Fe(e.stops,r);return s?ni("linearGradient",{id:i,gradientUnits:"userSpaceOnUse",x1:t[0][0],y1:0,x2:t[t.length-1][0],y2:0,children:s}):null}var Nr="var(--semiotic-primary, #6366f1)";function _r(e){return"under"===e.layer&&("band"===e.type||"x-band"===e.type)}function Br(e,t,i,r){let s="band"===e.type,n=s?t.y:t.x;if("function"!=typeof n)return null;let a=s?e.y0:e.x0,o=s?e.y1:e.x1,l=Ht(n,a,0),c=Ht(n,o,1);if(null!=a&&null==l||null!=o&&null==c)return null;let u=l??0,h=c??(s?r:i);if(!Number.isFinite(u)||!Number.isFinite(h))return null;let d=s?r:i,f=Math.min(d,Math.max(0,Math.min(u,h))),p=Math.max(0,Math.min(d,Math.max(u,h))-f);return s?{x:0,y:f,width:i,height:p}:{x:f,y:0,width:p,height:r}}function Ir(e){return"band"===e.type?"vertical":"horizontal"}function zr(e){return(t,i,r,s)=>{let n=t.globalAlpha;for(let i of e){let e=Br(i,r,s.width,s.height);if(!e)continue;let a=i.fill??i.color,o="string"==typeof a&&a?a:Nr,l=Tt(i.gradient,Ir(i),o),c="horizontal"===l?.direction;t.globalAlpha=n*(i.opacity??1)*(i.fillOpacity??.1),t.fillStyle=l&&Dt(t,l,o,e.x,e.y,c?e.x+e.width:e.x,c?e.y:e.y+e.height)||Lt(t,a,Nr),t.fillRect(e.x,e.y,e.width,e.height)}t.globalAlpha=n}}function Or(e,t="under-band",i=Nr){return(r,s,n)=>e.map((e,r)=>{let a=Br(e,s,n.width,n.height);if(!a)return null;let o=Ve(e,`${t}-${r}`,Ir(e),i);return ai("g",{opacity:e.opacity,children:[o.def&&ni("defs",{children:o.def}),ni("rect",{...a,fill:o.fill,fillOpacity:e.fillOpacity??.1})]},`${t}-${r}`)})}var Yr={axisStroke:"#ccc",tickText:"#666",crosshair:"rgba(0, 0, 0, 0.25)",hoverFill:"rgba(255, 255, 255, 0.3)",hoverStroke:"rgba(0, 0, 0, 0.4)",pointRing:"white",primary:"#007bff",background:""};function Wr(e,t){let i=e.trim();if(/^#[0-9a-f]{3}$/i.test(i)){let e=i[1],r=i[2],s=i[3];return`#${e}${e}${r}${r}${s}${s}${t}`}if(/^#[0-9a-f]{6}$/i.test(i))return`${i}${t}`;let r=i.match(/^rgb\s*\(\s*([^)]+?)\s*\)$/i);if(r){let e=parseInt(t,16)/255;return`rgba(${r[1]}, ${e.toFixed(3)})`}return i}function Vr(e){if(!e)return;let t=[];for(let i of e)if("point"===i.type)t.push(i);else if("symbol"===i.type)t.push({pointId:i.pointId,x:i.x,y:i.y,r:$t(i.size)});else if("glyph"===i.type){let e=Ft(i.glyph,i.size);t.push({pointId:i.pointId,x:i.x+e.centerDx,y:i.y+e.centerDy,r:e.radius})}return t}function jr(e){return null==e?"":"number"==typeof e?Number.isInteger(e)?String(e):e.toFixed(2):e instanceof Date?e.toLocaleString():String(e)}var Xr=/*#__PURE__*/_t(function({hover:e}){let t=e.data??{},i=t.__aggregateValue??t.y??t.value,r=t.x??t.time;if(void 0===i&&void 0===r){let e=Xe(t);if(null!=e.title||e.entries.length>0)return ai("div",{className:"semiotic-tooltip",style:Bt,children:[null!=e.title&&ni("div",{style:{fontWeight:600,marginBottom:e.entries.length?2:0},children:String(e.title)}),e.entries.map(e=>ai("div",{style:{opacity:.7,fontSize:11},children:[e.key,":"," ",ni("span",{style:{fontWeight:600},children:jr(e.value)})]},e.key))]})}return ai("div",{className:"semiotic-tooltip",style:Bt,children:[ni("div",{style:{fontWeight:600,marginBottom:2},children:jr(i)}),ni("div",{style:{opacity:.7,fontSize:11},children:jr(r)})]})});function Hr({enabled:e,hoverPoint:t,tooltipContent:i,...r}){if(!e||!t)return null;let s=i?i(t):ni(Xr,{hover:t});return It(s)?ni(He,{...r,contentOwnsChrome:zt(i),x:t.x,y:t.y,className:"stream-frame-tooltip",children:s}):null}function Gr(e,t){if(!t||0===e.length||!e.some(e=>null!=e&&"object"==typeof e&&Array.isArray(e[t])))return e;let i=[];for(let r of e){if(null==r||"object"!=typeof r)continue;let e=r[t];if(!Array.isArray(e))continue;let s=r.label??r.id??r.key;for(let t of e)null==t||"object"!=typeof t||i.push(null==s?t:{...t,_lineGroup:s})}return i}var Ur=Y,qr=Yr;function Jr(e){if(e)return"x"===e.dimension?"pan-y":"y"===e.dimension?"pan-x":"none"}var Kr=/*#__PURE__*/Ue(/*#__PURE__*/ri(/*#__PURE__*/si(function(t,i){let{chartType:r,runtimeMode:s,data:n,chunkThreshold:u,chunkSize:h,xAccessor:d,yAccessor:f,accessorRevision:p,colorAccessor:g,sizeAccessor:y,symbolAccessor:m,symbolMap:w,groupAccessor:M,lineDataAccessor:P,curve:R,normalize:T,baseline:D,stackOrder:L,binSize:E,binAlign:I,valueAccessor:z,arrowOfTime:Y="right",windowMode:W,capacityMode:V,windowSize:j,capacity:X,timeAccessor:H,xExtent:G,yExtent:U,invertY:q,extentPadding:J=.1,scalePadding:K,sizeRange:Q,size:Z=[500,300],responsiveWidth:ee,responsiveHeight:te,margin:re,className:se,background:ne,maxDevicePixelRatio:ae,renderMode:ke,lineStyle:Ae,pointStyle:we,areaStyle:Se,barStyle:Ce,waterfallStyle:Me,swarmStyle:Pe,barColors:Re,colorScheme:Te,boundsAccessor:De,boundsStyle:Le,y0Accessor:Ee,band:$e,gradientFill:Ve,lineGradient:Xe,semanticLineStops:He,areaGroups:Ue,openAccessor:yt,highAccessor:mt,lowAccessor:kt,closeAccessor:At,candlestickStyle:wt,showAxes:Tt=!0,axes:Dt,xLabel:Lt,yLabel:$t,yLabelRight:Ft,xFormat:Nt,yFormat:_t,axisExtent:Bt,tickFormatTime:It,tickFormatValue:zt,hoverAnnotation:Yt,tooltipContent:Vt,customHoverBehavior:jt,customClickBehavior:Xt,onObservation:Ht,annotationObservationCallback:Ut,chartId:ri,enableHover:si,hoverRadius:oi=30,tooltipMode:li,annotations:ci,onAnnotationActivate:ui,autoPlaceAnnotations:hi,svgAnnotationRules:di,showGrid:fi,legend:yi,legendHoverBehavior:mi,legendClickBehavior:vi,legendHighlightedCategory:bi,legendIsolatedCategories:wi,legendPosition:Si,legendLayout:Ci,legendCategoryAccessor:Mi,onCategoriesChange:Pi,backgroundGraphics:Ri,foregroundGraphics:Ti,interactiveGraphics:Di,interactiveGraphicsLabel:Li,canvasPreRenderers:Ei,svgPreRenderers:$i,title:Fi,categoryAccessor:Ni,brush:_i,onBrush:Bi,decay:Ii,pulse:zi,transition:Oi,animate:Yi,staleness:Wi,frameScheduler:Vi,clock:ji,random:Xi,seed:Hi,paused:Gi=!1,suspendWhenHidden:Ui=!0,heatmapAggregation:qi,heatmapXBins:Ki,heatmapYBins:Qi,showValues:er,heatmapValueFormat:tr,heatmapColorScale:ir,onColorDomainChange:rr,marginalGraphics:sr,pointIdAccessor:nr,xScaleType:ar,yScaleType:or,accessibleTable:lr=!0,description:cr,summary:hr,linkedCrosshairName:dr,linkedCrosshairSourceId:fr,customLayout:pr,onLayoutError:gr,layoutConfig:yr,layoutSelection:mr}=t,{canvasPreRenderers:xr,svgPreRenderers:vr}=function(e,t,i){let r=`under-band-${qt.useId().replace(/:/g,"")}`,s=je(qt.useMemo(()=>Object.assign({},ie(e??[]).filter(_r)),[e])),n=qt.useMemo(()=>Object.values(s),[s]);return qt.useMemo(()=>0===n.length?{canvasPreRenderers:t,svgPreRenderers:i}:{canvasPreRenderers:[zr(n),...t??[]],svgPreRenderers:[Or(n,r),...i??[]]},[n,t,i,r])}(ci,Ei,$i),br=W??V??"sliding",kr=j??X??200,{customHoverBehavior:Ar,customClickBehavior:wr,hasClickBehavior:Cr}=$({customHoverBehavior:jt,customClickBehavior:Xt,onObservation:Ht,chartId:ri,chartType:"StreamXYFrame"}),Mr=ii().replace(/:/g,""),Pr=Qt(!1),Tr=Qt({w:-1,h:-1}),Dr=Qt(!1),Lr=qe({sizeProp:Z,responsiveWidth:ee,responsiveHeight:te,userMargin:re,marginDefault:Ur,title:Fi,legend:yi,legendPosition:Si,...x(t,yi),animate:Yi,transitionProp:Oi,frameScheduler:Vi,clock:ji,random:Xi,seed:Hi,paused:Gi,suspendWhenHidden:Ui,themeDirtyRef:Pr}),Nr=Je(),Br=Ke(),{reducedMotionRef:Ir,responsiveRef:jr,size:Xr,currentTheme:Kr,transition:Qr,introEnabled:Zr,tableId:es,rafRef:ts,renderFnRef:is,scheduleRender:rs,frameRuntime:ss}=Lr;ei(()=>Ct(()=>{Pr.current=!0,rs()}),[rs]);let ns=Lr.margin;if(sr){let e={...Lr.margin};sr.top&&e.top<60&&(e.top=60),sr.bottom&&e.bottom<60&&(e.bottom=60),sr.left&&e.left<60&&(e.left=60),sr.right&&e.right<60&&(e.right=60),ns=e}let as=Math.max(1,Xr[0]-ns.left-ns.right),os=Math.max(1,Xr[1]-ns.top-ns.bottom),ls=(Dt?.find(e=>"left"===e.orient)??Dt?.find(e=>"right"===e.orient))?.extent??Bt,cs=ti(()=>Qe(n),[n]),us=Yt??si,[hs,ds]=Zt(0),fs=Qt(0),[ps,gs]=Zt(null),ys=oe(Ti,Xr,ns,ps),ms=oe(Ri,Xr,ns,ps),xs=Qt(null),vs=Qt(!1),bs=Qt(null),ks=Qt(void 0),[As,ws]=Zt(null),Ss=Qt(qr.primary),Cs=Qt(function(){let e=-1,t=Yr;return{resolve(i){if(!i)return Yr;let r=Et();return r===e||(t=function(e){if(!e)return Yr;let t=getComputedStyle(e),i=t.getPropertyValue("--semiotic-border").trim(),r=t.getPropertyValue("--semiotic-text-secondary").trim(),s=t.getPropertyValue("--semiotic-bg").trim(),n=t.getPropertyValue("--semiotic-primary").trim(),a=r||t.getPropertyValue("--text-secondary").trim(),o=t.getPropertyValue("--text-primary").trim(),l=i||t.getPropertyValue("--surface-3").trim(),c=s||t.getPropertyValue("--surface-0").trim();return a||o||i||n?{axisStroke:l||Yr.axisStroke,tickText:a||Yr.tickText,crosshair:a?Wr(a,"66"):Yr.crosshair,hoverFill:c?Wr(c,"4D"):Yr.hoverFill,hoverStroke:a?Wr(a,"99"):Yr.hoverStroke,pointRing:c||Yr.pointRing,primary:n||Yr.primary,background:c||Yr.background}:Yr}(i),e=r),t},invalidate(){e=-1}}}()),Ms=Qt(!1),Ps=Ze("StreamXYFrame"),[Rs,Ts]=Zt(!1),Ds="streaming"===s||["bar","swarm","waterfall"].includes(r),Ls=!!Ar,Es=ti(()=>({chartType:r,runtimeMode:Ds?"streaming":"bounded",windowSize:kr,windowMode:br,arrowOfTime:Ds?Y:"right",extentPadding:J,scalePadding:K,axisExtent:Bt,yAxisExtent:ls,xAccessor:d,yAccessor:f,accessorRevision:p,timeAccessor:Ds?H:void 0,valueAccessor:z,colorAccessor:g,sizeAccessor:y,symbolAccessor:m,symbolMap:w,groupAccessor:M||(P?"_lineGroup":void 0),categoryAccessor:Ni,lineDataAccessor:P,xScaleType:ar,yScaleType:or,xExtent:G,yExtent:U,invertY:q,sizeRange:Q,binSize:E,binAlign:I,normalize:T,baseline:D,stackOrder:L,boundsAccessor:De,boundsStyle:Le,y0Accessor:Ee,band:$e,gradientFill:C(Ve),areaGroups:Ue?new Set(Ue):void 0,lineGradient:S(Xe),semanticLineStops:He,openAccessor:yt,highAccessor:mt,lowAccessor:kt,closeAccessor:At,candlestickStyle:wt,lineStyle:Ae,trackHoverRows:Ls,pointStyle:we,areaStyle:Se,swarmStyle:Pe,waterfallStyle:Me,colorScheme:Te,barColors:Re,barStyle:Ce,annotations:ci,decay:Ii,pulse:zi,transition:Qr,introAnimation:Zr,staleness:Wi,clock:ss.now,heatmapAggregation:qi,heatmapXBins:Ki,heatmapYBins:Qi,showValues:er,heatmapValueFormat:tr,heatmapColorScale:ir,pointIdAccessor:nr,curve:R,themeCategorical:Kr?.colors?.categorical,themeSemantic:Ot(Kr),themeSequential:Kr?.colors?.sequential,themeDiverging:Kr?.colors?.diverging,customLayout:pr,onLayoutError:gr,layoutConfig:yr,layoutMargin:ns}),[r,Ds,kr,br,Y,J,K,Bt,ls,d,f,p,H,z,g,y,m,w,M,P,Ni,ar,or,G,U,q,Q,E,I,T,D,L,De,Le,Ee,$e,Ve,Ue,Xe,He,yt,mt,kt,At,wt,Ae,Ls,we,Se,Pe,Me,Te,Re,Ce,ci,Ii,zi,Qr,Zr,Wi,ss.now,qi,Ki,Qi,er,tr,ir,nr,R,Kr,pr,gr,yr,ns]),$s=je(Es),Fs=Qt(null);Fs.current||(Fs.current=new Ji($s));let Ns=le(Fs,Mi,Pi,e=>e.getData()),_s=Qt({onColorDomainChange:rr,chartType:r}),Bs=Qt(void 0);_s.current={onColorDomainChange:rr,chartType:r};let Is=Jt(()=>{let{onColorDomainChange:e,chartType:t}=_s.current;if(!e||"heatmap"!==t)return;let i=1/0,r=-1/0;for(let e of Fs.current?.scene??[]){if("heatcell"!==e.type)continue;let t=Number(e.value??e.datum?.value);Number.isFinite(t)&&(t<i&&(i=t),t>r&&(r=t))}let s=Number.isFinite(i)&&Number.isFinite(r)?[i,r]:null,n=Bs.current;null===n&&null===s||n&&s&&n[0]===s[0]&&n[1]===s[1]||(Bs.current=s,e(s))},[]);(function(t,i,r,s,n){ei(()=>{let o=i?"custom":t;return e(o)?.canvasRenderers.length||!i&&"custom"===o?void 0:B(i?()=>import("./c-ZBSL4Y32.min.js").then(e=>{a(e.customXYPlugin)}):()=>import("./c-DNBFFE3P.min.js").then(e=>{e.registerBuiltInXYPlugins()}),()=>{i?n.current?.markStylePaintPending():r.current=!0,s()},`StreamXYFrame painters for "${t}"`)},[t,i,r,s,n])})(r,pr,Pr,rs,Fs),ce(Fs,$s,Pr,rs);let zs=function(e,t){let i=Qt(!1),r=Qt(!1);e||(r.current=!1),i.current=e&&!be&&!r.current&&!ki();let s=Qt(t);return s.current=t,ei(()=>{if(!e||be||ki())return;let t=()=>{i.current=!1,s.current()};return B(Ai,t,"XY transition engine",()=>{r.current=!0,t()})},[e]),i}(!!Qr,()=>{Pr.current=!0,rs()});ue(Fs,mr,Pr,rs);let Os=Qt(null);Os.current||(Os.current=new v(e=>{let t=Fs.current;t&&t.ingest(e)&&(Pr.current=!0,rs())},{chunkThreshold:u,chunkSize:h})),ei(()=>{Os.current?.updateChunkOptions({chunkThreshold:u,chunkSize:h})},[u,h]),function(e,{storeRef:t,adapterRef:i,dirtyRef:r,scheduleRender:s,hoverRef:n,setHoverPoint:a}){let o=Jt(e=>{i.current?.push(e)},[i]),l=Jt(e=>{i.current?.pushMany(e)},[i]),c=Jt(()=>{i.current?.clear(),t.current?.clear(),r.current=!0,s()},[i,t,r,s]);Kt(e,()=>({push:o,pushMany:l,remove:e=>{i.current?.flush();let o=t.current?.remove(e)??[];return o.length>0&&(n.current&&o.some(e=>e===n.current?.data)&&(n.current=null,a(null)),r.current=!0,s()),o},update:(e,n)=>{i.current?.flush();let a=t.current?.update(e,n)??[];return a.length>0&&(r.current=!0,s()),a},clear:c,getData:()=>(i.current?.flush(),t.current?.getData()??[]),getScales:()=>t.current?.scales??null,getExtents:()=>t.current?.getExtents()??null,getCustomLayout:()=>t.current?.lastCustomLayoutResult??null,getLayoutFailure:()=>t.current?.lastCustomLayoutFailure??null}),[o,l,c,s,i,t,r,n,a])}(i,{storeRef:Fs,adapterRef:Os,dirtyRef:Pr,scheduleRender:rs,hoverRef:xs,setHoverPoint:ws}),ei(()=>{n&&Os.current?.setBoundedData(Gr(cs,P))},[n,cs,P]);let{marginalXValues:Ys,marginalYValues:Ws,refreshMarginalValues:Vs}=function(e,t,i,r,s){let[n,a]=Zt([]),[o,l]=Zt([]),c=null!=t,u=c?[t.top,t.bottom,t.left,t.right].join("|"):"",h=Jt((t=e.current?.getData()??[])=>{let i=Sr(t,r,s);a(i.xValues),l(i.yValues)},[e,r,s]);return ei(()=>{if(!c)return a([]),void l([]);h()},[i,c,u,h]),{marginalXValues:n,marginalYValues:o,refreshMarginalValues:h}}(Fs,sr,cs,d,f),{canvasRef:js,interactionCanvasRef:Xs,resolutionDirtyRef:Hs}=et(Lr,{storeRef:Fs,dirtyRef:Pr,hydrated:Nr,wasHydratingFromSSR:Br,cleanup:()=>Os.current?.clear(),maxDevicePixelRatio:ae,canvasPaintDependencies:[r,as,os,Tt,ne,Ri,Ae,ke,xr,rs]}),{hoverHandlerRef:Gs,hoverLeaveRef:Us,onPointerMove:qs,onPointerLeave:Js,flushPointerMove:Ks,pointerStateRef:Qs}=Lr;Gs.current=e=>{let t=js.current;if(!t)return;let i=t.getBoundingClientRect(),s=e.clientX-i.left-ns.left,n=e.clientY-i.top-ns.top;if(s<0||s>as||n<0||n>os){if(tt(t),!us)return;return void(xs.current&&(xs.current=null,bs.current=null,ws(null),Ar?.(null),rs()))}let a=Fs.current;if(!a||0===a.scene.length)return void tt(t);let o=vt(oi,e.pointerType),l=Zi(a.scene,s,n,o,a.quadtree,a.maxPointRadius);if(tt(t,We(l?.node)),!us)return;let c="multi"===li,u=()=>{xs.current&&(xs.current=null,bs.current=null,ws(null),Ar&&Ar(null),rs())};if(!l&&!c)return void u();let h=c||!l?s:l.x,f=c||!l?n:l.y,p=l?.datum?_(l.datum,a.resolvedRibbons):{},g=a.scales?.x,y=g&&"function"==typeof g.invert?Gt(g,h):void 0,m="bar"===r?bt(p,y):y,x=xt(p,h,f,null!=m?{xValue:m,xPx:h}:void 0);c&&(x=ur(x,a,h,{chartType:r,xAccessor:d,fallbackColor:Ss.current,maxXDistance:Math.max(o,as),hasHit:!!l})),l||x.allSeries?.length?(xs.current=x,bs.current=l?.node??null,ws(x),Ar?.(x),rs()):u()},Us.current=()=>{tt(js.current),xs.current&&(xs.current=null,bs.current=null,ws(null),Ar?.(null),rs())},it(js);let Zs=Qt(()=>{});Zs.current=e=>{if(rt(e.target)||!wr)return;Ks();let t=js.current;if(!t)return;let i=t.getBoundingClientRect(),s=e.clientX-i.left-ns.left,n=e.clientY-i.top-ns.top;if(s<0||s>as||n<0||n>os)return void wr(null);let a=Fs.current;if(!a||0===a.scene.length)return void wr(null);let o=vt(oi,ks.current),l=Zi(a.scene,s,n,o,a.quadtree,a.maxPointRadius);if(!l)return void wr(null);let c=l.datum||{},u=a.scales?.x,h=u&&"function"==typeof u.invert?Gt(u,l.x):void 0,d="bar"===r?bt(c,h):h;wr(xt(c,l.x,l.y,null!=d?{xValue:d,xPx:l.x}:void 0),{type:"activate",inputType:st(ks.current)})};let en=Jt(e=>Zs.current(e),[]),{kbFocusIndexRef:tn,focusedNavPointRef:rn,onKeyDown:sn,refreshKeyboardFocus:nn}=F({clearPointerHover:Js,storeRef:Fs,hoverRef:xs,hoveredNodeRef:bs,setHoverPoint:ws,customHoverBehavior:Ar,customClickBehavior:wr,scheduleRender:rs,decorateHover:"multi"===li||"bar"===r?(e,t)=>("bar"===r&&(e={...e,xValue:bt(e.data,t.scales?.x.invert?.(e.x)),xPx:e.x}),"multi"===li?ur(e,t,e.x,{chartType:r,xAccessor:d,fallbackColor:Ss.current,maxXDistance:as,hasHit:!0}):e):void 0}),an=Jt(e=>{he(Qs,e,!!us,vs.current,js.current)&&(ks.current=e.pointerType,tn.current=-1,rn.current=null,qs(e))},[js,us,rn,tn,qs,Qs]),on=Jt(e=>{he(Qs,e,!!us,vs.current,js.current,"mouse")&&(ks.current="mouse",tn.current=-1,rn.current=null,qs({clientX:e.clientX,clientY:e.clientY,pointerType:"mouse"}))},[js,us,rn,tn,qs,Qs]),ln=Jt(e=>{ks.current=e.pointerType},[]);is.current=()=>{if(ts.current=null,!ss.isActive)return;let e=js.current,t=Xs.current;if(!e||!t)return;let i=Fs.current;if(!i||zs.current&&(!Br||-1!==Tr.current.w))return;let s=ss.now(),n=null!=i.activeTransition,a=i.advanceTransition(Ir.current?s+1e6:s),c=!Ir.current&&a,u=Tr.current.w!==as||Tr.current.h!==os,h=Hs.current,d=Pr.current||n||u,f=n&&!a,p=i.consumeStylePaintPending(),g=!1,y=i.getLastUpdateResult(),m=Ps.current.beforeCompute(y,c);(Pr.current||u)&&(!c||u)&&(i.computeScene({width:as,height:os}),nn(),Tr.current={w:as,h:os},g=!0,Ns(),Is()),(g||p)&&(vs.current=nt(i.scene),vs.current||tt(e)),vs.current&&(n||g||p)&&function(e){let{canvas:t,pointer:i,store:r,margin:s,width:n,height:a}=e;Ge(t,i,i=>{let o=t.getBoundingClientRect(),l=i.clientX-o.left-s.left,c=i.clientY-o.top-s.top;if(l<0||l>n||c<0||c>a)return;let u=Zi(r.scene,l,c,vt(e.hoverRadius,i.pointerType),e.geometryMoved?null:r.quadtree,r.maxPointRadius);return We(u?.node)})}({canvas:e,pointer:Qs.current,store:i,margin:ns,width:as,height:os,hoverRadius:oi,geometryMoved:n||g}),Ps.current.afterCompute(m,g,u);let x=N(i,s,g,Dr),v=at(ae,Xr),{resized:b}=ot(e,Xr,v);ot(t,Xr,v);let k=Cs.current.resolve(e);Ss.current=k.primary;let A=i.lastIngestTime>0?s-i.lastIngestTime:0,w=de(Wi,A),S=Wi&&w.isStale;if(d||p||x.changed||h||b){let t=lt(e,Xr,ns,v);if(t){t.clearRect(-ns.left,-ns.top,Xr[0],Xr[1]),Wi&&w.alpha<1&&(t.globalAlpha=w.alpha),t.save(),"function"==typeof t.rect&&(t.beginPath(),t.rect(0,0,as,os),t.clip()),function(e,t,i,r,s){if(t&&r)for(let n of t)e.save(),n(e,i,r,s),e.restore()}(t,xr,i.scene,i.scales,{width:as,height:os});let e=o(r,!!pr);fe({context:t,nodes:i.scene,renderMode:ke,pixelRatio:v,paintBuiltIn:r=>{if(e&&i.scales)for(let s of e)s(t,r,i.scales,{width:as,height:os})}}),t.restore(),Wi&&w.alpha<1&&(t.globalAlpha=1)}}let C=!!(us&&xs.current&&i.scales),M=!!(bs.current&&Array.isArray(Yt)&&Yt.some(e=>e&&"object"==typeof e&&"highlight"===e.type)),P=C||M;if(O(P,Ms.current)){let e=lt(t,Xr,ns,v);if(e){if(e.clearRect(-ns.left,-ns.top,Xr[0],Xr[1]),C&&xs.current){let t="object"==typeof us?us:{};!function(e,t,i,r,s,n,a){if(!1===s.crosshair)return;let o=t.allSeries,c=o&&o.length>0,u=t.xPx??t.x;e.save();let h="object"==typeof s.crosshair?s.crosshair:{};e.strokeStyle=h.stroke||a.crosshair;let d=h.strokeWidth??1;if(h.strokeDasharray?e.setLineDash(h.strokeDasharray.split(/[\s,]+/).map(Number)):e.setLineDash([4,4]),d>0&&(e.lineWidth=d,e.beginPath(),e.moveTo(c?u:t.x,0),e.lineTo(c?u:t.x,r),e.stroke(),c||(e.beginPath(),e.moveTo(0,t.y),e.lineTo(i,t.y),e.stroke())),e.restore(),c){e.lineWidth=2,e.strokeStyle=a.pointRing;for(let t of o)null!=t.valuePx&&(e.beginPath(),e.arc(u,t.valuePx,4,0,2*Math.PI),e.fillStyle=t.color||a.primary,e.fill(),e.stroke())}else{let i=s.pointColor||l(n)||a.primary;e.beginPath(),e.arc(t.x,t.y,4,0,2*Math.PI),e.fillStyle=i,e.fill(),e.strokeStyle=a.pointRing,e.lineWidth=2,e.stroke()}}(e,xs.current,as,os,t,bs.current,k)}if(M&&bs.current&&Array.isArray(Yt)){let t=Yt.find(e=>e&&"object"==typeof e&&"highlight"===e.type);t&&function(e,t,i,r,s){if(!i)return;let n="group"in i?i.group:void 0;if(void 0!==n)for(let i of t){if("line"!==i.type||i.group!==n||i.path.length<2)continue;let t="function"==typeof r.style?i.datum?r.style(i.datum):{}:r.style||{};e.save(),e.beginPath(),e.moveTo(i.path[0][0],i.path[0][1]);for(let t=1;t<i.path.length;t++)e.lineTo(i.path[t][0],i.path[t][1]);e.strokeStyle=t.stroke||i.style.stroke||s.primary;let a=t.strokeWidth??(i.style.strokeWidth??2)+2;a<=0||(e.lineWidth=a,e.globalAlpha=t.opacity??1,e.stroke()),e.restore()}}(e,i.scene,bs.current,t,k)}}Ms.current=P}d&&e&&e.setAttribute("aria-label",ct(i.scene,r+" chart"));let R=Pr.current;Pr.current=R&&c&&!g,Hs.current=!1,R&&i.scales&&(ps!==i.scales&&gs(i.scales),sr&&Vs(i.getData())),(ci&&ci.length>0||pr)&&(g||n)&&(g||f||s-fs.current>=33)&&(ds(e=>e+1),fs.current=s),Wi?.showBadge&&Ts(!!S),(c||null!=i.activeTransition||x.pending)&&rs()},pe(Wi,Fs,Pr,rs,ss.now,Rs,Ts);let cn=ti(()=>{if(!Nt&&!It&&Fs.current?.xIsDate&&ps&&!Wt(ps.x))return Rr(ps.x.domain())},[Nt,It,ps]),un=Nt||It||cn,hn=rn.current,dn=ni(ut,{active:tn.current>=0,hoverPoint:As,margin:ns,size:Xr,shape:hn?.shape,width:hn?.w,height:hn?.h}),fn=b(d,H,"__semiotic_resolvedX","__semiotic_resolvedTime"),pn=b(f,z,"__semiotic_resolvedY","__semiotic_resolvedValue"),gn=fn.key,yn=pn.key,mn=ci&&ci.length>0||!1,xn=k(fn,pn,mn),vn=ci?.some(e=>e._directLabel||e._directLabelRequest)?`${es}-direct-labels`:void 0;if(be||!Nr&&Br){let e=Fs.current;e&&n&&(e.ingest({inserts:Gr(cs,P),bounded:!0}),e.computeScene({width:as,height:os}),e.cancelIntroAnimation());let t=e?.scene??[],i=e?.scales??null,s=oe(Ti,Xr,ns,i),a=oe(Ri,Xr,ns,i),o=ge({background:ne,hasBackgroundGraphics:!!Ri,themeBackground:Kr?.colors.background}),l=`${Mr}-plot-clip`,u=un||(()=>{if(e?.xIsDate&&i&&!Wt(i.x))return Rr(i.x.domain())})(),h=cr||("string"==typeof Fi?Fi:"XY chart"),p=sr&&e?Sr(e.getData(),d,f):{xValues:[],yValues:[]};return ai("div",{ref:jr,className:"stream-xy-frame"+(se?` ${se}`:""),role:"group","aria-label":h,style:{position:"relative",fontFamily:"var(--semiotic-font-family, sans-serif)",width:ee?"100%":Xr[0],height:te?"100%":Xr[1]},children:[ni(ht,{accessibleTable:lr,scene:t,chartType:r+" chart",tableId:es,chartTitle:"string"==typeof Fi?Fi:void 0}),ni(dt,{summary:hr}),ai("div",{role:"img","aria-label":h,"aria-describedby":vn,children:[ai("svg",{role:"presentation",xmlns:"http://www.w3.org/2000/svg",width:Xr[0],height:Xr[1],style:{position:"absolute",left:0,top:0},children:[ni("defs",{children:ni("clipPath",{id:l,children:ni("rect",{width:as,height:os})})}),o&&ni("rect",{x:0,y:0,width:Xr[0],height:Xr[1],fill:o}),ni("g",{transform:`translate(${ns.left},${ns.top})`,children:a}),ai("g",{transform:`translate(${ns.left},${ns.top})`,clipPath:`url(#${l})`,children:[vr&&i&&vr.map((e,r)=>ni(qt.Fragment,{children:e(t,i,{width:as,height:os})},`svgpre-${r}`)),t.map((e,t)=>ye({node:e,index:t,renderMode:ke,fallback:()=>function(e,t,i,r=30){let s=function(e,t,i,r=30){switch(e.type){case"line":{let r=e;if(0===r.path.length)return null;let s=St(r.curve),n=s?pi().x(([e])=>e).y(([,e])=>e).curve(s)(r.path)??"":"M"+r.path.map(([e,t])=>`${e},${t}`).join("L"),a=Ye(`${i?`${i}-`:""}line-${t}-stroke-gradient`),o=Rt(r.style.stroke),l=o?null:Fr(r.strokeGradient,r.path,a,r.style.stroke||"#4e79a7");return ai(qt.Fragment,{children:[l&&ni("defs",{children:l}),ni("path",{d:n,fill:"none",stroke:l?`url(#${a})`:o?"none":r.style.stroke||"#4e79a7",strokeWidth:o?0:r.style.strokeWidth??2,strokeDasharray:r.style.strokeDasharray,opacity:r.style.opacity,strokeOpacity:r.style.strokeOpacity})]},`line-${t}`)}case"area":{let s=e;if(0===s.topPath.length)return null;let n=St(s.curve),a=n&&s.topPath.length>=2&&s.bottomPath.length>=2?gi().x(([e])=>e).y0((e,t)=>s.bottomPath[t][1]).y1(([,e])=>e).curve(n)(s.topPath)??"":(()=>{let e=s.topPath.map(([e,t])=>`${e},${t}`).join("L"),t=[...s.bottomPath].reverse().map(([e,t])=>`${e},${t}`).join("L");return`M${e}L${t}Z`})(),o=`${i?`${i}-`:""}area-${t}-hatch`,l=Mt(s.style.fill)?Pt(s.style.fill,o):void 0,u=Ye(`${i?`${i}-`:""}area-${t}-gradient`),h=function(e,t){let i=e.fillGradient;if(!i||"object"!=typeof i)return null;let r=1/0,s=-1/0;if(e.fillGradientSpan)[r,s]=e.fillGradientSpan;else{for(let[,t]of e.topPath)r=Math.min(r,t);for(let[,t]of e.bottomPath)s=Math.max(s,t)}if(!Number.isFinite(r)||!Number.isFinite(s))return null;let n=Fe(i.stops,Ne(e.style.fill));return n?ni("linearGradient",{id:t,gradientUnits:"userSpaceOnUse",x1:0,y1:r,x2:0,y2:s,children:n}):null}(s,u),d=h?`url(#${u})`:l?`url(#${o})`:Ne(s.style.fill),f=h?void 0:s.style.fillOpacity??.7,p=n?pi().x(([e])=>e).y(([,e])=>e).curve(n)(s.topPath)??"":"M"+s.topPath.map(([e,t])=>`${e},${t}`).join("L"),g=We(s),y=g&&r>=0?ni("path",{d:p,fill:"none",stroke:"transparent",strokeWidth:Math.max(1,2*r),strokeLinecap:"round",pointerEvents:"stroke",style:{cursor:g},"data-semiotic-mark-cursor":g,"data-semiotic-cursor-hit-target":"area-top-path","aria-hidden":"true"},`area-${t}-cursor-target`):null,m=Ye(`${i?`${i}-`:""}area-${t}-stroke-gradient`),x=!(!s.colorThresholds?.length||!s.rawValues||s.rawValues.length!==s.topPath.length),v=!!s.strokeColorBands?.length,b=x||v?null:Fr(s.strokeGradient,s.topPath,m,s.style.stroke||"#4e79a7"),k=s.style.strokeWidth??2,A=1/0,w=-1/0;for(let[e]of s.topPath)e<A&&(A=e),e>w&&(w=e);let S=v?s.strokeColorBands.map((e,r)=>Ye(`${i?`${i}-`:""}area-${t}-stroke-band-${r}`)):[],C=v?s.strokeColorBands.map((e,t)=>ni("clipPath",{id:S[t],children:ni("rect",{x:A-k,y:e.y,width:w-A+2*k,height:e.height})},S[t])):null,M=s.style.stroke&&"none"!==s.style.stroke?v?s.strokeColorBands.map((e,i)=>ni("path",{d:p,fill:"none",stroke:e.color??Ne(s.style.stroke),strokeWidth:k,opacity:(s.style.opacity??1)*(e.opacity??1),strokeOpacity:s.style.strokeOpacity,clipPath:`url(#${S[i]})`},`area-${t}-stroke-band-${i}`)):x?c(s.topPath,s.rawValues,s.colorThresholds,Ne(s.style.stroke)).map((e,i)=>ni("path",{d:"M"+e.path.map(([e,t])=>`${e},${t}`).join("L"),fill:"none",stroke:e.color,strokeWidth:k,opacity:s.style.opacity,strokeOpacity:s.style.strokeOpacity},`area-${t}-threshold-${i}`)):ni("path",{d:p,fill:"none",stroke:b?`url(#${m})`:Ne(s.style.stroke),strokeWidth:k,opacity:s.style.opacity,strokeOpacity:s.style.strokeOpacity}):null;if(s.clipRect){let e=`${i?`${i}-`:""}area-clip-${t}`;return ai("g",{children:[ai("defs",{children:[h,!h&&l,b,C,ni("clipPath",{id:e,children:ni("rect",{x:s.clipRect.x,y:s.clipRect.y,width:s.clipRect.width,height:s.clipRect.height})})]}),ai("g",{clipPath:`url(#${e})`,children:[ni("path",{d:a,fill:d,fillOpacity:f,opacity:s.style.opacity,stroke:"none"}),M,y]})]},`area-${t}`)}return ai(qt.Fragment,{children:[(h||l||b||C)&&ai("defs",{children:[h,!h&&l,b,C]}),ni("path",{d:a,fill:d,fillOpacity:f,opacity:s.style.opacity,stroke:"none"}),M,y]},`area-${t}`)}case"point":case"rect":return Ie(e,t,i);case"symbol":return Oe(e,t);case"glyph":{let r=e;return ze(r,r.x,r.y,`${i??""}glyph-${r.pointId??t}`)}case"heatcell":{let i=e,r={x:i.x,y:i.y,width:i.w,height:i.h,fill:i.fill,...Be(i.style??{})};if(i.showValues&&null!=i.value&&i.w>=20&&i.h>=20){let e=i.valueFormat?i.valueFormat(i.value):Number.isInteger(i.value)?String(i.value):Math.abs(i.value)>=100?i.value.toFixed(0):Math.abs(i.value)>=1?i.value.toFixed(1):i.value.toPrecision(3),[s,n,a]=function(e){if(e.startsWith("#")){let t=e.slice(1);if(3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),6===t.length)return[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16)]}let t=e.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);return t?[+t[1],+t[2],+t[3]]:[128,128,128]}(i.fill),o=.299*s+.587*n+.114*a>128?"#000":"#fff",l=Math.max(10,Math.min(16,.3*Math.min(i.w,i.h)));return ai("g",{children:[ni("rect",{...r}),ni("text",{className:"semiotic-heatmap-value",x:i.x+i.w/2,y:i.y+i.h/2,textAnchor:"middle",dominantBaseline:"middle",fill:o,fontSize:`${l}px`,fontFamily:"var(--semiotic-font-family, sans-serif)",children:e})]},`heatcell-${t}`)}return ni("rect",{...r},`heatcell-${t}`)}case"candlestick":{let r=e,s=`${i?`${i}-`:""}candle-${t}-hatch`,n=Mt(r.style?.fill)?Pt(r.style.fill,s):void 0,a=n?`url(#${s})`:void 0,{fill:o,...l}=r.style??{};if(l.opacity=(r.style?.opacity??1)*(r._decayOpacity??1),r.isRange){let e=r.dotRadius??Math.max(2,r.bodyWidth/2),i=a??r.wickColor;return ai(qt.Fragment,{children:[n&&ni("defs",{children:n}),ai("g",{style:l,children:[ni("line",{x1:r.x,y1:r.highY,x2:r.x,y2:r.lowY,stroke:r.wickColor,strokeWidth:r.wickWidth}),ni("circle",{cx:r.x,cy:r.highY,r:e,fill:i}),ni("circle",{cx:r.x,cy:r.lowY,r:e,fill:i})]})]},`candle-${t}`)}let c=Math.min(r.openY,r.closeY),u=Math.max(Math.abs(r.openY-r.closeY),1),h=r.isUp?r.upColor:r.downColor,d=a??h;return ai(qt.Fragment,{children:[n&&ni("defs",{children:n}),ai("g",{style:l,children:[ni("line",{x1:r.x,y1:r.highY,x2:r.x,y2:r.lowY,stroke:r.wickColor,strokeWidth:r.wickWidth}),ni("rect",{x:r.x-r.bodyWidth/2,y:c,width:r.bodyWidth,height:u,fill:d,stroke:a?r.wickColor:h,strokeWidth:1})]})]},`candle-${t}`)}default:return null}}(e,t,i,r);return"area"===e.type?s:_e(s,e,`xy-cursor-${t}`)}(e,t,Mr,oi)})).filter(Boolean)]})]}),ni($r,{decorative:!0,directLabelDescriptionId:vn,width:as,height:os,totalWidth:Xr[0],totalHeight:Xr[1],margin:ns,scales:i,showAxes:Tt,axes:Dt,xLabel:Lt,yLabel:$t,yLabelRight:Ft,xFormat:u,yFormat:_t||zt,axisExtent:Bt,showGrid:fi,title:Fi,description:cr,legend:yi,legendHoverBehavior:mi,legendClickBehavior:vi,legendHighlightedCategory:bi,legendIsolatedCategories:wi,legendPosition:Si,legendLayout:Ci,foregroundGraphics:me(s,ve(Fs.current?.customLayoutOverlays,mr??null)),marginalGraphics:sr,xValues:p.xValues,yValues:p.yValues,annotations:ci,onAnnotationActivate:ui,onObservation:Ut??Ht,chartId:ri,chartType:"StreamXYFrame",autoPlaceAnnotations:hi,svgAnnotationRules:di,annotationFrame:0,xAccessor:gn,yAccessor:yn,annotationData:xn(Fs.current?.getData()),pointNodes:Vr(Fs.current?.scene),curve:"string"==typeof R?R:void 0,linkedCrosshairName:dr,linkedCrosshairSourceId:fr})]})]})}return ai("div",{ref:jr,className:"stream-xy-frame"+(se?` ${se}`:""),role:"group","aria-label":cr||("string"==typeof Fi?Fi:"XY chart"),tabIndex:0,style:{position:"relative",fontFamily:"var(--semiotic-font-family, sans-serif)",width:ee?"100%":Xr[0],height:te?"100%":Xr[1],overflow:"visible",touchAction:Jr(_i)},onKeyDown:sn,children:["production"!==process.env.NODE_ENV&&Fs.current&&ni(ft,{store:Fs.current,diagnostics:Ps.current}),ni(ht,{accessibleTable:lr,sceneRevision:Fs.current?.getUpdateSnapshot().revisions.accessibility,scene:Fs.current?.scene??[],chartType:r+" chart",tableId:es,chartTitle:"string"==typeof Fi?Fi:void 0}),ni(dt,{summary:hr}),ni(pt,{active:tn.current>=0,hoverPoint:As}),ai("div",{role:"img","aria-label":cr||("string"==typeof Fi?Fi:"XY chart"),"aria-describedby":vn,style:{position:"relative",width:"100%",height:"100%"},onPointerMove:an,onMouseMove:on,onPointerLeave:Js,onMouseLeave:Js,onPointerDown:us||Cr?ln:void 0,onClick:Cr?en:void 0,children:[ni(gt,{size:Xr,margin:ns,backdropFill:ge({background:ne,hasBackgroundGraphics:!!Ri,themeBackground:`var(--semiotic-bg, ${Kr.colors.background})`})??void 0,children:ms}),ni(Er,{width:as,height:os,totalWidth:Xr[0],totalHeight:Xr[1],margin:ns,scales:ps,showAxes:Tt,axes:Dt,showGrid:fi,xFormat:un,yFormat:_t||zt,axisExtent:Bt}),ni("canvas",{"aria-hidden":"true",ref:js,"aria-label":ct(Fs.current?.scene??[],r+" chart"),style:{position:"absolute",left:0,top:0,width:Xr[0],height:Xr[1]}}),ni("canvas",{ref:Xs,style:{position:"absolute",left:0,top:0,width:Xr[0],height:Xr[1],pointerEvents:"none"}}),ni($r,{decorative:!0,directLabelDescriptionId:vn,width:as,height:os,totalWidth:Xr[0],totalHeight:Xr[1],margin:ns,scales:ps,showAxes:Tt,axes:Dt,xLabel:Lt,yLabel:$t,yLabelRight:Ft,xFormat:un,yFormat:_t||zt,axisExtent:Bt,showGrid:fi,title:Fi,description:cr,legend:yi,legendHoverBehavior:mi,legendClickBehavior:vi,legendHighlightedCategory:bi,legendIsolatedCategories:wi,legendPosition:Si,legendLayout:Ci,foregroundGraphics:me(ys,ve(Fs.current?.customLayoutOverlays,mr??null)),marginalGraphics:sr,xValues:Ys,yValues:Ws,annotations:ci,onAnnotationActivate:ui,onObservation:Ut??Ht,chartId:ri,chartType:"StreamXYFrame",autoPlaceAnnotations:hi,svgAnnotationRules:di,annotationFrame:hs,xAccessor:gn,yAccessor:yn,annotationData:xn(Fs.current?.getData()),pointNodes:Vr(Fs.current?.scene),curve:"string"==typeof R?R:void 0,underlayRendered:!0,canvasObscuresUnderlay:!1,linkedCrosshairName:dr,linkedCrosshairSourceId:fr}),(_i||Bi)&&ni(xi,{width:as,height:os,totalWidth:Xr[0],totalHeight:Xr[1],margin:ns,dimension:_i?.dimension??"xy",scales:ps,onBrush:Bi??(()=>{}),binSize:E,snap:_i?.snap,binBoundaries:_i?.binBoundaries??("bar"===r?Fs.current?.getBinBoundaries():void 0),snapDuring:_i?.snapDuring,streaming:"streaming"===s}),Wi?.showBadge&&ni(xe,{isStale:Rs,position:Wi.badgePosition,state:Wi.state,settling:Wi.settling}),dn,ni(Hr,{enabled:!!us,hoverPoint:As,tooltipContent:Vt,containerWidth:as,containerHeight:os,margin:ns})]}),ni(A,{graphics:Di,size:Xr,margin:ns,scales:ps,label:Li})]})})),"StreamXYFrame"),Qr=Kr;function Zr({brush:e,onBrush:t,linkedBrush:i,xAccessor:r,yAccessor:s,defaultDimension:n="xy"}){let a=mt(i),o=!!e||!!a||!!t,l=a?.xField||("string"==typeof r?r:void 0),c=a?.yField||("string"==typeof s?s:void 0),u="y"!==n||a?.xField?l:void 0,h="x"!==n||a?.yField?c:void 0,d=yt({name:a?.name||"__unused_brush__",xField:u,yField:h}),f=a?"xyBrush"===d.brushInteraction.brush?"xy":"xBrush"===d.brushInteraction.brush?"x":"y":n,p=Qt(d.brushInteraction);p.current=d.brushInteraction;let g=Jt(e=>{let i=p.current;if(!e)return a&&i.end(null),void t?.(null);a&&("xyBrush"===i.brush?i.end([[e.x[0],e.y[0]],[e.x[1],e.y[1]]]):"xBrush"===i.brush?i.end(e.x):i.end(e.y)),t?.(e)},[a,t]);return o?{brushStreamProps:{brush:{dimension:f},onBrush:g}}:{brushStreamProps:{}}}export{hr as a,wr as b,Pr as c,Rr as d,Xr as e,Qr as f,Zr as g};
|
package/dist/c-C3Z7ZRAA.min.js
DELETED
|
@@ -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),w=r(null!=y),A=t(),j=o(),v=e&&!!m&&(b||j),L="function"==typeof m?f:m,M=d(()=>({lifecycle:{colorByDomainKey:L,isPushMode:e,shouldTrackCategoryDomain:v},categories:new Set,ordered:[]}),[L,e,v]),k=u(e=>{if(!m)return null;let r="function"==typeof m?m(e):e[m];return String(r)},[m]),B=u(e=>{if(!v)return;let r=!1;for(let t of e){if(!t||"object"!=typeof t)continue;let e=k(t);null!=e&&!M.categories.has(e)&&(M.categories.add(e),M.ordered.push(e),r=!0)}r&&P(e=>e+1)},[M,k,v]),D=u(e=>{if(!v)return;let r=Array.from(new Set(e.map(String))),t=M.ordered;t.length===r.length&&t.every((e,t)=>e===r[t])||(M.categories=new Set(r),M.ordered=r,P(e=>e+1))},[M,v]),O=u(e=>r=>{B([r]),e(r)},[B]),T=u(e=>r=>{B(r),e(r)},[B]),_=u(()=>{M.categories=new Set,M.ordered=[],P(e=>e+1)},[M]),x=d(()=>v?[...M.ordered]:[],[M,v,S]);a(C&&e&&m?x:[]);let G=d(()=>{if(!e||!m||!1===h)return;let r=M.ordered;if(0===r.length)return;let t=Array.isArray(y)&&y.length>0||"string"==typeof y&&y.length>0?y:A&&A.length>0?A: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=>(w?g(w,e):void 0)??(d?g(d,e):void 0)??c(e)??"#999",getColor:l})},[e,m,h,y,w,A,S,M]),K=d(()=>{if(G)return"right"===p?{right:110}:"left"===p?{left:110}:"top"===p?{top:50}:"bottom"===p?{bottom:80}:{right:110}},[G,p]);return{wrapPush:O,wrapPushMany:T,resetCategories:_,categories:x,categoryDomainProps:v?{legendCategoryAccessor:m,onCategoriesChange:D}:{},streamingLegend:G,streamingMarginAdjust:K}}import{bd as r,bB as t,bu as o,bt as a,bw as n}from"./c-L6OT4OVA.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};
|
package/dist/c-C4WRRUZ5.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{a as registerBuiltInNetworkLayouts}from"./c-QVKOXC3S.min.js";
|