/**
 * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0.
 * Original file: /npm/@observablehq/plot@0.6.17/src/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
import{ascending as t,descending as e,timeSecond as n,timeMinute as r,timeHour as o,timeDay as i,timeMonday as a,timeTuesday as l,timeWednesday as s,timeThursday as c,timeFriday as u,timeSaturday as f,timeSunday as h,timeWeek as d,timeMonth as p,timeYear as y,utcSecond as m,utcMinute as g,utcHour as v,unixDay as x,utcMonday as w,utcTuesday as b,utcWednesday as k,utcThursday as $,utcFriday as M,utcSaturday as A,utcSunday as L,utcWeek as E,utcMonth as z,utcYear as S,bisector as O,max as N,pairs as C,timeFormat as T,utcFormat as R,range as I,quantile as W,symbolAsterisk as j,symbolCircle as F,symbolCross as B,symbolDiamond as D,symbolDiamond2 as q,symbolPlus as _,symbolSquare as P,symbolSquare2 as V,symbolStar as H,symbolTimes as U,symbolTriangle as Y,symbolTriangle2 as G,symbolWye as X,randomLcg as Z,group as J,sort as K,rollup as Q,sum as tt,InternSet as et,mode as nt,variance as rt,median as ot,mean as at,maxIndex as lt,minIndex as st,min as ct,deviation as ut,rollups as ft,quantize as ht,schemeAccent as dt,schemeCategory10 as pt,schemeDark2 as yt,schemeObservable10 as mt,schemePaired as gt,schemePastel1 as vt,schemePastel2 as xt,schemeSet1 as wt,schemeSet2 as bt,schemeSet3 as kt,schemeTableau10 as $t,interpolateBrBG as Mt,schemeBrBG as At,interpolatePRGn as Lt,schemePRGn as Et,interpolatePiYG as zt,schemePiYG as St,interpolatePuOr as Ot,schemePuOr as Nt,interpolateRdBu as Ct,schemeRdBu as Tt,interpolateRdGy as Rt,schemeRdGy as It,interpolateRdYlBu as Wt,schemeRdYlBu as jt,interpolateRdYlGn as Ft,schemeRdYlGn as Bt,interpolateSpectral as Dt,schemeSpectral as qt,interpolateBlues as _t,schemeBlues as Pt,interpolateGreens as Vt,schemeGreens as Ht,interpolateGreys as Ut,schemeGreys as Yt,interpolateOranges as Gt,schemeOranges as Xt,interpolatePurples as Zt,schemePurples as Jt,interpolateReds as Kt,schemeReds as Qt,interpolateTurbo as te,interpolateViridis as ee,interpolateMagma as ne,interpolateInferno as re,interpolatePlasma as oe,interpolateCividis as ie,interpolateCubehelixDefault as ae,interpolateWarm as le,interpolateCool as se,interpolateBuGn as ce,schemeBuGn as ue,interpolateBuPu as fe,schemeBuPu as he,interpolateGnBu as de,schemeGnBu as pe,interpolateOrRd as ye,schemeOrRd as me,interpolatePuBu as ge,schemePuBu as ve,interpolatePuBuGn as xe,schemePuBuGn as we,interpolatePuRd as be,schemePuRd as ke,interpolateRdPu as $e,schemeRdPu as Me,interpolateYlGn as Ae,schemeYlGn as Le,interpolateYlGnBu as Ee,schemeYlGnBu as ze,interpolateYlOrBr as Se,schemeYlOrBr as Oe,interpolateYlOrRd as Ne,schemeYlOrRd as Ce,interpolateRainbow as Te,interpolateSinebow as Re,scaleLinear as Ie,scalePow as We,scaleLog as je,scaleSymlog as Fe,scaleQuantile as Be,extent as De,ticks as qe,interpolateNumber as _e,reverse as Pe,scaleThreshold as Ve,scaleIdentity as He,piecewise as Ue,interpolateRgb as Ye,interpolateRound as Ge,interpolateHsl as Xe,interpolateHcl as Ze,interpolateLab as Je,scaleDiverging as Ke,scaleDivergingPow as Qe,scaleDivergingLog as tn,scaleDivergingSymlog as en,scaleTime as nn,scaleUtc as rn,scaleImplicit as on,scaleOrdinal as an,scalePoint as ln,scaleBand as sn,symbolsStroke as cn,symbolsFill as un,cross as fn,InternMap as hn,geoTransform as dn,geoPath as pn,geoClipRectangle as yn,geoStream as mn,geoTransverseMercator as gn,geoStereographic as vn,geoOrthographic as xn,geoMercator as wn,geoGnomonic as bn,geoEquirectangular as kn,geoEqualEarth as $n,geoAzimuthalEquidistant as Mn,geoAzimuthalEqualArea as An,geoAlbersUsa as Ln,geoConicEquidistant as En,geoConicEqualArea as zn,geoConicConformal as Sn,geoAlbers as On,select as Nn,creator as Cn,namespaces as Tn,pointer as Rn,format as In,axisBottom as Wn,pathRound as jn,rgb as Fn,cumsum as Bn,groupSort as Dn,greatest as qn,curveLinear as _n,curveBasis as Pn,curveBasisClosed as Vn,curveBasisOpen as Hn,curveBundle as Un,curveBumpX as Yn,curveBumpY as Gn,curveCardinal as Xn,curveCardinalClosed as Zn,curveCardinalOpen as Jn,curveCatmullRom as Kn,curveCatmullRomClosed as Qn,curveCatmullRomOpen as tr,curveLinearClosed as er,curveMonotoneX as nr,curveMonotoneY as rr,curveNatural as or,curveStep as ir,curveStepAfter as ar,curveStepBefore as lr,thresholdSturges as sr,thresholdScott as cr,thresholdFreedmanDiaconis as ur,utcTickInterval as fr,tickIncrement as hr,bisect as dr,area as pr,line as yr,rank as mr,count as gr,blurImage as vr,Delaunay as xr,blur2 as wr,contours as br,nice as kr,contourDensity as $r,geoCentroid as Mr,geoGraticule10 as Ar,stratify as Lr,tree as Er,cluster as zr,least as Sr}from"/npm/d3@7.9.0/+esm";import{parse as Or,format as Nr}from"/npm/isoformat@0.2.1/+esm";import Cr from"/npm/interval-tree-1d@1.0.4/+esm";function Tr(t){return null!=t&&!Number.isNaN(t)}function Rr(e,n){return+Tr(n)-+Tr(e)||t(e,n)}function Ir(t,n){return+Tr(n)-+Tr(t)||e(t,n)}function Wr(t){return null!=t&&""!=`${t}`}function jr(t){return isFinite(t)?t:NaN}function Fr(t){return t>0&&isFinite(t)?t:NaN}function Br(t){return t<0&&isFinite(t)?t:NaN}function Dr(t){if(null==t)return;const n=t[0],r=t[t.length-1];return e(n,r)}const qr=1e3,_r=6e4,Pr=36e5,Vr=864e5,Hr=6048e5,Ur=2592e6,Yr=31536e6,Gr=[["millisecond",1],["2 milliseconds",2],["5 milliseconds",5],["10 milliseconds",10],["20 milliseconds",20],["50 milliseconds",50],["100 milliseconds",100],["200 milliseconds",200],["500 milliseconds",500],["second",qr],["5 seconds",5e3],["15 seconds",15e3],["30 seconds",3e4],["minute",_r],["5 minutes",3e5],["15 minutes",9e5],["30 minutes",18e5],["hour",Pr],["3 hours",108e5],["6 hours",216e5],["12 hours",432e5],["day",Vr],["2 days",1728e5],["week",Hr],["2 weeks",12096e5],["month",Ur],["3 months",7776e6],["6 months",15552e6],["year",Yr],["2 years",63072e6],["5 years",15768e7],["10 years",31536e7],["20 years",63072e7],["50 years",15768e8],["100 years",31536e8]],Xr=new Map([["second",qr],["minute",_r],["hour",Pr],["day",Vr],["monday",Hr],["tuesday",Hr],["wednesday",Hr],["thursday",Hr],["friday",Hr],["saturday",Hr],["sunday",Hr],["week",Hr],["month",Ur],["year",Yr]]),Zr=new Map([["second",n],["minute",r],["hour",o],["day",i],["monday",a],["tuesday",l],["wednesday",s],["thursday",c],["friday",u],["saturday",f],["sunday",h],["week",d],["month",p],["year",y]]),Jr=new Map([["second",m],["minute",g],["hour",v],["day",x],["monday",w],["tuesday",b],["wednesday",k],["thursday",$],["friday",M],["saturday",A],["sunday",L],["week",E],["month",z],["year",S]]),Kr=Symbol("intervalDuration"),Qr=Symbol("intervalType");for(const[t,e]of Zr)e[Kr]=Xr.get(t),e[Qr]="time";for(const[t,e]of Jr)e[Kr]=Xr.get(t),e[Qr]="utc";const to=[["year",S,"utc"],["month",z,"utc"],["day",x,"utc",15552e6],["hour",v,"utc",2592e5],["minute",g,"utc",216e5],["second",m,"utc",18e5]],eo=[["year",y,"time"],["month",p,"time"],["day",i,"time",15552e6],["hour",o,"time",2592e5],["minute",r,"time",216e5],["second",n,"time",18e5]],no=[to[0],eo[0],to[1],eo[1],to[2],eo[2],...to.slice(3)];function ro(t){let e=`${t}`.toLowerCase();e.endsWith("s")&&(e=e.slice(0,-1));let n=1;const r=/^(?:(\d+)\s+)/.exec(e);switch(r&&(e=e.slice(r[0].length),n=+r[1]),e){case"quarter":e="month",n*=3;break;case"half":e="month",n*=6}let o=Jr.get(e);if(!o)throw new Error(`unknown interval: ${t}`);if(n>1&&!o.every)throw new Error(`non-periodic interval: ${e}`);return[e,n]}function oo(t){return ao(ro(t),"time")}function io(t){return ao(ro(t),"utc")}function ao([t,e],n){let r=("time"===n?Zr:Jr).get(t);return e>1&&(r=r.every(e),r[Kr]=Xr.get(t)*e,r[Qr]=n),r}function lo(t,e){if(!(e>1))return;const n=t[Kr];if(!Gr.some((([,t])=>t===n)))return;if(n%Vr==0&&Vr<n&&n<Ur)return;const[r]=Gr[O((([,t])=>Math.log(t))).center(Gr,Math.log(n*e))];return("time"===t[Qr]?oo:io)(r)}function so(t,e,n){const r="time"===e?T:R;if(null==n)return r("year"===t?"%Y":"month"===t?"%Y-%m":"day"===t?"%Y-%m-%d":"hour"===t||"minute"===t?"%Y-%m-%dT%H:%M":"second"===t?"%Y-%m-%dT%H:%M:%S":"%Y-%m-%dT%H:%M:%S.%L");const o=function(t){return"left"===t||"right"===t?(t,e)=>`\n${t}\n${e}`:"top"===t?(t,e)=>`${e}\n${t}`:(t,e)=>`${t}\n${e}`}(n);switch(t){case"millisecond":return uo(r(".%L"),r(":%M:%S"),o);case"second":return uo(r(":%S"),r("%-I:%M"),o);case"minute":return uo(r("%-I:%M"),r("%p"),o);case"hour":return uo(r("%-I %p"),r("%b %-d"),o);case"day":return uo(r("%-d"),r("%b"),o);case"month":return uo(r("%b"),r("%Y"),o);case"year":return r("%Y")}throw new Error("unable to format time ticks")}function co(t,e,n){const r=N(C(e,((t,e)=>Math.abs(e-t))));if(r<1e3)return so("millisecond","utc",n);for(const[o,i,a,l]of function(t){return"time"===t?eo:"utc"===t?to:no}(t)){if(r>l)break;if("hour"===o&&!r)break;if(e.every((t=>i.floor(t)>=t)))return so(o,a,n)}}function uo(t,e,n){return(r,o,i)=>{const a=t(r,o),l=e(r,o),s=o-Dr(i);return o!==s&&void 0!==i[s]&&l===e(i[s],s)?a:n(a,l)}}const fo=Object.getPrototypeOf(Uint8Array),ho=Object.prototype.toString;function po(t){return t instanceof Array||t instanceof fo}function yo(t){return t instanceof fo&&!function(t){return t instanceof BigInt64Array||t instanceof BigUint64Array}(t)}function mo(t){return t?.prototype instanceof fo&&!function(t){return t===BigInt64Array||t===BigUint64Array}(t)}const go=Symbol("reindex");function vo(t,e,n){const r=typeof e;return"string"===r?Di(t)?bo(t.getChild(e),n):xo(t,Mo(e),n):"function"===r?xo(t,e,n):"number"===r||e instanceof Date||"boolean"===r?Yo(t,Ro(e),n):"function"==typeof e?.transform?wo(e.transform(t),n):function(t,e){return null!=t&&e?li(t,e):t}(wo(e,n),t?.[go])}function xo(t,e,n){return Yo(t,mo(n)?(t,n)=>jo(e(t,n)):e,n)}function wo(t,e){return void 0===e?Ho(t):qi(t)?bo(t,e):t instanceof e?t:e.from(t,mo(e)&&!yo(t)?jo:void 0)}function bo(t,e){return null==t?t:void 0!==e&&e!==Array||!function(t){return t&&(8===t.typeId||10===t.typeId)&&1===t.unit}(t.type)?wo(ko(t),e):Fo(ko(t))}function ko(t){return t.nullCount?t.toJSON():t.toArray()}const $o=[null],Mo=t=>e=>{const n=e[t];return void 0===n&&"Feature"===e.type?e.properties?.[t]:n},Ao={transform:ai},Lo={transform:t=>t},Eo=()=>1,zo=()=>!0,So=t=>null==t?t:`${t}`,Oo=t=>null==t?t:+t,No=t=>t?t[0]:void 0,Co=t=>t?t[1]:void 0,To=t=>t?t[2]:void 0,Ro=t=>()=>t;function Io(t){const e=+`${t}`.slice(1)/100;return(t,n)=>W(t,e,n)}function Wo(t){return yo(t)?t:Yo(t,jo,Float64Array)}function jo(t){return null==t?NaN:Number(t)}function Fo(t){return Yo(t,Bo)}function Bo(t){return t instanceof Date&&!isNaN(t)?t:"string"==typeof t?Or(t):null==t||isNaN(t=Number(t))?void 0:new Date(t)}function Do(t,e){return void 0===t&&(t=e),null===t?[void 0,"none"]:Ci(t)?[void 0,t]:[t,void 0]}function qo(t,e){return void 0===t&&(t=e),null===t||"number"==typeof t?[void 0,t]:[t,void 0]}function _o(t,e,n){if(null!=t)return Po(t,e,n)}function Po(t,e,n){const r=`${t}`.toLowerCase();if(!n.includes(r))throw new Error(`invalid ${e}: ${t}`);return r}function Vo(t){return Di(t)?t:Ho(t)}function Ho(t){if(null==t||po(t))return t;if(qi(t))return bo(t);if(Uo(t))switch(t.type){case"FeatureCollection":return t.features;case"GeometryCollection":return t.geometries;default:return[t]}return Array.from(t)}function Uo(t){switch(t?.type){case"FeatureCollection":case"GeometryCollection":case"Feature":case"LineString":case"MultiLineString":case"MultiPoint":case"MultiPolygon":case"Point":case"Polygon":case"Sphere":return!0;default:return!1}}function Yo(t,e,n=Array){return null==t?t:t instanceof n?t.map(e):n.from(t,e)}function Go(t,e=Array){return t instanceof e?t.slice():e.from(t)}function Xo({x:t,x1:e,x2:n}){return void 0!==t||void 0!==e||void 0!==n}function Zo({y:t,y1:e,y2:n}){return void 0!==t||void 0!==e||void 0!==n}function Jo(t){return Xo(t)||Zo(t)||void 0!==t.interval}function Ko(t){return t?.toString===ho}function Qo(t){return Ko(t)&&(void 0!==t.type||void 0!==t.domain)}function ti(t){return Ko(t)&&"function"!=typeof t.transform}function ei(t){return ti(t)&&void 0===t.value&&void 0===t.channel}function ni(t,e,n,r=Lo){return void 0===e&&void 0===n?(e=0,n=void 0===t?r:t):void 0===e?e=void 0===t?0:t:void 0===n&&(n=void 0===t?0:t),[e,n]}function ri(t,e){return void 0===t&&void 0===e?[No,Co]:[t,e]}function oi({z:t,fill:e,stroke:n}={}){return void 0===t&&([t]=Do(e)),void 0===t&&([t]=Do(n)),t}function ii(t){return po(t)?t.length:t?.numRows}function ai(t){const e=ii(t),n=new Uint32Array(e);for(let t=0;t<e;++t)n[t]=t;return n}function li(t,e){return po(t)?Yo(e,(e=>t[e]),t.constructor):Yo(e,(e=>t.at(e)))}function si(t){return 1===t.length?(e,n)=>t(li(n,e)):t}function ci(t,e,n){return t.subarray?t.subarray(e,n):t.slice(e,n)}function ui(t){return null!==t&&"object"==typeof t?t.valueOf():t}function fi(t,e){if(void 0!==e[t])return e[t];switch(t){case"x1":case"x2":t="x";break;case"y1":case"y2":t="y"}return e[t]}function hi(t){let e;return[{transform:()=>e,label:pi(t)},t=>e=t]}function di(t){return null==t?[t]:hi(t)}function pi(t,e){return"string"==typeof t?t:t&&void 0!==t.label?t.label:e}function yi(t,e){return{transform(n){const r=t.transform(n),o=e.transform(n);return Li(r)||Li(o)?Yo(r,((t,e)=>new Date((+r[e]+ +o[e])/2))):Yo(r,((t,e)=>(+r[e]+ +o[e])/2),Float64Array)},label:t.label}}function mi(t,e){const n=gi(e?.interval,e?.type);return n?Yo(t,n):t}function gi(t,e){const n=vi(t,e);return n&&(t=>Tr(t)?n.floor(t):t)}function vi(t,e){if(null!=t){if("number"==typeof t)return xi(t);if("string"==typeof t)return("time"===e?oo:io)(t);if("function"!=typeof t.floor)throw new Error("invalid interval; missing floor method");if("function"!=typeof t.offset)throw new Error("invalid interval; missing offset method");return t}}function xi(t){0<(t=+t)&&t<1&&Number.isInteger(1/t)&&(t=-1/t);const e=Math.abs(t);return t<0?{floor:t=>Math.floor(t*e)/e,offset:(t,n=1)=>(t*e+Math.floor(n))/e,range:(t,n)=>I(Math.ceil(t*e),n*e).map((t=>t/e))}:{floor:t=>Math.floor(t/e)*e,offset:(t,n=1)=>t+e*Math.floor(n),range:(t,n)=>I(Math.ceil(t/e),n/e).map((t=>t*e))}}function wi(t,e){if((t=vi(t,e))&&"function"!=typeof t.range)throw new Error("invalid interval: missing range method");return t}function bi(t){return"function"==typeof t?.range}function ki(t){return void 0===t||ti(t)?t:{value:t}}function $i(t){return t&&"function"==typeof t[Symbol.iterator]}function Mi(t){for(const e of t)if(null!=e)return"object"!=typeof e||e instanceof Date}function Ai(t){for(const e of t){if(null==e)continue;const t=typeof e;return"string"===t||"boolean"===t}}function Li(t){for(const e of t)if(null!=e)return e instanceof Date}function Ei(t){for(const e of t)if(null!=e)return"string"==typeof e&&isNaN(e)&&Or(e)}function zi(t){for(const e of t)if(null!=e){if("string"!=typeof e)return!1;if(e.trim())return!isNaN(e)}}function Si(t){for(const e of t)if(null!=e)return"number"==typeof e}function Oi(t,e){let n;for(const r of t)if(null!=r){if(!e(r))return!1;n=!0}return n}const Ni=new Set("none,currentcolor,transparent,aliceblue,antiquewhite,aqua,aquamarine,azure,beige,bisque,black,blanchedalmond,blue,blueviolet,brown,burlywood,cadetblue,chartreuse,chocolate,coral,cornflowerblue,cornsilk,crimson,cyan,darkblue,darkcyan,darkgoldenrod,darkgray,darkgreen,darkgrey,darkkhaki,darkmagenta,darkolivegreen,darkorange,darkorchid,darkred,darksalmon,darkseagreen,darkslateblue,darkslategray,darkslategrey,darkturquoise,darkviolet,deeppink,deepskyblue,dimgray,dimgrey,dodgerblue,firebrick,floralwhite,forestgreen,fuchsia,gainsboro,ghostwhite,gold,goldenrod,gray,green,greenyellow,grey,honeydew,hotpink,indianred,indigo,ivory,khaki,lavender,lavenderblush,lawngreen,lemonchiffon,lightblue,lightcoral,lightcyan,lightgoldenrodyellow,lightgray,lightgreen,lightgrey,lightpink,lightsalmon,lightseagreen,lightskyblue,lightslategray,lightslategrey,lightsteelblue,lightyellow,lime,limegreen,linen,magenta,maroon,mediumaquamarine,mediumblue,mediumorchid,mediumpurple,mediumseagreen,mediumslateblue,mediumspringgreen,mediumturquoise,mediumvioletred,midnightblue,mintcream,mistyrose,moccasin,navajowhite,navy,oldlace,olive,olivedrab,orange,orangered,orchid,palegoldenrod,palegreen,paleturquoise,palevioletred,papayawhip,peachpuff,peru,pink,plum,powderblue,purple,rebeccapurple,red,rosybrown,royalblue,saddlebrown,salmon,sandybrown,seagreen,seashell,sienna,silver,skyblue,slateblue,slategray,slategrey,snow,springgreen,steelblue,tan,teal,thistle,tomato,turquoise,violet,wheat,white,whitesmoke,yellow".split(","));function Ci(t){return"string"==typeof t&&(t=t.toLowerCase().trim(),/^#[0-9a-f]{3,8}$/.test(t)||/^(?:url|var|rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color|color-mix)\(.*\)$/.test(t)||Ni.has(t))}function Ti(t){return"number"==typeof t&&(0<=t&&t<=1||isNaN(t))}function Ri(t){return null==t||Ii(t)}function Ii(t){return/^\s*none\s*$/i.test(t)}function Wi(t,e){return _o(t,e,["middle","top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"])}function ji(t="middle"){return Wi(t,"frameAnchor")}function Fi(t){return $i(t)?function(t){console.warn("named iterables are deprecated; please use an object instead");const e=new Set;return Object.fromEntries(Array.from(t,(t=>{const{name:n}=t;if(null==n)throw new Error("missing name");const r=`${n}`;if("__proto__"===r)throw new Error(`illegal name: ${r}`);if(e.has(r))throw new Error(`duplicate name: ${r}`);return e.add(r),[n,t]})))}(t):t}function Bi(t){return!0===t?t="frame":!1===t?t=null:Uo(t)||null==t||"sphere"===(t=Po(t,"clip",["frame","sphere"]))&&(t={type:"Sphere"}),t}function Di(t){return t&&"function"==typeof t.getChild&&"function"==typeof t.toArray&&t.schema&&Array.isArray(t.schema.fields)}function qi(t){return t&&"function"==typeof t.toArray&&t.type}const _i=Symbol("position"),Pi=Symbol("color"),Vi=Symbol("radius"),Hi=Symbol("length"),Ui=Symbol("opacity"),Yi=Symbol("symbol"),Gi=Symbol("projection"),Xi=new Map([["x",_i],["y",_i],["fx",_i],["fy",_i],["r",Vi],["color",Pi],["opacity",Ui],["symbol",Yi],["length",Hi],["projection",Gi]]);const Zi=Math.sqrt(3),Ji=2/Zi,Ki=new Map([["asterisk",j],["circle",F],["cross",B],["diamond",D],["diamond2",q],["hexagon",{draw(t,e){const n=Math.sqrt(e/Math.PI),r=n*Ji,o=r/2;t.moveTo(0,r),t.lineTo(n,o),t.lineTo(n,-o),t.lineTo(0,-r),t.lineTo(-n,-o),t.lineTo(-n,o),t.closePath()}}],["plus",_],["square",P],["square2",V],["star",H],["times",U],["triangle",Y],["triangle2",G],["wye",X]]);function Qi(t){return t&&"function"==typeof t.draw}function ta(t){return!!Qi(t)||"string"==typeof t&&Ki.has(t.toLowerCase())}function ea(t){if(null==t||Qi(t))return t;const e=Ki.get(`${t}`.toLowerCase());if(e)return e;throw new Error(`invalid symbol: ${t}`)}function na({filter:t,sort:e,reverse:n,transform:r,initializer:o,...i}={},a){if(void 0===r&&(null!=t&&(r=sa(t)),null==e||ei(e)||(r=oa(r,da(e))),n&&(r=oa(r,ua))),null!=a&&null!=o)throw new Error("transforms cannot be applied after initializers");return{...i,...(null===e||ei(e))&&{sort:e},transform:oa(r,a)}}function ra({filter:t,sort:e,reverse:n,initializer:r,...o}={},i){return void 0===r&&(null!=t&&(r=sa(t)),null==e||ei(e)||(r=ia(r,da(e))),n&&(r=ia(r,ua))),{...o,...(null===e||ei(e))&&{sort:e},initializer:ia(r,i)}}function oa(t,e){return null==t?null===e?void 0:e:null==e?null===t?void 0:t:function(n,r,o){return({data:n,facets:r}=t.call(this,n,r,o)),e.call(this,Vo(n),r,o)}}function ia(t,e){return null==t?null===e?void 0:e:null==e?null===t?void 0:t:function(n,r,o,...i){let a,l,s,c,u,f;return({data:l=n,facets:s=r,channels:a}=t.call(this,n,r,o,...i)),({data:u=l,facets:f=s,channels:c}=e.call(this,l,s,{...o,...a},...i)),{data:u,facets:f,channels:{...a,...c}}}}function aa(t,e){return(null!=t.initializer?ra:na)(t,e)}function la(t,e){return aa(e,sa(t))}function sa(t){return(e,n)=>{const r=vo(e,t);return{data:e,facets:n.map((t=>t.filter((t=>r[t]))))}}}function ca({sort:t,...e}={}){return{...aa(e,ua),sort:ei(t)?t:null}}function ua(t,e){return{data:t,facets:e.map((t=>t.slice().reverse()))}}function fa({seed:t,sort:e,...n}={}){return{...aa(n,ya(null==t?Math.random:Z(t))),sort:ei(e)?e:null}}function ha(t,{sort:e,...n}={}){return{...(ti(t)&&void 0!==t.channel?ra:aa)(n,da(t)),sort:ei(e)?e:null}}function da(t){return("function"==typeof t&&1!==t.length?pa:ya)(t)}function pa(t){return(e,n)=>{const r=po(e)?(n,r)=>t(e[n],e[r]):(n,r)=>t(e.get(n),e.get(r));return{data:e,facets:n.map((t=>t.slice().sort(r)))}}}function ya(t){let e,n;({channel:e,value:t,order:n}={...ki(t)});const r=e?.startsWith("-");if(r&&(e=e.slice(1)),void 0===n&&(n=r?Ir:Rr),"function"!=typeof n)switch(`${n}`.toLowerCase()){case"ascending":n=Rr;break;case"descending":n=Ir;break;default:throw new Error(`invalid order: ${n}`)}return(r,o,i)=>{let a;if(void 0===e)a=vo(r,t);else{if(void 0===i)throw new Error("channel sort requires an initializer");if(a=i[e],!a)return{};a=a.value}const l=(t,e)=>n(a[t],a[e]);return{data:r,facets:o.map((t=>t.slice().sort(l)))}}}function ma(t,e){return wa(null,null,t,e)}function ga(t={y:"count"},e={}){const{x:n=Lo}=e;if(null==n)throw new Error("missing channel: x");return wa(n,null,t,e)}function va(t={x:"count"},e={}){const{y:n=Lo}=e;if(null==n)throw new Error("missing channel: y");return wa(null,n,t,e)}function xa(t={fill:"count"},e={}){let{x:n,y:r}=e;if([n,r]=ri(n,r),null==n)throw new Error("missing channel: x");if(null==r)throw new Error("missing channel: y");return wa(n,r,t,e)}function wa(t,e,{data:n=ja,filter:r,sort:o,reverse:i,...a}={},l={}){a=za(a,l),n=Na(n,Lo),o=null==o?void 0:Sa("sort",o,l),r=null==r?void 0:Oa("filter",r,l);const[s,c]=di(t),[u,f]=di(e),{z:h,fill:d,stroke:p,x1:y,x2:m,y1:g,y2:v,...x}=l,[w,b]=di(h),[k]=Do(d),[$]=Do(p),[M,A]=di(k),[L,E]=di($);return{..."z"in l&&{z:w||h},..."fill"in l&&{fill:M||d},..."stroke"in l&&{stroke:L||p},...na(x,((l,s,u)=>{const d=mi(vo(l,t),u?.x),p=mi(vo(l,e),u?.y),y=vo(l,h),m=vo(l,k),g=vo(l,$),v=Ta(a,{z:y,fill:m,stroke:g}),x=[],w=[],M=d&&c([]),L=p&&f([]),z=y&&b([]),S=m&&A([]),O=g&&E([]);let N=0;for(const t of a)t.initialize(l);o&&o.initialize(l),r&&r.initialize(l);for(const t of s){const e=[];for(const e of a)e.scope("facet",t);o&&o.scope("facet",t),r&&r.scope("facet",t);for(const[i,s]of Aa(t,v))for(const[t,c]of Aa(s,p))for(const[s,u]of Aa(c,d)){const c={data:l};if(d&&(c.x=s),p&&(c.y=t),v&&(c.z=i),!r||r.reduce(u,c)){e.push(N++),w.push(n.reduceIndex(u,l,c)),d&&M.push(s),p&&L.push(t),y&&z.push(v===y?i:y[u[0]]),m&&S.push(v===m?i:m[u[0]]),g&&O.push(v===g?i:g[u[0]]);for(const t of a)t.reduce(u,c);o&&o.reduce(u,c)}}x.push(e)}return Ra(x,o,i),{data:w,facets:x}})),...!ba(a,"x")&&(s?{x:s}:{x1:y,x2:m}),...!ba(a,"y")&&(u?{y:u}:{y1:g,y2:v}),...Object.fromEntries(a.map((({name:t,output:e})=>[t,e])))}}function ba(t,...e){for(const{name:n}of t)if(e.includes(n))return!0;return!1}function ka(t,e,n=$a){const r=Object.entries(t);return null!=e.title&&void 0===t.title&&r.push(["title",Ba]),null!=e.href&&void 0===t.href&&r.push(["href",Fa]),r.filter((([,t])=>void 0!==t)).map((([t,r])=>null===r?function(t){return{name:t,initialize(){},scope(){},reduce(){}}}(t):n(t,r,e)))}function $a(t,e,n,r=Ma){let o;Ko(e)&&"reduce"in e&&(o=e.scale,e=e.reduce);const i=r(t,e,n),[a,l]=hi(i.label);let s;return{name:t,output:void 0===o?a:{value:a,scale:o},initialize(t){i.initialize(t),s=l([])},scope(t,e){i.scope(t,e)},reduce(t,e){s.push(i.reduce(t,e))}}}function Ma(t,e,n,r=La){const o=fi(t,n),i=r(e,o);let a,l;return{label:pi(i===qa?null:o,i.label),initialize(t){a=void 0===o?t:vo(t,o),"data"===i.scope&&(l=i.reduceIndex(ai(t),a))},scope(t,e){i.scope===t&&(l=i.reduceIndex(e,a))},reduce:(t,e)=>null==i.scope?i.reduceIndex(t,a,e):i.reduceIndex(t,a,l,e)}}function Aa(t,e){return e?J(t,(t=>e[t])):[[,t]]}function La(t,e,n=Ea){if(null==t)return n(t);if("function"==typeof t.reduceIndex)return t;if("function"==typeof t.reduce&&Ko(t))return function(t){return console.warn("deprecated reduce interface; implement reduceIndex instead."),{...t,reduceIndex:t.reduce.bind(t)}}(t);if("function"==typeof t)return r=t,{reduceIndex:(t,e,n)=>r(li(e,t),n)};var r;if(/^p\d{2}$/i.test(t))return Ia(Io(t));switch(`${t}`.toLowerCase()){case"first":return Fa;case"last":return Da;case"identity":return ja;case"count":return qa;case"distinct":return _a;case"sum":return null==e?qa:Pa;case"proportion":return Va(e,"data");case"proportion-facet":return Va(e,"facet");case"deviation":return Ia(ut);case"min":return Ia(ct);case"min-index":return Ia(st);case"max":return Ia(N);case"max-index":return Ia(lt);case"mean":return Wa(at);case"median":return Wa(ot);case"variance":return Ia(rt);case"mode":return Ia(nt)}return n(t)}function Ea(t){throw new Error(`invalid reduce: ${t}`)}function za(t,e){return ka(t,e,Sa)}function Sa(t,e,n){return $a(t,e,n,Oa)}function Oa(t,e,n){return Ma(t,e,n,Na)}function Na(t,e){return La(t,e,Ca)}function Ca(t){switch(`${t}`.toLowerCase()){case"x":return Ha;case"y":return Ua;case"z":return Ya}throw new Error(`invalid group reduce: ${t}`)}function Ta(t,e){for(const n in e){const r=e[n];if(void 0!==r&&!t.some((t=>t.name===n)))return r}}function Ra(t,e,n){if(e){const n=e.output.transform(),r=(t,e)=>Rr(n[t],n[e]);t.forEach((t=>t.sort(r)))}n&&t.forEach((t=>t.reverse()))}function Ia(t){return{reduceIndex:(e,n)=>t(e,(t=>n[t]))}}function Wa(t){return{reduceIndex(e,n){const r=t(e,(t=>n[t]));return Li(n)?new Date(r):r}}}const ja={reduceIndex:(t,e)=>li(e,t)},Fa={reduceIndex:(t,e)=>e[t[0]]},Ba={reduceIndex(t,e){const n=K(Q(t,(t=>t.length),(t=>e[t])),Co),r=n.slice(-5).reverse();if(r.length<n.length){const t=n.slice(0,-4);r[4]=[`… ${t.length.toLocaleString("en-US")} more`,tt(t,Co)]}return r.map((([t,e])=>`${t} (${e.toLocaleString("en-US")})`)).join("\n")}},Da={reduceIndex:(t,e)=>e[t[t.length-1]]},qa={label:"Frequency",reduceIndex:t=>t.length},_a={label:"Distinct",reduceIndex(t,e){const n=new et;for(const r of t)n.add(e[r]);return n.size}},Pa=Ia(tt);function Va(t,e){return null==t?{scope:e,label:"Frequency",reduceIndex:(t,e,n=1)=>t.length/n}:{scope:e,reduceIndex:(t,e,n=1)=>tt(t,(t=>e[t]))/n}}const Ha={reduceIndex:(t,e,{x:n})=>n},Ua={reduceIndex:(t,e,{y:n})=>n},Ya={reduceIndex:(t,e,{z:n})=>n};function Ga(t){if("function"!=typeof t)throw new Error(`invalid test function: ${t}`);return{reduceIndex:(e,n,{data:r})=>n[e.find(po(r)?e=>t(r[e],e,r):e=>t(r.get(e),e,r))]}}function Xa(t,{scale:e,type:n,value:r,filter:o,hint:i,label:a=pi(r)},l){return void 0===i&&"function"==typeof r?.transform&&(i=r.hint),Ka(l,{scale:e,type:n,value:vo(t,r),label:a,filter:o,hint:i})}function Za(t,e){return Object.fromEntries(Object.entries(t).map((([t,n])=>[t,Xa(e,n,t)])))}function Ja(t,e){const n=Object.fromEntries(Object.entries(t).map((([t,{scale:n,value:r}])=>{const o=null==n?null:e[n];return[t,null==o?r:Yo(r,o)]})));return n.channels=t,n}function Ka(t,e){const{scale:n,value:r}=e;if(!0===n||"auto"===n)switch(t){case"fill":case"stroke":case"color":e.scale=!0!==n&&Oi(r,Ci)?null:"color",e.defaultScale="color";break;case"fillOpacity":case"strokeOpacity":case"opacity":e.scale=!0!==n&&Oi(r,Ti)?null:"opacity",e.defaultScale="opacity";break;case"symbol":!0!==n&&Oi(r,ta)?(e.scale=null,e.value=Yo(r,ea)):e.scale="symbol",e.defaultScale="symbol";break;default:e.scale=Xi.has(t)?t:null}else if(!1===n)e.scale=null;else if(null!=n&&!Xi.has(n))throw new Error(`unknown scale: ${n}`);return e}function Qa(t,e){for(const n in t){const r=t[n];if(r.scale===e)return r}}function tl(t,e){const n=t.original;if(n===t)return e;const r=e.value,o=e.value=[];for(let e=0;e<n.length;++e){const i=r[n[e][0]];for(const n of t[e])o[n]=i}return e}function el(t,e,n){const r=nl(t,e);return Yo(nl(t,n),((t,e)=>Math.abs(t-r[e])),Float64Array)}function nl(t,e,n){let r=t[e];if(r||void 0===n||(r=t[n]),r)return r.value;throw new Error(`missing channel: ${e}`)}function rl(t){if(null==t||"function"==typeof t)return t;switch(`${t}`.toLowerCase()){case"ascending":return ol;case"descending":return il}throw new Error(`invalid order: ${t}`)}function ol([t,e],[n,r]){return Rr(e,r)||Rr(t,n)}function il([t,e],[n,r]){return Ir(e,r)||Rr(t,n)}function al(t,e){let n=t[e];if(n){for(;n.source;)n=n.source;return null===n.source?null:n}}const ll=new Map([["accent",dt],["category10",pt],["dark2",yt],["observable10",mt],["paired",gt],["pastel1",vt],["pastel2",xt],["set1",wt],["set2",bt],["set3",kt],["tableau10",$t]]);const sl=new Map([...ll,["brbg",ul(At,Mt)],["prgn",ul(Et,Lt)],["piyg",ul(St,zt)],["puor",ul(Nt,Ot)],["rdbu",ul(Tt,Ct)],["rdgy",ul(It,Rt)],["rdylbu",ul(jt,Wt)],["rdylgn",ul(Bt,Ft)],["spectral",ul(qt,Dt)],["burd",fl(Tt,Ct)],["buylrd",fl(jt,Wt)],["blues",cl(Pt,_t)],["greens",cl(Ht,Vt)],["greys",cl(Yt,Ut)],["oranges",cl(Xt,Gt)],["purples",cl(Jt,Zt)],["reds",cl(Qt,Kt)],["turbo",hl(te)],["viridis",hl(ee)],["magma",hl(ne)],["inferno",hl(re)],["plasma",hl(oe)],["cividis",hl(ie)],["cubehelix",hl(ae)],["warm",hl(le)],["cool",hl(se)],["bugn",cl(ue,ce)],["bupu",cl(he,fe)],["gnbu",cl(pe,de)],["orrd",cl(me,ye)],["pubu",cl(ve,ge)],["pubugn",cl(we,xe)],["purd",cl(ke,be)],["rdpu",cl(Me,$e)],["ylgn",cl(Le,Ae)],["ylgnbu",cl(ze,Ee)],["ylorbr",cl(Oe,Se)],["ylorrd",cl(Ce,Ne)],["rainbow",dl(Te)],["sinebow",dl(Re)]]);function cl(t,e){return({length:n})=>1===n?[t[3][1]]:2===n?[t[3][1],t[3][2]]:(n=Math.max(3,Math.floor(n)))>9?ht(e,n):t[n]}function ul(t,e){return({length:n})=>2===n?[t[3][0],t[3][2]]:(n=Math.max(3,Math.floor(n)))>11?ht(e,n):t[n]}function fl(t,e){return({length:n})=>2===n?[t[3][2],t[3][0]]:(n=Math.max(3,Math.floor(n)))>11?ht((t=>e(1-t)),n):t[n].slice().reverse()}function hl(t){return({length:e})=>ht(t,Math.max(2,Math.floor(e)))}function dl(t){return({length:e})=>ht(t,Math.floor(e)+1).slice(0,-1)}function pl(t){const e=`${t}`.toLowerCase();if(!sl.has(e))throw new Error(`unknown ordinal scheme: ${e}`);return sl.get(e)}function yl(t,e){const n=pl(t),r="function"==typeof n?n({length:e}):n;return r.length!==e?r.slice(0,e):r}const ml=new Map([["brbg",Mt],["prgn",Lt],["piyg",zt],["puor",Ot],["rdbu",Ct],["rdgy",Rt],["rdylbu",Wt],["rdylgn",Ft],["spectral",Dt],["burd",t=>Ct(1-t)],["buylrd",t=>Wt(1-t)],["blues",_t],["greens",Vt],["greys",Ut],["purples",Zt],["reds",Kt],["oranges",Gt],["turbo",te],["viridis",ee],["magma",ne],["inferno",re],["plasma",oe],["cividis",ie],["cubehelix",ae],["warm",le],["cool",se],["bugn",ce],["bupu",fe],["gnbu",de],["orrd",ye],["pubugn",xe],["pubu",ge],["purd",be],["rdpu",$e],["ylgnbu",Ee],["ylgn",Ae],["ylorbr",Se],["ylorrd",Ne],["rainbow",Te],["sinebow",Re]]);function gl(t){const e=`${t}`.toLowerCase();if(!ml.has(e))throw new Error(`unknown quantitative scheme: ${e}`);return ml.get(e)}const vl=new Set(["brbg","prgn","piyg","puor","rdbu","rdgy","rdylbu","rdylgn","spectral","burd","buylrd"]);const xl=t=>e=>t(1-e),wl=[0,1],bl=new Map([["number",_e],["rgb",Ye],["hsl",Xe],["hcl",Ze],["lab",Je]]);function kl(t){const e=`${t}`.toLowerCase();if(!bl.has(e))throw new Error(`unknown interpolator: ${e}`);return bl.get(e)}function $l(t,e,n,{type:r,nice:o,clamp:i,zero:a,domain:l=zl(t,n),unknown:s,round:c,scheme:u,interval:f,range:h=(Xi.get(t)===Vi?Ol(n,l):Xi.get(t)===Hi?Nl(n,l):Xi.get(t)===Ui?wl:void 0),interpolate:d=(Xi.get(t)===Pi?null==u&&void 0!==h?Ye:gl(void 0!==u?u:"cyclical"===r?"rainbow":"turbo"):c?Ge:_e),reverse:p}){if(l=Ml(l),f=wi(f,r),"cyclical"!==r&&"sequential"!==r||(r="linear"),"function"!=typeof d&&(d=kl(d)),p=!!p,void 0!==h){if(l.length!==(h=Ml(h)).length){if(1===d.length)throw new Error("invalid piecewise interpolator");d=Ue(d,h),h=void 0}}if(1===d.length?(p&&(d=xl(d),p=!1),void 0===h&&2===(h=Float64Array.from(l,((t,e)=>e/(l.length-1)))).length&&(h=wl),e.interpolate((h===wl?Ro:Rl)(d))):e.interpolate(d),a){const[t,e]=De(l);if(t>0||e<0){(Dr(l=Go(l))||1)===Math.sign(t)?l[0]=0:l[l.length-1]=0}}return p&&(l=Pe(l)),e.domain(l).unknown(s),o&&(e.nice(function(t,e){return!0===t?void 0:"number"==typeof t?t:function(t,e){if((t=wi(t,e))&&"function"!=typeof t.ceil)throw new Error("invalid interval: missing ceil method");return t}(t,e)}(o,r)),l=e.domain()),void 0!==h&&e.range(h),i&&e.clamp(i),{type:r,domain:l,range:h,scale:e,interpolate:d,interval:f}}function Ml(t){return(t=Ho(t)).length>=2?t:[t[0],t[0]]}function Al(t,e,{exponent:n=1,...r}){return $l(t,We().exponent(n),e,{...r,type:"pow"})}function Ll(t,n,{domain:r=[0],unknown:o,scheme:i="rdylbu",interpolate:a,range:l=(void 0!==a?ht(a,r.length+1):Xi.get(t)===Pi?yl(i,r.length+1):void 0),reverse:s}){const c=Dr(r=Ho(r));if(!isNaN(c)&&!function(t,n){for(let r=1,o=t.length,i=t[0];r<o;++r){const o=e(i,i=t[r]);if(0!==o&&o!==n)return!1}return!0}(r,c))throw new Error(`the ${t} scale has a non-monotonic domain`);return s&&(l=Pe(l)),{type:"threshold",scale:Ve(c<0?Pe(r):r,void 0===l?[]:l).unknown(o),domain:r,range:l}}function El(t,e=jr){return t.length?[ct(t,(({value:t})=>void 0===t?t:ct(t,e))),N(t,(({value:t})=>void 0===t?t:N(t,e)))]:[0,1]}function zl(t,e){const n=Xi.get(t);return(n===Vi||n===Ui||n===Hi?Sl:El)(e)}function Sl(t){return[0,t.length?N(t,(({value:t})=>void 0===t?t:N(t,jr))):1]}function Ol(t,e){const n=t.find((({radius:t})=>void 0!==t));if(void 0!==n)return[0,n.radius];const r=W(t,.5,(({value:t})=>void 0===t?NaN:W(t,.25,Fr))),o=e.map((t=>3*Math.sqrt(t/r))),i=30/N(o);return i<1?o.map((t=>t*i)):o}function Nl(t,e){const n=ot(t,(({value:t})=>void 0===t?NaN:ot(t,Math.abs))),r=e.map((t=>12*t/n)),o=60/N(r);return o<1?r.map((t=>t*o)):r}function Cl(t){for(const{value:e}of t)if(void 0!==e)for(let n of e){if(n>0)return El(t,Fr);if(n<0)return El(t,Br)}return[1,10]}function Tl(t){const e=[];for(const{value:n}of t)if(void 0!==n)for(const t of n)e.push(t);return e}function Rl(t){return(e,n)=>r=>t(e+r*(n-e))}let Il,Wl=0;function jl(t){t!==Il&&(Il=t,console.warn(t),++Wl)}function Fl(t,n,r,o,{type:i,nice:a,clamp:l,domain:s=El(o),unknown:c,pivot:u=0,scheme:f,range:h,symmetric:d=!0,interpolate:p=(Xi.get(t)===Pi?null==f&&void 0!==h?Ye:gl(void 0!==f?f:"rdbu"):_e),reverse:y}){u=+u,s=Ho(s);let[m,g]=s;if(s.length>2&&jl(`Warning: the diverging ${t} scale domain contains extra elements.`),e(m,g)<0&&([m,g]=[g,m],y=!y),m=Math.min(m,u),g=Math.max(g,u),"function"!=typeof p&&(p=kl(p)),void 0!==h&&(p=1===p.length?Rl(p)(...h):Ue(p,h)),y&&(p=xl(p)),d){const t=r.apply(u),e=t-r.apply(m),n=r.apply(g)-t;e<n?m=r.invert(t-n):e>n&&(g=r.invert(t+e))}return n.domain([m,u,g]).unknown(c).interpolator(p),l&&n.clamp(l),a&&n.nice(a),{type:i,domain:[m,g],pivot:u,interpolate:p,scale:n}}function Bl(t,e,{exponent:n=1,...r}){return Fl(t,Qe().exponent(n=+n),function(t){return.5===t?Pl:{apply:e=>Math.sign(e)*Math.pow(Math.abs(e),t),invert:e=>Math.sign(e)*Math.pow(Math.abs(e),1/t)}}(n),e,{...r,type:"diverging-pow"})}function Dl(t,e,{constant:n=1,...r}){return Fl(t,en().constant(n=+n),function(t){return{apply:e=>Math.sign(e)*Math.log1p(Math.abs(e/t)),invert:e=>Math.sign(e)*Math.expm1(Math.abs(e))*t}}(n),e,r)}const ql={apply:t=>t,invert:t=>t},_l={apply:Math.log,invert:Math.exp},Pl={apply:t=>Math.sign(t)*Math.sqrt(Math.abs(t)),invert:t=>Math.sign(t)*(t*t)};function Vl(t,e,n,r){return $l(t,e,n,r)}const Hl=Symbol("ordinal");function Ul(t,e,n,{type:r,interval:o,domain:i,range:a,reverse:l,hint:s}){return o=wi(o,r),void 0===i&&(i=Xl(n,o,t)),"categorical"!==r&&r!==Hl||(r="ordinal"),l&&(i=Pe(i)),i=e.domain(i).domain(),void 0!==a&&("function"==typeof a&&(a=a(i)),e.range(a)),{type:r,domain:i,range:a,scale:e,hint:s,interval:o}}function Yl(t,e,{type:n,interval:r,domain:o,range:i,scheme:a,unknown:l,...s}){let c;if(r=wi(r,n),void 0===o&&(o=Xl(e,r,t)),Xi.get(t)===Yi)c=function(t){return{fill:Zl(t,"fill"),stroke:Zl(t,"stroke")}}(e),i=void 0===i?function(t){return Ri(t.fill)?cn:un}(c):Yo(i,ea);else if(Xi.get(t)===Pi&&(void 0!==i||"ordinal"!==n&&n!==Hl||(i=function(t,e="greys"){const n=new Set,[r,o]=yl(e,2);for(const e of t)if(null!=e)if(!0===e)n.add(o);else{if(!1!==e)return;n.add(r)}return[...n]}(o,a),void 0!==i&&(a=void 0)),void 0===a&&void 0===i&&(a="ordinal"===n?"turbo":"observable10"),void 0!==a))if(void 0!==i){const t=gl(a),e=i[0],n=i[1]-i[0];i=({length:r})=>ht((r=>t(e+n*r)),r)}else i=pl(a);if(l===on)throw new Error(`implicit unknown on ${t} scale is not supported`);return Ul(t,an().unknown(l),e,{...s,type:n,domain:o,range:i,hint:c})}function Gl(t,e,n,r){let{round:o}=n;return void 0!==o&&t.round(o=!!o),(t=Ul(r,t,e,n)).round=o,t}function Xl(t,e,n){const r=new et;for(const{value:e,domain:n}of t){if(void 0!==n)return n();if(void 0!==e)for(const t of e)r.add(t)}if(void 0!==e){const[t,n]=De(r).map(e.floor,e);return e.range(t,e.offset(n))}if(r.size>1e4&&Xi.get(n)===_i)throw new Error(`implicit ordinal domain of ${n} scale has more than 10,000 values`);return K(r,Rr)}function Zl(t,e){let n;for(const{hint:r}of t){const t=r?.[e];if(void 0!==t)if(void 0===n)n=t;else if(n!==t)return}return n}function Jl(t,{label:e,inset:n=0,insetTop:r=n,insetRight:o=n,insetBottom:i=n,insetLeft:a=n,round:l,nice:s,clamp:c,zero:u,align:f,padding:h,projection:d,facet:{label:p=e}={},...y}={}){const m={};for(const[n,g]of t){const t=y[n],v=ss(n,g,{round:Xi.get(n)===_i?l:void 0,nice:s,clamp:c,zero:u,align:f,padding:h,projection:d,...t});if(v){let{label:l=("fx"===n||"fy"===n?p:e),percent:s,transform:c,inset:u,insetTop:f=(void 0!==u?u:"y"===n?r:0),insetRight:h=(void 0!==u?u:"x"===n?o:0),insetBottom:d=(void 0!==u?u:"y"===n?i:0),insetLeft:y=(void 0!==u?u:"x"===n?a:0)}=t||{};if(null==c)c=void 0;else if("function"!=typeof c)throw new Error("invalid scale transform; not a function");v.percent=!!s,v.label=void 0===l?Ql(g,v):l,v.transform=c,"x"===n||"fx"===n?(v.insetLeft=+y,v.insetRight=+h):"y"!==n&&"fy"!==n||(v.insetTop=+f,v.insetBottom=+d),m[n]=v}}return m}function Kl(t){const e={},n={scales:e};for(const[r,o]of Object.entries(t)){const{scale:t,type:i,interval:a,label:l}=o;e[r]=xs(o),n[r]=t,t.type=i,null!=a&&(t.interval=a),null!=l&&(t.label=l)}return n}function Ql(t=[],e){let n;for(const{label:e}of t)if(void 0!==e)if(void 0===n)n=e;else if(n!==e)return;if(void 0!==n)return!ds(e)&&e.percent&&(n=`${n} (%)`),{inferred:!0,toString:()=>n}}function ts(t){return Math.sign(Dr(t.domain()))*Math.sign(Dr(t.range()))}function es(t){const{marginTop:e,marginRight:n,marginBottom:r,marginLeft:o,width:i,height:a,facet:{marginTop:l,marginRight:s,marginBottom:c,marginLeft:u}}=t;return{marginTop:Math.max(e,l),marginRight:Math.max(n,s),marginBottom:Math.max(r,c),marginLeft:Math.max(o,u),width:i,height:a}}function ns({fx:t,fy:e},n){const{marginTop:r,marginRight:o,marginBottom:i,marginLeft:a,width:l,height:s}=es(n);return{marginTop:r,marginRight:o,marginBottom:i,marginLeft:a,width:t?t.scale.bandwidth()+a+o:l,height:e?e.scale.bandwidth()+r+i:s,facet:{width:l,height:s}}}function rs(t,e){if(void 0===t.range){const{insetLeft:n,insetRight:r}=t,{width:o,marginLeft:i=0,marginRight:a=0}=e,l=i+n,s=o-a-r;t.range=[l,Math.max(l,s)],ds(t)||(t.range=as(t)),t.scale.range(t.range)}is(t)}function os(t,e){if(void 0===t.range){const{insetTop:n,insetBottom:r}=t,{height:o,marginTop:i=0,marginBottom:a=0}=e,l=i+n,s=o-a-r;t.range=[Math.max(l,s),l],ds(t)?t.range.reverse():t.range=as(t),t.scale.range(t.range)}is(t)}function is(t){void 0===t.round&&function({type:t}){return"point"===t||"band"===t}(t)&&function({scale:t}){const e=t.domain().length,[n,r]=t.range(),o=t.paddingInner?t.paddingInner():1,i=t.paddingOuter?t.paddingOuter():t.padding(),a=e-o,l=Math.abs(r-n)/Math.max(1,a+2*i);return(l-Math.floor(l))*a}(t)<=30&&t.scale.round(!0)}function as(t){const e=t.scale.domain().length+ps(t);if(!(e>2))return t.range;const[n,r]=t.range;return Array.from({length:e},((t,o)=>n+o/(e-1)*(r-n)))}function ls(t,e,n){return ss(t,void 0===n?void 0:[{hint:n}],{...e})}function ss(t,e=[],n={}){const r=function(t,e,{type:n,domain:r,range:o,scheme:i,pivot:a,projection:l}){if(n=us(n),"fx"===t||"fy"===t)return"band";"x"!==t&&"y"!==t||null==l||(n=fs);for(const t of e){const e=us(t.type);if(void 0!==e)if(void 0===n)n=e;else if(n!==e)throw new Error(`scale incompatible with channel: ${n} !== ${e}`)}if(n===fs)return;if(void 0!==n)return n;if(void 0===r&&!e.some((({value:t})=>void 0!==t)))return;const s=Xi.get(t);if(s===Vi)return"sqrt";if(s===Ui||s===Hi)return"linear";if(s===Yi)return"ordinal";const c=(r??o)?.length;if(c<2||c>2)return hs(s);if(void 0!==r){if(Ai(r))return hs(s);if(Li(r))return"utc"}else{const t=e.map((({value:t})=>t)).filter((t=>void 0!==t));if(t.some(Ai))return hs(s);if(t.some(Li))return"utc"}if(s===Pi){if(null!=a||function(t){return null!=t&&vl.has(`${t}`.toLowerCase())}(i))return"diverging";if(function(t){return null!=t&&ll.has(`${t}`.toLowerCase())}(i))return"categorical"}return"linear"}(t,e,n);if(void 0===n.type&&void 0===n.domain&&void 0===n.range&&null==n.interval&&"fx"!==t&&"fy"!==t&&ds({type:r})){const n=e.map((({value:t})=>t)).filter((t=>void 0!==t));n.some(Li)?jl(`Warning: some data associated with the ${t} scale are dates. Dates are typically associated with a "utc" or "time" scale rather than a "${cs(r)}" scale. If you are using a bar mark, you probably want a rect mark with the interval option instead; if you are using a group transform, you probably want a bin transform instead. If you want to treat this data as ordinal, you can specify the interval of the ${t} scale (e.g., d3.utcDay), or you can suppress this warning by setting the type of the ${t} scale to "${cs(r)}".`):n.some(Ei)?jl(`Warning: some data associated with the ${t} scale are strings that appear to be dates (e.g., YYYY-MM-DD). If these strings represent dates, you should parse them to Date objects. Dates are typically associated with a "utc" or "time" scale rather than a "${cs(r)}" scale. If you are using a bar mark, you probably want a rect mark with the interval option instead; if you are using a group transform, you probably want a bin transform instead. If you want to treat this data as ordinal, you can suppress this warning by setting the type of the ${t} scale to "${cs(r)}".`):n.some(zi)&&jl(`Warning: some data associated with the ${t} scale are strings that appear to be numbers. If these strings represent numbers, you should parse or coerce them to numbers. Numbers are typically associated with a "linear" scale rather than a "${cs(r)}" scale. If you want to treat this data as ordinal, you can specify the interval of the ${t} scale (e.g., 1 for integers), or you can suppress this warning by setting the type of the ${t} scale to "${cs(r)}".`)}switch(n.type=r,r){case"diverging":case"diverging-sqrt":case"diverging-pow":case"diverging-log":case"diverging-symlog":case"cyclical":case"sequential":case"linear":case"sqrt":case"threshold":case"quantile":case"pow":case"log":case"symlog":n=ms(e,n,Wo);break;case"identity":switch(Xi.get(t)){case _i:n=ms(e,n,Wo);break;case Yi:n=ms(e,n,gs)}break;case"utc":case"time":n=ms(e,n,Fo)}switch(r){case"diverging":return function(t,e,n){return Fl(t,Ke(),ql,e,n)}(t,e,n);case"diverging-sqrt":return function(t,e,n){return Bl(t,e,{...n,exponent:.5})}(t,e,n);case"diverging-pow":return Bl(t,e,n);case"diverging-log":return function(t,e,{base:n=10,pivot:r=1,domain:o=El(e,r<0?Br:Fr),...i}){return Fl(t,tn().base(n=+n),_l,e,{domain:o,pivot:r,...i})}(t,e,n);case"diverging-symlog":return Dl(t,e,n);case"categorical":case"ordinal":case Hl:return Yl(t,e,n);case"cyclical":case"sequential":case"linear":return function(t,e,n){return $l(t,Ie(),e,n)}(t,e,n);case"sqrt":return function(t,e,n){return Al(t,e,{...n,exponent:.5})}(t,e,n);case"threshold":return Ll(t,0,n);case"quantile":return function(t,e,{range:n,quantiles:r=(void 0===n?5:(n=[...n]).length),n:o=r,scheme:i="rdylbu",domain:a=Tl(e),unknown:l,interpolate:s,reverse:c}){return void 0===n&&(n=void 0!==s?ht(s,o):Xi.get(t)===Pi?yl(i,o):void 0),a.length>0&&(a=Be(a,void 0===n?{length:o}:n).quantiles()),Ll(t,0,{domain:a,range:n,reverse:c,unknown:l})}(t,e,n);case"quantize":return function(t,e,{range:n,n:r=(void 0===n?5:(n=[...n]).length),scheme:o="rdylbu",domain:i=zl(t,e),unknown:a,interpolate:l,reverse:s}){const[c,u]=De(i);let f;return void 0===n?(f=qe(c,u,r),f[0]<=c&&f.splice(0,1),f[f.length-1]>=u&&f.pop(),r=f.length+1,n=void 0!==l?ht(l,r):Xi.get(t)===Pi?yl(o,r):void 0):(f=ht(_e(c,u),r+1).slice(1,-1),c instanceof Date&&(f=f.map((t=>new Date(t))))),Dr(Ho(i))<0&&f.reverse(),Ll(t,0,{domain:f,range:n,reverse:s,unknown:a})}(t,e,n);case"pow":return Al(t,e,n);case"log":return function(t,e,{base:n=10,domain:r=Cl(e),...o}){return $l(t,je().base(n),e,{...o,domain:r})}(t,e,n);case"symlog":return function(t,e,{constant:n=1,...r}){return $l(t,Fe().constant(n),e,r)}(t,e,n);case"utc":return function(t,e,n){return Vl(t,rn(),e,n)}(t,e,n);case"time":return function(t,e,n){return Vl(t,nn(),e,n)}(t,e,n);case"point":return function(t,e,{align:n=.5,padding:r=.5,...o}){return Gl(ln().align(n).padding(r),e,o,t)}(t,e,n);case"band":return function(t,e,{align:n=.5,padding:r=.1,paddingInner:o=r,paddingOuter:i=("fx"===t||"fy"===t?0:r),...a}){return Gl(sn().align(n).paddingInner(o).paddingOuter(i),e,a,t)}(t,e,n);case"identity":return function(t){return{type:"identity",scale:(e=Xi.get(t),e===_i||e===Vi||e===Hi||e===Ui?He():t=>t)};var e}(t);case void 0:return;default:throw new Error(`unknown scale type: ${r}`)}}function cs(t){return"symbol"==typeof t?t.description:t}function us(t){return"string"==typeof t?`${t}`.toLowerCase():t}const fs={toString:()=>"projection"};function hs(t){switch(t){case _i:return"point";case Pi:return Hl;default:return"ordinal"}}function ds({type:t}){return"ordinal"===t||"point"===t||"band"===t||t===Hl}function ps({type:t}){return"threshold"===t}function ys(t){if(void 0===t)return!0;const e=t.domain(),n=t(e[0]);for(let r=1,o=e.length;r<o;++r)if(t(e[r])-n)return!1;return!0}function ms(t,{domain:e,...n},r){for(const n of t)void 0!==n.value&&(void 0===e&&(e=n.value?.domain),n.value=r(n.value));return{domain:void 0===e?e:r(e),...n}}function gs(t){return Yo(t,ea)}function vs(t={}){let e;for(const n in t)if(Xi.has(n)&&Qo(t[n])){if(void 0!==e)throw new Error("ambiguous scale definition; multiple scales found");e=xs(ls(n,t[n]))}if(void 0===e)throw new Error("invalid scale definition; no scale found");return e}function xs({scale:t,type:e,domain:n,range:r,interpolate:o,interval:i,transform:a,percent:l,pivot:s}){if("identity"===e)return{type:"identity",apply:t=>t,invert:t=>t};const c=t.unknown?t.unknown():void 0;return{type:e,domain:Go(n),...void 0!==r&&{range:Go(r)},...void 0!==a&&{transform:a},...l&&{percent:l},...void 0!==c&&{unknown:c},...void 0!==i&&{interval:i},...void 0!==o&&{interpolate:o},...t.clamp&&{clamp:t.clamp()},...void 0!==s&&{pivot:s,symmetric:!1},...t.base&&{base:t.base()},...t.exponent&&{exponent:t.exponent()},...t.constant&&{constant:t.constant()},...t.align&&{align:t.align(),round:t.round()},...t.padding&&(t.paddingInner?{paddingInner:t.paddingInner(),paddingOuter:t.paddingOuter()}:{padding:t.padding()}),...t.bandwidth&&{bandwidth:t.bandwidth(),step:t.step()},apply:e=>t(e),...t.invert&&{invert:e=>t.invert(e)}}}function ws(t,{fx:e,fy:n}){const r=ai(t),o=e?.value,i=n?.value;return e&&n?Q(r,(t=>(t.fx=o[t[0]],t.fy=i[t[0]],t)),(t=>o[t]),(t=>i[t])):e?Q(r,(t=>(t.fx=o[t[0]],t)),(t=>o[t])):Q(r,(t=>(t.fy=i[t[0]],t)),(t=>i[t]))}function bs(t){const e=[],n=new Uint32Array(tt(t,(t=>t.length)));for(const r of t){let o=0;for(const e of t)r!==e&&(n.set(e,o),o+=e.length);e.push(n.slice(0,o))}return e}const ks=new Map([["top",Es],["right",Os],["bottom",zs],["left",Ss],["top-left",Ns(Es,Ss)],["top-right",Ns(Es,Os)],["bottom-left",Ns(zs,Ss)],["bottom-right",Ns(zs,Os)],["top-empty",function(t,{y:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;const i=As(e,r);if(i>0)return Ls(t,n,e[i-1])}],["right-empty",function(t,{x:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;const i=As(e,n);if(i<e.length-1)return Ls(t,e[i+1],r)}],["bottom-empty",function(t,{y:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;const i=As(e,r);if(i<e.length-1)return Ls(t,n,e[i+1])}],["left-empty",function(t,{x:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;const i=As(e,n);if(i>0)return Ls(t,e[i-1],r)}],["empty",function(t,e,{empty:n}){return n}]]);const $s=new WeakMap;function Ms(t){let e=$s.get(t);return e||$s.set(t,e=new hn(Yo(t,((t,e)=>[t,e])))),e}function As(t,e){return Ms(t).get(e)}function Ls(t,e,n){return function(t,e,n){return e=ui(e),n=ui(n),t.find((t=>Object.is(ui(t.x),e)&&Object.is(ui(t.y),n)))}(t,e,n)?.empty}function Es(t,{y:e},{y:n}){return!e||0===As(e,n)}function zs(t,{y:e},{y:n}){return!e||As(e,n)===e.length-1}function Ss(t,{x:e},{x:n}){return!e||0===As(e,n)}function Os(t,{x:e},{x:n}){return!e||As(e,n)===e.length-1}function Ns(t,e){return function(){return t.apply(null,arguments)&&e.apply(null,arguments)}}function Cs(t,{channels:{fx:e,fy:n},groups:r}){return e&&n?t.map((({x:t,y:e})=>r.get(t)?.get(e)??[])):e?t.map((({x:t})=>r.get(t)??[])):t.map((({y:t})=>r.get(t)??[]))}const Ts=Math.PI,Rs=2*Ts,Is=.618;function Ws({projection:t,inset:e=0,insetTop:n=e,insetRight:r=e,insetBottom:o=e,insetLeft:i=e}={},a){if(null==t)return;if("function"==typeof t.stream)return t;let l,s,c="frame";if(Ko(t)){let e;if(({type:t,domain:s,inset:e,insetTop:n=(void 0!==e?e:n),insetRight:r=(void 0!==e?e:r),insetBottom:o=(void 0!==e?e:o),insetLeft:i=(void 0!==e?e:i),clip:c=c,...l}=t),null==t)return}"function"!=typeof t&&({type:t}=js(t));const{width:u,height:f,marginLeft:h,marginRight:d,marginTop:p,marginBottom:y}=a,m=u-h-d-i-r,g=f-p-y-n-o;if(t=t?.({width:m,height:g,clip:c,...l}),null==t)return;c=function(t,e,n,r,o){if(!1===t||null==t||"number"==typeof t)return t=>t;!0===t&&(t="frame");if("frame"===`${t}`.toLowerCase())return yn(e,n,r,o);throw new Error(`unknown projection clip type: ${t}`)}(c,h,p,u-d,f-y);let v,x=h+i,w=p+n;if(null!=s){const[[e,n],[r,o]]=pn(t).bounds(s),i=Math.min(m/(r-e),g/(o-n));i>0?(x-=(i*(e+r)-m)/2,w-=(i*(n+o)-g)/2,v=dn({point(t,e){this.stream.point(t*i+x,e*i+w)}})):jl("Warning: the projection could not be fit to the specified domain; using the default scale.")}return v??=0===x&&0===w?Ds():dn({point(t,e){this.stream.point(t+x,e+w)}}),{stream:e=>t.stream(v.stream(c(e)))}}function js(t){switch(`${t}`.toLowerCase()){case"albers-usa":return Fs(Ln,.7463,.4673);case"albers":return Bs(On,.7463,.4673);case"azimuthal-equal-area":return Fs(An,4,4);case"azimuthal-equidistant":return Fs(Mn,Rs,Rs);case"conic-conformal":return Bs(Sn,Rs,Rs);case"conic-equal-area":return Bs(zn,6.1702,2.9781);case"conic-equidistant":return Bs(En,7.312,3.6282);case"equal-earth":return Fs($n,5.4133,2.6347);case"equirectangular":return Fs(kn,Rs,Ts);case"gnomonic":return Fs(bn,3.4641,3.4641);case"identity":return{type:Ds};case"reflect-y":return{type:qs};case"mercator":return Fs(wn,Rs,Rs);case"orthographic":return Fs(xn,2,2);case"stereographic":return Fs(vn,2,2);case"transverse-mercator":return Fs(gn,Rs,Rs);default:throw new Error(`unknown projection type: ${t}`)}}function Fs(t,e,n){return{type:({width:r,height:o,rotate:i,precision:a=.15,clip:l})=>{const s=t();return null!=a&&s.precision?.(a),null!=i&&s.rotate?.(i),"number"==typeof l&&s.clipAngle?.(l),null!=r&&(s.scale(Math.min(r/e,o/n)),s.translate([r/2,o/2])),s},aspectRatio:n/e}}function Bs(t,e,n){const{type:r,aspectRatio:o}=Fs(t,e,n);return{type:t=>{const{parallels:e,domain:n,width:o,height:i}=t,a=r(t);return null!=e&&(a.parallels(e),void 0===n&&null!=o&&a.fitSize([o,i],{type:"Sphere"})),a},aspectRatio:o}}const Ds=Ro({stream:t=>t}),qs=Ro(dn({point(t,e){this.stream.point(t,-e)}}));function _s(t,e,n,r){const o=n[t],i=n[e],a=o.length,l=n[t]=new Float64Array(a).fill(NaN),s=n[e]=new Float64Array(a).fill(NaN);let c;const u=r.stream({point(t,e){l[c]=t,s[c]=e}});for(c=0;c<a;++c)u.point(o[c],i[c])}function Ps({projection:t}={}){return null!=t&&("function"==typeof t.stream||(Ko(t)&&(t=t.type),null!=t))}function Vs(t,e,{projection:n}){const{x:r,y:o}=t;let i={};return r&&(i.x=r),o&&(i.y=o),i=Ja(i,e),n&&"x"===r?.scale&&"y"===o?.scale&&_s("x","y",i,n),r&&(i.x=Wo(i.x)),o&&(i.y=Wo(i.y)),i}function Hs(t){const e=[],n=[],r={scale:"x",value:e},o={scale:"y",value:n},i={point(t,r){e.push(t),n.push(r)},lineStart(){},lineEnd(){},polygonStart(){},polygonEnd(){},sphere(){}};for(const e of t.value)mn(e,i);return[r,o]}function Us(t={}){const{document:e=("undefined"!=typeof window?window.document:void 0),clip:n}=t;return{document:e,clip:Bi(n)}}function Ys(t,{document:e}){return Nn(Cn(t).call(e.documentElement))}const Gs=Symbol("unset");function Xs(t){return(1===t.length?Zs:Js)(t)}function Zs(t){let e,n=Gs;return r=>(Object.is(n,r)||(n=r,e=t(r)),e)}function Js(t){let e,n;return(...r)=>((n?.length!==r.length||n.some(((t,e)=>!Object.is(t,r[e]))))&&(n=r,e=t(...r)),e)}const Ks=Xs((t=>new Intl.NumberFormat(t))),Qs=Xs(((t,e)=>new Intl.DateTimeFormat(t,{timeZone:"UTC",...e&&{month:e}}))),tc=Xs(((t,e)=>new Intl.DateTimeFormat(t,{timeZone:"UTC",...e&&{weekday:e}})));function ec(t="en-US"){const e=Ks(t);return t=>null==t||isNaN(t)?void 0:e.format(t)}function nc(t="en-US",e="short"){const n=Qs(t,e);return t=>null==t||isNaN(t=+new Date(Date.UTC(2e3,+t)))?void 0:n.format(t)}function rc(t="en-US",e="short"){const n=tc(t,e);return t=>null==t||isNaN(t=+new Date(Date.UTC(2001,0,+t)))?void 0:n.format(t)}function oc(t){return Nr(t,"Invalid Date")}const ic=function(t="en-US"){const e=ec(t);return t=>(t instanceof Date?oc:"number"==typeof t?e:So)(t)}(),ac=("undefined"!=typeof window?window.devicePixelRatio>1:"undefined"==typeof it)?0:.5;let lc=0,sc=0;function cc(){return"plot-clip-"+ ++lc}function uc(t,{title:e,href:n,ariaLabel:r,ariaDescription:o,ariaHidden:i,target:a,fill:l,fillOpacity:s,stroke:c,strokeWidth:u,strokeOpacity:f,strokeLinejoin:h,strokeLinecap:d,strokeMiterlimit:p,strokeDasharray:y,strokeDashoffset:m,opacity:g,mixBlendMode:v,imageFilter:x,paintOrder:w,pointerEvents:b,shapeRendering:k,channels:$},{ariaLabel:M,fill:A="currentColor",fillOpacity:L,stroke:E="none",strokeOpacity:z,strokeWidth:S,strokeLinecap:O,strokeLinejoin:N,strokeMiterlimit:C,paintOrder:T}){null===A&&(l=null,s=null),null===E&&(c=null,f=null),Ri(A)?Ri(E)||Ri(l)&&!$?.fill||(E="none"):!Ri(E)||Ri(c)&&!$?.stroke||(A="none");const[R,I]=Do(l,A),[W,j]=qo(s,L),[F,B]=Do(c,E),[D,q]=qo(f,z),[_,P]=qo(g);Ii(B)||(void 0===u&&(u=S),void 0===d&&(d=O),void 0===h&&(h=N),void 0!==p||/^\s*round\s*$/i.test(h)||(p=C),Ii(I)||void 0!==w||(w=T));const[V,H]=qo(u);return null!==A&&(t.fill=Lc(I,"currentColor"),t.fillOpacity=Ec(j,1)),null!==E&&(t.stroke=Lc(B,"none"),t.strokeWidth=Ec(H,1),t.strokeOpacity=Ec(q,1),t.strokeLinejoin=Lc(h,"miter"),t.strokeLinecap=Lc(d,"butt"),t.strokeMiterlimit=Ec(p,4),t.strokeDasharray=Lc(y,"none"),t.strokeDashoffset=Lc(m,"0")),t.target=So(a),t.ariaLabel=So(M),t.ariaDescription=So(o),t.ariaHidden=So(i),t.opacity=Ec(P,1),t.mixBlendMode=Lc(v,"normal"),t.imageFilter=Lc(x,"none"),t.paintOrder=Lc(w,"normal"),t.pointerEvents=Lc(b,"auto"),t.shapeRendering=Lc(k,"auto"),{title:{value:e,optional:!0,filter:null},href:{value:n,optional:!0,filter:null},ariaLabel:{value:r,optional:!0,filter:null},fill:{value:R,scale:"auto",optional:!0},fillOpacity:{value:W,scale:"auto",optional:!0},stroke:{value:F,scale:"auto",optional:!0},strokeOpacity:{value:D,scale:"auto",optional:!0},strokeWidth:{value:V,optional:!0},opacity:{value:_,scale:"auto",optional:!0}}}function fc(t,e){e&&t.text((t=>ic(e[t])))}function hc(t,e){e&&t.text((([t])=>ic(e[t])))}function dc(t,{target:e,tip:n},{ariaLabel:r,title:o,fill:i,fillOpacity:a,stroke:l,strokeOpacity:s,strokeWidth:c,opacity:u,href:f}){r&&Mc(t,"aria-label",(t=>r[t])),i&&Mc(t,"fill",(t=>i[t])),a&&Mc(t,"fill-opacity",(t=>a[t])),l&&Mc(t,"stroke",(t=>l[t])),s&&Mc(t,"stroke-opacity",(t=>s[t])),c&&Mc(t,"stroke-width",(t=>c[t])),u&&Mc(t,"opacity",(t=>u[t])),f&&$c(t,(t=>f[t]),e),n||function(t,e){e&&t.filter((t=>Wr(e[t]))).append("title").call(fc,e)}(t,o)}function pc(t,{target:e,tip:n},{ariaLabel:r,title:o,fill:i,fillOpacity:a,stroke:l,strokeOpacity:s,strokeWidth:c,opacity:u,href:f}){r&&Mc(t,"aria-label",(([t])=>r[t])),i&&Mc(t,"fill",(([t])=>i[t])),a&&Mc(t,"fill-opacity",(([t])=>a[t])),l&&Mc(t,"stroke",(([t])=>l[t])),s&&Mc(t,"stroke-opacity",(([t])=>s[t])),c&&Mc(t,"stroke-width",(([t])=>c[t])),u&&Mc(t,"opacity",(([t])=>u[t])),f&&$c(t,(([t])=>f[t]),e),n||function(t,e){e&&t.filter((([t])=>Wr(e[t]))).append("title").call(hc,e)}(t,o)}function yc(t,e,n){const r=J(t,(t=>e[t]));return void 0===n&&r.size>1+t.length>>1&&jl("Warning: the implicit z channel has high cardinality. This may occur when the fill or stroke channel is associated with quantitative data rather than ordinal or categorical data. You can suppress this warning by setting the z option explicitly; if this data represents a single series, set z to null."),r.values()}function*mc(t,e,n,r){const{z:o}=n,{z:i}=r,a=function({ariaLabel:t,title:e,fill:n,fillOpacity:r,stroke:o,strokeOpacity:i,strokeWidth:a,opacity:l,href:s},{tip:c}){return[t,c?void 0:e,n,r,o,i,a,l,s].filter((t=>void 0!==t))}(r,n),l=[...e,...a];for(const e of i?yc(t,i,o):[t]){let t,n;t:for(const r of e){for(const t of l)if(!Tr(t[r])){n&&n.push(-1);continue t}if(void 0!==t){n.push(r);for(let e=0;e<a.length;++e){if(ui(a[e][r])!==t[e]){yield n,t=a.map((t=>ui(t[r]))),n=[r];continue t}}}else n&&(yield n),t=a.map((t=>ui(t[r]))),n=[r]}n&&(yield n)}}function gc(t,e,n,r){let o;const{clip:i=r.clip}=e;"frame"===i?(t=Ys("svg:g",r).each((function(){this.appendChild(t.node()),t.node=()=>this})),o=vc(r,n)):i&&(o=function(t,e){let n,r;(n=xc.get(e))||xc.set(e,n=new WeakMap);"Sphere"===t.type&&(t=wc);if(!(r=n.get(t))){const o=cc();Nn(e.ownerSVGElement).append("clipPath").attr("id",o).append("path").attr("d",e.path()(t)),n.set(t,r=`url(#${o})`)}return r}(i,r)),Mc(t,"aria-label",e.ariaLabel),Mc(t,"aria-description",e.ariaDescription),Mc(t,"aria-hidden",e.ariaHidden),Mc(t,"clip-path",o)}const vc=function(t){const e=new WeakMap;return(n,r)=>{let o=e.get(n);if(!o){const i=cc();Nn(n.ownerSVGElement).append("clipPath").attr("id",i).call(t,n,r),e.set(n,o=`url(#${i})`)}return o}}(((t,e,n)=>{const{width:r,height:o,marginLeft:i,marginRight:a,marginTop:l,marginBottom:s}=n;t.append("rect").attr("x",i).attr("y",l).attr("width",r-a-i).attr("height",o-l-s)})),xc=new WeakMap,wc={type:"Sphere"};function bc(t,e,n,r){gc(t,e,n,r),Mc(t,"class",e.className),Mc(t,"fill",e.fill),Mc(t,"fill-opacity",e.fillOpacity),Mc(t,"stroke",e.stroke),Mc(t,"stroke-width",e.strokeWidth),Mc(t,"stroke-opacity",e.strokeOpacity),Mc(t,"stroke-linejoin",e.strokeLinejoin),Mc(t,"stroke-linecap",e.strokeLinecap),Mc(t,"stroke-miterlimit",e.strokeMiterlimit),Mc(t,"stroke-dasharray",e.strokeDasharray),Mc(t,"stroke-dashoffset",e.strokeDashoffset),Mc(t,"shape-rendering",e.shapeRendering),Mc(t,"filter",e.imageFilter),Mc(t,"paint-order",e.paintOrder);const{pointerEvents:o=(!1===r.pointerSticky?"none":void 0)}=e;Mc(t,"pointer-events",o)}function kc(t,e){!function(t,e,n){null!=n&&t.style(e,n)}(t,"mix-blend-mode",e.mixBlendMode),Mc(t,"opacity",e.opacity)}function $c(t,e,n){t.each((function(t){const r=e(t);if(null!=r){const t=this.ownerDocument.createElementNS(Tn.svg,"a");t.setAttribute("fill","inherit"),t.setAttributeNS(Tn.xlink,"href",r),null!=n&&t.setAttribute("target",n),this.parentNode.insertBefore(t,this).appendChild(this)}}))}function Mc(t,e,n){null!=n&&t.attr(e,n)}function Ac(t,e,{x:n,y:r},o=ac,i=ac){o+=e.dx,i+=e.dy,n?.bandwidth&&(o+=n.bandwidth()/2),r?.bandwidth&&(i+=r.bandwidth()/2),(o||i)&&t.attr("transform",`translate(${o},${i})`)}function Lc(t,e){if((t=So(t))!==e)return t}function Ec(t,e){if((t=Oo(t))!==e)return t}const zc=/^-?([_a-z]|[\240-\377]|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])([_a-z0-9-]|[\240-\377]|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])*$/i;function Sc(t){if(void 0===t)return"plot-d6a7b5";if(t=`${t}`,!zc.test(t))throw new Error(`invalid class name: ${t}`);return t}function Oc(t,e){if("string"==typeof e)t.property("style",e);else if(null!=e)for(const n of t)Object.assign(n.style,e)}function Nc({frameAnchor:t},{width:e,height:n,marginTop:r,marginRight:o,marginBottom:i,marginLeft:a}){return[/left$/.test(t)?a:/right$/.test(t)?e-o:(a+e-o)/2,/^top/.test(t)?r:/^bottom/.test(t)?n-i:(r+n-i)/2]}class Cc{constructor(t,e={},n={},r){const{facet:o="auto",facetAnchor:i,fx:a,fy:l,sort:s,dx:c=0,dy:u=0,margin:f=0,marginTop:h=f,marginRight:d=f,marginBottom:p=f,marginLeft:y=f,className:m,clip:g=r?.clip,channels:v,tip:x,render:w}=n;if(this.data=t,this.sort=ei(s)?s:null,this.initializer=ra(n).initializer,this.transform=this.initializer?n.transform:na(n).transform,null===o||!1===o?this.facet=null:(this.facet=Po(!0===o?"include":o,"facet",["auto","include","exclude","super"]),this.fx=t===$o&&"string"==typeof a?[a]:a,this.fy=t===$o&&"string"==typeof l?[l]:l),this.facetAnchor=function(t){if(null==t)return null;const e=ks.get(`${t}`.toLowerCase());if(e)return e;throw new Error(`invalid facet anchor: ${t}`)}(i),e=Fi(e),void 0!==v&&(e={...Ic(v),...e}),void 0!==r&&(e={...uc(this,n,r),...e}),this.channels=Object.fromEntries(Object.entries(e).map((([e,n])=>{if(ti(n.value)){const{value:t,label:e=n.label,scale:r=n.scale}=n.value;n={...n,label:e,scale:r,value:t}}if(t===$o&&"string"==typeof n.value){const{value:t}=n;n={...n,value:[t]}}return[e,n]})).filter((([t,{value:e,optional:n}])=>{if(null!=e)return!0;if(n)return!1;throw new Error(`missing channel value: ${t}`)}))),this.dx=+c,this.dy=+u,this.marginTop=+h,this.marginRight=+d,this.marginBottom=+p,this.marginLeft=+y,this.clip=Bi(g),this.tip=function(t){return!0===t?"xy":!1===t||null==t?null:"string"==typeof t?Po(t,"tip",["x","y","xy"]):t}(x),this.className=So(m),"super"===this.facet){if(a||l)throw new Error("super-faceting cannot use fx or fy");for(const t in this.channels){const{scale:n}=e[t];if("x"===n||"y"===n)throw new Error("super-faceting cannot use x or y")}}null!=w&&(this.render=Rc(w,this.render))}initialize(t,e,n){let r=Vo(this.data);void 0===t&&null!=r&&(t=[ai(r)]);const o=t;null!=this.transform&&(({facets:t,data:r}=this.transform(r,t,n)),r=Vo(r)),void 0!==t&&(t.original=o);const i=Za(this.channels,r);return null!=this.sort&&function(t,e,n,r,o){const{order:i,reverse:a,reduce:l=!0,limit:s}=o;for(const c in o){if(!Xi.has(c))continue;let{value:u,order:f=i,reverse:h=a,reduce:d=l,limit:p=s}=ki(o[c]);const y=u?.startsWith("-");if(y&&(u=u.slice(1)),f=void 0===f?y!==("width"===u||"height"===u)?il:ol:rl(f),null==d||!1===d)continue;const m="fx"===c||"fy"===c?tl(e,r[c]):Qa(n,c);if(!m)throw new Error(`missing channel for scale: ${c}`);const g=m.value,[v=0,x=1/0]=$i(p)?p:p<0?[p]:[0,p];if(null==u)m.domain=()=>{let t=Array.from(new et(g));return h&&(t=t.reverse()),0===v&&x===1/0||(t=t.slice(v,x)),t};else{const e="data"===u?t:"height"===u?el(n,"y1","y2"):"width"===u?el(n,"x1","x2"):nl(n,u,"y"===u?"y2":"x"===u?"x2":void 0),r=La(!0===d?"max":d,e);m.domain=()=>{let t=ft(ai(g),(t=>r.reduceIndex(t,e)),(t=>g[t]));return f&&t.sort(f),h&&t.reverse(),0===v&&x===1/0||(t=t.slice(v,x)),t.map(No)}}}}(r,t,i,e,this.sort),{data:r,facets:t,channels:i}}filter(t,e,n){for(const r in e){const{filter:o=Tr}=e[r];if(null!==o){const e=n[r];t=t.filter((t=>o(e[t])))}}return t}project(t,e,n){for(const r in t)if("x"===t[r].scale&&/^x|x$/.test(r)){const o=r.replace(/^x|x$/,"y");o in t&&"y"===t[o].scale&&_s(r,o,e,n.projection)}}scale(t,e,n){const r=Ja(t,e);return n.projection&&this.project(t,r,n),r}}function Tc(...t){return t.plot=Cc.prototype.plot,t}function Rc(t,e){if(null==t)return null===e?void 0:e;if(null==e)return null===t?void 0:t;if("function"!=typeof t)throw new TypeError(`invalid render transform: ${t}`);if("function"!=typeof e)throw new TypeError(`invalid render transform: ${e}`);return function(n,r,o,i,a,l){return t.call(this,n,r,o,i,a,((t,n,r,o,i)=>e.call(this,t,n,r,o,i,l)))}}function Ic(t){return Object.fromEntries(Object.entries(Fi(t)).map((([t,e])=>(void 0===(e="string"==typeof e?{value:e,label:t}:ki(e)).filter&&null==e.scale&&(e={...e,filter:null}),[t,e]))))}function Wc(t,e){return!0===t?.tip?{...t,tip:e}:Ko(t?.tip)&&void 0===t.tip.pointer?{...t,tip:{...t.tip,pointer:e}}:t}function jc({x:t,y:e,fy:n,fx:r},{projection:o,aspectRatio:i},{width:a,marginTopDefault:l,marginRightDefault:s,marginBottomDefault:c,marginLeftDefault:u}){const f=n&&n.scale.domain().length||1,h=function(t){if("function"==typeof t?.stream)return Is;if(Ko(t)){let e,n;if(({domain:e,type:t,...n}=t),null!=e&&null!=t){const r="string"==typeof t?js(t).type:t,[[o,i],[a,l]]=pn(r({...n,width:100,height:100})).bounds(e),s=(l-i)/(a-o);return s&&isFinite(s)?s<.2?.2:s>5?5:s:Is}}if(null!=t){if("function"!=typeof t){const{aspectRatio:e}=js(t);if(e)return e}return Is}}(o);if(h){const t=(1.1*f-.1)/(1.1*(r?r.scale.domain().length:1)-.1)*h,e=Math.max(.1,Math.min(10,t));return Math.round((a-u-s)*e+l+c)}const d=e?ds(e)?e.scale.domain().length||1:Math.max(7,17/f):1;if(null!=i){if(i=+i,!(isFinite(i)&&i>0))throw new Error(`invalid aspectRatio: ${i}`);const o=Fc("y",e)/(Fc("x",t)*i),f=r?r.scale.bandwidth():1,h=n?n.scale.bandwidth():1;return(o*(f*(a-u-s)-t.insetLeft-t.insetRight)+e.insetTop+e.insetBottom)/h+l+c}return!(!e&&!n)*Math.max(1,Math.min(60,d*f))*20+30*!!r+60}function Fc(t,e){if(!e)throw new Error(`aspectRatio requires ${t} scale`);const{type:n,domain:r}=e;let o;switch(n){case"linear":case"utc":case"time":o=Number;break;case"pow":{const t=e.scale.exponent();o=e=>Math.pow(e,t);break}case"log":o=Math.log;break;case"point":case"band":return r.length;default:throw new Error(`unsupported ${t} scale for aspectRatio: ${n}`)}const[i,a]=De(r);return Math.abs(o(a)-o(i))}const Bc=new WeakMap;function Dc(t,e,{x:n,y:r,px:o,py:i,maxRadius:a=40,channels:l,render:s,...c}={}){return a=+a,null!=o&&(n??=null,l={...l,px:{value:o,scale:"x"}}),null!=i&&(r??=null,l={...l,py:{value:i,scale:"y"}}),{x:n,y:r,channels:l,...c,render:Rc((function(n,r,o,i,l,s){const c=(l={...l,pointerSticky:!1}).ownerSVGElement,{data:u}=l.getMarkState(this);let f=Bc.get(c);f||Bc.set(c,f={sticky:!1,roots:[],renders:[]});let h=f.renders.push(C)-1;const{x:d,y:p,fx:y,fy:m}=r;let g=y?y(n.fx)-i.marginLeft:0,v=m?m(n.fy)-i.marginTop:0;d?.bandwidth&&(g+=d.bandwidth()/2),p?.bandwidth&&(v+=p.bandwidth()/2);const x=null!=n.fi;let w;if(x){let t=f.facetStates;t||(f.facetStates=t=new Map),w=t.get(this),w||t.set(this,w=new Map)}const[b,k]=Nc(this,i),{px:$,py:M}=o,A=$?t=>$[t]:Vc(o,b),L=M?t=>M[t]:Hc(o,k);let E,z,S,O;function N(t,e){if(x){if(O&&(O=cancelAnimationFrame(O)),null!=t)return w.set(n.fi,e),void(O=requestAnimationFrame((()=>{O=null;for(const[r,o]of w)if(o<e||o===e&&r<n.fi){t=null;break}C(t)})));w.delete(n.fi)}C(t)}function C(t){if(E===t&&S===f.sticky)return;E=t,S=l.pointerSticky=f.sticky;const e=null==E?[]:[E];x&&(e.fx=n.fx,e.fy=n.fy,e.fi=n.fi);const a=s(e,r,o,i,l);if(z){if(x){const t=z.parentNode,e=z.getAttribute("transform"),n=a.getAttribute("transform");e?a.setAttribute("transform",e):a.removeAttribute("transform"),n?t.setAttribute("transform",n):t.removeAttribute("transform"),a.removeAttribute("aria-label"),a.removeAttribute("aria-description"),a.removeAttribute("aria-hidden")}z.replaceWith(a)}if(f.roots[h]=z=a,!(null==E&&w?.size>1)){const t=null==E?null:po(u)?u[E]:u.get(E);l.dispatchValue(t)}return a}function T(r){if(f.sticky||"mouse"===r.pointerType&&1===r.buttons)return;let[o,l]=Rn(r);o-=g,l-=v;const s=o<i.marginLeft||o>i.width-i.marginRight?1:t,c=l<i.marginTop||l>i.height-i.marginBottom?1:e;let u=null,h=a*a;for(const t of n){const e=s*(A(t)-o),n=c*(L(t)-l),r=e*e+n*n;r<=h&&(u=t,h=r)}if(null!=u&&(1!==t||1!==e)){const t=A(u)-o,e=L(u)-l;h=t*t+e*e}N(u,h)}return c.addEventListener("pointerenter",T),c.addEventListener("pointermove",T),c.addEventListener("pointerdown",(function(t){"mouse"===t.pointerType&&null!=E&&(f.sticky&&f.roots.some((e=>e?.contains(t.target)))||(f.sticky?(f.sticky=!1,f.renders.forEach((t=>t(null)))):(f.sticky=!0,C(E)),t.stopImmediatePropagation()))})),c.addEventListener("pointerleave",(function(t){"mouse"===t.pointerType&&(f.sticky||N(null))})),C(null)}),s)}}function qc(t){return Dc(1,1,t)}function _c(t){return Dc(1,.01,t)}function Pc(t){return Dc(.01,1,t)}function Vc({x1:t,x2:e,x:n=t},r){return t&&e?n=>(t[n]+e[n])/2:n?t=>n[t]:()=>r}function Hc({y1:t,y2:e,y:n=t},r){return t&&e?n=>(t[n]+e[n])/2:n?t=>n[t]:()=>r}function Uc(t){return ds(t)&&void 0===t.interval?void 0:"tabular-nums"}const Yc=Math.PI/180;function Gc(t,{marker:e,markerStart:n=e,markerMid:r=e,markerEnd:o=e}={}){t.markerStart=Xc(n),t.markerMid=Xc(r),t.markerEnd=Xc(o)}function Xc(t){if(null==t||!1===t)return null;if(!0===t)return Kc;if("function"==typeof t)return t;switch(`${t}`.toLowerCase()){case"none":return null;case"arrow":return Zc("auto");case"arrow-reverse":return Zc("auto-start-reverse");case"dot":return Jc;case"circle":case"circle-fill":return Kc;case"circle-stroke":return Qc;case"tick":return tu("auto");case"tick-x":return tu(90);case"tick-y":return tu(0)}throw new Error(`invalid marker: ${t}`)}function Zc(t){return(e,n)=>Ys("svg:marker",n).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("orient",t).attr("fill","none").attr("stroke",e).attr("stroke-width",1.5).attr("stroke-linecap","round").attr("stroke-linejoin","round").call((t=>t.append("path").attr("d","M-1.5,-3l3,3l-3,3"))).node()}function Jc(t,e){return Ys("svg:marker",e).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("fill",t).attr("stroke","none").call((t=>t.append("circle").attr("r",2.5))).node()}function Kc(t,e){return Ys("svg:marker",e).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("fill",t).attr("stroke","var(--plot-background)").attr("stroke-width",1.5).call((t=>t.append("circle").attr("r",3))).node()}function Qc(t,e){return Ys("svg:marker",e).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("fill","var(--plot-background)").attr("stroke",t).attr("stroke-width",1.5).call((t=>t.append("circle").attr("r",3))).node()}function tu(t){return(e,n)=>Ys("svg:marker",n).attr("viewBox","-3 -3 6 6").attr("markerWidth",6).attr("markerHeight",6).attr("orient",t).attr("stroke",e).call((t=>t.append("path").attr("d","M0,-3v6"))).node()}let eu=0;function nu(t,e,{stroke:n},r){return au(t,e,n&&(t=>n[t]),null,r)}function ru(t,e,{stroke:n,z:r},o){return au(t,e,n&&(([t])=>n[t]),r,o)}const ou=1,iu=2;function au(t,{markerStart:e,markerMid:n,markerEnd:r,stroke:o},i=()=>o,a,l){if(!e&&!n&&!r)return;const s=new Map,c=a&&function(t,e){const n=new Uint8Array(e.length),r=t.data().filter((t=>t.length>1)),o=r.length;for(let t=0,i=Gs;t<o;++t){const o=r[t];if(o.length>1){const t=o[0];i!==(i=ui(e[t]))&&(n[t]|=ou)}}for(let t=o-1,i=Gs;t>=0;--t){const o=r[t];if(o.length>1){const t=o[0];i!==(i=ui(e[t]))&&(n[t]|=iu)}}return([t])=>n[t]}(t,a);function u(t,e,n){return function(r){if(n&&!n(r))return;const o=i(r);let a=s.get(e);a||s.set(e,a=new Map);let c=a.get(o);if(!c){const t=this.parentNode.insertBefore(e(o,l),this),n="plot-marker-"+ ++eu;t.setAttribute("id",n),a.set(o,c=`url(#${n})`)}this.setAttribute(t,c)}}e&&t.each(u("marker-start",e,c&&(t=>c(t)&ou))),n&&c&&t.each(u("marker-start",n,(t=>!(c(t)&ou)))),n&&t.each(u("marker-mid",n)),r&&t.each(u("marker-end",r,c&&(t=>c(t)&iu)))}function lu({inset:t,insetLeft:e,insetRight:n,...r}={}){return[e,n]=cu(t,e,n),{inset:t,insetLeft:e,insetRight:n,...r}}function su({inset:t,insetTop:e,insetBottom:n,...r}={}){return[e,n]=cu(t,e,n),{inset:t,insetTop:e,insetBottom:n,...r}}function cu(t,e,n){return void 0===t&&void 0===e&&void 0===n?ac?[1,0]:[.5,.5]:[e,n]}function uu(t,{interval:e}){return(t={...ki(t)}).interval=vi(void 0===t.interval?e:t.interval),t}function fu(t,e,n,r){const{[t]:o,[`${t}1`]:i,[`${t}2`]:a}=n,{value:l,interval:s}=uu(o,n);if(null==l||null==s&&!r)return n;const c=pi(o);if(null==s){let e;const o={transform:t=>e||(e=vo(t,l)),label:c};return{...n,[t]:void 0,[`${t}1`]:void 0===i?o:i,[`${t}2`]:void 0!==a||i===a&&r?a:o}}let u,f;function h(t){return void 0!==f&&t===u?f:f=Yo(vo(u=t,l),(t=>s.floor(t)))}return e({...n,[t]:void 0,[`${t}1`]:void 0===i?{transform:h,label:c}:i,[`${t}2`]:void 0===a?{transform:t=>h(t).map((t=>s.offset(t))),label:c}:a})}function hu(t,e,n){const{[t]:r}=n,{value:o,interval:i}=uu(r,n);return null==o||null==i?n:e({...n,[t]:{label:pi(r),transform:t=>{const e=Yo(vo(t,o),(t=>i.floor(t))),n=e.map((t=>i.offset(t)));return e.map(Li(e)?(t,e)=>null==t||isNaN(t=+t)||null==(e=n[e])||isNaN(e=+e)?void 0:new Date((t+e)/2):(t,e)=>null==t||null==(e=n[e])?NaN:(+t+ +e)/2)}}})}function du(t={}){return fu("x",lu,t,!0)}function pu(t={}){return fu("y",su,t,!0)}function yu(t={}){return fu("x",lu,t)}function mu(t={}){return fu("y",su,t)}function gu(t={}){return hu("x",lu,t)}function vu(t={}){return hu("y",su,t)}const xu={ariaLabel:"rule",fill:null,stroke:"currentColor"};class wu extends Cc{constructor(t,e={}){const{x:n,y1:r,y2:o,inset:i=0,insetTop:a=i,insetBottom:l=i}=e;super(t,{x:{value:n,scale:"x",optional:!0},y1:{value:r,scale:"y",optional:!0},y2:{value:o,scale:"y",optional:!0}},Wc(e,"x"),xu),this.insetTop=Oo(a),this.insetBottom=Oo(l),Gc(this,e)}render(t,e,n,r,o){const{x:i,y:a}=e,{x:l,y1:s,y2:c}=n,{width:u,height:f,marginTop:h,marginRight:d,marginLeft:p,marginBottom:y}=r,{insetTop:m,insetBottom:g}=this;return Ys("svg:g",o).call(bc,this,r,o).call(Ac,this,{x:l&&i},ac,0).call((e=>e.selectAll().data(t).enter().append("line").call(kc,this).attr("x1",l?t=>l[t]:(p+u-d)/2).attr("x2",l?t=>l[t]:(p+u-d)/2).attr("y1",s&&!ys(a)?t=>s[t]+m:h+m).attr("y2",c&&!ys(a)?a.bandwidth?t=>c[t]+a.bandwidth()-g:t=>c[t]-g:f-y-g).call(dc,this,n).call(nu,this,n,o))).node()}}class bu extends Cc{constructor(t,e={}){const{x1:n,x2:r,y:o,inset:i=0,insetRight:a=i,insetLeft:l=i}=e;super(t,{y:{value:o,scale:"y",optional:!0},x1:{value:n,scale:"x",optional:!0},x2:{value:r,scale:"x",optional:!0}},Wc(e,"y"),xu),this.insetRight=Oo(a),this.insetLeft=Oo(l),Gc(this,e)}render(t,e,n,r,o){const{x:i,y:a}=e,{y:l,x1:s,x2:c}=n,{width:u,height:f,marginTop:h,marginRight:d,marginLeft:p,marginBottom:y}=r,{insetLeft:m,insetRight:g}=this;return Ys("svg:g",o).call(bc,this,r,o).call(Ac,this,{y:l&&a},0,ac).call((e=>e.selectAll().data(t).enter().append("line").call(kc,this).attr("x1",s&&!ys(i)?t=>s[t]+m:p+m).attr("x2",c&&!ys(i)?i.bandwidth?t=>c[t]+i.bandwidth()-g:t=>c[t]-g:u-d-g).attr("y1",l?t=>l[t]:(h+f-y)/2).attr("y2",l?t=>l[t]:(h+f-y)/2).call(dc,this,n).call(nu,this,n,o))).node()}}function ku(t,e){let{x:n=Lo,y:r,y1:o,y2:i,...a}=mu(e);return[o,i]=Mu(r,o,i),new wu(t,{...a,x:n,y1:o,y2:i})}function $u(t,e){let{y:n=Lo,x:r,x1:o,x2:i,...a}=yu(e);return[o,i]=Mu(r,o,i),new bu(t,{...a,y:n,x1:o,x2:i})}function Mu(t,e,n){if(null==t){if(void 0===e){if(void 0!==n)return[0,n]}else if(void 0===n)return[0,e]}else{if(void 0===e)return void 0===n?[0,t]:[t,n];if(void 0===n)return[t,e]}return[e,n]}function Au(t,...e){let n=e.length;for(let r=0,o=!0;r<n;++r)"function"!=typeof e[r]&&(o&&(t=t.slice(),o=!1),t.splice(r,2,t[r]+e[r]+t[r+1]),e.splice(r,1),--r,--n);return r=>{let o=t[0];for(let i=0;i<n;++i)o+=e[i](r)+t[i+1];return o}}const Lu={ariaLabel:"text",strokeLinejoin:"round",strokeWidth:3,paintOrder:"stroke"};class Eu extends Cc{constructor(t,e={}){const{x:n,y:r,text:o=($i(t)&&Mi(t)?Lo:Ao),frameAnchor:i,textAnchor:a=(/right$/i.test(i)?"end":/left$/i.test(i)?"start":"middle"),lineAnchor:l=(/^top/i.test(i)?"top":/^bottom/i.test(i)?"bottom":"middle"),lineHeight:s=1,lineWidth:c=1/0,textOverflow:u,monospace:f,fontFamily:h=(f?"ui-monospace, monospace":void 0),fontSize:d,fontStyle:p,fontVariant:y,fontWeight:m,rotate:g}=e,[v,x]=qo(g,0),[w,b]=function(t){return null==t||"number"==typeof t?[void 0,t]:"string"!=typeof t?[t,void 0]:(t=t.trim().toLowerCase(),Ru.has(t)||/^[+-]?\d*\.?\d+(e[+-]?\d+)?(\w*|%)$/.test(t)?[void 0,t]:[t,void 0])}(d);var k;if(super(t,{x:{value:n,scale:"x",optional:!0},y:{value:r,scale:"y",optional:!0},fontSize:{value:w,optional:!0},rotate:{value:(k=v,null==k?null:{transform:t=>vo(t,k,Float64Array),label:pi(k)}),optional:!0},text:{value:o,filter:Wr,optional:!0}},e,Lu),this.rotate=x,this.textAnchor=Lc(a,"middle"),this.lineAnchor=Po(l,"lineAnchor",["top","middle","bottom"]),this.lineHeight=+s,this.lineWidth=+c,this.textOverflow=zu(u),this.monospace=!!f,this.fontFamily=So(h),this.fontSize=b,this.fontStyle=So(p),this.fontVariant=So(y),this.fontWeight=So(m),this.frameAnchor=ji(i),!(this.lineWidth>=0))throw new Error(`invalid lineWidth: ${c}`);this.splitLines=Bu(this),this.clipLine=Du(this)}render(t,e,n,r,o){const{x:i,y:a}=e,{x:l,y:s,rotate:c,text:u,title:f,fontSize:h}=n,{rotate:d}=this,[p,y]=Nc(this,r);return Ys("svg:g",o).call(bc,this,r,o).call(Tu,this,u,r).call(Ac,this,{x:l&&i,y:s&&a}).call((e=>e.selectAll().data(t).enter().append("text").call(kc,this).call(Su,this,u,f).attr("transform",Au`translate(${l?t=>l[t]:p},${s?t=>s[t]:y})${c?t=>` rotate(${c[t]})`:d?` rotate(${d})`:""}`).call(Mc,"font-size",h&&(t=>h[t])).call(dc,this,n))).node()}}function zu(t){return null==t?null:Po(t,"textOverflow",["clip","ellipsis","clip-start","clip-end","ellipsis-start","ellipsis-middle","ellipsis-end"]).replace(/^(clip|ellipsis)$/,"$1-end")}function Su(t,e,n,r){if(!n)return;const{lineAnchor:o,lineHeight:i,textOverflow:a,splitLines:l,clipLine:s}=e;t.each((function(t){const e=l(ic(n[t])??"").map(s),c=e.length,u="top"===o?.71:"bottom"===o?1-c:(164-100*c)/200;if(c>1){let t=0;for(let n=0;n<c;++n){if(++t,!e[n])continue;const r=this.ownerDocument.createElementNS(Tn.svg,"tspan");r.setAttribute("x",0),n===t-1?r.setAttribute("y",(u+n)*i+"em"):r.setAttribute("dy",t*i+"em"),r.textContent=e[n],this.appendChild(r),t=0}}else u&&this.setAttribute("y",u*i+"em"),this.textContent=e[0];if(a&&!r&&e[0]!==n[t]){const e=this.ownerDocument.createElementNS(Tn.svg,"title");e.textContent=n[t],this.appendChild(e)}}))}function Ou(t,{x:e,y:n,...r}={}){return void 0===r.frameAnchor&&([e,n]=ri(e,n)),new Eu(t,{...r,x:e,y:n})}function Nu(t,{x:e=Lo,...n}={}){return new Eu(t,vu({...n,x:e}))}function Cu(t,{y:e=Lo,...n}={}){return new Eu(t,gu({...n,y:e}))}function Tu(t,e,n){Mc(t,"text-anchor",e.textAnchor),Mc(t,"font-family",e.fontFamily),Mc(t,"font-size",e.fontSize),Mc(t,"font-style",e.fontStyle),Mc(t,"font-variant",void 0===e.fontVariant?function(t){return t&&(Si(t)||Li(t))?"tabular-nums":void 0}(n):e.fontVariant),Mc(t,"font-weight",e.fontWeight)}const Ru=new Set(["inherit","initial","revert","unset","xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","larger","smaller"]);function Iu(t,e,n){const r=[];let o,i=0;for(const[a,l,s]of function*(t){let e=0,n=0;const r=t.length;for(;n<r;){let r=1;switch(t[n]){case"­":case"-":++n,yield[e,n,!1],e=n;break;case" ":for(yield[e,n,!1];" "===t[++n];);e=n;break;case"\r":"\n"===t[n+1]&&++r;case"\n":yield[e,n,!0],n+=r,e=n;break;default:++n}}yield[e,n,!0]}(t))void 0===o&&(o=a),i>o&&n(t,o,l)>e&&(r.push(t.slice(o,i)+("­"===t[i-1]?"-":"")),o=a),s?(r.push(t.slice(o,l)),o=void 0):i=l;return r}const Wu={a:56,b:63,c:57,d:63,e:58,f:37,g:62,h:60,i:26,j:26,k:55,l:26,m:88,n:60,o:60,p:62,q:62,r:39,s:54,t:38,u:60,v:55,w:79,x:54,y:55,z:55,A:69,B:67,C:73,D:74,E:61,F:58,G:76,H:75,I:28,J:55,K:67,L:58,M:89,N:75,O:78,P:65,Q:78,R:67,S:65,T:65,U:75,V:69,W:98,X:69,Y:67,Z:67,0:64,1:48,2:62,3:64,4:66,5:63,6:65,7:58,8:65,9:65," ":29,"!":32,'"':49,"'":31,"(":39,")":39,",":31,"-":48,".":31,"/":32,":":31,";":31,"?":52,"‘":31,"’":31,"“":47,"”":47,"…":82};function ju(t,e=0,n=t.length){let r=0;for(let o=e;o<n;o=Yu(t,o))r+=Wu[t[o]]??(Xu(t,o)?120:Wu.e);return r}function Fu(t,e=0,n=t.length){let r=0;for(let o=e;o<n;o=Yu(t,o))r+=Xu(t,o)?126:63;return r}function Bu({monospace:t,lineWidth:e,textOverflow:n}){if(null!=n||e==1/0)return t=>t.split(/\r\n?|\n/g);const r=t?Fu:ju,o=100*e;return t=>Iu(t,o,r)}function Du({monospace:t,lineWidth:e,textOverflow:n}){if(null==n||e==1/0)return t=>t;const r=t?Fu:ju,o=100*e;switch(n){case"clip-start":return t=>Vu(t,o,r,"");case"clip-end":return t=>Pu(t,o,r,"");case"ellipsis-start":return t=>Vu(t,o,r,qu);case"ellipsis-middle":return t=>function(t,e,n,r){t=t.trim();const o=n(t);if(o<=e)return t;const i=n(r)/2,[a,l]=_u(t,e/2,n,i),[s]=_u(t,o-e/2-l+i,n,-i);return s<0?r:t.slice(0,a).trimEnd()+r+t.slice(Yu(t,s)).trimStart()}(t,o,r,qu);case"ellipsis-end":return t=>Pu(t,o,r,qu)}}const qu="…";function _u(t,e,n,r){const o=[];let i=0;for(let a=0,l=0,s=t.length;a<s;a=l){l=Yu(t,a);const s=n(t,a,l);if(i+s>e){for(i+=r;i>e&&a>0;)l=a,a=o.pop(),i-=n(t,a,l);return[a,e-i]}i+=s,o.push(a)}return[-1,0]}function Pu(t,e,n,r){t=t.trim();const o=n(r),[i]=_u(t,e,n,o);return i<0?t:t.slice(0,i).trimEnd()+r}function Vu(t,e,n,r){const o=n(t=t.trim());if(o<=e)return t;const i=n(r),[a]=_u(t,o-e+i,n,-i);return a<0?r:r+t.slice(Yu(t,a)).trimStart()}const Hu=/[\p{Combining_Mark}\p{Emoji_Modifier}]+/uy,Uu=/\p{Extended_Pictographic}/uy;function Yu(t,e){return e+=function(t,e){const n=t.charCodeAt(e);if(n>=55296&&n<56320){const n=t.charCodeAt(e+1);return n>=56320&&n<57344}return!1}(t,e)?2:1,function(t,e){return!Gu(t,e)&&(Hu.lastIndex=e,Hu.test(t))}(t,e)&&(e=Hu.lastIndex),function(t,e){return 8205===t.charCodeAt(e)}(t,e)?Yu(t,e+1):e}function Gu(t,e){return t.charCodeAt(e)<128}function Xu(t,e){return!Gu(t,e)&&(Uu.lastIndex=e,Uu.test(t))}const Zu={ariaLabel:"vector",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinejoin:"round",strokeLinecap:"round"},Ju=3.5,Ku=5*Ju,Qu={draw(t,e,n){const r=e*n/Ku;t.moveTo(0,0),t.lineTo(0,-e),t.moveTo(-r,r-e),t.lineTo(0,-e),t.lineTo(r,r-e)}},tf={draw(t,e,n){t.moveTo(-n,0),t.lineTo(0,-e),t.lineTo(n,0)}},ef=new Map([["arrow",Qu],["spike",tf]]);class nf extends Cc{constructor(t,e={}){const{x:n,y:r,r:o=Ju,length:i,rotate:a,shape:l=Qu,anchor:s="middle",frameAnchor:c}=e,[u,f]=qo(i,12),[h,d]=qo(a,0);super(t,{x:{value:n,scale:"x",optional:!0},y:{value:r,scale:"y",optional:!0},length:{value:u,scale:"length",optional:!0},rotate:{value:h,optional:!0}},e,Zu),this.r=+o,this.length=f,this.rotate=d,this.shape=function(t){if(function(t){return t&&"function"==typeof t.draw}(t))return t;const e=ef.get(`${t}`.toLowerCase());if(e)return e;throw new Error(`invalid shape: ${t}`)}(l),this.anchor=Po(s,"anchor",["start","middle","end"]),this.frameAnchor=ji(c)}render(t,e,n,r,o){const{x:i,y:a}=e,{x:l,y:s,length:c,rotate:u}=n,{length:f,rotate:h,anchor:d,shape:p,r:y}=this,[m,g]=Nc(this,r);return Ys("svg:g",o).call(bc,this,r,o).call(Ac,this,{x:l&&i,y:s&&a}).call((e=>e.selectAll().data(t).enter().append("path").call(kc,this).attr("transform",Au`translate(${l?t=>l[t]:m},${s?t=>s[t]:g})${u?t=>` rotate(${u[t]})`:h?` rotate(${h})`:""}${"start"===d?"":"end"===d?c?t=>` translate(0,${c[t]})`:` translate(0,${f})`:c?t=>` translate(0,${c[t]/2})`:` translate(0,${f/2})`}`).attr("d",c?t=>{const e=jn();return p.draw(e,c[t],y),e}:(()=>{const t=jn();return p.draw(t,f,y),t})()).call(dc,this,n))).node()}}function rf(t,e={}){let{x:n,y:r,...o}=e;return void 0===e.frameAnchor&&([n,r]=ri(n,r)),new nf(t,{...o,x:n,y:r})}function of(t,e={}){const{x:n=Lo,...r}=e;return new nf(t,{...r,x:n})}function af(t,e={}){const{y:n=Lo,...r}=e;return new nf(t,{...r,y:n})}function lf(t,e={}){const{shape:n=tf,stroke:r=Zu.stroke,strokeWidth:o=1,fill:i=r,fillOpacity:a=.3,anchor:l="start",...s}=e;return rf(t,{...s,shape:n,stroke:r,strokeWidth:o,fill:i,fillOpacity:a,anchor:l})}function sf(t,e){return arguments.length<2&&!$i(t)&&(e=t,t=null),void 0===e&&(e={}),[t,e]}function cf({anchor:t}={},e){return void 0===t?e[0]:Po(t,"anchor",e)}function uf(t){return cf(t,["left","right"])}function ff(t){return cf(t,["right","left"])}function hf(t){return cf(t,["bottom","top"])}function df(t){return cf(t,["top","bottom"])}function pf(){const[t,e]=sf(...arguments);return vf("y",uf(e),t,e)}function yf(){const[t,e]=sf(...arguments);return vf("fy",ff(e),t,e)}function mf(){const[t,e]=sf(...arguments);return xf("x",hf(e),t,e)}function gf(){const[t,e]=sf(...arguments);return xf("fx",df(e),t,e)}function vf(t,e,n,{color:r="currentColor",opacity:o=1,stroke:i=r,strokeOpacity:a=o,strokeWidth:l=1,fill:s=r,fillOpacity:c=o,textAnchor:u,textStroke:f,textStrokeOpacity:h,textStrokeWidth:d,tickSize:p=("y"===t?6:0),tickPadding:y,tickRotate:m,x:g,margin:v,marginTop:x=(void 0===v?20:v),marginRight:w=(void 0===v?"right"===e?40:0:v),marginBottom:b=(void 0===v?20:v),marginLeft:k=(void 0===v?"left"===e?40:0:v),label:$,labelAnchor:M,labelArrow:A,labelOffset:L,ariaLabel:E=`${t}-axis`,...z}){return p=Oo(p),y=Oo(y),m=Oo(m),void 0!==M&&(M=Po(M,"labelAnchor",["center","top","bottom"])),A=Ff(A),Tc(p&&!Ri(i)?function(t,e,n,{strokeWidth:r=1,strokeLinecap:o=null,strokeLinejoin:i=null,facetAnchor:a=e+("y"===t?"-empty":""),frameAnchor:l=e,tickSize:s,inset:c=0,insetLeft:u=c,insetRight:f=c,dx:h=0,y:d=("y"===t?void 0:null),ariaLabel:p,...y}){return zf(af,t,n,{ariaLabel:`${p} tick`,ariaHidden:!0},{strokeWidth:r,strokeLinecap:o,strokeLinejoin:i,facetAnchor:a,frameAnchor:l,y:d,...y,dx:"left"===e?+h-ac+ +u:+h+ac-f,anchor:"start",length:s,shape:"left"===e?Rf:If})}(t,e,n,{stroke:i,strokeOpacity:a,strokeWidth:l,tickSize:p,tickPadding:y,tickRotate:m,x:g,ariaLabel:E,...z}):null,Ri(s)?null:function(t,e,n,{facetAnchor:r=e+("y"===t?"-empty":""),frameAnchor:o=e,tickSize:i,tickRotate:a=0,tickPadding:l=Math.max(3,9-i)+(Math.abs(a)>60?4*Math.cos(a*Yc):0),text:s,textAnchor:c=(Math.abs(a)>60?"middle":"left"===e?"end":"start"),lineAnchor:u=(a>60?"top":a<-60?"bottom":"middle"),fontVariant:f,inset:h=0,insetLeft:d=h,insetRight:p=h,dx:y=0,ariaLabel:m,y:g=("y"===t?void 0:null),...v}){return zf(Cu,t,n,{ariaLabel:`${m} tick label`},{facetAnchor:r,frameAnchor:o,text:s,textAnchor:c,lineAnchor:u,fontVariant:f,rotate:a,y:g,...v,dx:"left"===e?+y-i-l+ +d:+y+ +i+ +l-p},(function(t,n,r,o,i){void 0===f&&(this.fontVariant=Wf(t)),void 0===s&&(i.text=Sf(t,n,r,o,e))}))}(t,e,n,{fill:s,fillOpacity:c,stroke:f,strokeOpacity:h,strokeWidth:d,textAnchor:u,tickSize:p,tickPadding:y,tickRotate:m,x:g,marginTop:x,marginRight:w,marginBottom:b,marginLeft:k,ariaLabel:E,...z}),Ri(s)||null===$?null:Ou([],Ef({fill:s,fillOpacity:c,...z},(function(n,r,o,i,a){const l=i[t],{marginTop:s,marginRight:c,marginBottom:u,marginLeft:f}="y"===t&&a.inset||a,h=M??(l.bandwidth?"center":"top"),d=L??("right"===e?c:f)-3;return"center"===h?(this.textAnchor=void 0,this.lineAnchor="right"===e?"bottom":"top",this.frameAnchor=e,this.rotate=-90):(this.textAnchor="right"===e?"end":"start",this.lineAnchor=h,this.frameAnchor=`${h}-${e}`,this.rotate=0),this.dy="top"===h?3-s:"bottom"===h?u-3:0,this.dx="right"===e?d:-d,this.ariaLabel=`${E} label`,{facets:[[0]],channels:{text:{value:[jf(t,l,{anchor:e,label:$,labelAnchor:h,labelArrow:A})]}}}}))))}function xf(t,e,n,{color:r="currentColor",opacity:o=1,stroke:i=r,strokeOpacity:a=o,strokeWidth:l=1,fill:s=r,fillOpacity:c=o,textAnchor:u,textStroke:f,textStrokeOpacity:h,textStrokeWidth:d,tickSize:p=("x"===t?6:0),tickPadding:y,tickRotate:m,y:g,margin:v,marginTop:x=(void 0===v?"top"===e?30:0:v),marginRight:w=(void 0===v?20:v),marginBottom:b=(void 0===v?"bottom"===e?30:0:v),marginLeft:k=(void 0===v?20:v),label:$,labelAnchor:M,labelArrow:A,labelOffset:L,ariaLabel:E=`${t}-axis`,...z}){return p=Oo(p),y=Oo(y),m=Oo(m),void 0!==M&&(M=Po(M,"labelAnchor",["center","left","right"])),A=Ff(A),Tc(p&&!Ri(i)?function(t,e,n,{strokeWidth:r=1,strokeLinecap:o=null,strokeLinejoin:i=null,facetAnchor:a=e+("x"===t?"-empty":""),frameAnchor:l=e,tickSize:s,inset:c=0,insetTop:u=c,insetBottom:f=c,dy:h=0,x:d=("x"===t?void 0:null),ariaLabel:p,...y}){return zf(of,t,n,{ariaLabel:`${p} tick`,ariaHidden:!0},{strokeWidth:r,strokeLinejoin:i,strokeLinecap:o,facetAnchor:a,frameAnchor:l,x:d,...y,dy:"bottom"===e?+h-ac-f:+h+ac+ +u,anchor:"start",length:s,shape:"bottom"===e?Cf:Tf})}(t,e,n,{stroke:i,strokeOpacity:a,strokeWidth:l,tickSize:p,tickPadding:y,tickRotate:m,y:g,ariaLabel:E,...z}):null,Ri(s)?null:function(t,e,n,{facetAnchor:r=e+("x"===t?"-empty":""),frameAnchor:o=e,tickSize:i,tickRotate:a=0,tickPadding:l=Math.max(3,9-i)+(Math.abs(a)>=10?4*Math.cos(a*Yc):0),text:s,textAnchor:c=(Math.abs(a)>=10?a<0^"bottom"===e?"start":"end":"middle"),lineAnchor:u=(Math.abs(a)>=10?"middle":"bottom"===e?"top":"bottom"),fontVariant:f,inset:h=0,insetTop:d=h,insetBottom:p=h,dy:y=0,x:m=("x"===t?void 0:null),ariaLabel:g,...v}){return zf(Nu,t,n,{ariaLabel:`${g} tick label`},{facetAnchor:r,frameAnchor:o,text:void 0===s?null:s,textAnchor:c,lineAnchor:u,fontVariant:f,rotate:a,x:m,...v,dy:"bottom"===e?+y+ +i+ +l-p:+y-i-l+ +d},(function(t,n,r,o,i){void 0===f&&(this.fontVariant=Wf(t)),void 0===s&&(i.text=Sf(t,n,r,o,e))}))}(t,e,n,{fill:s,fillOpacity:c,stroke:f,strokeOpacity:h,strokeWidth:d,textAnchor:u,tickSize:p,tickPadding:y,tickRotate:m,y:g,marginTop:x,marginRight:w,marginBottom:b,marginLeft:k,ariaLabel:E,...z}),Ri(s)||null===$?null:Ou([],Ef({fill:s,fillOpacity:c,...z},(function(n,r,o,i,a){const l=i[t],{marginTop:s,marginRight:c,marginBottom:u,marginLeft:f}="x"===t&&a.inset||a,h=M??(l.bandwidth?"center":"right"),d=L??("top"===e?s:u)-3;return"center"===h?(this.frameAnchor=e,this.textAnchor=void 0):(this.frameAnchor=`${e}-${h}`,this.textAnchor="right"===h?"end":"start"),this.lineAnchor=e,this.dy="top"===e?-d:d,this.dx="right"===h?c-3:"left"===h?3-f:0,this.ariaLabel=`${E} label`,{facets:[[0]],channels:{text:{value:[jf(t,l,{anchor:e,label:$,labelAnchor:h,labelArrow:A})]}}}}))))}function wf(){const[t,e]=sf(...arguments);return Mf("y",uf(e),t,e)}function bf(){const[t,e]=sf(...arguments);return Mf("fy",ff(e),t,e)}function kf(){const[t,e]=sf(...arguments);return Af("x",hf(e),t,e)}function $f(){const[t,e]=sf(...arguments);return Af("fx",df(e),t,e)}function Mf(t,e,n,{y:r=("y"===t?void 0:null),x:o=null,x1:i=("left"===e?o:null),x2:a=("right"===e?o:null),ariaLabel:l=`${t}-grid`,ariaHidden:s=!0,...c}){return zf($u,t,n,{ariaLabel:l,ariaHidden:s},{y:r,x1:i,x2:a,...Lf(c)})}function Af(t,e,n,{x:r=("x"===t?void 0:null),y:o=null,y1:i=("top"===e?o:null),y2:a=("bottom"===e?o:null),ariaLabel:l=`${t}-grid`,ariaHidden:s=!0,...c}){return zf(ku,t,n,{ariaLabel:l,ariaHidden:s},{x:r,y1:i,y2:a,...Lf(c)})}function Lf({color:t="currentColor",opacity:e=.1,stroke:n=t,strokeOpacity:r=e,strokeWidth:o=1,...i}){return{stroke:n,strokeOpacity:r,strokeWidth:o,...i}}function Ef({fill:t,fillOpacity:e,fontFamily:n,fontSize:r,fontStyle:o,fontVariant:i,fontWeight:a,monospace:l,pointerEvents:s,shapeRendering:c,clip:u=!1},f){return[,t]=Do(t),[,e]=qo(e),{facet:"super",x:null,y:null,fill:t,fillOpacity:e,fontFamily:n,fontSize:r,fontStyle:o,fontVariant:i,fontWeight:a,monospace:l,pointerEvents:s,shapeRendering:c,clip:u,initializer:f}}function zf(t,e,n,r,o,i){let a;const l=ra(o).initializer,s=t(n,ra({...o,initializer:function(t,n,r,l,s,c){const u=null==t&&("fx"===e||"fy"===e),{[e]:f}=l;if(!f)throw new Error(`missing scale: ${e}`);const h=f.domain();let{interval:d,ticks:p,tickFormat:y,tickSpacing:m=("x"===e?80:35)}=o;if("string"==typeof p&&Bf(f)&&(d=p,p=void 0),void 0===p&&(p=wi(d,f.type)??function(t,e){const[n,r]=De(t.range());return(r-n)/e}(f,m)),null==t){if($i(p))t=Ho(p);else if(bi(p))t=Nf(p,...De(h));else if(f.interval){let e=f.interval;if(f.ticks){const[n,r]=De(h);e=lo(e,(r-n)/e[Kr]/p)??e,t=Nf(e,n,r)}else{e=lo(e,(t=h).length/p)??e,e!==f.interval&&(t=Nf(e,...De(t)))}if(e===f.interval){const e=Math.round(t.length/p);e>1&&(t=t.filter(((t,n)=>n%e==0)))}}else t=f.ticks?f.ticks(p):h;if(!f.ticks&&t.length&&t!==h){const n=new et(h);(t=t.filter((t=>n.has(t)))).length||jl(`Warning: the ${e}-axis ticks appear to not align with the scale domain, resulting in no ticks. Try different ticks?`)}"y"===e||"x"===e?n=[ai(t)]:a[e]={scale:e,value:Lo}}i?.call(this,f,t,p,y,a);const g=Object.fromEntries(Object.entries(a).map((([e,n])=>[e,{...n,value:vo(t,n.value)}])));return u&&(n=c.filterFacets(t,g)),{data:t,facets:n,channels:g}}},l));return null==n?(a=s.channels,s.channels={}):a={},void 0!==r&&Object.assign(s,r),void 0===s.clip&&(s.clip=!1),s}function Sf(t,e,n,r,o){return{value:Of(t,e,n,r,o)}}function Of(t,e,n,r,o){return"function"!=typeof r||"log"===t.type&&t.tickFormat?void 0===r&&e&&Li(e)?co(t.type,e,o)??ic:t.tickFormat?t.tickFormat("number"==typeof n?n:null,r):"string"==typeof r&&t.domain().length>0?(Li(t.domain())?R:In)(r):void 0===r?ic:Ro(r):r}function Nf(t,e,n){return t.range(e,t.offset(t.floor(n)))}const Cf={draw(t,e){t.moveTo(0,0),t.lineTo(0,e)}},Tf={draw(t,e){t.moveTo(0,0),t.lineTo(0,-e)}},Rf={draw(t,e){t.moveTo(0,0),t.lineTo(-e,0)}},If={draw(t,e){t.moveTo(0,0),t.lineTo(e,0)}};function Wf(t){return t.bandwidth&&!t.interval?void 0:"tabular-nums"}function jf(t,e,{anchor:n,label:r=e.label,labelAnchor:o,labelArrow:i}={}){if(!(null==r||r.inferred&&Bf(e)&&/^(date|time|year)$/i.test(r))){if(r=String(r),"auto"===i&&(i=(!e.bandwidth||e.interval)&&!/[↑↓→←]/.test(r)),!i)return r;if(!0===i){const n=ts(e);n&&(i=/x$/.test(t)||"center"===o?/x$/.test(t)===n<0?"left":"right":n<0?"up":"down")}switch(i){case"left":return`← ${r}`;case"right":return`${r} →`;case"up":return"right"===n?`${r} ↑`:`↑ ${r}`;case"down":return"right"===n?`${r} ↓`:`↓ ${r}`}return r}}function Ff(t="auto"){return!Ri(t)&&("boolean"==typeof t?t:Po(t,"labelArrow",["auto","up","right","down","left"]))}function Bf(t){return Li(t.domain())}function Df(t,e){if(null==e)return e;const n=t(e);if(!n)throw new Error(`scale not found: ${e}`);return n}function qf(t,e={},n){let{columns:r,tickFormat:o,fontVariant:i=Uc(t),swatchSize:a=15,swatchWidth:l=a,swatchHeight:s=a,marginLeft:c=0,className:u,style:f,width:h}=e;const d=Us(e);u=Sc(u),o=Of(t.scale,t.domain,void 0,o);const p=Ys("div",d).attr("class",`${u}-swatches ${u}-swatches-${null!=r?"columns":"wrap"}`);let y;return null!=r?(y=`:where(.${u}-swatches-columns .${u}-swatch) {\n  display: flex;\n  align-items: center;\n  break-inside: avoid;\n  padding-bottom: 1px;\n}\n:where(.${u}-swatches-columns .${u}-swatch::before) {\n  flex-shrink: 0;\n}\n:where(.${u}-swatches-columns .${u}-swatch-label) {\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}`,p.style("columns",r).selectAll().data(t.domain).enter().append("div").attr("class",`${u}-swatch`).call(n,t,l,s).call((t=>t.append("div").attr("class",`${u}-swatch-label`).attr("title",o).text(o)))):(y=`:where(.${u}-swatches-wrap) {\n  display: flex;\n  align-items: center;\n  min-height: 33px;\n  flex-wrap: wrap;\n}\n:where(.${u}-swatches-wrap .${u}-swatch) {\n  display: inline-flex;\n  align-items: center;\n  margin-right: 1em;\n}`,p.selectAll().data(t.domain).enter().append("span").attr("class",`${u}-swatch`).call(n,t,l,s).append((function(){return this.ownerDocument.createTextNode(o.apply(this,arguments))}))),p.call((t=>t.insert("style","*").text(`:where(.${u}-swatches) {\n  font-family: system-ui, sans-serif;\n  font-size: 10px;\n  margin-bottom: 0.5em;\n}\n:where(.${u}-swatch > svg) {\n  margin-right: 0.5em;\n  overflow: visible;\n}\n${y}`))).style("margin-left",c?+c+"px":null).style("width",void 0===h?null:+h+"px").style("font-variant",Lc(i,"normal")).call(Oc,f).node()}const _f=new Map([["symbol",function(t,{fill:e=(void 0!==t.hint?.fill?t.hint.fill:"none"),fillOpacity:n=1,stroke:r=(void 0!==t.hint?.stroke?t.hint.stroke:Ri(e)?"currentColor":"none"),strokeOpacity:o=1,strokeWidth:i=1.5,r:a=4.5,...l}={},s){const[c,u]=Do(e),[f,h]=Do(r),d=Df(s,c),p=Df(s,f),y=a*a*Math.PI;return n=qo(n)[1],o=qo(o)[1],i=qo(i)[1],qf(t,l,((e,r,a,l)=>e.append("svg").attr("viewBox","-8 -8 16 16").attr("width",a).attr("height",l).attr("fill","color"===c?t=>d.scale(t):u).attr("fill-opacity",n).attr("stroke","color"===f?t=>p.scale(t):h).attr("stroke-opacity",o).attr("stroke-width",i).append("path").attr("d",(e=>{const n=jn();return t.scale(e).draw(n,y),n}))))}],["color",Hf],["opacity",function({type:t,interpolate:e,...n},{legend:r=!0,color:o=Fn(0,0,0),...i}){if(!e)throw new Error(`${t} opacity scales are not supported`);!0===r&&(r="ramp");if("ramp"!==`${r}`.toLowerCase())throw new Error(`${r} opacity legends are not supported`);return Hf({type:t,...n,interpolate:Uf(o)},{legend:r,...i})}]]);function Pf(t={}){for(const[e,n]of _f){const r=t[e];if(Qo(r)){const o=Us(t);let i;if("symbol"===e){const{fill:e,stroke:n=(void 0===e&&Qo(t.color)?"color":void 0)}=t;i={fill:e,stroke:n}}return n(ls(e,r,i),Vf(o,r,t),(e=>Qo(t[e])?ls(e,t[e]):null))}}throw new Error("unknown legend type; no scale found")}function Vf({className:t,...e},{label:n,ticks:r,tickFormat:o}={},i){return function(t={},...e){let n=t;for(const r of e)for(const e in r)if(void 0===n[e]){const o=r[e];n===t?n={...n,[e]:o}:n[e]=o}return n}(i,{className:t,...e},{label:n,ticks:r,tickFormat:o})}function Hf(t,{legend:e=!0,...n}){if(!0===e&&(e="ordinal"===t.type?"swatches":"ramp"),void 0!==t.domain)switch(`${e}`.toLowerCase()){case"swatches":return function(t,{opacity:e,...n}={}){if(!ds(t)&&!ps(t))throw new Error(`swatches legend requires ordinal or threshold color scale (not ${t.type})`);return qf(t,n,((t,n,r,o)=>t.append("svg").attr("width",r).attr("height",o).attr("fill",n.scale).attr("fill-opacity",qo(e)[1]).append("rect").attr("width","100%").attr("height","100%")))}(t,n);case"ramp":return function(t,e){let{label:n=t.label,tickSize:r=6,width:o=240,height:i=44+r,marginTop:a=18,marginRight:l=0,marginBottom:s=16+r,marginLeft:c=0,style:u,ticks:f=(o-c-l)/64,tickFormat:h,fontVariant:d=Uc(t),round:p=!0,opacity:y,className:m}=e;const g=Us(e);m=Sc(m),y=qo(y)[1],null===h&&(h=()=>null);const v=Ys("svg",g).attr("class",`${m}-ramp`).attr("font-family","system-ui, sans-serif").attr("font-size",10).attr("width",o).attr("height",i).attr("viewBox",`0 0 ${o} ${i}`).call((t=>t.append("style").text(`:where(.${m}-ramp) {\n  display: block;\n  height: auto;\n  height: intrinsic;\n  max-width: 100%;\n  overflow: visible;\n}\n:where(.${m}-ramp text) {\n  white-space: pre;\n}`))).call(Oc,u);let x,w=t=>t.selectAll(".tick line").attr("y1",a+s-i);const b=p?(t,e)=>t.rangeRound(e):(t,e)=>t.range(e),{type:k,domain:$,range:M,interpolate:A,scale:L,pivot:E}=t;if(A){const t=void 0===M?A:Ue(1===A.length?Rl(A):A,M);x=b(L.copy(),ht(_e(c,o-l),Math.min($.length+(void 0!==E),void 0===M?1/0:M.length)));const e=256,n=g.document.createElement("canvas");n.width=e,n.height=1;const r=n.getContext("2d");for(let n=0,o=e-1;n<e;++n)r.fillStyle=t(n/o),r.fillRect(n,0,1,1);v.append("image").attr("opacity",y).attr("x",c).attr("y",a).attr("width",o-c-l).attr("height",i-a-s).attr("preserveAspectRatio","none").attr("xlink:href",n.toDataURL())}else if("threshold"===k){const t=$,e=void 0===h?t=>t:"string"==typeof h?In(h):h;x=b(Ie().domain([-1,M.length-1]),[c,o-l]),v.append("g").attr("fill-opacity",y).selectAll().data(M).enter().append("rect").attr("x",((t,e)=>x(e-1))).attr("y",a).attr("width",((t,e)=>x(e)-x(e-1))).attr("height",i-a-s).attr("fill",(t=>t)),f=Yo(t,((t,e)=>e)),h=n=>e(t[n],n)}else x=b(sn().domain($),[c,o-l]),v.append("g").attr("fill-opacity",y).selectAll().data($).enter().append("rect").attr("x",x).attr("y",a).attr("width",Math.max(0,x.bandwidth()-1)).attr("height",i-a-s).attr("fill",L),w=()=>{};return v.append("g").attr("transform",`translate(0,${i-s})`).call(Wn(x).ticks(Array.isArray(f)?null:f,"string"==typeof h?h:void 0).tickFormat("function"==typeof h?h:void 0).tickSize(r).tickValues(Array.isArray(f)?f:null)).attr("font-size",null).attr("font-family",null).attr("font-variant",Lc(d,"normal")).call(w).call((t=>t.select(".domain").remove())),void 0!==n&&v.append("text").attr("x",c).attr("y",a-6).attr("fill","currentColor").attr("font-weight","bold").text(n),v.node()}(t,n);default:throw new Error(`unknown legend type: ${e}`)}}function Uf(t){const{r:e,g:n,b:r}=Fn(t)||Fn(0,0,0);return t=>`rgba(${e},${n},${r},${t})`}function Yf(t={},e="x"){return Xo(t)?t:{...t,[e]:Lo}}function Gf(t={},e="y"){return Zo(t)?t:{...t,[e]:Lo}}function Xf(t,e){if(1===e.length)return{data:t,facets:e};const n=ii(t),r=new Uint8Array(n);let o=0;for(const t of e)for(const e of t)r[e]&&++o,r[e]=1;if(0===o)return{data:t,facets:e};const i=(t=Go(t))[go]=new Uint32Array(n+o);e=e.map((t=>Go(t,Uint32Array)));let a=n;r.fill(0);for(const n of e)for(let e=0,o=n.length;e<o;++e){const o=n[e];r[o]?(n[e]=a,t[a]=t[o],i[a]=o,++a):i[o]=o,r[o]=1}return{data:t,facets:e}}function Zf(t={},e={}){1===arguments.length&&([t,e]=oh(t));const{y1:n,y:r=n,x:o,...i}=e,[a,l,s,c]=ah(r,o,"y","x",t,i);return{...a,y1:n,y:l,x1:s,x2:c,x:yi(s,c)}}function Jf(t={},e={}){1===arguments.length&&([t,e]=oh(t));const{y1:n,y:r=n,x:o}=e,[i,a,l]=ah(r,o,"y","x",t,e);return{...i,y1:n,y:a,x:l}}function Kf(t={},e={}){1===arguments.length&&([t,e]=oh(t));const{y1:n,y:r=n,x:o}=e,[i,a,,l]=ah(r,o,"y","x",t,e);return{...i,y1:n,y:a,x:l}}function Qf(t={},e={}){1===arguments.length&&([t,e]=oh(t));const{x1:n,x:r=n,y:o,...i}=e,[a,l,s,c]=ah(r,o,"x","y",t,i);return{...a,x1:n,x:l,y1:s,y2:c,y:yi(s,c)}}function th(t={},e={}){1===arguments.length&&([t,e]=oh(t));const{x1:n,x:r=n,y:o}=e,[i,a,l]=ah(r,o,"x","y",t,e);return{...i,x1:n,x:a,y:l}}function eh(t={},e={}){1===arguments.length&&([t,e]=oh(t));const{x1:n,x:r=n,y:o}=e,[i,a,,l]=ah(r,o,"x","y",t,e);return{...i,x1:n,x:a,y:l}}function nh({x:t,x1:e,x2:n,...r}={}){return r=Wc(r,"y"),void 0===e&&void 0===n?Zf({x:t,...r}):([e,n]=ni(t,e,n),{...r,x1:e,x2:n})}function rh({y:t,y1:e,y2:n,...r}={}){return r=Wc(r,"x"),void 0===e&&void 0===n?Qf({y:t,...r}):([e,n]=ni(t,e,n),{...r,y1:e,y2:n})}function oh(t){const{offset:e,order:n,reverse:r,...o}=t;return[{offset:e,order:n,reverse:r},o]}const ih={length:!0};function ah(t,e=Eo,n,r,{offset:o,order:i,reverse:a},l){if(null===e)throw new Error(`stack requires ${r}`);const s=oi(l),[c,u]=di(t),[f,h]=hi(e),[d,p]=hi(e);return f.hint=d.hint=ih,o=function(t){if(null==t)return;if("function"==typeof t)return t;switch(`${t}`.toLowerCase()){case"expand":case"normalize":return sh;case"center":case"silhouette":return ch;case"wiggle":return uh}throw new Error(`unknown offset: ${t}`)}(o),i=function(t,e,n){if(void 0===t&&e===uh)return dh(Rr);if(null==t)return;if("string"==typeof t){const e=t.startsWith("-"),r=e?Ir:Rr;switch((e?t.slice(1):t).toLowerCase()){case"value":case n:return function(t){return(e,n,r)=>(e,n)=>t(r[e],r[n])}(r);case"z":return function(t){return(e,n,r,o)=>(e,n)=>t(o[e],o[n])}(r);case"sum":return function(t){return mh(t,((t,e,n,r)=>Dn(ai(t),(t=>tt(t,(t=>n[t]))),(t=>r[t]))))}(r);case"appearance":return function(t){return mh(t,((t,e,n,r)=>Dn(ai(t),(t=>e[qn(t,(t=>n[t]))]),(t=>r[t]))))}(r);case"inside-out":return dh(r)}return ph(Mo(t))}if("function"==typeof t)return(1===t.length?ph:yh)(t);if(po(t))return r=t,mh(Rr,(()=>r));var r;throw new Error(`invalid order: ${t}`)}(i,o,r),[na(l,((r,l,c)=>{({data:r,facets:l}=Xf(r,l));const f=null==t?void 0:u(mi(vo(r,t),c?.[n])),d=vo(r,e,Float64Array),y=vo(r,s),m=i&&i(r,f,d,y),g=ii(r),v=h(new Float64Array(g)),x=p(new Float64Array(g)),w=[];for(const t of l){const e=f?Array.from(J(t,(t=>f[t])).values()):[t];if(m)for(const t of e)t.sort(m);for(const t of e){let e=0,n=0;a&&t.reverse();for(const r of t){const t=d[r];t<0?e=x[r]=(v[r]=e)+t:t>0?n=x[r]=(v[r]=n)+t:x[r]=v[r]=n}}w.push(e)}return o&&o(w,v,x,y),{data:r,facets:l}})),c,f,d]}function lh(t,e){let n=0,r=0;for(const o of t){const t=e[o];t<n&&(n=t),t>r&&(r=t)}return[n,r]}function sh(t,e,n){for(const r of t)for(const t of r){const[r,o]=lh(t,n);for(const i of t){const t=1/(o-r||1);e[i]=t*(e[i]-r),n[i]=t*(n[i]-r)}}}function ch(t,e,n){for(const r of t){for(const t of r){const[r,o]=lh(t,n);for(const i of t){const t=(o+r)/2;e[i]-=t,n[i]-=t}}fh(r,e,n)}hh(t,e,n)}function uh(t,e,n,r){for(const o of t){const t=new hn;let i=0;for(const a of o){let o=-1;const l=a.map((t=>Math.abs(n[t]-e[t]))),s=a.map((i=>{o=r?r[i]:++o;const a=n[i]-e[i],l=t.has(o)?a-t.get(o):0;return t.set(o,a),l})),c=[0,...Bn(s)];for(const t of a)e[t]+=i,n[t]+=i;const u=tt(l);u&&(i-=tt(l,((t,e)=>(s[e]/2+c[e])*t))/u)}fh(o,e,n)}hh(t,e,n)}function fh(t,e,n){const r=ct(t,(t=>ct(t,(t=>e[t]))));for(const o of t)for(const t of o)e[t]-=r,n[t]-=r}function hh(t,e,n){const r=t.length;if(1===r)return;const o=t.map((t=>t.flat())),i=o.map((t=>(ct(t,(t=>e[t]))+N(t,(t=>n[t])))/2)),a=ct(i);for(let t=0;t<r;t++){const r=a-i[t];for(const i of o[t])e[i]+=r,n[i]+=r}}function dh(t){return mh(t,((t,e,n,r)=>{const o=ai(t),i=Dn(o,(t=>e[qn(t,(t=>n[t]))]),(t=>r[t])),a=Q(o,(t=>tt(t,(t=>n[t]))),(t=>r[t])),l=[],s=[];let c=0;for(const t of i)c<0?(c+=a.get(t),l.push(t)):(c-=a.get(t),s.push(t));return s.reverse().concat(l)}))}function ph(t){return e=>{const n=vo(e,t);return(t,e)=>Rr(n[t],n[e])}}function yh(t){return e=>po(e)?(n,r)=>t(e[n],e[r]):(n,r)=>t(e.get(n),e.get(r))}function mh(t,e){return(n,r,o,i)=>{if(!i)throw new Error("missing channel: z");const a=new hn(e(n,r,o,i).map(((t,e)=>[t,e])));return(e,n)=>t(a.get(i[e]),a.get(i[n]))}}const gh={ariaLabel:"rect"};class vh extends Cc{constructor(t,e={}){const{x1:n,y1:r,x2:o,y2:i}=e;super(t,{x1:{value:n,scale:"x",type:null!=n&&null==o?"band":void 0,optional:!0},y1:{value:r,scale:"y",type:null!=r&&null==i?"band":void 0,optional:!0},x2:{value:o,scale:"x",optional:!0},y2:{value:i,scale:"y",optional:!0}},e,gh),xh(this,e),wh(this,e)}render(t,e,n,r,o){const{x:i,y:a}=e;let{x1:l,y1:s,x2:c,y2:u}=n;const{marginTop:f,marginRight:h,marginBottom:d,marginLeft:p,width:y,height:m}=r,{projection:g}=o,{insetTop:v,insetRight:x,insetBottom:w,insetLeft:b}=this,{rx:k,ry:$,rx1y1:M,rx1y2:A,rx2y1:L,rx2y2:E}=this;(l||c)&&!g&&ys(i)&&(l=c=null),(s||u)&&!g&&ys(a)&&(s=u=null);const z=i?.bandwidth?i.bandwidth():0,S=a?.bandwidth?a.bandwidth():0;return Ys("svg:g",o).call(bc,this,r,o).call(Ac,this,{},0,0).call((e=>e.selectAll().data(t).enter().call(M||A||L||E?t=>t.append("path").call(kc,this).call(bh,l&&c?t=>l[t]+(c[t]<l[t]?-x:b):l?t=>l[t]+b:p+b,s&&u?t=>s[t]+(u[t]<s[t]?-w:v):s?t=>s[t]+v:f+v,l&&c?t=>c[t]-(c[t]<l[t]?-b:x):l?t=>l[t]+z-x:y-h-x,s&&u?t=>u[t]-(u[t]<s[t]?-v:w):s?t=>s[t]+S-w:m-d-w,this).call(dc,this,n):t=>t.append("rect").call(kc,this).attr("x",l?c?t=>Math.min(l[t],c[t])+b:t=>l[t]+b:p+b).attr("y",s?u?t=>Math.min(s[t],u[t])+v:t=>s[t]+v:f+v).attr("width",l?c?t=>Math.max(0,Math.abs(c[t]-l[t])+z-b-x):z-b-x:y-h-p-x-b).attr("height",s?u?t=>Math.max(0,Math.abs(s[t]-u[t])+S-v-w):S-v-w:m-f-d-v-w).call(Mc,"rx",k).call(Mc,"ry",$).call(dc,this,n)))).node()}}function xh(t,{inset:e=0,insetTop:n=e,insetRight:r=e,insetBottom:o=e,insetLeft:i=e}={}){t.insetTop=Oo(n),t.insetRight=Oo(r),t.insetBottom=Oo(o),t.insetLeft=Oo(i)}function wh(t,{r:e,rx:n,ry:r,rx1:o=e,ry1:i=e,rx2:a=e,ry2:l=e,rx1y1:s=(void 0!==o?+o:void 0!==i?+i:0),rx1y2:c=(void 0!==o?+o:void 0!==l?+l:0),rx2y1:u=(void 0!==a?+a:void 0!==i?+i:0),rx2y2:f=(void 0!==a?+a:void 0!==l?+l:0)}={}){s||c||u||f?(t.rx1y1=s,t.rx1y2=c,t.rx2y1=u,t.rx2y2=f):(t.rx=Lc(n,"auto"),t.ry=Lc(r,"auto"))}function bh(t,e,n,r,o,i){const{rx1y1:a,rx1y2:l,rx2y1:s,rx2y2:c}=i;"function"!=typeof e&&(e=Ro(e)),"function"!=typeof n&&(n=Ro(n)),"function"!=typeof r&&(r=Ro(r)),"function"!=typeof o&&(o=Ro(o));const u=Math.max(Math.abs(a+s),Math.abs(l+c)),f=Math.max(Math.abs(a+l),Math.abs(s+c));t.attr("d",(t=>{const i=e(t),h=n(t),d=r(t),p=o(t),y=i>d,m=h>p,g=y?d:i,v=y?i:d,x=m?p:h,w=m?h:p,b=Math.min(1,(v-g)/u,(w-x)/f),k=b*(y?m?c:s:m?l:a),$=b*(y?m?l:a:m?c:s),M=b*(y?m?a:l:m?s:c),A=b*(y?m?s:c:m?a:l);return`M${g},${x+$h(k,A)}A${k},${k} 0 0 ${k<0?0:1} ${g+kh(k,A)},${x}H${v-kh($,M)}A${$},${$} 0 0 ${$<0?0:1} ${v},${x+$h($,M)}V${w-$h(M,$)}A${M},${M} 0 0 ${M<0?0:1} ${v-kh(M,$)},${w}H${g+kh(A,k)}A${A},${A} 0 0 ${A<0?0:1} ${g},${w-$h(A,k)}Z`}))}function kh(t,e){return e<0?t:Math.abs(t)}function $h(t,e){return e<0?Math.abs(t):t}function Mh(t,e){return new vh(t,du(pu(e)))}function Ah(t,e={}){return Jo(e)||(e={...e,y:Ao,x2:Lo,interval:1}),new vh(t,nh(pu(Yf(e))))}function Lh(t,e={}){return Jo(e)||(e={...e,x:Ao,y2:Lo,interval:1}),new vh(t,rh(du(Gf(e))))}const Eh={ariaLabel:"frame",fill:"none",stroke:"currentColor",clip:!1},zh={ariaLabel:"frame",fill:null,stroke:"currentColor",strokeLinecap:"square",clip:!1};class Sh extends Cc{constructor(t={}){const{anchor:e=null}=t;super($o,void 0,t,null==e?Eh:zh),this.anchor=_o(e,"anchor",["top","right","bottom","left"]),xh(this,t),e||wh(this,t)}render(t,e,n,r,o){const{marginTop:i,marginRight:a,marginBottom:l,marginLeft:s,width:c,height:u}=r,{anchor:f,insetTop:h,insetRight:d,insetBottom:p,insetLeft:y}=this,{rx:m,ry:g,rx1y1:v,rx1y2:x,rx2y1:w,rx2y2:b}=this,k=s+y,$=c-a-d,M=i+h,A=u-l-p;return Ys(f?"svg:line":v||x||w||b?"svg:path":"svg:rect",o).datum(0).call(bc,this,r,o).call(kc,this).call(dc,this,n).call(Ac,this,{}).call("left"===f?t=>t.attr("x1",k).attr("x2",k).attr("y1",M).attr("y2",A):"right"===f?t=>t.attr("x1",$).attr("x2",$).attr("y1",M).attr("y2",A):"top"===f?t=>t.attr("x1",k).attr("x2",$).attr("y1",M).attr("y2",M):"bottom"===f?t=>t.attr("x1",k).attr("x2",$).attr("y1",A).attr("y2",A):v||x||w||b?t=>t.call(bh,k,M,$,A,this):t=>t.attr("x",k).attr("y",M).attr("width",$-k).attr("height",A-M).attr("rx",m).attr("ry",g)).node()}}function Oh(t){return new Sh(t)}const Nh={ariaLabel:"tip",fill:"var(--plot-background)",stroke:"currentColor"},Ch=new Set(["geometry","href","src","ariaLabel","scales"]);class Th extends Cc{constructor(t,e={}){e.tip&&(e={...e,tip:!1}),void 0===e.title&&$i(t)&&Mi(t)&&(e={...e,title:Lo});const{x:n,y:r,x1:o,x2:i,y1:a,y2:l,anchor:s,preferredAnchor:c="bottom",monospace:u,fontFamily:f=(u?"ui-monospace, monospace":void 0),fontSize:h,fontStyle:d,fontVariant:p,fontWeight:y,lineHeight:m=1,lineWidth:g=20,frameAnchor:v,format:x,textAnchor:w="start",textOverflow:b,textPadding:k=8,title:$,pointerSize:M=12,pathFilter:A="drop-shadow(0 3px 4px rgba(0,0,0,0.2))"}=e;super(t,{x:{value:null!=o&&null!=i?null:n,scale:"x",optional:!0},y:{value:null!=a&&null!=l?null:r,scale:"y",optional:!0},x1:{value:o,scale:"x",optional:null==i},y1:{value:a,scale:"y",optional:null==l},x2:{value:i,scale:"x",optional:null==o},y2:{value:l,scale:"y",optional:null==a},title:{value:$,optional:!0}},e,Nh),this.anchor=Wi(s,"anchor"),this.preferredAnchor=Wi(c,"preferredAnchor"),this.frameAnchor=ji(v),this.textAnchor=Lc(w,"middle"),this.textPadding=+k,this.pointerSize=+M,this.pathFilter=So(A),this.lineHeight=+m,this.lineWidth=+g,this.textOverflow=zu(b),this.monospace=!!u,this.fontFamily=So(f),this.fontSize=Oo(h),this.fontStyle=So(d),this.fontVariant=So(p),this.fontWeight=So(y);for(const t in Nh)t in this.channels&&(this[t]=Nh[t]);this.splitLines=Bu(this),this.clipLine=Du(this),this.format="string"==typeof x||"function"==typeof x?{title:x}:{...x}}render(t,e,n,r,o){const i=this,{x:a,y:l,fx:s,fy:c}=e,{ownerSVGElement:u,document:f}=o,{anchor:h,monospace:d,lineHeight:p,lineWidth:y}=this,{textPadding:m,pointerSize:g,pathFilter:v}=this,{marginTop:x,marginLeft:w}=r,{x1:b,y1:k,x2:$,y2:M,x:A=b??$,y:L=k??M}=n,E=s?s(t.fx)-w:0,z=c?c(t.fy)-x:0,[S,O]=Nc(this,r),N=Vc(n,S),C=Hc(n,O),T=d?Fu:ju,R=T(qu);let I,W;"title"in n?(I=Ih.call(this,{title:n.channels.title},e),W=jh):(I=Ih.call(this,n.channels,e),W=Fh);const j=Ys("svg:g",o).call(bc,this,r,o).call(Tu,this).call(Ac,this,{x:A&&a,y:L&&l}).call((r=>r.selectAll().data(t).enter().append("g").attr("transform",(t=>`translate(${Math.round(N(t))},${Math.round(C(t))})`)).call(kc,this).call((t=>t.append("path").attr("filter",v))).call((r=>r.append("text").each((function(r){const o=Nn(this);this.setAttribute("fill","currentColor"),this.setAttribute("fill-opacity",1),this.setAttribute("stroke","none");const a=W.call(i,r,t,I,e,n);if("string"==typeof a)for(const t of i.splitLines(a))F(o,{value:i.clipLine(t)});else{const t=new Set;for(const e of a){const{label:n=""}=e;n&&t.has(n)||(t.add(n),F(o,e))}}}))))));function F(t,{label:e,value:n,color:r,opacity:o}){e??="",n??="";const i=null!=r||null!=o;let a,l=100*y;const[s]=_u(e,l,T,R);if(s>=0)e=e.slice(0,s).trimEnd()+qu,a=n.trim(),n="";else{(e||!n&&!i)&&(n=" "+n);const[t]=_u(n,l-T(e),T,R);t>=0&&(a=n.trim(),n=n.slice(0,t).trimEnd()+qu)}const c=t.append("tspan").attr("x",0).attr("dy",`${p}em`).text("​");e&&c.append("tspan").attr("font-weight","bold").text(e),n&&c.append((()=>f.createTextNode(n))),i&&c.append("tspan").text(" ■").attr("fill",r).attr("fill-opacity",o).style("user-select","none"),a&&c.append("title").text(a)}function B(){const{width:t,height:e}=r.facet??r;j.selectChildren().each((function(n){let{x:r,width:o,height:a}=this.getBBox();o=Math.round(o),a=Math.round(a);let l=h;if(void 0===l){const r=N(n)+E,s=C(n)+z,c=r+o+g+2*m<t,u=r-o-g-2*m>0,f=s+a+g+2*m<e,h=s-a-g-2*m>0;l=c&&u?f&&h?i.preferredAnchor:h?"bottom":"top":f&&h?c?"left":"right":(c||u)&&(f||h)?`${h?"bottom":"top"}-${c?"left":"right"}`:i.preferredAnchor}const s=this.firstChild,c=this.lastChild;if(s.setAttribute("d",function(t,e,n,r,o){const i=r+2*n,a=o+2*n;switch(t){case"middle":return`M${-i/2},${-a/2}h${i}v${a}h${-i}z`;case"top-left":return`M0,0l${e},${e}h${i-e}v${a}h${-i}z`;case"top":return`M0,0l${e/2},${e/2}h${(i-e)/2}v${a}h${-i}v${-a}h${(i-e)/2}z`;case"top-right":return`M0,0l${-e},${e}h${e-i}v${a}h${i}z`;case"right":return`M0,0l${-e/2},${-e/2}v${e/2-a/2}h${-i}v${a}h${i}v${e/2-a/2}z`;case"bottom-left":return`M0,0l${e},${-e}h${i-e}v${-a}h${-i}z`;case"bottom":return`M0,0l${e/2},${-e/2}h${(i-e)/2}v${-a}h${-i}v${a}h${(i-e)/2}z`;case"bottom-right":return`M0,0l${-e},${-e}h${e-i}v${-a}h${i}z`;case"left":return`M0,0l${e/2},${-e/2}v${e/2-a/2}h${i}v${a}h${-i}v${e/2-a/2}z`}}(l,g,m,o,a)),r)for(const t of c.childNodes)t.setAttribute("x",-r);c.setAttribute("y",+function(t,e,n){return/^top(?:-|$)/.test(t)?.94-n:-.29-e*n}(l,c.childNodes.length,p).toFixed(6)+"em"),c.setAttribute("transform",`translate(${function(t,e,n,r,o){switch(t){case"middle":return[-r/2,o/2];case"top-left":return[n,e+n];case"top":return[-r/2,e/2+n];case"top-right":return[-r-n,e+n];case"right":return[-e/2-r-n,o/2];case"bottom-left":return[n,-e-n];case"bottom":return[-r/2,-e/2-n];case"bottom-right":return[-r-n,-e-n];case"left":return[n+e/2,o/2]}}(l,g,m,o,a)})`)})),j.attr("visibility",null)}return t.length&&(j.attr("visibility","hidden"),u.isConnected?Promise.resolve().then(B):"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame(B)),j.node()}}function Rh(t,{x:e,y:n,...r}={}){return void 0===r.frameAnchor&&([e,n]=ri(e,n)),new Th(t,{...r,x:e,y:n})}function Ih(t,e){const n={};let r=this.format;r=Wh(r,t,"x"),r=Wh(r,t,"y"),this.format=r;for(const e in r){const o=r[e];if(null!==o&&!1!==o)if("fx"===e||"fy"===e)n[e]=!0;else{const r=al(t,e);r&&(n[e]=r)}}for(const e in t){if(e in n||e in r||Ch.has(e))continue;if(("x"===e||"y"===e)&&t.geometry)continue;const o=al(t,e);if(o){if(null==o.scale&&"color"===o.defaultScale)continue;n[e]=o}}this.facet&&(e.fx&&!("fx"in r)&&(n.fx=!0),e.fy&&!("fy"in r)&&(n.fy=!0));for(const t in n){const r=this.format[t];if("string"==typeof r){const o=n[t]?.value??e[t]?.domain()??[];this.format[t]=(Li(o)?R:In)(r)}else if(void 0===r||!0===r){const n=e[t];this.format[t]=n?.bandwidth?Of(n,n.domain()):ic}}return n}function Wh(t,e,n){if(!(n in t))return t;const r=`${n}1`,o=`${n}2`;if(!(!(r in t)&&r in e||!(o in t)&&o in e))return t;const i=Object.entries(t),a=t[n];return i.splice(i.findIndex((([t])=>t===n))+1,0,[r,a],[o,a]),Object.fromEntries(i)}function jh(t,e,{title:n}){return this.format.title(n.value[t],t)}function*Fh(t,e,n,r,o){for(const i in n){if("fx"===i||"fy"===i){yield{label:qh(r,n,i),value:this.format[i](e[i],t)};continue}if("x1"===i&&"x2"in n)continue;if("y1"===i&&"y2"in n)continue;const a=n[i];if("x2"===i&&"x1"in n)yield{label:Dh(r,n,"x"),value:Bh(this.format.x2,n.x1,a,t)};else if("y2"===i&&"y1"in n)yield{label:Dh(r,n,"y"),value:Bh(this.format.y2,n.y1,a,t)};else{const e=a.value[t],l=a.scale;if(!Tr(e)&&null==l)continue;yield{label:qh(r,n,i),value:this.format[i](e,t),color:"color"===l?o[i][t]:null,opacity:"opacity"===l?o[i][t]:null}}}}function Bh(t,e,n,r){return n.hint?.length?`${t(n.value[r]-e.value[r],r)}`:`${t(e.value[r],r)}–${t(n.value[r],r)}`}function Dh(t,e,n){const r=qh(t,e,`${n}1`,n),o=qh(t,e,`${n}2`,n);return r===o?r:`${r}–${o}`}function qh(t,e,n,r=n){const o=e[n],i=t[o?.scale??n];return String(i?.label??o?.label??r)}function _h(t={}){const{facet:e,style:n,title:r,subtitle:o,caption:i,ariaLabel:a,ariaDescription:l}=t,s=Sc(t.className),c=void 0===t.marks?[]:Vh(t.marks);c.push(...function(t){const e=[];for(const n of t){let t=n.tip;if(t){!0===t?t={}:"string"==typeof t&&(t={pointer:t});let{pointer:r,preferredAnchor:o}=t;r=/^x$/i.test(r)?_c:/^y$/i.test(r)?Pc:qc,t=r(Qh(n,t)),t.title=null,void 0===o&&(t.preferredAnchor=r===Pc?"left":"bottom");const i=Rh(n.data,t);i.facet=n.facet,i.facetAnchor=n.facetAnchor,e.push(i)}}return e}(c));const u=function(t,e){if(null==t)return;const{x:n,y:r}=t;if(null==n&&null==r)return;const o=Vo(t.data);if(null==o)throw new Error("missing facet data");const i={};null!=n&&(i.fx=Xa(o,{value:n,scale:"fx"}));null!=r&&(i.fy=Xa(o,{value:r,scale:"fy"}));Yh(i,e);const a=ws(o,i);return{channels:i,groups:a,data:t.data}}(e,t),f=new Map;for(const e of c){const n=Kh(e,u,t);n&&f.set(e,n)}const h=new Map;u&&Zh(h,[u],t),Zh(h,f,t);const d=Vh(function(t,e,n){let{projection:r,x:o={},y:i={},fx:a={},fy:l={},axis:s,grid:c,facet:u={},facet:{axis:f=s,grid:h}=u,x:{axis:d=s,grid:p=(null===d?null:c)}=o,y:{axis:y=s,grid:m=(null===y?null:c)}=i,fx:{axis:g=f,grid:v=(null===g?null:h)}=a,fy:{axis:x=f,grid:w=(null===x?null:h)}=l}=n;(r||!Qo(o)&&!od("x",t))&&(d=p=null);(r||!Qo(i)&&!od("y",t))&&(y=m=null);e.has("fx")||(g=v=null);e.has("fy")||(x=w=null);void 0===d&&(d=!rd(t,"x"));void 0===y&&(y=!rd(t,"y"));void 0===g&&(g=!rd(t,"fx"));void 0===x&&(x=!rd(t,"fy"));!0===d&&(d="bottom");!0===y&&(y="left");!0===g&&(g="top"===d||null===d?"bottom":"top");!0===x&&(x="right"===y||null===y?"left":"right");const b=[];return ed(b,w,bf,l),td(b,x,yf,"right","left",u,l),ed(b,v,$f,a),td(b,g,gf,"top","bottom",u,a),ed(b,m,wf,i),td(b,y,pf,"left","right",n,i),ed(b,p,kf,o),td(b,d,mf,"bottom","top",n,o),b}(c,h,t));for(const e of d){const n=Kh(e,u,t);n&&f.set(e,n)}c.unshift(...d);let p=function(t,e){const{fx:n,fy:r}=Jl(t,e),o=n?.scale.domain(),i=r?.scale.domain();return o&&i?fn(o,i).map((([t,e],n)=>({x:t,y:e,i:n}))):o?o.map(((t,e)=>({x:t,i:e}))):i?i.map(((t,e)=>({y:t,i:e}))):void 0}(h,t);if(void 0!==p){const t=u?Cs(p,u):void 0;for(const e of c){if(null===e.facet||"super"===e.facet)continue;const n=f.get(e);void 0!==n&&(n.facetsIndex=null!=e.fx||null!=e.fy?Cs(p,n):t)}const e=new Set;for(const{facetsIndex:t}of f.values())t?.forEach(((t,n)=>{t?.length>0&&e.add(n)}));p.forEach(0<e.size&&e.size<p.length?(t,n)=>t.empty=!e.has(n):t=>t.empty=!1);for(const t of c)if("exclude"===t.facet){const e=f.get(t);void 0!==e&&(e.facetsIndex=bs(e.facetsIndex))}}for(const e of Xi.keys())Qo(t[e])&&"fx"!==e&&"fy"!==e&&h.set(e,[]);const y=new Map;for(const e of c){if(y.has(e))throw new Error("duplicate mark; each mark must be unique");const{facetsIndex:n,channels:r}=f.get(e)??{},{data:o,facets:i,channels:a}=e.initialize(n,r,t);Yh(a,t),y.set(e,{data:o,facets:i,channels:a})}const m=Jl(Zh(h,y,t),t),g=function(t,e,n={}){let r=.5-ac,o=.5+ac,i=.5+ac,a=.5-ac;for(const{marginTop:t,marginRight:n,marginBottom:l,marginLeft:s}of e)t>r&&(r=t),n>o&&(o=n),l>i&&(i=l),s>a&&(a=s);let{margin:l,marginTop:s=(void 0!==l?l:r),marginRight:c=(void 0!==l?l:o),marginBottom:u=(void 0!==l?l:i),marginLeft:f=(void 0!==l?l:a)}=n;s=+s,c=+c,u=+u,f=+f;let{width:h=640,height:d=jc(t,n,{width:h,marginTopDefault:r,marginRightDefault:o,marginBottomDefault:i,marginLeftDefault:a})+Math.max(0,s-r+u-i)}=n;h=+h,d=+d;const p={width:h,height:d,marginTop:s,marginRight:c,marginBottom:u,marginLeft:f};if(t.fx||t.fy){let{margin:t,marginTop:e=(void 0!==t?t:s),marginRight:r=(void 0!==t?t:c),marginBottom:o=(void 0!==t?t:u),marginLeft:i=(void 0!==t?t:f)}=n.facet??{};e=+e,r=+r,o=+o,i=+i,p.facet={marginTop:e,marginRight:r,marginBottom:o,marginLeft:i}}return p}(m,c,t);!function(t,e){const{x:n,y:r,fx:o,fy:i}=t,a=o||i?es(e):e;o&&rs(o,a),i&&os(i,a);const l=o||i?ns(t,e):e;n&&rs(n,l),r&&os(r,l)}(m,g);const v=Kl(m),{fx:x,fy:w}=v,b=x||w?ns(m,g):g,k=x||w?function({fx:t,fy:e},n){const{marginTop:r,marginRight:o,marginBottom:i,marginLeft:a,width:l,height:s}=es(n),c=t&&id(t),u=e&&id(e);return{marginTop:e?u[0]:r,marginRight:t?l-c[1]:o,marginBottom:e?s-u[1]:i,marginLeft:t?c[0]:a,inset:{marginTop:n.marginTop,marginRight:n.marginRight,marginBottom:n.marginBottom,marginLeft:n.marginLeft},width:l,height:s}}(v,g):g,$=Us(t),M=$.document,A=Cn("svg").call(M.documentElement);let L=A;$.ownerSVGElement=A,$.className=s,$.projection=Ws(t,b),$.path=function(){return pn(this.projection??function({x:t,y:e}){if(t||e)return t??=t=>t,e??=t=>t,dn({point(n,r){this.stream.point(t(n),e(r))}})}(v))},$.filterFacets=(t,e)=>Cs(p,{channels:e,groups:ws(t,e)}),$.getMarkState=t=>{const e=y.get(t),n=f.get(t);return{...e,channels:{...e.channels,...n?.channels}}},$.dispatchValue=t=>{L.value!==t&&(L.value=t,L.dispatchEvent(new $.document.defaultView.Event("input",{bubbles:!0})))};const E=new Set;for(const[e,n]of y)if(null!=e.initializer){const r="super"===e.facet?k:b,o=e.initializer(n.data,n.facets,n.channels,v,r,$);if(void 0!==o.data&&(n.data=o.data),void 0!==o.facets&&(n.facets=o.facets),void 0!==o.channels){const{fx:r,fy:i,...a}=o.channels;Xh(a),Object.assign(n.channels,a);for(const e of Object.values(a)){const{scale:n}=e;null!=n&&((z=Xi.get(n))!==_i&&z!==Gi)&&(Gh(e,t),E.add(n))}null==r&&null==i||f.set(e,!0)}}var z;if(E.size){const e=new Map;Zh(e,y,t,(t=>E.has(t))),Zh(h,y,t,(t=>E.has(t)));const n=function(t,e){for(const n in t){const r=t[n],o=e[n];void 0===r.label&&o&&(r.label=o.label)}return t}(Jl(e,t),m),{scales:r,...o}=Kl(n);Object.assign(m,n),Object.assign(v,o),Object.assign(v.scales,r)}let S,O;void 0!==p&&(S={x:x?.domain(),y:w?.domain()},p=function(t,{x:e,y:n}){return e&&=Ms(e),n&&=Ms(n),t.filter(e&&n?t=>e.has(t.x)&&n.has(t.y):e?t=>e.has(t.x):t=>n.has(t.y)).sort(e&&n?(t,r)=>e.get(t.x)-e.get(r.x)||n.get(t.y)-n.get(r.y):e?(t,n)=>e.get(t.x)-e.get(n.x):(t,e)=>n.get(t.y)-n.get(e.y))}(p,S),O=function(t,e,{marginTop:n,marginLeft:r}){const o=t?({x:e})=>t(e)-r:()=>0,i=e?({y:t})=>e(t)-n:()=>0;return function(t){"svg"===this.tagName?(this.setAttribute("x",o(t)),this.setAttribute("y",i(t))):this.setAttribute("transform",`translate(${o(t)},${i(t)})`)}}(x,w,g));for(const[t,e]of y)e.values=t.scale(e.channels,v,$);const{width:N,height:C}=g;Nn(A).attr("class",s).attr("fill","currentColor").attr("font-family","system-ui, sans-serif").attr("font-size",10).attr("text-anchor","middle").attr("width",N).attr("height",C).attr("viewBox",`0 0 ${N} ${C}`).attr("aria-label",a).attr("aria-description",l).call((t=>t.append("style").text(`:where(.${s}) {\n  --plot-background: white;\n  display: block;\n  height: auto;\n  height: intrinsic;\n  max-width: 100%;\n}\n:where(.${s} text),\n:where(.${s} tspan) {\n  white-space: pre;\n}`))).call(Oc,n);for(const t of c){const{channels:e,values:n,facets:r}=y.get(t);if(void 0===p||"super"===t.facet){let o=null;if(r&&(o=r[0],o=t.filter(o,e,n),0===o.length))continue;const i=t.render(o,v,n,k,$);if(null==i)continue;A.appendChild(i)}else{let o;for(const i of p){if(!(t.facetAnchor?.(p,S,i)??!i.empty))continue;let a=null;if(r){const o=f.has(t);if(a=r[o?i.i:0],a=t.filter(a,e,n),0===a.length)continue;o||a!==r[0]||(a=ci(a)),a.fx=i.x,a.fy=i.y,a.fi=i.i}const l=t.render(a,v,n,b,$);if(null!=l){(o??=Nn(A).append("g")).append((()=>l)).datum(i);for(const t of["aria-label","aria-description","aria-hidden","transform"])l.hasAttribute(t)&&(o.attr(t,l.getAttribute(t)),l.removeAttribute(t))}}o?.selectChildren().each(O)}}const T=function(t,e,n){const r=[];for(const[o,i]of _f){const a=n[o];if(a?.legend&&o in t){const n=i(t[o],Vf(e,t[o],a),(e=>t[e]));null!=n&&r.push(n)}}return r}(m,$,t),{figure:R=null!=r||null!=o||null!=i||T.length>0}=t;R&&(L=M.createElement("figure"),L.className=`${s}-figure`,L.style.maxWidth="initial",null!=r&&L.append(Ph(M,r,"h2")),null!=o&&L.append(Ph(M,o,"h3")),L.append(...T,A),null!=i&&L.append(function(t,e){const n=t.createElement("figcaption");return n.append(e),n}(M,i)),"value"in A&&(L.value=A.value,delete A.value)),L.scale=function(t){return e=>{if(!Xi.has(e=`${e}`))throw new Error(`unknown scale: ${e}`);return t[e]}}(v.scales),L.legend=function(t,e,n={}){return(r,o)=>{if(!_f.has(r))throw new Error(`unknown legend type: ${r}`);if(r in t)return _f.get(r)(t[r],Vf(e,n[r],o),(e=>t[e]))}}(m,$,t);const I=function(){const t=Wl;return Wl=0,Il=void 0,t}();return I>0&&Nn(A).append("text").attr("x",N).attr("y",20).attr("dy","-1em").attr("text-anchor","end").attr("font-family","initial").text("⚠️").append("title").text(`${I.toLocaleString("en-US")} warning${1===I?"":"s"}. Please check the console.`),L}function Ph(t,e,n){if(e.ownerDocument)return e;const r=t.createElement(n);return r.append(e),r}function Vh(t){return t.flat(1/0).filter((t=>null!=t)).map(Hh)}function Hh(t){return"function"==typeof t.render?t:new Uh(t)}class Uh extends Cc{constructor(t){if("function"!=typeof t)throw new TypeError("invalid mark; missing render function");super(),this.render=t}render(){}}function Yh(t,e){for(const n in t)Gh(t[n],e);return t}function Gh(t,e){const{scale:n,transform:r=!0}=t;if(null==n||!r)return;const{type:o,percent:i,interval:a,transform:l=(i?t=>null==t?NaN:100*t:gi(a,o))}=e[n]??{};null!=l&&(t.value=Yo(t.value,l),t.transform=!1)}function Xh(t){for(const e in t)Ka(e,t[e])}function Zh(t,e,n,r=zo){for(const{channels:o}of e.values())for(const e in o){const i=o[e],{scale:a}=i;if(null!=a&&r(a))if("projection"===a){if(!Ps(n)){const e=void 0===n.x?.domain,r=void 0===n.y?.domain;if(e||r){const[n,o]=Hs(i);e&&Jh(t,"x",n),r&&Jh(t,"y",o)}}}else Jh(t,a,i)}return t}function Jh(t,e,n){const r=t.get(e);void 0!==r?r.push(n):t.set(e,[n])}function Kh(t,e,n){if(null===t.facet||"super"===t.facet)return;const{fx:r,fy:o}=t;if(null!=r||null!=o){const e=Vo(t.data??r??o);if(void 0===e)throw new Error(`missing facet data in ${t.ariaLabel}`);if(null===e)return;const i={};return null!=r&&(i.fx=Xa(e,{value:r,scale:"fx"})),null!=o&&(i.fy=Xa(e,{value:o,scale:"fy"})),Yh(i,n),{channels:i,groups:ws(e,i)}}if(void 0===e)return;const{channels:i,groups:a,data:l}=e;if("auto"!==t.facet||t.data===l)return{channels:i,groups:a};l.length>0&&(a.size>1||1===a.size&&i.fx&&i.fy&&[...a][0][1].size>1)&&ii(Vo(t.data))===ii(l)&&jl(`Warning: the ${t.ariaLabel} mark appears to use faceted data, but isn’t faceted. The mark data has the same length as the facet data and the mark facet option is "auto", but the mark data and facet data are distinct. If this mark should be faceted, set the mark facet option to true; otherwise, suppress this warning by setting the mark facet option to false.`)}function Qh(t,e={}){return ra({...e,x:null,y:null},((e,n,r,o,i,a)=>a.getMarkState(t)))}function td(t,e,n,r,o,i,a){if(!e)return;const l=/^\s*both\s*$/i.test(e);a=function(t,e,{line:n=e.line,ticks:r,tickSize:o,tickSpacing:i,tickPadding:a,tickFormat:l,tickRotate:s,fontVariant:c,ariaLabel:u,ariaDescription:f,label:h=e.label,labelAnchor:d,labelArrow:p=e.labelArrow,labelOffset:y}){return{anchor:t,line:n,ticks:r,tickSize:o,tickSpacing:i,tickPadding:a,tickFormat:l,tickRotate:s,fontVariant:c,ariaLabel:u,ariaDescription:f,label:h,labelAnchor:d,labelArrow:p,labelOffset:y}}(l?r:e,i,a);const{line:s}=a;n!==pf&&n!==mf||!s||Ii(s)||t.push(Oh(function(t){const{anchor:e,line:n}=t;return{anchor:e,facetAnchor:e+"-empty",stroke:!0===n?void 0:n}}(a))),t.push(n(a)),l&&t.push(n({...a,anchor:o,label:null}))}function ed(t,e,n,r){e&&!Ii(e)&&t.push(n(function(t,{stroke:e=(Ci(t)?t:void 0),ticks:n=(nd(t)?t:void 0),tickSpacing:r,ariaLabel:o,ariaDescription:i}){return{stroke:e,ticks:n,tickSpacing:r,ariaLabel:o,ariaDescription:i}}(e,r)))}function nd(t){switch(typeof t){case"number":return!0;case"string":return!Ci(t)}return $i(t)||"function"==typeof t?.range}function rd(t,e){const n=`${e}-axis `;return t.some((t=>t.ariaLabel?.startsWith(n)))}function od(t,e){for(const n of e)for(const e in n.channels){const{scale:r}=n.channels[e];if(r===t||"projection"===r)return!0}return!1}function id(t){const e=t.domain();if(0===e.length)return[0,t.bandwidth()];let n=t(e[0]),r=t(e[e.length-1]);return r<n&&([n,r]=[r,n]),[n,r+t.bandwidth()]}const ad=new Map([["basis",Pn],["basis-closed",Vn],["basis-open",Hn],["bundle",Un],["bump-x",Yn],["bump-y",Gn],["cardinal",Xn],["cardinal-closed",Zn],["cardinal-open",Jn],["catmull-rom",Kn],["catmull-rom-closed",Qn],["catmull-rom-open",tr],["linear",_n],["linear-closed",er],["monotone-x",nr],["monotone-y",rr],["natural",or],["step",ir],["step-after",ar],["step-before",lr]]);function ld(t=_n,e){if("function"==typeof t)return t;const n=ad.get(`${t}`.toLowerCase());if(!n)throw new Error(`unknown curve: ${t}`);if(void 0!==e){if("beta"in n)return n.beta(e);if("tension"in n)return n.tension(e);if("alpha"in n)return n.alpha(e)}return n}function sd(t=cd,e){return"function"!=typeof t&&"auto"===`${t}`.toLowerCase()?cd:ld(t,e)}function cd(t){return _n(t)}function ud(t={y:"count"},e={}){[t,e]=gd(t,e);const{x:n,y:r}=e;return md(vd(n,e,Lo),null,null,r,t,lu(e))}function fd(t={x:"count"},e={}){[t,e]=gd(t,e);const{x:n,y:r}=e;return md(null,vd(r,e,Lo),n,null,t,su(e))}function hd(t={fill:"count"},e={}){[t,e]=gd(t,e);const{x:n,y:r}=function(t){let{x:e,y:n}=t;return e=vd(e,t),n=vd(n,t),[e.value,n.value]=ri(e.value,n.value),{x:e,y:n}}(e);return md(n,r,null,null,t,lu(su(e)))}function dd(t,e,n={}){if(null==n?.interval)return n;const{reduce:r=Fa}=n,o={filter:null};return null!=n[e]&&(o[e]=r),null!=n[`${e}1`]&&(o[`${e}1`]=r),null!=n[`${e}2`]&&(o[`${e}2`]=r),t(o,n)}function pd(t={}){return dd(ud,"y",Wc(t,"x"))}function yd(t={}){return dd(fd,"x",Wc(t,"y"))}function md(t,e,n,r,{data:o=ja,filter:i=qa,sort:a,reverse:l,...s}={},c={}){t=xd(t),e=xd(e),s=function(t,e){return ka(t,e,bd)}(s,c),o=$d(o,Lo),a=null==a?void 0:bd("sort",a,c),i=null==i?void 0:kd("filter",i,c),null!=n&&ba(s,"x","x1","x2")&&(n=null),null!=r&&ba(s,"y","y1","y2")&&(r=null);const[u,f]=di(t),[h,d]=di(t),[p,y]=di(e),[m,g]=di(e),[v,x]=null!=n?[n,"x"]:null!=r?[r,"y"]:[],[w,b]=di(v),{x:k,y:$,z:M,fill:A,stroke:L,x1:E,x2:z,y1:S,y2:O,domain:N,cumulative:C,thresholds:T,interval:R,...I}=c,[W,j]=di(M),[F]=Do(A),[B]=Do(L),[D,q]=di(F),[_,P]=di(B);return{..."z"in c&&{z:W||M},..."fill"in c&&{fill:D||A},..."stroke"in c&&{stroke:_||L},...na(I,((n,r,c)=>{const u=mi(vo(n,v),c?.[x]),h=vo(n,M),p=vo(n,F),m=vo(n,B),w=Ta(s,{z:h,fill:p,stroke:m}),k=[],$=[],A=u&&b([]),L=h&&j([]),E=p&&q([]),z=m&&P([]),S=t&&f([]),O=t&&d([]),N=e&&y([]),C=e&&g([]),T=function(t,e,n){const r=t?.(n),o=e?.(n);return r&&o?function*(t){const e=r.bin(t);for(const[t,[i,a]]of r.entries()){const r=o.bin(e[t]);for(const[t,[e,l]]of o.entries())yield[r[t],{data:n,x1:i,y1:e,x2:a,y2:l}]}}:r?function*(t){const e=r.bin(t);for(const[t,[o,i]]of r.entries())yield[e[t],{data:n,x1:o,x2:i}]}:function*(t){const e=o.bin(t);for(const[t,[r,i]]of o.entries())yield[e[t],{data:n,y1:r,y2:i}]}}(t,e,n);let R=0;for(const t of s)t.initialize(n);a&&a.initialize(n),i&&i.initialize(n);for(const t of r){const e=[];for(const e of s)e.scope("facet",t);a&&a.scope("facet",t),i&&i.scope("facet",t);for(const[r,l]of Aa(t,w))for(const[t,c]of Aa(l,u))for(const[l,f]of T(c))if(w&&(f.z=r),!i||i.reduce(l,f)){e.push(R++),$.push(o.reduceIndex(l,n,f)),u&&A.push(t),h&&L.push(w===h?r:h[(l.length>0?l:c)[0]]),p&&E.push(w===p?r:p[(l.length>0?l:c)[0]]),m&&z.push(w===m?r:m[(l.length>0?l:c)[0]]),S&&(S.push(f.x1),O.push(f.x2)),N&&(N.push(f.y1),C.push(f.y2));for(const t of s)t.reduce(l,f);a&&a.reduce(l,f)}k.push(e)}return Ra(k,a,l),{data:$,facets:k}})),...!ba(s,"x")&&(u?{x1:u,x2:h,x:yi(u,h)}:{x:k,x1:E,x2:z}),...!ba(s,"y")&&(p?{y1:p,y2:m,y:yi(p,m)}:{y:$,y1:S,y2:O}),...w&&{[x]:w},...Object.fromEntries(s.map((({name:t,output:e})=>[t,e])))}}function gd({cumulative:t,domain:e,thresholds:n,interval:r,...o},i){return[o,{cumulative:t,domain:e,thresholds:n,interval:r,...i}]}function vd(t,{cumulative:e,domain:n,thresholds:r,interval:o},i){return void 0===(t={...ki(t)}).domain&&(t.domain=n),void 0===t.cumulative&&(t.cumulative=e),void 0===t.thresholds&&(t.thresholds=r),void 0===t.interval&&(t.interval=o),void 0===t.value&&(t.value=i),t.thresholds=wd(t.thresholds,t.interval),t}function xd(t){if(null==t)return;const{value:e,cumulative:n,domain:r=De,thresholds:o}=t,i=t=>{let i,a=vo(t,e);if(Li(a)||(function(t){return bi(t)&&"function"==typeof t?.floor&&t.floor()instanceof Date}(l=o)||$i(l)&&Li(l))){a=Yo(a,Bo,Float64Array);let[t,e]="function"==typeof r?r(a):r,n="function"!=typeof o||bi(o)?o:o(a,t,e);"number"==typeof n&&(n=fr(t,e,n)),bi(n)&&(r===De&&(t=n.floor(t),e=n.offset(n.floor(e))),n=n.range(t,n.offset(e))),i=n}else{a=Wo(a);let[t,e]="function"==typeof r?r(a):r,n="function"!=typeof o||bi(o)?o:o(a,t,e);if("number"==typeof n)if(r===De){let r=hr(t,e,n);if(isFinite(r))if(r>0){let o=Math.round(t/r),i=Math.round(e/r);o*r<=t||--o,i*r>e||++i;let a=i-o+1;n=new Float64Array(a);for(let t=0;t<a;++t)n[t]=(o+t)*r}else if(r<0){r=-r;let o=Math.round(t*r),i=Math.round(e*r);o/r<=t||--o,i/r>e||++i;let a=i-o+1;n=new Float64Array(a);for(let t=0;t<a;++t)n[t]=(o+t)/r}else n=[t];else n=[t]}else n=qe(t,e,n);else bi(n)&&(r===De&&(t=n.floor(t),e=n.offset(n.floor(e))),n=n.range(t,n.offset(e)));i=n}var l;const s=[];if(1===i.length)s.push([i[0],i[0]]);else for(let t=1;t<i.length;++t)s.push([i[t-1],i[t]]);return s.bin=(n<0?zd:n>0?Ed:Ld)(s,i,a),s};return i.label=pi(e),i}function wd(t,e,n=Ad){if(void 0===t)return void 0===e?n:wi(e);if("string"==typeof t){switch(t.toLowerCase()){case"freedman-diaconis":return ur;case"scott":return cr;case"sturges":return sr;case"auto":return Ad}return io(t)}return t}function bd(t,e,n){return $a(t,e,n,kd)}function kd(t,e,n){return Ma(t,e,n,$d)}function $d(t,e){return La(t,e,Md)}function Md(t){switch(`${t}`.toLowerCase()){case"x":return Od;case"x1":return Cd;case"x2":return Td;case"y":return Nd;case"y1":return Rd;case"y2":return Id;case"z":return Ya}throw new Error(`invalid bin reduce: ${t}`)}function Ad(t,e,n){return Math.min(200,cr(t,e,n))}function Ld(t,e,n){return e=Wo(e),r=>{const o=t.map((()=>[]));for(const t of r)o[dr(e,n[t])-1]?.push(t);return o}}function Ed(t,e,n){const r=Ld(t,e,n);return t=>{const e=r(t);for(let t=1,n=e.length;t<n;++t){const n=e[t-1],r=e[t];for(const t of n)r.push(t)}return e}}function zd(t,e,n){const r=Ld(t,e,n);return t=>{const e=r(t);for(let t=e.length-2;t>=0;--t){const n=e[t+1],r=e[t];for(const t of n)r.push(t)}return e}}function Sd(t,e){const n=(+t+ +e)/2;return t instanceof Date?new Date(n):n}const Od={reduceIndex:(t,e,{x1:n,x2:r})=>Sd(n,r)},Nd={reduceIndex:(t,e,{y1:n,y2:r})=>Sd(n,r)},Cd={reduceIndex:(t,e,{x1:n})=>n},Td={reduceIndex:(t,e,{x2:n})=>n},Rd={reduceIndex:(t,e,{y1:n})=>n},Id={reduceIndex:(t,e,{y2:n})=>n},Wd={ariaLabel:"area",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:1};class jd extends Cc{constructor(t,e={}){const{x1:n,y1:r,x2:o,y2:i,z:a,curve:l,tension:s}=e;super(t,{x1:{value:n,scale:"x"},y1:{value:r,scale:"y"},x2:{value:o,scale:"x",optional:!0},y2:{value:i,scale:"y",optional:!0},z:{value:oi(e),optional:!0}},e,Wd),this.z=a,this.curve=ld(l,s)}filter(t){return t}render(t,e,n,r,o){const{x1:i,y1:a,x2:l=i,y2:s=a}=n;return Ys("svg:g",o).call(bc,this,r,o).call(Ac,this,e,0,0).call((e=>e.selectAll().data(mc(t,[i,a,l,s],this,n)).enter().append("path").call(kc,this).call(pc,this,n).attr("d",pr().curve(this.curve).defined((t=>t>=0)).x0((t=>i[t])).y0((t=>a[t])).x1((t=>l[t])).y1((t=>s[t]))))).node()}}function Fd(t,e){return void 0===e?Dd(t,{x:No,y:Co}):new jd(t,e)}function Bd(t,e){const{y:n=Ao,...r}=yd(e);return new jd(t,nh(Yf({...r,y1:n,y2:void 0},n===Ao?"x2":"x")))}function Dd(t,e){const{x:n=Ao,...r}=pd(e);return new jd(t,rh(Gf({...r,x1:n,x2:void 0},n===Ao?"y2":"y")))}const qd={ariaLabel:"link",fill:"none",stroke:"currentColor",strokeMiterlimit:1};class _d extends Cc{constructor(t,e={}){const{x1:n,y1:r,x2:o,y2:i,curve:a,tension:l}=e;super(t,{x1:{value:n,scale:"x"},y1:{value:r,scale:"y"},x2:{value:o,scale:"x",optional:!0},y2:{value:i,scale:"y",optional:!0}},e,qd),this.curve=sd(a,l),Gc(this,e)}project(t,e,n){this.curve!==cd&&super.project(t,e,n)}render(t,e,n,r,o){const{x1:i,y1:a,x2:l=i,y2:s=a}=n,{curve:c}=this;return Ys("svg:g",o).call(bc,this,r,o).call(Ac,this,e).call((e=>e.selectAll().data(t).enter().append("path").call(kc,this).attr("d",c===cd&&o.projection?function(t,e,n,r,o){return e=Wo(e),n=Wo(n),r=Wo(r),o=Wo(o),i=>t({type:"LineString",coordinates:[[e[i],n[i]],[r[i],o[i]]]})}(o.path(),i,a,l,s):t=>{const e=jn(),n=c(e);return n.lineStart(),n.point(i[t],a[t]),n.point(l[t],s[t]),n.lineEnd(),e}).call(dc,this,n).call(nu,this,n,o))).node()}}function Pd(t,{x:e,x1:n,x2:r,y:o,y1:i,y2:a,...l}={}){return[n,r]=Vd(e,n,r),[i,a]=Vd(o,i,a),new _d(t,{...l,x1:n,x2:r,y1:i,y2:a})}function Vd(t,e,n){if(void 0===t){if(void 0===e){if(void 0!==n)return[n]}else if(void 0===n)return[e]}else{if(void 0===e)return void 0===n?[t]:[t,n];if(void 0===n)return[t,e]}return[e,n]}const Hd={ariaLabel:"arrow",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:1,strokeWidth:1.5};class Ud extends Cc{constructor(n,r={}){const{x1:o,y1:i,x2:a,y2:l,bend:s=0,headAngle:c=60,headLength:u=8,inset:f=0,insetStart:h=f,insetEnd:d=f,sweep:p}=r;super(n,{x1:{value:o,scale:"x"},y1:{value:i,scale:"y"},x2:{value:a,scale:"x",optional:!0},y2:{value:l,scale:"y",optional:!0}},r,Hd),this.bend=!0===s?22.5:Math.max(-90,Math.min(90,s)),this.headAngle=+c,this.headLength=+u,this.insetStart=+h,this.insetEnd=+d,this.sweep=function(n=1){if("number"==typeof n)return Ro(Math.sign(n));if("function"==typeof n)return(t,e,r,o)=>Math.sign(n(t,e,r,o));switch(Po(n,"sweep",["+x","-x","+y","-y"])){case"+x":return(e,n,r)=>t(e,r);case"-x":return(t,n,r)=>e(t,r);case"+y":return(e,n,r,o)=>t(n,o);case"-y":return(t,n,r,o)=>e(n,o)}}(p)}render(t,e,n,r,o){const{x1:i,y1:a,x2:l=i,y2:s=a,SW:c}=n,{strokeWidth:u,bend:f,headAngle:h,headLength:d,insetStart:p,insetEnd:y}=this,m=c?t=>c[t]:Ro(void 0===u?1:u),g=h*Yc/2,v=d/1.5;return Ys("svg:g",o).call(bc,this,r,o).call(Ac,this,e).call((e=>e.selectAll().data(t).enter().append("path").call(kc,this).attr("d",(t=>{let e=i[t],n=a[t],r=l[t],o=s[t];const c=Math.hypot(r-e,o-n);if(c<=p+y)return null;let u=Math.atan2(o-n,r-e);const h=Math.min(v*m(t),c/3),d=this.sweep(e,n,r,o)*f*Yc,x=Math.hypot(c/Math.tan(d),c)/2;if(p||y)if(x<1e5){const t=Math.sign(d),[i,a]=function([t,e],[n,r],o,i){const a=n-t,l=r-e,s=Math.hypot(a,l),c=i*Math.sqrt(o*o-s*s/4)/s;return[(t+n)/2-l*c,(e+r)/2+a*c]}([e,n],[r,o],x,t);if(p&&([e,n]=Yd([i,a,x],[e,n,p],-t*Math.sign(p))),y){const[e,n]=Yd([i,a,x],[r,o,y],t*Math.sign(y));u+=Math.atan2(n-a,e-i)-Math.atan2(o-a,r-i),r=e,o=n}}else{const t=r-e,i=o-n,a=Math.hypot(t,i);p&&(e+=t/a*p,n+=i/a*p),y&&(r-=t/a*y,o-=i/a*y)}const w=u+d,b=w+g,k=w-g,$=r-h*Math.cos(b),M=o-h*Math.sin(b),A=r-h*Math.cos(k),L=o-h*Math.sin(k);return`M${e},${n}${x<1e5?`A${x},${x} 0,0,${d>0?1:0} `:"L"}${r},${o}${h?`M${$},${M}L${r},${o}L${A},${L}`:""}`})).call(dc,this,n))).node()}}function Yd([t,e,n],[r,o,i],a){const l=r-t,s=o-e,c=Math.hypot(l,s),u=(l*l+s*s-i*i+n*n)/(2*c),f=a*Math.sqrt(n*n-u*u);return[t+(l*u+s*f)/c,e+(s*u-l*f)/c]}function Gd(t,{x:e,x1:n,x2:r,y:o,y1:i,y2:a,...l}={}){return[n,r]=Vd(e,n,r),[i,a]=Vd(o,i,a),new Ud(t,{...l,x1:n,x2:r,y1:i,y2:a})}const Xd={ariaLabel:"bar"};class Zd extends Cc{constructor(t,e,n={},r=Xd){super(t,e,n,r),xh(this,n),wh(this,n)}render(t,e,n,r,o){const{rx:i,ry:a,rx1y1:l,rx1y2:s,rx2y1:c,rx2y2:u}=this,f=this._x(e,n,r),h=this._y(e,n,r),d=this._width(e,n,r),p=this._height(e,n,r);return Ys("svg:g",o).call(bc,this,r,o).call(this._transform,this,e).call((e=>e.selectAll().data(t).enter().call(l||s||c||u?t=>t.append("path").call(kc,this).call(bh,f,h,Jd(f,d),Jd(h,p),this).call(dc,this,n):t=>t.append("rect").call(kc,this).attr("x",f).attr("width",d).attr("y",h).attr("height",p).call(Mc,"rx",i).call(Mc,"ry",a).call(dc,this,n)))).node()}_x(t,{x:e},{marginLeft:n}){const{insetLeft:r}=this;return e?t=>e[t]+r:n+r}_y(t,{y:e},{marginTop:n}){const{insetTop:r}=this;return e?t=>e[t]+r:n+r}_width({x:t},{x:e},{marginRight:n,marginLeft:r,width:o}){const{insetLeft:i,insetRight:a}=this,l=e&&t?t.bandwidth():o-n-r;return Math.max(0,l-i-a)}_height({y:t},{y:e},{marginTop:n,marginBottom:r,height:o}){const{insetTop:i,insetBottom:a}=this,l=e&&t?t.bandwidth():o-n-r;return Math.max(0,l-i-a)}}function Jd(t,e){return"function"==typeof t&&"function"==typeof e?n=>t(n)+e(n):"function"==typeof t?n=>t(n)+e:"function"==typeof e?n=>t+e(n):t+e}class Kd extends Zd{constructor(t,e={},n){const{x1:r,x2:o,y:i}=e;super(t,{x1:{value:r,scale:"x"},x2:{value:o,scale:"x"},y:{value:i,scale:"y",type:"band",optional:!0}},e,n)}_transform(t,e,{x:n}){t.call(Ac,e,{x:n},0,0)}_x({x:t},{x1:e,x2:n},{marginLeft:r}){const{insetLeft:o}=this;return ys(t)?r+o:t=>Math.min(e[t],n[t])+o}_width({x:t},{x1:e,x2:n},{marginRight:r,marginLeft:o,width:i}){const{insetLeft:a,insetRight:l}=this;return ys(t)?i-r-o-a-l:t=>Math.max(0,Math.abs(n[t]-e[t])-a-l)}}class Qd extends Zd{constructor(t,e={},n){const{x:r,y1:o,y2:i}=e;super(t,{y1:{value:o,scale:"y"},y2:{value:i,scale:"y"},x:{value:r,scale:"x",type:"band",optional:!0}},e,n)}_transform(t,e,{y:n}){t.call(Ac,e,{y:n},0,0)}_y({y:t},{y1:e,y2:n},{marginTop:r}){const{insetTop:o}=this;return ys(t)?r+o:t=>Math.min(e[t],n[t])+o}_height({y:t},{y1:e,y2:n},{marginTop:r,marginBottom:o,height:i}){const{insetTop:a,insetBottom:l}=this;return ys(t)?i-r-o-a-l:t=>Math.max(0,Math.abs(n[t]-e[t])-a-l)}}function tp(t,e={}){return Jo(e)||(e={...e,y:Ao,x2:Lo}),new Kd(t,nh(yu(Yf(e))))}function ep(t,e={}){return Jo(e)||(e={...e,x:Ao,y2:Lo}),new Qd(t,rh(mu(Gf(e))))}const np={ariaLabel:"cell"};class rp extends Zd{constructor(t,{x:e,y:n,...r}={}){super(t,{x:{value:e,scale:"x",type:"band",optional:!0},y:{value:n,scale:"y",type:"band",optional:!0}},r,np)}_transform(t,e){t.call(Ac,e,{},0,0)}}function op(t,{x:e,y:n,...r}={}){return[e,n]=ri(e,n),new rp(t,{...r,x:e,y:n})}function ip(t,{x:e=Ao,fill:n,stroke:r,...o}={}){return void 0===n&&void 0===Do(r)[0]&&(n=Lo),new rp(t,{...o,x:e,fill:n,stroke:r})}function ap(t,{y:e=Ao,fill:n,stroke:r,...o}={}){return void 0===n&&void 0===Do(r)[0]&&(n=Lo),new rp(t,{...o,y:e,fill:n,stroke:r})}const lp={ariaLabel:"dot",fill:"none",stroke:"currentColor",strokeWidth:1.5};function sp(t){return void 0===t.sort&&void 0===t.reverse?ha({channel:"-r"},t):t}class cp extends Cc{constructor(t,e={}){const{x:n,y:r,r:o,rotate:i,symbol:a=F,frameAnchor:l}=e,[s,c]=qo(i,0),[u,f]=function(t){if(null==t||Qi(t))return[void 0,t];if("string"==typeof t){const e=Ki.get(`${t}`.toLowerCase());if(e)return[void 0,e]}return[t,void 0]}(a),[h,d]=qo(o,null==u?3:4.5);super(t,{x:{value:n,scale:"x",optional:!0},y:{value:r,scale:"y",optional:!0},r:{value:h,scale:"r",filter:Fr,optional:!0},rotate:{value:s,optional:!0},symbol:{value:u,scale:"auto",optional:!0}},sp(e),lp),this.r=d,this.rotate=c,this.symbol=f,this.frameAnchor=ji(l);const{channels:p}=this,{symbol:y}=p;if(y){const{fill:t,stroke:e}=p;y.hint={fill:t?t.value===y.value?"color":"currentColor":this.fill??"currentColor",stroke:e?e.value===y.value?"color":"currentColor":this.stroke??"none"}}}render(t,e,n,r,o){const{x:i,y:a}=e,{x:l,y:s,r:c,rotate:u,symbol:f}=n,{r:h,rotate:d,symbol:p}=this,[y,m]=Nc(this,r),g=p===F,v=c?void 0:h*h*Math.PI;return Br(h)&&(t=[]),Ys("svg:g",o).call(bc,this,r,o).call(Ac,this,{x:l&&i,y:s&&a}).call((e=>e.selectAll().data(t).enter().append(g?"circle":"path").call(kc,this).call(g?t=>{t.attr("cx",l?t=>l[t]:y).attr("cy",s?t=>s[t]:m).attr("r",c?t=>c[t]:h)}:t=>{t.attr("transform",Au`translate(${l?t=>l[t]:y},${s?t=>s[t]:m})${u?t=>` rotate(${u[t]})`:d?` rotate(${d})`:""}`).attr("d",c&&f?t=>{const e=jn();return f[t].draw(e,c[t]*c[t]*Math.PI),e}:c?t=>{const e=jn();return p.draw(e,c[t]*c[t]*Math.PI),e}:f?t=>{const e=jn();return f[t].draw(e,v),e}:(()=>{const t=jn();return p.draw(t,v),t})())}).call(dc,this,n))).node()}}function up(t,{x:e,y:n,...r}={}){return void 0===r.frameAnchor&&([e,n]=ri(e,n)),new cp(t,{...r,x:e,y:n})}function fp(t,{x:e=Lo,...n}={}){return new cp(t,vu({...n,x:e}))}function hp(t,{y:e=Lo,...n}={}){return new cp(t,gu({...n,y:e}))}function dp(t,e){return up(t,{...e,symbol:"circle"})}function pp(t,e){return up(t,{...e,symbol:"hexagon"})}const yp={ariaLabel:"line",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:1};class mp extends Cc{constructor(t,e={}){const{x:n,y:r,z:o,curve:i,tension:a}=e;super(t,{x:{value:n,scale:"x"},y:{value:r,scale:"y"},z:{value:oi(e),optional:!0}},e,yp),this.z=o,this.curve=sd(i,a),Gc(this,e)}filter(t){return t}project(t,e,n){this.curve!==cd&&super.project(t,e,n)}render(t,e,n,r,o){const{x:i,y:a}=n,{curve:l}=this;return Ys("svg:g",o).call(bc,this,r,o).call(Ac,this,e).call((e=>e.selectAll().data(mc(t,[i,a],this,n)).enter().append("path").call(kc,this).call(pc,this,n).call(ru,this,n,o).attr("d",l===cd&&o.projection?function(t,e,n){return e=Wo(e),n=Wo(n),r=>{let o=[];const i=[o];for(const t of r)-1===t?(o=[],i.push(o)):o.push([e[t],n[t]]);return t({type:"MultiLineString",coordinates:i})}}(o.path(),i,a):yr().curve(l).defined((t=>t>=0)).x((t=>i[t])).y((t=>a[t]))))).node()}}function gp(t,{x:e,y:n,...r}={}){return[e,n]=ri(e,n),new mp(t,{...r,x:e,y:n})}function vp(t,{x:e=Lo,y:n=Ao,...r}={}){return new mp(t,yd({...r,x:e,y:n}))}function xp(t,{x:e=Ao,y:n=Lo,...r}={}){return new mp(t,pd({...r,x:e,y:n}))}function wp(t,e){e=function({x:t,y:e,color:n,size:r,fx:o,fy:i,mark:a}={}){ti(t)||(t=Mp(t));ti(e)||(e=Mp(e));ti(n)||(n=Ci(n)?{color:n}:Mp(n));ti(r)||(r=Mp(r));ti(o)&&({value:o}=Mp(o));ti(i)&&({value:i}=Mp(i));null!=a&&(a=`${a}`.toLowerCase());return{x:t,y:e,color:n,size:r,fx:o,fy:i,mark:a}}(e);const{x:n,y:r,color:o,size:i}=e,a=$p(t,n),l=$p(t,r),s=$p(t,o),c=$p(t,i);let u,f,h,{fx:d,fy:p,x:{value:y,reduce:m,zero:g,...v},y:{value:x,reduce:w,zero:b,...k},color:{value:$,color:M,reduce:A},size:{value:L,reduce:E},mark:z}=e;if(void 0===m&&(m=null==w&&null==y&&null==L&&null!=x?"count":null),void 0===w&&(w=null==m&&null==x&&null==L&&null!=y?"count":null),void 0!==E||null!=L||null!=A||null!=m||null!=w||null!=y&&!Ai(a)||null!=x&&!Ai(l)||(E="count"),void 0===g&&(g=!!Ap(m)||void 0),void 0===b&&(b=!!Ap(w)||void 0),null==y&&null==x)throw new Error("must specify x or y");if(null!=m&&null==x)throw new Error("reducing x requires y");if(null!=w&&null==y)throw new Error("reducing y requires x");switch(void 0===z&&(z=null!=L||null!=E?"dot":Ap(m)||Ap(w)||null!=A?"bar":null!=y&&null!=x?Ai(a)||Ai(l)||null==m&&null==w&&!kp(a)&&!kp(l)?"dot":"line":null!=y||null!=x?"rule":null),z){case"dot":h=up,f="stroke";break;case"line":h=a&&l||null!=m||null!=w?b||null!=w||a&&kp(a)?xp:g||null!=m||l&&kp(l)?vp:gp:a?vp:xp,f="stroke",Ep(s)&&(u=null);break;case"area":h=!b&&null==w&&(g||null!=m||l&&kp(l))?Bd:Dd,f="fill",Ep(s)&&(u=null);break;case"rule":h=a?ku:$u,f="stroke";break;case"bar":h=null!=m?Ai(l)?Lp(m)&&a&&Ai(a)?op:tp:Ah:null!=w?Ai(a)?Lp(w)&&l&&Ai(l)?op:ep:Lh:null!=A||null!=E?a&&Ai(a)&&l&&Ai(l)?op:a&&Ai(a)?ep:l&&Ai(l)?tp:Mh:!a||!Si(a)||l&&Si(l)?!l||!Si(l)||a&&Si(a)?op:ep:tp,f="fill";break;default:throw new Error(`invalid mark: ${z}`)}let S,O={fx:d,fy:p,x:a??void 0,y:l??void 0,[f]:s??M,z:u,r:c??void 0,tip:!0},N={[f]:A??void 0,r:E??void 0};if(null!=m&&null!=w)throw new Error("cannot reduce both x and y");return null!=w?(N.y=w,S=Ai(a)?ga:ud):null!=m?(N.x=m,S=Ai(l)?va:fd):null==A&&null==E||(a&&l?S=Ai(a)&&Ai(l)?xa:Ai(a)?fd:Ai(l)?ud:hd:a?S=Ai(a)?ga:ud:l&&(S=Ai(l)?va:fd)),S!==hd&&S!==ud||(O.x={value:a,...v}),S!==hd&&S!==fd||(O.y={value:l,...k}),void 0===g&&(g=a&&!(S===hd||S===ud)&&(h===tp||h===Bd||h===Ah||h===$u)),void 0===b&&(b=l&&!(S===hd||S===fd)&&(h===ep||h===Dd||h===Lh||h===ku)),{fx:d??null,fy:p??null,x:{value:y??null,reduce:m??null,zero:!!g,...v},y:{value:x??null,reduce:w??null,zero:!!b,...k},color:{value:$??null,reduce:A??null,...void 0!==M&&{color:M}},size:{value:L??null,reduce:E??null},mark:z,markImpl:Sp[h],markOptions:O,transformImpl:Sp[S],transformOptions:N,colorMode:f}}function bp(t,e){const n=wp(t,e),{fx:r,fy:o,x:{zero:i},y:{zero:a},markOptions:l,transformOptions:s,colorMode:c}=n,u=zp[n.markImpl],f=zp[n.transformImpl],h=null!=r||null!=o?Oh({strokeOpacity:.1}):null,d=[i?ku([0]):null,a?$u([0]):null],p=u(t,f?f(s,l):l);return"stroke"===c?Tc(h,d,p):Tc(h,p,d)}function kp(e){let n,r;for(const o of e){if(null==o)continue;if(void 0===n){n=o;continue}const e=Math.sign(t(n,o));if(e){if(void 0!==r&&e!==r)return!1;n=o,r=e}}return!0}function $p(t,e){const n=vo(t,e.value);return n&&(n.label=pi(e.value)),n}function Mp(t){return function(t){if(null==t)return!1;if("function"==typeof t.reduceIndex)return!0;if("function"==typeof t.reduce&&Ko(t))return!0;if(/^p\d{2}$/i.test(t))return!0;switch(`${t}`.toLowerCase()){case"first":case"last":case"count":case"distinct":case"sum":case"proportion":case"proportion-facet":case"deviation":case"min":case"min-index":case"max":case"max-index":case"mean":case"median":case"variance":case"mode":return!0}return!1}(t)?{reduce:t}:{value:t}}function Ap(t){return/^(?:distinct|count|sum|proportion)$/i.test(t)}function Lp(t){return/^(?:first|last|mode)$/i.test(t)}function Ep(t){return!!t&&new et(t).size>t.length>>1}const zp={dot:up,line:gp,lineX:vp,lineY:xp,areaX:Bd,areaY:Dd,ruleX:ku,ruleY:$u,barX:tp,barY:ep,rect:Mh,rectX:Ah,rectY:Lh,cell:op,bin:hd,binX:ud,binY:fd,group:xa,groupX:ga,groupY:va},Sp=Object.fromEntries(Object.entries(zp).map((([t,e])=>[e,t])));function Op(t,e={}){let{x:n,x1:r,x2:o}=e;void 0===n&&void 0===r&&void 0===o&&(e={...e,x:n=Lo});const i={};return null!=n&&(i.x=t),null!=r&&(i.x1=t),null!=o&&(i.x2=t),Cp(i,e)}function Np(t,e={}){let{y:n,y1:r,y2:o}=e;void 0===n&&void 0===r&&void 0===o&&(e={...e,y:n=Lo});const i={};return null!=n&&(i.y=t),null!=r&&(i.y1=t),null!=o&&(i.y2=t),Cp(i,e)}function Cp(t={},e={}){const n=oi(e),r=Object.entries(t).map((([t,n])=>{const r=fi(t,e);if(null==r)throw new Error(`missing channel: ${t}`);const[o,i]=hi(r);return{key:t,input:r,output:o,setOutput:i,map:Tp(n)}}));return{...na(e,((t,e)=>{const o=vo(t,n),i=r.map((({input:e})=>vo(t,e))),a=r.map((({setOutput:e})=>e(new Array(t.length))));for(const t of e)for(const e of o?J(t,(t=>o[t])).values():[t])r.forEach((({map:t},n)=>t.mapIndex(e,i[n],a[n])));return{data:t,facets:e}})),...Object.fromEntries(r.map((({key:t,output:e})=>[t,e])))}}function Tp(t){if(null==t)throw new Error("missing map");if("function"==typeof t.mapIndex)return t;if("function"==typeof t.map&&Ko(t))return function(t){return console.warn("deprecated map interface; implement mapIndex instead."),{mapIndex:t.map.bind(t)}}(t);if("function"==typeof t)return Rp(si(t));switch(`${t}`.toLowerCase()){case"cumsum":return Ip;case"rank":return Rp(((t,e)=>mr(t,(t=>e[t]))));case"quantile":return Rp(((t,e)=>function(t,e){const n=gr(t,e)-1;return mr(t,e).map((t=>t/n))}(t,(t=>e[t]))))}throw new Error(`invalid map: ${t}`)}function Rp(t){return{mapIndex(e,n,r){const o=t(e,n);if(o.length!==e.length)throw new Error("map function returned a mismatched length");for(let t=0,n=e.length;t<n;++t)r[e[t]]=o[t]}}}const Ip={mapIndex(t,e,n){let r=0;for(const o of t)n[o]=r+=e[o]}};function Wp(t={},e){return 1===arguments.length&&(e=t),Op(Fp(t),e)}function jp(t={},e){return 1===arguments.length&&(e=t),Np(Fp(t),e)}function Fp(t={}){"number"==typeof t&&(t={k:t});let{k:e,reduce:n,shift:r,anchor:o,strict:i}=t;if(void 0===o&&void 0!==r&&(o=function(t){switch(`${t}`.toLowerCase()){case"centered":return"middle";case"leading":return"start";case"trailing":return"end"}throw new Error(`invalid shift: ${t}`)}(r),jl(`Warning: the shift option is deprecated; please use anchor "${o}" instead.`)),!((e=Math.floor(e))>0))throw new Error(`invalid k: ${e}`);return function(t="mean"){if("string"==typeof t){if(/^p\d{2}$/i.test(t))return Bp(Io(t));switch(t.toLowerCase()){case"deviation":return Bp(ut);case"max":return Dp(((t,e)=>N(t,(t=>e[t]))));case"mean":return _p;case"median":return Bp(ot);case"min":return Dp(((t,e)=>ct(t,(t=>e[t]))));case"mode":return Dp(((t,e)=>nt(t,(t=>e[t]))));case"sum":return qp;case"variance":return Bp(rt);case"difference":return Yp;case"ratio":return Gp;case"first":return Xp;case"last":return Zp}}if("function"!=typeof t)throw new Error(`invalid reduce: ${t}`);return Dp(si(t))}(n)(e,function(t="middle",e){switch(`${t}`.toLowerCase()){case"middle":return e-1>>1;case"start":return 0;case"end":return e-1}throw new Error(`invalid anchor: ${t}`)}(o,e),i)}function Bp(t){return(e,n,r)=>r?{mapIndex(r,o,i){const a=t=>null==o[t]?NaN:+o[t];let l=0;for(let t=0;t<e-1;++t)isNaN(a(t))&&++l;for(let o=0,s=r.length-e+1;o<s;++o)isNaN(a(o+e-1))&&++l,i[r[o+n]]=0===l?t(ci(r,o,o+e),a):NaN,isNaN(a(o))&&--l}}:{mapIndex(r,o,i){const a=t=>null==o[t]?NaN:+o[t];for(let o=-n;o<0;++o)i[r[o+n]]=t(ci(r,0,o+e),a);for(let o=0,l=r.length-n;o<l;++o)i[r[o+n]]=t(ci(r,o,o+e),a)}}}function Dp(t){return(e,n,r)=>r?{mapIndex(r,o,i){let a=0;for(let t=0;t<e-1;++t)a+=Tr(o[r[t]]);for(let l=0,s=r.length-e+1;l<s;++l)a+=Tr(o[r[l+e-1]]),a===e&&(i[r[l+n]]=t(ci(r,l,l+e),o)),a-=Tr(o[r[l]])}}:{mapIndex(r,o,i){for(let a=-n;a<0;++a)i[r[a+n]]=t(ci(r,0,a+e),o);for(let a=0,l=r.length-n;a<l;++a)i[r[a+n]]=t(ci(r,a,a+e),o)}}}function qp(t,e,n){return n?{mapIndex(n,r,o){let i=0,a=0;for(let e=0;e<t-1;++e){const t=r[n[e]];null===t||isNaN(t)?++i:a+=+t}for(let l=0,s=n.length-t+1;l<s;++l){const s=r[n[l]],c=r[n[l+t-1]];null===c||isNaN(c)?++i:a+=+c,o[n[l+e]]=0===i?a:NaN,null===s||isNaN(s)?--i:a-=+s}}}:{mapIndex(n,r,o){let i=0;const a=n.length;for(let o=0,l=Math.min(a,t-e-1);o<l;++o)i+=+r[n[o]]||0;for(let l=-e,s=a-e;l<s;++l)i+=+r[n[l+t-1]]||0,o[n[l+e]]=i,i-=+r[n[l]]||0}}}function _p(t,e,n){if(n){const r=qp(t,e,n);return{mapIndex(n,o,i){r.mapIndex(n,o,i);for(let r=0,o=n.length-t+1;r<o;++r)i[n[r+e]]/=t}}}return{mapIndex(n,r,o){let i=0,a=0;const l=n.length;for(let o=0,s=Math.min(l,t-e-1);o<s;++o){let t=r[n[o]];null===t||isNaN(t=+t)||(i+=t,++a)}for(let s=-e,c=l-e;s<c;++s){let l=r[n[s+t-1]],c=r[n[s]];null===l||isNaN(l=+l)||(i+=l,++a),o[n[s+e]]=i/a,null===c||isNaN(c=+c)||(i-=c,--a)}}}}function Pp(t,e,n,r){for(let o=n+r;n<o;++n){const r=t[e[n]];if(Tr(r))return r}}function Vp(t,e,n,r){for(let o=n+r-1;o>=n;--o){const n=t[e[o]];if(Tr(n))return n}}function Hp(t,e,n,r){for(let o=n+r;n<o;++n){let r=t[e[n]];if(null!==r&&!isNaN(r=+r))return r}}function Up(t,e,n,r){for(let o=n+r-1;o>=n;--o){let n=t[e[o]];if(null!==n&&!isNaN(n=+n))return n}}function Yp(t,e,n){return n?{mapIndex(n,r,o){for(let i=0,a=n.length-t;i<a;++i){const a=r[n[i]],l=r[n[i+t-1]];o[n[i+e]]=null===a||null===l?NaN:l-a}}}:{mapIndex(n,r,o){for(let i=-e,a=n.length-t+e+1;i<a;++i)o[n[i+e]]=Up(r,n,i,t)-Hp(r,n,i,t)}}}function Gp(t,e,n){return n?{mapIndex(n,r,o){for(let i=0,a=n.length-t;i<a;++i){const a=r[n[i]],l=r[n[i+t-1]];o[n[i+e]]=null===a||null===l?NaN:l/a}}}:{mapIndex(n,r,o){for(let i=-e,a=n.length-t+e+1;i<a;++i)o[n[i+e]]=Up(r,n,i,t)/Hp(r,n,i,t)}}}function Xp(t,e,n){return n?{mapIndex(n,r,o){for(let i=0,a=n.length-t;i<a;++i)o[n[i+e]]=r[n[i]]}}:{mapIndex(n,r,o){for(let i=-e,a=n.length-t+e+1;i<a;++i)o[n[i+e]]=Pp(r,n,i,t)}}}function Zp(t,e,n){return n?{mapIndex(n,r,o){for(let i=0,a=n.length-t;i<a;++i)o[n[i+e]]=r[n[i+t-1]]}}:{mapIndex(n,r,o){for(let i=-e,a=n.length-t+e+1;i<a;++i)o[n[i+e]]=Vp(r,n,i,t)}}}const Jp=20,Kp=2,Qp="currentColor",ty=.2,ey=!0,ny="end";function ry(t,{x:e=Lo,y:n,k:r=Kp,color:o=Qp,opacity:i=ty,fill:a=o,fillOpacity:l=i,stroke:s=o,strokeOpacity:c,strokeWidth:u,...f}={}){return Tc(Ri(a)?null:Bd(t,Cp({x1:iy({k:-r,...f}),x2:iy({k:r,...f})},{x1:e,x2:e,y:n,fill:a,fillOpacity:l,...f})),Ri(s)?null:vp(t,Cp({x:iy(f)},{x:e,y:n,stroke:s,strokeOpacity:c,strokeWidth:u,...f})))}function oy(t,{x:e,y:n=Lo,k:r=Kp,color:o=Qp,opacity:i=ty,fill:a=o,fillOpacity:l=i,stroke:s=o,strokeOpacity:c,strokeWidth:u,...f}={}){return Tc(Ri(a)?null:Dd(t,Cp({y1:iy({k:-r,...f}),y2:iy({k:r,...f})},{x:e,y1:n,y2:n,fill:a,fillOpacity:l,...f})),Ri(s)?null:xp(t,Cp({y:iy(f)},{x:e,y:n,stroke:s,strokeOpacity:c,strokeWidth:u,...f})))}function iy({n:t=Jp,k:e=0,strict:n=ey,anchor:r=ny}={}){return Fp({k:t,reduce:t=>at(t)+e*(ut(t)||0),strict:n,anchor:r})}const ay={ariaLabel:"tick",fill:null,stroke:"currentColor"};class ly extends Cc{constructor(t,e,n){super(t,e,n,ay),Gc(this,n)}render(t,e,n,r,o){return Ys("svg:g",o).call(bc,this,r,o).call(this._transform,this,e).call((i=>i.selectAll().data(t).enter().append("line").call(kc,this).attr("x1",this._x1(e,n,r)).attr("x2",this._x2(e,n,r)).attr("y1",this._y1(e,n,r)).attr("y2",this._y2(e,n,r)).call(dc,this,n).call(nu,this,n,o))).node()}}class sy extends ly{constructor(t,e={}){const{x:n,y:r,inset:o=0,insetTop:i=o,insetBottom:a=o}=e;super(t,{x:{value:n,scale:"x"},y:{value:r,scale:"y",type:"band",optional:!0}},e),this.insetTop=Oo(i),this.insetBottom=Oo(a)}_transform(t,e,{x:n}){t.call(Ac,e,{x:n},ac,0)}_x1(t,{x:e}){return t=>e[t]}_x2(t,{x:e}){return t=>e[t]}_y1({y:t},{y:e},{marginTop:n}){const{insetTop:r}=this;return e&&t?t=>e[t]+r:n+r}_y2({y:t},{y:e},{height:n,marginBottom:r}){const{insetBottom:o}=this;return e&&t?n=>e[n]+t.bandwidth()-o:n-r-o}}class cy extends ly{constructor(t,e={}){const{x:n,y:r,inset:o=0,insetRight:i=o,insetLeft:a=o}=e;super(t,{y:{value:r,scale:"y"},x:{value:n,scale:"x",type:"band",optional:!0}},e),this.insetRight=Oo(i),this.insetLeft=Oo(a)}_transform(t,e,{y:n}){t.call(Ac,e,{y:n},0,ac)}_x1({x:t},{x:e},{marginLeft:n}){const{insetLeft:r}=this;return e&&t?t=>e[t]+r:n+r}_x2({x:t},{x:e},{width:n,marginRight:r}){const{insetRight:o}=this;return e&&t?n=>e[n]+t.bandwidth()-o:n-r-o}_y1(t,{y:e}){return t=>e[t]}_y2(t,{y:e}){return t=>e[t]}}function uy(t,{x:e=Lo,...n}={}){return new sy(t,{...n,x:e})}function fy(t,{y:e=Lo,...n}={}){return new cy(t,{...n,y:e})}function hy(t,{x:e=Lo,y:n=null,r:r,fill:o="#ccc",fillOpacity:i,stroke:a="currentColor",strokeOpacity:l,strokeWidth:s=2,sort:c,...u}={}){const f=null!=n?va:ma;return Tc($u(t,f({x1:yy,x2:my},{x:e,y:n,stroke:a,strokeOpacity:l,...u})),tp(t,f({x1:"p25",x2:"p75"},{x:e,y:n,fill:o,fillOpacity:i,...u})),uy(t,f({x:"p50"},{x:e,y:n,stroke:a,strokeOpacity:l,strokeWidth:s,sort:c,...u})),up(t,Cp({x:py},{x:e,y:n,z:n,r:r,stroke:a,strokeOpacity:l,...u})))}function dy(t,{y:e=Lo,x:n=null,r:r,fill:o="#ccc",fillOpacity:i,stroke:a="currentColor",strokeOpacity:l,strokeWidth:s=2,sort:c,...u}={}){const f=null!=n?ga:ma;return Tc(ku(t,f({y1:yy,y2:my},{x:n,y:e,stroke:a,strokeOpacity:l,...u})),ep(t,f({y1:"p25",y2:"p75"},{x:n,y:e,fill:o,fillOpacity:i,...u})),fy(t,f({y:"p50"},{x:n,y:e,stroke:a,strokeOpacity:l,strokeWidth:s,sort:c,...u})),up(t,Cp({y:py},{x:n,y:e,z:n,r:r,stroke:a,strokeOpacity:l,...u})))}function py(t){const e=yy(t),n=my(t);return t.map((t=>t<e||t>n?t:NaN))}function yy(t){const e=2.5*gy(t)-1.5*vy(t);return ct(t,(t=>t>=e?t:NaN))}function my(t){const e=2.5*vy(t)-1.5*gy(t);return N(t,(t=>t<=e?t:NaN))}function gy(t){return W(t,.25)}function vy(t){return W(t,.75)}const xy={ariaLabel:"raster",stroke:null,pixelSize:1};function wy(t,e){const n=+t;if(isNaN(n))throw new Error(`invalid ${e}: ${t}`);return n}function by(t,e){const n=Math.floor(t);if(isNaN(n))throw new Error(`invalid ${e}: ${t}`);return n}class ky extends Cc{constructor(t,e,n={},r){let{width:o,height:i,x:a,y:l,x1:s=(null==a?0:void 0),y1:c=(null==l?0:void 0),x2:u=(null==a?o:void 0),y2:f=(null==l?i:void 0),pixelSize:h=r.pixelSize,blur:d=0,interpolate:p}=n;if(null!=o&&(o=by(o,"width")),null!=i&&(i=by(i,"height")),null!=s&&(s=wy(s,"x1")),null!=c&&(c=wy(c,"y1")),null!=u&&(u=wy(u,"x2")),null!=f&&(f=wy(f,"y2")),null==a&&(null==s||null==u))throw new Error("missing x");if(null==l&&(null==c||null==f))throw new Error("missing y");null!=t&&null!=o&&null!=i&&(void 0===a&&null!=s&&null!=u&&(a=function(t,e,n){return{transform(r){const o=r.length,i=new Float64Array(o),a=(e-t)/n,l=t+a/2;for(let t=0;t<o;++t)i[t]=t%n*a+l;return i}}}(s,u,o)),void 0===l&&null!=c&&null!=f&&(l=function(t,e,n,r){return{transform(o){const i=o.length,a=new Float64Array(i),l=(e-t)/r,s=t+l/2;for(let t=0;t<i;++t)a[t]=Math.floor(t/n)%r*l+s;return a}}}(c,f,o,i))),super(t,{x:{value:a,scale:"x",optional:!0},y:{value:l,scale:"y",optional:!0},x1:{value:null==s?null:[s],scale:"x",optional:!0,filter:null},y1:{value:null==c?null:[c],scale:"y",optional:!0,filter:null},x2:{value:null==u?null:[u],scale:"x",optional:!0,filter:null},y2:{value:null==f?null:[f],scale:"y",optional:!0,filter:null},...e},n,r),this.width=o,this.height=i,this.pixelSize=wy(h,"pixelSize"),this.blur=wy(d,"blur"),this.interpolate=null==a||null==l?null:function(t){if("function"==typeof t)return t;if(null==t)return Sy;switch(`${t}`.toLowerCase()){case"none":return Sy;case"nearest":return Ty;case"barycentric":return Oy();case"random-walk":return Ry()}throw new Error(`invalid interpolate: ${t}`)}(p)}}class $y extends ky{constructor(t,e={}){const{imageRendering:n}=e;if(null==t){const{fill:t,fillOpacity:n}=e;void 0!==qo(n)[0]&&(e=zy("fillOpacity",e)),void 0!==Do(t)[0]&&(e=zy("fill",e))}super(t,void 0,e,xy),this.imageRendering=Lc(n,"auto")}scale(t,{color:e,...n},r){return super.scale(t,n,r)}render(t,e,n,r,o){const i=e[n.channels.fill?.scale]??(t=>t),{x:a,y:l}=n,{document:s}=o,[c,u,f,h]=Ly(n,r,o),d=f-c,p=h-u,{pixelSize:y,width:m=Math.round(Math.abs(d)/y),height:g=Math.round(Math.abs(p)/y)}=this,v=m*g;let{fill:x,fillOpacity:w}=n,b=0;if(this.interpolate){const e=m/d,n=g/p,r=Yo(a,(t=>(t-c)*e),Float64Array),o=Yo(l,(t=>(t-u)*n),Float64Array);x&&(x=this.interpolate(t,m,g,r,o,x)),w&&(w=this.interpolate(t,m,g,r,o,w))}else null==this.data&&t&&(b=t.fi*v);const k=s.createElement("canvas");k.width=m,k.height=g;const $=k.getContext("2d"),M=$.createImageData(m,g),A=M.data;let{r:L,g:E,b:z}=Fn(this.fill)??{r:0,g:0,b:0},S=255*(this.fillOpacity??1);for(let t=0;t<v;++t){const e=t<<2;if(x){const n=i(x[t+b]);if(null==n){A[e+3]=0;continue}({r:L,g:E,b:z}=Fn(n))}w&&(S=255*w[t+b]),A[e+0]=L,A[e+1]=E,A[e+2]=z,A[e+3]=S}return this.blur>0&&vr(M,this.blur),$.putImageData(M,0,0),Ys("svg:g",o).call(bc,this,r,o).call(Ac,this,e).call((t=>t.append("image").attr("transform",`translate(${c},${u}) scale(${Math.sign(f-c)},${Math.sign(h-u)})`).attr("width",Math.abs(d)).attr("height",Math.abs(p)).attr("preserveAspectRatio","none").call(Mc,"image-rendering",this.imageRendering).call(kc,this).attr("xlink:href",k.toDataURL()))).node()}}function My(t,e,n){arguments.length<3&&(n=e,e=null);let{x:r,y:o,[t]:i,...a}=n;return void 0===r&&void 0===o&&function(t){if(!$i(t))return!1;for(const e of t)if(null!=e)return"object"==typeof e&&"0"in e&&"1"in e}(e)&&(r=No,o=Co,void 0===i&&(i=To)),[e,{...a,x:r,y:o,[t]:i}]}function Ay(){const[t,e]=My("fill",...arguments);return new $y(t,null==t||void 0!==e.fill||void 0!==e.fillOpacity?e:{...e,fill:Lo})}function Ly({x1:t,y1:e,x2:n,y2:r},o,{projection:i}){const{width:a,height:l,marginTop:s,marginRight:c,marginBottom:u,marginLeft:f}=o;return[t&&null==i?t[0]:f,e&&null==i?e[0]:s,n&&null==i?n[0]:a-c,r&&null==i?r[0]:l-u]}function Ey({x1:t,y1:e,x2:n,y2:r},o,i,a){const l={};return t&&(l.x1=t),e&&(l.y1=e),n&&(l.x2=n),r&&(l.y2=r),Ly(Ja(l,o),i,a)}function zy(t,e={}){const{[t]:n}=e;if("function"!=typeof n)throw new Error(`invalid ${t}: not a function`);return ra({...e,[t]:void 0},(function(r,o,i,a,l,s){const{x:c,y:u}=a;if(!c)throw new Error("missing scale: x");if(!u)throw new Error("missing scale: y");const[f,h,d,p]=Ey(i,a,l,s),y=d-f,m=p-h,{pixelSize:g}=this,{width:v=Math.round(Math.abs(y)/g),height:x=Math.round(Math.abs(m)/g)}=e,w=new Array(v*x*(o?o.length:1)),b=y/v,k=m/x;let $=0;for(const t of o??[void 0])for(let e=.5;e<x;++e)for(let r=.5;r<v;++r,++$)w[$]=n(c.invert(f+r*b),u.invert(h+e*k),t);return{data:w,facets:o,channels:{[t]:{value:w,scale:"auto"}}}}))}function Sy(t,e,n,r,o,i){const a=new Array(e*n);for(const l of t)r[l]<0||r[l]>=e||o[l]<0||o[l]>=n||(a[Math.floor(o[l])*e+Math.floor(r[l])]=i[l]);return a}function Oy({random:t=Z(42)}={}){return(e,n,r,o,i,a)=>{const{points:l,triangles:s,hull:c}=xr.from(e,(t=>o[t]),(t=>i[t])),u=new a.constructor(n*r).fill(NaN),f=new Uint8Array(n*r),h=function(t,e){return Si(t)||Li(t)?Iy:function(t){return(e,n,r,o,i,a,l,s)=>{const c=t(l,s);return c<n?e:c<n+o?r:i}}(e)}(a,t);for(let t=0;t<s.length;t+=3){const o=s[t],i=s[t+1],c=s[t+2],d=l[2*o],p=l[2*i],y=l[2*c],m=l[2*o+1],g=l[2*i+1],v=l[2*c+1],x=Math.min(d,p,y),w=Math.max(d,p,y),b=Math.min(m,g,v),k=Math.max(m,g,v),$=(g-v)*(d-y)+(m-v)*(y-p);if(!$)continue;const M=a[e[o]],A=a[e[i]],L=a[e[c]];for(let t=Math.floor(x);t<w;++t)for(let e=Math.floor(b);e<k;++e){if(t<0||t>=n||e<0||e>=r)continue;const o=t+.5,i=e+.5,a=Math.sign($),l=(g-v)*(o-y)+(i-v)*(y-p);if(l*a<0)continue;const s=(v-m)*(o-y)+(i-v)*(d-y);if(s*a<0)continue;const c=$-(l+s);if(c*a<0)continue;const x=t+n*e;u[x]=h(M,l/$,A,s/$,L,c/$,t,e),f[x]=1}}return function(t,e,n,r,o,i,a,l,s,c){n=Float64Array.from(l,(t=>n[s[t]])),r=Float64Array.from(l,(t=>r[s[t]])),o=Array.from(l,(t=>o[s[t]]));const u=n.length,f=Array.from({length:u},((t,e)=>function(t,e,n){const r=e.length,o=e.at(t-2),i=n.at(t-2),a=e.at(t-1),l=n.at(t-1),s=e[t],c=n[t],u=e.at(t+1-r),f=n.at(t+1-r),h=a-s,d=l-c,p=o-a,y=i-l,m=s-u,g=c-f,v=Math.hypot(h,d),x=Math.hypot(p,y),w=Math.hypot(m,g);return(t,e)=>{const n=t-a,r=e-l,o=t-s,i=e-c;return Cy(n,r,o,i)>-1e-6&&Cy(n,r,h,d)*x-Cy(n,r,p,y)*v>-1e-6&&Cy(o,i,m,g)*v-Cy(o,i,h,d)*w<=0}}(e,n,r)));let h=0;for(let l=0;l<a;++l){const a=l+.5;for(let s=0;s<i;++s){const d=s+i*l;if(!e[d]){const e=s+.5;for(let i=0;i<u;++i){const p=(u+h+(i%2?(i+1)/2:-i/2))%u;if(f[p](e,a)){const i=Ny(n.at(p-1),r.at(p-1),n[p],r[p],e,a);t[d]=c(o.at(p-1),i,o[p],1-i,o[p],0,s,l),h=p;break}}}}}}(u,f,o,i,a,n,r,c,e,h),u}}function Ny(t,e,n,r,o,i){const a=n-t,l=r-e,s=a*(n-o)+l*(r-i),c=a*(o-t)+l*(i-e);return s>0&&c>0?s/(s+c):+(s>c)}function Cy(t,e,n,r){return t*r-n*e}function Ty(t,e,n,r,o,i){const a=new i.constructor(e*n),l=xr.from(t,(t=>r[t]),(t=>o[t]));let s,c;for(let r=.5,o=0;r<n;++r){c=s;for(let n=.5;n<e;++n,++o)c=l.find(n,r,c),.5===n&&(s=c),a[o]=i[t[c]]}return a}function Ry({random:t=Z(42),minDistance:e=.5,maxSteps:n=2}={}){return(r,o,i,a,l,s)=>{const c=new s.constructor(o*i),u=xr.from(r,(t=>a[t]),(t=>l[t]));let f,h,d;for(let p=.5,y=0;p<i;++p){h=f;for(let i=.5;i<o;++i,++y){let o,m=i,g=p;d=h=u.find(m,g,h),.5===i&&(f=h);let v=0;for(;(o=Math.hypot(a[r[d]]-m,l[r[d]]-g))>e&&v<n;){const e=2*t(i,p,v)*Math.PI;m+=Math.cos(e)*o,g+=Math.sin(e)*o,d=u.find(m,g,d),++v}c[y]=s[r[d]]}}return c}}function Iy(t,e,n,r,o,i){return e*t+r*n+i*o}const Wy={ariaLabel:"contour",fill:"none",stroke:"currentColor",strokeMiterlimit:1,pixelSize:2};class jy extends ky{constructor(t,{smooth:e=!0,value:n,...r}={}){const o=uc({},r,Wy);if(void 0===n)for(const t in o)if(null!=o[t].value){if(void 0!==n)throw new Error("ambiguous contour value");n=r[t],r[t]="value"}if(null!=n){const t={transform:t=>t.map((t=>t.value)),label:pi(n)};for(const e in o)"value"===r[e]&&(r[e]=t)}if(null==t){if(null==n)throw new Error("missing contour value");r=zy("value",{value:n,...r}),n=null}else{let{interpolate:t}=r;void 0===n&&(n=Lo),void 0===t&&(r.interpolate="nearest")}super(t,{value:{value:n,optional:!0}},function({thresholds:t,interval:e,...n}){return t=wd(t,e,sr),ra(n,(function(e,n,r,o,i,a){const[l,s,c,u]=Ey(r,o,i,a),f=c-l,h=u-s,{pixelSize:d,width:p=Math.round(Math.abs(f)/d),height:y=Math.round(Math.abs(h)/d)}=this,m=p/f,g=y/h,v=r.value.value,x=[];if(this.interpolate){const{x:t,y:e}=Vs(r,o,a),i=Yo(t,(t=>(t-l)*m),Float64Array),c=Yo(e,(t=>(t-s)*g),Float64Array),u=[r.x,r.y,r.value],f=[i,c,v];for(const t of n){const e=this.filter(t,u,f);x.push(this.interpolate(e,p,y,i,c,v))}}else if(n){const t=p*y,e=n.length;for(let n=0;n<e;++n)x.push(v.slice(n*t,n*t+t))}else x.push(v);if(this.blur>0)for(const t of x)wr({data:t,width:p,height:y},this.blur);const w=function(t,e,n,r){if("function"==typeof t?.range)return t.range(t.floor(n),r);"function"==typeof t&&(t=t(e,n,r));if("number"!=typeof t)return Ho(t);const o=qe(...kr(n,r,t),t);for(;o[o.length-1]>=r;)o.pop();for(;o[1]<n;)o.shift();return o}(t,v,...function(t){return[ct(t,(t=>ct(t,By))),N(t,(t=>N(t,By)))]}(x));if(null===w)throw new Error(`unsupported thresholds: ${t}`);const{contour:b}=br().size([p,y]).smooth(this.smooth),k=[],$=[];for(const t of x)$.push(I(k.length,k.push(...Yo(w,(e=>b(t,e))))));for(const{coordinates:t}of k)for(const e of t)for(const t of e)for(const e of t)e[0]=e[0]/m+l,e[1]=e[1]/g+s;return{data:k,facets:$,channels:Za(this.contourChannels,k)}}))}(r),Wy);const i={geometry:{value:Lo}};for(const t in this.channels){const e=this.channels[t],{scale:n}=e;"x"!==n&&"y"!==n&&"value"!==t&&(i[t]=e,delete this.channels[t])}this.contourChannels=i,this.smooth=!!e}filter(t,{x:e,y:n,value:r,...o},i){return super.filter(t,o,i)}render(t,e,n,r,o){const{geometry:i}=n,a=pn();return Ys("svg:g",o).call(bc,this,r,o).call(Ac,this,e).call((e=>{e.selectAll().data(t).enter().append("path").call(kc,this).attr("d",(t=>a(i[t]))).call(dc,this,n)})).node()}}function Fy(){return new jy(...My("value",...arguments))}function By(t){return isFinite(t)?t:NaN}function Dy(t,e){return Py(qc,t,e)}function qy(t,e={}){return Py(_c,t,e)}function _y(t,e={}){return Py(Pc,t,e)}function Py(t,e,n={}){const{x:r,y:o,maxRadius:i}=n,a=t({px:r,py:o,maxRadius:i}),l=[];null!=r&&l.push(ku(e,Uy("x",{...a,inset:-6},n))),null!=o&&l.push($u(e,Uy("y",{...a,inset:-6},n))),null!=r&&l.push(Ou(e,Yy("x",{...a,dy:9,frameAnchor:"bottom",lineAnchor:"top"},n))),null!=o&&l.push(Ou(e,Yy("y",{...a,dx:-9,frameAnchor:"left",textAnchor:"end"},n)));for(const t of l)t.ariaLabel=`crosshair ${t.ariaLabel}`;return Tc(...l)}function Vy(t,{channels:e,...n},{facet:r,facetAnchor:o,fx:i,fy:a,[t]:l,channels:s,transform:c,initializer:u}){return{...n,facet:r,facetAnchor:o,fx:i,fy:a,[t]:l,channels:{...e,...s},transform:c,initializer:Hy(t,u)}}function Hy(t,e){return null==e?e:function(n,r,{x:o,y:i,px:a,py:l,...s},...c){const{channels:{x:u,y:f,...h}={},...d}=e.call(this,n,r,{...s,x:a,y:l},...c);return{channels:{...h,...u&&{px:u,..."x"===t&&{x:u}},...f&&{py:f,..."y"===t&&{y:f}}},...d}}}function Uy(t,e,n){const{color:r="currentColor",opacity:o=.2,ruleStroke:i=r,ruleStrokeOpacity:a=o,ruleStrokeWidth:l}=n;return{...Vy(t,e,n),stroke:i,strokeOpacity:a,strokeWidth:l}}function Yy(t,e,n){const{color:r="currentColor",textFill:o=r,textFillOpacity:i,textStroke:a="var(--plot-background)",textStrokeOpacity:l,textStrokeWidth:s=5}=n;return{...Vy(t,e,Gy(t,n)),fill:o,fillOpacity:i,stroke:a,strokeOpacity:l,strokeWidth:s}}function Gy(t,e){return ra(e,((e,n,r)=>({channels:{text:{value:al(r,t)?.value}}})))}const Xy={ariaLabel:"delaunay link",fill:"none",stroke:"currentColor",strokeMiterlimit:1},Zy={ariaLabel:"delaunay mesh",fill:null,stroke:"currentColor",strokeOpacity:.2},Jy={ariaLabel:"hull",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeMiterlimit:1},Ky={ariaLabel:"voronoi",fill:"none",stroke:"currentColor",strokeMiterlimit:1},Qy={ariaLabel:"voronoi mesh",fill:null,stroke:"currentColor",strokeOpacity:.2};class tm extends Cc{constructor(t,e={}){const{x:n,y:r,z:o,curve:i,tension:a}=e;super(t,{x:{value:n,scale:"x",optional:!0},y:{value:r,scale:"y",optional:!0},z:{value:o,optional:!0}},e,Xy),this.curve=ld(i,a),Gc(this,e)}render(t,e,n,r,o){const{x:i,y:a}=e,{x:l,y:s,z:c}=n,{curve:u}=this,[f,h]=Nc(this,r),d=l?t=>l[t]:Ro(f),p=s?t=>s[t]:Ro(h),y=this;function m(t){let e=-1;const r=[],i={};for(const t in n)i[t]=[];const a=[],l=[],s=[],c=[];function f(o,u){o=t[o],u=t[u],r.push(++e),a[e]=d(o),s[e]=p(o),l[e]=d(u),c[e]=p(u);for(const t in n)i[t].push(n[t][u])}const{halfedges:h,hull:m,triangles:g}=xr.from(t,d,p);for(let t=0;t<h.length;++t){const e=h[t];e>t&&f(g[t],g[e])}for(let t=0;t<m.length;++t)f(m[t],m[(t+1)%m.length]);Nn(this).selectAll().data(r).enter().append("path").call(kc,y).attr("d",(t=>{const e=jn(),n=u(e);return n.lineStart(),n.point(a[t],s[t]),n.point(l[t],c[t]),n.lineEnd(),e})).call(dc,y,i).call(nu,y,i,o)}return Ys("svg:g",o).call(bc,this,r,o).call(Ac,this,{x:l&&i,y:s&&a}).call(c?e=>e.selectAll().data(J(t,(t=>c[t])).values()).enter().append("g").each(m):e=>e.datum(t).each(m)).node()}}class em extends Cc{constructor(t,e={},n,r=({z:t})=>t){const{x:o,y:i}=e;super(t,{x:{value:o,scale:"x",optional:!0},y:{value:i,scale:"y",optional:!0},z:{value:r(e),optional:!0}},e,n)}render(t,e,n,r,o){const{x:i,y:a}=e,{x:l,y:s,z:c}=n,[u,f]=Nc(this,r),h=l?t=>l[t]:Ro(u),d=s?t=>s[t]:Ro(f),p=this;function y(t){const e=xr.from(t,h,d);Nn(this).append("path").datum(t[0]).call(kc,p).attr("d",p._render(e,r)).call(dc,p,n)}return Ys("svg:g",o).call(bc,this,r,o).call(Ac,this,{x:l&&i,y:s&&a}).call(c?e=>e.selectAll().data(J(t,(t=>c[t])).values()).enter().append("g").each(y):e=>e.datum(t).each(y)).node()}}class nm extends em{constructor(t,e={}){super(t,e,Zy),this.fill="none"}_render(t){return t.render()}}class rm extends em{constructor(t,e={}){super(t,e,Jy,oi)}_render(t){return t.renderHull()}}class om extends Cc{constructor(t,e={}){const{x:n,y:r,z:o}=e;super(t,{x:{value:n,scale:"x",optional:!0},y:{value:r,scale:"y",optional:!0},z:{value:o,optional:!0}},ra(e,(function(t,e,n,r,o,i){let{x:a,y:l,z:s}=n;({x:a,y:l}=Vs(n,r,i)),s=s?.value;const c=new Array((a??l).length).fill(null),[u,f]=Nc(this,o),h=a?t=>a[t]:Ro(u),d=l?t=>l[t]:Ro(f);for(let t of e){a&&(t=t.filter((t=>Tr(h(t))))),l&&(t=t.filter((t=>Tr(d(t)))));for(const[,e]of Aa(t,s)){const t=am(xr.from(e,h,d),o);for(let n=0,r=e.length;n<r;++n)c[e[n]]=t.renderCell(n)}}return{data:t,facets:e,channels:{cells:{value:c}}}})),Ky)}render(t,e,n,r,o){const{x:i,y:a}=e,{x:l,y:s,cells:c}=n;return Ys("svg:g",o).call(bc,this,r,o).call(Ac,this,{x:l&&i,y:s&&a}).call((e=>{e.selectAll().data(t).enter().append("path").call(kc,this).attr("d",(t=>c[t])).call(dc,this,n)})).node()}}class im extends em{constructor(t,e){super(t,e,Qy),this.fill="none"}_render(t,e){return am(t,e).render()}}function am(t,e){const{width:n,height:r,marginTop:o,marginRight:i,marginBottom:a,marginLeft:l}=e;return t.voronoi([l,o,n-i,r-a])}function lm(t,e,{x:n,y:r,...o}={}){return[n,r]=ri(n,r),new t(e,{...o,x:n,y:r})}function sm(t,e){return lm(tm,t,e)}function cm(t,e){return lm(nm,t,e)}function um(t,e){return lm(rm,t,e)}function fm(t,{x:e,y:n,initializer:r,...o}={}){return lm(om,t,{...na({...o,x:e,y:n},Xf),initializer:r})}function hm(t,e){return lm(im,t,e)}const dm={ariaLabel:"density",fill:"none",stroke:"currentColor",strokeMiterlimit:1};class pm extends Cc{constructor(t,{x:e,y:n,z:r,weight:o,fill:i,stroke:a,...l}={}){const s=gm(i)&&(i="currentColor",!0),c=gm(a)&&(a="currentColor",!0);super(t,{x:{value:e,scale:"x",optional:!0},y:{value:n,scale:"y",optional:!0},z:{value:oi({z:r,fill:i,stroke:a}),optional:!0},weight:{value:o,optional:!0}},function(t,e,n){const r=100;let{bandwidth:o,thresholds:i}=t;return o=void 0===o?20:+o,i=void 0===i?20:"function"==typeof i?.[Symbol.iterator]?Wo(i):+i,ra(t,(function(t,a,l,s,c,u){const f=l.weight?Wo(l.weight.value):null,h=l.z?.value,{z:d}=this,[p,y]=Nc(this,c),{width:m,height:g}=c,{x:v,y:x}=Vs(l,s,u),w=Object.fromEntries(Object.entries(l).filter((([t])=>!mm.has(t))).map((([t,e])=>[t,{...e,value:[]}]))),b=e&&[],k=n&&[],$=$r().x(v?t=>v[t]:p).y(x?t=>x[t]:y).weight(f?t=>f[t]:1).size([m,g]).bandwidth(o),M=[];for(const t of a){const e=[];M.push(e);for(const n of h?yc(t,h,d):[t]){const t=$.contours(n);e.push([n,t])}}let A=i;if(!(A instanceof fo)){let t=0;for(const e of M)for(const[,n]of e){const e=n.max;e>t&&(t=e)}A=Float64Array.from({length:i-1},((e,n)=>t*r*(n+1)/i))}const L=[],E=[];for(const t of M){const e=[];L.push(e);for(const[n,o]of t)for(const t of A){e.push(E.length),E.push(o(t/r)),b&&b.push(t),k&&k.push(t);for(const t in w)w[t].value.push(l[t].value[n[0]])}}return b&&b.push(0),k&&k.push(0),{data:t,facets:L,channels:{...w,...b&&{fill:{value:b,scale:"color"}},...k&&{stroke:{value:k,scale:"color"}},contours:{value:E}}}}))}({...l,fill:i,stroke:a},s,c),dm),s&&(this.fill=void 0),c&&(this.stroke=void 0),this.z=r}filter(t){return t}render(t,e,n,r,o){const{contours:i}=n,a=pn();return Ys("svg:g",o).call(bc,this,r,o).call(Ac,this,{}).call((e=>e.selectAll().data(t).enter().append("path").call(kc,this).call(dc,this,n).attr("d",(t=>a(i[t]))))).node()}}function ym(t,{x:e,y:n,...r}={}){return[e,n]=ri(e,n),new pm(t,{...r,x:e,y:n})}const mm=new Set(["x","y","z","weight"]);function gm(t){return/^density$/i.test(t)}function vm(t,e){return wm("x",t,e)}function xm(t,e){return wm("y",t,e)}function wm(t,e,{x1:n,x2:r,y1:o,y2:i,x:a=(void 0===n&&void 0===r?"y"===t?Ao:Lo:void 0),y:l=(void 0===o&&void 0===i?"x"===t?Ao:Lo:void 0),fill:s,positiveFill:c="#3ca951",negativeFill:u="#4269d0",fillOpacity:f=1,positiveFillOpacity:h=f,negativeFillOpacity:d=f,stroke:p,strokeOpacity:y,z:m=Do(p)[0],clip:g,tip:v,render:x,...w}={}){return[n,r]=bm(a,n,r),[o,i]=bm(l,o,i),n===r&&o===i&&("y"===t?o=km(0):n=km(0)),({tip:v}=Wc({tip:v},"y"===t?"x":"y")),Tc(Ri(c)?null:Object.assign(Fd(e,{x1:n,x2:r,y1:o,y2:i,z:m,fill:c,fillOpacity:h,render:Rc(x,$m(t,!0)),clip:g,...w}),{ariaLabel:"positive difference"}),Ri(u)?null:Object.assign(Fd(e,{x1:n,x2:r,y1:o,y2:i,z:m,fill:u,fillOpacity:d,render:Rc(x,$m(t,!1)),clip:g,...w}),{ariaLabel:"negative difference"}),gp(e,{x:r,y:i,z:m,stroke:p,strokeOpacity:y,tip:v,clip:!0,...w}))}function bm(t,e,n){return void 0===e&&void 0===n?e=n=km(t):void 0===e?(n=km(n),e=void 0===t?n:km(t)):void 0===n?(e=km(e),n=void 0===t?e:km(t)):(e=km(e),n=km(n)),[e,n]}function km(t){let e;const{value:n,label:r=pi(n)}=ki(t);return{transform:t=>e||(e=vo(t,n)),label:r}}function $m(t,e){const n="x"===t?"y":"x",r=`${n}1`,o=`${n}2`,i=`${t}1`,a=`${t}2`;return(n,l,s,c,u,f)=>{const{[r]:h,[o]:d}=s,p=new Float32Array(h.length),y=new Float32Array(d.length),m=c["y"===t?"height":"width"];(e===ts(l[t])<0?p:y).fill(m);const g=f(n,l,{...s,[o]:h,[a]:y},c,u),v=f(n,l,{...s,[r]:d,[i]:p},c,u),x=g.querySelector("g")??g,w=v.querySelector("g")??v;for(let t=0;x.firstChild;t+=2){const e=cc(),n=Ys("svg:clipPath",u).attr("id",e).node();n.appendChild(x.firstChild),w.childNodes[t].setAttribute("clip-path",`url(#${e})`),w.insertBefore(n,w.childNodes[t])}return v}}function Mm({geometry:t=Lo,...e}={}){const n=Xs((e=>vo(e,t)));return ra({...e,x:null,y:null,geometry:{transform:n}},((t,e,r,o,i,a)=>{const l=n(t),s=l.length,c=new Float64Array(s),u=new Float64Array(s),{centroid:f}=a.path();for(let t=0;t<s;++t)[c[t],u[t]]=f(l[t]);return{data:t,facets:e,channels:{x:{value:c,scale:null,source:null},y:{value:u,scale:null,source:null}}}}))}function Am({geometry:t=Lo,...e}={}){const n=Xs((e=>vo(e,t))),r=Xs((t=>vo(n(t),Mr)));return{...e,x:{transform:t=>Float64Array.from(r(t),(([t])=>t))},y:{transform:t=>Float64Array.from(r(t),(([,t])=>t))},geometry:{transform:n}}}const Lm={ariaLabel:"geo",fill:"none",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:1};class Em extends Cc{constructor(t,e={}){const[n,r]=qo(e.r,3);super(t,{x:{value:e.tip?e.x:null,scale:"x",optional:!0},y:{value:e.tip?e.y:null,scale:"y",optional:!0},r:{value:n,scale:"r",filter:Fr,optional:!0},geometry:{value:e.geometry,scale:"projection"}},sp(e),Lm),this.r=r}render(t,e,n,r,o){const{geometry:i,r:a}=n,l=o.path(),{r:s}=this;return Br(s)?t=[]:void 0!==s&&l.pointRadius(s),Ys("svg:g",o).call(bc,this,r,o).call(Ac,this,e).call((e=>{e.selectAll().data(t).enter().append("path").call(kc,this).attr("d",a?t=>l.pointRadius(a[t])(i[t]):t=>l(i[t])).call(dc,this,n)})).node()}}function zm(t,e={}){return e.tip&&void 0===e.x&&void 0===e.y?e=Mm(e):void 0===e.geometry&&(e={...e,geometry:Lo}),new Em(t,e)}function Sm({strokeWidth:t=1.5,...e}={}){return zm({type:"Sphere"},{strokeWidth:t,...e})}function Om({strokeOpacity:t=.1,...e}={}){return zm(Ar(),{strokeOpacity:t,...e})}const Nm=.5;function Cm(t={fill:"count"},{binWidth:e,...n}={}){const{z:r}=n;return e=void 0===e?20:Oo(e),ba(t=za(t,n),"fill")&&(n.channels={...n.channels,fill:{value:[]}}),void 0===n.symbol&&(n.symbol="hexagon"),void 0!==n.r||ba(t,"r")||(n.r=e/2),ra(n,((n,o,i,a,l,s)=>{let{x:c,y:u,z:f,fill:h,stroke:d,symbol:p}=i;if(void 0===c)throw new Error("missing channel: x");if(void 0===u)throw new Error("missing channel: y");({x:c,y:u}=Vs(i,a,s)),f=f?f.value:vo(n,r),h=h?.value,d=d?.value,p=p?.value;const y=Ta(t,{z:f,fill:h,stroke:d,symbol:p}),m=f&&[],g=h&&[],v=d&&[],x=p&&[],w=[],b=[],k=[];let $=-1;for(const e of t)e.initialize(n);for(const r of o){const o=[];for(const e of t)e.scope("facet",r);for(const[i,a]of Aa(r,y))for(const{index:r,extent:l}of Tm(n,a,c,u,e)){o.push(++$),b.push(l.x),k.push(l.y),f&&m.push(y===f?i:f[r[0]]),h&&g.push(y===h?i:h[r[0]]),d&&v.push(y===d?i:d[r[0]]),p&&x.push(y===p?i:p[r[0]]);for(const e of t)e.reduce(r,l)}w.push(o)}const M=i.x.scale,A=i.y.scale;return{data:n,facets:w,channels:{x:{value:b,source:a[M]?{value:Yo(b,a[M].invert),scale:M}:null},y:{value:k,source:a[A]?{value:Yo(k,a[A].invert),scale:A}:null},...f&&{z:{value:m}},...h&&{fill:{value:g,scale:"auto"}},...d&&{stroke:{value:v,scale:"auto"}},...p&&{symbol:{value:x,scale:"auto"}},...Object.fromEntries(t.map((({name:t,output:n})=>[t,{scale:"auto",label:n.label,radius:"r"===t?e/2:void 0,value:n.transform()}])))}}}))}function Tm(t,e,n,r,o){const i=o*(1.5/Zi),a=new Map;for(const l of e){let e=n[l],s=r[l];if(isNaN(e)||isNaN(s))continue;let c=Math.round(s=(s-0)/i),u=Math.round(e=(e-Nm)/o-(1&c)/2),f=s-c;if(3*Math.abs(f)>1){let t=e-u,n=u+(e<u?-1:1)/2,r=c+(s<c?-1:1),o=e-n,i=s-r;t*t+f*f>o*o+i*i&&(u=n+(1&c?1:-1)/2,c=r)}const h=`${u},${c}`;let d=a.get(h);void 0===d&&(d={index:[],extent:{data:t,x:(u+(1&c)/2)*o+Nm,y:c*i+0}},a.set(h,d)),d.index.push(l)}return a.values()}const Rm={ariaLabel:"hexgrid",fill:"none",stroke:"currentColor",strokeOpacity:.1};function Im(t){return new Wm(t)}class Wm extends Cc{constructor({binWidth:t=20,clip:e=!0,...n}={}){super($o,void 0,{clip:e,...n},Rm),this.binWidth=Oo(t)}render(t,e,n,r,o){const{binWidth:i}=this,{marginTop:a,marginRight:l,marginBottom:s,marginLeft:c,width:u,height:f}=r,h=c-Nm,d=u-l-Nm,p=a-0,y=f-s-0,m=i/2,g=m*Ji,v=g/2,x=2*m,w=1.5*g,b=Math.floor(h/x),k=Math.ceil(d/x),$=Math.floor((p+v)/w),M=Math.ceil((y-v)/w)+1,A=`m0,${jm(-g)}l${jm(m)},${jm(v)}v${jm(g)}l${jm(-m)},${jm(v)}`;let L=A;for(let t=$;t<M;++t)for(let e=b;e<k;++e)L+=`M${jm(e*x+(1&t)*m)},${jm(t*w)}${A}`;return Ys("svg:g",o).datum(0).call(bc,this,r,o).call(Ac,this,{},ac+Nm,ac+0).call((t=>t.append("path").call(kc,this).call(dc,this,n).attr("d",L))).node()}}function jm(t){return Math.round(1e3*t)/1e3}const Fm={ariaLabel:"image",fill:null,stroke:null};class Bm extends Cc{constructor(t,e={}){let{x:n,y:r,r:o,width:i,height:a,rotate:l,src:s,preserveAspectRatio:c,crossOrigin:u,frameAnchor:f,imageRendering:h}=e;null==o&&(o=void 0),void 0===o&&void 0===i&&void 0===a?i=a=16:void 0===i&&void 0!==a?i=a:void 0===a&&void 0!==i&&(a=i);const[d,p]="string"==typeof(y=s)&&(function(t){return/^\.*\//.test(t)}(y)||function(t){return/^(blob|data|file|http|https):/i.test(t)}(y))?[void 0,y]:[y,void 0];var y;const[m,g]=qo(o),[v,x]=qo(i,void 0!==g?2*g:void 0),[w,b]=qo(a,void 0!==g?2*g:void 0),[k,$]=qo(l,0);super(t,{x:{value:n,scale:"x",optional:!0},y:{value:r,scale:"y",optional:!0},r:{value:m,scale:"r",filter:Fr,optional:!0},width:{value:v,filter:Fr,optional:!0},height:{value:w,filter:Fr,optional:!0},rotate:{value:k,optional:!0},src:{value:d,optional:!0}},sp(e),Fm),this.src=p,this.width=x,this.rotate=$,this.height=b,this.r=g,this.preserveAspectRatio=Lc(c,"xMidYMid"),this.crossOrigin=So(u),this.frameAnchor=ji(f),this.imageRendering=Lc(h,"auto")}render(t,e,n,r,o){const{x:i,y:a}=e,{x:l,y:s,width:c,height:u,r:f,rotate:h,src:d}=n,{r:p,width:y,height:m,rotate:g}=this,[v,x]=Nc(this,r);return Ys("svg:g",o).call(bc,this,r,o).call(Ac,this,{x:l&&i,y:s&&a}).call((e=>e.selectAll().data(t).enter().append("image").call(kc,this).attr("x",Dm(l,c,f,v,y,p)).attr("y",Dm(s,u,f,x,m,p)).attr("width",c?t=>c[t]:void 0!==y?y:f?t=>2*f[t]:2*p).attr("height",u?t=>u[t]:void 0!==m?m:f?t=>2*f[t]:2*p).attr("transform",h?t=>`rotate(${h[t]})`:g?`rotate(${g})`:null).attr("transform-origin",h||g?Au`${l?t=>l[t]:v}px ${s?t=>s[t]:x}px`:null).call(Mc,"href",d?t=>d[t]:this.src).call(Mc,"preserveAspectRatio",this.preserveAspectRatio).call(Mc,"crossorigin",this.crossOrigin).call(Mc,"image-rendering",this.imageRendering).call(Mc,"clip-path",f?t=>`circle(${f[t]}px)`:void 0!==p?`circle(${p}px)`:null).call(dc,this,n))).node()}}function Dm(t,e,n,r,o,i){return e&&t?n=>t[n]-e[n]/2:e?t=>r-e[t]/2:t&&void 0!==o?e=>t[e]-o/2:void 0!==o?r-o/2:n&&t?e=>t[e]-n[e]:n?t=>r-n[t]:t?e=>t[e]-i:r-i}function qm(t,{x:e,y:n,...r}={}){return void 0===r.frameAnchor&&([e,n]=ri(e,n)),new Bm(t,{...r,x:e,y:n})}function _m(t,e,n){var r=0===t||1===t?0:Math.exp(Vm(e+n)-Vm(e)-Vm(n)+e*Math.log(t)+n*Math.log(1-t));return!(t<0||t>1)&&(t<(e+1)/(e+n+2)?r*Pm(t,e,n)/e:1-r*Pm(1-t,n,e)/n)}function Pm(t,e,n){var r,o,i,a,l=1e-30,s=1,c=e+n,u=e+1,f=e-1,h=1,d=1-c*t/u;for(Math.abs(d)<l&&(d=l),a=d=1/d;s<=100&&(d=1+(o=s*(n-s)*t/((f+(r=2*s))*(e+r)))*d,Math.abs(d)<l&&(d=l),h=1+o/h,Math.abs(h)<l&&(h=l),a*=(d=1/d)*h,d=1+(o=-(e+s)*(c+s)*t/((e+r)*(u+r)))*d,Math.abs(d)<l&&(d=l),h=1+o/h,Math.abs(h)<l&&(h=l),a*=i=(d=1/d)*h,!(Math.abs(i-1)<3e-7));s++);return a}function Vm(t){var e,n,r,o=0,i=[76.18009172947146,-86.5053203294167,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18],a=1.000000000190015;for(r=(n=e=t)+5.5,r-=(e+.5)*Math.log(r);o<6;o++)a+=i[o]/++n;return Math.log(2.506628274631*a/e)-r}function Hm(t,e){var n=function(t,e,n){var r,o,i,a,l,s,c,u,f,h,d=e-1,p=n-1,y=0;if(t<=0)return 0;if(t>=1)return 1;for(e>=1&&n>=1?(i=t<.5?t:1-t,s=(2.30753+.27061*(a=Math.sqrt(-2*Math.log(i))))/(1+a*(.99229+.04481*a))-a,t<.5&&(s=-s),c=(s*s-3)/6,u=2/(1/(2*e-1)+1/(2*n-1)),f=s*Math.sqrt(c+u)/u-(1/(2*n-1)-1/(2*e-1))*(c+5/6-2/(3*u)),s=e/(e+n*Math.exp(2*f))):(r=Math.log(e/(e+n)),o=Math.log(n/(e+n)),s=t<(a=Math.exp(e*r)/e)/(f=a+(l=Math.exp(n*o)/n))?Math.pow(e*f*t,1/e):1-Math.pow(n*f*(1-t),1/n)),h=-Vm(e)-Vm(n)+Vm(e+n);y<10;y++){if(0===s||1===s)return s;if((s-=a=(l=(_m(s,e,n)-t)/(a=Math.exp(d*Math.log(s)+p*Math.log(1-s)+h)))/(1-.5*Math.min(1,l*(d/s-p/(1-s)))))<=0&&(s=.5*(s+a)),s>=1&&(s=.5*(s+a+1)),Math.abs(a)<1e-8*s&&y>0)break}return s}(2*Math.min(t,1-t),.5*e,.5);return n=Math.sqrt(e*(1-n)/n),t>.5?n:-n}const Um={ariaLabel:"linear-regression",fill:"currentColor",fillOpacity:.1,stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:1};class Ym extends Cc{constructor(t,e={}){const{x:n,y:r,z:o,ci:i=.95,precision:a=4}=e;if(super(t,{x:{value:n,scale:"x"},y:{value:r,scale:"y"},z:{value:oi(e),optional:!0}},e,Um),this.z=o,this.ci=+i,this.precision=+a,!(0<=this.ci&&this.ci<1))throw new Error(`invalid ci; not in [0, 1): ${i}`);if(!(this.precision>0))throw new Error(`invalid precision: ${a}`)}render(t,e,n,r,o){const{x:i,y:a,z:l}=n,{ci:s}=this;return Ys("svg:g",o).call(bc,this,r,o).call(Ac,this,e).call((e=>e.selectAll().data(l?yc(t,l,this.z):[t]).enter().call((t=>t.append("path").attr("fill","none").call(kc,this).call(pc,this,{...n,fill:null,fillOpacity:null}).attr("d",(t=>this._renderLine(t,i,a))).call(s&&!Ii(this.fill)?t=>t.select(Gm).attr("stroke","none").call(kc,this).call(pc,this,{...n,stroke:null,strokeOpacity:null,strokeWidth:null}).attr("d",(t=>this._renderBand(t,i,a))):()=>{}))))).node()}}function Gm(){return this.parentNode.insertBefore(this.ownerDocument.createElementNS(Tn.svg,"path"),this)}class Xm extends Ym{constructor(t,e){super(t,e)}_renderBand(t,e,n){const{ci:r,precision:o}=this,[i,a]=De(t,(t=>n[t])),l=Qm(t,n,e),s=tg(t,n,e,(1-r)/2,l);return pr().y((t=>t)).x0((t=>s(t,-1))).x1((t=>s(t,1)))(I(i,a-o/2,o).concat(a))}_renderLine(t,e,n){const[r,o]=De(t,(t=>n[t])),i=Qm(t,n,e);return`M${i(r)},${r}L${i(o)},${o}`}}class Zm extends Ym{constructor(t,e){super(t,e)}_renderBand(t,e,n){const{ci:r,precision:o}=this,[i,a]=De(t,(t=>e[t])),l=Qm(t,e,n),s=tg(t,e,n,(1-r)/2,l);return pr().x((t=>t)).y0((t=>s(t,-1))).y1((t=>s(t,1)))(I(i,a-o/2,o).concat(a))}_renderLine(t,e,n){const[r,o]=De(t,(t=>e[t])),i=Qm(t,e,n);return`M${r},${i(r)}L${o},${i(o)}`}}function Jm(t,{y:e=Ao,x:n=Lo,stroke:r,fill:o=(Ri(r)?"currentColor":r),...i}={}){return new Xm(t,yd({...i,x:n,y:e,fill:o,stroke:r}))}function Km(t,{x:e=Ao,y:n=Lo,stroke:r,fill:o=(Ri(r)?"currentColor":r),...i}={}){return new Zm(t,pd({...i,x:e,y:n,fill:o,stroke:r}))}function Qm(t,e,n){let r=0,o=0,i=0,a=0;for(const l of t){const t=e[l],s=n[l];r+=t,o+=s,i+=t*s,a+=t*t}const l=t.length,s=(l*i-r*o)/(l*a-r*r),c=(o-s*r)/l;return t=>s*t+c}function tg(t,e,n,r,o){const i=tt(t,(t=>e[t]))/t.length;let a=0,l=0;for(const r of t)a+=(e[r]-i)**2,l+=(n[r]-o(e[r]))**2;const s=Math.sqrt(l/(t.length-2)),c=Hm(r,t.length-2);return(e,n)=>{const r=o(e),l=s*Math.sqrt(1/t.length+(e-i)**2/a);return r+n*c*l}}function eg({path:t=Lo,delimiter:e,frameAnchor:n,treeLayout:r=Er,treeSort:o,treeSeparation:i,treeAnchor:a,treeFilter:l,...s}={}){a=rg(a),o=ag(o),null!=l&&(l=hg(l)),void 0===n&&(n=a.frameAnchor);const c=sg(e),u=Ag(s,hg),[f,h]=hi(),[d,p]=hi();return{x:f,y:d,frameAnchor:n,...na(s,((e,n)=>{const s=c(vo(e,t)),f=h([]),d=p([]);let y=-1;const m=[],g=[],v=Lr().path((t=>s[t])),x=po(e)?t=>t.data=e[t.data]:t=>t.data=e.get(t.data),w=r();w.nodeSize&&w.nodeSize([1,1]),w.separation&&void 0!==i&&w.separation(i??Eo);for(const t of u)t[Mg]=t[kg]([]);for(const t of n){const e=[],n=v(t.filter((t=>null!=s[t]))).each(x);null!=o&&n.sort(o),w(n);for(const t of n.descendants())if(null==l||l(t)){e.push(++y),m[y]=t.data,a.position(t,y,f,d);for(const e of u)e[Mg][y]=e[$g](t)}g.push(e)}return{data:m,facets:g}})),...Object.fromEntries(u)}}function ng({path:t=Lo,delimiter:e,curve:n="bump-x",stroke:r="#555",strokeWidth:o=1.5,strokeOpacity:i=.5,treeLayout:a=Er,treeSort:l,treeSeparation:s,treeAnchor:c,treeFilter:u,...f}={}){c=rg(c),l=ag(l),null!=u&&(u=dg(u)),f={curve:n,stroke:r,strokeWidth:o,strokeOpacity:i,...f};const h=sg(e),d=Ag(f,dg),[p,y]=hi(),[m,g]=hi(),[v,x]=hi(),[w,b]=hi();return{x1:p,x2:m,y1:v,y2:w,...na(f,((e,n)=>{const r=h(vo(e,t)),o=y([]),i=g([]),f=x([]),p=b([]);let m=-1;const v=[],w=[],k=Lr().path((t=>r[t])),$=a();$.nodeSize&&$.nodeSize([1,1]),$.separation&&void 0!==s&&$.separation(s??Eo);for(const t of d)t[Mg]=t[kg]([]);for(const t of n){const n=[],a=k(t.filter((t=>null!=r[t]))).each((t=>t.data=e[t.data]));null!=l&&a.sort(l),$(a);for(const{source:t,target:e}of a.links())if(null==u||u(e,t)){n.push(++m),v[m]=e.data,c.position(t,m,o,f),c.position(e,m,i,p);for(const n of d)n[Mg][m]=n[$g](e,t)}w.push(n)}return{data:v,facets:w}})),...Object.fromEntries(d)}}function rg(t="left"){switch(`${t}`.trim().toLowerCase()){case"left":return og;case"right":return ig}throw new Error(`invalid tree anchor: ${t}`)}const og={frameAnchor:"left",dx:6,position({x:t,y:e},n,r,o){r[n]=e,o[n]=-t}},ig={frameAnchor:"right",dx:-6,position({x:t,y:e},n,r,o){r[n]=-e,o[n]=-t}};function ag(t){return null==t||"function"==typeof t?t:`${t}`.trim().toLowerCase().startsWith("node:")?lg(hg(t)):lg(function(t){return e=>e.data?.[t]}(t))}function lg(t){return(e,n)=>Rr(t(e),t(n))}function sg(t="/"){if("/"===(t=`${t}`))return t=>t;if(1!==t.length)throw new Error("delimiter must be exactly one character");const e=t.charCodeAt(0);return t=>t.map((t=>function(t,e){if(e===cg)throw new Error("delimiter cannot be backslash");let n=!1;for(let r=0,o=t.length;r<o;++r){switch(t.charCodeAt(r)){case cg:if(!n){n=!0;continue}break;case e:n?(t=t.slice(0,r-1)+t.slice(r),--r,--o):t=t.slice(0,r)+"/"+t.slice(r+1);break;case ug:n?(t=t.slice(0,r)+"\\\\"+t.slice(r),r+=2,o+=2):(t=t.slice(0,r)+"\\"+t.slice(r),++r,++o)}n=!1}return t}(t,e)))}const cg=92,ug=47;function fg(t){return Ko(t)&&"function"==typeof t.node}function hg(t){if(fg(t))return t.node;if((t=`${t}`.trim().toLowerCase()).startsWith("node:")){switch(t){case"node:name":return yg;case"node:path":return pg;case"node:internal":return vg;case"node:external":return xg;case"node:depth":return mg;case"node:height":return gg}throw new Error(`invalid node value: ${t}`)}}function dg(t){if(fg(t))return t.node;if(Ko(e=t)&&"function"==typeof e.link)return t.link;var e;if((t=`${t}`.trim().toLowerCase()).startsWith("node:")||t.startsWith("parent:")){switch(t){case"parent:name":return wg(yg);case"parent:path":return wg(pg);case"parent:depth":return wg(mg);case"parent:height":return wg(gg);case"node:name":return yg;case"node:path":return pg;case"node:internal":return vg;case"node:external":return xg;case"node:depth":return mg;case"node:height":return gg}throw new Error(`invalid link value: ${t}`)}}function pg(t){return t.id}function yg(t){return function(t){let e=t.length;for(;--e>0&&!bg(t,e););return function(t){let e=!1;for(let n=0,r=t.length;n<r;++n){switch(t.charCodeAt(n)){case cg:if(!e){e=!0;continue}case ug:e&&(t=t.slice(0,n-1)+t.slice(n),--n,--r)}e=!1}return t}(t.slice(e+1))}(t.id)}function mg(t){return t.depth}function gg(t){return t.height}function vg(t){return!!t.children}function xg(t){return!t.children}function wg(t){return(e,n)=>null==n?void 0:t(n)}function bg(t,e){if("/"===t[e]){let n=0;for(;e>0&&"\\"===t[--e];)++n;if(!(1&n))return!0}return!1}const kg=2,$g=3,Mg=4;function Ag(t,e){const n=[];for(const r in t){const o=t[r],i=e(o);void 0!==i&&n.push([r,...hi(o),i])}return n}function Lg(t,{fill:e,stroke:n,strokeWidth:r,strokeOpacity:o,strokeLinejoin:i,strokeLinecap:a,strokeMiterlimit:l,strokeDasharray:s,strokeDashoffset:c,marker:u,markerStart:f=u,markerEnd:h=u,dot:d=Ri(f)&&Ri(h),text:p="node:name",textStroke:y="var(--plot-background)",title:m="node:path",dx:g,dy:v,textAnchor:x,treeLayout:w=Er,textLayout:b=(w===Er||w===zr?"mirrored":"normal"),tip:k,...$}={}){if(void 0===g&&(g=rg($.treeAnchor).dx),void 0!==x)throw new Error("textAnchor is not a configurable tree option");function M(n){return Ou(t,eg({treeLayout:w,text:p,fill:void 0===e?"currentColor":e,stroke:y,dx:g,dy:v,title:m,...n,...$}))}return b=Po(b,"textLayout",["mirrored","normal"]),Tc(Pd(t,ng({treeLayout:w,markerStart:f,markerEnd:h,stroke:void 0!==n?n:void 0===e?"node:internal":e,strokeWidth:r,strokeOpacity:o,strokeLinejoin:i,strokeLinecap:a,strokeMiterlimit:l,strokeDasharray:s,strokeDashoffset:c,...$})),d?up(t,eg({treeLayout:w,fill:void 0===e?"node:internal":e,title:m,tip:k,...$})):null,null!=p?"mirrored"===b?[M({textAnchor:"start",treeFilter:"node:external"}),M({textAnchor:"end",treeFilter:"node:internal",dx:-g})]:M():null)}function Eg(t,e){return Lg(t,{...e,treeLayout:zr})}const zg={ariaLabel:"waffle"};class Sg extends Kd{constructor(t,{unit:e=1,gap:n=1,round:r,multiple:o,...i}={}){super(t,Ng("x",i),zg),this.unit=Math.max(0,e),this.gap=+n,this.round=Rg(r),this.multiple=Ig(o)}}class Og extends Qd{constructor(t,{unit:e=1,gap:n=1,round:r,multiple:o,...i}={}){super(t,Ng("y",i),zg),this.unit=Math.max(0,e),this.gap=+n,this.round=Rg(r),this.multiple=Ig(o)}}function Ng(t,e){const n="y"===t?"x":"y",r=`${t}1`,o=`${t}2`;return ra(function({render:t,...e}){return{...e,render:Rc(t,(function(t,e,n,r,o){const{gap:i,rx:a,ry:l}=this,{channels:s,ariaLabel:c,href:u,title:f,...h}=n,{document:d}=o,p=s.polygon.value,[y,m]=s.cx.value,[g,v]=s.cy.value,x="plot-pattern-"+ ++sc,w=d.createElementNS(Tn.svg,"pattern");w.setAttribute("width",y),w.setAttribute("height",g),w.setAttribute("patternUnits","userSpaceOnUse");const b=w.appendChild(d.createElementNS(Tn.svg,"rect"));return b.setAttribute("x",i/2),b.setAttribute("y",i/2),b.setAttribute("width",y-i),b.setAttribute("height",g-i),null!=a&&b.setAttribute("rx",a),null!=l&&b.setAttribute("ry",l),Ys("svg:g",o).call(bc,this,r,o).call(this._transform,this,e).call((e=>e.selectAll().data(t).enter().append((()=>w.cloneNode(!0))).attr("id",(t=>`${x}-${t}`)).select("rect").call(kc,this).call(dc,this,h))).call((e=>e.selectAll().data(t).enter().append("path").attr("transform",Au`translate(${m},${v})`).attr("d",(t=>`M${p[t].join("L")}Z`)).attr("fill",(t=>`url(#${x}-${t})`)).attr("stroke",null==this.stroke?null:"none").call(dc,this,{ariaLabel:c,href:u,title:f}))).node()}))}}(e),(function(e,i,a,l,s){const{round:c,unit:u}=this,f=a[r].value,h=a[o].value,d=Ja({...n in a&&{[n]:a[n]},[r]:a[r],[o]:a[o]},l),p=this["y"===t?"_width":"_height"](l,d,s),y=this["y"===t?"_x":"_y"](l,d,s),m=u*function({domain:t,range:e}){return Wg(e)/Wg(t)}(l.scales[t]),{multiple:g=Math.max(1,Math.floor(Math.sqrt(p/m)))}=this,v=Math.min(p/g,m*g),x=m*g,w=(p-g*v)/2,b="function"==typeof y?t=>y(t)+w:y+w,k=l[t](0),$="y"===t?([t,e])=>[t*v,-e*x]:([t,e])=>[e*x,t*v],M="function"==typeof b?t=>b(t)-p/2:()=>b,[A,L]="y"===t?[0,1]:[1,0],E=h.length,z=new Array(E),S=new Float64Array(E),O=new Float64Array(E);for(let t=0;t<E;++t){z[t]=Cg(c(f[t]/u),c(h[t]/u),g).map($);const e=z[t].pop();S[t]=e[A]+M(t),O[t]=e[L]+k}return{channels:{polygon:{value:z,source:null,filter:null},[`c${n}`]:{value:[v,b],source:null,filter:null},[`c${t}`]:{value:[x,k],source:null,filter:null},[n]:{value:S,scale:null,source:null},[r]:{value:O,scale:null,source:a[r]},[o]:{value:O,scale:null,source:a[o]}}}}))}function Cg(t,e,n){if(e<t)return Cg(e,t,n);if(t<0)return function(t,e,n,r){return Cg(t+r*n,e+r*n,n).map((([t,e])=>[t,e-r]))}(t,e,n,Math.ceil(-Math.min(t,e)/n));const r=Math.floor(t%n),o=Math.ceil(t%n),i=Math.floor(e%n),a=Math.ceil(e%n),l=Math.floor(t/n),s=Math.ceil(t/n),c=Math.floor(e/n),u=Math.ceil(e/n),f=[];return u>s&&f.push([0,s]),f.push([r,s],[r,l+t%1],[o,l+t%1]),t%n>n-1||(f.push([o,l]),c>l&&f.push([n,l])),c>l&&f.push([n,c]),f.push([a,c],[a,c+e%1],[i,c+e%1]),e%n<1||(f.push([i,u]),u>s&&f.push([0,u])),f.push(function(t,e,n){const r=Math.floor(e/n)-Math.floor(t/n);return 0===r?Tg(t,e,n):1===r?Math.floor(e%n)>Math.ceil(t%n)?[(Math.floor(e%n)+Math.ceil(t%n))/2,Math.floor(e/n)]:e%n>n-t%n?Tg(e-e%n,e,n):Tg(t,n*Math.ceil(t/n),n):[n/2,(Math.round(t/n)+Math.round(e/n))/2]}(t,e,n)),f}function Tg(t,e,n){const r=Math.floor(e)-Math.floor(t);return 0===r?[Math.floor(t%n)+.5,Math.floor(t/n)+(t+e)/2%1]:1===r?e%1-t%1>.5?[Math.ceil(t%n),Math.floor(e/n)+(t%1+e%1)/2]:e%1>1-t%1?[Math.floor(e%n)+.5,Math.floor(e/n)+e%1/2]:[Math.floor(t%n)+.5,Math.floor(t/n)+(1+t%1)/2]:[Math.ceil(t%n)+Math.ceil(Math.floor(e)-Math.ceil(t))/2,Math.floor(t/n)+(e>=1+t?.5:(t+e)/2%1)]}function Rg(t){if(void 0===t||!1===t)return Number;if(!0===t)return Math.round;if("function"!=typeof t)throw new Error(`invalid round: ${t}`);return t}function Ig(t){return void 0===t?void 0:Math.max(1,Math.floor(t))}function Wg(t){const[e,n]=De(t);return n-e}function jg(t,{tip:e,...n}={}){return Jo(n)||(n={...n,y:Ao,x2:Lo}),new Sg(t,{tip:Bg(e),...nh(yu(Yf(n)))})}function Fg(t,{tip:e,...n}={}){return Jo(n)||(n={...n,x:Ao,y2:Lo}),new Og(t,{tip:Bg(e),...rh(mu(Gf(n)))})}function Bg(t){return!0===t?{maxRadius:1/0}:Ko(t)&&void 0===t.maxRadius?{...t,maxRadius:1/0}:void 0}const Dg=({marginLeft:t})=>[1,t],qg=({width:t,marginRight:e})=>[-1,t-e],_g=({width:t,marginLeft:e,marginRight:n})=>[0,(e+t-n)/2],Pg=({marginTop:t})=>[1,t],Vg=({height:t,marginBottom:e})=>[-1,t-e],Hg=({height:t,marginTop:e,marginBottom:n})=>[0,(e+t-n)/2];function Ug(t){return"string"==typeof t?{anchor:t}:t}function Yg(t={},e={}){1===arguments.length&&([t,e]=Xg(t));let{anchor:n="left",padding:r=1,r:o=e.r}=Ug(t);switch(`${n}`.toLowerCase()){case"left":n=Dg;break;case"right":n=qg;break;case"middle":n=_g;break;default:throw new Error(`unknown dodge anchor: ${n}`)}return Zg("x","y",n,Oo(r),o,e)}function Gg(t={},e={}){1===arguments.length&&([t,e]=Xg(t));let{anchor:n="bottom",padding:r=1,r:o=e.r}=Ug(t);switch(`${n}`.toLowerCase()){case"top":n=Pg;break;case"bottom":n=Vg;break;case"middle":n=Hg;break;default:throw new Error(`unknown dodge anchor: ${n}`)}return Zg("y","x",n,Oo(r),o,e)}function Xg(t){const{anchor:e,padding:n,...r}=t,{r:o}=r;return[{anchor:e,padding:n,r:o},r]}function Zg(t,e,n,r,o,i){if(null!=o&&"number"!=typeof o){let{channels:t,sort:e,reverse:n}=i;t=Fi(t),void 0===t?.r&&(i={...i,channels:{...t,r:{value:o,scale:"r"}}}),void 0===e&&void 0===n&&(i.sort={channel:"-r"})}return ra(i,(function(i,a,l,s,c,u){let{[e]:f,r:h}=l;if(!l[e])throw new Error(`missing channel: ${e}`);({[e]:f}=Vs(l,s,u));const d=h?void 0:void 0!==o?Oo(o):void 0!==this.r?this.r:3;h&&(h=vo(h.value,s[h.scale]||Lo,Float64Array));let[p,y]=n(c);const m=p?Kg:Jg,g=new Float64Array(f.length),v=h?t=>h[t]:()=>d;for(let t of a){const e=Cr();t=t.filter(h?t=>jr(f[t])&&Fr(h[t]):t=>jr(f[t]));const n=new Float64Array(2*t.length+2);for(const o of t){const t=v(o),i=p?t+r:0,a=f[o]-t,l=f[o]+t;let s=2;e.queryInterval(a-r,l+r,(([,,t])=>{const e=g[t]-i,a=f[o]-f[t],l=r+(h?h[o]+h[t]:2*d),c=Math.sqrt(l*l-a*a);n[s++]=e-c,n[s++]=e+c}));let c=n.slice(0,s);p&&(c=c.filter((t=>t>=0)));t:for(const t of c.sort(m)){for(let e=0;e<s;e+=2)if(n[e]+1e-6<t&&t<n[e+1]-1e-6)continue t;g[o]=t+i;break}e.insert([a,l,o])}}p||(p=1);for(const t of a)for(const e of t)g[e]=g[e]*p+y;return{data:i,facets:a,channels:{[t]:{value:g,source:null},[e]:{value:f,source:l[e]},...h&&{r:{value:h,source:l.r}}}}}))}function Jg(t,e){return Math.abs(t)-Math.abs(e)}function Kg(t,e){return t-e}function Qg(t,e){return 1===arguments.length&&({basis:t,...e}=t),Op(ev(t),e)}function tv(t,e){return 1===arguments.length&&({basis:t,...e}=t),Np(ev(t),e)}function ev(t){if(void 0===t)return iv;if("function"==typeof t)return nv(si(t));if(/^p\d{2}$/i.test(t))return rv(Io(t));switch(`${t}`.toLowerCase()){case"deviation":return lv;case"first":return iv;case"last":return av;case"max":return sv;case"mean":return cv;case"median":return uv;case"min":return fv;case"sum":return hv;case"extent":return ov}throw new Error(`invalid basis: ${t}`)}function nv(t){return{mapIndex(e,n,r){const o=+t(e,n);for(const t of e)r[t]=null===n[t]?NaN:n[t]/o}}}function rv(t){return nv(((e,n)=>t(e,(t=>n[t]))))}const ov={mapIndex(t,e,n){const[r,o]=De(t,(t=>e[t])),i=o-r;for(const o of t)n[o]=null===e[o]?NaN:(e[o]-r)/i}},iv=nv(((t,e)=>{for(let n=0;n<t.length;++n){const r=e[t[n]];if(Tr(r))return r}})),av=nv(((t,e)=>{for(let n=t.length-1;n>=0;--n){const r=e[t[n]];if(Tr(r))return r}})),lv={mapIndex(t,e,n){const r=at(t,(t=>e[t])),o=ut(t,(t=>e[t]));for(const i of t)n[i]=null===e[i]?NaN:o?(e[i]-r)/o:0}},sv=rv(N),cv=rv(at),uv=rv(ot),fv=rv(ct),hv=rv(tt);function dv(t,e){return yv("x",t,e)}function pv(t,e){return yv("y",t,e)}function yv(t,e,n={}){let r,o=1;if("number"==typeof e)o=e,r=(t,e)=>+t+e;else{if("string"==typeof e){const t=e.startsWith("-")?-1:1;[e,o]=ro(e.replace(/^[+-]/,"")),o*=t}e=vi(e),r=(t,n)=>e.offset(t,n)}const i=`${t}1`,a=`${t}2`,l=Cp({[i]:t=>t.map((t=>r(t,o))),[a]:t=>t},n),s=l[a].transform;return l[a].transform=()=>{const t=s(),[e,n]=De(t);return t.domain=o<0?[e,r(n,o)]:[r(e,o),n],t},l}function mv(t,e={}){if("string"==typeof t)switch(t.toLowerCase()){case"first":return vv(e);case"last":return xv(e)}if("function"==typeof t)return zv(null,t,e);let n,r;for(n in t){if(void 0!==r)throw new Error("ambiguous selector; multiple inputs");r=gv(t[n])}if(void 0===r)throw new Error(`invalid selector: ${t}`);return zv(n,r,e)}function gv(t){if("function"==typeof t)return t;switch(`${t}`.toLowerCase()){case"min":return Lv;case"max":return Ev}throw new Error(`unknown selector: ${t}`)}function vv(t){return zv(null,Mv,t)}function xv(t){return zv(null,Av,t)}function wv(t){return zv("x",Lv,t)}function bv(t){return zv("y",Lv,t)}function kv(t){return zv("x",Ev,t)}function $v(t){return zv("y",Ev,t)}function*Mv(t){yield t[0]}function*Av(t){yield t[t.length-1]}function*Lv(t,e){yield Sr(t,(t=>e[t]))}function*Ev(t,e){yield qn(t,(t=>e[t]))}function zv(t,e,n){if(null!=t){if(null==n[t])throw new Error(`missing channel: ${t}`);t=n[t]}const r=oi(n);return na(n,((n,o)=>{const i=vo(n,r),a=vo(n,t),l=[];for(const t of o){const n=[];for(const r of i?J(t,(t=>i[t])).values():[t])for(const t of e(r,a))n.push(t);l.push(n)}return{data:n,facets:l}}))}Cc.prototype.plot=function({marks:t=[],...e}={}){return _h({...e,marks:[...t,this]})};export{jd as Area,Ud as Arrow,Kd as BarX,Qd as BarY,rp as Cell,jy as Contour,pm as Density,cp as Dot,Sh as Frame,Em as Geo,Wm as Hexgrid,Bm as Image,mp as Line,_d as Link,Cc as Mark,$y as Raster,vh as Rect,wu as RuleX,bu as RuleY,Eu as Text,sy as TickX,cy as TickY,Th as Tip,nf as Vector,Sg as WaffleX,Og as WaffleY,Fd as area,Bd as areaX,Dd as areaY,Gd as arrow,bp as auto,wp as autoSpec,gf as axisFx,yf as axisFy,mf as axisX,pf as axisY,tp as barX,ep as barY,hd as bin,ud as binX,fd as binY,iy as bollinger,ry as bollingerX,oy as bollingerY,hy as boxX,dy as boxY,op as cell,ip as cellX,ap as cellY,Mm as centroid,dp as circle,Eg as cluster,hi as column,Fy as contour,Dy as crosshair,qy as crosshairX,_y as crosshairY,sm as delaunayLink,cm as delaunayMesh,ym as density,vm as differenceX,xm as differenceY,Yg as dodgeX,Gg as dodgeY,up as dot,fp as dotX,hp as dotY,la as filter,Ga as find,oc as formatIsoDate,nc as formatMonth,ec as formatNumber,rc as formatWeekday,Oh as frame,zm as geo,Am as geoCentroid,Om as graticule,$f as gridFx,bf as gridFy,kf as gridX,wf as gridY,xa as group,ga as groupX,va as groupY,ma as groupZ,pp as hexagon,Cm as hexbin,Im as hexgrid,um as hull,Lo as identity,qm as image,Ao as indexOf,ra as initializer,Ty as interpolateNearest,Sy as interpolateNone,Oy as interpolatorBarycentric,Ry as interpolatorRandomWalk,Pf as legend,gp as line,vp as lineX,xp as lineY,Jm as linearRegressionX,Km as linearRegressionY,Pd as link,Cp as map,Op as mapX,Np as mapY,Tc as marks,ev as normalize,Qg as normalizeX,tv as normalizeY,xi as numberInterval,_h as plot,qc as pointer,_c as pointerX,Pc as pointerY,Ay as raster,Mh as rect,Ah as rectX,Lh as rectY,ca as reverse,ku as ruleX,$u as ruleY,vs as scale,mv as select,vv as selectFirst,xv as selectLast,kv as selectMaxX,$v as selectMaxY,wv as selectMinX,bv as selectMinY,dv as shiftX,pv as shiftY,fa as shuffle,ha as sort,Sm as sphere,lf as spike,Zf as stackX,Jf as stackX1,Kf as stackX2,Qf as stackY,th as stackY1,eh as stackY2,Ou as text,Nu as textX,Cu as textY,uy as tickX,fy as tickY,oo as timeInterval,Rh as tip,na as transform,Lg as tree,ng as treeLink,eg as treeNode,io as utcInterval,vo as valueof,rf as vector,of as vectorX,af as vectorY,fm as voronoi,hm as voronoiMesh,jg as waffleX,Fg as waffleY,Fp as window,Wp as windowX,jp as windowY};export default null;
//# sourceMappingURL=/sm/7307c395fb33427e208bd98af875c3fe0b8e8d69af484e3d0e3493a46b3df23c.map