@graphysdk/react-renderer 1.9.0-beta.1789669748378 → 1.9.0-beta.1789731663685
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/dist/editable.cjs +1 -1
- package/dist/editable.css +1 -1
- package/dist/editable.d.ts +5 -3
- package/dist/editable.mjs +2904 -2380
- package/dist/graph-config.cjs +1 -1
- package/dist/graph-config.mjs +1 -1
- package/dist/history-chords-CWX3vhjy.cjs +2 -0
- package/dist/{history-chords-CK8rnZmj.js → history-chords-DGXgA_2W.js} +3185 -2856
- package/dist/history-chords.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +75 -3
- package/dist/index.mjs +106 -106
- package/dist/{theme.contract.css-AyXDNf0F.js → theme.contract.css-DRIwwcHW.js} +1 -1
- package/dist/theme.contract.css-VQwFtkVc.cjs +1 -0
- package/package.json +3 -2
- package/dist/history-chords-RyLhych9.cjs +0 -2
- package/dist/theme.contract.css +0 -1
- package/dist/theme.contract.css-DKDKSByt.cjs +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
require('./history-chords.css');var va=Object.create,Ue=Object.defineProperty,fa=Object.getOwnPropertyDescriptor,ma=Object.getOwnPropertyNames,pa=Object.getPrototypeOf,xa=Object.prototype.hasOwnProperty,ya=(e,t)=>{let r={};for(var n in e)Ue(r,n,{get:e[n],enumerable:!0});return t||Ue(r,Symbol.toStringTag,{value:"Module"}),r},ba=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=ma(t),s=0,i=o.length,l;s<i;s++)l=o[s],!xa.call(e,l)&&l!==r&&Ue(e,l,{get:(c=>t[c]).bind(null,l),enumerable:!(n=fa(t,l))||n.enumerable});return e},St=(e,t,r)=>(r=e!=null?va(pa(e)):{},ba(t||!e||!e.__esModule?Ue(r,"default",{value:e,enumerable:!0}):r,e));const x=require("./theme.contract.css-DKDKSByt.cjs");let u=require("@graphysdk/viz-engine"),h=require("react"),a=require("react/jsx-runtime"),ye=require("zustand"),R=require("motion/react"),Aa=require("d3-interpolate-path"),W=require("zustand/react/shallow"),jt=require("@vanilla-extract/dynamic"),Tr=require("zustand/vanilla"),Or=require("react-dom"),G=require("clsx");G=St(G,1);let ft=require("lodash-es/merge");ft=St(ft,1);let Sa=require("react-intl"),K=require("@floating-ui/react-dom"),ja=require("color2k");typeof window<"u"&&(window.__GRAPHY_SDK__??={},window.__GRAPHY_SDK__.reactRenderer="1.9.0-beta.1789669748378");function Lr(e){for(const t of e)(t.severity==="error"?console.error:console.warn)(`[graphy] ${t.code}: ${t.message}`,t)}var wt=(0,h.createContext)(null),N=()=>{const e=(0,h.useContext)(wt);if(!e)throw new Error("useGraph* hooks must be used inside a <GraphProvider>");return e},C=e=>{const{store:t}=N();return(0,ye.useStore)(t,r=>e(r.scene))},be=()=>N().styleResolver,B=e=>be().geomReaders(e),wa=()=>{const e=be(),t=C(r=>r.chrome);return e.readers({chrome:t})},Fr=e=>{const t=be(),r=C(n=>n.layers).find(n=>n.id===e);return r===void 0?null:t.geomReaders(r)},Ra=()=>{const e=be(),t=C(r=>r.layers);return(0,h.useMemo)(()=>r=>{const n=(0,u.readAnchoredObservation)(t,r);if(n!==null)return e.geomReaders(n.layer).get("color",n.observation)},[t,e])},Pa=e=>{const t=be(),r=C(n=>n.layers);return(0,h.useMemo)(()=>n=>{const o=(0,u.readAnchoredObservation)(r,n);if(o===null)return{};const s=t.geomReaders(o.layer),i=(0,u.resolveSwatchGeomPaint)(s,o.layer,o.observation,{width:e,height:e});return{color:s.get("color",o.observation),alpha:i.alpha,cornerRadius:i.cornerRadiusPx}},[r,t,e])},Ea={centerX:0,centerY:0,radius:1},Nr=e=>{const t=Math.min(e.width,e.height);return{centerX:(e.width-t)/2+t/2,centerY:(e.height-t)/2+t/2,radius:t/2}},z=(e,t,r=Ea)=>{const n=(0,u.polarToUnit)(e,t);return{x:r.centerX+n.x*r.radius,y:r.centerY-n.y*r.radius}},Rt=(e,t)=>({x:(0,u.toViewBoxX)(e),y:(0,u.toViewBoxY)(t)}),_=(e,t)=>{const r=z(e,t);return{x:(r.x+1)/2,y:(r.y+1)/2}},ka=2,Ca=.7,se=({hit:e,project:t=Rt})=>{const r=Fr(e.layerId);if(!e.anchored)return null;const n=r?.get("color",e.observation)??u.DEFAULT_GEOM_COLOR,o=((0,u.getAlpha)(e.observation)??1)*Ca,s=(r?.get("size",e.observation)??u.DEFAULT_POINT_SIZE_PX)/2,i=r?.get("borderColor",e.observation,"hovered")??u.DEFAULT_HOVER_AFFORDANCE_COLOR,l=t(e.x,e.y);return(0,a.jsx)("circle",{cx:(0,u.toPercent)(l.x),cy:(0,u.toPercent)(l.y),r:s,fill:n,opacity:o,stroke:i,strokeWidth:ka,"data-testid":"companion-point"})},Q="_1d8mpa10",$={type:"spring",stiffness:500,damping:60,mass:1},Ma={duration:0},Pt=e=>e?$:Ma,mt=(e,t)=>{const r=(0,R.useMotionValue)(e);return(0,h.useEffect)(()=>{const n=(0,Aa.interpolatePath)(r.get(),e);(0,R.animate)(0,1,{...t,onUpdate:o=>{const s=n(o);return r.set(s)}})},[t,e,r]),r},Hr=({shouldAnimateTransitions:e,...t})=>e?(0,a.jsx)(Ia,{...t}):(0,a.jsx)(Ba,{...t}),Ba=({fillPath:e,linePath:t,fill:r,fillOpacity:n,stroke:o,strokeWidth:s,strokeOpacity:i,strokeDasharray:l})=>(0,a.jsxs)("g",{children:[(0,a.jsx)("path",{d:e,fill:r,fillOpacity:n,stroke:"none"}),(0,a.jsx)("path",{d:t,fill:"none",stroke:o,strokeWidth:s,strokeOpacity:i,strokeDasharray:l,vectorEffect:"non-scaling-stroke"})]}),Ia=({fillPath:e,linePath:t,fill:r,fillOpacity:n,stroke:o,strokeWidth:s,strokeOpacity:i,strokeDasharray:l})=>{const c=mt(e,$),d=mt(t,$);return(0,a.jsxs)("g",{children:[(0,a.jsx)(R.motion.path,{d:c,fill:r,fillOpacity:n,stroke:"none"}),(0,a.jsx)(R.motion.path,{d,fill:"none",stroke:o,strokeWidth:s,strokeOpacity:i,strokeDasharray:l,vectorEffect:"non-scaling-stroke"})]})},Et=(e,t)=>{const r=(t!==void 0?e.delayByKey[t]:void 0)??0;return{duration:e.durationSeconds,ease:e.growAxis==="angle"?"circOut":"backOut",delay:r}},Ta=e=>({duration:e.durationSeconds,ease:"easeOut"}),Oa=e=>({duration:e.durationSeconds,ease:"easeOut"}),La=e=>Fa(e)+e.durationSeconds,Fa=e=>{switch(e.type){case"grow":return Object.values(e.delayByKey).reduce((t,r)=>Math.max(t,r),0);case"wipe":case"fade":return 0}},nr=1.1,or=1.5,Dr=({intro:e,children:t})=>{const r=(0,h.useId)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("clipPath",{id:r,children:(0,a.jsx)(R.motion.rect,{...Na(e.axis),transition:Ta(e)})}),(0,a.jsx)("g",{clipPath:`url(#${r})`,children:t})]})},Na=e=>e==="x"?{x:-.05,y:-.25,height:or,initial:{width:0},animate:{width:nr}}:{x:-.25,y:-.05,width:or,initial:{height:0},animate:{height:nr}},Ha=(0,h.memo)(function({layer:t,coordSystem:r,shouldAnimateTransitions:n,intro:o}){const s=o?.type==="wipe"?o:null,{lineGenerator:i,areaGenerator:l}=(0,h.useMemo)(()=>(0,u.createAreaPathGenerators)(r,t.params),[t.params,r]),c=B(t),d=(0,h.useMemo)(()=>{const g=(0,u.createStableKeyGenerator)(t.data,t.mapping,t.id),v=[];return t.data.groupBy(u.GROUP_VARIABLES.group).forEach(f=>{const m=(0,u.prepareAreaObservations)([...f],t.params.missingValues),p=l(m),y=i(m);if(!p||!y)return;const b=m[0];if(!b)return;const S=c.get("color",b),A=c.get("strokeWidth",b),j=(0,u.getDashArray)(c.get("lineType",b));v.push({key:g(b),areaPath:p,linePath:y,color:S,fillOpacity:c.get("alpha",b),strokeWidth:A,strokeOpacity:c.get("strokeAlpha",b),strokeDasharray:j})}),v},[l,i,t.data,t.id,t.mapping,t.params,c]).map(g=>(0,a.jsx)(Da,{areaPath:g.areaPath,linePath:g.linePath,color:g.color,fillOpacity:g.fillOpacity,strokeWidth:g.strokeWidth,strokeOpacity:g.strokeOpacity,strokeDasharray:g.strokeDasharray,shouldAnimateTransitions:n},g.key));return(0,a.jsx)("svg",{viewBox:"0 0 1 1",preserveAspectRatio:"none",width:"100%",height:"100%","data-geom":"area",className:Q,children:s?(0,a.jsx)(Dr,{intro:s,children:d}):d})}),Da=({areaPath:e,linePath:t,color:r,fillOpacity:n,strokeWidth:o,strokeOpacity:s,strokeDasharray:i,shouldAnimateTransitions:l})=>(0,a.jsx)(Hr,{fillPath:e,linePath:t,fill:r,fillOpacity:n,stroke:r,strokeWidth:o,strokeOpacity:s,strokeDasharray:i,shouldAnimateTransitions:l}),Ga="_324dw20",Gr=1,Wa=.4,Va=.2,Ua=1,Ka=.5,Ya=2.25,Ae=({hit:e,project:t=Rt,...r})=>{const n=Fr(e.layerId);if(!e.anchored)return null;const o=n?.get("color",e.observation)??u.DEFAULT_GEOM_COLOR,s=(0,u.getAlpha)(e.observation)??1,i=n?.get("borderColor",e.observation,"hovered")??u.DEFAULT_HOVER_AFFORDANCE_COLOR,l=t(e.x,e.y),c=(0,u.toPercent)(l.x),d=(0,u.toPercent)(l.y),g=za(e.observation,n),{ringRadius:v,ringWidth:f}=Qa(g);return(0,a.jsxs)("g",{...r,className:Ga,children:[(0,a.jsx)("circle",{cx:c,cy:d,r:v,fill:"none",stroke:i,strokeWidth:f}),(0,a.jsx)("circle",{cx:c,cy:d,r:g,fill:o,opacity:s,stroke:i,strokeWidth:Gr})]})},za=(e,t)=>{const r=t?.get("size",e),n=(0,u.getSize)(e)??null;return n!==null?(r??n)/Ya:(r??12)/2},Qa=e=>{const t=Math.max(Ua,e*Wa),r=Math.max(Ka,e*Va);return{ringRadius:e+Gr/2+r+t/2,ringWidth:t}},Xa=({layer:e,coordSystem:t,primary:r,companions:n})=>{const o=B(e),s=(0,u.getGroup)(r.observation),i=(0,h.useMemo)(()=>(0,u.prepareAreaObservations)([...e.data.filter(u.GROUP_VARIABLES.group,"eq",s)],e.params.missingValues),[e.data,e.params.missingValues,s]),{areaPath:l,linePath:c}=(0,h.useMemo)(()=>{const{lineGenerator:m,areaGenerator:p}=(0,u.createAreaPathGenerators)(t,e.params);return{areaPath:p(i)??"",linePath:m(i)??""}},[t,e.params,i]);if(!l||!c)return null;const d=o.get("color",r.observation),g=o.get("alpha",r.observation),v=o.get("strokeWidth",r.observation),f=(0,u.getDashArray)(o.get("lineType",r.observation));return(0,a.jsxs)("g",{"data-testid":"hovered-area",children:[(0,a.jsxs)("svg",{viewBox:"0 0 1 1",preserveAspectRatio:"none",width:"100%",height:"100%","data-geom":"area",className:Q,children:[(0,a.jsx)("path",{d:l,fill:d,fillOpacity:g,stroke:"none","data-testid":"hovered-area-fill"}),(0,a.jsx)("path",{d:c,fill:"none",stroke:d,strokeWidth:v,strokeOpacity:o.get("strokeAlpha",r.observation),strokeDasharray:f,vectorEffect:"non-scaling-stroke","data-testid":"hovered-area-edge"})]}),n.map(m=>(0,a.jsx)(se,{hit:m},`companion-${m.layerId}-${m.pointIndex}`)),(0,a.jsx)(Ae,{hit:r,"data-testid":"hovered-area-point"})]})},qa={geom:"area",coord:"cartesian",swatchShape:"area",guideMode:"crosshair",render:({layer:e,coordSystem:t,shouldAnimateTransitions:r,intro:n})=>(0,a.jsx)(Ha,{layer:e,coordSystem:t,shouldAnimateTransitions:r,intro:n}),renderHover:({layer:e,coordSystem:t,primary:r,group:n,related:o})=>(0,a.jsx)(Xa,{layer:e,coordSystem:t,primary:r,companions:[...n,...o]}),renderHoverCompanions:({related:e})=>(0,a.jsx)(a.Fragment,{children:e.map(t=>(0,a.jsx)(se,{hit:t},`companion-${t.layerId}-${t.pointIndex}`))}),getOverlayAnchor:({observation:e,coordSystem:t})=>{if(t.mainAxis==="x"){const o=(0,u.getX)(e),s=(0,u.getYMax)(e)??(0,u.getY)(e);return o===null||s===null?null:{x:o,y:s}}const r=(0,u.getY)(e),n=(0,u.getXMax)(e)??(0,u.getX)(e);return r===null||n===null?null:{x:n,y:r}}},pt=(e,t,r)=>{const n=r===void 0?e.activeIntro:r,o=(0,h.useRef)(n?Et(n,t):null),s=(0,h.useRef)(e.shouldAnimateTransitions);return s.current=e.shouldAnimateTransitions,(0,h.useCallback)(()=>{const i=o.current;return o.current=null,i??Pt(s.current)},[])},Ze=(e,t)=>{const r=(0,h.useRef)(!0);(0,h.useEffect)(()=>{r.current=!1},[]);const n=r.current;return(0,h.useMemo)(()=>({isAnimated:t||e!==null,isLayerEntrance:n,activeIntro:n?e:null,shouldAnimateTransitions:t}),[e,t,n])},Se=(e,t)=>({borderColor:e.get("borderColor",t),borderWidth:e.get("borderWidth",t),borderRadius:e.get("borderRadius",t),borderAlpha:e.get("alpha",t)}),Wr=(e,t)=>t.growAxis==="x"?{x:t.baseline,y:e.y,width:0,height:e.height}:{x:e.x,y:t.baseline,width:e.width,height:0},Ja=(0,h.memo)(function({layer:t,coordSystem:r,shouldAnimateTransitions:n,intro:o}){const s=(0,h.useId)(),i=B(t),l=Ze(o?.type==="grow"&&(o.growAxis==="x"||o.growAxis==="y")?o:null,n);return(0,a.jsx)(a.Fragment,{children:(0,h.useMemo)(()=>{const c=(0,u.createStableKeyGenerator)(t.data,t.mapping,t.id),d=new Map;for(const g of t.data){const v=(0,u.getBarRectBounds)(r.mainAxis,g);if(!v)continue;const f=(0,u.buildColumnKey)(r.mainAxis,v),m=d.get(f),p={key:c(g),...v,fill:i.get("color",g),opacity:i.get("alpha",g)};m?m.bars.push(p):d.set(f,{bars:[p],style:Se(i,g)})}return[...d.values()].map(({bars:g,style:v},f)=>{const m=(0,u.getBoundingRect)(g),p=v.borderColor===void 0?void 0:(0,u.resolveBarBorderTreatment)(v.borderWidth);return{key:g[0]?.key??String(f),id:`${s}${f}`,bars:g,...m,radii:es({borderRadius:v.borderRadius,mainAxis:r.mainAxis,bounds:m}),borderColor:v.borderColor,outlineOpacity:v.borderAlpha,clippedStrokeWidth:p?.outlineWidth,separatorStrokeWidth:p?.separatorWidth}})},[s,r.mainAxis,t,i]).map(c=>{if(c.bars.length===1&&c.borderColor===void 0){const[d]=c.bars;if(!d)return null;const{key:g,...v}=d;return(0,a.jsx)(Ke,{...v,...c.radii,animation:l,introKey:g},g)}return l.isAnimated?(0,a.jsx)(_a,{column:c,animation:l},c.key):(0,a.jsx)(Za,{column:c,animation:l},c.key)})})}),Za=({column:e,animation:t})=>{const{id:r,bars:n,radii:o,borderColor:s,outlineOpacity:i,clippedStrokeWidth:l,separatorStrokeWidth:c}=e,d=s!==void 0,g=(0,a.jsx)("clipPath",{id:r,children:(0,a.jsx)(ar,{bounds:e,radii:o})});if(n.length===1){const[v]=n;if(!v)return null;const{key:f,...m}=v;return(0,a.jsxs)(a.Fragment,{children:[g,(0,a.jsx)("g",{clipPath:`url(#${r})`,children:(0,a.jsx)(Ke,{...m,...o,stroke:s,strokeWidth:l,animation:t},f)})]})}return(0,a.jsxs)(a.Fragment,{children:[g,(0,a.jsxs)("g",{clipPath:`url(#${r})`,children:[n.map(v=>{const{key:f,...m}=v;return(0,a.jsx)(Ke,{...m,stroke:s,strokeWidth:c,animation:t},f)}),d&&(0,a.jsx)(ar,{bounds:e,radii:o,fill:"none",stroke:s,strokeWidth:l,opacity:i})]})]})},_a=({column:e,animation:t})=>{const{id:r,bars:n,radii:o,borderColor:s,outlineOpacity:i,clippedStrokeWidth:l,separatorStrokeWidth:c}=e,d=s!==void 0,g=$a(e,t,n[0]?.key),v={style:{transformBox:"view-box",x:g.x,y:g.y,width:g.width,height:g.height},rx:o.rx,ry:o.ry},f=(0,a.jsx)("clipPath",{id:r,children:(0,a.jsx)(R.motion.rect,{...v})});if(n.length===1){const[m]=n;return(0,a.jsxs)(a.Fragment,{children:[f,(0,a.jsx)("g",{clipPath:`url(#${r})`,children:(0,a.jsx)(R.motion.rect,{...v,fill:m?.fill,opacity:m?.opacity,stroke:s,strokeWidth:l})})]})}return(0,a.jsxs)(a.Fragment,{children:[f,(0,a.jsxs)("g",{clipPath:`url(#${r})`,children:[n.map(m=>{const{key:p,...y}=m;return(0,a.jsx)(Ke,{...y,stroke:s,strokeWidth:c,animation:t,introKey:p},p)}),d&&(0,a.jsx)(R.motion.rect,{...v,fill:"none",stroke:s,strokeWidth:l,opacity:i})]})]})},Ke=({animation:e,introKey:t,rx:r,ry:n,stroke:o,strokeWidth:s,...i})=>{const{isAnimated:l,activeIntro:c,shouldAnimateTransitions:d}=e;if(l){const g=c?Wr(i,c):null;return(0,a.jsx)(R.motion.rect,{initial:g?{x:(0,u.toPercent)(g.x),y:(0,u.toPercent)(g.y),width:(0,u.toPercent)(g.width),height:(0,u.toPercent)(g.height),opacity:i.opacity}:!1,style:{transformBox:"view-box"},transition:c?Et(c,t):Pt(d),fill:i.fill,opacity:i.opacity,rx:r,ry:n,stroke:o,strokeWidth:s,animate:{x:(0,u.toPercent)(i.x),y:(0,u.toPercent)(i.y),width:(0,u.toPercent)(i.width),height:(0,u.toPercent)(i.height),opacity:i.opacity}})}return(0,a.jsx)("rect",{style:{transformBox:"view-box"},x:(0,u.toPercent)(i.x),y:(0,u.toPercent)(i.y),width:(0,u.toPercent)(i.width),height:(0,u.toPercent)(i.height),fill:i.fill,opacity:i.opacity,rx:r,ry:n,stroke:o,strokeWidth:s})},ar=({bounds:e,radii:t,fill:r,stroke:n,strokeWidth:o,opacity:s})=>(0,a.jsx)("rect",{x:(0,u.toPercent)(e.x),y:(0,u.toPercent)(e.y),width:(0,u.toPercent)(e.width),height:(0,u.toPercent)(e.height),rx:t.rx,ry:t.ry,fill:r,stroke:n,strokeWidth:o,opacity:s}),$a=(e,t,r)=>{const n=t.activeIntro?Wr(e,t.activeIntro):e,o=(0,R.useMotionValue)(n.x),s=(0,R.useMotionValue)(n.y),i=(0,R.useMotionValue)(n.width),l=(0,R.useMotionValue)(n.height),c=pt(t,r);return(0,h.useEffect)(()=>{const d=c(),g=[(0,R.animate)(o,e.x,d),(0,R.animate)(s,e.y,d),(0,R.animate)(i,e.width,d),(0,R.animate)(l,e.height,d)];return()=>{for(const v of g)v.stop()}},[o,s,i,l,e.x,e.y,e.width,e.height,c]),{x:(0,R.useTransform)(o,u.toPercent),y:(0,R.useTransform)(s,u.toPercent),width:(0,R.useTransform)(i,u.toPercent),height:(0,R.useTransform)(l,u.toPercent)}};function es(e){const t=(0,u.resolveBarCornerRadiiPx)(e);if(e.borderRadius!=="full")return t;const r={};return t.rx!==void 0&&(r.rx=(0,u.toPercent)(t.rx)),t.ry!==void 0&&(r.ry=(0,u.toPercent)(t.ry)),r}var ts="_1suo8ub0",Vr=(e,t,r)=>{const n=new Map;for(const s of e.data){const i=(0,u.getBarRectBounds)(t,s);if(!i)continue;const l=(0,u.buildColumnKey)(t,i),c=n.get(l);c===void 0?n.set(l,{firstObservation:s,memberBounds:[i]}):c.memberBounds.push(i)}const o=new Map;for(const[s,{firstObservation:i,memberBounds:l}]of n)o.set(s,{style:Se(r,i),bounds:(0,u.getBoundingRect)(l)});return o},Ur=(e,t,r,n)=>{const o=(0,u.getBarRectBounds)(t,n);return o?e.get((0,u.buildColumnKey)(t,o))??{style:Se(r,n),bounds:o}:null},Ye=(e,t)=>({x:e.x*t.width,y:e.y*t.height,width:e.width*t.width,height:e.height*t.height}),sr=(e,t)=>({x:e.x-t,y:e.y-t,width:Math.max(0,e.width+t*2),height:Math.max(0,e.height+t*2)}),ve=(e,t)=>{const r=Math.max(0,Math.min(t,e.width/2)),n=Math.max(0,Math.min(t,e.height/2)),o=e.x+e.width,s=e.y+e.height;return r<=0||n<=0?`M${e.x},${e.y}H${o}V${s}H${e.x}Z`:[`M${e.x+r},${e.y}`,`H${o-r}`,`A${r},${n} 0 0 1 ${o},${e.y+n}`,`V${s-n}`,`A${r},${n} 0 0 1 ${o-r},${s}`,`H${e.x+r}`,`A${r},${n} 0 0 1 ${e.x},${s-n}`,`V${e.y+n}`,`A${r},${n} 0 0 1 ${e.x+r},${e.y}`,"Z"].join("")},rs=({observation:e,mainAxis:t,styleReaders:r,column:n,panelRect:o})=>{const s=(0,h.useId)(),i=(0,h.useId)(),l=(0,u.getBarRectBounds)(t,e);if(!l)return null;const c=Ye(l,o),d=Ye(n.bounds,o),{borderColor:g,borderWidth:v,borderRadius:f,borderAlpha:m}=n.style,p=(0,u.resolveBarBorderRadiusPx)({borderRadius:f,mainAxis:t,bounds:d}),y=ve(c,0),b=ve(d,p),S=r.get("color",e),A=r.get("alpha",e),j=(0,u.resolveBarBorderTreatment)(v);return(0,a.jsxs)("g",{clipPath:`url(#${s})`,children:[(0,a.jsx)("clipPath",{id:s,children:(0,a.jsx)("path",{d:y})}),(0,a.jsx)("clipPath",{id:i,children:(0,a.jsx)("path",{d:b})}),(0,a.jsxs)("g",{clipPath:`url(#${i})`,children:[(0,a.jsx)("path",{d:y,fill:S,opacity:A,"data-testid":"highlight-bar-segment"}),g!==void 0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{d:y,fill:"none",stroke:g,strokeWidth:j.separatorWidth,opacity:A,"data-testid":"highlight-bar-segment-border"}),(0,a.jsx)("path",{d:b,fill:"none",stroke:g,strokeWidth:j.outlineWidth,opacity:m})]})]})]})},ns=({layer:e,sourceLayer:t,coordSystem:r,panelRect:n})=>{const o=B(t),s=(0,h.useMemo)(()=>Vr(t,r.mainAxis,o),[t,r.mainAxis,o]),i=(0,u.createStableKeyGenerator)(e.data,e.mapping,e.id),l=[];for(const c of e.data){const d=Ur(s,r.mainAxis,o,c);d!==null&&l.push((0,a.jsx)(rs,{observation:c,mainAxis:r.mainAxis,styleReaders:o,column:d,panelRect:n},i(c)))}return l},lt=3,os=({layer:e,coordSystem:t,primary:r,panelRect:n})=>{const o=B(e),s=(0,h.useId)(),i=(0,h.useId)(),l=(0,h.useId)(),c=(0,h.useMemo)(()=>Vr(e,t.mainAxis,o),[e,t.mainAxis,o]),d=(0,u.getBarRectBounds)(t.mainAxis,r.observation),g=Ur(c,t.mainAxis,o,r.observation);if(!d||g===null)return null;const v=Ye(d,n),f=Ye(g.bounds,n),{borderColor:m,borderWidth:p,borderRadius:y,borderAlpha:b}=g.style,S=(0,u.resolveBarBorderRadiusPx)({borderRadius:y,mainAxis:t.mainAxis,bounds:f}),A=ve(v,0),j=ve(f,S),w=ve(sr(v,lt),0),E=ve(sr(f,lt),S>0?S+lt:0),P=o.get("color",r.observation),I=o.get("alpha",r.observation),T=o.get("borderColor",r.observation,"hovered")??u.DEFAULT_HOVER_AFFORDANCE_COLOR,L=(0,u.resolveBarBorderTreatment)(p);return(0,a.jsxs)("g",{"data-testid":"hovered-bar",children:[(0,a.jsx)("clipPath",{id:s,children:(0,a.jsx)("path",{d:E})}),(0,a.jsx)("clipPath",{id:i,children:(0,a.jsx)("path",{d:A})}),(0,a.jsx)("clipPath",{id:l,children:(0,a.jsx)("path",{d:j})}),(0,a.jsx)("g",{className:ts,children:(0,a.jsx)("g",{clipPath:`url(#${s})`,children:(0,a.jsx)("path",{d:w,fill:T,"data-testid":"hovered-bar-border"})})}),(0,a.jsx)("g",{clipPath:`url(#${i})`,children:(0,a.jsxs)("g",{clipPath:`url(#${l})`,children:[(0,a.jsx)("path",{d:A,fill:P,opacity:I,"data-testid":"hovered-bar-fill"}),m!==void 0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{d:A,fill:"none",stroke:m,strokeWidth:L.separatorWidth,opacity:I,"data-testid":"hovered-bar-inner-border"}),(0,a.jsx)("path",{d:j,fill:"none",stroke:m,strokeWidth:L.outlineWidth,opacity:b})]})]})})]})},as={geom:"bar",coord:"cartesian",swatchShape:"square",guideMode:"band",render:({layer:e,coordSystem:t,shouldAnimateTransitions:r,intro:n})=>(0,a.jsx)(Ja,{layer:e,coordSystem:t,shouldAnimateTransitions:r,intro:n}),renderHighlight:({layer:e,sourceLayer:t,coordSystem:r,panelRect:n})=>(0,a.jsx)(ns,{layer:e,sourceLayer:t,coordSystem:r,panelRect:n}),renderHover:({layer:e,coordSystem:t,primary:r,panelRect:n})=>(0,a.jsx)(os,{layer:e,coordSystem:t,primary:r,panelRect:n}),renderHoverCompanions:()=>null},ss=(0,h.memo)(function({layer:t,shouldAnimateTransitions:r,intro:n}){const o=n?.type==="wipe"?n:null,s=(0,h.useMemo)(()=>(0,u.createLinePathGenerator)(t.params),[t.params]),i=(0,h.useMemo)(()=>(0,u.createLineFillAreaGenerator)(t.params),[t.params]),l=B(t),c=(0,h.useMemo)(()=>{const d=(0,u.createStableKeyGenerator)(t.data,t.mapping,t.id),g=[];return t.data.groupBy(u.GROUP_VARIABLES.group).forEach(v=>{const f=(0,u.prepareLineObservations)([...v],t.params.missingValues),m=s(f);if(!m)return;const p=f[0];if(!p)return;const y=l.get("fillAlpha",p),b=y===void 0?void 0:i(f)??void 0,S=l.get("color",p),A=l.get("strokeWidth",p),j=(0,u.getDashArray)(l.get("lineType",p));g.push({key:d(p),pathData:m,fillPath:b,fillAlpha:y,color:S,opacity:l.get("alpha",p),strokeWidth:A,strokeDasharray:j})}),g},[s,i,t.data,t.id,t.mapping,t.params,l]).map(d=>(0,a.jsx)(is,{pathData:d.pathData,fillPath:d.fillPath,fillAlpha:d.fillAlpha,color:d.color,strokeWidth:d.strokeWidth,opacity:d.opacity,strokeDasharray:d.strokeDasharray,shouldAnimateTransitions:r},d.key));return(0,a.jsx)("svg",{viewBox:"0 0 1 1",preserveAspectRatio:"none",width:"100%",height:"100%","data-geom":"line",className:Q,children:o?(0,a.jsx)(Dr,{intro:o,children:c}):c})}),is=({pathData:e,fillPath:t,fillAlpha:r,color:n,strokeWidth:o,opacity:s,strokeDasharray:i,shouldAnimateTransitions:l})=>t!==void 0&&r!==void 0?(0,a.jsx)(ls,{fillPath:t,fillAlpha:r,linePath:e,color:n,strokeWidth:o,opacity:s,strokeDasharray:i,shouldAnimateTransitions:l}):l?(0,a.jsx)(cs,{pathData:e,color:n,strokeWidth:o,opacity:s,strokeDasharray:i}):(0,a.jsx)("path",{d:e,fill:"none",stroke:n,strokeWidth:o,opacity:s,strokeDasharray:i,vectorEffect:"non-scaling-stroke"}),ls=({fillPath:e,fillAlpha:t,linePath:r,color:n,strokeWidth:o,opacity:s,strokeDasharray:i,shouldAnimateTransitions:l})=>{const c=`line_fill_gradient_${(0,h.useId)()}`;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{id:c,gradientTransform:"rotate(90 0.5 0.5)",children:[(0,a.jsx)("stop",{offset:"0%",stopColor:n}),(0,a.jsx)("stop",{offset:"70%",stopColor:n,stopOpacity:0}),(0,a.jsx)("stop",{offset:"100%",stopColor:n,stopOpacity:0})]})}),(0,a.jsx)(Hr,{fillPath:e,linePath:r,fill:`url(#${c})`,fillOpacity:t,stroke:n,strokeWidth:o,strokeOpacity:s,strokeDasharray:i,shouldAnimateTransitions:l})]})},cs=({pathData:e,color:t,strokeWidth:r,opacity:n,strokeDasharray:o})=>{const s=mt(e,$);return(0,a.jsx)(R.motion.path,{d:s,fill:"none",stroke:t,strokeWidth:r,opacity:n,strokeDasharray:o,vectorEffect:"non-scaling-stroke"})},us=({layer:e,primary:t,companions:r})=>{const n=B(e),o=(0,u.getGroup)(t.observation),s=(0,h.useMemo)(()=>(0,u.prepareLineObservations)([...e.data.filter(u.GROUP_VARIABLES.group,"eq",o)],e.params.missingValues),[e.data,e.params.missingValues,o]),i=(0,h.useMemo)(()=>(0,u.createLinePathGenerator)(e.params)(s),[e.params,s]);if(!i)return null;const l=n.get("color",t.observation),c=n.get("alpha",t.observation),d=n.get("strokeWidth",t.observation),g=(0,u.getDashArray)(n.get("lineType",t.observation));return(0,a.jsxs)("g",{"data-testid":"hovered-line",children:[(0,a.jsx)("svg",{viewBox:"0 0 1 1",preserveAspectRatio:"none",width:"100%",height:"100%","data-geom":"line",className:Q,children:(0,a.jsx)("path",{d:i,fill:"none",stroke:l,strokeWidth:d,opacity:c,strokeDasharray:g,vectorEffect:"non-scaling-stroke","data-testid":"hovered-line-path"})}),r.map(v=>(0,a.jsx)(se,{hit:v},`companion-${v.layerId}-${v.pointIndex}`)),(0,a.jsx)(Ae,{hit:t,"data-testid":"hovered-line-point"})]})},ds={geom:"line",coord:"cartesian",swatchShape:"line",guideMode:"crosshair",render:({layer:e,shouldAnimateTransitions:t,intro:r})=>(0,a.jsx)(ss,{layer:e,shouldAnimateTransitions:t,intro:r}),renderHover:({layer:e,primary:t,group:r,related:n})=>(0,a.jsx)(us,{layer:e,primary:t,companions:[...r,...n]}),renderHoverCompanions:({related:e})=>(0,a.jsx)(a.Fragment,{children:e.map(t=>(0,a.jsx)(se,{hit:t},`companion-${t.layerId}-${t.pointIndex}`))}),getOverlayAnchor:({observation:e})=>{const t=(0,u.getX)(e),r=(0,u.getY)(e);return t===null||r===null?null:{x:t,y:r}}},Kr=({observation:e,project:t,styleReaders:r,animation:n,introKey:o})=>{const s=(0,u.getX)(e),i=(0,u.getY)(e);if(s===null||i===null)return null;const l=t(s,i),c=(0,u.toPercent)(l.x),d=(0,u.toPercent)(l.y),g=r.get("size",e)/2,v=r.get("color",e),f=r.get("alpha",e),m=r.get("borderColor",e),p=r.get("borderWidth",e),{isAnimated:y,activeIntro:b,shouldAnimateTransitions:S}=n;return y?(0,a.jsx)(R.motion.circle,{initial:b?{cx:c,cy:d,r:0,opacity:0}:!1,transition:b?Et(b,o):Pt(S),fill:v,stroke:m,strokeWidth:p,animate:{cx:c,cy:d,r:g,opacity:f}}):(0,a.jsx)("circle",{cx:c,cy:d,r:g,fill:v,opacity:f,stroke:m,strokeWidth:p})},hs=(0,h.memo)(function({layer:t,shouldAnimateTransitions:r,intro:n}){const o=B(t),s=Ze(n?.type==="grow"&&n.growAxis==="size"?n:null,r);return(0,h.useMemo)(()=>{const i=s.activeIntro?(0,u.createStableKeyGenerator)(t.data,t.mapping,t.id):null,l=[];let c=0;for(const d of t.data)l.push((0,a.jsx)(Kr,{observation:d,project:Rt,styleReaders:o,animation:s,introKey:i?.(d)},String(c++)));return l},[t.data,t.mapping,t.id,o,s])}),ir=({primary:e,companions:t})=>{const r=(0,a.jsxs)(a.Fragment,{children:[t.map(n=>(0,a.jsx)(se,{hit:n},`companion-${n.layerId}-${n.pointIndex}`)),e?(0,a.jsx)(Ae,{hit:e}):null]});return e?(0,a.jsx)("g",{"data-testid":"hovered-point",children:r}):r},gs={geom:"point",coord:"cartesian",swatchShape:"circle",render:({layer:e,shouldAnimateTransitions:t,intro:r})=>(0,a.jsx)(hs,{layer:e,shouldAnimateTransitions:t,intro:r}),renderHover:({primary:e,group:t,related:r})=>(0,a.jsx)(ir,{primary:e,companions:[...t,...r]}),renderHoverCompanions:({related:e})=>(0,a.jsx)(ir,{companions:e}),getOverlayAnchor:({observation:e})=>{const t=(0,u.getX)(e),r=(0,u.getY)(e);return t===null||r===null?null:{x:t,y:r}}},Te=`"Stack Sans Text", 'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu',
|
|
2
|
-
'Cantarell', 'Helvetica Neue', 'NotoSansArabic', 'NotoSansJP', 'NotoSansSC', 'NotoSansKR', 'NotoSerifKR', sans-serif, 'Apple Color Emoji', 'NotoColorEmoji'`,vs=Te,Ce={regular:u.NAMED_WEIGHTS.regular,medium:u.NAMED_WEIGHTS.medium,semibold:u.NAMED_WEIGHTS.semiBold,bold:u.NAMED_WEIGHTS.bold,extraBold:u.NAMED_WEIGHTS.extraBold},X={xxs:1,xs:1.1,sm:1.2,md:1.4,lg:1.6,xl:2,editorBody:1.5,headingSm:1.8,headingMd:2.2,headingLg:2.8},Y={xxs:1,xs:1,sm:1.3,md:1.43,lg:1,xl:1,editorBody:1.47,headingSm:1.25,headingMd:1.41,headingLg:1.29},q=e=>`${e}em`,Yr={textScale:"1",fontFamily:Te,fontFamilyHeading:vs,fontWeightRegular:Ce.regular.toString(),fontWeightMedium:Ce.medium.toString(),fontWeightSemibold:Ce.semibold.toString(),fontWeightBold:Ce.bold.toString(),fontWeightExtraBold:Ce.extraBold.toString(),fontSizeXxs:q(X.xxs),fontSizeXs:q(X.xs),fontSizeSm:q(X.sm),fontSizeMd:q(X.md),fontSizeLg:q(X.lg),fontSizeXl:q(X.xl),fontLineHeightXxs:Y.xxs.toString(),fontLineHeightXs:Y.xs.toString(),fontLineHeightSm:Y.sm.toString(),fontLineHeightMd:Y.md.toString(),fontLineHeightLg:Y.lg.toString(),fontLineHeightXl:Y.xl.toString()},zr={fontSizeEditorBody:q(X.editorBody),fontSizeHeadingSm:q(X.headingSm),fontSizeHeadingMd:q(X.headingMd),fontSizeHeadingLg:q(X.headingLg),fontLineHeightEditorBody:Y.editorBody.toString(),fontLineHeightHeadingSm:Y.headingSm.toString(),fontLineHeightHeadingMd:Y.headingMd.toString(),fontLineHeightHeadingLg:Y.headingLg.toString()},k=(e,t,r,n=x.vars.fontFamily)=>`${e} ${t}/${r} ${n}`,Qr={fontUITooltip:k(x.vars.fontWeightMedium,x.vars.fontSizeMd,x.vars.fontLineHeightMd),fontUITooltipSecondary:k(x.vars.fontWeightMedium,x.vars.fontSizeSm,x.vars.fontLineHeightSm),fontButton:k(x.vars.fontWeightMedium,x.vars.fontSizeMd,x.vars.fontLineHeightMd),fontInput:k(x.vars.fontWeightMedium,x.vars.fontSizeMd,x.vars.fontLineHeightMd),fontInputLabel:k(x.vars.fontWeightMedium,x.vars.fontSizeXxs,x.vars.fontLineHeightXxs),fontSelectLabel:k(x.vars.fontWeightMedium,x.vars.fontSizeMd,x.vars.fontLineHeightMd),fontSelectDescription:k(x.vars.fontWeightMedium,x.vars.fontSizeSm,x.vars.fontLineHeightSm),fontColorSelectLabel:k(x.vars.fontWeightMedium,x.vars.fontSizeSm,x.vars.fontLineHeightSm),fontMenuTitle:k(x.vars.fontWeightSemibold,x.vars.fontSizeMd,x.vars.fontLineHeightMd),fontMenuGroupTitle:k(x.vars.fontWeightMedium,x.vars.fontSizeSm,x.vars.fontLineHeightSm),fontMenuItemLabel:k(x.vars.fontWeightMedium,x.vars.fontSizeMd,x.vars.fontLineHeightMd),fontMenuItemLabelSecondary:k(x.vars.fontWeightMedium,x.vars.fontSizeSm,x.vars.fontLineHeightSm),fontErrorBoundaryTitle:k(x.vars.fontWeightSemibold,x.vars.fontSizeHeadingSm,x.vars.fontLineHeightHeadingSm),fontErrorBoundaryMessage:k(x.vars.fontWeightMedium,x.vars.fontSizeMd,x.vars.fontLineHeightMd),fontTableCell:k(x.vars.fontWeightMedium,x.vars.fontSizeMd,x.vars.fontLineHeightMd),fontTableHeaderCell:k(x.vars.fontWeightSemibold,x.vars.fontSizeSm,x.vars.fontLineHeightSm),fontSourceLabel:k(x.vars.fontWeightMedium,x.vars.fontSizeSm,x.vars.fontLineHeightSm),fontSourceLink:k(x.vars.fontWeightRegular,x.vars.fontSizeSm,x.vars.fontLineHeightSm),fontTextEditorH1:k(x.vars.fontWeightBold,x.vars.fontSizeHeadingLg,x.vars.fontLineHeightHeadingLg,x.vars.fontFamilyHeading),fontTextEditorH2:k(x.vars.fontWeightBold,x.vars.fontSizeHeadingMd,x.vars.fontLineHeightHeadingMd,x.vars.fontFamilyHeading),fontTextEditorH3:k(x.vars.fontWeightSemibold,x.vars.fontSizeHeadingSm,x.vars.fontLineHeightHeadingSm,x.vars.fontFamilyHeading),fontTextEditorH6:k(x.vars.fontWeightMedium,x.vars.fontSizeSm,x.vars.fontLineHeightSm),fontTextEditorBody:k(x.vars.fontWeightMedium,x.vars.fontSizeEditorBody,x.vars.fontLineHeightEditorBody),fontTextEditorLink:k(x.vars.fontWeightRegular,x.vars.fontSizeMd,x.vars.fontLineHeightMd),fontHighlightModeTitle:k(x.vars.fontWeightBold,x.vars.fontSizeMd,x.vars.fontLineHeightMd),fontHighlightModeSubtitle:k(x.vars.fontWeightMedium,x.vars.fontSizeSm,x.vars.fontLineHeightSm),fontEditorControlLabel:k(x.vars.fontWeightMedium,x.vars.fontSizeSm,x.vars.fontLineHeightSm),fontEditorControlValue:k(x.vars.fontWeightMedium,x.vars.fontSizeSm,x.vars.fontLineHeightSm),fontEditorSectionTitle:k(x.vars.fontWeightSemibold,x.vars.fontSizeSm,x.vars.fontLineHeightSm),fontEditorCaption:k(x.vars.fontWeightMedium,x.vars.fontSizeXxs,x.vars.fontLineHeightXxs)},fs=Y.sm,ms=(e,t)=>({familyDefault:ct(t)??ct(e.fontFamily)??ct(Te)??""}),ct=e=>e===void 0||e.includes("var(")?null:e.replace(/\s+/g," ").trim(),D=(e,t)=>`color-mix(in srgb, transparent, ${e} ${t*100}%)`,Xr=(e,t)=>`hsl(from ${e} h s calc(l * ${1-t}))`,ps=(e,t)=>`hsl(from ${e} h s calc(l * ${1+t}))`,xs=e=>/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e),ys=e=>e.length===0?!1:typeof CSS<"u"&&typeof CSS.supports=="function"?CSS.supports("color",e):/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(e),ut=e=>`${e}px`,qr={tooltipRowGap:"4px",editorControlHeight:ut(32),legendSwatchGap:ut(8),headlineRowGap:ut(2)},fe={panelOverlay:5,textToolbar:10,textToolbarTooltip:20,textToolbarPopover:30,legendPopover:40,editorOverlay:900,editorOverlayPopover:950,tooltip:1e3},Jr={elevationXs:"0 0 2px rgba(15, 15, 24, 0.12), 0 2px 2px rgba(14, 14, 52, 0.08)",elevationSm:"0 0 4px rgba(15, 15, 24, 0.12), 0 4px 4px rgba(14, 14, 52, 0.08)",elevationMd:"0 0 8px rgba(15, 15, 24, 0.12), 0 8px 8px rgba(14, 14, 52, 0.08)",elevationLg:"0 0 16px rgba(15, 15, 24, 0.12), 0 16px 16px rgba(14, 14, 52, 0.08)"},Zr={radiiXs:"4px",radiiSm:"6px",radiiMd:"8px",radiiLg:"12px"},_r={zIndexToolbar:`${fe.textToolbar}`,zIndexToolbarTooltip:`${fe.textToolbarTooltip}`,zIndexToolbarPopover:`${fe.textToolbarPopover}`,zIndexEditorPopover:`${fe.editorOverlayPopover}`},bs=8,he=e=>`${bs*e}px`,$r={spaceXxs:he(.25),spaceXs:he(.5),spaceSm:he(.75),spaceMd:he(1),spaceLg:he(1.5),spaceXl:he(2)},As={transparent:"transparent",white:"#FFFFFF",black:"#000000",gray100:"#000000",gray95:"#0D0D0D",gray90:"#1A1A1A",gray85:"#1F1F1F",gray80:"#2A2A2A",gray75:"#2e2e2e",gray70:"#353535",gray60:"#494949",gray50:"#6F6F6F",gray0:"#FFFFFF",red60:"#CB3333",red50:"#F93939",amber70:"#F48135",amber50:"#FEAE47",amber40:"#FFC849",amber30:"#ffd061",green60:"#0AC600",green50:"#42CD69",blue80:"#2E62FF",blue60:"#3D70FF",purple50:"#7B56EA",purple30:"#E093FE",grayGradient80:"linear-gradient(to top, #222429, #31353f)"},Ss={textPrimary:x.vars.gray0,textSecondary:D(x.vars.textPrimary,.8),textDisabled:D(x.vars.textPrimary,.5),iconPrimary:"currentColor",iconSecondary:D(x.vars.textPrimary,.6),iconStickerBackground:x.vars.gray70,border100:x.vars.gray0,border50:D(x.vars.gray0,.5),border10:D(x.vars.gray0,.1),brand:x.vars.purple50,success:x.vars.green50,warning:x.vars.amber50,alert:x.vars.red50,sunkenBackground:x.vars.gray100,defaultBackground:x.vars.gray90,raisedBackground:x.vars.gray80,overlayBackground:x.vars.gray90,overlayBorderGradient:x.vars.grayGradient80},js={graphBackground:x.vars.gray90,legendFocusOutlineColor:x.vars.border50,toolbarBackgroundColor:x.vars.overlayBackground,toolbarButtonBackgroundColor:"transparent",toolbarButtonBackgroundColorHovered:x.vars.gray80,toolbarButtonBackgroundColorSelected:x.vars.gray60,toolbarSeparatorColor:x.vars.gray60,annotationOutlineColor:x.vars.blue60,editMenuTriggerIconColor:x.vars.white},ws={canvasDefault:"#FFFFFF",canvasBlue:"#60a5fa",canvasCyan:"#22d3ee",canvasGreen:"#34d399",canvasYellow:"#FFC800",canvasOrange:"#fb923c",canvasRed:"#f87171",canvasPink:"#F979D9",canvasPurple:"#a78bfa",canvasGray:"#a8a29e",canvasInverse:"#000000"},Rs={...As,...Ss,...Jr,...Zr,...$r,..._r,...js,...ws,...qr,...Yr,...zr,...Qr},Ps={transparent:"transparent",white:"#FFFFFF",black:"#000000",gray100:"#FFFFFF",gray95:"#FCFCFC",gray90:"#FAFAFA",gray85:"#F5F5F5",gray80:"#F0F0F0",gray75:"#E8E8E8",gray70:"#E5E5E5",gray60:"#CCCCCC",gray50:"#C4C4C4",gray0:"#1D2129",red60:"#E14B49",red50:"#F93939",amber70:"#FFBA8C",amber50:"#FFC849",amber40:"#FEAE47",amber30:"#E7A816",green60:"#06B299",green50:"#42CD69",blue80:"#2E62FF",blue60:"#3D70FF",purple50:"#7B56EA",purple30:"#E093FE",grayGradient80:"linear-gradient(to top, #F0F0F1, #F9F9FF)"},Es={textPrimary:x.vars.black,textSecondary:D(x.vars.textPrimary,.6),textDisabled:D(x.vars.textPrimary,.5),iconPrimary:"currentColor",iconSecondary:D(x.vars.textPrimary,.6),iconStickerBackground:x.vars.gray100,brand:x.vars.purple50,success:x.vars.green50,warning:x.vars.amber50,alert:x.vars.red50,border100:x.vars.gray0,border50:D(x.vars.gray0,.5),border10:D(x.vars.gray0,.1),sunkenBackground:x.vars.gray90,defaultBackground:x.vars.gray100,raisedBackground:x.vars.gray85,overlayBackground:x.vars.gray100,overlayBorderGradient:x.vars.border10},ks={graphBackground:x.vars.gray100,legendFocusOutlineColor:x.vars.border50,toolbarBackgroundColor:x.vars.overlayBackground,toolbarButtonBackgroundColor:"transparent",toolbarButtonBackgroundColorHovered:x.vars.gray80,toolbarButtonBackgroundColorSelected:x.vars.gray60,toolbarSeparatorColor:x.vars.gray60,annotationOutlineColor:x.vars.blue60,editMenuTriggerIconColor:"#3d414c"},Cs={canvasDefault:"#000000",canvasBlue:"#3b82f6",canvasCyan:"#06b6d4",canvasGreen:"#10b981",canvasYellow:"#E5B400",canvasOrange:"#f97316",canvasRed:"#ef4444",canvasPink:"#E845BF",canvasPurple:"#8b5cf6",canvasGray:"#78716c",canvasInverse:"#ffffff"},Ms={...Ps,...Es,...Jr,...Zr,...$r,..._r,...ks,...Cs,...qr,...Yr,...zr,...Qr},kt=(e,t={})=>{const r={};for(const[n,o]of Object.entries(t))o!=null&&(r[n]=o);return{...e==="dark"?Rs:Ms,...r}},en=(e,t={},r)=>{const n=kt(e,t);return{legendSwatchGap:lr(n.legendSwatchGap,8),headlineRowGap:lr(n.headlineRowGap,2),fonts:ms(n,r)}},Bs=Object.freeze(en("light"));function lr(e,t){const r=e.trim();if(!/^-?\d*\.?\d+(px)?$/.test(r))return t;const n=Number.parseFloat(r);return Number.isFinite(n)?n:t}var tn=(0,h.createContext)(Bs),Is=({metrics:e,children:t})=>(0,a.jsx)(tn.Provider,{value:e,children:t}),ce=()=>(0,h.useContext)(tn),M=()=>{const{colorScheme:e}=N(),t=C(r=>r.chrome);return(0,h.useMemo)(()=>(0,u.createStyleResolver)({colorScheme:e}).chromeReaders(t),[t,e])},Ts=e=>{const t=M();return(0,h.useMemo)(()=>(0,u.resolveRuleLabelStyle)(t,e),[t,e])},_e=(e,t,r)=>{const{colorScheme:n}=N(),o=C(s=>e===void 0?void 0:(0,u.findLayerById)(s.layers,e));return(0,h.useMemo)(()=>{if(o===void 0)return{};const s=(0,u.readColorGroupObservation)(o,t),i=(0,u.resolveSwatchGeomPaint)((0,u.createStyleResolver)({colorScheme:n}).geomReaders(o),o,s,{width:r,height:r});return{alpha:i.alpha,cornerRadius:i.cornerRadiusPx}},[o,n,t,r])},Os=/\p{Emoji_Presentation}|\p{Emoji}\uFE0F/gu,rn="😀",nn=class on{constructor(){this.emojiCorrections=new Map,this.currentFont="";const t=new OffscreenCanvas(1,1).getContext("2d");if(!t)throw new Error("Failed to create OffscreenCanvas 2D context");this.ctx=t}static async create(){return typeof document<"u"&&"fonts"in document&&await document.fonts.ready,new on}measureText(t,r){const n=(0,u.buildFontString)(r);this.setFont(n);const{width:o,fontBoundingBoxAscent:s,fontBoundingBoxDescent:i}=this.ctx.measureText(t);let l=o;const c=Ls(t);if(c>0){const d=this.getEmojiCorrection(n);l-=d*c}return{width:l,height:s+i,ascent:s,descent:i}}setFont(t){this.currentFont!==t&&(this.ctx.font=t,this.currentFont=t)}getEmojiCorrection(t){const r=this.emojiCorrections.get(t);if(r!==void 0)return r;this.setFont(t);const n=this.ctx.measureText(rn).width,o=Fs(t);let s=0;if(o!==null){const i=n-o;s=i>.5?i:0}return this.emojiCorrections.set(t,s),s}},ee=null,Ls=e=>{const t=e.match(Os);return t?t.length:0},Fs=e=>{const t=Ns();return t?(t.style.font=e,t.getBoundingClientRect().width):null},Ns=()=>typeof document>"u"?null:(ee||(ee=document.createElement("span"),ee.style.position="absolute",ee.style.visibility="hidden",ee.style.whiteSpace="nowrap",ee.style.left="-9999px",ee.textContent=rn,document.body.appendChild(ee)),ee),an=(0,h.createContext)(null),cr=3e3,sn=({children:e,measurer:t})=>{const[r,n]=(0,h.useState)(null);(0,h.useEffect)(()=>{if(t!==void 0)return;let s=!1;const i=()=>{s||n(Hs())};if(!(typeof document<"u"&&"fonts"in document)){i();return}const l=setTimeout(()=>{s||(console.warn(`[graphy] FONT_READY_TIMEOUT: document.fonts.ready has not settled in ${cr}ms; painting with the fonts available so far.`),i())},cr),c=()=>{clearTimeout(l),i()};return document.fonts.ready.then(c,c),document.fonts.addEventListener("loadingdone",c),()=>{s=!0,clearTimeout(l),document.fonts.removeEventListener("loadingdone",c)}},[t]);const o=t??r;return o===null?null:(0,a.jsx)(an.Provider,{value:o,children:e})},oe=()=>{const e=(0,h.useContext)(an);if(e===null)throw new Error("useTextMeasurer must be used inside a <TextMeasurerProvider>.");return e},Hs=()=>{try{return new u.CachedTextMeasurer(new nn)}catch{return new u.CachedTextMeasurer(new u.HeuristicTextMeasurer)}},ln=(0,h.createContext)(null),Ds=ln.Provider,Gs=null,ae=()=>(0,h.useContext)(ln)??(Gs??=bn()),Ws=11.7,Vs=.5,ur=21.6,Us="0 0 10 18",Ks="M2.48935 16.9323L9.07098 9.82964C9.51595 9.34944 9.51504 8.60728 9.0689 8.12818L2.48866 1.06172C1.85811 0.384586 0.974477 0 0.049217 0H0V18H0.0443689C0.972463 18 1.85854 17.6131 2.48935 16.9323Z",Ys="_16vokpr0",zs=(e,t)=>e.mapping.y!==void 0!=(t.mainAxis==="y"),Qs=(e,t)=>{const r=(0,u.toPercent)(e?1-t:t);return e?{x1:"0%",y1:r,x2:"100%",y2:r}:{x1:r,y1:"0%",x2:r,y2:"100%"}},Xs=(e,t)=>{const r=(0,u.getRuleDashArray)(e,t);return r.length===0?{}:{strokeDasharray:r.join(" "),strokeLinecap:"round",...e==="dashed"?{strokeMiterlimit:16}:{}}},qs=(e,t)=>De(e)&&De(t)?`${e}: ${t}`:De(e)?e:De(t)?t:null,Js=e=>e?14:0,Zs=(e,t)=>e*Vs-Js(t)-10,_s=(e,t,r)=>{const n=e*r,o=-13-n,s=r+13-n-t;return s<o?o:Math.min(Math.max(-t/2,o),s)},De=e=>e!=null&&e.trim()!=="",cn=Object.freeze({}),Ct=(0,h.createContext)(cn),$s=({slots:e,children:t})=>(0,a.jsx)(Ct.Provider,{value:e??cn,children:t});function J(e,t){const r=(0,h.useContext)(Ct)[e];return r===void 0?t:typeof r=="object"&&ti(r)?r.render:r}function ei(){const e=(0,h.useContext)(Ct);return{measureAxis:e.AxisTicks?.measure,measureAxisLabel:e.AxisLabel?.measure,measureLegend:e.Legend?.measure,measureHeadline:e.Headline?.measure.measureHeadline,measureHeadlineItemWidths:e.Headline?.measure.measureHeadlineItemWidths}}function ti(e){return"render"in e&&"measure"in e}var ri="_2qyyu60",ni=2,oi=12,ai=12,dr=1,hr=2,si=4,Oe=e=>(0,a.jsx)(J("Swatch",un),{...e}),un=({shape:e,color:t,lineType:r="solid",width:n=oi,height:o=ai,strokeWidth:s=ni,alpha:i,cornerRadius:l})=>(0,a.jsx)("svg",{className:ri,width:n,height:o,viewBox:`0 0 ${n} ${o}`,"aria-hidden":!0,"data-testid":"chart-swatch","data-shape":e,children:ii({shape:e,color:t,lineType:r,width:n,height:o,strokeWidth:s,alpha:i,cornerRadius:l})}),ii=({shape:e,color:t,lineType:r,width:n,height:o,strokeWidth:s,alpha:i,cornerRadius:l})=>{const c=li(r,n);switch(e){case"square":return(0,a.jsx)("rect",{x:1,y:1,width:n-2,height:o-2,rx:l??2,fill:t,opacity:i});case"line":return(0,a.jsx)("line",{x1:c.x1,y1:o/2,x2:c.x2,y2:o/2,stroke:t,strokeWidth:s,strokeLinecap:c.linecap,strokeDasharray:c.dashArray,opacity:i});case"circle":{const d=(Math.min(n,o)-2)/2;return(0,a.jsx)("circle",{cx:n/2,cy:o/2,r:d,fill:t,opacity:i})}case"area":{const d=o/2-1;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("rect",{x:1,y:d,width:n-2,height:o-d-1,fill:t,opacity:i??.45}),(0,a.jsx)("line",{x1:c.x1,y1:d,x2:c.x2,y2:d,stroke:t,strokeWidth:s,strokeLinecap:c.linecap,strokeDasharray:c.dashArray})]})}case"slice":return(0,a.jsx)("path",{d:`M 0 ${o} L ${n} ${o} A ${n} ${o} 0 0 0 0 0 Z`,fill:t,opacity:i});default:return e}},li=(e,t)=>e==="solid"?{x1:0,x2:t,dashArray:void 0,linecap:"round"}:e==="dashed"?{x1:0,x2:t,dashArray:`${(t-dr*(hr-1))/hr} ${dr}`,linecap:"butt"}:{x1:0,x2:t,dashArray:`1 ${t/(si-1)}`,linecap:"round"},ne=e=>({fontFamily:e.fontFamily??x.vars.fontFamily,fontSize:e.fontSize,fontWeight:e.fontWeight}),ge=e=>({fontFamily:e.fontFamily??x.vars.fontFamily,fontSize:e.fontSize,fontWeight:e.fontWeight,lineHeight:e.lineHeight,color:e.textColor}),te=e=>({fontFamily:e.fontFamily??x.vars.fontFamily,fontSize:e.fontSize,fontWeight:e.fontWeight,lineHeight:e.lineHeight,color:e.textColor}),ci=(e,t)=>(0,jt.assignInlineVars)({[e.fontFamily]:t.fontFamily??x.vars.fontFamily,[e.fontSize]:`${t.fontSize}px`,[e.fontWeight]:String(t.fontWeight),[e.lineHeight]:String(t.lineHeight),[e.textColor]:t.textColor}),ui=({labelPosition:e,linePosition:t,color:r,pillWidth:n,pillHeight:o,text:s,shouldAnimateTransitions:i})=>{const l=e==="start",c=l?-13:-(n-13),d=l?c+n-5:c+5-12,g=l?void 0:`rotate(180 ${d+12/2} ${o/2})`,v=l?"0%":"100%",f=(0,u.toPercent)(1-t),m=(0,a.jsxs)("g",{transform:`translate(0, ${-o/2})`,pointerEvents:"none",children:[(0,a.jsx)("rect",{x:c,y:0,width:n,height:o,rx:6,fill:r}),(0,a.jsx)("g",{transform:g,children:(0,a.jsx)("svg",{x:d,y:(o-ur)/2,width:12,height:ur,viewBox:Us,overflow:"visible",children:(0,a.jsx)("path",{d:Ks,fill:r})})}),(0,a.jsx)("g",{transform:`translate(${c+5}, ${o/2})`,children:s})]});return i?(0,a.jsx)(R.motion.svg,{initial:!1,transition:$,x:v,animate:{y:f},overflow:"visible",children:m}):(0,a.jsx)("svg",{x:v,y:f,overflow:"visible",children:m})},di=({labelPosition:e,linePosition:t,color:r,pillWidth:n,pillHeight:o,panelWidth:s,text:i,shouldAnimateTransitions:l})=>{const c=e==="start",d=c?-13:-(o-13),g=(0,u.toPercent)(t),v=c?"100%":"0%",f=(0,a.jsxs)("g",{transform:`translate(${_s(t,n,s)}, 0)`,pointerEvents:"none",children:[(0,a.jsx)("rect",{x:0,y:d,width:n,height:o,rx:6,fill:r}),(0,a.jsx)("g",{transform:`translate(5, ${d+o/2})`,children:i})]});return l?(0,a.jsx)(R.motion.svg,{initial:!1,transition:$,y:v,animate:{x:g},overflow:"visible",children:f}):(0,a.jsx)("svg",{x:g,y:v,overflow:"visible",children:f})},hi=({label:e,textStyle:t,textWidth:r,labelPosition:n,isHorizontalLine:o,position:s,color:i,textColor:l,symbolShape:c,symbolColor:d,symbolAlpha:g,symbolCornerRadius:v,panelWidth:f,shouldAnimateTransitions:m})=>{const p=c===null?0:14,y=r+p+10,b=Math.max(Ws,(0,u.computeLineBoxHeight)(t))+10,S=(0,a.jsxs)(a.Fragment,{children:[c!==null&&d!==null&&(0,a.jsx)("g",{transform:`translate(0, ${-10/2})`,children:(0,a.jsx)(Oe,{shape:c,color:d,surface:"rule-label",width:10,height:10,alpha:g,cornerRadius:v})}),(0,a.jsx)("text",{x:p,textAnchor:"start",dominantBaseline:"central",fill:l,style:ne(t),children:e})]});return o?(0,a.jsx)(ui,{labelPosition:n,linePosition:s,color:i,pillWidth:y,pillHeight:b,text:S,shouldAnimateTransitions:m}):(0,a.jsx)(di,{labelPosition:n,linePosition:s,color:i,pillWidth:y,pillHeight:b,panelWidth:f,text:S,shouldAnimateTransitions:m})},gi=({strokeWidth:e,lineType:t,isHorizontalLine:r,position:n,lineColor:o,shouldAnimateTransitions:s})=>{const i=Qs(r,n),l=Xs(t,e);return s?(0,a.jsx)(R.motion.line,{initial:!1,transition:$,animate:{x1:i.x1,y1:i.y1,x2:i.x2,y2:i.y2},...l,stroke:o,strokeWidth:e,vectorEffect:"non-scaling-stroke"}):(0,a.jsx)("line",{...i,...l,stroke:o,strokeWidth:e,vectorEffect:"non-scaling-stroke"})},vi=(0,h.memo)(function({layer:t,coordSystem:r,formattingLocale:n,shouldAnimateTransitions:o,panelWidth:s}){const i=oe(),l=ae(),{guides:c,numberFormat:d,specLayers:g,colorScale:v}=C((0,W.useShallow)(H=>({guides:H.guides,numberFormat:H.config.numberFormat,specLayers:H.spec.layers,colorScale:H.scales.color}))),f=(0,h.useMemo)(()=>(0,u.buildAverageLineSymbols)(g,v).get(t.id)??null,[g,v,t.id]),m=f?l(f.geom,r.type)?.swatchShape??"square":null,p=_e(f?.layerId,f?.groupValue,10),y=(0,h.useMemo)(()=>qs(t.params.label,(0,u.formatRuleValue)({guides:c,numberFormat:d,layer:t,locale:n})),[c,d,n,t]),{fonts:b}=ce(),S=Ts(t.id),A=(0,h.useMemo)(()=>(0,u.toFontSpec)(S,b.familyDefault),[S,b.familyDefault]),j=(0,h.useMemo)(()=>y===null?null:(0,u.truncateToWidth)(y,Zs(s,m!==null),H=>i.measureText(H,A).width),[y,s,m,A,i]),w=(0,h.useMemo)(()=>j===null?0:i.measureText(j,A).width,[j,A,i]),E=B(t),P=t.data.getFirst();if(!P)return null;const I=E.get("color",P),T=S.textColor??(0,u.pickReadableTextColor)(I),L=zs(t,r),F=L?(0,u.getY)(P):(0,u.getX)(P);return F===null?null:(0,a.jsxs)("g",{"data-geom":"rule",className:Ys,children:[(0,a.jsx)(gi,{strokeWidth:E.get("strokeWidth",P),lineType:E.get("lineType",P),isHorizontalLine:L,position:F,lineColor:I,shouldAnimateTransitions:o}),j!==null&&j!==""&&(0,a.jsx)(hi,{label:j,textStyle:S,textWidth:w,labelPosition:t.params.labelPosition,isHorizontalLine:L,position:F,color:I,textColor:T,symbolShape:m,symbolColor:f?.color??null,symbolAlpha:p.alpha,symbolCornerRadius:p.cornerRadius,panelWidth:s,shouldAnimateTransitions:o})]})}),fi={geom:"rule",coord:"cartesian",render:({layer:e,coordSystem:t,formattingLocale:r,shouldAnimateTransitions:n,panelRect:o})=>(0,a.jsx)(vi,{layer:e,coordSystem:t,formattingLocale:r,shouldAnimateTransitions:n,panelWidth:o.width}),renderHover:()=>null,renderHoverCompanions:()=>null},mi=(0,h.memo)(function({layer:t,shouldAnimateTransitions:r,intro:n}){const o=n?.type==="fade"?n:null,s=B(t),i=(0,h.useMemo)(()=>{const l=(0,u.createStableCellKeyGenerator)(t.data,t.mapping,t.id),c=[];for(const d of t.data){const g=(0,u.getInsetTileRect)(d);g&&(0,u.getColor)(d)&&c.push({key:l(d),...g,fill:s.get("color",d),opacity:s.get("alpha",d),rx:s.get("borderRadius",d),borderColor:s.get("borderColor",d),borderWidth:s.get("borderWidth",d)})}return c.map(({key:d,...g})=>(0,a.jsx)(pi,{...g,isAnimated:r},d))},[t,s,r]);return o?(0,a.jsx)(R.motion.g,{initial:{opacity:0},animate:{opacity:1},transition:Oa(o),children:i}):i}),pi=({isAnimated:e,...t})=>e?(0,a.jsx)(R.motion.rect,{initial:!1,style:{transformBox:"view-box"},transition:$,fill:t.fill,opacity:t.opacity,rx:t.rx,stroke:t.borderColor,strokeWidth:t.borderWidth,animate:{x:(0,u.toPercent)(t.x),y:(0,u.toPercent)(t.y),width:(0,u.toPercent)(t.width),height:(0,u.toPercent)(t.height)}}):(0,a.jsx)("rect",{style:{transformBox:"view-box"},x:(0,u.toPercent)(t.x),y:(0,u.toPercent)(t.y),width:(0,u.toPercent)(t.width),height:(0,u.toPercent)(t.height),fill:t.fill,opacity:t.opacity,rx:t.rx,stroke:t.borderColor,strokeWidth:t.borderWidth}),xi=({layer:e,primary:t,panelRect:r})=>{const n=B(e),o=(0,u.getInsetTileRect)(t.observation);if(!o||!(0,u.getColor)(t.observation))return null;const s=n.get("color",t.observation),i=n.get("alpha",t.observation),l=n.get("borderColor",t.observation,"hovered")??u.DEFAULT_HOVER_AFFORDANCE_COLOR,c=n.get("borderWidth",t.observation,"hovered"),d=n.get("borderRadius",t.observation,"hovered"),g=o.x*r.width,v=o.y*r.height,f=o.width*r.width,m=o.height*r.height;return(0,a.jsxs)("g",{"data-testid":"hovered-tile",children:[(0,a.jsx)("rect",{x:g-c,y:v-c,width:f+c*2,height:m+c*2,rx:d+c,fill:l,"data-testid":"hovered-tile-border"}),(0,a.jsx)("rect",{x:(0,u.toPercent)(o.x),y:(0,u.toPercent)(o.y),width:(0,u.toPercent)(o.width),height:(0,u.toPercent)(o.height),rx:d,fill:s,opacity:i,"data-testid":"hovered-tile-fill"})]})},yi={geom:"tile",coord:"cartesian",swatchShape:"square",guideMode:null,render:({layer:e,shouldAnimateTransitions:t,intro:r})=>(0,a.jsx)(mi,{layer:e,shouldAnimateTransitions:t,intro:r}),renderHover:({layer:e,primary:t,panelRect:r})=>(0,a.jsx)(xi,{layer:e,primary:t,panelRect:r}),renderHoverCompanions:()=>null},ze=({primary:e,companions:t})=>{const r=(0,a.jsxs)(a.Fragment,{children:[t.map(n=>(0,a.jsx)(se,{hit:n,project:_},`companion-${n.layerId}-${n.pointIndex}`)),e?(0,a.jsx)(Ae,{hit:e,project:_}):null]});return e?(0,a.jsx)("g",{"data-testid":"hovered-point",children:r}):r},xt=e=>{const[t,...r]=e;if(!t)return"";const n=r.map(o=>`L ${o.x} ${o.y}`).join(" ");return`M ${t.x} ${t.y} ${n} Z`},bi=(0,h.memo)(function({layer:t}){const r=B(t),n=(0,h.useMemo)(()=>{const o=(0,u.createStableKeyGenerator)(t.data,t.mapping,t.id),s=[];return t.data.groupBy(u.GROUP_VARIABLES.group).forEach(i=>{const l=[...i],c=dn(l);if(!c)return;const d=l[0];d&&s.push({key:o(d),fillPath:c.fillPath,outlinePath:c.outlinePath,color:r.get("color",d),fillOpacity:r.get("alpha",d),strokeOpacity:r.get("strokeAlpha",d),strokeWidth:r.get("strokeWidth",d)})}),s},[t.data,t.id,t.mapping,r]);return(0,a.jsx)("svg",{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%","data-geom":"area",className:Q,children:n.map(o=>(0,a.jsxs)("g",{children:[(0,a.jsx)("path",{d:o.fillPath,fill:o.color,fillOpacity:o.fillOpacity,fillRule:"evenodd"}),(0,a.jsx)("path",{d:o.outlinePath,fill:"none",stroke:o.color,strokeWidth:o.strokeWidth,opacity:o.strokeOpacity,vectorEffect:"non-scaling-stroke"})]},o.key))})}),dn=e=>{const t=[];for(const s of e){const i=(0,u.getX)(s),{innerRadius:l,outerRadius:c}=(0,u.getRadiusExtent)(s);i===null||l===null||c===null||t.push({angle:i,outer:z(i,c),inner:z(i,l)})}if(t.length===0)return null;t.sort((s,i)=>s.angle-i.angle);const r=t.map(s=>s.outer),n=t.map(s=>s.inner),o=xt(r);return{fillPath:n.some(s=>s.x!==0||s.y!==0)?`${o} ${xt([...n].reverse())}`:o,outlinePath:o}},Ai=({layer:e,primary:t,companions:r})=>{const n=B(e),o=(0,u.getGroup)(t.observation),s=(0,h.useMemo)(()=>dn([...e.data.filter(u.GROUP_VARIABLES.group,"eq",o)]),[e.data,o]);if(!s)return null;const i=n.get("color",t.observation),l=n.get("alpha",t.observation),c=n.get("strokeAlpha",t.observation),d=n.get("strokeWidth",t.observation);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("svg",{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%","data-geom":"area","data-testid":"hovered-area",className:Q,children:[(0,a.jsx)("path",{d:s.fillPath,fill:i,fillOpacity:l,fillRule:"evenodd","data-testid":"hovered-area-fill"}),(0,a.jsx)("path",{d:s.outlinePath,fill:"none",stroke:i,strokeWidth:d,opacity:c,vectorEffect:"non-scaling-stroke","data-testid":"hovered-area-edge"})]}),r.map(g=>(0,a.jsx)(se,{hit:g,project:_},`companion-${g.layerId}-${g.pointIndex}`)),(0,a.jsx)(Ae,{hit:t,project:_,"data-testid":"hovered-area-point"})]})},Si={geom:"area",coord:"polar",swatchShape:"area",guideMode:"crosshair",render:({layer:e})=>(0,a.jsx)(bi,{layer:e}),renderHover:({layer:e,primary:t,group:r,related:n})=>(0,a.jsx)(Ai,{layer:e,primary:t,companions:[...r,...n]}),renderHoverCompanions:({related:e})=>(0,a.jsx)(ze,{companions:e}),getOverlayAnchor:({observation:e})=>{const t=(0,u.getX)(e),r=(0,u.getYMax)(e)??(0,u.getY)(e);if(t===null||r===null)return null;const{x:n,y:o}=_(t,r);return{x:n,y:1-o}}},gr=Math.PI*2,Be=(e,t)=>({stroke:e,strokeWidth:t,vectorEffect:"non-scaling-stroke"}),ji=(0,h.memo)(function({layer:t,coordSystem:r,shouldAnimateTransitions:n,intro:o}){const s=(0,h.useId)(),i=Ze(o?.type==="grow"&&(o.growAxis==="angle"||o.growAxis==="radius")?o:null,n),l=r.bandAxis!=="x",c=B(t),d=(0,h.useMemo)(()=>{const g=(0,u.createStableKeyGenerator)(t.data,t.mapping,t.id),v=new Map;for(const f of t.data){const m=g(f),{startAngle:p,endAngle:y}=(0,u.getAngleExtent)(f),{innerRadius:b,outerRadius:S}=(0,u.getRadiusExtent)(f);if(p===null||y===null||b===null||S===null)continue;const A={key:m,startAngle:p,endAngle:y,innerRadius:b,outerRadius:S,fill:c.get("color",f),opacity:c.get("alpha",f)},j=(0,u.buildSliceGroupKey)(r.bandAxis,A),w=v.get(j);w?w.items.push(A):v.set(j,{items:[A],style:Se(c,f)})}return[...v.values()].map(({items:f,style:m},p)=>({key:f[0]?.key??String(p),items:f,union:(0,u.getUnionExtent)(f),style:m}))},[t.data,t.mapping,t.id,r.bandAxis,c]);return(0,a.jsx)("svg",{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%","data-geom":"bar",className:Q,children:d.map((g,v)=>{const{borderColor:f,borderWidth:m,borderRadius:p,borderAlpha:y}=g.style,b=f!==void 0,S=(0,u.resolveBarBorderTreatment)(m),A=f===void 0?{}:Be(f,S.separatorWidth),j=f===void 0?void 0:Be(f,S.outlineWidth),w=g.items.map(T=>{const{key:L,...F}=T;return i.isAnimated?(0,a.jsx)(wi,{...F,animation:i,sweepsInOnLateMount:l,introKey:L,pathProps:{fill:F.fill,opacity:F.opacity,...A}},L):(0,a.jsx)("path",{d:(0,u.buildPolarBarArcPath)(F)??void 0,fill:F.fill,opacity:F.opacity,...A},L)}),E=(0,u.resolvePolarBarCornerRadiusUnit)(p,g.union.outerRadius-g.union.innerRadius);if(!b&&E<=0)return(0,a.jsx)(h.Fragment,{children:w},g.key);const P=`${s}${v}`;if(i.isAnimated)return(0,a.jsx)("g",{clipPath:`url(#${P})`,children:(0,a.jsx)(Ri,{...g.union,cornerRadius:E,animation:i,sweepsInOnLateMount:l,introKey:g.items[0]?.key,clipId:P,outlineProps:j,outlineOpacity:y,children:w})},g.key);const I=(0,u.buildPolarBarArcPath)({...g.union,cornerRadius:E});return(0,a.jsxs)("g",{clipPath:`url(#${P})`,children:[(0,a.jsx)("clipPath",{id:P,children:(0,a.jsx)("path",{d:I})}),w,j!==void 0&&(0,a.jsx)("path",{d:I,fill:"none",opacity:y,...j})]},g.key)})})}),hn=({startAngle:e,endAngle:t,innerRadius:r,outerRadius:n,cornerRadius:o,animation:s,sweepsInOnLateMount:i,introKey:l})=>{const c=s.activeIntro?.growAxis==="angle"?s.activeIntro:null,d=s.activeIntro?.growAxis==="radius"?s.activeIntro:null,g=i&&!s.isLayerEntrance,v=c?.baseline??(g?gr:e),f=c?.baseline??(g?gr:t),m=d?d.baseline:r,p=d?d.baseline:n,y=(0,R.useMotionValue)(v),b=(0,R.useMotionValue)(f),S=(0,R.useMotionValue)(m),A=(0,R.useMotionValue)(p),j=(0,R.useMotionValue)((0,u.buildPolarBarArcPath)({startAngle:v,endAngle:f,innerRadius:m,outerRadius:p,cornerRadius:o})??""),w=pt(s,l,c);(0,h.useEffect)(()=>{const P=w(),I=[(0,R.animate)(y,e,P),(0,R.animate)(b,t,P)];return()=>{for(const T of I)T.stop()}},[y,b,e,t,w]);const E=pt(s,l,d);return(0,h.useEffect)(()=>{const P=E(),I=[(0,R.animate)(S,r,P),(0,R.animate)(A,n,P)];return()=>{for(const T of I)T.stop()}},[S,A,r,n,E]),(0,h.useEffect)(()=>{const P=()=>{j.set((0,u.buildPolarBarArcPath)({startAngle:y.get(),endAngle:b.get(),innerRadius:S.get(),outerRadius:A.get(),cornerRadius:o})??"")};P();const I=[y,b,S,A].map(T=>T.on("change",P));return()=>{for(const T of I)T()}},[y,b,S,A,o,j]),j},wi=({pathProps:e,...t})=>{const r=hn(t);return(0,a.jsx)(R.motion.path,{d:r,transition:$,...e})},Ri=({clipId:e,outlineProps:t,outlineOpacity:r,children:n,...o})=>{const s=hn(o);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("clipPath",{id:e,children:(0,a.jsx)(R.motion.path,{d:s})}),n,t!==void 0&&(0,a.jsx)(R.motion.path,{d:s,fill:"none",opacity:r,transition:$,...t})]})},Pi=(e,t)=>{const r=e==="solo"||e==="floor",n=e==="solo"||e==="ceiling";return t==="x"?{innerArc:r,outerArc:n,startSpoke:!0,endSpoke:!0}:{innerArc:!0,outerArc:!0,startSpoke:r,endSpoke:n}},gn=(e,t,r)=>{const n=new Map;for(const s of e.data){const i=mn(s);if(i===null)continue;const l=(0,u.buildSliceGroupKey)(t,i),c=n.get(l);c===void 0?n.set(l,{firstObservation:s,innerRadius:i.innerRadius,outerRadius:i.outerRadius}):(c.innerRadius=Math.min(c.innerRadius,i.innerRadius),c.outerRadius=Math.max(c.outerRadius,i.outerRadius))}const o=new Map;for(const[s,{firstObservation:i,innerRadius:l,outerRadius:c}]of n)o.set(s,{style:Se(r,i),radialSpan:c-l});return o},vn=(e,t,r,n)=>{const o=mn(n),s=o===null?void 0:e.get((0,u.buildSliceGroupKey)(t,o));return s!==void 0?s:{style:Se(r,n),radialSpan:o===null?0:o.outerRadius-o.innerRadius}},fn=({observation:e,bandAxis:t,styleReaders:r,group:n})=>{const o=(0,h.useId)(),s=(0,h.useId)(),{startAngle:i,endAngle:l}=(0,u.getAngleExtent)(e),{innerRadius:c,outerRadius:d}=(0,u.getRadiusExtent)(e);if(i===null||l===null||c===null||d===null)return null;const g={startAngle:i,endAngle:l,innerRadius:c,outerRadius:d},v=(0,u.buildPolarBarArcPath)(g);if(v===void 0)return null;const f=r.get("color",e),m=r.get("alpha",e),{borderColor:p,borderWidth:y,borderRadius:b,borderAlpha:S}=n.style,A=(0,u.resolvePolarBarCornerRadiusUnit)(b,n.radialSpan),j=A>0;if(p===void 0&&!j)return(0,a.jsx)("path",{d:v,fill:f,opacity:m,"data-testid":"arc-segment"});const w=Pi((0,u.getStackRole)(e),t),E=j?(0,u.buildPolarBarArcPath)({...ki(g,w,A),cornerRadius:A})??v:v,P=p===void 0?null:{color:p,...(0,u.resolveBarBorderTreatment)(y)},I=P===null?"":mr(g,Ci(w));return(0,a.jsxs)("g",{clipPath:`url(#${o})`,"data-testid":"arc-segment",children:[(0,a.jsx)("clipPath",{id:o,children:(0,a.jsx)("path",{d:v})}),(0,a.jsx)("path",{d:E,fill:f,opacity:m}),P!==null&&I!==""&&(0,a.jsx)("path",{d:I,fill:"none",opacity:m,...Be(P.color,P.separatorWidth)}),P!==null&&(j?(0,a.jsxs)("g",{clipPath:`url(#${s})`,children:[(0,a.jsx)("clipPath",{id:s,children:(0,a.jsx)("path",{d:E})}),(0,a.jsx)("path",{d:E,fill:"none",opacity:S,...Be(P.color,P.outlineWidth)})]}):(0,a.jsx)("path",{d:mr(g,w),fill:"none",opacity:S,...Be(P.color,P.outlineWidth)}))]})},Ei=({layer:e,sourceLayer:t,coordSystem:r})=>{const n=B(t),o=(0,h.useMemo)(()=>gn(t,r.bandAxis,n),[t,r.bandAxis,n]),s=(0,u.createStableKeyGenerator)(e.data,e.mapping,e.id),i=[];for(const l of e.data)i.push((0,a.jsx)(fn,{observation:l,bandAxis:r.bandAxis,styleReaders:n,group:vn(o,r.bandAxis,n,l)},s(l)));return(0,a.jsx)("svg",{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%","data-geom":"bar",className:Q,children:i})},ki=(e,t,r)=>{let{startAngle:n,endAngle:o,innerRadius:s,outerRadius:i}=e;t.innerArc||(s=Math.max(0,s-r)),t.outerArc||(i=i+r);const l=Math.max(s,r),c=l>0?r/l:0,d=Math.sign(o-n)||1;return t.startSpoke||(n-=c*d),t.endSpoke||(o+=c*d),{startAngle:n,endAngle:o,innerRadius:s,outerRadius:i}},mn=e=>{const{startAngle:t,endAngle:r}=(0,u.getAngleExtent)(e),{innerRadius:n,outerRadius:o}=(0,u.getRadiusExtent)(e);return t===null||r===null||n===null||o===null?null:{startAngle:t,endAngle:r,innerRadius:n,outerRadius:o}},Ie=(e,t)=>{const r=z(t,e);return`${r.x},${r.y}`},vr=(e,t,r)=>{if(e<=0)return"";const n=Ie(e,t);if((0,u.isFullTurnSweep)(t,r))return`M${n}A${e},${e} 0 1 1 ${Ie(e,t+Math.PI)}A${e},${e} 0 1 1 ${n}`;const o=r-t;return`M${n}A${e},${e} 0 ${Math.abs(o)>Math.PI?1:0} ${o>=0?1:0} ${Ie(e,r)}`},fr=(e,t,r)=>`M${Ie(t,e)}L${Ie(r,e)}`,mr=(e,t)=>{const{startAngle:r,endAngle:n,innerRadius:o,outerRadius:s}=e,i=(0,u.isFullTurnSweep)(r,n);return[t.innerArc?vr(o,r,n):"",t.outerArc?vr(s,r,n):"",t.startSpoke&&!i?fr(r,o,s):"",t.endSpoke&&!i?fr(n,o,s):""].filter(Boolean).join("")},Ci=e=>({innerArc:!e.innerArc,outerArc:!e.outerArc,startSpoke:!e.startSpoke,endSpoke:!e.endSpoke}),Mi=({layer:e,coordSystem:t,primary:r})=>{const n=B(e),o=vn((0,h.useMemo)(()=>gn(e,t.bandAxis,n),[e,t.bandAxis,n]),t.bandAxis,n,r.observation);return(0,a.jsx)("svg",{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%","data-geom":"arc","data-testid":"hovered-arc",className:Q,children:(0,a.jsx)(fn,{observation:r.observation,bandAxis:t.bandAxis,styleReaders:n,group:o})})},Bi={geom:"bar",coord:"polar",swatchShape:"slice",guideMode:"band",render:({layer:e,coordSystem:t,shouldAnimateTransitions:r,intro:n})=>(0,a.jsx)(ji,{layer:e,coordSystem:t,shouldAnimateTransitions:r,intro:n}),renderHighlight:({layer:e,sourceLayer:t,coordSystem:r})=>(0,a.jsx)(Ei,{layer:e,sourceLayer:t,coordSystem:r}),renderHover:({layer:e,coordSystem:t,primary:r})=>(0,a.jsx)(Mi,{layer:e,coordSystem:t,primary:r}),renderHoverCompanions:()=>null},Ii=(0,h.memo)(function({layer:t}){const r=B(t),n=(0,h.useMemo)(()=>{const o=(0,u.createStableKeyGenerator)(t.data,t.mapping,t.id),s=[];return t.data.groupBy(u.GROUP_VARIABLES.group).forEach(i=>{const l=[...i],c=pn(l);if(!c)return;const d=l[0];d&&s.push({key:o(d),pathData:c,color:r.get("color",d),opacity:r.get("alpha",d),strokeWidth:r.get("strokeWidth",d),strokeDasharray:(0,u.getDashArray)(r.get("lineType",d))})}),s},[t.data,t.id,t.mapping,r]);return(0,a.jsx)("svg",{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%","data-geom":"line",className:Q,children:n.map(o=>(0,a.jsx)("path",{d:o.pathData,fill:"none",stroke:o.color,strokeWidth:o.strokeWidth,opacity:o.opacity,strokeDasharray:o.strokeDasharray,vectorEffect:"non-scaling-stroke"},o.key))})}),pn=e=>{const t=[];for(const r of e){const n=(0,u.getX)(r),o=(0,u.getY)(r);n===null||o===null||t.push({angle:n,point:z(n,o)})}return t.length===0?null:(t.sort((r,n)=>r.angle-n.angle),xt(t.map(r=>r.point)))},Ti=({layer:e,primary:t,companions:r})=>{const n=B(e),o=(0,u.getGroup)(t.observation),s=(0,h.useMemo)(()=>pn([...e.data.filter(u.GROUP_VARIABLES.group,"eq",o)]),[e.data,o]);if(!s)return null;const i=n.get("color",t.observation),l=n.get("alpha",t.observation),c=n.get("strokeWidth",t.observation),d=(0,u.getDashArray)(n.get("lineType",t.observation));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("svg",{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%","data-geom":"line","data-testid":"hovered-line",className:Q,children:(0,a.jsx)("path",{d:s,fill:"none",stroke:i,strokeWidth:c,opacity:l,strokeDasharray:d,vectorEffect:"non-scaling-stroke","data-testid":"hovered-line-path"})}),r.map(g=>(0,a.jsx)(se,{hit:g,project:_},`companion-${g.layerId}-${g.pointIndex}`)),(0,a.jsx)(Ae,{hit:t,project:_,"data-testid":"hovered-line-point"})]})},Oi={geom:"line",coord:"polar",swatchShape:"line",guideMode:"crosshair",render:({layer:e})=>(0,a.jsx)(Ii,{layer:e}),renderHover:({layer:e,primary:t,group:r,related:n})=>(0,a.jsx)(Ti,{layer:e,primary:t,companions:[...r,...n]}),renderHoverCompanions:({related:e})=>(0,a.jsx)(ze,{companions:e}),getOverlayAnchor:({observation:e})=>{const t=(0,u.getX)(e),r=(0,u.getY)(e);if(t===null||r===null)return null;const{x:n,y:o}=_(t,r);return{x:n,y:1-o}}},Li=(0,h.memo)(function({layer:t,shouldAnimateTransitions:r,intro:n}){const o=B(t),s=Ze(n?.type==="grow"&&n.growAxis==="size"?n:null,r);return(0,h.useMemo)(()=>{const i=s.activeIntro?(0,u.createStableKeyGenerator)(t.data,t.mapping,t.id):null,l=[];let c=0;for(const d of t.data)l.push((0,a.jsx)(Kr,{observation:d,project:_,styleReaders:o,animation:s,introKey:i?.(d)},String(c++)));return l},[t.data,t.mapping,t.id,o,s])}),Fi={geom:"point",coord:"polar",swatchShape:"circle",render:({layer:e,shouldAnimateTransitions:t,intro:r})=>(0,a.jsx)(Li,{layer:e,shouldAnimateTransitions:t,intro:r}),renderHover:({primary:e,group:t,related:r})=>(0,a.jsx)(ze,{primary:e,companions:[...t,...r]}),renderHoverCompanions:({related:e})=>(0,a.jsx)(ze,{companions:e}),getOverlayAnchor:({observation:e})=>{const t=(0,u.getX)(e),r=(0,u.getY)(e);if(t===null||r===null)return null;const{x:n,y:o}=_(t,r);return{x:n,y:1-o}}},xn={bar:{cartesian:as,polar:Bi},line:{cartesian:ds,polar:Oi},area:{cartesian:qa,polar:Si},point:{cartesian:gs,polar:Fi},rule:{cartesian:fi},tile:{cartesian:yi}};function $e(e){return typeof e=="function"?{overlay:!1,fn:e}:{overlay:!0,fn:e.fn}}function yn(e){return e?$e(e.render).overlay:!1}function Ni(e,t){return typeof e=="string"?{...t,geom:e}:{...t,definition:e,geom:e.type}}function bn(e=[]){const t={};for(const[r,n]of Object.entries(xn))t[r]={...n};for(const r of e)(t[r.geom]??={})[r.coord]=r;return(r,n)=>t[r]?.[n]??null}var Qe=e=>{const t=(0,h.useRef)(e);return t.current=e,t},Hi=()=>{const e=new Map;return(0,Tr.createStore)(t=>({hover:u.RESTING_HOVER_STATE,tooltipAnchor:null,pointerRegions:[],isPointerSuspended:!1,isQueryOwnedByEditor:!1,setHoverState:r=>t(n=>n.hover===r?n:{hover:r}),setTooltipAnchor:r=>t(n=>Di(n.tooltipAnchor,r)?n:{tooltipAnchor:r}),publishPointerRegions:(r,n)=>{n.length===0?e.delete(r):e.set(r,n);const o=(0,u.orderPointerRegions)(e);t(s=>(0,u.arePointerRegionListsEqual)(s.pointerRegions,o)?s:{pointerRegions:o})},setPointerSuspended:r=>t(n=>n.isPointerSuspended===r?n:{isPointerSuspended:r}),setQueryOwnedByEditor:r=>t(n=>n.isQueryOwnedByEditor===r?n:{isQueryOwnedByEditor:r})}))},Di=(e,t)=>e===t?!0:e===null||t===null?!1:e.x===t.x&&e.y===t.y&&e.placement===t.placement&&e.annotationId===t.annotationId,Gi=(e,t)=>{const r=(0,h.useMemo)(()=>({layers:e,coordSystem:t}),[e,t]),n=(0,h.useRef)(null);n.current===null&&(n.current=new u.HoverEngine(r));const o=n.current,s=(0,h.useRef)(!1);return(0,h.useEffect)(()=>{if(!s.current){s.current=!0;return}o.update(r)},[o,r]),o},An=(0,h.createContext)(null),Sn=({children:e})=>{const{layers:t,coordSystem:r}=C((0,W.useShallow)(l=>({layers:l.layers,coordSystem:l.coordSystem}))),n=Gi(t,r),[o]=(0,h.useState)(()=>Hi()),s=(0,h.useRef)(null),i=(0,h.useRef)(null);return i.current===null&&(i.current={engine:n,store:o,overlayRef:s}),(0,a.jsx)(An.Provider,{value:i.current,children:e})},ie=()=>{const e=(0,h.useContext)(An);if(e===null)throw new Error("useHoverContext must be used inside a <HoverProvider>.");return e};function jn(e,t){const{engine:r}=ie(),n=(0,h.useRef)(t);(0,h.useEffect)(()=>{n.current=t},[t]),(0,h.useEffect)(()=>(r.registerHitTester(e,o=>n.current(o)),()=>r.unregisterHitTester(e)),[r,e])}var Wi=({hitTest:e,input:t})=>{const r=(0,h.useMemo)(()=>e(t),[e,t.layer.data,t.panelRect.x,t.panelRect.y,t.panelRect.width,t.panelRect.height]);return jn(t.layer.id,r),null},Vi="graphy_root",Mt=()=>typeof document>"u"?null:document.getElementById(Vi)??document.body,Ui="_10igzta0",wn=({rect:e,zIndex:t,container:r,boxRef:n,children:o,...s})=>r===null?null:(0,Or.createPortal)((0,a.jsx)("div",{...s,ref:n,className:Ui,style:{transform:`translate(${e.left}px, ${e.top}px)`,width:e.width,height:e.height,zIndex:t},children:o}),r),Ki=({rect:e,children:t})=>{const[r]=(0,h.useState)(Mt);return(0,a.jsx)(wn,{rect:e,zIndex:fe.panelOverlay,container:r,children:t})},Rn=(e,t)=>{const r=Qe(e),n=Qe(t),o=(0,h.useRef)(null),s=(0,h.useRef)(null),i=(0,h.useMemo)(()=>{const l=()=>{s.current!==null&&(clearTimeout(s.current),s.current=null),o.current=null},c=()=>{s.current!==null&&(clearTimeout(s.current),s.current=null);const g=o.current;g!==null&&(o.current=null,r.current(...g))};return{run:(...g)=>{if(n.current<=0){r.current(...g);return}o.current=g,s.current!==null&&clearTimeout(s.current),s.current=setTimeout(c,n.current)},flush:c,cancel:l}},[r,n]);return(0,h.useEffect)(()=>()=>{s.current!==null&&clearTimeout(s.current)},[]),i},Yi={width:0,height:0,isDefault:!0},Pn=({debounce:e=0,onResize:t}={})=>{const[r,n]=(0,h.useState)(Yi),o=(0,h.useRef)(null),s=Rn(d=>{const g=o.current;g&&g.width===d.width&&g.height===d.height||(o.current={width:d.width,height:d.height},t?.(d),n(d))},e),i=(0,h.useRef)(null),l=(0,h.useRef)(null),c=(0,h.useCallback)(d=>{i.current!==d&&(i.current&&l.current?.unobserve(i.current),i.current=d,d&&(l.current??=new ResizeObserver(([g])=>{if(!g)return;const v=Math.round(g.contentBoxSize[0]?.inlineSize??g.contentRect.width),f=Math.round(g.contentBoxSize[0]?.blockSize??g.contentRect.height);s.run({width:v,height:f,isDefault:!1})}),l.current.observe(d)))},[s]);return{...r,setElement:c}};function En(){const[e,t]=(0,h.useState)(null),r=(0,h.useRef)(null),n=(0,h.useRef)(null),o=(0,h.useRef)(null),s=(0,h.useCallback)(()=>{o.current=null;const d=n.current;if(!d)return;const g=d.getBoundingClientRect();if(g.width===0||g.height===0){r.current!==null&&(r.current=null,t(null));return}const v={left:g.left,top:g.top,width:g.width,height:g.height},f=r.current;f&&f.left===v.left&&f.top===v.top&&f.width===v.width&&f.height===v.height||(r.current=v,t(v))},[]),i=(0,h.useCallback)(()=>{o.current===null&&(o.current=requestAnimationFrame(s))},[s]),{setElement:l}=Pn({onResize:i}),c=(0,h.useCallback)(d=>{n.current=d,l(d),d&&s()},[l,s]);return(0,h.useEffect)(()=>(window.addEventListener("scroll",i,!0),window.addEventListener("resize",i),()=>{window.removeEventListener("scroll",i,!0),window.removeEventListener("resize",i),o.current!==null&&cancelAnimationFrame(o.current)}),[i]),{measureRef:c,screenRect:e}}function kn(e){const{engine:t,store:r}=ie();return(0,h.useCallback)((n,o)=>{const{hover:s,setHoverState:i,setTooltipAnchor:l}=r.getState(),c=n===null?u.RESTING_HOVER_STATE:t.resolveHoverByKey(e,n);if(c.primary===null){s.primary?.layerId===e&&(i(u.RESTING_HOVER_STATE),l(null));return}i(c),l(o?{x:o.clientX,y:o.clientY,placement:"top"}:null)},[t,r,e])}var zi=({render:e,input:t})=>{const r=kn(t.layer.id),{measureRef:n,screenRect:o}=En();return(0,h.useEffect)(()=>()=>r(null),[r]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("rect",{ref:n,x:0,y:0,width:"100%",height:"100%",fill:"none",pointerEvents:"none"}),o&&(0,a.jsx)(Ki,{rect:o,children:(0,a.jsx)(Qi,{render:e,input:t,pushHover:r,panelRect:o})})]})},Qi=({render:e,input:t,pushHover:r,panelRect:n})=>e({...t,overlay:{pushHover:r,panelRect:n}}),Z={readonly:"readonly",editable:"editable",pointAndEdit:"point-and-edit"},je={[Z.readonly]:{tooltips:!0,annotations:!0,observationMenu:!1,observationsPress:!1,graphPress:!1,guidePress:!1,holdsHoverWhileSelected:!0,tolerance:null,editorSurface:!1,inlineTextEditing:!1},[Z.editable]:{tooltips:!1,annotations:!0,observationMenu:!0,observationsPress:!1,graphPress:!1,guidePress:!1,holdsHoverWhileSelected:!0,tolerance:null,editorSurface:!0,inlineTextEditing:!0},[Z.pointAndEdit]:{tooltips:!1,annotations:!1,observationMenu:!1,observationsPress:!0,graphPress:!0,guidePress:!0,holdsHoverWhileSelected:!1,tolerance:{on:{edge:2,stroke:5,point:14},near:{main:8,cross:20}},editorSurface:!0,inlineTextEditing:!1}},Xi=new Set(Object.values(Z)),qi=e=>Xi.has(e),Bt=e=>qi(e)?e:Z.readonly,Xe={enabled:!0,durationScale:1,stagger:!0,staggerOrder:"main-axis",maxAnimatedGeoms:1500},Ji=(e,t)=>t?{intro:{...Xe,enabled:!1},transitions:!1}:typeof e=="boolean"?{intro:{...Xe,enabled:e},transitions:e}:{intro:Zi(e?.intro),transitions:e?.transitions??!0},Zi=e=>typeof e=="boolean"?{...Xe,enabled:e}:(0,ft.default)({},Xe,e),_i={loading:"جاري التحميل",error:"حدث خطأ ما",axisLabels:{placeholder:"إضافة تسمية"},defaultPropertyLabels:{date:"التاريخ",year:"السنة",quarter:"الربع",month:"الشهر",week:"الأسبوع",series:"السلسلة",category:"الفئة",columnNumber:({number:e})=>`العمود ${e}`,rowNumber:({number:e})=>`الصف ${e}`,seriesNumber:({number:e})=>`السلسلة ${e}`},trendComparison:{fromPrevious:{long:({value:e})=>`${e} مقابل السابق`,short:({value:e})=>`${e} مقابل السابق`},fromPreviousYear:{long:({value:e})=>`${e} مقابل السنة السابقة`,short:({value:e})=>`${e} مقابل السنة السابقة`},fromPreviousMonth:{long:({value:e})=>`${e} مقابل الشهر السابق`,short:({value:e})=>`${e} مقابل الشهر السابق`},fromPreviousWeek:{long:({value:e})=>`${e} مقابل الأسبوع السابق`,short:({value:e})=>`${e} مقابل الأسبوع السابق`},fromPreviousDay:{long:({value:e})=>`${e} مقابل اليوم السابق`,short:({value:e})=>`${e} مقابل اليوم السابق`},fromPreviousHour:{long:({value:e})=>`${e} مقابل الساعة السابقة`,short:({value:e})=>`${e} مقابل الساعة السابقة`}},headlineMetrics:{averageLong:({value:e})=>`المتوسط ${e}`,averageShort:({value:e})=>`المتوسط ${e}`,total:({value:e})=>`المجموع ${e}`,totalConversionRate:({value:e})=>`معدل التحويل الإجمالي ${e}`,current:({value:e})=>e,comparisonReference:({value:e})=>`من ${e}`},legend:{hiddenItems:"عناصر وسيلة الإيضاح المخفية"}},$i={graph:_i,dir:"rtl"},el={loading:"Loading",error:"Something went wrong",axisLabels:{placeholder:"Add label"},defaultPropertyLabels:{date:"Date",year:"Year",quarter:"Quarter",month:"Month",week:"Week",series:"Series",category:"Category",columnNumber:({number:e})=>`Column ${e}`,rowNumber:({number:e})=>`Row ${e}`,seriesNumber:({number:e})=>`Series ${e}`},trendComparison:{fromPrevious:{long:({value:e})=>`${e} vs previous`,short:({value:e})=>`${e} vs prev`},fromPreviousYear:{long:({value:e})=>`${e} vs previous year`,short:({value:e})=>`${e} vs prev year`},fromPreviousMonth:{long:({value:e})=>`${e} vs previous month`,short:({value:e})=>`${e} vs prev month`},fromPreviousWeek:{long:({value:e})=>`${e} vs previous week`,short:({value:e})=>`${e} vs prev week`},fromPreviousDay:{long:({value:e})=>`${e} vs previous day`,short:({value:e})=>`${e} vs prev day`},fromPreviousHour:{long:({value:e})=>`${e} vs previous hour`,short:({value:e})=>`${e} vs prev hour`}},headlineMetrics:{averageLong:({value:e})=>`Average ${e}`,averageShort:({value:e})=>`Avg. ${e}`,total:({value:e})=>`Total ${e}`,totalConversionRate:({value:e})=>`Total conversion rate ${e}`,current:({value:e})=>e,comparisonReference:({value:e})=>`from ${e}`},legend:{hiddenItems:"Hidden legend items"}},tl={graph:el,dir:"ltr"},rl={},nl={loading:"A carregar",error:"Algo correu mal",axisLabels:{placeholder:"Adicionar etiqueta"},defaultPropertyLabels:{date:"Data",year:"Ano",quarter:"Trimestre",month:"Mês",week:"Semana",series:"Série",category:"Categoria",columnNumber:({number:e})=>`Coluna ${e}`,rowNumber:({number:e})=>`Linha ${e}`,seriesNumber:({number:e})=>`Série ${e}`},trendComparison:{fromPrevious:{long:({value:e})=>`${e} vs anterior`,short:({value:e})=>`${e} vs ant`},fromPreviousYear:{long:({value:e})=>`${e} vs ano anterior`,short:({value:e})=>`${e} vs ano ant`},fromPreviousMonth:{long:({value:e})=>`${e} vs mês anterior`,short:({value:e})=>`${e} vs mês ant`},fromPreviousWeek:{long:({value:e})=>`${e} vs semana anterior`,short:({value:e})=>`${e} vs sem ant`},fromPreviousDay:{long:({value:e})=>`${e} vs dia anterior`,short:({value:e})=>`${e} vs dia ant`},fromPreviousHour:{long:({value:e})=>`${e} vs hora anterior`,short:({value:e})=>`${e} vs hora ant`}},headlineMetrics:{averageLong:({value:e})=>`Média ${e}`,averageShort:({value:e})=>`Méd. ${e}`,total:({value:e})=>`Total ${e}`,totalConversionRate:({value:e})=>`Taxa de conversão total ${e}`,current:({value:e})=>e,comparisonReference:({value:e})=>`de ${e}`},legend:{hiddenItems:"Itens de legenda ocultos"}},ol={graph:nl,dir:"ltr"},et={"en-GB":tl,"en-US":rl,ar:$i,"pt-PT":ol},al=({locale:e,overrides:t,fallbackLocale:r="en-GB",dictionaries:n})=>{const o=t??{},s=e??r,i=[...n.map(c=>c[s]),...n.map(c=>c[r])];return(c,d)=>{const g=d??{},v=c.split("."),f=o[c];if(f)return typeof f=="function"?f(g):f;for(const m of i){if(m===void 0)continue;const p=il(m,v);if(p)return typeof p=="function"?p(g):p}return c}},sl=({locale:e,overrides:t})=>t?.dir??et[e].dir??"ltr",il=(e,t)=>{let r=e;for(const n of t){if(typeof r!="object"||r===null)return;r=r[n]}if(typeof r=="string"||typeof r=="function")return r},ll=e=>{const t="en-GB";if(!e)return t;const r=e.trim().replace("_","-").toLowerCase();return Object.keys(et).find(n=>n.toLowerCase()===r)??t},Cn=(0,h.createContext)(null),cl=[et],It=()=>ul().translator,Mn=({locale:e,children:t,i18nOverrides:r,dictionaries:n=cl})=>{const o=ll(e),s=(0,h.useMemo)(()=>({translator:al({locale:o,overrides:r,fallbackLocale:"en-GB",dictionaries:n}),dir:sl({locale:o,overrides:r})}),[r,o,n]);return(0,a.jsx)(Sa.IntlProvider,{locale:o,timeZone:"UTC",children:(0,a.jsx)(Cn.Provider,{value:s,children:t})})},ul=()=>{const e=(0,h.useContext)(Cn);if(!e)throw new Error("useI18n must be used within IntlProvider");return e},Tt=e=>e==="none"?"none":`${e.offsetX}px ${e.offsetY}px ${e.blur}px ${e.color}`,dl=e=>{if(e!=="none")return`drop-shadow(${e.offsetX}px ${e.offsetY}px ${e.blur}px ${e.color})`},hl=()=>{const e=M();return(0,h.useMemo)(()=>(0,u.resolveTooltipStyle)(e),[e])},gl="bow4tg0",vl="bow4tg1",fl="bow4tg2",ml="bow4tg3",pl="bow4tg4",Ot="_1ii3bsb0",Bn="_1ii3bsb1",In=(0,h.createContext)({colorScheme:"light",themeClass:Ot,inlineVarsStyle:{},themeValues:kt("light",{})}),tt=()=>(0,h.useContext)(In),Tn=({colorScheme:e,textScale:t=1,graphBackground:r,graphFontFamily:n,headingFontFamily:o,children:s})=>{const i=(0,h.useMemo)(()=>kt(e),[e]),l=(0,h.useMemo)(()=>{const d={[x.vars.textScale]:String(t)};return r!==void 0&&(d[x.vars.graphBackground]=r),n!==void 0&&(d[x.vars.fontFamily]=n),o!==void 0&&(d[x.vars.fontFamilyHeading]=o),(0,jt.assignInlineVars)(d)},[t,r,n,o]),c=(0,h.useMemo)(()=>({colorScheme:e,themeClass:e==="dark"?Bn:Ot,inlineVarsStyle:l,themeValues:i}),[e,l,i]);return(0,a.jsx)(In.Provider,{value:c,children:s})},On=({children:e,className:t,style:r})=>{const{themeClass:n,inlineVarsStyle:o}=tt();return(0,a.jsx)("div",{className:(0,G.default)(n,vl,t),style:{...o,...r},children:e})},Ln={modern:"'Inter', -apple-system, BlinkMacSystemFont, 'Open Sans', 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif",timeless:"'Noto Serif', Georgia, 'Times New Roman', serif",fresh:"'Aeonik', 'Aeonik Fallback', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif",technical:"'PT Mono', 'Courier New', monospace",handwritten:"'Permanent Marker', cursive",fineliner:"'Intruding Cat', cursive"},Fn=e=>{const t=e!==null&&typeof e=="object"?e.fontFamily:e;return typeof t=="string"&&t.length>0?t:void 0},yt=e=>{const t=Fn(e);if(t!==void 0)return Ln[t]??t},xl="_1cocly40",xe=({content:e})=>(0,a.jsx)(a.Fragment,{children:Nn(e.content??[e])}),Nn=e=>e.map((t,r)=>yl(t,r)),yl=(e,t)=>{if(e.type==="text")return bl(e,t);if(e.type==="hardBreak"||e.type==="hard_break")return(0,a.jsx)("br",{},t);const r=e.content?Nn(e.content):null;switch(e.type){case"doc":return(0,a.jsx)(h.Fragment,{children:r},t);case"heading":{const n=wl(e.attrs?.level);return Rl(n,t,r,pr(e.attrs))}case"paragraph":return(0,a.jsx)("p",{"data-variant":Lt(e.attrs?.variant)??void 0,style:Hn(pr(e.attrs)),children:r},t);case"blockquote":return(0,a.jsx)("blockquote",{children:r},t);case"bulletList":case"bullet_list":return(0,a.jsx)("ul",{children:r},t);case"orderedList":case"ordered_list":return(0,a.jsx)("ol",{children:r},t);case"listItem":case"list_item":return(0,a.jsx)("li",{children:r},t);default:return(0,a.jsx)("span",{children:r},t)}},bl=(e,t)=>{const r=e.text??"";return!e.marks||e.marks.length===0?(0,a.jsx)("span",{children:r},t):e.marks.reduceRight((n,o,s)=>Al(o,n,`${t}-${s}`),r)},Al=(e,t,r)=>{switch(e.type){case"bold":case"strong":return(0,a.jsx)("strong",{children:t},r);case"italic":case"em":return(0,a.jsx)("em",{children:t},r);case"underline":return(0,a.jsx)("u",{children:t},r);case"strike":case"strikethrough":case"s":return(0,a.jsx)("s",{children:t},r);case"code":return(0,a.jsx)("code",{children:t},r);case"link":{const n=Lt(e.attrs?.href);return(0,u.isSafeUrl)(n)?(0,a.jsx)("a",{className:xl,href:n,rel:"noopener noreferrer",target:"_blank",children:t},r):(0,a.jsx)("span",{children:t},r)}case"textStyle":{const n=Sl(e.attrs);return n?(0,a.jsx)("span",{style:n,children:t},r):(0,a.jsx)("span",{children:t},r)}default:return(0,a.jsx)("span",{children:t},r)}},Sl=e=>{if(!e)return null;const t={},r=Lt(e.color);r&&(t.color=r);const n=yt(e.font)??yt(e.fontFamily);n&&(t.fontFamily=n);const o=jl(e.fontSize);return o&&(t.fontSize=o),Object.keys(t).length>0?t:null},jl=e=>{if(typeof e=="number"&&Number.isFinite(e))return`calc(${e}px * ${x.vars.textScale})`},Lt=e=>typeof e=="string"&&e.length>0?e:void 0,wl=e=>typeof e!="number"?3:e<1?1:e>3?3:Math.round(e),Rl=(e,t,r,n)=>{const o=Hn(n);switch(e){case 1:return(0,a.jsx)("h1",{style:o,children:r},t);case 2:return(0,a.jsx)("h2",{style:o,children:r},t);case 3:return(0,a.jsx)("h3",{style:o,children:r},t)}},pr=e=>{const t=e?.textAlign;if(t==="left"||t==="right"||t==="center"||t==="justify")return t},Hn=e=>e?{textAlign:e}:void 0;function me(e){const{store:t}=ie();return(0,ye.useStore)(t,e)}var Pl="_19519k80";var El="_19519k82",kl="_19519k83",Cl="_19519k85",Ml="_19519k86",Bl="_19519k87",Il="_19519k88",Tl=e=>{const{overlayRef:t}=ie(),r=(0,h.useRef)(null),[n,o]=(0,h.useState)(!1),s=Qe(e);return(0,h.useEffect)(()=>{const i=t.current;if(!i)return;const l=d=>{r.current={clientX:d.clientX,clientY:d.clientY},o(!0),s.current?.()},c=()=>{r.current=null,o(!1)};return i.addEventListener("pointermove",l),i.addEventListener("pointerleave",c),()=>{i.removeEventListener("pointermove",l),i.removeEventListener("pointerleave",c)}},[t,s]),{cursorRef:r,isInside:n}},Ol=24,Ll=8,Fl={x:0,y:0,top:0,left:0,right:0,bottom:0,width:0,height:0,toJSON:()=>({})},Ge={boundary:[],padding:Ll},Nl=()=>{const e=C((0,W.useShallow)(A=>({layers:A.layers,coordSystem:A.coordSystem,scales:A.scales,guides:A.guides,numberFormat:A.config.numberFormat,parsingLocale:A.config.parsingLocale,comments:A.annotations.comments}))),{formattingLocale:t,colorScheme:r}=N(),n=me(A=>A.hover),o=me(A=>A.tooltipAnchor),s=me(A=>A.isPointerSuspended),i=J("Tooltip",Dn),l=(0,h.useRef)(()=>{}),{cursorRef:c,isInside:d}=Tl(()=>l.current()),g=(0,h.useMemo)(()=>(0,u.buildTooltipContent)({...e,hover:n,colorScheme:r,formattingLocale:t,activeCalloutId:o?.annotationId??null}),[e,n,r,t,o]),v=!s&&g!==null&&(d||o!==null),f=(0,h.useMemo)(()=>({getBoundingClientRect:()=>{if(o!==null)return Gl(o);const A=c.current;return A===null?Fl:Dl(A)}}),[c,o]),{refs:m,floatingStyles:p,update:y}=(0,K.useFloating)(Wl({isOpen:v,tooltipAnchor:o,virtualReference:f}));if(l.current=y,!v)return null;const b=(0,a.jsx)("div",{ref:m.setFloating,role:"tooltip",className:Il,style:p,"data-testid":"chart-tooltip",children:(0,a.jsx)(i,{content:g})}),S=Mt();return S?(0,Or.createPortal)((0,a.jsx)(On,{children:b}),S):b},Dn=({content:e})=>{const t=ae(),r=C(c=>c.coordSystem),n=hl(),o=dt(n.heading),s=dt(n.label),i=dt(n.value),l={paddingInline:n.box.paddingInline};return(0,a.jsxs)("div",{className:Pl,style:Hl(n.box),"data-testid":"chart-tooltip-body",children:[e.comment!==null&&(0,a.jsx)("div",{style:{...s,color:n.value.textColor,...l},"data-testid":"chart-tooltip-comment",children:(0,a.jsx)(xe,{content:e.comment})}),e.heading!==null&&(0,a.jsx)("div",{className:"_19519k81",style:{...o,...l},"data-testid":"chart-tooltip-heading",children:e.heading}),(0,a.jsx)("div",{className:El,children:e.rows.map(c=>{const d=t(c.geom,r.type);return(0,a.jsx)(Vl,{row:c,swatchShape:d?.swatchShape??"square",shouldHighlight:c.isPrimary&&e.rows.length>1,labelStyle:s,valueStyle:i,paddingInline:n.box.paddingInline,highlightBackground:n.primaryRow.background},c.key)})})]})},dt=e=>({...ne(e),color:e.textColor,lineHeight:e.lineHeight}),Hl=e=>({background:e.background,borderRadius:e.borderRadius,paddingBlock:e.paddingBlock,boxShadow:Tt(e.shadow),...e.borderWidth>0?{border:`${e.borderWidth}px solid ${e.borderColor}`}:{}}),Dl=e=>({x:e.clientX,y:e.clientY,top:e.clientY,left:e.clientX,right:e.clientX,bottom:e.clientY,width:0,height:0,toJSON:()=>({})}),Gl=e=>({x:e.x,y:e.y,top:e.y,left:e.x,right:e.x,bottom:e.y,width:0,height:0,toJSON:()=>({})}),Wl=({isOpen:e,tooltipAnchor:t,virtualReference:r})=>({open:e,placement:t!==null?t.placement:"right",middleware:t!==null?[(0,K.offset)(u.ANNOTATION_TOOLTIP_MARKER_GAP_PX),(0,K.shift)(Ge),(0,K.flip)(Ge)]:[(0,K.offset)(Ol),(0,K.flip)(Ge),(0,K.shift)(Ge)],elements:{reference:r}}),Vl=({row:e,swatchShape:t,shouldHighlight:r,labelStyle:n,valueStyle:o,paddingInline:s,highlightBackground:i})=>(0,a.jsxs)("div",{className:kl,style:{paddingInline:s,...r?{backgroundColor:i}:{}},"data-testid":"chart-tooltip-row",children:[e.swatchColor===null?(0,a.jsx)("span",{className:Cl,"aria-hidden":!0}):(0,a.jsx)(Oe,{shape:t,color:e.swatchColor,surface:"tooltip",label:e.label,lineType:e.swatchLineType,alpha:e.swatchAlpha,cornerRadius:e.swatchCornerRadius}),(0,a.jsx)("span",{className:Ml,style:n,"data-testid":"chart-tooltip-label",children:e.label}),(0,a.jsx)("span",{className:Bl,style:o,"data-testid":"chart-tooltip-value",children:e.value})]}),Ve={plansByLayerId:null,coordKey:null,introEndsAtMs:0},Ft=(0,h.createContext)(Ve),Ul=({intro:e,children:t})=>{const{layers:r,coordSystem:n,scales:o}=C((0,W.useShallow)(i=>({layers:i.layers,coordSystem:i.coordSystem,scales:i.scales}))),[s]=(0,h.useState)(()=>zl({layers:r,coordSystem:n,scales:o,intro:e}));return(0,a.jsx)(Ft.Provider,{value:s,children:t})},Kl=()=>{const{introEndsAtMs:e}=(0,h.useContext)(Ft),[t]=(0,h.useState)(()=>Ql(e)/1e3);return t},Yl=e=>{const{plansByLayerId:t,coordKey:r}=(0,h.useContext)(Ft),n=C(o=>Gn(o.coordSystem));return t===null||r!==n?null:t.get(e)??null},zl=({layers:e,coordSystem:t,scales:r,intro:n})=>{if(!n.enabled||e.reduce((l,c)=>l+(0,u.countLayerGeoms)(c),0)>n.maxAnimatedGeoms)return Ve;const o={durationScale:n.durationScale,stagger:n.stagger,staggerOrder:n.staggerOrder},s=new Map;for(const l of e){const c=(0,u.buildLayerIntroPlan)({layer:l,coordSystem:t,scales:r,options:o});c!==null&&s.set(l.id,c)}if(s.size===0)return Ve;const i=[...s.values()].reduce((l,c)=>Math.max(l,La(c)),0);return{plansByLayerId:s,coordKey:Gn(t),introEndsAtMs:performance.now()+i*1e3}},Ql=e=>Math.max(0,e-performance.now()),Gn=e=>e.type==="cartesian"?`cartesian-${e.mainAxis}`:e.type,Wn=()=>{const e=M();return(0,h.useMemo)(()=>{const t={};for(const r of u.AXIS_KEYS)t[r]=(0,u.resolveAxisLabelStyle)(e,r);return t},[e])},rt=()=>{const e=M();return(0,h.useMemo)(()=>{const t={};for(const r of u.DATA_LABEL_ROLES){const n={};for(const o of u.RESOLVED_DATA_LABEL_POSITIONS)n[o]=(0,u.resolveDataLabelStyle)(e,r,o);t[r]=n}return t},[e])},Nt=()=>{const e=M();return(0,h.useMemo)(()=>t=>(0,u.resolveDifferenceArrowAnnotationStyle)(e,t),[e])},Vn=()=>{const e=M();return(0,h.useMemo)(()=>(0,u.resolveDirectLabelStyle)(e),[e])},nt=()=>{const e=M();return(0,h.useMemo)(()=>(0,u.resolveLegendItemStyle)(e),[e])},Ht=()=>{const e=M();return(0,h.useMemo)(()=>(t,r)=>(0,u.resolveTickLabelStyle)(e,t,r),[e])},Un=()=>{const e=M();return(0,h.useMemo)(()=>{const t={};for(const r of u.AXIS_KEYS)t[r]=(0,u.resolveTickLineStyle)(e,r);return t},[e])},Xl=({textMeasurer:e,tickLabelStyles:t,tickLineStyles:r,familyDefault:n})=>o=>{const s=o.position==="top"||o.position==="bottom",i=(0,u.getAestheticFromScaleAestheticKey)(o.scaleAestheticKey),{offset:l,...c}=t(i,o.position),d=o.ticksVisible?Math.max(l,r[i].length):l,g=(0,u.toFontSpec)(c,n),v=o.ticks.map(m=>e.measureText(m.formattedLabel,g)),f=o.labelMaxWidthPx??Number.POSITIVE_INFINITY;if(s){if(o.labelRotation!==0){const m=v.map(p=>p.width);return xr(m,f)+2*d}return Math.max(...v.map(m=>m.height))+d}return xr(v.map(m=>m.width),f)+d},xr=(e,t)=>Math.min(Math.max(...e),t),ql=({axisLabelStyles:e})=>t=>(0,u.computeLineBoxHeight)(e[(0,u.getAestheticFromScaleAestheticKey)(t.scaleAestheticKey)]),Kn=({textMeasurer:e,dataLabelStyles:t,familyDefault:r})=>(n,o,s)=>{const i=t[n][o],l=e.measureText(s,(0,u.toFontSpec)(i,r));return{...l,width:l.width+i.paddingInline*2,height:l.height+i.paddingBlock*2}},Jl=({textMeasurer:e,familyDefault:t})=>(r,n)=>e.measureText(r,(0,u.toFontSpec)(n,t)),Zl=({textMeasurer:e,familyDefault:t,headlineRowGap:r,itemGap:n,headlineItemStyles:o})=>(s,i)=>{const l=Yn(s,o[i],e,t,r);return{width:zn(l.map(c=>c.width))+Math.max(0,l.length-1)*n,height:Math.max(0,...l.map(c=>c.height))}},_l=({textMeasurer:e,familyDefault:t,headlineRowGap:r,headlineItemStyles:n})=>(o,s)=>Yn(o,n[s],e,t,r).map(i=>i.width),$l=({textMeasurer:e,familyDefault:t,headlineItemStyles:r})=>(n,o,s=!1)=>{const i=(0,u.resolveHeadlineNumberStyle)(r[o],s);return{width:e.measureText(n,(0,u.toFontSpec)(i,t)).width,height:(0,u.computeLineBoxHeight)(i)}},ec=e=>{const t=Zl(e),r=$l(e);return(n,o,s=!1)=>n.kind==="perGroup"?t(n,o):r(n.value,o,s)},Yn=(e,t,r,n,o)=>{const s=i=>tc(i,t,r,n);return e.items.map(i=>{const l=(0,u.buildHeadlineItemRows)(i,t.swatch.size).map(s),c=Math.max(0,l.length-1)*o;return{width:Math.max(0,...l.map(d=>d.width)),height:zn(l.map(d=>d.height))+c}})},tc=(e,t,r,n)=>{let o=0,s=0;for(const i of e.segments)if(i.kind==="text"){const l=rc(t,i.textRole);o+=r.measureText(i.text,(0,u.toFontSpec)(l,n)).width,s=Math.max(s,nc(l))}else o+=i.size,s=Math.max(s,i.size);return{width:o+Math.max(0,e.segments.length-1)*e.gap,height:s}},rc=(e,t)=>{switch(t){case"value":return e.number;case"caption":return e.caption;case"label":return e.label;case"trendPercentage":case"trendReference":return e.trend;default:return t}},nc=e=>e.fontSize*(e.lineHeight??fs),zn=e=>e.reduce((t,r)=>t+r,0),oc=(e,t)=>e?t:0,qe=(e,t,r)=>{if(r){const n=Number(e.size);return Number.isFinite(n)&&n>0?n:0}return oc(e.color,t)},ac=({textMeasurer:e,familyDefault:t,legendItemStyle:r,directLabelStyle:n,legendSwatchGap:o})=>s=>{const i=s.position==="top"||s.position==="bottom";if(s.display==="direct"){const y=(0,u.computeLineBoxHeight)(n);if(i)return y;const b=(0,u.toFontSpec)(n,t),S=s.items.map(A=>e.measureText(A.formattedLabel,b).width);return Math.max(...S)}const{item:l,swatch:c}=r,d=(0,u.computeLineBoxHeight)(l),g=(0,u.toFontSpec)(l,t),v=2*(l.paddingBlock+l.borderWidth),f=2*(l.paddingInline+l.borderWidth),m=s.aesthetics.includes("size");if(i){const y=m?Math.max(0,...s.items.map(b=>qe(b.visual,c.size,!0))):c.size;return Math.max(d,y)+v}const p=s.items.map(y=>{const b=e.measureText(y.formattedLabel,g).width,S=qe(y.visual,c.size,m);return S+(S>0?o:0)+b});return Math.max(...p)+f},sc=({textMeasurer:e,tickLabelStyles:t,familyDefault:r})=>(n,o)=>e.measureText(n,(0,u.toFontSpec)(t(o),r)),ic=Object.freeze({}),lc=({textMeasurer:e,metrics:t,overrides:r=ic})=>{const n=Wn(),o=rt(),s=Vn(),i=nt(),l=Ht(),c=Un(),d=M(),g=(0,h.useRef)(r);return g.current=r,(0,h.useMemo)(()=>{if(!e)return null;const v=t.fonts.familyDefault,f=d.graph.get("textScale"),m={textMeasurer:e,familyDefault:v,headlineRowGap:t.headlineRowGap,itemGap:(0,u.resolveHeadlineStyle)(d).gap,headlineItemStyles:{small:(0,u.resolveHeadlineItemStyle)(d,"small"),medium:(0,u.resolveHeadlineItemStyle)(d,"medium"),large:(0,u.resolveHeadlineItemStyle)(d,"large")}},p=Xl({textMeasurer:e,tickLabelStyles:l,tickLineStyles:c,familyDefault:v}),y=ql({axisLabelStyles:n}),b=ac({textMeasurer:e,familyDefault:v,legendItemStyle:i,directLabelStyle:s,legendSwatchGap:t.legendSwatchGap}),S=ec(m),A=_l(m),j={measureText:(w,E)=>e.measureText(w,E),textScale:f};return{measureAxis:w=>{if(uc(w))return 0;const E=g.current.measureAxis;return E?E(w,j):p(w)},measureAxisLabel:w=>{const E=g.current.measureAxisLabel;return E?E(w,j):y(w)},measureLegend:w=>{if(dc(w))return 0;const E=g.current.measureLegend;return E?E(w,j):b(w)},measureHeadline:(w,E,P)=>(g.current.measureHeadline??S)(w,E,P),measureHeadlineItemWidths:(w,E)=>(g.current.measureHeadlineItemWidths??A)(w,E),measureTickLabel:sc({textMeasurer:e,tickLabelStyles:l,familyDefault:v}),measureDifferenceArrowLabel:Jl({textMeasurer:e,familyDefault:v}),measureDataLabel:Kn({textMeasurer:e,dataLabelStyles:o,familyDefault:v})}},[e,t,n,o,s,i,l,c,d])},cc=({measurer:e,axes:t,numberFormat:r,parsingLocale:n,formattedLegends:o,containerSize:s,externalMeasurements:i,headline:l,formattingLocale:c,annotations:d,layers:g,coordSystem:v,overflowStrategy:f,panelBorder:m,padding:p,margins:y})=>{const b=Nt();return(0,h.useMemo)(()=>e?new u.LayoutCompiler(e).compile({axes:t,numberFormat:r,parsingLocale:n,formattedLegends:o,containerSize:s,externalMeasurements:i,headline:l,formattingLocale:c,annotations:d,resolveDifferenceArrowStyle:b,layers:g,coordSystem:v,overflowStrategy:f,panelBorder:m,padding:p,margins:y}):null,[t,r,n,o,s,i,f,l,c,d,b,g,v,m,p,y,e])},uc=e=>!e.isVisible||e.ticks.length===0,dc=e=>e.items.length===0,Qn=()=>{const{formattingLocale:e}=N(),t=C(r=>r.config.parsingLocale);return e??t},yr=.5,Xn=(0,h.createContext)(new Map),qn=(0,h.createContext)(()=>{}),Jn=(0,h.createContext)(new Set),hc=({children:e})=>{const[t,r]=(0,h.useState)(()=>new Map),[n]=(0,h.useState)(()=>new Set),o=(0,h.useRef)(new Map),s=(0,h.useCallback)((i,l,c)=>{const d=o.current.get(i)??new Set;if(c!==null){d.add(l),o.current.set(i,d),r(g=>fc(g,i,c));return}d.delete(l),!(d.size>0)&&(o.current.delete(i),r(g=>mc(g,i)))},[]);return(0,a.jsx)(qn.Provider,{value:s,children:(0,a.jsx)(Jn.Provider,{value:n,children:(0,a.jsx)(Xn.Provider,{value:t,children:e})})})},Zn=()=>(0,h.useContext)(Xn),gc=()=>(0,h.useContext)(qn),_n=e=>{const t=gc(),r=(0,h.useId)(),n=(0,h.useRef)(null);return(0,h.useEffect)(()=>{if(typeof ResizeObserver>"u")return;const o=n.current;if(o===null)return;const s=()=>t(e,r,{width:o.offsetWidth,height:o.offsetHeight});s();const i=new ResizeObserver(s);return i.observe(o),()=>{i.disconnect(),t(e,r,null)}},[e,r,t]),n},vc=()=>(0,h.useContext)(Jn),fc=(e,t,r)=>{const n=e.get(t);if(n!==void 0&&Math.abs(n.width-r.width)<yr&&Math.abs(n.height-r.height)<yr)return e;const o=new Map(e);return o.set(t,r),o},mc=(e,t)=>{if(!e.has(t))return e;const r=new Map(e);return r.delete(t),r},pc=(e,t)=>e!==null&&e.annotationId===t?e:null,xc=(e,t)=>e.annotationId===t.annotationId&&e.translation.x===t.translation.x&&e.translation.y===t.translation.y,yc=(e,t,r)=>e!==null&&e.annotationId===t&&e.endpoint===r?e:null,bc=(e,t)=>e.annotationId===t.annotationId&&e.endpoint===t.endpoint&&e.anchor.x===t.anchor.x&&e.anchor.y===t.anchor.y,Ac=(e,t,r)=>e!==null&&e.annotationId===t&&e.endpoint===r?e:null,Sc=(e,t)=>e.annotationId===t.annotationId&&e.endpoint===t.endpoint&&(0,u.areAnchorsEqual)(e.point.anchor,t.point.anchor),jc=(e,t)=>e!==null&&e.annotationId===t?e:null,wc=(e,t)=>e.annotationId===t.annotationId&&e.region.x===t.region.x&&e.region.y===t.region.y&&e.region.width===t.region.width&&e.region.height===t.region.height,Rc=(e,t)=>e!==null&&e.annotationId===t?e:null,Pc=(e,t)=>e.annotationId===t.annotationId&&e.at.x===t.at.x&&e.width===t.width&&e.shift===t.shift,pe=({standingInteraction:e},t)=>e!==null&&le(e,t)?e:null,Ec=(e,t)=>{if(e===null)return!1;switch(t.kind){case"difference-arrow-endpoint-drag":return le(e,t.kind)&&Sc(e,t);case"arrow-endpoint-drag":return le(e,t.kind)&&bc(e,t);case"move-drag":return le(e,t.kind)&&xc(e,t);case"shape-resize-drag":return le(e,t.kind)&&wc(e,t);case"text-resize-drag":return le(e,t.kind)&&Pc(e,t);case"chrome-popup":return le(e,t.kind);case"menu":return!1}},le=(e,t)=>e.kind===t,kc=({isMenuTrigger:e,stamped:t,observations:r})=>e?{kind:"menu-trigger"}:t!==null&&t.kind!=="grid"?t:r!==null?{kind:"observations",observations:r}:t,Cc=(e,t)=>{if(e===t)return!0;if(e===null||t===null)return!1;if(e.kind==="annotation"&&t.kind==="annotation")return(0,u.areEditTargetsEqual)(e.target,t.target);if(e.kind==="legend"&&t.kind==="legend")return e.part.legendIndex===t.part.legendIndex&&e.part.itemIndex===t.part.itemIndex;if(e.kind==="axis"&&t.kind==="axis")return(0,u.areEditTargetsEqual)(e.target,t.target)&&e.part?.tickIndex===t.part?.tickIndex;if(e.kind==="grid"&&t.kind==="grid")return(0,u.areEditTargetsEqual)(e.target,t.target);if(e.kind==="observations"&&t.kind==="observations"){const r=e.observations,n=t.observations;return r.layerId===n.layerId&&r.observationIndex===n.observationIndex&&r.target.scope===n.target.scope&&r.isOnObservation===n.isOnObservation}return e.kind==="menu-trigger"&&t.kind==="menu-trigger"},Dt=e=>{const t=e.editTargetUnderPointer;return t?.kind==="annotation"?t.target.id:null},Mc=e=>{const t=e.editTargetUnderPointer;return t!==null&&t.kind!=="menu-trigger"},$n=()=>(0,Tr.createStore)(e=>({menuTrigger:null,editTargetUnderPointer:null,standingInteraction:null,pressContext:null,caret:null,setMenuTrigger:t=>e(r=>(0,u.areEditMenuTriggersEqual)(r.menuTrigger,t)?r:{menuTrigger:t}),setEditTargetUnderPointer:t=>e(r=>Cc(r.editTargetUnderPointer,t)?r:{editTargetUnderPointer:t}),claimInteraction:t=>e(r=>Ec(r.standingInteraction,t)?r:{standingInteraction:t}),releaseInteraction:t=>e(r=>r.standingInteraction?.kind===t?{standingInteraction:null}:r),setPressContext:t=>e(r=>r.pressContext===t?r:{pressContext:t}),setCaret:t=>e(r=>(r.caret?.annotationId??null)===t?r:{caret:t===null?null:{annotationId:t,editor:null}}),setCaretEditor:t=>e(r=>r.caret===null?r:{caret:{...r.caret,editor:t}})})),Gt=(0,h.createContext)(null),Bc=$n(),Ic=({children:e})=>{const[t]=(0,h.useState)(()=>$n());return(0,a.jsx)(Gt.Provider,{value:t,children:e})},Tc=()=>{const e=(0,h.useContext)(Gt);if(e===null)throw new Error("useEditorStore must be used inside an <EditorProvider>.");return e};function re(e){return(0,ye.useStore)((0,h.useContext)(Gt)??Bc,e)}var eo=(0,h.createContext)(null),Oc=({panelRect:e,children:t})=>{const r=Lc(e);return(0,a.jsx)(eo.Provider,{value:r,children:t})},to=()=>{const e=(0,h.useContext)(eo);if(e===null)throw new Error("Difference arrows read outside a <DifferenceArrowsProvider>.");return e},br=(e,t,r)=>t.isColorAuthored?t.color:(0,u.resolveArrowColor)(e.start,e.end,{start:r(e.start),end:r(e.end)})??t.color,Lc=e=>{const{formattingLocale:t}=N(),r=oe(),{fonts:n}=ce(),o=re(b=>pe(b,"difference-arrow-endpoint-drag")),s=Ra(),i=Nt(),{differenceArrows:l,mainAxis:c,parsingLocale:d}=C((0,W.useShallow)(b=>({differenceArrows:b.annotations.differenceArrows,mainAxis:b.coordSystem.type==="cartesian"?b.coordSystem.mainAxis:"x",parsingLocale:b.config.parsingLocale}))),g=t??d,{width:v,height:f}=e,m=(0,h.useMemo)(()=>({mainAxis:c,panelWidth:v,panelHeight:f,locale:g}),[c,v,f,g]),p=(0,h.useMemo)(()=>Fc(r,n.familyDefault),[r,n.familyDefault]),y=(0,h.useMemo)(()=>l.map(b=>{const S=i(b.id),A=Ar(b,S,m,p);return{...A,arrow:b,style:S,color:br(b,S,s),committedArrow:b,committedLabelBox:A.labelBox,committedLabelText:A.labelText,isDragged:!1,hasComparableEndpoints:(0,u.areEndpointsComparable)(b.start,b.end)}}),[l,m,p,s,i]);return(0,h.useMemo)(()=>o===null?y:y.map(b=>{if(b.id!==o.annotationId)return b;const S=Nc(b.committedArrow,o);return{...Ar(S,b.style,m,p),style:b.style,color:br(S,b.style,s),arrow:S,committedArrow:b.committedArrow,committedLabelBox:b.committedLabelBox,committedLabelText:b.committedLabelText,isDragged:!0,hasComparableEndpoints:(0,u.areEndpointsComparable)(S.start,S.end)}}),[y,o,m,p,s])},Ar=(e,t,r,n)=>{const o=(0,u.computeDifferenceArrow)({arrow:e,style:t,...r});return{...o,labelBox:(0,u.getDifferenceArrowLabelBox)({labelPosition:o.labelPosition,measuredTextWidth:n(o.labelText,t.label),label:t.label})}},Fc=(e,t)=>{const r=new Map;return(n,o)=>{const s=(0,u.toFontSpec)(o,t),i=`${s.family}|${s.size}|${s.weight}|${n}`,l=r.get(i);if(l!==void 0)return l;const{width:c}=e.measureText(n,s);return r.set(i,c),c}},Nc=(e,t)=>({...e,start:t.endpoint==="start"?t.point:e.start,end:t.endpoint==="end"?t.point:e.end}),Hc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEoAAABgCAYAAAC65+QhA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BdpNhpRYq2OkOOw8RdtCE7y+3psNSVwUp9ih+2gduU1L2Fmfh/t2jIUUNrJJkbBhxQIU5+Dy3SdSVEpx949JcNpV1NraW7wKxxhWj2ezIi+7VxJrq1o2DivhNr0OS9qUBFCkvN4XgDO6lazdphrvVJUFD5j1jmV5+QdMOFExzD3jGdKOGLcud1Gv0P/rGVyH29B6MiWcmBbARiVAHBNg9srvsqQdV3cDIXuz9ut88Tpp4cSi5I77RSWLGdKOGxUoBXq0Z8cW2C7D8X+n0XFXUtz9nJRhz1lt3xJkFxdvUMV7b7/K5tuAdEStpWgr8MpeVbNGVoHPwG20n6lBs21DhiGVLK9agOrZrwtxq7ePGm48X5PfgeuJWdvN381CG7+pIlBbfryEXCJpxlqRtBG10oHa6NXVx/8Ba+cluUx5B18AAAAASUVORK5CYII=",Dc=({className:e})=>(0,a.jsx)("img",{src:Hc,alt:"","aria-hidden":"true",className:e,draggable:!1}),Gc="https://graphy.app/?utm_source=chart-mark&utm_medium=embed",Wc="Made with Graphy — open graphy.app";var Vc="vultop0";var Uc="vultop2",Kc="vultop3",Yc="vultop4",zc="vultop5",Qc="vultop6",Xc="vultop7",qc=e=>{const t=Jc(e.trim());if(t===null)return"light";const r=Zc(t);return r<=.22?"dark":r<=.65?"mid":"light"},Jc=e=>{if(!e.startsWith("#"))return null;const t=e.slice(1);if(t.length===3){const r=t[0],n=t[1],o=t[2];return r===void 0||n===void 0||o===void 0?null:{red:Number.parseInt(r+r,16),green:Number.parseInt(n+n,16),blue:Number.parseInt(o+o,16)}}return t.length===6||t.length===8?{red:Number.parseInt(t.slice(0,2),16),green:Number.parseInt(t.slice(2,4),16),blue:Number.parseInt(t.slice(4,6),16)}:null},Zc=({red:e,green:t,blue:r})=>{const n=o=>{const s=o/255;return s<=.03928?s/12.92:((s+.055)/1.055)**2.4};return .2126*n(e)+.7152*n(t)+.0722*n(r)},ro=(e,t,r="full")=>!e||t.width<120||t.height<80?"hidden":t.width<200||r==="mini"?"mini":"full",Wt=({visual:e,placement:t})=>{const{background:r}=(0,u.resolveGraphFrameStyle)(M()),n=qc(r);return(0,a.jsxs)("a",{className:(0,G.default)(Vc,e==="mini"&&"vultop1",t==="footer"?Qc:Xc),href:Gc,target:"_blank",rel:"noopener noreferrer","aria-label":Wc,"data-visual":e,"data-zone":n,children:[(0,a.jsx)("span",{className:Uc,children:(0,a.jsx)(Dc,{className:Kc})}),(0,a.jsxs)("span",{className:Yc,children:[(0,a.jsx)("span",{children:"Made with"}),(0,a.jsx)("span",{className:zc,children:"Graphy"})]})]})},no=(0,h.createContext)({Title:null,Caption:null,TextAnnotation:null}),_c=({editors:e,children:t})=>(0,a.jsx)(no.Provider,{value:e,children:t}),Vt=()=>(0,h.useContext)(no),Sr="_4dlrid0",$c="xfz7dq0";var eu="xfz7dq2",tu="xfz7dq3",ru="xfz7dq4",nu="xfz7dq5",oo=({ref:e,footerRect:t,mode:r=Z.readonly,caption:n,isCaptionVisible:o,source:s,isSourceVisible:i,captionStyle:l,sourceStyle:c,brandMark:d})=>{const{Caption:g}=Vt(),v=je[Bt(r)].inlineTextEditing?g:null,f=o&&(v!==null||n!==null),m=i&&s!==null&&iu(s),p=d!=="hidden";return!f&&!m&&!p?null:(0,a.jsxs)("div",{ref:e,className:$c,style:{left:t.x,top:t.y,width:t.width},children:[f?v?(0,a.jsx)(v,{caption:n,captionStyle:l}):(0,a.jsx)(ou,{caption:n,captionStyle:l}):null,(m||p)&&(0,a.jsxs)("div",{className:"xfz7dq1",children:[m&&(0,a.jsx)(au,{source:s,sourceStyle:c}),d!=="hidden"?(0,a.jsx)(Wt,{visual:d,placement:"footer"}):null]})]})},ou=({caption:e,captionStyle:t})=>e===null?null:typeof e=="string"?(0,a.jsx)("p",{className:Sr,style:te(t),children:e}):(0,a.jsx)("div",{className:Sr,style:te(t),children:(0,a.jsx)(xe,{content:e})}),au=({source:e,sourceStyle:t})=>{const r=(0,u.isSafeUrl)(e.url)?e.url:void 0,n=e.label??(r!==void 0?su(r):"");return n===""&&r===void 0?null:(0,a.jsxs)("span",{className:eu,style:te(t.label),children:[(0,a.jsx)("span",{className:ru,children:"Source:"}),r!==void 0?(0,a.jsx)("a",{className:tu,href:r,target:"_blank",rel:"noopener noreferrer",style:te(t.link),children:n}):(0,a.jsx)("span",{className:nu,children:n})]})},su=e=>{try{return new URL(e).hostname}catch{return e}},iu=e=>e.label!==void 0&&e.label!==""||e.url!==void 0&&e.url!==""&&(0,u.isSafeUrl)(e.url),lu="_1k4qtbg0";var cu=22,ao=({ref:e,headerRect:t,mode:r=Z.readonly,title:n,isTitleVisible:o,subtitle:s,isSubtitleVisible:i,headingStyle:l,subtitleStyle:c,brandMark:d})=>{const{Title:g}=Vt(),v=je[Bt(r)].inlineTextEditing?g:null,f=v!==null,m=o&&(f||n!==null),p=i&&(f||s!==null),y=d!=="hidden";return!m&&!p&&!y?null:(0,a.jsxs)("div",{ref:e,className:(0,G.default)(lu,y&&"_1k4qtbg1"),style:{left:t.x,top:t.y,width:t.width,...y&&!m&&!p?{minHeight:cu}:{}},children:[v?(0,a.jsx)(v,{title:n,isTitleVisible:o,isSubtitleVisible:i,subtitle:s,headingStyle:l,subtitleStyle:c},[o?"title":"",i?"subtitle":""].join("-")):(0,a.jsx)(uu,{title:n,isTitleVisible:o,isSubtitleVisible:i,subtitle:s,headingStyle:l,subtitleStyle:c}),d!=="hidden"?(0,a.jsx)(Wt,{visual:d,placement:"header"}):null]})},uu=({title:e,isTitleVisible:t,isSubtitleVisible:r,subtitle:n,headingStyle:o,subtitleStyle:s})=>{const i=t&&e!==null,l=r&&n!==null;return(0,a.jsxs)(a.Fragment,{children:[i&&(typeof e=="string"?(0,a.jsx)("h1",{className:"_4dlrid0",style:te(o),children:e}):(0,a.jsx)("div",{className:"_4dlrid0",style:te(o),children:(0,a.jsx)(xe,{content:e})})),l&&(typeof n=="string"?(0,a.jsx)("p",{className:"_4dlrid0",style:te(s),children:n}):(0,a.jsx)("div",{className:"_4dlrid0",style:te(s),children:(0,a.jsx)(xe,{content:n})}))]})},du=e=>{const t=M();return(0,h.useMemo)(()=>(0,u.resolveHeadlineItemStyle)(t,e),[t,e])},so=()=>{const e=M();return(0,h.useMemo)(()=>(0,u.resolveHeadlineStyle)(e),[e])},hu="_1u9qprb0",gu="_1u9qprb1",vu=ya({group:()=>pu,item:()=>io,trend:()=>mu,value:()=>fu}),fu="_9aen060",mu="_9aen061",pu="_9aen062",io="_9aen063",xu={xxs:8,xs:12,sm:16,md:20,lg:24,xl:36},yu={primary:"asohov1 asohov0",secondary:"asohov2 asohov0"},Ut=({children:e,title:t,variant:r="primary",size:n="sm",...o})=>{const s=(0,h.useId)(),i=xu[n];return(0,a.jsxs)("svg",{className:yu[r],"aria-labelledby":t?s:void 0,height:i,width:i,fill:"none",viewBox:"0 0 24 24",role:"img",...o,children:[t&&(0,a.jsx)("title",{id:s,children:t}),e]})},bu=e=>(0,a.jsx)(Ut,{...e,children:(0,a.jsxs)("g",{stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{d:"m5 12 7-7 7 7"}),(0,a.jsx)("path",{d:"M12 19V5"})]})}),lo=e=>(0,a.jsx)(Ut,{...e,children:(0,a.jsx)("g",{stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:(0,a.jsx)("path",{d:"M5 12h14"})})}),Au="n7clvo0",Su="n7clvo1",ju="n7clvo2",wu="n7clvo3";var Ru=({segment:e,itemStyle:t})=>{if(e.kind==="swatch")return(0,a.jsx)(Pu,{swatch:e.swatch,size:e.size});if(e.kind==="trendArrow"){const o=co(t,e.direction);return(0,a.jsx)("div",{className:(0,G.clsx)(wu,e.direction==="down"&&"n7clvo4"),style:{color:o,backgroundColor:e.direction==="flat"?D(x.vars.textPrimary,.1):D(o,.2)},children:e.direction==="flat"?(0,a.jsx)(lo,{size:"xs",title:""}):(0,a.jsx)(bu,{size:"xs",title:""})})}const{className:r,style:n}=Eu(e,t);return(0,a.jsx)("span",{className:r,style:n,children:e.text})},Pu=({swatch:e,size:t})=>{const r=ae(),n=_e(e.layerId,e.value,t);return(0,a.jsx)(Oe,{shape:r(e.geom,"cartesian")?.swatchShape??"square",color:e.color,surface:"headline",width:t,height:t,alpha:n.alpha,cornerRadius:n.cornerRadius})},Eu=(e,t)=>{switch(e.textRole){case"value":return{style:ge(t.number)};case"caption":return{className:Au,style:ge(t.caption)};case"label":return{className:ju,style:ge(t.label)};case"trendPercentage":return{style:ge({...t.trend,textColor:co(t,e.trendDirection??"up")})};case"trendReference":return{className:Su,style:ge({...t.trend,textColor:void 0})};default:return e.textRole}},co=(e,t)=>{switch(t){case"up":return e.trendUp.textColor;case"down":return e.trendDown.textColor;case"flat":return e.trendFlat.textColor;default:return t}},ku=({item:e,itemStyle:t})=>(0,a.jsx)("div",{className:io,children:(0,u.buildHeadlineItemRows)(e,t.swatch.size).map(r=>(0,a.jsx)(Cu,{row:r,itemStyle:t},r.role))}),Cu=({row:e,itemStyle:t})=>{const r=e.role==="trend";return(0,a.jsx)("div",{className:vu[e.role],"data-testid":r?"headline-trend":void 0,"data-direction":r?Mu(e):void 0,role:r?"img":void 0,"aria-label":r?e.ariaLabel:void 0,children:e.segments.map((n,o)=>(0,a.jsx)(Ru,{segment:n,itemStyle:t},o))})},Mu=e=>{const t=e.segments.find(r=>r.kind==="trendArrow");return t?.kind==="trendArrow"?t.direction:void 0},Bu=({headline:e,rect:t,resolvedSize:r,visibleItemCount:n,isInDonutHole:o=!1})=>{const s=so(),i=du(r),l={left:t.x,top:t.y,width:t.width,height:t.height};if(e.kind==="grandTotal"){const c=(0,u.resolveHeadlineNumberStyle)(i,o);return(0,a.jsx)("div",{className:gu,style:l,children:(0,a.jsx)("span",{style:ge(c),children:e.value})})}return(0,a.jsx)("div",{className:hu,style:{...l,gap:s.gap},children:e.items.slice(0,n).map((c,d)=>(0,a.jsx)(ku,{item:c,itemStyle:i},`${c.label}-${d}`))})},Iu=(e,t)=>e.isTextColorAuthored?e.textColor:t??e.textColor,Tu="_1oj6yix0";var Ou="_1oj6yix2",Lu=8,Fu=16,Nu=2,Hu=({legends:e,containerRect:t})=>{const r=Vn(),n=(0,u.computeLineBoxHeight)(r),{placements:o,hasOverlap:s}=Du(e,t,n),i=Wu(r);if(o.length===0)return null;const l=s?Fu:Lu,c=l-Nu,d=(0,u.getChromeDashArray)(r.lineType);return(0,a.jsxs)("div",{className:Tu,children:[s&&(0,a.jsx)("svg",{className:"_1oj6yix1",width:t.width,height:t.height,children:o.map(g=>(0,a.jsx)(Gu,{anchorY:g.anchorY,labelY:g.y,endX:c,color:g.payload.color,strokeWidth:r.strokeWidth,dashArray:d},g.payload.key))}),o.map(g=>(0,a.jsx)("span",{className:Ou,style:{...i,left:l,top:g.y,color:Iu(r,g.payload.color)},children:g.payload.label},g.payload.key))]})},Du=(e,t,r)=>(0,h.useMemo)(()=>{const n=[];for(const o of e)for(const s of o.items){if(s.normalizedY===null)continue;const i=typeof s.visual.color=="string"?s.visual.color:void 0;n.push({normalizedY:s.normalizedY,payload:{key:String(n.length),label:s.formattedLabel,color:i}})}return n.length===0||t.height<=0?{placements:[],hasOverlap:!1}:(0,u.computeDirectLabelsLayout)({items:n,containerHeight:t.height,labelHeight:r})},[e,t.height,r]),Gu=({anchorY:e,labelY:t,endX:r,color:n,strokeWidth:o,dashArray:s})=>{const i=r/2;return(0,a.jsx)("path",{d:`M0,${e} C${i},${e} ${i},${t} ${r},${t}`,fill:"none",stroke:n??"currentColor",strokeWidth:o,strokeDasharray:s})},Wu=e=>({...ne(e),lineHeight:e.lineHeight}),Vu="_6a636s0",Kt="data-legend-index",Yt="data-legend-item-index",Dg=`[${Kt}][${Yt}]`,Uu=({legendIndex:e,itemIndex:t})=>({[Kt]:String(e),[Yt]:String(t)}),Ku=e=>{const t=bt(e,Kt),r=bt(e,Yt);return t===null||r===null?null:{legendIndex:t,itemIndex:r}},bt=(e,t)=>{const r=e.getAttribute(t);if(r===null||!/^(0|[1-9]\d*)$/.test(r))return null;const n=Number(r);return Number.isSafeInteger(n)?n:null},ue="data-edit-kind",uo="data-edit-id",Je="data-edit-axis",ho="data-edit-tick-index",go="data-legend-overflow-control",Yu=`[${go}]`,zu="observations",Qu=`[${ue}]`,Le=e=>({[ue]:e.kind,[uo]:e.id}),zt=(e,t)=>({[ue]:"axis",[Je]:e,...t===void 0?{}:{[ho]:String(t)}}),Qt=e=>({[ue]:"legend",...Uu(e)}),vo=e=>({[ue]:"grid",[Je]:e}),Xu=(e,t)=>{for(const r of e){const n=r.closest(Qu);if(n===null||!t.contains(n))continue;const o=Ju(n);if(o!==null)return o;if(n!==r)return null}return null},qu=()=>({[ue]:zu}),Ju=e=>{const t=e.getAttribute(ue);switch(t){case"annotation":{const r=e.getAttribute(uo);return r===null||r===""?null:{kind:t,target:{kind:t,id:r}}}case"axis":{const r=e.getAttribute(Je);if(!(0,u.isPositionScale)(r))return null;if(!e.hasAttribute("data-edit-tick-index"))return{kind:t,target:{kind:t,axis:r},part:null};const n=bt(e,ho);return n===null?null:{kind:t,target:{kind:t,axis:r},part:{tickIndex:n}}}case"legend":{const r=Ku(e);return r===null?null:{kind:t,target:{kind:t},part:r}}case"grid":{const r=e.getAttribute(Je);return(0,u.isPositionScale)(r)?{kind:t,target:{kind:t,axis:(0,u.getAestheticFromScaleAestheticKey)(r)}}:null}default:return null}},fo=(0,h.createContext)(Z.readonly);function Xt(){return(0,h.useContext)(fo)}var we=()=>je[Xt()].guidePress,mo=()=>{const e=M();return(0,h.useMemo)(()=>(0,u.resolveLegendStyle)(e),[e])},po=e=>({background:e.background,borderRadius:e.borderRadius,...Ao(e.borderWidth,e.borderColor)}),xo=e=>({...bo(e),...po(e),paddingInline:e.paddingInline,paddingBlock:e.paddingBlock}),yo=e=>e.background!==void 0||e.borderWidth>0,Zu=(e,t)=>({background:e.background,borderRadius:e.borderRadius,paddingInline:e.paddingInline,paddingBlock:e.paddingBlock,boxShadow:Tt(e.shadow),...Ao(e.borderWidth,e.borderColor),...bo(t)}),bo=e=>({...ne(e),color:e.textColor,lineHeight:e.lineHeight}),Ao=(e,t)=>e>0&&t!==void 0?{border:`${e}px solid ${t}`}:{},_u="_1kjk02r0",$u={1:"_1kjk02r1",2:"_1kjk02r2"},ed={1:"_1kjk02r3",2:"_1kjk02r4"};var td={1:"_1kjk02r6",2:"_1kjk02r7"},rd={1:"_1kjk02r8",2:"_1kjk02r9"},nd="_1kjk02ra",od="_1kjk02rb";var ad="_1dw9dgx0",ht="\0",sd=(e,t)=>{const r=[];for(const{legend:n,legendIndex:o}of e){const s=n.aesthetics.includes("size");n.items.forEach((i,l)=>{if(s){const v=Number(i.visual.size);if(!Number.isFinite(v)||v<=0)return}const c=i.visual.color??"",d=s?`${ht}${Number(i.visual.size)}`:"",g=i.visual.lineType;r.push({key:`${o}${ht}${String(i.value)}${ht}${c}${d}`,address:{legendIndex:o,itemIndex:l},formattedLabel:i.formattedLabel,visual:i.visual,swatchShape:t(i.geom),isBubble:s,primaryLineType:g,layerId:i.layerId,groupValue:i.value})})}return r},So=({pill:e})=>e.isBubble?(0,a.jsx)(cd,{pill:e}):(0,a.jsx)(ld,{pill:e}),id=({color:e,lineType:t,shape:r,label:n,layerId:o,groupValue:s})=>{const{swatch:i}=nt(),l=_e(o,s,i.size);return e?(0,a.jsx)(Oe,{shape:r,color:e,surface:"legend",label:n,lineType:t,width:i.size,height:i.size,strokeWidth:i.strokeWidth,alpha:l.alpha,cornerRadius:l.cornerRadius}):null},ld=({pill:e})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(id,{color:e.visual.color,lineType:e.primaryLineType,shape:e.swatchShape,label:e.formattedLabel,layerId:e.layerId,groupValue:e.groupValue}),(0,a.jsx)("span",{children:e.formattedLabel})]}),cd=({pill:e})=>{const t=Number(e.visual.size),r=_e(e.layerId,e.groupValue,t);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:ad,style:{width:t,height:t,backgroundColor:e.visual.color,opacity:r.alpha}}),(0,a.jsx)("span",{children:e.formattedLabel})]})},jr={[go]:""},ud=({hiddenPills:e,placement:t})=>{const r=It(),[n,o]=(0,h.useState)(!1),s=nt(),i=mo(),l=we(),c=xo(s.item),d=dd(e.length,s.item),g=d===null?void 0:po(s.item),{refs:v,floatingStyles:f}=(0,K.useFloating)({open:n,placement:t,middleware:[(0,K.offset)(4),(0,K.flip)(),(0,K.shift)({padding:8})]});(0,h.useEffect)(()=>{if(!n)return;const y=S=>{const A=S.target;if(!A)return;const j=v.reference.current,w=v.floating.current;j instanceof Element&&j.contains(A)||w instanceof Element&&w.contains(A)||o(!1)},b=S=>{S.key==="Escape"&&o(!1)};return document.addEventListener("pointerdown",y),document.addEventListener("keydown",b),()=>{document.removeEventListener("pointerdown",y),document.removeEventListener("keydown",b)}},[n,v.floating,v.reference]);const m=t==="left"||t==="right",p=d===null?[]:Array.from({length:d},(y,b)=>d-b);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{ref:v.setReference,className:(0,G.clsx)(_u,d!==null&&m&&ed[d],d!==null&&!m&&$u[d]),...jr,children:[d!==null&&p.map(y=>(0,a.jsx)("span",{className:(0,G.clsx)("_1kjk02r5",m?rd[d]:td[d]),style:{...g,...hd(y,m)},"aria-hidden":!0},y)),(0,a.jsx)("button",{type:"button",className:nd,style:c,onClick:()=>o(y=>!y),"aria-haspopup":"dialog","aria-expanded":n,"aria-label":`Show ${e.length} hidden legend ${e.length===1?"item":"items"}`,children:(0,a.jsxs)("span",{className:od,children:["+",e.length]})})]}),n&&(0,a.jsx)("div",{ref:v.setFloating,role:"dialog","aria-label":r("graph.legend.hiddenItems"),className:"_1kjk02rc",style:{...f,...Zu(i.popover,s.item)},...jr,children:(0,a.jsx)("ul",{className:"_1kjk02rd",children:e.map(y=>(0,a.jsx)("li",{className:(0,G.clsx)("_1kjk02re",l&&"_1kjk02rf"),...l?Qt(y.address):void 0,children:(0,a.jsx)(So,{pill:y})},y.key))})})]})},dd=(e,t)=>{if(!yo(t))return null;const r=Math.min(e-1,2);return r===1?1:r===2?2:null},hd=(e,t)=>{const r=-e*4;return{transform:t?`translateY(${r}px)`:`translateX(${r}px)`}},gd="_1cecisi0",vd="_1cecisi1",fd="_1cecisi2",md={start:"_1cecisi3",center:"_1cecisi4",end:"_1cecisi5"},pd={right:"_1cecisi6",left:"_1cecisi7"},xd="_1cecisi8";var yd=({edge:e,indexedLegends:t,containerWidth:r,containerHeight:n})=>{const o=oe(),s=ce(),i=mo(),l=nt(),c=ae(),d=C(w=>w.coordSystem.type),g=we(),v=(0,h.useMemo)(()=>sd(t,w=>c(w,d)?.swatchShape??"square"),[t,c,d]),f=e==="left"||e==="right",m=f?n:r,p=t[0]?.legend.align??"start",y=(0,h.useMemo)(()=>{if(v.length===0)return{visibleCount:0,hasOverflow:!1};if(m<=0)return{visibleCount:v.length,hasOverflow:!1};const w=(0,u.toFontSpec)(l.item,s.fonts.familyDefault),E=(0,u.computeLineBoxHeight)(l.item),P=2*(l.item.paddingInline+l.item.borderWidth),I=2*(l.item.paddingBlock+l.item.borderWidth),T=H=>f?bd(H,E,l.swatch.size,I):wr({label:H.formattedLabel,swatchInlineSize:Ad(H,l.swatch.size),textMeasurer:o,font:w,swatchGap:s.legendSwatchGap,horizontalChrome:P}),L=v.map(T),F=(f?E+I:wr({label:`+${v.length}`,swatchInlineSize:0,textMeasurer:o,font:w,swatchGap:s.legendSwatchGap,horizontalChrome:P}))+(yo(l.item)?8:0);return jd({pillSizes:L,overflowPillSize:F,containerSize:m,gap:i.gap})},[v,m,f,o,s,i,l]);if(v.length===0)return null;const b=v.slice(0,y.visibleCount),S=v.slice(y.visibleCount),A=y.hasOverflow&&S.length>0,j=xo(l.item);return(0,a.jsxs)("div",{className:(0,G.clsx)(md[p],gd,{[fd]:f,[vd]:!f,[pd[e==="left"?"left":"right"]]:f}),style:{gap:i.gap},children:[b.map(w=>(0,a.jsx)("div",{className:(0,G.clsx)(xd,g&&"_1cecisi9"),style:j,...g?Qt(w.address):void 0,children:(0,a.jsx)(So,{pill:w})},w.key)),A&&(0,a.jsx)(ud,{hiddenPills:S,placement:wd(e)})]})},wr=({label:e,swatchInlineSize:t,textMeasurer:r,font:n,swatchGap:o,horizontalChrome:s})=>{const i=r.measureText(e,n).width;return t+(t>0?o:0)+i+s},bd=(e,t,r,n)=>{const o=Sd(e,r);return Math.max(t,o)+n},Ad=(e,t)=>qe(e.visual,t,e.isBubble),Sd=(e,t)=>e.isBubble?qe(e.visual,t,!0):t,jd=({pillSizes:e,overflowPillSize:t,containerSize:r,gap:n})=>{if(e.length===0)return{visibleCount:0,hasOverflow:!1};let o=0;for(let l=0;l<e.length;l+=1)l>0&&(o+=n),o+=e[l]??0;if(o<=r)return{visibleCount:e.length,hasOverflow:!1};let s=0,i=0;for(const l of e){const c=s+(i>0?n:0)+l;if(c+n+t>r)break;s=c,i+=1}return{visibleCount:i,hasOverflow:!0}},wd=e=>{switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}},Rd=(0,h.memo)(function({formattedLegends:t,rects:r}){const n=(0,h.useMemo)(()=>{const o=new Map;return t.forEach((s,i)=>{let l=o.get(s.position);l||(l={pill:[],direct:[]},o.set(s.position,l)),s.display==="pill"?l.pill.push({legend:s,legendIndex:i}):l.direct.push(s)}),o},[t]);return(0,a.jsx)(a.Fragment,{children:Array.from(n,([o,s])=>{const i=r[o];return i===void 0?null:(0,a.jsxs)("div",{className:Vu,style:{left:i.x,top:i.y,width:i.width,height:i.height},children:[(0,a.jsx)(yd,{edge:o,indexedLegends:s.pill,containerWidth:i.width,containerHeight:i.height}),(0,a.jsx)(Hu,{legends:s.direct,containerRect:i})]},o)})})}),Pd=({layers:e,primaryLayerId:t,coordSystem:r,resolveRenderer:n})=>{const o=e.find(i=>i.id===t);if(!o)return null;const s=n(o.geom,r.type);return s?s.guideMode??null:null},jo=1,wo="4 3",Ed=({panelRect:e})=>{const{coordSystem:t,layers:r,scales:n}=C((0,W.useShallow)(c=>({coordSystem:c.coordSystem,layers:c.layers,scales:c.scales}))),o=me(c=>c.hover.primary),s=ae(),i=(0,u.resolveHoverGuideStyle)(M());if(r.length===0||o===null||!o.anchored)return null;const l=Pd({layers:r,primaryLayerId:o.layerId,coordSystem:t,resolveRenderer:s});return l===null?null:t.type==="polar"?l==="band"?(0,a.jsx)(Bd,{coordSystem:t,primary:o,panelRect:e,guide:i}):(0,a.jsx)(Md,{coordSystem:t,primary:o,panelRect:e,guide:i}):l==="band"?(0,a.jsx)(Cd,{coordSystem:t,scales:n,primary:o,panelRect:e,guide:i}):(0,a.jsx)(kd,{coordSystem:t,primary:o,panelRect:e,guide:i})},kd=({coordSystem:e,primary:t,panelRect:r,guide:n})=>{const o=(0,u.getHoverGuideLineProps)(e,t);return(0,a.jsx)(ot,{panelRect:r,children:(0,a.jsx)("line",{...o,stroke:n.color,strokeWidth:jo,strokeDasharray:wo,strokeLinecap:"round","data-testid":"hover-guide-line"})})},Cd=({coordSystem:e,scales:t,primary:r,panelRect:n,guide:o})=>{const s=(0,u.getHoverGuideRectProps)(e,t,r);return s===null?null:(0,a.jsx)(ot,{panelRect:n,children:(0,a.jsx)("rect",{...s,fill:o.background,"data-testid":"hover-guide-rect"})})},Md=({coordSystem:e,primary:t,panelRect:r,guide:n})=>{const o=Nr(r),s=z(t.x,e.innerRadius,o),i=z(t.x,1,o);return(0,a.jsx)(ot,{panelRect:r,children:(0,a.jsx)("line",{x1:s.x,y1:s.y,x2:i.x,y2:i.y,stroke:n.color,strokeWidth:jo,strokeDasharray:wo,strokeLinecap:"round","data-testid":"hover-guide-line"})})},Bd=({coordSystem:e,primary:t,panelRect:r,guide:n})=>{const o=(0,u.getPolarHoverGuideArcProps)(e,t);if(o===null)return null;const s=(0,u.buildPolarBarArcPath)(o);return s?(0,a.jsx)(ot,{panelRect:r,children:(0,a.jsx)("svg",{viewBox:"-1 -1 2 2",preserveAspectRatio:"xMidYMid meet",width:"100%",height:"100%",style:{overflow:"visible"},children:(0,a.jsx)("path",{d:s,fill:n.background,"data-testid":"hover-guide-arc"})})}):null},ot=({panelRect:e,children:t})=>(0,a.jsx)("svg",{x:e.x,y:e.y,width:e.width,height:e.height,style:{overflow:"visible",pointerEvents:"none"},"data-testid":"hover-guide",children:t}),Id=(e,t,r)=>{for(const n of Object.values(Co)){const o=n(e,t,r);if(o!==null)return o}return null},Td=e=>Co[e]!==void 0,Ro=(e,t,r)=>ko(e,r,t/2),Po=(e,t)=>{const r=(0,u.projectAnchorToPanel)(e.start,t),n=(0,u.projectAnchorToPanel)(e.end,t);return r.x===n.x&&r.y===n.y?null:{shape:"segment",start:r,end:n}},Eo=(e,{panel:t,measuredBoxes:r})=>{const n=r.get(e.id);if(n===void 0)return null;const o=(0,u.alignUnitFractions)(e.align),s=(0,u.projectAnchorToPanel)(e.at,t);return{shape:"rect",rect:{x:s.x-o.x*n.width,y:s.y-(1-o.y)*n.height,width:n.width,height:n.height}}},We=(e,t)=>(r,n,o)=>{const s=e(r).find(i=>i.id===n);return s===void 0?null:t(s,o)},ko=(e,t,r=0)=>{const n=(0,u.projectRegionToPanel)(e,t);return{shape:"rect",rect:{x:n.x-r,y:n.y-r,width:n.width+r*2,height:n.height+r*2}}},Co={text:We(e=>e.textAnnotations,Eo),shape:We(e=>e.shapes,(e,t)=>Ro(e.region,(0,u.resolveShapeAnnotationStyle)(t.chromeReaders,e.id).borderWidth,t.panel)),image:We(e=>e.images,(e,t)=>ko(e.region,t.panel)),arrow:We(e=>e.arrows,(e,t)=>Po(e,t.panel))},Mo=(e,t)=>{const r=(0,u.findAnnotation)(e,t);return r!==null&&Td(r.kind)&&(0,u.isAnnotationMovable)(r)},Od=200,Ld=({engine:e,store:t,overlayRef:r})=>{const{tolerance:n}=je[Xt()],o=(0,ye.useStore)(t,s=>s.isQueryOwnedByEditor);(0,h.useEffect)(()=>{const s=r.current;if(!s)return;const i=Fd(s,e),l=o?void 0:Hd(s,e,t,n??void 0);return()=>{l?.(),i()}},[e,t,r,n,o])},Fd=(e,t)=>{const r=()=>{const i=e.getBoundingClientRect();i.width===0||i.height===0||t.setViewport({width:i.width,height:i.height})};let n=null;const o=()=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{n=null,r()},Od)},s=new ResizeObserver(o);return s.observe(e),r(),()=>{s.disconnect(),n!==null&&clearTimeout(n)}},Nd=(e,t)=>e.kind==="cursor"?null:{x:t.left+e.point.x,y:t.top+e.point.y,placement:e.placement,annotationId:e.annotationId},Hd=(e,t,r,n)=>{let o=null,s=null;const i=()=>{const p=e.getBoundingClientRect();return p.width>0&&p.height>0?p:null},l=(p,y)=>({x:p.clientX-y.left,y:p.clientY-y.top}),c=()=>{s=null;const p=o;if(o=null,!p)return;const y=i();if(y===null)return;const b=l(p,y),S=r.getState();if(S.isPointerSuspended)return;const A=(0,u.findPointerRegion)(b,S.pointerRegions);if(A!==null){S.setHoverState(t.query(A.cursor,n)),S.setTooltipAnchor(Nd(A.tooltip,y));return}const j=(0,u.toPanelCursor)(b,y);S.setHoverState(t.query(j,n)),S.setTooltipAnchor(null)},d=()=>{const p=r.getState();p.hover.primary===null&&p.tooltipAnchor===null||(p.setHoverState(u.RESTING_HOVER_STATE),p.setTooltipAnchor(null))},g=p=>{const y=r.getState();if(y.pointerRegions.length===0)return!1;const b=i();return b===null?!1:(0,u.findPointerRegion)(l(p,b),y.pointerRegions)!==null},v=p=>{r.getState().isPointerSuspended||g(p)||(document.removeEventListener("pointermove",v),d())},f=p=>{document.removeEventListener("pointermove",v),o=p,s===null&&(s=requestAnimationFrame(c))},m=p=>{if(o=null,s!==null&&(cancelAnimationFrame(s),s=null),!r.getState().isPointerSuspended){if(g(p)){document.addEventListener("pointermove",v);return}d()}};return e.addEventListener("pointermove",f),e.addEventListener("pointerleave",m),()=>{e.removeEventListener("pointermove",f),e.removeEventListener("pointerleave",m),document.removeEventListener("pointermove",v),s!==null&&cancelAnimationFrame(s),o=null}},Dd=({panelRect:e})=>{const{engine:t,store:r,overlayRef:n}=ie(),o=re(Dt),s=re(Mc),i=re(c=>c.caret!==null);Ld({engine:t,store:r,overlayRef:n});const l=C(c=>o!==null&&Mo(c.spec.annotations,o));return(0,a.jsx)("rect",{ref:n,x:e.x,y:e.y,width:e.width,height:e.height,fill:"transparent",pointerEvents:i?"none":"all",cursor:Gd(l,s),"data-testid":"pointer-capture-layer"})},Gd=(e,t)=>e?"move":t?"pointer":void 0,gt="data-hover-active",Wd=e=>{const{store:t}=ie(),r=(0,ye.useStore)(t,n=>n.hover.primary!==null);(0,h.useEffect)(()=>{const n=e.current;if(n)return r?n.setAttribute(gt,"true"):n.removeAttribute(gt),()=>{n.removeAttribute(gt)}},[e,r])},Bo=()=>{const e=M();return(0,h.useMemo)(()=>t=>(0,u.resolveArrowAnnotationStyle)(e,t),[e])},at=()=>re(e=>pe(e,"move-drag")?.annotationId??pe(e,"shape-resize-drag")?.annotationId??pe(e,"arrow-endpoint-drag")?.annotationId??null),Re=e=>{const t=C(i=>i.annotations),r=Zn(),n=vc(),o=(0,h.useCallback)(i=>Rr(n,"cycle",i,`Annotation reference cycle detected; dropping annotation(s): ${i.join(", ")}`),[n]),s=(0,h.useCallback)(i=>Rr(n,"missing-ref",i,`Annotation reference target(s) no longer exist (dropped during compilation); dropping annotations referencing: ${i.join(", ")}`),[n]);return(0,h.useMemo)(()=>(0,u.resolveDeferredAnchors)({annotations:t,panelRect:e,measuredBoxes:r,onCycle:o,onMissingRef:s}),[t,e,r,o,s])},Rr=(e,t,r,n)=>{const o=[t,...[...r].sort()].join("\0");e.has(o)||(e.add(o),console.warn(n))},Vd=16,Io=({linePath:e,strokeWidth:t})=>(0,a.jsx)("path",{d:e,stroke:"transparent",strokeWidth:Math.max(t,Vd),fill:"none",pointerEvents:"stroke"}),Ud=1.4,Kd={light:{primary:"#1D2129",inverse:"#FFFFFF"},dark:{primary:"#FFFFFF",inverse:"#1D2129"}},To=({computed:e,style:t,isAddressable:r})=>{const n=(0,h.useId)(),{colorScheme:o}=tt(),s=e.dashArray?{strokeDasharray:e.dashArray,strokeDashoffset:e.dashOffset}:{},i=t.shadow==="none"?null:t.shadow,l=t.borderWidth>0,c=Kd[o],d=t.borderColor??Qd(t.color,c.primary,c.inverse),g=i===null?null:zd(e,t.borderWidth,i.blur);return(0,a.jsxs)("g",{pointerEvents:r?void 0:"none",children:[r&&(0,a.jsx)(Io,{linePath:e.linePath,strokeWidth:e.strokeWidth}),i!==null&&g!==null&&(0,a.jsx)("defs",{children:(0,a.jsx)("filter",{id:n,filterUnits:"userSpaceOnUse",...g,children:(0,a.jsx)("feDropShadow",{dx:i.offsetX,dy:i.offsetY,stdDeviation:i.blur,floodColor:i.color})})}),(0,a.jsxs)("g",{filter:i===null?void 0:`url(#${n})`,children:[l&&(0,a.jsx)("path",{d:Yd(e),stroke:d,strokeWidth:e.strokeWidth+2*t.borderWidth,strokeLinecap:"round",fill:"none"}),(0,a.jsx)("path",{d:e.linePath,stroke:t.color,strokeWidth:e.strokeWidth,strokeLinecap:"round",fill:"none",...s}),e.startArrowheadPath.length>0&&(0,a.jsx)("path",{d:e.startArrowheadPath,stroke:t.color,strokeWidth:e.strokeWidth,strokeLinecap:"round",fill:"none"}),e.endArrowheadPath.length>0&&(0,a.jsx)("path",{d:e.endArrowheadPath,stroke:t.color,strokeWidth:e.strokeWidth,strokeLinecap:"round",fill:"none"})]})]})},Yd=e=>[e.linePath,e.startArrowheadPath,e.endArrowheadPath].filter(t=>t.length>0).join(" "),zd=(e,t,r)=>{const n=e.arrowheadExtent+e.strokeWidth+t+r;return{x:Math.min(e.startX,e.endX)-n,y:Math.min(e.startY,e.endY)-n,width:Math.abs(e.endX-e.startX)+2*n,height:Math.abs(e.endY-e.startY)+2*n}},Qd=(e,t,r)=>{try{return(0,ja.getContrast)(e,t)<Ud?r:t}catch{return r}},Xd=({panelRect:e,isEditable:t})=>{const{arrows:r}=Re(e),n=at(),o=Bo(),s=(0,h.useMemo)(()=>r.filter(i=>i.id!==n).flatMap(i=>{const l=o(i.id),c=(0,u.computeArrow)({arrow:i,style:l,panelWidth:e.width,panelHeight:e.height});return c===null?[]:[{computed:c,style:l}]}),[r,n,e.width,e.height,o]);return s.length===0?null:(0,a.jsx)("g",{transform:`translate(${e.x}, ${e.y})`,"data-testid":"arrows",children:s.map(({computed:i,style:l})=>(0,a.jsx)("g",{...Le({kind:"annotation",id:i.id}),children:(0,a.jsx)(To,{computed:i,style:l,isAddressable:t})},i.id))})},Oo=()=>{const{selectionStore:e}=N();return(0,ye.useStore)(e,t=>t.selection)},qd=({linePath:e,arrowheadPath:t,stroke:r,strokeWidth:n,isAddressable:o})=>{const s={stroke:r,strokeWidth:n,strokeLinecap:"round",fill:"none"};return(0,a.jsxs)("g",{pointerEvents:o?void 0:"none",children:[o&&(0,a.jsx)(Io,{linePath:e,strokeWidth:n}),(0,a.jsx)("path",{d:e,...s}),(0,a.jsx)("path",{d:t,...s,strokeLinejoin:"round"})]})},Jd=({x:e,y:t,text:r,box:n,label:o,arrowColor:s,isAddressable:i})=>{const{fonts:l}=ce();return(0,a.jsxs)("g",{pointerEvents:i?void 0:"none",children:[(0,a.jsx)("rect",{x:n.x,y:n.y,width:n.width,height:n.height,rx:o.borderRadius,fill:o.background,stroke:o.borderColor??s,strokeWidth:o.borderWidth}),(0,a.jsx)("text",{x:e,y:t,dominantBaseline:"central",textAnchor:"middle",fill:o.textColor,style:{fontFamily:o.fontFamily??l.familyDefault,fontSize:o.fontSize,fontWeight:o.fontWeight},children:r})]})},Zd="_1i8rg6j0",_d="75%",$d=({panelRect:e,isEditable:t})=>{const r=to(),n=re(Dt),o=Oo(),s=(0,h.useMemo)(()=>new Set(o.filter(i=>i.kind==="annotation").map(i=>i.id)),[o]);return r.length===0?null:(0,a.jsx)("g",{transform:`translate(${e.x}, ${e.y})`,"data-testid":"difference-arrows",children:r.map(({color:i,style:l,id:c,linePath:d,arrowheadPath:g,labelPosition:v,labelBox:f,labelText:m,isDragged:p,hasComparableEndpoints:y})=>{const b=n===c||s.has(c),S=p&&!y,A=S?x.vars.alert:i,j=b&&!S?eh(A):A;return(0,a.jsxs)("g",{className:n===c?Zd:void 0,"data-warning":S||void 0,...Le({kind:"annotation",id:c}),children:[(0,a.jsx)(qd,{linePath:d,arrowheadPath:g,stroke:j,strokeWidth:l.strokeWidth,isAddressable:t}),(0,a.jsx)(Jd,{x:v.x,y:v.y,text:m,box:f,label:l.label,arrowColor:j,isAddressable:t})]},c)})})},eh=e=>`color-mix(in srgb, ${e} ${_d}, ${x.vars.textPrimary})`,Lo=()=>{const e=M();return(0,h.useMemo)(()=>t=>(0,u.resolveImageAnnotationStyle)(e,t),[e])},th={fill:"none",contain:"xMidYMid meet",cover:"xMidYMid slice"},Fo=({image:e,panel:t,style:r})=>{const n=(0,h.useId)(),{src:o,region:s,fit:i}=e,l=(0,u.projectRegionToPanel)(s,t),c=r.borderRadius>0;return(0,a.jsxs)("g",{children:[c&&(0,a.jsx)("clipPath",{id:n,children:(0,a.jsx)("rect",{...l,rx:r.borderRadius})}),(0,a.jsx)("image",{href:o,...l,preserveAspectRatio:th[i],opacity:r.alpha,clipPath:c?`url(#${n})`:void 0})]})},Pr=({panelRect:e,zOrder:t})=>{const r=Re(e).images,n=Lo(),o=at(),s=r.filter(i=>i.zOrder===t&&i.id!==o);return s.length===0?null:(0,a.jsx)("svg",{x:e.x,y:e.y,width:e.width,height:e.height,overflow:"visible","data-testid":`image-annotations-${t}`,children:s.map(i=>(0,a.jsx)("g",{...Le({kind:"annotation",id:i.id}),children:(0,a.jsx)(Fo,{image:i,panel:e,style:n(i.id)})},i.id))})},No=()=>{const e=M();return(0,h.useMemo)(()=>t=>(0,u.resolveShapeAnnotationStyle)(e,t),[e])},Ho=({shape:e,style:t,panel:r})=>{const n=(0,u.projectRegionToPanel)(e.region,r);return(0,a.jsx)("rect",{x:n.x,y:n.y,width:n.width,height:n.height,fill:t.color,fillOpacity:t.alpha,stroke:(0,u.getShapeAnnotationStroke)(t)??"none",strokeWidth:t.borderWidth})},Er=({panelRect:e,zOrder:t})=>{const r=Re(e).shapes,n=No(),o=at(),s=r.filter(i=>i.zOrder===t&&i.id!==o);return s.length===0?null:(0,a.jsx)("svg",{x:e.x,y:e.y,width:e.width,height:e.height,overflow:"visible","data-testid":`shapes-${t}`,children:s.map(i=>(0,a.jsx)("g",{...Le({kind:"annotation",id:i.id}),children:(0,a.jsx)(Ho,{shape:i,style:n(i.id),panel:e})},i.id))})},Do=()=>{const e=M();return(0,h.useMemo)(()=>t=>(0,u.resolveTextAnnotationStyle)(e,t),[e])},rh="_1aj6s5s0",nh="_1aj6s5s1",oh=.1,ah=({annotation:e,panel:t,style:r,blockRef:n})=>(0,a.jsx)(Go,{annotation:e,panel:t,style:r,blockRef:n,children:(0,a.jsx)(xe,{content:e.content})}),Go=({annotation:e,panel:t,style:r,blockRef:n,children:o})=>{const s=(0,u.projectAnchorToPanel)(e.at,t);return(0,a.jsx)("foreignObject",{x:s.x,y:s.y,width:(0,u.toPercent)(e.width),height:t.height,overflow:"visible",pointerEvents:"none",children:(0,a.jsx)("div",{ref:n,className:rh,style:{...ih(r),transform:sh(e.align)},children:o})})},sh=e=>{const t=(0,u.alignUnitFractions)(e);return`translate(${-t.x*100}%, ${-(1-t.y)*100}%)`},ih=e=>({color:e.textColor,...e.fontFamily===void 0?{}:{fontFamily:e.fontFamily},fontSize:e.fontSize,fontWeight:e.fontWeight,lineHeight:e.lineHeight,padding:`${e.paddingBlock}px ${e.paddingInline}px`,borderRadius:e.borderRadius,...lh(e)}),lh=e=>{if(e.background==="transparent")return{};const t=e.alpha<1?D(e.background,e.alpha):e.background;if(e.borderWidth<=0)return{backgroundColor:t};const r=e.borderColor??Xr(e.background,oh);return{backgroundColor:t,boxShadow:`0 0 0 ${e.borderWidth}px ${r}`}},ch=e=>{const t=Re(e).textAnnotations,r=re(n=>pe(n,"text-resize-drag"));return(0,h.useMemo)(()=>t.map(n=>Wo(n,r)),[t,r])},Wo=(e,t)=>t===null||t.annotationId!==e.id?e:{...e,at:{...e.at,x:e.at.x+t.shift},width:t.width},uh=({panelRect:e})=>{const t=ch(e),r=Do(),n=at(),o=t.filter(s=>s.id!==n);return o.length===0?null:(0,a.jsx)("svg",{x:e.x,y:e.y,width:e.width,height:e.height,overflow:"visible","data-testid":"text-annotations",children:o.map(s=>(0,a.jsx)(dh,{annotation:s,panel:e,style:r(s.id)},s.id))})},dh=({annotation:e,panel:t,style:r})=>{const n=_n(e.id),o=re(i=>i.caret?.annotationId===e.id),{TextAnnotation:s}=Vt();return(0,a.jsx)("g",{...Le({kind:"annotation",id:e.id}),children:(0,a.jsx)(Go,{annotation:e,panel:t,style:r,blockRef:n,children:o&&s?(0,a.jsx)(s,{annotation:e}):(0,a.jsx)(xe,{content:e.content})})})},Vo=()=>{const e=M();return(0,h.useMemo)(()=>(t,r)=>(0,u.resolveCalloutAnnotationStyle)(e,t,r),[e])},hh="ph8bdc0";var gh="ph8bdc2",kr={hittable:"ph8bdc4 ph8bdc3",inert:"ph8bdc5 ph8bdc3"},vh=({cx:e,cy:t,color:r,style:n})=>{const o=dl(n.shadow);return(0,a.jsx)("circle",{cx:e,cy:t,r:n.size/2,style:{fill:r,stroke:n.borderColor,strokeWidth:n.borderWidth,...o===void 0?{}:{filter:o}}})};function fh(e){const t=oe(),{formattingLocale:r}=N(),n=Vo(),o=C((0,W.useShallow)(c=>({pinnedNumbers:c.annotations.pinnedNumbers,comments:c.annotations.comments,coordSystem:c.coordSystem,numberFormat:c.config.numberFormat,parsingLocale:c.config.parsingLocale}))),s=r??o.parsingLocale,i=(0,h.useMemo)(()=>(0,u.createPinnedNumberValueFormatter)({numberFormat:o.numberFormat,locale:s}),[o.numberFormat,s]),l=(0,h.useMemo)(()=>(c,d,g)=>{const v=n(c==="pinned-number"?"pinnedNumber":"comment",d).label,f={family:v.fontFamily??Te,size:v.fontSize,weight:v.fontWeight},m=mh(t,c,g,f),p=t.measureText(m,f),y=c==="pinned-number"?15:0;return{width:p.width+y+(v.paddingInline+v.borderWidth)*2,height:Math.max(p.height,10)+(v.paddingBlock+v.borderWidth)*2,text:m}},[t,n]);return(0,h.useMemo)(()=>(0,u.placeCallouts)({pinnedNumbers:o.pinnedNumbers,comments:o.comments,panelRect:e,coordSystem:o.coordSystem,measurer:l,formatPinnedNumber:c=>i(c.at)}),[o.pinnedNumbers,o.comments,e,o.coordSystem,l,i])}var mh=(e,t,r,n)=>t!=="comment"?r:(0,u.truncateToWidth)(r,140,o=>e.measureText(o,n).width),Cr="callouts",ph=({panelRect:e})=>{const{pinnedNumbers:t,comments:r}=C((0,W.useShallow)(m=>({pinnedNumbers:m.annotations.pinnedNumbers,comments:m.annotations.comments}))),n=C(m=>m.coordSystem),o=ae(),s=Pa(10),i=Vo(),l=fh(e),{store:c}=ie(),d=(0,h.useMemo)(()=>{const m=new Map;for(const p of t)m.set(p.id,p.at);for(const p of r)m.set(p.id,p.at);return m},[t,r]),g=(0,h.useMemo)(()=>{const m=new Map;for(const[p,y]of d)m.set(p,s(y));return m},[d,s]),v=(0,h.useMemo)(()=>{const m=new Map;for(const p of t)m.set(p.id,i("pinnedNumber",p.id));for(const p of r)m.set(p.id,i("comment",p.id));return m},[t,r,i]),f=(0,h.useMemo)(()=>(0,u.buildCalloutHitRegions)(l,e),[l,e]);return(0,h.useEffect)(()=>{const m=c.getState();return m.publishPointerRegions(Cr,f),()=>{m.publishPointerRegions(Cr,[])}},[c,f]),t.length===0&&r.length===0?null:(0,a.jsx)("svg",{x:e.x,y:e.y,width:e.width,height:e.height,overflow:"visible",className:hh,"data-testid":"callouts",children:l.map(m=>{if(!m.inView)return null;const p=d.get(m.id),y=v.get(m.id);if(p===void 0||y===void 0)return null;const b=g.get(m.id),S=b?.color,A=m.miniRect.width<=e.width&&m.miniRect.height<=e.height;return(0,a.jsxs)("g",{"data-testid":m.kind,children:[(0,a.jsx)("foreignObject",{x:m.miniRect.x,y:m.miniRect.y,width:m.miniRect.width,height:m.miniRect.height,overflow:"visible",children:(0,a.jsxs)("div",{className:A?kr.hittable:kr.inert,style:bh(y.label),children:[m.kind==="pinned-number"&&(0,a.jsx)("span",{className:"ph8bdc1",children:(0,a.jsx)(Oe,{shape:o(p.geom,n.type)?.swatchShape??"square",surface:"callout",color:S??"currentColor",width:10,height:10,alpha:b?.alpha,cornerRadius:b?.cornerRadius})}),(0,a.jsx)("span",{className:gh,style:Ah(y.label),children:m.text})]})}),(0,a.jsx)(vh,{cx:m.anchorPx.x,cy:m.anchorPx.y,color:xh(y.marker,S),style:y.marker})]},m.id)})})},xh=(e,t)=>e.isColorAuthored?e.color:t??e.color,yh=e=>e.isTextColorAuthored?e.textColor:(0,u.ensureReadableTextColor)(e.textColor,e.background),bh=e=>({background:e.background,borderRadius:e.borderRadius,padding:`${e.paddingBlock}px ${e.paddingInline}px`,boxShadow:Tt(e.shadow),...e.borderWidth>0?{border:`${e.borderWidth}px solid ${e.borderColor}`}:{}}),Ah=e=>({...e.fontFamily===void 0?{}:{fontFamily:e.fontFamily},fontSize:e.fontSize,fontWeight:e.fontWeight,lineHeight:e.lineHeight,color:yh(e)}),Sh=(e,t)=>e*10*t,Uo={"clapping-hands":{aspectRatio:1.059,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEQAAABICAYAAABP0VPJAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABipSURBVHgB7VwJfFTVuf/uMvtMlplJJiEhBEhYwiIYNgExUBSQ6qMqblWrz5/WtfBa67NiH1iftbW1VqWghWqt+opFfajFBRcSUMImEBISspCFSTIh++zbXfqdO3cmswWSSPVHf/1+ub977znfPfec//m28507Afg3/ZvORsxwmEVRpJDo0tISCqA0XEzJBx06bwjXUXAB0lA7TZWUlDCtra3Mtm3vjCUF1113dbNWqxXItcfjod966718igpSubm5ow8fPnx8zZo1fQ0NMzlR/JuAIIrwL0LU6tWrmfz8fLXD4XgYJaRPlEkQhH6v1/s6lj9FrsU44nm+BevuAihWbNiwgYZ/ASLSw5aXfzU5EAjuFUdICNr/ElDgAlWhCBHJ2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+EceeXo5gtImDpMwK9a2ceNr16ekTCmwWOZnXohgRCj0k7ECVU7OHJNGU5z385//9vL+fsehoYKBvAcfffS3y1JTZ41LSbnESMD4V/jHDDT5wXJ6enGq0Th7tF4/eQouxt47GxCYAbMfPVr9tNE4s0itnpJHwPhn/Oj5WyXyS3CzeYHBaJyeq9dPnXzy5KkXZRUSwge5x/LN11xzzwKiZmbzpei6FxiG898pLiTEsK8laFd6VWazIsXlCmhYltLee++NuWPGjE757LO97Z988kUfRSmCHMd7WVbl1esBI9CvyM8S5ETKkF5ywRGCkotrpFEY2FEaQQgwosjTgYCCpyiBYxiFX612+7u6RHSp1STgGvL3ZXLjFxzhTDswS9cWTEubiYPmUQLSfCoVeO32dk9BAeWbM2dKoLq6TP7l0vDoQjYyUUnXUDqe0Nf9f0f/APDc5Dseec9LAAAAAElFTkSuQmCC"},"grinning-face":{aspectRatio:1.03,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABECAYAAAA1DeP1AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABeNSURBVHgB7VwJdFbVtd73/mP+/EMmEpL8CYFMECAQmWTwGRSf1ApUK/a19lULLQ6vqy19fVVfbRvreyxp7eBbrYWKtUuxtVBaZajWiQCCIMSHgQQSpiSEDGT8h/zzvfftc+cpQFB57Vrda93cc+490/7OPnvvs8/9A/AP+gepyQLXkDiOo5Do+vpxNEAzTfqfNWuWpaCgwNLdXYBj6bbU1tbSbW1zKHyPF1BwjeiT7oiqq6uj6uvrkfl6qqSkxLJ9+/aSwsLCaovFkmG1WktomvZh2kcKMwwTQLCG8d4eDofb9+zZc+zRRx8dbGtrY/A1i21xeLHw90Bk1kEA2FpWVubYtm1bfjAY/E48Ht/BsuwwN0YioJC6AwMDaxobGycDVNlBkORrJi1jJpwtGkXdtmvXrvHI/JpkMrmX+5iJtDk8PLwGpcuJXVrxouFviHAws2xk9lGk113NzI+ViKQMDg7e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Ui181Ip7O/5B+Bjh4d+FEyuWRuU9OyhPzLtSuMaNLIQOOWLb338QukgYGhzfH4NQtbWz8xnQQJVyixtralkaamxbP27j38L+fL/JEjJ56Jx7sXRaPXt2LFiTbTLmm0uqQk/8hySSOp8o9//OoDWGofmIzxVGr8neeee+V+WvlodFkLCQ8uMfNTCisnGwNVWD99Wo8yFmmwrHLkqaf+edm113Zdn0jEZpbLRgYruSd7er7z8vbtu0byeZ4PBNRsJqPnqJrL+dn/6OmiJweXh4QQzpyJhUslHtX1QLBYNDRdl1kPYxjky9zAvKGk63ZhbGy8eD4FzSmZGFw+wrFWqm1tGb1QiOu42aJybiixWAzyedPSNNtMJMLlI0dwk5u/YV1xIe8CSHzxWP0PIzh/9i7+agAuM/0G5ili1qX1t5UAAAAASUVORK5CYII="},"thumbs-up":{aspectRatio:1.063,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABECAYAAAAx+DPIAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABSHSURBVHgB7VwLcFzVef7PfezefWklZEl+BQQSGGQsMMa0vFXStCRAaQsaEpoyZTINTMkwHaAloWlRTcNQZkImSTNTmoG4YEoTOhkTkjF1gYgE6leEjQ0yorIs23pYLySttK/7Ov3/c+5Ku3uv1qJIUGfyjw93d+8595z/P//zO1cA/IZ+Qx8nMc45A+hQ8LMG0KZt2rRJpyvd89rHuyD4+IjmUpqbP6v94hdPtcXj8YvC4XCr4zjTuVzuYF/fwOuXXtrah30cbC42Dr8u1NHRobS0tISGhoauR4aP8QUom81u6+rqugBgk05j4BPQiCUnqfKb9HQ6/Q2+SKK+zc3NYRyuwOlMyAtdtEOHDl/BPyRls/ltjY2NBpzOQpC732hUUvvKQshuI9OB09UUyI7J7gO5Sx3kfPBJzoeeQU6HFxRCKpV6UEaK05Bo96amph7zcZUb4fytGzh/53PY8PrW73N+fGugAFzXndq+fftqL3QuOS2rfeHuqbquX+S7M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},jh=3.2,wh=({panelRect:e})=>{const t=Re(e).stickers,r=M().graph.get("textScale");if(t.length===0)return null;const n=Sh(jh,r);return(0,a.jsx)("svg",{x:e.x,y:e.y,width:e.width,height:e.height,overflow:"visible","data-testid":"stickers",children:t.map(o=>{const s=(0,u.projectAnchorToPanel)(o.at,e);return(0,a.jsx)(Rh,{sticker:o,sizePx:n,x:s.x,y:s.y},o.id)})})},Rh=({sticker:e,sizePx:t,x:r,y:n})=>{const o=Uo[e.sticker];if(!o)return null;const{width:s,height:i}=Ph(o.aspectRatio,t);return(0,a.jsx)("image",{href:o.src,x:r,y:n,width:s,height:i,transform:`translate(${-s/2}, ${-i/2})`})},Ph=(e,t)=>e>=1?{width:t,height:t/e}:{width:t*e,height:t},Eh=.25,Ko=({children:e,...t})=>{const r=Kl();return r<=0?(0,a.jsx)("g",{...t,children:e}):(0,a.jsx)(R.motion.g,{...t,initial:{opacity:0},animate:{opacity:1},transition:{duration:Eh,delay:r},children:e})},kh="_1agclyl0";var Ch="_1agclyl2",Yo=({x:e,y:t,width:r,height:n,text:o,isRotated:s,labelRole:i,position:l,coordType:c,backdropColor:d})=>{const g=rt(),v=s?`rotate(-90 ${e} ${t})`:void 0,f=g[i][l],m=f.borderColor!==void 0&&(f.borderWidth??0)>0,p=Ih(i,c,f),y=Bh(f,p,d);return(0,a.jsxs)("g",{transform:v,children:[p&&(0,a.jsx)("rect",{className:"_1agclyl1",x:e-r/2,y:t-n/2,width:r,height:n,rx:f.borderRadius,ry:f.borderRadius,fill:f.background,...m?{stroke:f.borderColor,strokeWidth:f.borderWidth}:{}}),(0,a.jsx)("text",{className:Ch,style:{...ne(f),fill:Mh(f,y)},x:e,y:t,textAnchor:"middle",dominantBaseline:"central",children:o})]})},Mh=(e,t)=>e.isTextColorAuthored||t===void 0?e.textColor:(0,u.pickReadableTextColor)(t),Bh=(e,t,r)=>{if(r!==void 0)return(0,u.compositeColor)(t?e.background:void 0,r)},Ih=(e,t,r)=>r.background===void 0?!1:e==="aggregate"||t==="cartesian",Th=({panelRect:e,formattingLocale:t,plotBottomY:r,isFooterChromeReserved:n})=>{const o=oe(),s=ce(),i=C((0,W.useShallow)(f=>({layers:f.layers,coordSystem:f.coordSystem,axes:f.guides.axes,numberFormat:f.config.numberFormat,parsingLocale:f.config.parsingLocale}))),l=rt(),c=(0,h.useMemo)(()=>Kn({textMeasurer:o,dataLabelStyles:l,familyDefault:s.fonts.familyDefault}),[o,l,s.fonts.familyDefault]),d=(0,h.useMemo)(()=>(0,u.buildDataLabelsContent)({...i,panelRect:e,measureDataLabel:c,formattingLocale:t,plotBottomY:r,isFooterChromeReserved:n}),[i,e,c,t,r,n]),g=(0,h.useRef)("");(0,h.useEffect)(()=>{if(d.warnings.length===0){g.current="";return}const f=JSON.stringify(d.warnings);f!==g.current&&(g.current=f,Lr(d.warnings))},[d.warnings]);const v=d.labels.map((f,m)=>(0,a.jsx)(Yo,{x:f.x,y:f.y,width:f.width,height:f.height,text:f.text,isRotated:f.isRotated,labelRole:f.role,position:f.position,coordType:i.coordSystem.type,backdropColor:f.backdropColor},`${f.layerId}:${m}`));return(0,a.jsx)(Ko,{className:kh,transform:`translate(${e.x}, ${e.y})`,"data-testid":"data-labels",children:v})},Oh=({edge:e,position:t,labelRotation:r,offset:n,axisSize:o})=>{if(r!==0&&(e==="top"||e==="bottom")){const s=e==="top",i=s?-n:n;return{x:0,y:i,textAnchor:s?"start":"end",dominantBaseline:"central",transform:`rotate(${r}, 0, ${i})`}}switch(e){case"bottom":return{x:t*o.width,y:n,textAnchor:"middle",dominantBaseline:"hanging",transform:void 0};case"top":return{x:t*o.width,y:o.height-n,textAnchor:"middle",dominantBaseline:"auto",transform:void 0};case"left":return{x:o.width-n,y:t*o.height,textAnchor:"end",dominantBaseline:"central",transform:void 0};case"right":return{x:n,y:t*o.height,textAnchor:"start",dominantBaseline:"central",transform:void 0}}},Lh=(e,t)=>{const r=t.height/2;switch(e){case"left":return{x:0,y:r,textAnchor:"start",dominantBaseline:"middle",transform:void 0};case"right":return{x:t.width,y:r,textAnchor:"end",dominantBaseline:"middle",transform:void 0};case"top":case"bottom":return{x:t.width/2,y:r,textAnchor:"middle",dominantBaseline:"middle",transform:void 0}}},Fh=(e,t,r,n)=>{const{width:o,ascent:s,descent:i}=t,l=s+i,c=Wh(e,o),d=Vh(e,s,l),g=Hh(r,e,n,{x:c,y:d,width:o,height:l});return{x:c-g.left,y:d-g.top,width:o+g.left+g.right,height:l+g.top+g.bottom,transform:e.transform}},Nh=(e,t)=>{const r=e.map((o,s)=>({position:o,index:s})).sort((o,s)=>o.position-s.position),n=e.map(()=>1/0);return r.forEach((o,s)=>{const i=r[s-1],l=r[s+1],c=i===void 0?1/0:o.position-i.position,d=l===void 0?1/0:l.position-o.position,g=Math.min(c,d);n[o.index]=Number.isFinite(g)?g*t:1/0}),n},Hh=(e,t,r,n)=>r===void 0?{left:e,right:e,top:e,bottom:e}:t.transform!==void 0?Dh(e,t):Gh(e,r,n),Dh=(e,{y:t,textAnchor:r})=>{const n=Me(e,Math.abs(t));return r==="end"?{left:e,right:n,top:e,bottom:e}:{left:n,right:e,top:e,bottom:e}},Gh=(e,{edge:t,stepPx:r,axisSize:n},o)=>{const s=Mr(e,r,o.width),i=Mr(e,r,o.height);switch(t){case"bottom":return{left:s,right:s,top:Me(e,o.y),bottom:e};case"top":return{left:s,right:s,top:e,bottom:Me(e,n.height-o.y-o.height)};case"left":return{left:e,right:Me(e,n.width-o.x-o.width),top:i,bottom:i};case"right":return{left:Me(e,o.x),right:e,top:i,bottom:i}}},Me=(e,t)=>Math.max(0,Math.min(e,t)),Mr=(e,t,r)=>Math.min(e,Math.max(0,(t-r)/2)),Wh=({x:e,textAnchor:t},r)=>{switch(t){case"start":return e;case"middle":return e-r/2;case"end":return e-r}},Vh=({y:e,dominantBaseline:t},r,n)=>{switch(t){case"hanging":return e;case"central":case"middle":return e-n/2;case"auto":return e-r}},Uh={fill:"transparent",pointerEvents:"all"},zo=({placement:e,text:t,style:r,bounds:n})=>{const o=oe(),{fonts:s}=ce();return(0,a.jsx)("rect",{...(0,h.useMemo)(()=>Fh(e,o.measureText(t,(0,u.toFontSpec)(r,s.familyDefault)),3,n),[e,o,t,r,s.familyDefault,n]),...Uh})},Kh=({edge:e,position:t,labelRotation:r,label:n,tickLabelStyle:o,axisSize:s,stepPx:i=1/0,isHitTestable:l=!1})=>{const{offset:c,textColor:d}=o,g=(0,h.useMemo)(()=>Oh({edge:e,position:t,labelRotation:r,offset:c,axisSize:s}),[e,t,r,c,s]),v=(0,h.useMemo)(()=>({edge:e,stepPx:i,axisSize:s}),[e,i,s]),f=l?(0,a.jsx)(zo,{placement:g,text:n,style:o,bounds:v}):null,m=(0,a.jsx)("text",{...g,style:ne(o),fill:d,children:n});return g.transform===void 0?(0,a.jsxs)(a.Fragment,{children:[f,m]}):(0,a.jsxs)("svg",{x:(0,u.toPercent)(t),y:e==="top"?"100%":0,style:{overflow:"visible"},children:[f,m]})},Yh=({formattedAxis:e,rect:t})=>{const r=e.position==="bottom"||e.position==="top",n=(0,u.getAestheticFromScaleAestheticKey)(e.scaleAestheticKey),o=Ht(),s=(0,h.useMemo)(()=>o(n,e.position),[o,n,e.position]),i=Un()[n],l=we(),c=(0,h.useMemo)(()=>({width:t.width,height:t.height}),[t.width,t.height]),d=r?t.width:t.height,g=(0,h.useMemo)(()=>l?Nh(e.ticks.map(v=>v.position),d):void 0,[l,e.ticks,d]);return(0,a.jsxs)("svg",{x:t.x,y:t.y,width:t.width,height:t.height,style:{overflow:"visible"},children:[!1,e.ticks.map((v,f)=>{const m=v.formattedLabel,p=r?v.position:1-v.position,y=zh(e.position,p,t,i.length),b=l&&m!=="";return(0,a.jsxs)("g",{...b?zt(e.scaleAestheticKey,f):void 0,cursor:b?"pointer":void 0,children:[e.ticksVisible&&(0,a.jsx)("line",{...y,stroke:i.color,strokeWidth:i.strokeWidth,strokeDasharray:(0,u.getChromeDashArray)(i.lineType),pointerEvents:l?"none":void 0}),(0,a.jsx)(Kh,{edge:e.position,position:p,labelRotation:e.labelRotation,label:m,tickLabelStyle:s,axisSize:c,stepPx:g?.[f],isHitTestable:b})]},f)})]})},zh=(e,t,r,n)=>{const o=(0,u.toPercent)(t);switch(e){case"bottom":return{x1:o,y1:0,x2:o,y2:n};case"top":return{x1:o,y1:r.height,x2:o,y2:r.height-n};case"left":return{x1:r.width,y1:o,x2:r.width-n,y2:o};case"right":return{x1:0,y1:o,x2:n,y2:o}}},Qh=({axes:e,rects:t})=>{const r=Wn(),n=we();return(0,a.jsx)(a.Fragment,{children:e.map(o=>{const s=t[o.position];return!s||!o.isVisible?null:(0,a.jsx)(Xh,{axis:o,rect:s,labelStyle:r[(0,u.getAestheticFromScaleAestheticKey)(o.scaleAestheticKey)],isHitTestable:n},`axis-label-${o.position}`)})})},Xh=({axis:e,rect:t,labelStyle:r,isHitTestable:n})=>{const o=(0,h.useMemo)(()=>Lh(e.position,t),[e.position,t]),s=n&&e.label!==null&&e.label!=="",i=s?zt(e.scaleAestheticKey):void 0;return(0,a.jsxs)("g",{transform:`translate(${t.x}, ${t.y})`,...i,cursor:s?"pointer":void 0,children:[!1,s&&e.label!==null&&(0,a.jsx)(zo,{placement:o,text:e.label,style:r}),(0,a.jsx)("text",{...o,style:ne(r),fill:r.textColor,children:e.label})]})},qh=({formattedAxes:e,tickRects:t})=>(0,a.jsx)(a.Fragment,{children:e.map(r=>{if(r.geometry!=="linear")return null;const n=t[r.position];return!n||!r.isVisible?null:(0,a.jsx)(Yh,{formattedAxis:r,rect:n},r.scaleAestheticKey)})}),Jh=({formattedAxes:e,labelRects:t})=>(0,a.jsx)(Qh,{axes:e.filter(r=>r.geometry==="linear"),rects:t}),Qo={strokeDashoffset:"0",strokeLinecap:"round"},Xo=({axes:e,panelBorderSizes:t,panelFrameRect:r,panelRect:n})=>{const o=M(),s=we(),i=n.x-r.x,l=n.y-r.y;return(0,a.jsx)("svg",{"data-testid":"grid",x:r.x,y:r.y,width:r.width,height:r.height,style:{overflow:"visible"},children:e.map(c=>{if(c.geometry!=="linear"||!c.gridVisible)return null;const d=c.position==="bottom"||c.position==="top",g=(0,u.getAestheticFromScaleAestheticKey)(c.scaleAestheticKey),v=(0,u.resolveGridLineStyle)(o,g),f=(0,u.getChromeDashArray)(v.lineType);return(0,a.jsx)("g",{children:c.ticks.map((m,p)=>{const y=Zh(d,m.position);if(y!==null&&t[y]>0)return null;const b=d?m.position:1-m.position;let S;if(d){const j=b*n.width+i;S={x1:j,y1:0,x2:j,y2:"100%"}}else{const j=b*n.height+l;S={x1:0,y1:j,x2:"100%",y2:j}}const A=(0,a.jsx)("line",{...S,...Qo,strokeDasharray:f,strokeWidth:v.strokeWidth,stroke:v.color});return s?(0,a.jsxs)("g",{...vo(c.scaleAestheticKey),children:[A,(0,a.jsx)("line",{...S,stroke:"transparent",strokeWidth:7,pointerEvents:"stroke","data-testid":"grid-line-hit-area"})]},p):(0,a.jsx)(h.Fragment,{children:A},p)})},c.scaleAestheticKey)})})},Zh=(e,t)=>t<=0?e?"left":"bottom":t>=1?e?"right":"top":null,_h=({sizes:e,panelFrameRect:t})=>{const r=C(i=>i.coordSystem.type==="polar"),n=M(),o=(0,h.useMemo)(()=>(0,u.resolvePanelBorderStyle)(n),[n]);if(r)return null;const s=(0,u.computePanelBorderPaths)(o,{x:e.left/2,y:e.top/2,width:t.width-(e.left+e.right)/2,height:t.height-(e.top+e.bottom)/2});return s.length===0?null:(0,a.jsx)("svg",{"data-testid":"panel-border",x:t.x,y:t.y,width:t.width,height:t.height,style:{overflow:"visible"},children:s.map((i,l)=>(0,a.jsx)("path",{d:$h(i.segments),fill:"none",stroke:i.color,strokeDasharray:(0,u.getChromeDashArray)(i.lineType),strokeWidth:i.strokeWidth,...Qo},l))})},$h=e=>e.map(t=>{switch(t.type){case"move":return`M ${t.x} ${t.y}`;case"line":return`L ${t.x} ${t.y}`;case"arc":{const r=t.cx+t.radius*Math.cos(t.endAngle),n=t.cy+t.radius*Math.sin(t.endAngle);return`A ${t.radius} ${t.radius} 0 0 1 ${r} ${n}`}case"close":return"Z"}}).join(" ");var qo=(e,t)=>{const r=C(c=>c.coordSystem);if(r.type!=="polar")return null;const n=t.find(c=>c.geometry==="circular");if(!n)return null;const{innerRadius:o,startAngle:s,spokeRotation:i}=r,l=Nr(e);return l.radius<=0?null:{circle:l,circularAxis:n,radialAxis:t.find(c=>c.geometry==="radial"),innerRadius:o,startAngle:s,angleFor:c=>(0,u.positionToAngle)(c,s,i),radiusNormFor:c=>o+c*(1-o)}},eg=3,tg=16,rg=({formattedAxes:e,panelRect:t})=>{const r=Ht(),n=qo(t,e);if(!n)return null;const{circle:o,circularAxis:s,radialAxis:i,startAngle:l,angleFor:c,radiusNormFor:d}=n,g=ng(i,d,o.radius),v=f=>r((0,u.getAestheticFromScaleAestheticKey)(f.scaleAestheticKey));return(0,a.jsxs)("svg",{x:t.x,y:t.y,width:t.width,height:t.height,overflow:"visible","data-testid":"polar-axis-ticks",children:[i?.isVisible&&g.map(({tick:f,radiusNorm:m},p)=>{const y=z(l,m,o);return(0,a.jsx)("text",{x:y.x,y:y.y,textAnchor:"middle",dominantBaseline:"central",style:{...ne(v(i)),paintOrder:"stroke"},stroke:x.vars.graphBackground,strokeWidth:eg,fill:v(i).textColor,children:f.formattedLabel},`radial-label-${p}`)}),s.isVisible&&s.ticks.map((f,m)=>{if(f.position>=1-1e-9)return null;const p=c(f.position),y=z(p,(o.radius+u.POLAR_RIM_LABEL_GAP_PX)/o.radius,o);return(0,a.jsx)("text",{x:y.x,y:y.y,textAnchor:og(p),dominantBaseline:"central",style:ne(v(s)),fill:v(s).textColor,children:f.formattedLabel},`rim-label-${m}`)})]})},ng=(e,t,r)=>{if(!e)return[];const n=[];let o=Number.NEGATIVE_INFINITY;for(const s of e.ticks){const i=t(s.position);if(i<=0)continue;const l=i*r;l-o<tg||(n.push({tick:s,radiusNorm:i}),o=l)}return n},og=e=>{const t=Math.sin(e);return Math.abs(t)<.01?"middle":t>0?"start":"end"},ag=({formattedAxes:e,panelRect:t})=>{const r=M(),n=qo(t,e);if(!n)return null;const{circle:o,circularAxis:s,radialAxis:i,innerRadius:l,angleFor:c,radiusNormFor:d}=n,g=(0,u.resolveGridLineStyle)(r,"y"),v=(0,u.resolveGridLineStyle)(r,"x");return(0,a.jsxs)("svg",{x:t.x,y:t.y,width:t.width,height:t.height,overflow:"visible","data-testid":"polar-grid",children:[i?.gridVisible&&i.ticks.map((f,m)=>{const p=d(f.position)*o.radius;return p<=0||f.position>=1?null:(0,a.jsx)("circle",{cx:o.centerX,cy:o.centerY,r:p,fill:"none",stroke:g.color,strokeWidth:g.strokeWidth},`ring-${m}`)}),i?.gridVisible&&(0,a.jsx)("circle",{cx:o.centerX,cy:o.centerY,r:o.radius,fill:"none",stroke:g.color,strokeWidth:g.strokeWidth}),s.gridVisible&&s.ticks.map((f,m)=>{if(f.position>=1-1e-9)return null;const p=c(f.position),y=z(p,l,o),b=z(p,1,o);return(0,a.jsx)("line",{x1:y.x,y1:y.y,x2:b.x,y2:b.y,stroke:v.color,strokeWidth:v.strokeWidth},`spoke-${m}`)})]})},sg=({layer:e,coordSystem:t,shouldAnimateTransitions:r,isDimmed:n,dimStyle:o,formattingLocale:s,panelRect:i})=>{const l=ae(),c=Yl(e.id),{colorScheme:d}=N(),g=B(e),v=l(e.geom,t.type);if(v===null)return null;const f=$e(v.render);return f.overlay?null:(0,a.jsx)("g",{style:n?{opacity:o.opacity,...o.saturation===void 0?{}:{filter:`saturate(${o.saturation})`}}:void 0,children:f.fn({layer:e,coordSystem:t,shouldAnimateTransitions:r,formattingLocale:s,intro:c,panelRect:i,colorScheme:d,styleReaders:g})})};function ig({renderer:e,layer:t,coordSystem:r,candidates:n}){if(e?.getOverlayAnchor===void 0||n.length===0)return[];const o=[];for(const{observation:s,observationIndex:i}of n){const l=e.getOverlayAnchor({layer:t,coordSystem:r,observation:s});l!==null&&o.push({observation:s,observationIndex:i,anchor:l})}return o}var lg=4,cg=({renderer:e,layer:t,matchedLayer:r,overlayCandidates:n,coordSystem:o,shouldAnimateTransitions:s,panelRect:i,formattingLocale:l})=>{const c=C(A=>A.config.numberFormat),d=(0,h.useMemo)(()=>ig({renderer:e,layer:t,coordSystem:o,candidates:n}),[e,t,o,n]),{colorScheme:g}=N(),v=B(t),f=(0,h.useMemo)(()=>(0,u.createSegmentYReader)(t),[t]),m=(0,h.useMemo)(()=>(0,u.createLayerYValueFormatter)({layer:t,numberFormat:c,locale:l}),[c,t,l]),{fonts:p}=ce(),y=rt();if(e===null||r===null&&d.length===0)return null;const b=$e(e.render);let S=null;if(r&&!b.overlay){const A={layer:r,sourceLayer:t,coordSystem:o,shouldAnimateTransitions:s,formattingLocale:l,panelRect:i,colorScheme:g,styleReaders:v};S=e.renderHighlight?e.renderHighlight(A):b.fn(A)}return(0,a.jsxs)(Ko,{children:[S,d.map(({observation:A,observationIndex:j,anchor:w})=>(0,a.jsx)(ug,{observation:A,anchor:w,panelRect:i,fill:v.get("color",A),dotRadius:(v.get("size",A)??u.DEFAULT_POINT_SIZE_PX)/2,readSegmentY:f,formatYValue:m,labelStyle:y.observation.outside,familyDefault:p.familyDefault},dg(A,j)))]})},ug=({observation:e,anchor:t,panelRect:r,fill:n,dotRadius:o,readSegmentY:s,formatYValue:i,labelStyle:l,familyDefault:c})=>{const d=oe(),g=(0,u.toViewBoxX)(t.x),v=(0,u.toViewBoxY)(t.y),f=s(e)??null,m=f!==null?i(f,e):null,p=(0,h.useMemo)(()=>{if(m===null)return null;const y=d.measureText(m,(0,u.toFontSpec)(l,c));return{width:y.width+l.paddingInline*2,height:y.height+l.paddingBlock*2}},[m,d,l,c]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("circle",{"data-testid":"highlight-overlay-dot",cx:(0,u.toPercent)(g),cy:(0,u.toPercent)(v),r:o,fill:n}),m!==null&&p!==null&&(0,a.jsx)(Yo,{x:g*r.width,y:v*r.height-o-lg-p.height/2,width:p.width,height:p.height,text:m,isRotated:!1,labelRole:"observation",position:"outside",coordType:"cartesian"})]})},dg=(e,t)=>{const r=e[u.GROUP_VARIABLES.group];return`${String(r??"")}\0${t}`},hg=({layer:e,coordSystem:t,panelRect:r})=>{const{primary:n,group:o,related:s}=me((0,W.useShallow)(v=>({primary:v.hover.primary,group:v.hover.group,related:v.hover.related}))),i=ae(),{colorScheme:l}=N(),c=B(e);if(n===null)return null;const d=i(e.geom,t.type);if(d===null||yn(d))return null;const g=s.get(e.id)??[];return n.layerId===e.id?d.renderHover({layer:e,coordSystem:t,primary:n,group:o,related:g,panelRect:r,colorScheme:l,styleReaders:c}):g.length===0?null:d.renderHoverCompanions({layer:e,primary:n,related:g,colorScheme:l,styleReaders:c})},gg=e=>{const t=B(e);return(0,h.useMemo)(()=>{const[r]=e.data;return r===void 0?{opacity:void 0,saturation:void 0}:{opacity:t.get("alpha",r,"dimmed"),saturation:t.get("saturation",r,"dimmed")}},[e,t])},vg="var(--to1jkx0)",fg="var(--to1jkx1)",mg="to1jkx2",pg="to1jkx3",xg=({shouldAnimateTransitions:e,panelRect:t,formattingLocale:r})=>{const{layers:n,coordSystem:o}=C((0,W.useShallow)(s=>({layers:s.layers,coordSystem:s.coordSystem})));return(0,a.jsx)("svg",{x:t.x,y:t.y,width:t.width,height:t.height,className:mg,"data-testid":"geom-layers",...qu(),children:n.map(s=>(0,a.jsxs)(h.Fragment,{children:[(0,a.jsx)(Sg,{layer:s,coordSystem:o,shouldAnimateTransitions:e,panelRect:t,formattingLocale:r}),(0,a.jsx)(hg,{layer:s,coordSystem:o,panelRect:t})]},`${s.id}-${yg(o)}`))})},yg=e=>e.type==="cartesian"?`cartesian-${e.mainAxis}`:e.type,bg=e=>{if(e.geom!=="rule")return pg},Ag=e=>(0,jt.assignInlineVars)({...e.opacity===void 0?{}:{[vg]:String(e.opacity)},...e.saturation===void 0?{}:{[fg]:`saturate(${e.saturation})`}}),Sg=({layer:e,coordSystem:t,shouldAnimateTransitions:r,panelRect:n,formattingLocale:o})=>{const s=ae(),i=(0,h.useMemo)(()=>s(e.geom,t.type),[s,e,t]),l=e.highlight,c=gg(e),{colorScheme:d}=N(),g={layer:e,coordSystem:t,shouldAnimateTransitions:r,formattingLocale:o,panelRect:n,colorScheme:d,styleReaders:B(e)},v=i?$e(i.render):null,f=e.spatialKind==="render-hit-test",m=bg(e);return(0,a.jsxs)("g",{className:m,style:m===void 0?void 0:Ag(c),children:[(0,a.jsx)(sg,{layer:e,coordSystem:t,shouldAnimateTransitions:r,isDimmed:l?.composition.isDimmed??!1,dimStyle:c,formattingLocale:o,panelRect:n}),f&&!v?.overlay&&i?.hitTest&&(0,a.jsx)(Wi,{hitTest:i.hitTest,input:g}),f&&v?.overlay&&(0,a.jsx)(zi,{render:v.fn,input:g}),l!==null&&(0,a.jsx)(cg,{renderer:i,layer:e,matchedLayer:l.composition.matchedLayer,overlayCandidates:l.composition.overlayCandidates,coordSystem:t,shouldAnimateTransitions:r,panelRect:n,formattingLocale:o})]})},jg="_17uhij30",wg=({formattedAxes:e,plotRect:t,panelBorder:r,panelFrameRect:n,panelRect:o,axisRects:s,axisLabelRects:i,shouldAnimateTransitions:l,formattingLocale:c,plotBottomY:d,isFooterChromeReserved:g,isEditable:v,showAnnotations:f})=>{const m=(0,h.useRef)(null);Wd(m);const p=J("Grid",Xo),y=J("AxisTicks",qh),b=J("AxisLabel",Jh),S=(0,h.useMemo)(()=>At(n,t),[n,t]),A=(0,h.useMemo)(()=>At(o,t),[o,t]),j=(0,h.useMemo)(()=>Br(s,t),[s,t]),w=(0,h.useMemo)(()=>Br(i,t),[i,t]);return(0,a.jsxs)("svg",{ref:m,className:jg,width:t.width,height:t.height,style:{transform:`translate(${t.x}px, ${t.y}px)`},"data-testid":"plot",children:[(0,a.jsx)(p,{axes:e,panelBorderSizes:r,panelFrameRect:S,panelRect:A}),(0,a.jsx)(y,{formattedAxes:e,tickRects:j}),(0,a.jsx)(b,{formattedAxes:e,labelRects:w}),(0,a.jsx)(ag,{formattedAxes:e,panelRect:A}),(0,a.jsx)(Ed,{panelRect:A}),f&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Er,{panelRect:A,zOrder:"background"}),(0,a.jsx)(Pr,{panelRect:A,zOrder:"background"})]}),(0,a.jsx)(_h,{sizes:r,panelFrameRect:S}),(0,a.jsx)(xg,{shouldAnimateTransitions:l,panelRect:A,formattingLocale:c}),(0,a.jsx)(rg,{formattedAxes:e,panelRect:A}),(0,a.jsx)(Th,{panelRect:A,formattingLocale:c,plotBottomY:d,isFooterChromeReserved:g}),f&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)($d,{panelRect:A,isEditable:v}),(0,a.jsx)(Er,{panelRect:A,zOrder:"foreground"}),(0,a.jsx)(Pr,{panelRect:A,zOrder:"foreground"}),(0,a.jsx)(Xd,{panelRect:A,isEditable:v}),(0,a.jsx)(uh,{panelRect:A}),(0,a.jsx)(wh,{panelRect:A}),(0,a.jsx)(ph,{panelRect:A})]}),(0,a.jsx)(Dd,{panelRect:A})]})},At=(e,t)=>({x:e.x-t.x,y:e.y-t.y,width:e.width,height:e.height}),Br=(e,t)=>{const r={};for(const[n,o]of Object.entries(e))r[n]=At(o,t);return r},Rg=e=>{let t,r;return"aspectRatio"in e?"intrinsicWidth"in e?(t=e.intrinsicWidth,r=t/e.aspectRatio):(r=e.intrinsicHeight,t=r*e.aspectRatio):(t=e.intrinsicWidth,r=e.intrinsicHeight),{width:Ir(t,"width"),height:Ir(r,"height")}},Ir=(e,t)=>{if(e<=0||Number.isNaN(e)||!Number.isFinite(e))throw new u.InternalError({message:`Expected ${t} to be a positive, finite number, but got ${e}.`});return e},Pg=({sizing:e,onResize:t,children:r})=>{const n=Pn({onResize:t}),o=(0,h.useRef)(!1);if((0,h.useEffect)(()=>{e.mode==="responsive"&&(n.isDefault||n.width>0&&n.height>0||o.current||(o.current=!0,console.warn(`[graphy] ZERO_SIZE_CONTAINER: GraphRenderer measured ${n.width}×${n.height}; the chart will not paint until the host has a positive width and height.`)))},[e.mode,n.isDefault,n.width,n.height]),e.mode==="keepAspectRatio"){const{intrinsicSize:i,canRender:l,outerStyles:c,innerStyles:d}=Eg(e,n.width,!n.isDefault);return(0,a.jsx)("div",{ref:n.setElement,style:c,"data-testid":"graph-sizer",children:l&&(0,a.jsx)("div",{style:d,children:r(i)})})}if(e.mode==="fixed")return(0,a.jsx)("div",{ref:n.setElement,style:{width:e.width,height:e.height},"data-testid":"graph-sizer",children:r({width:e.width,height:e.height})});const s=!n.isDefault&&n.width>0&&n.height>0;return(0,a.jsx)("div",{ref:n.setElement,style:{width:"100%",height:"100%"},"data-testid":"graph-sizer",children:s&&r({width:n.width,height:n.height})})},Eg=(e,t,r)=>{const n=Rg(e),o=t>0&&n.width>0?t/n.width:1;return{intrinsicSize:n,canRender:r,outerStyles:{width:"100%",...r?{height:n.height*o}:{aspectRatio:`${n.width} / ${n.height}`}},innerStyles:{transformOrigin:"top left",transform:`scale(${o})`,width:n.width,height:n.height}}},kg={mode:"responsive"},vt={headerSize:{width:0,height:0},footerSize:{width:0,height:0}},Cg=()=>{const[e,t]=(0,h.useState)(null),[r,n]=(0,h.useState)(null),[o,s]=(0,h.useState)(vt);return(0,h.useEffect)(()=>{const i=()=>{const c=e?{width:e.offsetWidth,height:e.offsetHeight}:vt.headerSize,d=r?{width:r.offsetWidth,height:r.offsetHeight}:vt.footerSize;s(g=>Mg(g,{headerSize:c,footerSize:d})?{headerSize:c,footerSize:d}:g)};i();const l=new ResizeObserver(i);return e&&l.observe(e),r&&l.observe(r),()=>l.disconnect()},[e,r]),{headerRef:t,footerRef:n,measurements:o}},Mg=(e,t)=>e.headerSize.width!==t.headerSize.width||e.headerSize.height!==t.headerSize.height||e.footerSize.width!==t.footerSize.width||e.footerSize.height!==t.footerSize.height,Bg=()=>null,Ig=({graphChrome:e,isEditable:t,mode:r,style:n,contentRef:o,children:s})=>{const{themeClass:i,inlineVarsStyle:l}=tt(),c=e.borderColor===void 0?0:e.borderWidth,d=c>0?e.borderColor:void 0,g=Math.max(0,e.borderRadius),v=g===0?0:g+c,f=(0,h.useMemo)(()=>({...n,borderRadius:`${v}px`,...l,background:d}),[n,v,l,d]),m=(0,h.useMemo)(()=>({inset:`${c}px`,borderRadius:`${g}px`}),[c,g]),p=t&&e.background==="transparent";return(0,a.jsx)("div",{"data-testid":"graph-wrapper",className:(0,G.default)(gl,i),style:f,children:(0,a.jsx)("div",{ref:o,"data-testid":"graph-inner","data-graph-mode":r,tabIndex:t?0:void 0,className:(0,G.default)(fl,{[ml]:t,[pl]:p}),style:m,children:s})})},Tg=e=>(0,a.jsx)(Mn,{locale:Qn(),children:(0,a.jsx)(Jo,{...e})}),Jo=({slots:e,sizing:t=kg,onResize:r,...n})=>(0,a.jsx)(Sn,{children:(0,a.jsx)(sn,{children:(0,a.jsx)($s,{slots:e,children:(0,a.jsx)(Pg,{sizing:t,onResize:r,children:({width:o,height:s})=>(0,a.jsx)(Og,{width:o,height:s,...n})})})})}),Og=({width:e,height:t,animation:r,showTooltips:n=!0,mode:o=Z.readonly})=>{const s=It(),i=Bt(o),{axes:l,legends:c,layers:d,numberFormat:g,parsingLocale:v,annotations:f,coordSystem:m,headline:p,headlineConfig:y,content:b,overflowStrategy:S}=C((0,W.useShallow)(U=>({axes:U.guides.axes,legends:U.guides.legends.drawn,layers:U.layers,numberFormat:U.config.numberFormat,parsingLocale:U.config.parsingLocale,annotations:U.annotations,coordSystem:U.coordSystem,headline:U.guides.headline,headlineConfig:U.config.headline,content:U.config.content,overflowStrategy:U.config.panel.overflow}))),A=(0,R.useReducedMotion)(),{intro:j,transitions:w}=(0,h.useMemo)(()=>Ji(r,A??!1),[r,A]),{headerRef:E,footerRef:P,measurements:I}=Cg(),{formattingLocale:T,colorScheme:L}=N(),F=je[i],H=F.editorSurface,[qt,Zo]=(0,h.useState)(null),_o=J("Header",ao),$o=J("Footer",oo),ea=J("Legend",Rd),ta=J("Headline",Bu),ra=J("EditorSurface",Bg),Jt=(0,h.useMemo)(()=>(0,u.formatLegends)({legends:c,numberFormat:g,parsingLocale:v,formattingLocale:T}),[c,g,v,T]),Pe=(0,h.useMemo)(()=>(0,u.formatHeadline)({headline:p,show:y.show,numberFormat:g,parsingLocale:v,formattingLocale:T,t:s}),[p,y.show,g,v,T,s]),na=oe(),O=M(),Fe=(0,h.useMemo)(()=>(0,u.resolveGraphFrameStyle)(O),[O]),Zt=(0,h.useMemo)(()=>(0,u.resolvePanelBorderStyle)(O),[O]),_t=so(),st=O.graph.get("fontFamily"),oa=(0,u.resolveHeadingFontFamily)(O),aa=O.graph.get("textScale"),sa=(0,h.useMemo)(()=>(0,u.resolveHeadingStyle)(O),[O]),ia=(0,h.useMemo)(()=>(0,u.resolveSubtitleStyle)(O),[O]),la=(0,h.useMemo)(()=>(0,u.resolveCaptionStyle)(O),[O]),ca=(0,h.useMemo)(()=>(0,u.resolveSourceStyle)(O),[O]),$t=(0,h.useMemo)(()=>en(L,{},st),[L,st]),it=Fe.borderColor===void 0?0:Fe.borderWidth,Ee=(0,h.useMemo)(()=>({width:Math.max(0,e-2*it),height:Math.max(0,t-2*it)}),[e,t,it]),er=(0,h.useMemo)(()=>ro(b.brandMark.enabled,Ee,b.brandMark.variant),[b.brandMark.enabled,b.brandMark.variant,Ee]),ua=b.brandMark.placement==="footer"?er:"hidden",da=b.brandMark.placement==="header"?er:"hidden",de=(0,h.useMemo)(()=>Pe?{formatted:Pe,size:y.size,position:y.position,innerRadius:m.type==="polar"?m.innerRadius:0}:void 0,[Pe,y.size,y.position,m]),Ne=lc({textMeasurer:na,metrics:$t,overrides:ei()}),tr=(0,h.useMemo)(()=>(0,u.computePanelBorderSizes)(Zt),[Zt]),ke=cc({measurer:Ne,axes:l,numberFormat:g,parsingLocale:v,formattedLegends:Jt,containerSize:Ee,externalMeasurements:I,headline:de,formattingLocale:T,annotations:f,layers:d,coordSystem:m,overflowStrategy:S,panelBorder:tr,padding:(0,h.useMemo)(()=>(0,u.resolveGraphPadding)(O),[O]),margins:(0,h.useMemo)(()=>(0,u.resolveChromeMargins)(O),[O])}),He=(0,h.useMemo)(()=>!ke||!de||!Ne?null:(0,u.resolveHeadlinePlacement)({headline:de,layout:ke.layout,containerSize:Ee,measurer:Ne,itemGap:_t.gap}),[ke,de,Ne,Ee,_t.gap]);if(!ke)return null;const{layout:V,formattedAxes:rr,plotBottomY:ha}=ke,ga=V.footer.height>0;return(0,a.jsx)(fo.Provider,{value:i,children:(0,a.jsx)(Tn,{colorScheme:L,textScale:aa,graphBackground:Fe.background,graphFontFamily:st,headingFontFamily:oa,children:(0,a.jsx)(Is,{metrics:$t,children:(0,a.jsx)(hc,{children:(0,a.jsx)(Oc,{panelRect:V.panel,children:(0,a.jsx)(Ig,{graphChrome:Fe,isEditable:H,mode:i,contentRef:H?Zo:void 0,style:{width:"100%",height:"100%"},children:(0,a.jsxs)(Ul,{intro:j,children:[(0,a.jsx)(_o,{ref:E,headerRect:V.header,mode:i,title:b.title,isTitleVisible:b.isTitleVisible,subtitle:b.subtitle,isSubtitleVisible:b.isSubtitleVisible,headingStyle:sa,subtitleStyle:ia,brandMark:da}),(0,a.jsx)(wg,{formattedAxes:rr,plotRect:V.plot,panelBorder:tr,panelFrameRect:V.panelFrame,panelRect:V.panel,axisRects:V.axes,axisLabelRects:V.axisLabels,shouldAnimateTransitions:w,formattingLocale:T??v,plotBottomY:ha,isFooterChromeReserved:ga,isEditable:H,showAnnotations:F.annotations}),(0,a.jsx)($o,{ref:P,footerRect:V.footer,mode:i,caption:b.caption,isCaptionVisible:b.isCaptionVisible,source:b.source,isSourceVisible:b.isSourceVisible,captionStyle:la,sourceStyle:ca,brandMark:ua}),(0,a.jsx)(ea,{formattedLegends:Jt,rects:V.legends}),Pe&&He&&(0,a.jsx)(ta,{headline:Pe,rect:He.rect,resolvedSize:He.resolvedSize,visibleItemCount:He.visibleItemCount,isInDonutHole:de!==void 0&&(0,u.paintsInDonutHole)(de)}),H&&qt!==null&&(0,a.jsx)(ra,{frameElement:qt,panelRect:V.panel,formattedAxes:rr}),n&&F.tooltips&&(0,a.jsx)(Nl,{})]})})})})})})})},Lg=e=>{const t=(0,h.useContext)(wt);return(0,h.useMemo)(()=>e||(t?{commands:t.commands,undo:t.history.undo,redo:t.history.redo,subscribe:t.store.subscribe,getScene:()=>t.store.getState().scene,getSelection:()=>t.selectionStore.getState().selection,setSelection:r=>t.selectionStore.getState().setSelection(r),subscribeSelection:t.selectionStore.subscribe}:null),[e,t])},Fg=e=>(0,h.useSyncExternalStore)(e.subscribe,e.getScene,e.getScene),Ng=()=>{const{commands:e}=N();return e},Hg=e=>{if(e.altKey||!e.metaKey&&!e.ctrlKey)return null;const t=e.key.toLowerCase();return t==="z"?e.shiftKey?"redo":"undo":t==="y"&&e.ctrlKey&&!e.shiftKey?"redo":null};Object.defineProperty(exports,"ArrowAnnotation",{enumerable:!0,get:function(){return To}});Object.defineProperty(exports,"BUILT_IN_GEOM_RENDERERS",{enumerable:!0,get:function(){return xn}});Object.defineProperty(exports,"BrandMark",{enumerable:!0,get:function(){return Wt}});Object.defineProperty(exports,"CanvasTextMeasurer",{enumerable:!0,get:function(){return nn}});Object.defineProperty(exports,"DEFAULT_FONT_FAMILY",{enumerable:!0,get:function(){return Te}});Object.defineProperty(exports,"DefaultFooter",{enumerable:!0,get:function(){return oo}});Object.defineProperty(exports,"DefaultGrid",{enumerable:!0,get:function(){return Xo}});Object.defineProperty(exports,"DefaultHeader",{enumerable:!0,get:function(){return ao}});Object.defineProperty(exports,"DefaultSwatch",{enumerable:!0,get:function(){return un}});Object.defineProperty(exports,"DefaultTooltip",{enumerable:!0,get:function(){return Dn}});Object.defineProperty(exports,"EditorProvider",{enumerable:!0,get:function(){return Ic}});Object.defineProperty(exports,"GRAPH_MODES",{enumerable:!0,get:function(){return Z}});Object.defineProperty(exports,"GeomRendererResolverProvider",{enumerable:!0,get:function(){return Ds}});Object.defineProperty(exports,"GraphContext",{enumerable:!0,get:function(){return wt}});Object.defineProperty(exports,"GraphRenderer",{enumerable:!0,get:function(){return Tg}});Object.defineProperty(exports,"GraphRendererBody",{enumerable:!0,get:function(){return Jo}});Object.defineProperty(exports,"HoverProvider",{enumerable:!0,get:function(){return Sn}});Object.defineProperty(exports,"Icon",{enumerable:!0,get:function(){return Ut}});Object.defineProperty(exports,"ImageAnnotation",{enumerable:!0,get:function(){return Fo}});Object.defineProperty(exports,"InlineEditorsProvider",{enumerable:!0,get:function(){return _c}});Object.defineProperty(exports,"IntlProvider",{enumerable:!0,get:function(){return Mn}});Object.defineProperty(exports,"LEGEND_OVERFLOW_CONTROL_SELECTOR",{enumerable:!0,get:function(){return Yu}});Object.defineProperty(exports,"MODE_SURFACES",{enumerable:!0,get:function(){return je}});Object.defineProperty(exports,"MinusIcon",{enumerable:!0,get:function(){return lo}});Object.defineProperty(exports,"OverlayPortal",{enumerable:!0,get:function(){return wn}});Object.defineProperty(exports,"PortalThemeProvider",{enumerable:!0,get:function(){return On}});Object.defineProperty(exports,"RICH_TEXT_FONT_FAMILIES",{enumerable:!0,get:function(){return Ln}});Object.defineProperty(exports,"STICKER_ASSETS",{enumerable:!0,get:function(){return Uo}});Object.defineProperty(exports,"ShapeAnnotation",{enumerable:!0,get:function(){return Ho}});Object.defineProperty(exports,"TextAnnotation",{enumerable:!0,get:function(){return ah}});Object.defineProperty(exports,"TextMeasurerProvider",{enumerable:!0,get:function(){return sn}});Object.defineProperty(exports,"ThemeProvider",{enumerable:!0,get:function(){return Tn}});Object.defineProperty(exports,"Z_INDEX",{enumerable:!0,get:function(){return fe}});Object.defineProperty(exports,"__toESM",{enumerable:!0,get:function(){return St}});Object.defineProperty(exports,"assignTextStyleVars",{enumerable:!0,get:function(){return ci}});Object.defineProperty(exports,"canMoveAnnotationOnCanvas",{enumerable:!0,get:function(){return Mo}});Object.defineProperty(exports,"createGeomRendererResolver",{enumerable:!0,get:function(){return bn}});Object.defineProperty(exports,"darkTheme",{enumerable:!0,get:function(){return Bn}});Object.defineProperty(exports,"darkenCss",{enumerable:!0,get:function(){return Xr}});Object.defineProperty(exports,"defineGeomRenderer",{enumerable:!0,get:function(){return Ni}});Object.defineProperty(exports,"dictionaries",{enumerable:!0,get:function(){return et}});Object.defineProperty(exports,"editor",{enumerable:!0,get:function(){return nh}});Object.defineProperty(exports,"isHex",{enumerable:!0,get:function(){return xs}});Object.defineProperty(exports,"isOverlayHosted",{enumerable:!0,get:function(){return yn}});Object.defineProperty(exports,"isValidCssColor",{enumerable:!0,get:function(){return ys}});Object.defineProperty(exports,"lightTheme",{enumerable:!0,get:function(){return Ot}});Object.defineProperty(exports,"lightenCss",{enumerable:!0,get:function(){return ps}});Object.defineProperty(exports,"logDiagnostics",{enumerable:!0,get:function(){return Lr}});Object.defineProperty(exports,"measureArrowEnds",{enumerable:!0,get:function(){return Po}});Object.defineProperty(exports,"measureShapeRegion",{enumerable:!0,get:function(){return Ro}});Object.defineProperty(exports,"measureTextAnnotationBox",{enumerable:!0,get:function(){return Eo}});Object.defineProperty(exports,"previewResizedText",{enumerable:!0,get:function(){return Wo}});Object.defineProperty(exports,"readAnnotationUnderPointer",{enumerable:!0,get:function(){return Dt}});Object.defineProperty(exports,"readDraggedArrowEndpointFor",{enumerable:!0,get:function(){return yc}});Object.defineProperty(exports,"readDraggedDifferenceArrowEndpointFor",{enumerable:!0,get:function(){return Ac}});Object.defineProperty(exports,"readMovedAnnotationFor",{enumerable:!0,get:function(){return pc}});Object.defineProperty(exports,"readResizedShapeFor",{enumerable:!0,get:function(){return jc}});Object.defineProperty(exports,"readResizedTextFor",{enumerable:!0,get:function(){return Rc}});Object.defineProperty(exports,"readRichTextFontId",{enumerable:!0,get:function(){return Fn}});Object.defineProperty(exports,"readStampedEditTargetInStack",{enumerable:!0,get:function(){return Xu}});Object.defineProperty(exports,"readStanding",{enumerable:!0,get:function(){return pe}});Object.defineProperty(exports,"resolveAnnotationChromeGeometry",{enumerable:!0,get:function(){return Id}});Object.defineProperty(exports,"resolveBrandMarkVisual",{enumerable:!0,get:function(){return ro}});Object.defineProperty(exports,"resolveEditTargetAtPoint",{enumerable:!0,get:function(){return kc}});Object.defineProperty(exports,"resolveHistoryStep",{enumerable:!0,get:function(){return Hg}});Object.defineProperty(exports,"resolvePortalContainer",{enumerable:!0,get:function(){return Mt}});Object.defineProperty(exports,"resolveRichTextFontFamily",{enumerable:!0,get:function(){return yt}});Object.defineProperty(exports,"stampAxisEditTarget",{enumerable:!0,get:function(){return zt}});Object.defineProperty(exports,"stampGridEditTarget",{enumerable:!0,get:function(){return vo}});Object.defineProperty(exports,"stampLegendEditTarget",{enumerable:!0,get:function(){return Qt}});Object.defineProperty(exports,"toHtmlTextCss",{enumerable:!0,get:function(){return te}});Object.defineProperty(exports,"useArrowAnnotationStyles",{enumerable:!0,get:function(){return Bo}});Object.defineProperty(exports,"useChromeStyleReaders",{enumerable:!0,get:function(){return M}});Object.defineProperty(exports,"useDebouncedCallback",{enumerable:!0,get:function(){return Rn}});Object.defineProperty(exports,"useDifferenceArrowAnnotationStyles",{enumerable:!0,get:function(){return Nt}});Object.defineProperty(exports,"useDifferenceArrowGeometries",{enumerable:!0,get:function(){return to}});Object.defineProperty(exports,"useEditorState",{enumerable:!0,get:function(){return re}});Object.defineProperty(exports,"useEditorStore",{enumerable:!0,get:function(){return Tc}});Object.defineProperty(exports,"useElementScreenRect",{enumerable:!0,get:function(){return En}});Object.defineProperty(exports,"useGeomHitTest",{enumerable:!0,get:function(){return jn}});Object.defineProperty(exports,"useGeomHover",{enumerable:!0,get:function(){return kn}});Object.defineProperty(exports,"useGraphCommands",{enumerable:!0,get:function(){return Ng}});Object.defineProperty(exports,"useGraphContext",{enumerable:!0,get:function(){return N}});Object.defineProperty(exports,"useGraphHandle",{enumerable:!0,get:function(){return Lg}});Object.defineProperty(exports,"useGraphLocale",{enumerable:!0,get:function(){return Qn}});Object.defineProperty(exports,"useGraphMode",{enumerable:!0,get:function(){return Xt}});Object.defineProperty(exports,"useGraphSelection",{enumerable:!0,get:function(){return Oo}});Object.defineProperty(exports,"useGuidesTakePress",{enumerable:!0,get:function(){return we}});Object.defineProperty(exports,"useHandleScene",{enumerable:!0,get:function(){return Fg}});Object.defineProperty(exports,"useHoverContext",{enumerable:!0,get:function(){return ie}});Object.defineProperty(exports,"useHoverState",{enumerable:!0,get:function(){return me}});Object.defineProperty(exports,"useI18n",{enumerable:!0,get:function(){return It}});Object.defineProperty(exports,"useImageAnnotationStyles",{enumerable:!0,get:function(){return Lo}});Object.defineProperty(exports,"useLatestRef",{enumerable:!0,get:function(){return Qe}});Object.defineProperty(exports,"useMeasuredBoxRef",{enumerable:!0,get:function(){return _n}});Object.defineProperty(exports,"useMeasuredBoxes",{enumerable:!0,get:function(){return Zn}});Object.defineProperty(exports,"useResolvedAnnotations",{enumerable:!0,get:function(){return Re}});Object.defineProperty(exports,"useSceneSelector",{enumerable:!0,get:function(){return C}});Object.defineProperty(exports,"useShapeAnnotationStyles",{enumerable:!0,get:function(){return No}});Object.defineProperty(exports,"useStyleReaderTree",{enumerable:!0,get:function(){return wa}});Object.defineProperty(exports,"useStyleReaders",{enumerable:!0,get:function(){return B}});Object.defineProperty(exports,"useStyleResolver",{enumerable:!0,get:function(){return be}});Object.defineProperty(exports,"useTextAnnotationStyles",{enumerable:!0,get:function(){return Do}});Object.defineProperty(exports,"useTextMeasurer",{enumerable:!0,get:function(){return oe}});Object.defineProperty(exports,"useThemeContext",{enumerable:!0,get:function(){return tt}});
|
package/dist/theme.contract.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require('./theme.contract.css');var a=["canvasDefault","canvasBlue","canvasCyan","canvasGreen","canvasYellow","canvasOrange","canvasRed","canvasPink","canvasPurple","canvasGray","canvasInverse"],r={white:"var(--graphy-white)",black:"var(--graphy-black)",transparent:"var(--graphy-transparent)",gray100:"var(--graphy-gray-100)",gray95:"var(--graphy-gray-95)",gray90:"var(--graphy-gray-90)",gray85:"var(--graphy-gray-85)",gray80:"var(--graphy-gray-80)",gray75:"var(--graphy-gray-75)",gray70:"var(--graphy-gray-70)",gray60:"var(--graphy-gray-60)",gray50:"var(--graphy-gray-50)",gray0:"var(--graphy-gray-0)",grayGradient80:"var(--graphy-gray-gradient-80)",green60:"var(--graphy-green-60)",green50:"var(--graphy-green-50)",red60:"var(--graphy-red-60)",red50:"var(--graphy-red-50)",amber70:"var(--graphy-amber-70)",amber50:"var(--graphy-amber-50)",amber40:"var(--graphy-amber-40)",amber30:"var(--graphy-amber-30)",blue80:"var(--graphy-blue-80)",blue60:"var(--graphy-blue-60)",purple50:"var(--graphy-purple-50)",purple30:"var(--graphy-purple-30)",brand:"var(--graphy-brand)",success:"var(--graphy-success)",warning:"var(--graphy-warning)",alert:"var(--graphy-alert)",textPrimary:"var(--graphy-text-primary)",textSecondary:"var(--graphy-text-secondary)",textDisabled:"var(--graphy-text-disabled)",iconPrimary:"var(--graphy-icon-primary)",iconSecondary:"var(--graphy-icon-secondary)",iconStickerBackground:"var(--graphy-icon-sticker-background)",border100:"var(--graphy-border-100)",border50:"var(--graphy-border-50)",border10:"var(--graphy-border-10)",sunkenBackground:"var(--graphy-sunken-background)",defaultBackground:"var(--graphy-default-background)",raisedBackground:"var(--graphy-raised-background)",overlayBackground:"var(--graphy-overlay-background)",overlayBorderGradient:"var(--graphy-overlay-border-gradient)",graphBackground:"var(--graphy-graph-background)",legendFocusOutlineColor:"var(--graphy-legend-focus-outline-color)",annotationOutlineColor:"var(--graphy-annotation-outline-color)",editMenuTriggerIconColor:"var(--graphy-edit-menu-trigger-icon-color)",tooltipRowGap:"var(--graphy-tooltip-row-gap)",editorControlHeight:"var(--graphy-editor-control-height)",legendSwatchGap:"var(--graphy-legend-swatch-gap)",headlineRowGap:"var(--graphy-headline-row-gap)",canvasDefault:"var(--graphy-canvas-default)",canvasBlue:"var(--graphy-canvas-blue)",canvasCyan:"var(--graphy-canvas-cyan)",canvasGreen:"var(--graphy-canvas-green)",canvasYellow:"var(--graphy-canvas-yellow)",canvasOrange:"var(--graphy-canvas-orange)",canvasRed:"var(--graphy-canvas-red)",canvasPink:"var(--graphy-canvas-pink)",canvasPurple:"var(--graphy-canvas-purple)",canvasGray:"var(--graphy-canvas-gray)",canvasInverse:"var(--graphy-canvas-inverse)",elevationXs:"var(--graphy-elevation-xs)",elevationSm:"var(--graphy-elevation-sm)",elevationMd:"var(--graphy-elevation-md)",elevationLg:"var(--graphy-elevation-lg)",radiiXs:"var(--graphy-radii-xs)",radiiSm:"var(--graphy-radii-sm)",radiiMd:"var(--graphy-radii-md)",radiiLg:"var(--graphy-radii-lg)",spaceXxs:"var(--graphy-space-xxs)",spaceXs:"var(--graphy-space-xs)",spaceSm:"var(--graphy-space-sm)",spaceMd:"var(--graphy-space-md)",spaceLg:"var(--graphy-space-lg)",spaceXl:"var(--graphy-space-xl)",zIndexToolbar:"var(--graphy-z-index-toolbar)",zIndexToolbarTooltip:"var(--graphy-z-index-toolbar-tooltip)",zIndexToolbarPopover:"var(--graphy-z-index-toolbar-popover)",zIndexEditorPopover:"var(--graphy-z-index-editor-popover)",toolbarBackgroundColor:"var(--graphy-toolbar-background-color)",toolbarButtonBackgroundColor:"var(--graphy-toolbar-button-background-color)",toolbarButtonBackgroundColorHovered:"var(--graphy-toolbar-button-background-color-hovered)",toolbarButtonBackgroundColorSelected:"var(--graphy-toolbar-button-background-color-selected)",toolbarSeparatorColor:"var(--graphy-toolbar-separator-color)",fontFamily:"var(--graphy-font-family)",fontFamilyHeading:"var(--graphy-font-family-heading)",fontWeightRegular:"var(--graphy-font-weight-regular)",fontWeightMedium:"var(--graphy-font-weight-medium)",fontWeightSemibold:"var(--graphy-font-weight-semibold)",fontWeightBold:"var(--graphy-font-weight-bold)",fontWeightExtraBold:"var(--graphy-font-weight-extra-bold)",textScale:"var(--graphy-text-scale)",fontSizeXxs:"var(--graphy-font-size-xxs)",fontSizeXs:"var(--graphy-font-size-xs)",fontSizeSm:"var(--graphy-font-size-sm)",fontSizeMd:"var(--graphy-font-size-md)",fontSizeLg:"var(--graphy-font-size-lg)",fontSizeXl:"var(--graphy-font-size-xl)",fontLineHeightXxs:"var(--graphy-font-line-height-xxs)",fontLineHeightXs:"var(--graphy-font-line-height-xs)",fontLineHeightSm:"var(--graphy-font-line-height-sm)",fontLineHeightMd:"var(--graphy-font-line-height-md)",fontLineHeightLg:"var(--graphy-font-line-height-lg)",fontLineHeightXl:"var(--graphy-font-line-height-xl)",fontSizeEditorBody:"var(--graphy-font-size-editor-body)",fontSizeHeadingSm:"var(--graphy-font-size-heading-sm)",fontSizeHeadingMd:"var(--graphy-font-size-heading-md)",fontSizeHeadingLg:"var(--graphy-font-size-heading-lg)",fontLineHeightEditorBody:"var(--graphy-font-line-height-editor-body)",fontLineHeightHeadingSm:"var(--graphy-font-line-height-heading-sm)",fontLineHeightHeadingMd:"var(--graphy-font-line-height-heading-md)",fontLineHeightHeadingLg:"var(--graphy-font-line-height-heading-lg)",fontButton:"var(--graphy-font-button)",fontInput:"var(--graphy-font-input)",fontInputLabel:"var(--graphy-font-input-label)",fontSelectLabel:"var(--graphy-font-select-label)",fontSelectDescription:"var(--graphy-font-select-description)",fontColorSelectLabel:"var(--graphy-font-color-select-label)",fontMenuTitle:"var(--graphy-font-menu-title)",fontMenuGroupTitle:"var(--graphy-font-menu-group-title)",fontMenuItemLabel:"var(--graphy-font-menu-item-label)",fontMenuItemLabelSecondary:"var(--graphy-font-menu-item-label-secondary)",fontUITooltip:"var(--graphy-font-uitooltip)",fontUITooltipSecondary:"var(--graphy-font-uitooltip-secondary)",fontErrorBoundaryTitle:"var(--graphy-font-error-boundary-title)",fontErrorBoundaryMessage:"var(--graphy-font-error-boundary-message)",fontTableCell:"var(--graphy-font-table-cell)",fontTableHeaderCell:"var(--graphy-font-table-header-cell)",fontSourceLabel:"var(--graphy-font-source-label)",fontSourceLink:"var(--graphy-font-source-link)",fontTextEditorH1:"var(--graphy-font-text-editor-h1)",fontTextEditorH2:"var(--graphy-font-text-editor-h2)",fontTextEditorH3:"var(--graphy-font-text-editor-h3)",fontTextEditorH6:"var(--graphy-font-text-editor-h6)",fontTextEditorBody:"var(--graphy-font-text-editor-body)",fontTextEditorLink:"var(--graphy-font-text-editor-link)",fontHighlightModeTitle:"var(--graphy-font-highlight-mode-title)",fontHighlightModeSubtitle:"var(--graphy-font-highlight-mode-subtitle)",fontEditorControlLabel:"var(--graphy-font-editor-control-label)",fontEditorControlValue:"var(--graphy-font-editor-control-value)",fontEditorSectionTitle:"var(--graphy-font-editor-section-title)",fontEditorCaption:"var(--graphy-font-editor-caption)"};Object.defineProperty(exports,"CANVAS_COLOR_KEYS",{enumerable:!0,get:function(){return a}});Object.defineProperty(exports,"vars",{enumerable:!0,get:function(){return r}});
|