semiotic 3.13.0 → 3.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -41
- package/ai/artifact-surface-inventory.json +1 -1
- package/ai/dist/mcp-server.js +132 -106
- package/ai/reference.md +12 -4
- package/ai/schema.json +16 -2
- 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-CRKR5M42.min.js → c-2M2OPWVA.min.js} +37 -37
- package/dist/c-3GIPT46Z.min.js +1 -0
- package/dist/c-3UXQGCQT.min.js +1 -0
- package/dist/{c-MHNU6KYQ.min.js → c-4P2EM44G.min.js} +3 -3
- package/dist/c-4RVDKSMQ.min.js +1 -0
- package/dist/{c-6MEEA5VY.min.js → c-4YPPVFZH.min.js} +1 -1
- package/dist/{c-6MPP6QF5.min.js → c-62JIVHK5.min.js} +1 -1
- package/dist/{c-KYRH3XKJ.min.js → c-6QCSRJSC.min.js} +1 -1
- package/dist/c-6WJKNYIG.min.js +1 -0
- package/dist/c-7BVQDXFU.min.js +1 -0
- package/dist/c-7UN2WUMI.min.js +1 -0
- package/dist/c-AQUX6L2O.min.js +1 -0
- package/dist/c-BR5QDUCR.min.js +1 -0
- package/dist/c-C3YQVUB6.min.js +1 -0
- package/dist/{c-RQ2XZHWY.min.js → c-COP4OISO.min.js} +1 -1
- package/dist/c-ENRZPF5E.min.js +1 -0
- package/dist/c-HBLICBM6.min.js +1 -0
- package/dist/{c-EQVM754Z.min.js → c-HGWITEJI.min.js} +1 -1
- package/dist/{c-3K2FJDLE.min.js → c-I54V24WG.min.js} +1 -1
- package/dist/c-IDCFMBA4.min.js +2 -0
- package/dist/{c-TPL7X32J.min.js → c-ISHYKYII.min.js} +1 -1
- package/dist/c-KSSS3HSA.min.js +1 -0
- package/dist/c-LEICSI5V.min.js +1 -0
- package/dist/c-LJ4XY3Z3.min.js +1 -0
- package/dist/c-MBE6PPHN.min.js +1 -0
- package/dist/c-MOK4RWNO.min.js +1 -0
- package/dist/c-N2TVSOYL.min.js +2 -0
- package/dist/{c-EAAKQIUZ.min.js → c-NHZ2E3CI.min.js} +1 -1
- package/dist/{c-MDY3ULP6.min.js → c-OBA7XSLH.min.js} +1 -1
- package/dist/c-OIJL2WZH.min.js +1 -0
- package/dist/c-ONOWKUUZ.min.js +1 -0
- package/dist/{c-CPJR4LHF.min.js → c-OSLNYZ3Q.min.js} +17 -17
- package/dist/c-PBFRYNKM.min.js +1 -0
- package/dist/c-QUAEYF34.min.js +1 -0
- package/dist/c-RDFFLRKC.min.js +1 -0
- package/dist/c-SDGGMIYI.min.js +1 -0
- package/dist/c-SQQZPFVY.min.js +1 -0
- package/dist/c-SU6Z75M2.min.js +1 -0
- package/dist/{c-BWM7MU2Y.min.js → c-SX4TPG3Z.min.js} +1 -1
- package/dist/{c-DTYG34WG.min.js → c-VGHU2LTF.min.js} +2 -2
- package/dist/c-VLWWXOM5.min.js +1 -0
- package/dist/c-VZNIIKL6.min.js +1 -0
- package/dist/{c-GBO32OML.min.js → c-W5ATXREF.min.js} +1 -1
- package/dist/c-WSWMQDFZ.min.js +1 -0
- package/dist/{c-3SDC7AQQ.min.js → c-XM76UG3P.min.js} +1 -1
- package/dist/c-XORVM6C5.min.js +1 -0
- package/dist/{c-MYRI7NF2.min.js → c-XZJWL7UL.min.js} +1 -1
- package/dist/c-Y43GTKGR.min.js +1 -0
- package/dist/c-YGTMWEEF.min.js +1 -0
- package/dist/c-ZFIURPZA.min.js +1 -0
- package/dist/c-ZWJDTDEV.min.js +1 -0
- package/dist/c-ZYMXDR42.min.js +1 -0
- package/dist/components/ai/chartClinic.d.ts +4 -0
- package/dist/components/ai/evaluateChart.d.ts +3 -1
- package/dist/components/ai/generativeChart.d.ts +13 -0
- package/dist/components/ai/renderEvidenceMemoKey.d.ts +9 -0
- package/dist/components/ai/reportRenderError.d.ts +2 -0
- package/dist/components/charts/physics/eventDropSources.d.ts +1 -1
- package/dist/components/evidence/claimReferences.d.ts +9 -0
- package/dist/components/realtime/BinAccumulator.d.ts +5 -0
- package/dist/components/recipes/atlas/dependencyEvidence.d.ts +5 -0
- package/dist/components/recipes/atlas/support.d.ts +5 -0
- package/dist/components/server/staticXYAxisTicks.d.ts +1 -1
- package/dist/components/stream/MarginalGraphics.d.ts +4 -2
- package/dist/components/stream/PipelineStore.d.ts +6 -18
- package/dist/components/stream/axisTickUtils.d.ts +1 -1
- package/dist/components/stream/countNoun.d.ts +2 -0
- package/dist/components/stream/heatmapBandTicks.d.ts +68 -0
- package/dist/components/stream/pipelineDomainResolution.d.ts +52 -3
- package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +8 -0
- package/dist/components/stream/uniqueRegionLabel.d.ts +6 -0
- package/dist/components/stream/xyAxisTicks.d.ts +8 -1
- package/dist/components/stream/xyFrameAxisTypes.d.ts +4 -2
- package/dist/components/stream/xySceneBuilders/types.d.ts +6 -0
- package/dist/geo.min.js +152 -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/physicsWorker.js +1 -1
- package/dist/processSankeyLayoutWorker.js +1 -1
- package/dist/semiotic-access.module.min.js +2 -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 +2 -2
- package/dist/semiotic-atlas-core.min.js +1 -1
- package/dist/semiotic-atlas-core.module.min.js +1 -1
- package/dist/semiotic-atlas-selection.module.min.js +1 -1
- package/dist/semiotic-client-cjs-shared.min.js +1023 -1023
- package/dist/semiotic-evidence.min.js +4 -4
- package/dist/semiotic-evidence.module.min.js +3 -3
- package/dist/semiotic-experimental-auxiliary.module.min.js +1 -1
- package/dist/semiotic-experimental-node-auxiliary.module.min.js +1 -1
- package/dist/semiotic-experimental-react-shared.module.min.js +1 -1
- package/dist/semiotic-experimental-vacp.min.js +1 -1
- package/dist/semiotic-experimental-vacp.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-recipes-core-cjs-base.min.js +101 -101
- package/dist/semiotic-recipes-core.module.min.js +1 -1
- package/dist/semiotic-server-edge-node.module.min.js +3 -3
- package/dist/semiotic-server-edge.min.js +397 -397
- package/dist/semiotic-server-edge.module.min.js +3 -3
- package/dist/semiotic-server-node.min.js +397 -397
- package/dist/semiotic-utils-core.min.js +11 -11
- package/dist/semiotic-utils-core.module.min.js +3 -3
- package/dist/semiotic.module.min.js +1 -1
- package/dist/server.min.js +397 -397
- package/dist/server.module.min.js +3 -3
- package/dist/xy.module.min.js +1 -1
- package/package.json +2 -2
- package/dist/c-3OBJLOXI.min.js +0 -1
- package/dist/c-4VFGNUWG.min.js +0 -1
- package/dist/c-5BN7GWJH.min.js +0 -1
- package/dist/c-65GMYND6.min.js +0 -1
- package/dist/c-AGRMJIUH.min.js +0 -1
- package/dist/c-BJKGYOPX.min.js +0 -1
- package/dist/c-C332PFY6.min.js +0 -1
- package/dist/c-DDZ5TZ7P.min.js +0 -1
- package/dist/c-F4DZ3NMI.min.js +0 -1
- package/dist/c-GZJ2XEQ5.min.js +0 -1
- package/dist/c-HFQ3Z65X.min.js +0 -1
- package/dist/c-HNW73MXJ.min.js +0 -1
- package/dist/c-HWFZB7SD.min.js +0 -1
- package/dist/c-IIV4DB7T.min.js +0 -1
- package/dist/c-J2QH3PEI.min.js +0 -1
- package/dist/c-JZNWRFVJ.min.js +0 -2
- package/dist/c-KHLBCSIO.min.js +0 -1
- package/dist/c-L7FQHKGH.min.js +0 -1
- package/dist/c-LYPOBMKC.min.js +0 -1
- package/dist/c-NGMMPKNJ.min.js +0 -1
- package/dist/c-NOME4L5M.min.js +0 -1
- package/dist/c-OKIJBK5K.min.js +0 -2
- package/dist/c-OXV4W7YX.min.js +0 -1
- package/dist/c-P73SQZEP.min.js +0 -1
- package/dist/c-PD5EZI24.min.js +0 -1
- package/dist/c-RAL7HCTV.min.js +0 -1
- package/dist/c-S4OGXAVO.min.js +0 -1
- package/dist/c-UWE3VZEO.min.js +0 -1
- package/dist/c-VP7WX6QI.min.js +0 -1
- package/dist/c-VW7ZSLDC.min.js +0 -1
- package/dist/c-WDVYLMCM.min.js +0 -1
- package/dist/c-XEACLH4B.min.js +0 -1
- package/dist/c-YJDGSPNB.min.js +0 -1
- package/dist/c-ZYBEKQCT.min.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{a as darkenColor,b as lightenColor}from"./c-ATM475SA.min.js";export{a as useForceLayout}from"./c-MYRI7NF2.min.js";export{a as registerBuiltInXYPlugins}from"./c-HFQ3Z65X.min.js";export{aC as AccessibleNavTree,bc as ChartContainer,bf as ChartGrid,bg as ContextLayout,bh as DetailsPanel,bv as IntentMark,bx as MobileAnnotationCalloutList,bd as MobileChartContainer,aG as MobileStandardControls,bk as ObservationReadout,be as SmallMultipleChart,e as auditVisualizationControls,an as buildNavigationTree,aD as clampMobileRange,W as configToJSX,X as configToJSXWithReport,V as copyConfig,bs as dashboardIntentManifest,Z as deserializeSelections,a as exportChart,S as fromConfig,U as fromURL,$ as fromVegaLite,bu as intentManifestFromRecipe,bl as observedDatum,Y as serializeSelections,bt as summarizeIntentManifest,R as toConfig,T as toURL,aF as useMobileRangeControls,bw as useNavigationSync,aE as zoomMobileRange}from"./c-MHNU6KYQ.min.js";import{b as t}from"./c-G7EPPJDS.min.js";export{a as VISUALIZATION_CONTROL_TYPES,b as createControlObservationAdapter}from"./c-G7EPPJDS.min.js";import{a as u,b as v}from"./c-WFX456JK.min.js";export{d as CARBON_ALERT,c as CARBON_CATEGORICAL_14,e as THEME_PRESETS,g as ThemeProvider,f as resolveThemePreset,b as themeToCSSVariables}from"./c-WFX456JK.min.js";export{g as AreaChart,k as BubbleChart,f as BumpChart,q as CandlestickChart,b as ConnectedScatterplot,h as DifferenceChart,j as Heatmap,m as MinimapChart,p as MultiAxisLineChart,o as QuadrantChart,a as Scatterplot,l as ScatterplotMatrix,i as StackedAreaChart,r as WaterfallChart,c as XYCustomChart,e as rankBumpData}from"./c-CPJR4LHF.min.js";export{e as LineChart}from"./c-C332PFY6.min.js";export{b as BarChart,f as BoxPlot,l as DonutChart,j as DotPlot,o as FunnelChart,m as GaugeChart,n as GroupedBarChart,g as Histogram,d as LikertChart,r as OrdinalCustomChart,k as PieChart,p as RadarChart,i as RidgelinePlot,c as StackedBarChart,a as StreamOrdinalFrame,e as SwarmPlot,q as SwimlaneChart,h as ViolinPlot}from"./c-P73SQZEP.min.js";export{b as ChordDiagram,n as CirclePack,a as ForceDirectedGraph,p as NetworkCustomChart,o as OrbitDiagram,k as ProcessSankey,c as SankeyDiagram,l as TreeDiagram,m as Treemap,f as diagnoseProcessSankeyLayout,h as diagnoseProcessSankeyProps,g as explainProcessSankeyLayout,e as formatProcessSankeyIssue,i as inventoryAtTime,j as toProcessSankeyTime,d as validateProcessSankey}from"./c-4VFGNUWG.min.js";export{p as RealtimeHeatmap,k as RealtimeHistogram,i as RealtimeLineChart,n as RealtimeSwarmChart,m as RealtimeTemporalHistogram,o as RealtimeWaterfallChart,l as TemporalHistogram}from"./c-CRKR5M42.min.js";import"./c-NOME4L5M.min.js";import"./c-NGMMPKNJ.min.js";export{f as StreamXYFrame}from"./c-DDZ5TZ7P.min.js";import{a as x}from"./c-6MEEA5VY.min.js";export{d as IncrementalExtent,a as pointerToLocalPoint}from"./c-6MEEA5VY.min.js";export{a as RingBuffer}from"./c-RAL7HCTV.min.js";export{b as StreamNetworkFrame,a as useNetworkPerspective}from"./c-XEACLH4B.min.js";export{f as preloadNetworkPerspectiveExtras}from"./c-PTFHNN34.min.js";export{b as useCustomLayoutSelection}from"./c-363Q2L4Z.min.js";export{C as AnnotationLabel,bd as CategoryColorProvider,aZ as ChartErrorBoundary,bu as LinkedCharts,aL as MultiLineTooltip,aQ as MultiPointTooltip,aK as Tooltip,D as annotationStableId,f as compileMotionEncoding,bO as composeStyleRules,j as deriveMotionVector,B as estimateLabelWidth,aM as isMultiTooltip,bK as makeNodeRuleContext,bI as makeRuleValueResolver,bP as makeStyleRuleStyleFn,bJ as makeXYRuleContext,bL as matchesThreshold,aR as normalizeTooltip,h as opacityFromAge,e as resolveMotionAccessor,g as resolveMotionAge,i as resolveMotionVector,aO as resolveMultiCapableTooltip,bl as resolveResponsiveRules,bN as resolveStyleRules,aP as resolveTooltipContent,bk as responsiveRuleMatches,bM as ruleMatches,aJ as smartTooltipEntries,bQ as styleRulesToNodeStyle,bS as styleRulesToPieceStyle,bR as styleRulesToXYStyle,bi as useBrushSelection,be as useCategoryColors,bq as useChartObserver,S as useCrosshairPosition,bj as useFilteredData,br as useLinkedChartsActive,T as useLinkedCrosshair,bh as useLinkedHover,bf as useSelection,bg as useSelectionActions}from"./c-VW7ZSLDC.min.js";export{h as createHatchPattern,j as hatchFillId,k as hatchPatternDef,i as isHatchFill,l as resolveSvgFill}from"./c-BJKGYOPX.min.js";export{d as COLOR_BLIND_SAFE_CATEGORICAL,f as DARK_THEME,g as HIGH_CONTRAST_THEME,e as LIGHT_THEME,w as TooltipRoot,z as hasOwnTooltipChrome,s as hasTooltipContent,y as markTooltipChrome,D as useTheme}from"./c-TC47SNSI.min.js";import{b as P,c as M}from"./c-GRTKU3C7.min.js";import*as I from"react";import{useRef as F,useMemo as A,useEffect as O}from"react";import{jsx as E,jsxs as N}from"react/jsx-runtime";export{NetworkPerspectiveBillboard,NetworkPerspectiveGround}from"./semiotic-network-placement.module.min.js";var L=2*Math.PI;function G(e,t,r){let a=r?.center?.x??0,o=r?.center?.y??0;return{x:a+Math.sin(e)*t,y:o-Math.cos(e)*t}}function K(e,t,r,a,o){let n=o?.center,i=(e,t)=>{let{x:r,y:a}=G(e,t,{center:n});return`${H(r)},${H(a)}`},l=Math.max(0,r),s=Math.max(l,a),c=Math.abs(t-e),u=t>=e?1:0;if(c>=L-1e-6){let e=n?.x??0,t=n?.y??0,r=`${H(e)},${H(t-s)}`,a=`${H(e)},${H(t+s)}`,o=`M${r} A${H(s)},${H(s)} 0 1 1 ${a} A${H(s)},${H(s)} 0 1 1 ${r} Z`;if(l>0){let r=`${H(e)},${H(t-l)}`,a=`${H(e)},${H(t+l)}`;o+=` M${r} A${H(l)},${H(l)} 0 1 0 ${a} A${H(l)},${H(l)} 0 1 0 ${r} Z`}return o}let m=c>Math.PI?1:0,p=i(e,s),d=i(t,s);if(l<=0){let e=n?.x??0,t=n?.y??0;return`M${H(e)},${H(t)} L${p} A${H(s)},${H(s)} 0 ${m} ${u} ${d} Z`}let h=i(t,l),y=i(e,l);return`M${p} A${H(s)},${H(s)} 0 ${m} ${u} ${d} L${h} A${H(l)},${H(l)} 0 ${m} ${1===u?0:1} ${y} Z`}function H(e){return Math.round(1e3*e)/1e3}var J="var(--semiotic-focus, #005fcc)";function Q(e){return Number(e.toPrecision(12))}function _(e){try{return e.matches(":focus-visible")}catch{return!0}}function ee({value:e,onChange:r,period:a=365,radius:o=180,innerRadius:n=14,width:i,height:l,step:s,largeStep:c,label:u="Range",formatValue:m,arcFill:p="var(--semiotic-primary, #4e79a7)",stroke:d="var(--semiotic-bg, #ffffff)",onObservation:h,controlType:y="range-boundary",controlId:f,chartId:$,chartType:g="CircularBrush",className:v,style:b}){let C=i??2*o+40,x=l??2*o+40,S=C/2,T=x/2,P=function(e){let[t,r]=e,a=r-t||1,o=L;return e=>0+(e-t)/a*(o-0)}([0,a]),M=Number.isInteger(a)&&a>=2,j=null!=s&&s>0?s:M?1:a/100,k=null!=c&&c>0?c:M?7:10*j,D=Q(Math.max(0,Math.ceil(a/j-1e-9)-1)*j),w=F(null),R=F(e);R.current=e;let[A,O]=I.useState(null),B=F(!1),V=I.useMemo(()=>t({controlType:y,controlId:f,chartId:$,chartType:g,onObservation:h}),[y,f,$,g,h]),W=e=>{let t=Q(function(e,t,r=0){return t<=0?e:((e-r)%t+t)%t+r}(e,a));return t>=a?0:t},U=(e,t)=>e.end-e.start>=a?e:{start:W(e.start+t),end:W(e.end+t)},Y=(e,t,a)=>{let o=e(R.current);R.current=o;let n=[o.start,o.end];a.start&&V("control-start",n,t),r(e),V("control-change",n,t),a.end&&V("control-end",n,t)},z=e=>{let t=e.currentTarget.ownerSVGElement??e.currentTarget,r=t.getBoundingClientRect(),o=t.viewBox?.baseVal,n=o?.width||C,i=o?.height||x;return l=function(e,t){return(Math.atan2(e-0,-(t-0))+L)%L}((e.clientX-r.left)*(n/(r.width||1))-S,(e.clientY-r.top)*(i/(r.height||1))-T)/L*a,W(Q(Math.round(l/j)*j));var l},H=(e,t)=>{e.preventDefault(),e.stopPropagation();let r=e.currentTarget;r.ownerDocument?.activeElement!==r&&(B.current=!0,r.focus?.({preventScroll:!0}),B.current=!1),r.ownerSVGElement?.setPointerCapture?.(e.pointerId),w.current={mode:t,lastValue:z(e),changed:!1}},X=e=>{let t=e.currentTarget.ownerSVGElement??e.currentTarget;t?.hasPointerCapture?.(e.pointerId)&&t.releasePointerCapture(e.pointerId);let r=w.current;if(w.current=null,r?.changed){let e=R.current;V("control-end",[e.start,e.end],"pointer")}},Z=e=>Y(e,"keyboard",{start:!0,end:!0}),q=(e,t)=>{Z("range"===e?e=>U(e,t):r=>({...r,[e]:W(r[e]+t)}))},ee=(e,t)=>{Z("range"===e?e=>U(e,t-e.start):r=>({...r,[e]:t}))},te=e=>t=>{let r=t.shiftKey?k:j,a={ArrowRight:()=>q(e,r),ArrowUp:()=>q(e,r),ArrowLeft:()=>q(e,-r),ArrowDown:()=>q(e,-r),PageUp:()=>q(e,k),PageDown:()=>q(e,-k),Home:()=>ee(e,0),End:()=>ee(e,D)}[t.key];a&&(t.preventDefault(),a())},re=e=>({onFocus:t=>O({mode:e,visible:!B.current&&_(t.currentTarget)}),onBlur:()=>O(null)}),ae=e=>A?.mode===e&&A.visible,oe=e.start<=e.end?[[e.start,e.end]]:[[e.start,a],[0,e.end]],ne=e=>m?m(e):String(e);return E("svg",{viewBox:`0 0 ${C} ${x}`,width:C,height:x,className:v,onPointerMove:e=>{let t=w.current;if(!t)return;let r=z(e),o=!t.changed;if("range"===t.mode){let e=function(e,t,r){if(r<=0)return t-e;let a=(t-e)%r;return a>r/2?a-=r:a<=-r/2&&(a+=r),a}(t.lastValue,r,a);if(0===e)return;return t.lastValue=r,t.changed=!0,void Y(t=>U(t,e),"pointer",{start:o,end:!1})}let n=t.mode;R.current[n]!==r&&(t.changed=!0,Y(e=>({...e,[n]:r}),"pointer",{start:o,end:!1}))},onPointerUp:X,onPointerCancel:X,onLostPointerCapture:X,style:{touchAction:"none",...b},"aria-label":`${u} brush`,"data-viz-control-id":f,children:N("g",{transform:`translate(${S},${T})`,children:[E("g",{role:"slider",tabIndex:0,"aria-label":`${u} (move both ends)`,"aria-valuemin":0,"aria-valuemax":D,"aria-valuenow":e.start,"aria-valuetext":`${ne(e.start)} to ${ne(e.end)}`,onPointerDown:e=>H(e,"range"),onKeyDown:te("range"),...re("range"),style:{cursor:"grab",outline:"none"},children:oe.map(([e,t],r)=>E("path",{d:K(P(e),P(t),n,o),fill:p,fillOpacity:.35,stroke:ae("range")?J:d,strokeWidth:ae("range")?3:1},r))}),["start","end"].map(t=>{let r=e[t],i=(e=>G(P(e),n))(r),l=(e=>G(P(e),o+8))(r);return N("g",{role:"slider",tabIndex:0,"aria-label":`${u} ${t}`,"aria-valuemin":0,"aria-valuemax":"end"===t&&e.end===a?a:D,"aria-valuenow":r,"aria-valuetext":ne(r),onPointerDown:e=>H(e,t),onKeyDown:te(t),...re(t),style:{cursor:"grab",outline:"none"},children:[E("line",{x1:i.x,y1:i.y,x2:l.x,y2:l.y,stroke:"transparent",strokeWidth:20}),E("line",{x1:i.x,y1:i.y,x2:l.x,y2:l.y,stroke:d,strokeWidth:1.5}),E("circle",{cx:l.x,cy:l.y,r:4.5,fill:d,stroke:p,strokeWidth:1}),ae(t)&&E("circle",{cx:l.x,cy:l.y,r:8,fill:"none",stroke:J,strokeWidth:2})]},t)})]})})}function te(e,t,r,a,o){let n=Math.min(r,Math.max(t,e));if(!(a>0))return n;let i=o+Math.round((n-o)/a)*a;return Math.min(r,Math.max(t,Number(i.toFixed(12))))}function re(e,t,r,{min:a,max:o,step:n,largeStep:i}){let l=t?i:n;switch(e){case"ArrowLeft":case"ArrowDown":return r-l;case"ArrowRight":case"ArrowUp":return r+l;case"PageDown":return r-i;case"PageUp":return r+i;case"Home":return a;case"End":return o;default:return null}}function ae({value:e,onChange:r,pointToValue:a,pointerToValue:o,min:n,max:i,step:l=1,stepOrigin:s=n,largeStep:c=5*l,x:u,y:m,controlType:p="value",controlId:d,label:h,ariaRoleDescription:y,valueText:f,radius:$=12,fill:g="var(--semiotic-bg, #ffffff)",stroke:v="var(--semiotic-primary, #4e79a7)",strokeWidth:b=4,labelText:C,labelDx:S=16,labelDy:T=-16,labelClassName:P,className:M,disabled:j=!1,onChangeStart:k,onChangeEnd:D,onObservation:w,chartId:R,chartType:A}){let O=F(null),L=F(e);L.current=e;let B=I.useMemo(()=>t({controlType:p,controlId:d,chartId:R,chartType:A,onObservation:w}),[R,A,d,p,w]),V=e=>{if(j)return;let t=(e=>{if(a){let t=x(e);return t?a(t):null}return o?.(e)})(e);if(null==t||!Number.isFinite(t))return;let c=te(t,n,i,l,s);L.current=c,r(c),B("control-change",c,"pointer")},W=e=>{e.stopPropagation(),O.current===e.pointerId&&(e.currentTarget.hasPointerCapture?.(e.pointerId)&&e.currentTarget.releasePointerCapture?.(e.pointerId),O.current=null,D?.(L.current),B("control-end",L.current,"pointer"))},G=["semiotic-direct-manipulation-control",M].filter(Boolean).join(" ");return N("g",{className:G,role:"slider",tabIndex:j?-1:0,"aria-disabled":j||void 0,"aria-label":h,"aria-valuemin":n,"aria-valuemax":i,"aria-valuenow":e,"aria-valuetext":f??`${h}: ${e}`,"aria-roledescription":y,"data-viz-control":p,"data-viz-control-id":d,"data-viz-control-state":"controlled",pointerEvents:"all",onPointerDown:e=>{j||(e.preventDefault(),e.stopPropagation(),e.currentTarget.setPointerCapture?.(e.pointerId),O.current=e.pointerId,k?.(L.current),B("control-start",L.current,"pointer"),V(e))},onPointerMove:e=>{e.stopPropagation(),O.current===e.pointerId&&V(e)},onPointerUp:W,onPointerCancel:W,onLostPointerCapture:W,onKeyDown:e=>{if(j)return;let t=L.current,a=re(e.key,e.shiftKey,t,{min:n,max:i,step:l,largeStep:c});if(null===a)return;e.preventDefault();let o=te(a,n,i,l,s);o!==t&&(k?.(t),B("control-start",t,"keyboard"),L.current=o,r(o),B("control-change",o,"keyboard"),D?.(o),B("control-end",o,"keyboard"))},style:{cursor:j?"default":"grab",touchAction:"none"},children:[E("circle",{className:"semiotic-direct-manipulation-control__hit",cx:u,cy:m,r:$+10,fill:"transparent"}),E("circle",{className:"semiotic-direct-manipulation-control__handle",cx:u,cy:m,r:$,fill:g,stroke:v,strokeWidth:b}),C?E("text",{className:P,x:u+S,y:m+T,fill:v,children:C}):null]})}function oe({values:e,onChange:r,markers:a,valueToPoint:o,pointToValue:n,min:i,max:l,step:s=1,stepOrigin:c=i,largeStep:u=5*s,ordered:m=!0,label:p,ariaRoleDescription:d,controlType:h="value",controlId:y="markers",radius:f=12,fill:$="var(--semiotic-bg, #ffffff)",stroke:g="var(--semiotic-primary, #4e79a7)",strokeWidth:v=4,labelDx:b=16,labelDy:C=-16,labelClassName:S,className:T,disabled:j=!1,onChangeStart:k,onChangeEnd:D,onObservation:w,chartId:R,chartType:A}){let O=F([...e]);O.current=[...e];let L=F(null),B=I.useMemo(()=>a.map((e,r)=>t({controlType:h,controlId:e.controlId??`${y}-${r}`,chartId:R,chartType:A,onObservation:w})),[R,A,y,h,a,w]),V=(e,t)=>m?{lo:e>0?Math.max(i,t[e-1]):i,hi:e<t.length-1?Math.min(l,t[e+1]):l}:{lo:i,hi:l},W=(e,t,a)=>{let{lo:o,hi:n}=V(e,O.current),i=te(t,o,n,s,c);if(i===O.current[e])return!1;let l=[...O.current];return l[e]=i,O.current=l,r(l,{index:e,source:a}),B[e]?.("control-change",i,a),!0},G=(e,t)=>{let r=x(e),a=r?n(r,t):null;return null!=a&&Number.isFinite(a)?a:null},U=e=>t=>{if(j)return;t.preventDefault(),t.stopPropagation(),t.currentTarget.setPointerCapture?.(t.pointerId);let r=O.current[e],a=m?O.current.flatMap((e,t)=>e===r?[t]:[]):[e];L.current={pointerId:t.pointerId,pressedIndex:e,startValue:r,coincident:a,active:a.length>1?null:e};let o={index:e,source:"pointer"};if(k?.([...O.current],o),B[e]?.("control-start",r,"pointer"),1===a.length){let r=G(t,e);null!=r&&W(e,r,"pointer")}},Y=e=>{e.stopPropagation();let t=L.current;if(!t||t.pointerId!==e.pointerId)return;let r=G(e,t.active??t.pressedIndex);if(null!=r){if(null===t.active){if(r===t.startValue)return;t.active=r<t.startValue?P(t.coincident):M(t.coincident)}W(t.active,r,"pointer")}},z=e=>{e.stopPropagation();let t=L.current;if(!t||t.pointerId!==e.pointerId)return;e.currentTarget.hasPointerCapture?.(e.pointerId)&&e.currentTarget.releasePointerCapture?.(e.pointerId),L.current=null;let r=t.active??t.pressedIndex;D?.([...O.current],{index:r,source:"pointer"}),B[r]?.("control-end",O.current[r],"pointer")},K=e=>t=>{if(j)return;let{lo:r,hi:a}=V(e,O.current),o=O.current[e],n=re(t.key,t.shiftKey,o,{min:r,max:a,step:s,largeStep:u});if(null===n)return;t.preventDefault();let i={index:e,source:"keyboard"},l=[...O.current];te(n,r,a,s,c)!==o&&(k?.(l,i),B[e]?.("control-start",o,"keyboard"),W(e,n,"keyboard"),D?.([...O.current],i),B[e]?.("control-end",O.current[e],"keyboard"))};return E("g",{className:["semiotic-direct-manipulation-markers",T].filter(Boolean).join(" "),role:"group","aria-label":p,children:e.map((t,r)=>{let n=a[r]??{label:`Marker ${r+1}`},i=o(t,r),{lo:l,hi:s}=V(r,e),c=n.stroke??g,u=n.radius??f;return N("g",{className:["semiotic-direct-manipulation-control",n.className].filter(Boolean).join(" "),role:"slider",tabIndex:j?-1:0,"aria-disabled":j||void 0,"aria-label":n.label,"aria-valuemin":l,"aria-valuemax":s,"aria-valuenow":t,"aria-valuetext":n.valueText?.(t)??`${n.label}: ${t}`,"aria-roledescription":d,"data-viz-control":h,"data-viz-control-id":n.controlId??`${y}-${r}`,"data-viz-control-state":"controlled",pointerEvents:"all",onPointerDown:U(r),onPointerMove:Y,onPointerUp:z,onPointerCancel:z,onLostPointerCapture:z,onKeyDown:K(r),style:{cursor:j?"default":"grab",touchAction:"none"},children:[E("circle",{className:"semiotic-direct-manipulation-control__hit",cx:i.x,cy:i.y,r:u+10,fill:"transparent"}),E("circle",{className:"semiotic-direct-manipulation-control__handle",cx:i.x,cy:i.y,r:u,fill:n.fill??$,stroke:c,strokeWidth:v}),n.labelText?E("text",{className:S,x:i.x+b,y:i.y+C,fill:c,children:n.labelText}):null]},n.controlId??r)})})}function ne(e,t=":root"){return u(t),`${t} {\n${Object.entries(v(e)).map(([e,t])=>` ${e}: ${t};`).join("\n")}\n}`}function ie(e){return{semiotic:{mode:{$value:e.mode,$type:"string"},bg:{$value:e.colors.background,$type:"color"},text:{$value:e.colors.text,$type:"color"},"text-secondary":{$value:e.colors.textSecondary,$type:"color"},grid:{$value:e.colors.grid,$type:"color"},border:{$value:e.colors.border,$type:"color"},primary:{$value:e.colors.primary,$type:"color"},...null!=e.colors.focus?{focus:{$value:e.colors.focus,$type:"color"}}:{},...null!=e.colors.cellBorder?{"cell-border":{$value:e.colors.cellBorder,$type:"color"}}:{},"font-family":{$value:e.typography.fontFamily,$type:"fontFamily"},"title-size":{$value:`${e.typography.titleSize}px`,$type:"dimension"},...null!=e.borderRadius?{"border-radius":{$value:e.borderRadius,$type:"dimension"}}:{},...null!=e.tooltip?{tooltip:{...null!=e.tooltip.background?{bg:{$value:e.tooltip.background,$type:"color"}}:{},...null!=e.tooltip.text?{text:{$value:e.tooltip.text,$type:"color"}}:{},...null!=e.tooltip.borderRadius?{radius:{$value:e.tooltip.borderRadius,$type:"dimension"}}:{},...null!=e.tooltip.fontSize?{"font-size":{$value:e.tooltip.fontSize,$type:"dimension"}}:{},...null!=e.tooltip.shadow?{shadow:{$value:e.tooltip.shadow,$type:"shadow"}}:{},...null!=e.tooltip.chrome?{chrome:{$value:e.tooltip.chrome,$type:"string"}}:{}}}:{},...null!=e.colors.selection||null!=e.colors.selectionOpacity?{selection:{...null!=e.colors.selection?{color:{$value:e.colors.selection,$type:"color"}}:{},...null!=e.colors.selectionOpacity?{opacity:{$value:e.colors.selectionOpacity,$type:"number"}}:{}}}:{},...null!=e.accessibility?{accessibility:Object.fromEntries(Object.entries(e.accessibility).map(([e,t])=>[e,{$value:t,$type:"boolean"}]))}:{},categorical:{$value:[...e.colors.categorical],$type:"color",$description:"Categorical color palette"},sequential:{$value:e.colors.sequential,$type:"string",$description:"d3-scale-chromatic sequential scheme name"},...e.aesthetics?{aesthetics:{...e.aesthetics.name?{profile:{$value:e.aesthetics.name,$type:"string"}}:{},...null!=e.aesthetics.minimumScore?{"minimum-score":{$value:e.aesthetics.minimumScore,$type:"number"}}:{},weights:Object.fromEntries(Object.entries(e.aesthetics.weights??{}).map(([e,t])=>[e,{$value:t,$type:"number"}])),thresholds:Object.fromEntries(Object.entries(e.aesthetics.thresholds??{}).map(([e,t])=>[e,{$value:t,$type:"number"}])),rationales:Object.fromEntries(Object.entries(e.aesthetics.rationales??{}).map(([e,t])=>[e,{$value:t,$type:"string"}]))}}:{},...e.colors.diverging?{diverging:{$value:e.colors.diverging,$type:"string",$description:"d3-scale-chromatic diverging scheme name"}}:{},...e.colors.annotation?{"annotation-color":{$value:e.colors.annotation,$type:"color"}}:{},...null!=e.typography.legendSize?{"legend-font-size":{$value:`${e.typography.legendSize}px`,$type:"dimension"}}:{},...null!=e.typography.legendFontFamily?{"legend-font-family":{$value:e.typography.legendFontFamily,$type:"fontFamily"}}:{},...null!=e.typography.legendFontWeight?{"legend-font-weight":{$value:e.typography.legendFontWeight,$type:"fontWeight"}}:{},...null!=e.typography.titleFontSize?{"title-font-size":{$value:`${e.typography.titleFontSize}px`,$type:"dimension"}}:{},...null!=e.typography.titleFontFamily?{"title-font-family":{$value:e.typography.titleFontFamily,$type:"fontFamily"}}:{},...null!=e.typography.titleFontWeight?{"title-font-weight":{$value:e.typography.titleFontWeight,$type:"fontWeight"}}:{},...null!=e.typography.tickFontFamily?{"tick-font-family":{$value:e.typography.tickFontFamily,$type:"fontFamily"}}:{},...null!=e.typography.tickSize?{"tick-font-size":{$value:`${e.typography.tickSize}px`,$type:"dimension"}}:{},...null!=e.typography.labelSize?{"axis-label-font-size":{$value:`${e.typography.labelSize}px`,$type:"dimension"}}:{},...null!=e.colors.secondary?{secondary:{$value:e.colors.secondary,$type:"color"}}:{},...null!=e.colors.surface?{surface:{$value:e.colors.surface,$type:"color"}}:{},...e.colors.success?{success:{$value:e.colors.success,$type:"color"}}:{},...e.colors.danger?{danger:{$value:e.colors.danger,$type:"color"}}:{},...e.colors.warning?{warning:{$value:e.colors.warning,$type:"color"}}:{},...e.colors.error?{error:{$value:e.colors.error,$type:"color"}}:{},...e.colors.info?{info:{$value:e.colors.info,$type:"color"}}:{}}}}function le(e){return e<10?`0${e}`:String(e)}var se=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ce(e,t){return t?{month:e.getUTCMonth(),day:e.getUTCDate(),year:e.getUTCFullYear(),hours:e.getUTCHours(),minutes:e.getUTCMinutes(),seconds:e.getUTCSeconds()}:{month:e.getMonth(),day:e.getDate(),year:e.getFullYear(),hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()}}var ue={year:!0,date:!0};function me(e,t,r,a=ue){let{month:o,day:n,year:i,hours:l,minutes:s,seconds:c}=r(e),u=se[o],m=le(l),p=le(s),d=le(c),h=a.year?`${u} ${n}, ${i} `:`${u} ${n} `;switch(t){case"seconds":return`${a.date?h:""}${m}:${p}:${d}`;case"minutes":case"hours":return`${a.date?h:""}${m}:${p}`;case"days":return a.year?`${u} ${n}, ${i}`:`${u} ${n}`;case"months":return a.year?`${u} ${i}`:`${u}`;case"years":return`${i}`}}function pe(e,t={}){let r,a,o=e,n=(m=function(e={}){let t=e.timeZone;return"UTC"===t?{kind:"utc"}:"local"===t?{kind:"local"}:"string"==typeof t&&t.length>0?{kind:"iana",id:t}:!1===e.utc?{kind:"local"}:{kind:"utc"}}(t),"utc"===m.kind?e=>ce(e,!0):"local"===m.kind?e=>ce(e,!1):function(e){let t;try{t=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hourCycle:"h23"})}catch{return e=>ce(e,!0)}return e=>{let r={};for(let a of t.formatToParts(e))"literal"!==a.type&&(r[a.type]=a.value);return{month:Math.max(0,(Number(r.month)||1)-1),day:Number(r.day)||1,year:Number(r.year)||1970,hours:Number(r.hour)||0,minutes:Number(r.minute)||0,seconds:Number(r.second)||0}}}(m.id)),{includeYear:i="always",includeDate:l="always"}=t,s="clock"===t.deltaStyle,c="auto"===i?n(new Date(t.referenceTime??Date.now())).year:void 0,u={referenceYear:!1,oneDay:!1};var m;return(t,m,p)=>{let d=t instanceof Date?t:new Date(t);!e&&p&&p.length>=2&&p!==r&&(r=p,o=function(e){if(e.length<2)return"days";let t=[];for(let r=1;r<e.length;r++)t.push(e[r]-e[r-1]);t.sort((e,t)=>e-t);let r=t[Math.floor(t.length/2)];return r<12e4?"seconds":r<72e5?"minutes":r<1728e5?"hours":r<5184e6?"days":r<3456e7?"months":"years"}(p));let h=o||"days";if(null==m||!p||0===p.length)return me(d,h,n);let y="seconds"===h||"minutes"===h||"hours"===h,f="always"===i&&"always"===l?ue:{year:"years"===h||"never"!==i,date:!y||"never"!==l};if(0===m){if(f===ue)return me(d,h,n);let{referenceYear:e,oneDay:t}="auto"===i||"auto"===l?(e=>{if(e!==a){a=e;let t=e.map(e=>n(new Date(e))),[r]=t;u={referenceYear:t.every(e=>e.year===c),oneDay:t.every(e=>e.year===r.year&&e.month===r.month&&e.day===r.day)}}return u})(p):u,r=f.date&&!(y&&"auto"===l&&t),o=r&&f.year&&!("years"!==h&&"auto"===i&&e);return me(d,h,n,{year:o||"years"===h,date:r})}return function(e,t,r,a,o=ue,n=!1){let i=a(e),l=a(t),s=i.year!==l.year,c=s||i.month!==l.month,u=c||i.day!==l.day,m=u||i.hours!==l.hours,p=m||i.minutes!==l.minutes,d=o.date,h=s&&o.year,y=se[i.month],{day:f,year:$}=i,g=le(i.hours),v=le(i.minutes),b=le(i.seconds);switch(r){case"seconds":return h&&d?`${y} ${f}, ${$} ${g}:${v}:${b}`:u&&d?`${y} ${f} ${g}:${v}:${b}`:m||n?`${g}:${v}:${b}`:p?`${v}:${b}`:`:${b}`;case"minutes":return h&&d?`${y} ${f}, ${$} ${g}:${v}`:u&&d?`${y} ${f} ${g}:${v}`:m||n?`${g}:${v}`:`:${v}`;case"hours":return h&&d?`${y} ${f}, ${$} ${g}:${v}`:u&&d?`${y} ${f} ${g}:${v}`:`${g}:${v}`;case"days":return h?`${y} ${f}, ${$}`:c||n?`${y} ${f}`:`${f}`;case"months":return h?`${y} ${$}`:`${y}`;case"years":return`${$}`}}(d,new Date(p[m-1]),h,n,f,s)}}var de=[[1e3,"K"],[1e6,"M"],[1e9,"B"]];function he(e){if(null==e)return"";if("number"!=typeof e||!isFinite(e))return String(e);if(0===e)return"0";let t=parseFloat(e.toPrecision(12)),r=Math.abs(t);if(r>=1e4)for(let e=de.length-1;e>=0;e--){let[a,o]=de[e];if(r<a)continue;let n=parseFloat((t/a).toPrecision(3));if(Math.abs(n)>=1e3&&e<de.length-1){let[r,a]=de[e+1];return`${parseFloat((t/r).toPrecision(3))}${a}`}return`${n}${o}`}return Number.isInteger(t)?String(t):String(parseFloat(t.toPrecision(6)))}function ye(e,t,r,a){let o=new Map,n=null==a;if(r.forEach((e,t)=>{let r=a?.(e,t);(null==r||o.has(r))&&(n=!0),o.set(r??String(t),e)}),n&&(o.clear(),r.forEach((e,t)=>o.set(String(t),e))),0===t.size)return fe(e,[...r]),o;let i=[...t.values()],l=null==a||[...t.keys()].some((e,t)=>a(i[t],t)!==e);if(n||l)return i.length<=r.length&&i.every((e,t)=>e===r[t])&&n===l?fe(e,r.slice(i.length)):$e(e,r),o;let s=[];if(t.forEach((e,t)=>{o.has(t)||s.push(t)}),s.length>0&&!e.remove||!e.update&&!e.remove&&[...o].some(([e,r])=>t.has(e)&&t.get(e)!==r))return $e(e,r),o;s.length>0&&e.remove?.(s);let c=[];return o.forEach((r,a)=>{let o=t.get(a);void 0===o?c.push(r):o!==r&&(e.update?e.update(a,()=>r):(e.remove?.(a),c.push(r)))}),fe(e,c),o}function fe(e,t){if(0!==t.length)if(e.pushMany)e.pushMany(t);else if(e.push)for(let r of t)e.push(r)}function $e(e,t){if(!e.clear)throw new Error("Synchronizing these changed rows requires a clear() handle");e.clear(),fe(e,[...t])}function ge(e,t,r={}){let{id:a,resetKey:o}=r,n=A(()=>function(e){return null==e?null:"function"==typeof e?(t,r)=>{let a=e(t,r);return null==a?null:String(a)}:t=>{let r=t[e];return null==r?null:String(r)}}(a),[a]),i=F({map:new Map,handle:null,resetKey:void 0});O(()=>{let r=e.current;if(!r)return;let a=i.current;(a.handle!==r||a.resetKey!==o)&&(r.clear?.(),a.map=new Map,a.handle=r,a.resetKey=o),a.map=ye(r,a.map,t,n)},[e,t,n,o])}export{ee as CircularBrush,ae as DirectManipulationControl,oe as DirectManipulationMarkers,pe as adaptiveTimeTicks,he as smartTickFormat,ye as syncPushBuffer,ne as themeToCSS,ie as themeToTokens,ge as useSyncedPushData};
|
|
2
|
+
export{a as darkenColor,b as lightenColor}from"./c-ATM475SA.min.js";export{a as useForceLayout}from"./c-XZJWL7UL.min.js";export{a as registerBuiltInXYPlugins}from"./c-AQUX6L2O.min.js";export{aC as AccessibleNavTree,bc as ChartContainer,bf as ChartGrid,bg as ContextLayout,bh as DetailsPanel,bv as IntentMark,bx as MobileAnnotationCalloutList,bd as MobileChartContainer,aG as MobileStandardControls,bk as ObservationReadout,be as SmallMultipleChart,e as auditVisualizationControls,an as buildNavigationTree,aD as clampMobileRange,W as configToJSX,X as configToJSXWithReport,V as copyConfig,bs as dashboardIntentManifest,Z as deserializeSelections,a as exportChart,S as fromConfig,U as fromURL,$ as fromVegaLite,bu as intentManifestFromRecipe,bl as observedDatum,Y as serializeSelections,bt as summarizeIntentManifest,R as toConfig,T as toURL,aF as useMobileRangeControls,bw as useNavigationSync,aE as zoomMobileRange}from"./c-4P2EM44G.min.js";import{b as t}from"./c-G7EPPJDS.min.js";export{a as VISUALIZATION_CONTROL_TYPES,b as createControlObservationAdapter}from"./c-G7EPPJDS.min.js";import{a as u,b as v}from"./c-WFX456JK.min.js";export{d as CARBON_ALERT,c as CARBON_CATEGORICAL_14,e as THEME_PRESETS,g as ThemeProvider,f as resolveThemePreset,b as themeToCSSVariables}from"./c-WFX456JK.min.js";export{g as AreaChart,k as BubbleChart,f as BumpChart,q as CandlestickChart,b as ConnectedScatterplot,h as DifferenceChart,j as Heatmap,m as MinimapChart,p as MultiAxisLineChart,o as QuadrantChart,a as Scatterplot,l as ScatterplotMatrix,i as StackedAreaChart,r as WaterfallChart,c as XYCustomChart,e as rankBumpData}from"./c-OSLNYZ3Q.min.js";export{e as LineChart}from"./c-RDFFLRKC.min.js";export{b as BarChart,f as BoxPlot,l as DonutChart,j as DotPlot,o as FunnelChart,m as GaugeChart,n as GroupedBarChart,g as Histogram,d as LikertChart,r as OrdinalCustomChart,k as PieChart,p as RadarChart,i as RidgelinePlot,c as StackedBarChart,a as StreamOrdinalFrame,e as SwarmPlot,q as SwimlaneChart,h as ViolinPlot}from"./c-BR5QDUCR.min.js";export{b as ChordDiagram,n as CirclePack,a as ForceDirectedGraph,p as NetworkCustomChart,o as OrbitDiagram,k as ProcessSankey,c as SankeyDiagram,l as TreeDiagram,m as Treemap,f as diagnoseProcessSankeyLayout,h as diagnoseProcessSankeyProps,g as explainProcessSankeyLayout,e as formatProcessSankeyIssue,i as inventoryAtTime,j as toProcessSankeyTime,d as validateProcessSankey}from"./c-OIJL2WZH.min.js";export{p as RealtimeHeatmap,k as RealtimeHistogram,i as RealtimeLineChart,n as RealtimeSwarmChart,m as RealtimeTemporalHistogram,o as RealtimeWaterfallChart,l as TemporalHistogram}from"./c-2M2OPWVA.min.js";export{f as StreamXYFrame}from"./c-LEICSI5V.min.js";import{a as x}from"./c-4YPPVFZH.min.js";export{d as IncrementalExtent,a as pointerToLocalPoint}from"./c-4YPPVFZH.min.js";export{a as RingBuffer}from"./c-XORVM6C5.min.js";export{b as StreamNetworkFrame,a as useNetworkPerspective}from"./c-WSWMQDFZ.min.js";export{f as preloadNetworkPerspectiveExtras}from"./c-PTFHNN34.min.js";export{b as useCustomLayoutSelection}from"./c-363Q2L4Z.min.js";export{C as AnnotationLabel,bd as CategoryColorProvider,aZ as ChartErrorBoundary,bu as LinkedCharts,aL as MultiLineTooltip,aQ as MultiPointTooltip,aK as Tooltip,D as annotationStableId,f as compileMotionEncoding,bO as composeStyleRules,j as deriveMotionVector,B as estimateLabelWidth,aM as isMultiTooltip,bK as makeNodeRuleContext,bI as makeRuleValueResolver,bP as makeStyleRuleStyleFn,bJ as makeXYRuleContext,bL as matchesThreshold,aR as normalizeTooltip,h as opacityFromAge,e as resolveMotionAccessor,g as resolveMotionAge,i as resolveMotionVector,aO as resolveMultiCapableTooltip,bl as resolveResponsiveRules,bN as resolveStyleRules,aP as resolveTooltipContent,bk as responsiveRuleMatches,bM as ruleMatches,aJ as smartTooltipEntries,bQ as styleRulesToNodeStyle,bS as styleRulesToPieceStyle,bR as styleRulesToXYStyle,bi as useBrushSelection,be as useCategoryColors,bq as useChartObserver,S as useCrosshairPosition,bj as useFilteredData,br as useLinkedChartsActive,T as useLinkedCrosshair,bh as useLinkedHover,bf as useSelection,bg as useSelectionActions}from"./c-SU6Z75M2.min.js";export{h as createHatchPattern,j as hatchFillId,k as hatchPatternDef,i as isHatchFill,l as resolveSvgFill}from"./c-VZNIIKL6.min.js";export{d as COLOR_BLIND_SAFE_CATEGORICAL,f as DARK_THEME,g as HIGH_CONTRAST_THEME,e as LIGHT_THEME,w as TooltipRoot,z as hasOwnTooltipChrome,s as hasTooltipContent,y as markTooltipChrome,D as useTheme}from"./c-TC47SNSI.min.js";import{b as P,c as M}from"./c-GRTKU3C7.min.js";import*as I from"react";import{useRef as F,useMemo as O,useEffect as N}from"react";import{jsx as A,jsxs as E}from"react/jsx-runtime";export{NetworkPerspectiveBillboard,NetworkPerspectiveGround}from"./semiotic-network-placement.module.min.js";var L=2*Math.PI;function H(e,t,r){let a=r?.center?.x??0,o=r?.center?.y??0;return{x:a+Math.sin(e)*t,y:o-Math.cos(e)*t}}function G(e,t,r,a,o){let n=o?.center,i=(e,t)=>{let{x:r,y:a}=H(e,t,{center:n});return`${K(r)},${K(a)}`},s=Math.max(0,r),l=Math.max(s,a),c=Math.abs(t-e),u=t>=e?1:0;if(c>=L-1e-6){let e=n?.x??0,t=n?.y??0,r=`${K(e)},${K(t-l)}`,a=`${K(e)},${K(t+l)}`,o=`M${r} A${K(l)},${K(l)} 0 1 1 ${a} A${K(l)},${K(l)} 0 1 1 ${r} Z`;if(s>0){let r=`${K(e)},${K(t-s)}`,a=`${K(e)},${K(t+s)}`;o+=` M${r} A${K(s)},${K(s)} 0 1 0 ${a} A${K(s)},${K(s)} 0 1 0 ${r} Z`}return o}let m=c>Math.PI?1:0,p=i(e,l),d=i(t,l);if(s<=0){let e=n?.x??0,t=n?.y??0;return`M${K(e)},${K(t)} L${p} A${K(l)},${K(l)} 0 ${m} ${u} ${d} Z`}let h=i(t,s),y=i(e,s);return`M${p} A${K(l)},${K(l)} 0 ${m} ${u} ${d} L${h} A${K(s)},${K(s)} 0 ${m} ${1===u?0:1} ${y} Z`}function K(e){return Math.round(1e3*e)/1e3}var J="var(--semiotic-focus, #005fcc)";function Q(e){return Number(e.toPrecision(12))}function _(e){try{return e.matches(":focus-visible")}catch{return!0}}function ee({value:e,onChange:r,period:a=365,radius:o=180,innerRadius:n=14,width:i,height:s,step:l,largeStep:c,label:u="Range",formatValue:m,arcFill:p="var(--semiotic-primary, #4e79a7)",stroke:d="var(--semiotic-bg, #ffffff)",onObservation:h,controlType:y="range-boundary",controlId:f,chartId:$,chartType:g="CircularBrush",className:v,style:b}){let C=i??2*o+40,x=s??2*o+40,S=C/2,T=x/2,P=function(e){let[t,r]=e,a=r-t||1,o=L;return e=>0+(e-t)/a*(o-0)}([0,a]),j=Number.isInteger(a)&&a>=2,M=null!=l&&l>0?l:j?1:a/100,k=null!=c&&c>0?c:j?7:10*M,D=Q(Math.max(0,Math.ceil(a/M-1e-9)-1)*M),w=F(null),R=F(e);R.current=e;let[O,N]=I.useState(null),V=F(!1),W=I.useMemo(()=>t({controlType:y,controlId:f,chartId:$,chartType:g,onObservation:h}),[y,f,$,g,h]),B=e=>{let t=Q(function(e,t,r=0){return t<=0?e:((e-r)%t+t)%t+r}(e,a));return t>=a?0:t},U=(e,t)=>e.end-e.start>=a?e:{start:B(e.start+t),end:B(e.end+t)},z=(e,t,a)=>{let o=e(R.current);R.current=o;let n=[o.start,o.end];a.start&&W("control-start",n,t),r(e),W("control-change",n,t),a.end&&W("control-end",n,t)},K=e=>{let t=e.currentTarget.ownerSVGElement??e.currentTarget,r=t.getBoundingClientRect(),o=t.viewBox?.baseVal,n=o?.width||C,i=o?.height||x;return s=function(e,t){return(Math.atan2(e-0,-(t-0))+L)%L}((e.clientX-r.left)*(n/(r.width||1))-S,(e.clientY-r.top)*(i/(r.height||1))-T)/L*a,B(Q(Math.round(s/M)*M));var s},Y=(e,t)=>{e.preventDefault(),e.stopPropagation();let r=e.currentTarget;r.ownerDocument?.activeElement!==r&&(V.current=!0,r.focus?.({preventScroll:!0}),V.current=!1),r.ownerSVGElement?.setPointerCapture?.(e.pointerId),w.current={mode:t,lastValue:K(e),changed:!1}},X=e=>{let t=e.currentTarget.ownerSVGElement??e.currentTarget;t?.hasPointerCapture?.(e.pointerId)&&t.releasePointerCapture(e.pointerId);let r=w.current;if(w.current=null,r?.changed){let e=R.current;W("control-end",[e.start,e.end],"pointer")}},Z=e=>z(e,"keyboard",{start:!0,end:!0}),q=(e,t)=>{Z("range"===e?e=>U(e,t):r=>({...r,[e]:B(r[e]+t)}))},ee=(e,t)=>{Z("range"===e?e=>U(e,t-e.start):r=>({...r,[e]:t}))},te=e=>t=>{let r=t.shiftKey?k:M,a={ArrowRight:()=>q(e,r),ArrowUp:()=>q(e,r),ArrowLeft:()=>q(e,-r),ArrowDown:()=>q(e,-r),PageUp:()=>q(e,k),PageDown:()=>q(e,-k),Home:()=>ee(e,0),End:()=>ee(e,D)}[t.key];a&&(t.preventDefault(),a())},re=e=>({onFocus:t=>N({mode:e,visible:!V.current&&_(t.currentTarget)}),onBlur:()=>N(null)}),ae=e=>O?.mode===e&&O.visible,oe=e.start<=e.end?[[e.start,e.end]]:[[e.start,a],[0,e.end]],ne=e=>m?m(e):String(e);return A("svg",{viewBox:`0 0 ${C} ${x}`,width:C,height:x,className:v,onPointerMove:e=>{let t=w.current;if(!t)return;let r=K(e),o=!t.changed;if("range"===t.mode){let e=function(e,t,r){if(r<=0)return t-e;let a=(t-e)%r;return a>r/2?a-=r:a<=-r/2&&(a+=r),a}(t.lastValue,r,a);if(0===e)return;return t.lastValue=r,t.changed=!0,void z(t=>U(t,e),"pointer",{start:o,end:!1})}let n=t.mode;R.current[n]!==r&&(t.changed=!0,z(e=>({...e,[n]:r}),"pointer",{start:o,end:!1}))},onPointerUp:X,onPointerCancel:X,onLostPointerCapture:X,style:{touchAction:"none",...b},"aria-label":`${u} brush`,"data-viz-control-id":f,children:E("g",{transform:`translate(${S},${T})`,children:[A("g",{role:"slider",tabIndex:0,"aria-label":`${u} (move both ends)`,"aria-valuemin":0,"aria-valuemax":D,"aria-valuenow":e.start,"aria-valuetext":`${ne(e.start)} to ${ne(e.end)}`,onPointerDown:e=>Y(e,"range"),onKeyDown:te("range"),...re("range"),style:{cursor:"grab",outline:"none"},children:oe.map(([e,t],r)=>A("path",{d:G(P(e),P(t),n,o),fill:p,fillOpacity:.35,stroke:ae("range")?J:d,strokeWidth:ae("range")?3:1},r))}),["start","end"].map(t=>{let r=e[t],i=(e=>H(P(e),n))(r),s=(e=>H(P(e),o+8))(r);return E("g",{role:"slider",tabIndex:0,"aria-label":`${u} ${t}`,"aria-valuemin":0,"aria-valuemax":"end"===t&&e.end===a?a:D,"aria-valuenow":r,"aria-valuetext":ne(r),onPointerDown:e=>Y(e,t),onKeyDown:te(t),...re(t),style:{cursor:"grab",outline:"none"},children:[A("line",{x1:i.x,y1:i.y,x2:s.x,y2:s.y,stroke:"transparent",strokeWidth:20}),A("line",{x1:i.x,y1:i.y,x2:s.x,y2:s.y,stroke:d,strokeWidth:1.5}),A("circle",{cx:s.x,cy:s.y,r:4.5,fill:d,stroke:p,strokeWidth:1}),ae(t)&&A("circle",{cx:s.x,cy:s.y,r:8,fill:"none",stroke:J,strokeWidth:2})]},t)})]})})}function te(e,t,r,a,o){let n=Math.min(r,Math.max(t,e));if(!(a>0))return n;let i=o+Math.round((n-o)/a)*a;return Math.min(r,Math.max(t,Number(i.toFixed(12))))}function re(e,t,r,{min:a,max:o,step:n,largeStep:i}){let s=t?i:n;switch(e){case"ArrowLeft":case"ArrowDown":return r-s;case"ArrowRight":case"ArrowUp":return r+s;case"PageDown":return r-i;case"PageUp":return r+i;case"Home":return a;case"End":return o;default:return null}}function ae({value:e,onChange:r,pointToValue:a,pointerToValue:o,min:n,max:i,step:s=1,stepOrigin:l=n,largeStep:c=5*s,x:u,y:m,controlType:p="value",controlId:d,label:h,ariaRoleDescription:y,valueText:f,radius:$=12,fill:g="var(--semiotic-bg, #ffffff)",stroke:v="var(--semiotic-primary, #4e79a7)",strokeWidth:b=4,labelText:C,labelDx:S=16,labelDy:T=-16,labelClassName:P,className:j,disabled:M=!1,onChangeStart:k,onChangeEnd:D,onObservation:w,chartId:R,chartType:O}){let N=F(null),L=F(e);L.current=e;let V=I.useMemo(()=>t({controlType:p,controlId:d,chartId:R,chartType:O,onObservation:w}),[R,O,d,p,w]),W=e=>{if(M)return;let t=(e=>{if(a){let t=x(e);return t?a(t):null}return o?.(e)})(e);if(null==t||!Number.isFinite(t))return;let c=te(t,n,i,s,l);L.current=c,r(c),V("control-change",c,"pointer")},B=e=>{e.stopPropagation(),N.current===e.pointerId&&(e.currentTarget.hasPointerCapture?.(e.pointerId)&&e.currentTarget.releasePointerCapture?.(e.pointerId),N.current=null,D?.(L.current),V("control-end",L.current,"pointer"))},U=["semiotic-direct-manipulation-control",j].filter(Boolean).join(" ");return E("g",{className:U,role:"slider",tabIndex:M?-1:0,"aria-disabled":M||void 0,"aria-label":h,"aria-valuemin":n,"aria-valuemax":i,"aria-valuenow":e,"aria-valuetext":f??`${h}: ${e}`,"aria-roledescription":y,"data-viz-control":p,"data-viz-control-id":d,"data-viz-control-state":"controlled",pointerEvents:"all",onPointerDown:e=>{M||(e.preventDefault(),e.stopPropagation(),e.currentTarget.setPointerCapture?.(e.pointerId),N.current=e.pointerId,k?.(L.current),V("control-start",L.current,"pointer"),W(e))},onPointerMove:e=>{e.stopPropagation(),N.current===e.pointerId&&W(e)},onPointerUp:B,onPointerCancel:B,onLostPointerCapture:B,onKeyDown:e=>{if(M)return;let t=L.current,a=re(e.key,e.shiftKey,t,{min:n,max:i,step:s,largeStep:c});if(null===a)return;e.preventDefault();let o=te(a,n,i,s,l);o!==t&&(k?.(t),V("control-start",t,"keyboard"),L.current=o,r(o),V("control-change",o,"keyboard"),D?.(o),V("control-end",o,"keyboard"))},style:{cursor:M?"default":"grab",touchAction:"none"},children:[A("circle",{className:"semiotic-direct-manipulation-control__hit",cx:u,cy:m,r:$+10,fill:"transparent"}),A("circle",{className:"semiotic-direct-manipulation-control__handle",cx:u,cy:m,r:$,fill:g,stroke:v,strokeWidth:b}),C?A("text",{className:P,x:u+S,y:m+T,fill:v,children:C}):null]})}function oe({values:e,onChange:r,markers:a,valueToPoint:o,pointToValue:n,min:i,max:s,step:l=1,stepOrigin:c=i,largeStep:u=5*l,ordered:m=!0,label:p,ariaRoleDescription:d,controlType:h="value",controlId:y="markers",radius:f=12,fill:$="var(--semiotic-bg, #ffffff)",stroke:g="var(--semiotic-primary, #4e79a7)",strokeWidth:v=4,labelDx:b=16,labelDy:C=-16,labelClassName:S,className:T,disabled:j=!1,onChangeStart:k,onChangeEnd:D,onObservation:w,chartId:R,chartType:O}){let N=F([...e]);N.current=[...e];let L=F(null),V=I.useMemo(()=>a.map((e,r)=>t({controlType:h,controlId:e.controlId??`${y}-${r}`,chartId:R,chartType:O,onObservation:w})),[R,O,y,h,a,w]),W=(e,t)=>m?{lo:e>0?Math.max(i,t[e-1]):i,hi:e<t.length-1?Math.min(s,t[e+1]):s}:{lo:i,hi:s},B=(e,t,a)=>{let{lo:o,hi:n}=W(e,N.current),i=te(t,o,n,l,c);if(i===N.current[e])return!1;let s=[...N.current];return s[e]=i,N.current=s,r(s,{index:e,source:a}),V[e]?.("control-change",i,a),!0},U=(e,t)=>{let r=x(e),a=r?n(r,t):null;return null!=a&&Number.isFinite(a)?a:null},z=e=>t=>{if(j)return;t.preventDefault(),t.stopPropagation(),t.currentTarget.setPointerCapture?.(t.pointerId);let r=N.current[e],a=m?N.current.flatMap((e,t)=>e===r?[t]:[]):[e];L.current={pointerId:t.pointerId,pressedIndex:e,startValue:r,coincident:a,active:a.length>1?null:e};let o={index:e,source:"pointer"};if(k?.([...N.current],o),V[e]?.("control-start",r,"pointer"),1===a.length){let r=U(t,e);null!=r&&B(e,r,"pointer")}},H=e=>{e.stopPropagation();let t=L.current;if(!t||t.pointerId!==e.pointerId)return;let r=U(e,t.active??t.pressedIndex);if(null!=r){if(null===t.active){if(r===t.startValue)return;t.active=r<t.startValue?P(t.coincident):M(t.coincident)}B(t.active,r,"pointer")}},G=e=>{e.stopPropagation();let t=L.current;if(!t||t.pointerId!==e.pointerId)return;e.currentTarget.hasPointerCapture?.(e.pointerId)&&e.currentTarget.releasePointerCapture?.(e.pointerId),L.current=null;let r=t.active??t.pressedIndex;D?.([...N.current],{index:r,source:"pointer"}),V[r]?.("control-end",N.current[r],"pointer")},K=e=>t=>{if(j)return;let{lo:r,hi:a}=W(e,N.current),o=N.current[e],n=re(t.key,t.shiftKey,o,{min:r,max:a,step:l,largeStep:u});if(null===n)return;t.preventDefault();let i={index:e,source:"keyboard"},s=[...N.current];te(n,r,a,l,c)!==o&&(k?.(s,i),V[e]?.("control-start",o,"keyboard"),B(e,n,"keyboard"),D?.([...N.current],i),V[e]?.("control-end",N.current[e],"keyboard"))};return A("g",{className:["semiotic-direct-manipulation-markers",T].filter(Boolean).join(" "),role:"group","aria-label":p,children:e.map((t,r)=>{let n=a[r]??{label:`Marker ${r+1}`},i=o(t,r),{lo:s,hi:l}=W(r,e),c=n.stroke??g,u=n.radius??f;return E("g",{className:["semiotic-direct-manipulation-control",n.className].filter(Boolean).join(" "),role:"slider",tabIndex:j?-1:0,"aria-disabled":j||void 0,"aria-label":n.label,"aria-valuemin":s,"aria-valuemax":l,"aria-valuenow":t,"aria-valuetext":n.valueText?.(t)??`${n.label}: ${t}`,"aria-roledescription":d,"data-viz-control":h,"data-viz-control-id":n.controlId??`${y}-${r}`,"data-viz-control-state":"controlled",pointerEvents:"all",onPointerDown:z(r),onPointerMove:H,onPointerUp:G,onPointerCancel:G,onLostPointerCapture:G,onKeyDown:K(r),style:{cursor:j?"default":"grab",touchAction:"none"},children:[A("circle",{className:"semiotic-direct-manipulation-control__hit",cx:i.x,cy:i.y,r:u+10,fill:"transparent"}),A("circle",{className:"semiotic-direct-manipulation-control__handle",cx:i.x,cy:i.y,r:u,fill:n.fill??$,stroke:c,strokeWidth:v}),n.labelText?A("text",{className:S,x:i.x+b,y:i.y+C,fill:c,children:n.labelText}):null]},n.controlId??r)})})}function ne(e,t=":root"){return u(t),`${t} {\n${Object.entries(v(e)).map(([e,t])=>` ${e}: ${t};`).join("\n")}\n}`}function ie(e){return{semiotic:{mode:{$value:e.mode,$type:"string"},bg:{$value:e.colors.background,$type:"color"},text:{$value:e.colors.text,$type:"color"},"text-secondary":{$value:e.colors.textSecondary,$type:"color"},grid:{$value:e.colors.grid,$type:"color"},border:{$value:e.colors.border,$type:"color"},primary:{$value:e.colors.primary,$type:"color"},...null!=e.colors.focus?{focus:{$value:e.colors.focus,$type:"color"}}:{},...null!=e.colors.cellBorder?{"cell-border":{$value:e.colors.cellBorder,$type:"color"}}:{},"font-family":{$value:e.typography.fontFamily,$type:"fontFamily"},"title-size":{$value:`${e.typography.titleSize}px`,$type:"dimension"},...null!=e.borderRadius?{"border-radius":{$value:e.borderRadius,$type:"dimension"}}:{},...null!=e.tooltip?{tooltip:{...null!=e.tooltip.background?{bg:{$value:e.tooltip.background,$type:"color"}}:{},...null!=e.tooltip.text?{text:{$value:e.tooltip.text,$type:"color"}}:{},...null!=e.tooltip.borderRadius?{radius:{$value:e.tooltip.borderRadius,$type:"dimension"}}:{},...null!=e.tooltip.fontSize?{"font-size":{$value:e.tooltip.fontSize,$type:"dimension"}}:{},...null!=e.tooltip.shadow?{shadow:{$value:e.tooltip.shadow,$type:"shadow"}}:{},...null!=e.tooltip.chrome?{chrome:{$value:e.tooltip.chrome,$type:"string"}}:{}}}:{},...null!=e.colors.selection||null!=e.colors.selectionOpacity?{selection:{...null!=e.colors.selection?{color:{$value:e.colors.selection,$type:"color"}}:{},...null!=e.colors.selectionOpacity?{opacity:{$value:e.colors.selectionOpacity,$type:"number"}}:{}}}:{},...null!=e.accessibility?{accessibility:Object.fromEntries(Object.entries(e.accessibility).map(([e,t])=>[e,{$value:t,$type:"boolean"}]))}:{},categorical:{$value:[...e.colors.categorical],$type:"color",$description:"Categorical color palette"},sequential:{$value:e.colors.sequential,$type:"string",$description:"d3-scale-chromatic sequential scheme name"},...e.aesthetics?{aesthetics:{...e.aesthetics.name?{profile:{$value:e.aesthetics.name,$type:"string"}}:{},...null!=e.aesthetics.minimumScore?{"minimum-score":{$value:e.aesthetics.minimumScore,$type:"number"}}:{},weights:Object.fromEntries(Object.entries(e.aesthetics.weights??{}).map(([e,t])=>[e,{$value:t,$type:"number"}])),thresholds:Object.fromEntries(Object.entries(e.aesthetics.thresholds??{}).map(([e,t])=>[e,{$value:t,$type:"number"}])),rationales:Object.fromEntries(Object.entries(e.aesthetics.rationales??{}).map(([e,t])=>[e,{$value:t,$type:"string"}]))}}:{},...e.colors.diverging?{diverging:{$value:e.colors.diverging,$type:"string",$description:"d3-scale-chromatic diverging scheme name"}}:{},...e.colors.annotation?{"annotation-color":{$value:e.colors.annotation,$type:"color"}}:{},...null!=e.typography.legendSize?{"legend-font-size":{$value:`${e.typography.legendSize}px`,$type:"dimension"}}:{},...null!=e.typography.legendFontFamily?{"legend-font-family":{$value:e.typography.legendFontFamily,$type:"fontFamily"}}:{},...null!=e.typography.legendFontWeight?{"legend-font-weight":{$value:e.typography.legendFontWeight,$type:"fontWeight"}}:{},...null!=e.typography.titleFontSize?{"title-font-size":{$value:`${e.typography.titleFontSize}px`,$type:"dimension"}}:{},...null!=e.typography.titleFontFamily?{"title-font-family":{$value:e.typography.titleFontFamily,$type:"fontFamily"}}:{},...null!=e.typography.titleFontWeight?{"title-font-weight":{$value:e.typography.titleFontWeight,$type:"fontWeight"}}:{},...null!=e.typography.tickFontFamily?{"tick-font-family":{$value:e.typography.tickFontFamily,$type:"fontFamily"}}:{},...null!=e.typography.tickSize?{"tick-font-size":{$value:`${e.typography.tickSize}px`,$type:"dimension"}}:{},...null!=e.typography.labelSize?{"axis-label-font-size":{$value:`${e.typography.labelSize}px`,$type:"dimension"}}:{},...null!=e.colors.secondary?{secondary:{$value:e.colors.secondary,$type:"color"}}:{},...null!=e.colors.surface?{surface:{$value:e.colors.surface,$type:"color"}}:{},...e.colors.success?{success:{$value:e.colors.success,$type:"color"}}:{},...e.colors.danger?{danger:{$value:e.colors.danger,$type:"color"}}:{},...e.colors.warning?{warning:{$value:e.colors.warning,$type:"color"}}:{},...e.colors.error?{error:{$value:e.colors.error,$type:"color"}}:{},...e.colors.info?{info:{$value:e.colors.info,$type:"color"}}:{}}}}function se(e){return e<10?`0${e}`:String(e)}var le=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ce(e,t){return t?{month:e.getUTCMonth(),day:e.getUTCDate(),year:e.getUTCFullYear(),hours:e.getUTCHours(),minutes:e.getUTCMinutes(),seconds:e.getUTCSeconds()}:{month:e.getMonth(),day:e.getDate(),year:e.getFullYear(),hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()}}var ue={year:!0,date:!0};function me(e,t,r,a=ue){let{month:o,day:n,year:i,hours:s,minutes:l,seconds:c}=r(e),u=le[o],m=se(s),p=se(l),d=se(c),h=a.year?`${u} ${n}, ${i} `:`${u} ${n} `;switch(t){case"seconds":return`${a.date?h:""}${m}:${p}:${d}`;case"minutes":case"hours":return`${a.date?h:""}${m}:${p}`;case"days":return a.year?`${u} ${n}, ${i}`:`${u} ${n}`;case"months":return a.year?`${u} ${i}`:`${u}`;case"years":return`${i}`}}function pe(e,t={}){let r,a,o=e,n=(m=function(e={}){let t=e.timeZone;return"UTC"===t?{kind:"utc"}:"local"===t?{kind:"local"}:"string"==typeof t&&t.length>0?{kind:"iana",id:t}:!1===e.utc?{kind:"local"}:{kind:"utc"}}(t),"utc"===m.kind?e=>ce(e,!0):"local"===m.kind?e=>ce(e,!1):function(e){let t;try{t=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hourCycle:"h23"})}catch{return e=>ce(e,!0)}return e=>{let r={};for(let a of t.formatToParts(e))"literal"!==a.type&&(r[a.type]=a.value);return{month:Math.max(0,(Number(r.month)||1)-1),day:Number(r.day)||1,year:Number(r.year)||1970,hours:Number(r.hour)||0,minutes:Number(r.minute)||0,seconds:Number(r.second)||0}}}(m.id)),{includeYear:i="always",includeDate:s="always"}=t,l="clock"===t.deltaStyle,c="auto"===i?n(new Date(t.referenceTime??Date.now())).year:void 0,u={referenceYear:!1,oneDay:!1};var m;return(t,m,p)=>{let d=t instanceof Date?t:new Date(t);!e&&p&&p.length>=2&&p!==r&&(r=p,o=function(e){if(e.length<2)return"days";let t=[];for(let r=1;r<e.length;r++)t.push(e[r]-e[r-1]);t.sort((e,t)=>e-t);let r=t[Math.floor(t.length/2)];return r<12e4?"seconds":r<72e5?"minutes":r<1728e5?"hours":r<5184e6?"days":r<3456e7?"months":"years"}(p));let h=o||"days";if(null==m||!p||0===p.length)return me(d,h,n);let y="seconds"===h||"minutes"===h||"hours"===h,f="always"===i&&"always"===s?ue:{year:"years"===h||"never"!==i,date:!y||"never"!==s};if(0===m){if(f===ue)return me(d,h,n);let{referenceYear:e,oneDay:t}="auto"===i||"auto"===s?(e=>{if(e!==a){a=e;let t=e.map(e=>n(new Date(e))),[r]=t;u={referenceYear:t.every(e=>e.year===c),oneDay:t.every(e=>e.year===r.year&&e.month===r.month&&e.day===r.day)}}return u})(p):u,r=f.date&&!(y&&"auto"===s&&t),o=r&&f.year&&!("years"!==h&&"auto"===i&&e);return me(d,h,n,{year:o||"years"===h,date:r})}return function(e,t,r,a,o=ue,n=!1){let i=a(e),s=a(t),l=i.year!==s.year,c=l||i.month!==s.month,u=c||i.day!==s.day,m=u||i.hours!==s.hours,p=m||i.minutes!==s.minutes,d=o.date,h=l&&o.year,y=le[i.month],{day:f,year:$}=i,g=se(i.hours),v=se(i.minutes),b=se(i.seconds);switch(r){case"seconds":return h&&d?`${y} ${f}, ${$} ${g}:${v}:${b}`:u&&d?`${y} ${f} ${g}:${v}:${b}`:m||n?`${g}:${v}:${b}`:p?`${v}:${b}`:`:${b}`;case"minutes":return h&&d?`${y} ${f}, ${$} ${g}:${v}`:u&&d?`${y} ${f} ${g}:${v}`:m||n?`${g}:${v}`:`:${v}`;case"hours":return h&&d?`${y} ${f}, ${$} ${g}:${v}`:u&&d?`${y} ${f} ${g}:${v}`:`${g}:${v}`;case"days":return h?`${y} ${f}, ${$}`:c||n?`${y} ${f}`:`${f}`;case"months":return h?`${y} ${$}`:`${y}`;case"years":return`${$}`}}(d,new Date(p[m-1]),h,n,f,l)}}var de=[[1e3,"K"],[1e6,"M"],[1e9,"B"]];function he(e){if(null==e)return"";if("number"!=typeof e||!isFinite(e))return String(e);if(0===e)return"0";let t=parseFloat(e.toPrecision(12)),r=Math.abs(t);if(r>=1e4)for(let e=de.length-1;e>=0;e--){let[a,o]=de[e];if(r<a)continue;let n=parseFloat((t/a).toPrecision(3));if(Math.abs(n)>=1e3&&e<de.length-1){let[r,a]=de[e+1];return`${parseFloat((t/r).toPrecision(3))}${a}`}return`${n}${o}`}return Number.isInteger(t)?String(t):String(parseFloat(t.toPrecision(6)))}function ye(e,t,r,a){let o=new Map,n=null==a;if(r.forEach((e,t)=>{let r=a?.(e,t);(null==r||o.has(r))&&(n=!0),o.set(r??String(t),e)}),n&&(o.clear(),r.forEach((e,t)=>o.set(String(t),e))),0===t.size)return fe(e,[...r]),o;let i=[...t.values()],s=null==a||[...t.keys()].some((e,t)=>a(i[t],t)!==e);if(n||s)return i.length<=r.length&&i.every((e,t)=>e===r[t])&&n===s?fe(e,r.slice(i.length)):$e(e,r),o;let l=[];if(t.forEach((e,t)=>{o.has(t)||l.push(t)}),l.length>0&&!e.remove||!e.update&&!e.remove&&[...o].some(([e,r])=>t.has(e)&&t.get(e)!==r))return $e(e,r),o;l.length>0&&e.remove?.(l);let c=[];return o.forEach((r,a)=>{let o=t.get(a);void 0===o?c.push(r):o!==r&&(e.update?e.update(a,()=>r):(e.remove?.(a),c.push(r)))}),fe(e,c),o}function fe(e,t){if(0!==t.length)if(e.pushMany)e.pushMany(t);else if(e.push)for(let r of t)e.push(r)}function $e(e,t){if(!e.clear)throw new Error("Synchronizing these changed rows requires a clear() handle");e.clear(),fe(e,[...t])}function ge(e,t,r={}){let{id:a,resetKey:o}=r,n=O(()=>function(e){return null==e?null:"function"==typeof e?(t,r)=>{let a=e(t,r);return null==a?null:String(a)}:t=>{let r=t[e];return null==r?null:String(r)}}(a),[a]),i=F({map:new Map,handle:null,resetKey:void 0});N(()=>{let r=e.current;if(!r)return;let a=i.current;(a.handle!==r||a.resetKey!==o)&&(r.clear?.(),a.map=new Map,a.handle=r,a.resetKey=o),a.map=ye(r,a.map,t,n)},[e,t,n,o])}export{ee as CircularBrush,ae as DirectManipulationControl,oe as DirectManipulationMarkers,pe as adaptiveTimeTicks,he as smartTickFormat,ye as syncPushBuffer,ne as themeToCSS,ie as themeToTokens,ge as useSyncedPushData};
|