diff --git a/assets/schema/dbgpt.sql b/assets/schema/dbgpt.sql index 0d6e1c91b..0b3609b03 100644 --- a/assets/schema/dbgpt.sql +++ b/assets/schema/dbgpt.sql @@ -464,7 +464,45 @@ CREATE TABLE `user_recent_apps` ( KEY `idx_user_r_app_code` (`app_code`), KEY `idx_last_accessed` (`last_accessed`), KEY `idx_user_code` (`user_code`) -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='User recently used apps' +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='User recently used apps'; + +-- dbgpt.dbgpt_serve_dbgpts_my definition +CREATE TABLE `dbgpt_serve_dbgpts_my` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'autoincrement id', + `name` varchar(255) NOT NULL COMMENT 'plugin name', + `user_code` varchar(255) DEFAULT NULL COMMENT 'user code', + `user_name` varchar(255) DEFAULT NULL COMMENT 'user name', + `file_name` varchar(255) NOT NULL COMMENT 'plugin package file name', + `type` varchar(255) DEFAULT NULL COMMENT 'plugin type', + `version` varchar(255) DEFAULT NULL COMMENT 'plugin version', + `use_count` int DEFAULT NULL COMMENT 'plugin total use count', + `succ_count` int DEFAULT NULL COMMENT 'plugin total success count', + `sys_code` varchar(128) DEFAULT NULL COMMENT 'System code', + `gmt_created` TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT 'plugin install time', + `gmt_modified` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'update time', + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`, `user_name`), + KEY `ix_my_plugin_sys_code` (`sys_code`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +-- dbgpt.dbgpt_serve_dbgpts_hub definition +CREATE TABLE `dbgpt_serve_dbgpts_hub` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'autoincrement id', + `name` varchar(255) NOT NULL COMMENT 'plugin name', + `description` varchar(255) NULL COMMENT 'plugin description', + `author` varchar(255) DEFAULT NULL COMMENT 'plugin author', + `email` varchar(255) DEFAULT NULL COMMENT 'plugin author email', + `type` varchar(255) DEFAULT NULL COMMENT 'plugin type', + `version` varchar(255) DEFAULT NULL COMMENT 'plugin version', + `storage_channel` varchar(255) DEFAULT NULL COMMENT 'plugin storage channel', + `storage_url` varchar(255) DEFAULT NULL COMMENT 'plugin download url', + `download_param` varchar(255) DEFAULT NULL COMMENT 'plugin download param', + `gmt_created` TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT 'plugin upload time', + `gmt_modified` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'update time', + `installed` int DEFAULT NULL COMMENT 'plugin already installed count', + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE diff --git a/assets/schema/upgrade/v0_6_0/upgrade_to_v0.6.0.sql b/assets/schema/upgrade/v0_6_0/upgrade_to_v0.6.0.sql index e4fa9fee8..f20a396a7 100644 --- a/assets/schema/upgrade/v0_6_0/upgrade_to_v0.6.0.sql +++ b/assets/schema/upgrade/v0_6_0/upgrade_to_v0.6.0.sql @@ -116,3 +116,40 @@ CREATE TABLE `dbgpt_serve_variables` ( KEY `ix_your_table_name_name` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +-- dbgpt.dbgpt_serve_dbgpts_my definition +CREATE TABLE `dbgpt_serve_dbgpts_my` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'autoincrement id', + `name` varchar(255) NOT NULL COMMENT 'plugin name', + `user_name` varchar(255) DEFAULT NULL COMMENT 'user name', + `file_name` varchar(255) NOT NULL COMMENT 'plugin package file name', + `type` varchar(255) DEFAULT NULL COMMENT 'plugin type', + `version` varchar(255) DEFAULT NULL COMMENT 'plugin version', + `use_count` int DEFAULT NULL COMMENT 'plugin total use count', + `succ_count` int DEFAULT NULL COMMENT 'plugin total success count', + `sys_code` varchar(128) DEFAULT NULL COMMENT 'System code', + `gmt_created` TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT 'plugin install time', + `gmt_modified` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'update time', + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`, `user_name`), + KEY `ix_my_plugin_sys_code` (`sys_code`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +-- dbgpt.dbgpt_serve_dbgpts_hub definition +CREATE TABLE `dbgpt_serve_dbgpts_hub` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'autoincrement id', + `name` varchar(255) NOT NULL COMMENT 'plugin name', + `description` varchar(255) NULL COMMENT 'plugin description', + `author` varchar(255) DEFAULT NULL COMMENT 'plugin author', + `email` varchar(255) DEFAULT NULL COMMENT 'plugin author email', + `type` varchar(255) DEFAULT NULL COMMENT 'plugin type', + `version` varchar(255) DEFAULT NULL COMMENT 'plugin version', + `storage_channel` varchar(255) DEFAULT NULL COMMENT 'plugin storage channel', + `storage_url` varchar(255) DEFAULT NULL COMMENT 'plugin download url', + `download_param` varchar(255) DEFAULT NULL COMMENT 'plugin download param', + `gmt_created` TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT 'plugin upload time', + `gmt_modified` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'update time', + `installed` int DEFAULT NULL COMMENT 'plugin already installed count', + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + diff --git a/dbgpt/app/initialization/serve_initialization.py b/dbgpt/app/initialization/serve_initialization.py index b88d1d215..146412ecb 100644 --- a/dbgpt/app/initialization/serve_initialization.py +++ b/dbgpt/app/initialization/serve_initialization.py @@ -83,6 +83,17 @@ def register_serve_apps(system_app: SystemApp, cfg: Config, webserver_port: int) system_app.register(FeedbackServe) # ################################ Chat Feedback Register End ######################################## + # ################################ DbGpts Register Begin ######################################## + # Register serve dbgptshub + from dbgpt.serve.dbgpts.hub.serve import Serve as DbgptsHubServe + + system_app.register(DbgptsHubServe) + # Register serve dbgptsmy + from dbgpt.serve.dbgpts.my.serve import Serve as DbgptsMyServe + + system_app.register(DbgptsMyServe) + # ################################ DbGpts Register End ######################################## + # ################################ File Serve Register Begin ###################################### from dbgpt.configs.model_config import FILE_SERVER_LOCAL_STORAGE_PATH diff --git a/dbgpt/app/static/web/404.html b/dbgpt/app/static/web/404.html index ace5fe85a..f6c00e692 100644 --- a/dbgpt/app/static/web/404.html +++ b/dbgpt/app/static/web/404.html @@ -1 +1 @@ -
1?0:X<-1?q:Math.acos(X))/2),tr=G(N[0]*N[0]+N[1]*N[1]);A=W(j,(f-tr)/(tn-1)),S=W(j,(d-tr)/(tn+1))}else A=S=0}}k>1e-12?S>1e-12?(y=ts($,Q,R,T,d,S,m),v=ts(B,D,L,I,d,S,m),l.moveTo(y.cx+y.x01,y.cy+y.y01),S1e-12&&_>1e-12?A>1e-12?(y=ts(L,I,B,D,f,-A,m),v=ts(R,T,$,Q,f,-A,m),l.lineTo(y.cx+y.x01,y.cy+y.y01),A {let[e]=t;return e}).filter(t=>"transpose"===t);return n.length%2!=0}function tf(t){let{transformations:e}=t.getOptions();return e.some(t=>{let[e]=t;return"polar"===e})}function td(t){let{transformations:e}=t.getOptions();return e.some(t=>{let[e]=t;return"reflect"===e})&&e.some(t=>{let[e]=t;return e.startsWith("transpose")})}function th(t){let{transformations:e}=t.getOptions();return e.some(t=>{let[e]=t;return"helix"===e})}function tp(t){let{transformations:e}=t.getOptions();return e.some(t=>{let[e]=t;return"parallel"===e})}function tg(t){let{transformations:e}=t.getOptions();return e.some(t=>{let[e]=t;return"fisheye"===e})}function tm(t){return th(t)||tf(t)}function ty(t){let{transformations:e}=t.getOptions(),[,,,n,r]=e.find(t=>"polar"===t[0]);return[+n,+r]}function tv(t){let e=!(arguments.length>1)||void 0===arguments[1]||arguments[1],{transformations:n}=t.getOptions(),[,r,i]=n.find(t=>"polar"===t[0]);return e?[180*+r/Math.PI,180*+i/Math.PI]:[r,i]}te.prototype=tt.prototype;var tb=n(74747);class tx extends Map{constructor(t,e=tw){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(tO(this,t))}has(t){return super.has(tO(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}(this,t))}}function tO({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):n}function tw(t){return null!==t&&"object"==typeof t?t.valueOf():t}function t_(t){return t}function tk(t,...e){return tA(t,t_,t_,e)}function tM(t,...e){return tA(t,Array.from,t_,e)}function tC(t,e,...n){return tA(t,t_,e,n)}function tj(t,e,...n){return tA(t,Array.from,e,n)}function tA(t,e,n,r){return function t(i,a){if(a>=r.length)return n(i);let o=new tx,l=r[a++],s=-1;for(let t of i){let e=l(t,++s,i),n=o.get(e);n?n.push(t):o.set(e,[t])}for(let[e,n]of o)o.set(e,t(n,a));return e(o)}(t,0)}var tS=n(60349),tE=n(23112);function tP(t){return t}function tR(t){return t.reduce((t,e)=>function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),a=1;a t.toUpperCase())}function tL(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";throw Error(t)}function tI(t,e){let{attributes:n}=e,r=new Set(["id","className"]);for(let[e,i]of Object.entries(n))r.has(e)||t.attr(e,i)}function tN(t){return null!=t&&!Number.isNaN(t)}function tB(t,e){return tD(t,e)||{}}function tD(t,e){let n=Object.entries(t||{}).filter(t=>{let[n]=t;return n.startsWith(e)}).map(t=>{let[n,r]=t;return[(0,tS.Z)(n.replace(e,"").trim()),r]}).filter(t=>{let[e]=t;return!!e});return 0===n.length?null:Object.fromEntries(n)}function tZ(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r {let[e]=t;return n.every(t=>!e.startsWith(t))}))}function tz(t,e){if(void 0===t)return null;if("number"==typeof t)return t;let n=+t.replace("%","");return Number.isNaN(n)?null:n/100*e}function tF(t){return"object"==typeof t&&!(t instanceof Date)&&null!==t&&!Array.isArray(t)}function t$(t){return null===t||!1===t}function tW(t){return new tH([t],null,t,t.ownerDocument)}class tH{selectAll(t){let e="string"==typeof t?this._parent.querySelectorAll(t):t;return new tH(e,null,this._elements[0],this._document)}selectFacetAll(t){let e="string"==typeof t?this._parent.querySelectorAll(t):t;return new tH(this._elements,null,this._parent,this._document,void 0,void 0,e)}select(t){let e="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new tH([e],null,e,this._document)}append(t){let e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t 1&&void 0!==arguments[1]?arguments[1]:t=>t,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>null,r=[],i=[],a=new Set(this._elements),o=[],l=new Set,s=new Map(this._elements.map((t,n)=>[e(t.__data__,n),t])),c=new Map(this._facetElements.map((t,n)=>[e(t.__data__,n),t])),u=tk(this._elements,t=>n(t.__data__));for(let f=0;f 0&&void 0!==arguments[0]?arguments[0]:t=>t,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t=>t,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t=>t.remove(),r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t=>t,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t=>t.remove(),a=t(this._enter),o=e(this._update),l=n(this._exit),s=r(this._merge),c=i(this._split);return o.merge(a).merge(l).merge(s).merge(c)}remove(){for(let t=0;t t.finished)).then(()=>{let e=this._elements[t];e.remove()})}else{let e=this._elements[t];e.remove()}}return new tH([],null,this._parent,this._document,void 0,this._transitions)}each(t){for(let e=0;e e:e;return this.each(function(r,i,a){void 0!==e&&(a[t]=n(r,i,a))})}style(t,e){let n="function"!=typeof e?()=>e:e;return this.each(function(r,i,a){void 0!==e&&(a.style[t]=n(r,i,a))})}transition(t){let e="function"!=typeof t?()=>t:t,{_transitions:n}=this;return this.each(function(t,r,i){n[r]=e(t,r,i)})}on(t,e){return this.each(function(n,r,i){i.addEventListener(t,e)}),this}call(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r 1&&void 0!==arguments[1]?arguments[1]:10;return"number"!=typeof t?t:1e-15>Math.abs(t)?t:parseFloat(t.toFixed(e))}tH.registry={g:tb.ZA,rect:tb.UL,circle:tb.Cd,path:tb.y$,text:tb.xv,ellipse:tb.Pj,image:tb.Ee,line:tb.x1,polygon:tb.mg,polyline:tb.aH,html:tb.k9};var t1=n(21494),t2=n(23890);function t5(t,e){let n,r;if(void 0===e)for(let e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r =a&&(n=r=a):(n>a&&(n=a),r{let[i,a]=r;return n[i]=e(a,i,t),n},{})}function t4(t){return t.map((t,e)=>e)}function t6(t){return t[t.length-1]}function t8(t,e){let n=[[],[]];return t.forEach(t=>{n[e(t)?0:1].push(t)}),n}function t9(t,e){for(let[n,r]of Object.entries(e))t.style(n,r)}function t7(t,e,n,r,i){let a=tV(tG(r,e))+Math.PI,o=tV(tG(r,n))+Math.PI;return t.arc(r[0],r[1],i,a,o,o-a<0),t}function et(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"y",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"between",a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],o="y"===r||!0===r?n:e,l=t4(o),[s,c]=t5(l,t=>o[t]),u=new t1.b({domain:[s,c],range:[0,100]}),f=t=>(0,t2.Z)(o[t])&&!Number.isNaN(o[t])?u.map(o[t]):0,d={between:e=>"".concat(t[e]," ").concat(f(e),"%"),start:e=>0===e?"".concat(t[e]," ").concat(f(e),"%"):"".concat(t[e-1]," ").concat(f(e),"%, ").concat(t[e]," ").concat(f(e),"%"),end:e=>e===t.length-1?"".concat(t[e]," ").concat(f(e),"%"):"".concat(t[e]," ").concat(f(e),"%, ").concat(t[e+1]," ").concat(f(e),"%")},h=l.sort((t,e)=>f(t)-f(e)).map(d[i]||d.between).join(",");return"linear-gradient(".concat("y"===r||!0===r?a?180:90:a?90:0,"deg, ").concat(h,")")}function ee(t){let[e,n,r,i]=t;return[i,e,n,r]}function en(t,e,n){let[r,i,,a]=tu(t)?ee(e):e,[o,l]=n,s=t.getCenter(),c=tU(tG(r,s)),u=tU(tG(i,s)),f=u===c&&o!==l?u+2*Math.PI:u;return{startAngle:c,endAngle:f-c>=0?f:2*Math.PI+f,innerRadius:tY(a,s),outerRadius:tY(r,s)}}function er(t){let{colorAttribute:e,opacityAttribute:n=e}=t;return"".concat(n,"Opacity")}function ei(t,e){if(!tf(t))return"";let n=t.getCenter(),{transform:r}=e;return"translate(".concat(n[0],", ").concat(n[1],") ").concat(r||"")}function ea(t){if(1===t.length)return t[0];let[[e,n,r=0],[i,a,o=0]]=t;return[(e+i)/2,(n+a)/2,(r+o)/2]}var eo=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function el(t,e,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},{inset:a=0,radius:o=0,insetLeft:l=a,insetTop:s=a,insetRight:c=a,insetBottom:u=a,radiusBottomLeft:f=o,radiusBottomRight:d=o,radiusTopLeft:h=o,radiusTopRight:p=o,minWidth:g=-1/0,maxWidth:m=1/0,minHeight:y=-1/0}=i,v=eo(i,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight","minWidth","maxWidth","minHeight"]);if(!tf(r)&&!th(r)){let n=!!tu(r),[i,,a]=n?ee(e):e,[o,b]=i,[x,O]=tG(a,i),w=Math.abs(x),_=Math.abs(O),k=(x>0?o:o+x)+l,M=(O>0?b:b+O)+s,C=w-(l+c),j=_-(s+u),A=n?tJ(C,y,1/0):tJ(C,g,m),S=n?tJ(j,g,m):tJ(j,y,1/0),E=n?k:k-(A-C)/2,P=n?M-(S-j)/2:M-(S-j);return tW(t.createElement("rect",{})).style("x",E).style("y",P).style("width",A).style("height",S).style("radius",[h,p,d,f]).call(t9,v).node()}let{y:b,y1:x}=n,O=r.getCenter(),w=en(r,e,[b,x]),_=tc().cornerRadius(o).padAngle(a*Math.PI/180);return tW(t.createElement("path",{})).style("d",_(w)).style("transform","translate(".concat(O[0],", ").concat(O[1],")")).style("radius",o).style("inset",a).call(t9,v).node()}let es=(t,e)=>{let{colorAttribute:n,opacityAttribute:r="fill",first:i=!0,last:a=!0}=t,o=eo(t,["colorAttribute","opacityAttribute","first","last"]),{coordinate:l,document:s}=e;return(e,r,c)=>{let{color:u,radius:f=0}=c,d=eo(c,["color","radius"]),h=d.lineWidth||1,{stroke:p,radius:g=f,radiusTopLeft:m=g,radiusTopRight:y=g,radiusBottomRight:v=g,radiusBottomLeft:b=g,innerRadius:x=0,innerRadiusTopLeft:O=x,innerRadiusTopRight:w=x,innerRadiusBottomRight:_=x,innerRadiusBottomLeft:k=x,lineWidth:M="stroke"===n||p?h:0,inset:C=0,insetLeft:j=C,insetRight:A=C,insetBottom:S=C,insetTop:E=C,minWidth:P,maxWidth:R,minHeight:T}=o,L=eo(o,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop","minWidth","maxWidth","minHeight"]),{color:I=u,opacity:N}=r,B=[i?m:O,i?y:w,a?v:_,a?b:k],D=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"];tu(l)&&D.push(D.shift());let Z=Object.assign(Object.assign({radius:g},Object.fromEntries(D.map((t,e)=>[t,B[e]]))),{inset:C,insetLeft:j,insetRight:A,insetBottom:S,insetTop:E,minWidth:P,maxWidth:R,minHeight:T});return tW(el(s,e,r,l,Z)).call(t9,d).style("fill","transparent").style(n,I).style(er(t),N).style("lineWidth",M).style("stroke",void 0===p?I:p).call(t9,L).node()}};es.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let ec=(t,e)=>es(Object.assign({colorAttribute:"fill"},t),e);ec.props=Object.assign(Object.assign({},es.props),{defaultMarker:"square"});let eu=(t,e)=>es(Object.assign({colorAttribute:"stroke"},t),e);function ef(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function ed(t){this._context=t}function eh(t){return new ed(t)}function ep(t){return t[0]}function eg(t){return t[1]}function em(t,e){var n=D(!0),r=null,i=eh,a=null,o=tn(l);function l(l){var s,c,u,f=(l=ef(l)).length,d=!1;for(null==r&&(a=i(u=o())),s=0;s<=f;++s)!(s e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function eO(t,e,n){let[r,i,a,o]=t;if(tu(n)){let t=[e?e[0][0]:i[0],i[1]],n=[e?e[3][0]:a[0],a[1]];return[r,t,n,o]}let l=[i[0],e?e[0][1]:i[1]],s=[a[0],e?e[3][1]:a[1]];return[r,l,s,o]}let ew=(t,e)=>{let{adjustPoints:n=eO}=t,r=ex(t,["adjustPoints"]),{coordinate:i,document:a}=e;return(t,e,o,l)=>{let{index:s}=e,{color:c}=o,u=ex(o,["color"]),f=l[s+1],d=n(t,f,i),h=!!tu(i),[p,g,m,y]=h?ee(d):d,{color:v=c,opacity:b}=e,x=em().curve(eb)([p,g,m,y]);return tW(a.createElement("path",{})).call(t9,u).style("d",x).style("fill",v).style("fillOpacity",b).call(t9,r).node()}};function e_(t,e,n){let[r,i,a,o]=t;if(tu(n)){let t=[e?e[0][0]:(i[0]+a[0])/2,i[1]],n=[e?e[3][0]:(i[0]+a[0])/2,a[1]];return[r,t,n,o]}let l=[i[0],e?e[0][1]:(i[1]+a[1])/2],s=[a[0],e?e[3][1]:(i[1]+a[1])/2];return[r,l,s,o]}ew.props={defaultMarker:"square"};let ek=(t,e)=>ew(Object.assign({adjustPoints:e_},t),e);function eM(t){return Math.abs(t)>10?String(t):t.toString().padStart(2,"0")}ek.props={defaultMarker:"square"};let eC=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{channel:e="x"}=t;return(t,n)=>{let{encode:r}=n,{tooltip:i}=n;if(t$(i))return[t,n];let{title:a}=i;if(void 0!==a)return[t,n];let o=Object.keys(r).filter(t=>t.startsWith(e)).filter(t=>!r[t].inferred).map(t=>T(r,t)).filter(t=>{let[e]=t;return e}).map(t=>t[0]);if(0===o.length)return[t,n];let l=[];for(let e of t)l[e]={value:o.map(t=>t[e]instanceof Date?function(t){let e=t.getFullYear(),n=eM(t.getMonth()+1),r=eM(t.getDate()),i="".concat(e,"-").concat(n,"-").concat(r),a=t.getHours(),o=t.getMinutes(),l=t.getSeconds();return a||o||l?"".concat(i," ").concat(eM(a),":").concat(eM(o),":").concat(eM(l)):i}(t[e]):t[e]).join(", ")};return[t,(0,A.Z)({},n,{tooltip:{title:l}})]}};eC.props={};let ej=t=>{let{channel:e}=t;return(t,n)=>{let{encode:r,tooltip:i}=n;if(t$(i))return[t,n];let{items:a=[]}=i;if(!a||a.length>0)return[t,n];let o=Array.isArray(e)?e:[e],l=o.flatMap(t=>Object.keys(r).filter(e=>e.startsWith(t)).map(t=>{let{field:e,value:n,inferred:i=!1,aggregate:a}=r[t];return i?null:a&&n?{channel:t}:e?{field:e}:n?{channel:t}:null}).filter(t=>null!==t));return[t,(0,A.Z)({},n,{tooltip:{items:l}})]}};ej.props={};var eA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let eS=()=>(t,e)=>{let{encode:n}=e,{key:r}=n,i=eA(n,["key"]);if(void 0!==r)return[t,e];let a=Object.values(i).map(t=>{let{value:e}=t;return e}),o=t.map(t=>a.filter(Array.isArray).map(e=>e[t]).join("-"));return[t,(0,A.Z)({},e,{encode:{key:S(o)}})]};function eE(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{shapes:e}=t;return[{name:"color"},{name:"opacity"},{name:"shape",range:e},{name:"enterType"},{name:"enterDelay",scaleKey:"enter"},{name:"enterDuration",scaleKey:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function eP(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[...eE(t),{name:"title",scale:"identity"}]}function eR(){return[{type:eC,channel:"color"},{type:ej,channel:["x","y"]}]}function eT(){return[{type:eC,channel:"x"},{type:ej,channel:["y"]}]}function eL(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return eE(t)}function eI(){return[{type:eS}]}function eN(t,e){return t.getBandWidth(t.invert(e))}function eB(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{x:r,y:i,series:a}=e,{x:o,y:l,series:s}=t,{style:{bandOffset:c=s?0:.5,bandOffsetX:u=c,bandOffsetY:f=c}={}}=n,d=!!(null==o?void 0:o.getBandWidth),h=!!(null==l?void 0:l.getBandWidth),p=!!(null==s?void 0:s.getBandWidth);return d||h?(t,e)=>{let n=d?eN(o,r[e]):0,c=h?eN(l,i[e]):0,g=p&&a?(eN(s,a[e])/2+ +a[e])*n:0,[m,y]=t;return[m+u*n+g,y+f*c]}:t=>t}function eD(t){return parseFloat(t)/100}function eZ(t,e,n,r){let{x:i,y:a}=n,{innerWidth:o,innerHeight:l}=r.getOptions(),s=Array.from(t,t=>{let e=i[t],n=a[t],r="string"==typeof e?eD(e)*o:+e,s="string"==typeof n?eD(n)*l:+n;return[[r,s]]});return[t,s]}function ez(t){return"function"==typeof t?t:e=>e[t]}function eF(t,e){return Array.from(t,ez(e))}function e$(t,e){let{source:n=t=>t.source,target:r=t=>t.target,value:i=t=>t.value}=e,{links:a,nodes:o}=t,l=eF(a,n),s=eF(a,r),c=eF(a,i);return{links:a.map((t,e)=>({target:s[e],source:l[e],value:c[e]})),nodes:o||Array.from(new Set([...l,...s]),t=>({key:t}))}}function eW(t,e){return t.getBandWidth(t.invert(e))}eS.props={};let eH={rect:ec,hollow:eu,funnel:ew,pyramid:ek},eG=()=>(t,e,n,r)=>{let{x:i,y:a,y1:o,series:l,size:s}=n,c=e.x,u=e.series,[f]=r.getSize(),d=s?s.map(t=>+t/f):null,h=s?(t,e,n)=>{let r=t+e/2,i=d[n];return[r-i/2,r+i/2]}:(t,e,n)=>[t,t+e],p=Array.from(t,t=>{let e=eW(c,i[t]),n=u?eW(u,null==l?void 0:l[t]):1,s=(+(null==l?void 0:l[t])||0)*e,f=+i[t]+s,[d,p]=h(f,e*n,t),g=+a[t],m=+o[t];return[[d,g],[p,g],[p,m],[d,m]].map(t=>r.map(t))});return[t,p]};eG.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:eH,channels:[...eP({shapes:Object.keys(eH)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...eI(),{type:N},{type:B}],postInference:[...eT()],interaction:{shareTooltip:!0}};let eq={rect:ec,hollow:eu},eY=()=>(t,e,n,r)=>{let{x:i,x1:a,y:o,y1:l}=n,s=Array.from(t,t=>{let e=[+i[t],+o[t]],n=[+a[t],+o[t]],s=[+a[t],+l[t]],c=[+i[t],+l[t]];return[e,n,s,c].map(t=>r.map(t))});return[t,s]};eY.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:eq,channels:[...eP({shapes:Object.keys(eq)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...eI(),{type:N}],postInference:[...eT()],interaction:{shareTooltip:!0}};var eV=eQ(eh);function eU(t){this._curve=t}function eQ(t){function e(e){return new eU(t(e))}return e._curve=t,e}function eX(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(eQ(t)):e()._curve},t}function eK(t){let e="function"==typeof t?t:t.render;return class extends tb.b_{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}eU.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),-(e*Math.cos(t)))}};var eJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let e0=eK(t=>{let{d1:e,d2:n,style1:r,style2:i}=t.attributes,a=t.ownerDocument;tW(t).maybeAppend("line",()=>a.createElement("path",{})).style("d",e).call(t9,r),tW(t).maybeAppend("line1",()=>a.createElement("path",{})).style("d",n).call(t9,i)}),e1=(t,e)=>{let{curve:n,gradient:r=!1,gradientColor:i="between",defined:a=t=>!Number.isNaN(t)&&null!=t,connect:o=!1}=t,l=eJ(t,["curve","gradient","gradientColor","defined","connect"]),{coordinate:s,document:c}=e;return(t,e,u)=>{let f;let{color:d,lineWidth:h}=u,p=eJ(u,["color","lineWidth"]),{color:g=d,size:m=h,seriesColor:y,seriesX:v,seriesY:b}=e,x=ei(s,e),O=tu(s),w=r&&y?et(y,v,b,r,i,O):g,_=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},p),w&&{stroke:w}),m&&{lineWidth:m}),x&&{transform:x}),l);if(tf(s)){let t=s.getCenter();f=e=>eX(em().curve(eV)).angle((n,r)=>tU(tG(e[r],t))).radius((n,r)=>tY(e[r],t)).defined(t=>{let[e,n]=t;return a(e)&&a(n)}).curve(n)(e)}else f=em().x(t=>t[0]).y(t=>t[1]).defined(t=>{let[e,n]=t;return a(e)&&a(n)}).curve(n);let[k,M]=function(t,e){let n=[],r=[],i=!1,a=null;for(let o of t)e(o[0])&&e(o[1])?(n.push(o),i&&(i=!1,r.push([a,o])),a=o):i=!0;return[n,r]}(t,a),C=tB(_,"connect"),j=!!M.length;return j&&(!o||Object.keys(C).length)?j&&!o?tW(c.createElement("path",{})).style("d",f(t)).call(t9,_).node():tW(new e0).style("style1",Object.assign(Object.assign({},_),C)).style("style2",_).style("d1",M.map(f).join(",")).style("d2",f(t)).node():tW(c.createElement("path",{})).style("d",f(k)||[]).call(t9,_).node()}};e1.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let e2=(t,e)=>{let{coordinate:n}=e;return function(){for(var r=arguments.length,i=Array(r),a=0;a 1e-12){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,s=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/s,i=(i*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/s}if(t._l23_a>1e-12){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*c+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function e8(t,e){this._context=t,this._alpha=e}function e9(t,e){this._context=t,this._alpha=e}e2.props=Object.assign(Object.assign({},e1.props),{defaultMarker:"line"}),e3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:e5(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:e5(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function t(e){function n(t){return new e3(t,e)}return n.tension=function(e){return t(+e)},n}(0),e4.prototype={areaStart:ey,areaEnd:ey,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:e5(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function t(e){function n(t){return new e4(t,e)}return n.tension=function(e){return t(+e)},n}(0),e8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:e6(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function t(e){function n(t){return e?new e8(t,e):new e3(t,0)}return n.alpha=function(e){return t(+e)},n}(.5),e9.prototype={areaStart:ey,areaEnd:ey,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:e6(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var e7=function t(e){function n(t){return e?new e9(t,e):new e4(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function nt(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0);return((a<0?-1:1)+(o<0?-1:1))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs((a*i+o*r)/(r+i)))||0}function ne(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function nn(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,l=(a-r)/3;t._context.bezierCurveTo(r+l,i+l*e,a-l,o-l*n,a,o)}function nr(t){this._context=t}function ni(t){this._context=new na(t)}function na(t){this._context=t}function no(t){return new nr(t)}function nl(t){return new ni(t)}nr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:nn(this,this._t0,ne(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,nn(this,ne(this,n=nt(this,t,e)),n);break;default:nn(this,this._t0,n=nt(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(ni.prototype=Object.create(nr.prototype)).point=function(t,e){nr.prototype.point.call(this,e,t)},na.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}};var ns=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let nc=(t,e)=>{let n=ns(t,[]),{coordinate:r}=e;return function(){for(var t=arguments.length,i=Array(t),a=0;a =0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};let np=(t,e)=>e1(Object.assign({curve:nh},t),e);np.props=Object.assign(Object.assign({},e1.props),{defaultMarker:"hv"});let ng=(t,e)=>e1(Object.assign({curve:nd},t),e);ng.props=Object.assign(Object.assign({},e1.props),{defaultMarker:"vh"});let nm=(t,e)=>e1(Object.assign({curve:nf},t),e);nm.props=Object.assign(Object.assign({},e1.props),{defaultMarker:"hvh"});var ny=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let nv=(t,e)=>{let{document:n}=e;return(e,r,i)=>{let{seriesSize:a,color:o}=r,{color:l}=i,s=ny(i,["color"]),c=te();for(let t=0;t (t,e)=>{let{style:n={},encode:r}=e,{series:i}=r,{gradient:a}=n;return!a||i?[t,e]:[t,(0,A.Z)({},e,{encode:{series:P(R(t,void 0))}})]};nb.props={};let nx=()=>(t,e)=>{let{encode:n}=e,{series:r,color:i}=n;if(void 0!==r||void 0===i)return[t,e];let[a,o]=T(n,"color");return[t,(0,A.Z)({},e,{encode:{series:S(a,o)}})]};nx.props={};let nO={line:e2,smooth:nc,hv:np,vh:ng,hvh:nm,trail:nv},nw=(t,e,n,r)=>{var i,a;let{series:o,x:l,y:s}=n,{x:c,y:u}=e;if(void 0===l||void 0===s)throw Error("Missing encode for x or y channel.");let f=o?Array.from(tk(t,t=>o[t]).values()):[t],d=f.map(t=>t[0]).filter(t=>void 0!==t),h=((null===(i=null==c?void 0:c.getBandWidth)||void 0===i?void 0:i.call(c))||0)/2,p=((null===(a=null==u?void 0:u.getBandWidth)||void 0===a?void 0:a.call(u))||0)/2,g=Array.from(f,t=>t.map(t=>r.map([+l[t]+h,+s[t]+p])));return[d,g,f]},n_=(t,e,n,r)=>{let i=Object.entries(n).filter(t=>{let[e]=t;return e.startsWith("position")}).map(t=>{let[,e]=t;return e});if(0===i.length)throw Error("Missing encode for position channel.");let a=Array.from(t,t=>{let e=i.map(e=>+e[t]),n=r.map(e),a=[];for(let t=0;t (t,e,n,r)=>{let i=tp(r)?n_:nw;return i(t,e,n,r)};nk.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:nO,channels:[...eP({shapes:Object.keys(nO)}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...eI(),{type:nb},{type:nx}],postInference:[...eT(),{type:eC,channel:"color"},{type:ej,channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};var nM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let nC=(t,e,n)=>[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]];nC.style=["fill"];let nj=nC.bind(void 0);nj.style=["stroke","lineWidth"];let nA=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]];nA.style=["fill"];let nS=nA.bind(void 0);nS.style=["fill"];let nE=nA.bind(void 0);nE.style=["stroke","lineWidth"];let nP=(t,e,n)=>{let r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]};nP.style=["fill"];let nR=nP.bind(void 0);nR.style=["stroke","lineWidth"];let nT=(t,e,n)=>{let r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]};nT.style=["fill"];let nL=nT.bind(void 0);nL.style=["stroke","lineWidth"];let nI=(t,e,n)=>{let r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]};nI.style=["fill"];let nN=nI.bind(void 0);nN.style=["stroke","lineWidth"];let nB=(t,e,n)=>{let r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]};nB.style=["fill"];let nD=nB.bind(void 0);nD.style=["stroke","lineWidth"];let nZ=(t,e,n)=>{let r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]};nZ.style=["fill"];let nz=nZ.bind(void 0);nz.style=["stroke","lineWidth"];let nF=(t,e,n)=>[["M",t,e+n],["L",t,e-n]];nF.style=["stroke","lineWidth"];let n$=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]];n$.style=["stroke","lineWidth"];let nW=(t,e,n)=>[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]];nW.style=["stroke","lineWidth"];let nH=(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]];nH.style=["stroke","lineWidth"];let nG=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];nG.style=["stroke","lineWidth"];let nq=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];nq.style=["stroke","lineWidth"];let nY=nq.bind(void 0);nY.style=["stroke","lineWidth"];let nV=(t,e,n)=>[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]];nV.style=["stroke","lineWidth"];let nU=(t,e,n)=>[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]];nU.style=["stroke","lineWidth"];let nQ=(t,e,n)=>[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]];nQ.style=["stroke","lineWidth"];let nX=(t,e,n)=>[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]];nX.style=["stroke","lineWidth"];let nK=(t,e,n)=>[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]];nK.style=["stroke","lineWidth"];let nJ=new Map([["bowtie",nZ],["cross",n$],["dash",nY],["diamond",nP],["dot",nq],["hexagon",nB],["hollowBowtie",nz],["hollowDiamond",nR],["hollowHexagon",nD],["hollowPoint",nj],["hollowSquare",nE],["hollowTriangle",nL],["hollowTriangleDown",nN],["hv",nU],["hvh",nX],["hyphen",nG],["line",nF],["plus",nH],["point",nC],["rect",nS],["smooth",nV],["square",nA],["tick",nW],["triangleDown",nI],["triangle",nT],["vh",nQ],["vhv",nK]]);var n0=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function n1(t,e,n,r){if(1===e.length)return;let{size:i}=n;if("fixed"===t)return i;if("normal"===t||tg(r)){let[[t,n],[r,i]]=e,a=Math.abs((r-t)/2),o=Math.abs((i-n)/2);return Math.max(0,(a+o)/2)}return i}let n2=(t,e)=>{let{colorAttribute:n,symbol:r,mode:i="auto"}=t,a=n0(t,["colorAttribute","symbol","mode"]),o=nJ.get(r)||nJ.get("point"),{coordinate:l,document:s}=e;return(e,r,c)=>{let{lineWidth:u,color:f}=c,d=a.stroke?u||1:u,{color:h=f,transform:p,opacity:g}=r,[m,y]=ea(e),v=n1(i,e,r,l),b=v||a.r||c.r;return tW(s.createElement("path",{})).call(t9,c).style("fill","transparent").style("d",o(m,y,b)).style("lineWidth",d).style("transform",p).style("transformOrigin","".concat(m-b," ").concat(y-b)).style("stroke",h).style(er(t),g).style(n,h).call(t9,a).node()}};n2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let n5=(t,e)=>n2(Object.assign({colorAttribute:"stroke",symbol:"point"},t),e);n5.props=Object.assign({defaultMarker:"hollowPoint"},n2.props);let n3=(t,e)=>n2(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t),e);n3.props=Object.assign({defaultMarker:"hollowDiamond"},n2.props);let n4=(t,e)=>n2(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t),e);n4.props=Object.assign({defaultMarker:"hollowHexagon"},n2.props);let n6=(t,e)=>n2(Object.assign({colorAttribute:"stroke",symbol:"square"},t),e);n6.props=Object.assign({defaultMarker:"hollowSquare"},n2.props);let n8=(t,e)=>n2(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t),e);n8.props=Object.assign({defaultMarker:"hollowTriangleDown"},n2.props);let n9=(t,e)=>n2(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t),e);n9.props=Object.assign({defaultMarker:"hollowTriangle"},n2.props);let n7=(t,e)=>n2(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t),e);n7.props=Object.assign({defaultMarker:"hollowBowtie"},n2.props);var rt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let re=(t,e)=>{let{colorAttribute:n,mode:r="auto"}=t,i=rt(t,["colorAttribute","mode"]),{coordinate:a,document:o}=e;return(e,l,s)=>{let{lineWidth:c,color:u}=s,f=i.stroke?c||1:c,{color:d=u,transform:h,opacity:p}=l,[g,m]=ea(e),y=n1(r,e,l,a),v=y||i.r||s.r;return tW(o.createElement("circle",{})).call(t9,s).style("fill","transparent").style("cx",g).style("cy",m).style("r",v).style("lineWidth",f).style("transform",h).style("transformOrigin","".concat(g," ").concat(m)).style("stroke",d).style(er(t),p).style(n,d).call(t9,i).node()}},rn=(t,e)=>re(Object.assign({colorAttribute:"fill"},t),e);rn.props={defaultMarker:"circle",defaultEnterAnimation:"fadeIn",defaultExitAnimation:"fadeOut"};let rr=(t,e)=>re(Object.assign({colorAttribute:"stroke"},t),e);rr.props=Object.assign({defaultMarker:"hollowPoint"},rn.props);let ri=(t,e)=>n2(Object.assign({colorAttribute:"fill",symbol:"point"},t),e);ri.props=Object.assign({defaultMarker:"point"},n2.props);let ra=(t,e)=>n2(Object.assign({colorAttribute:"stroke",symbol:"plus"},t),e);ra.props=Object.assign({defaultMarker:"plus"},n2.props);let ro=(t,e)=>n2(Object.assign({colorAttribute:"fill",symbol:"diamond"},t),e);ro.props=Object.assign({defaultMarker:"diamond"},n2.props);let rl=(t,e)=>n2(Object.assign({colorAttribute:"fill",symbol:"square"},t),e);rl.props=Object.assign({defaultMarker:"square"},n2.props);let rs=(t,e)=>n2(Object.assign({colorAttribute:"fill",symbol:"triangle"},t),e);rs.props=Object.assign({defaultMarker:"triangle"},n2.props);let rc=(t,e)=>n2(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t),e);rc.props=Object.assign({defaultMarker:"hexagon"},n2.props);let ru=(t,e)=>n2(Object.assign({colorAttribute:"stroke",symbol:"cross"},t),e);ru.props=Object.assign({defaultMarker:"cross"},n2.props);let rf=(t,e)=>n2(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t),e);rf.props=Object.assign({defaultMarker:"bowtie"},n2.props);let rd=(t,e)=>n2(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t),e);rd.props=Object.assign({defaultMarker:"hyphen"},n2.props);let rh=(t,e)=>n2(Object.assign({colorAttribute:"stroke",symbol:"line"},t),e);rh.props=Object.assign({defaultMarker:"line"},n2.props);let rp=(t,e)=>n2(Object.assign({colorAttribute:"stroke",symbol:"tick"},t),e);rp.props=Object.assign({defaultMarker:"tick"},n2.props);let rg=(t,e)=>n2(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t),e);rg.props=Object.assign({defaultMarker:"triangleDown"},n2.props);let rm=()=>(t,e)=>{let{encode:n}=e,{y:r}=n;return void 0!==r?[t,e]:[t,(0,A.Z)({},e,{encode:{y:E(R(t,0))},scale:{y:{guide:null}}})]};rm.props={};let ry=()=>(t,e)=>{let{encode:n}=e,{size:r}=n;return void 0!==r?[t,e]:[t,(0,A.Z)({},e,{encode:{size:P(R(t,3))}})]};ry.props={};let rv={hollow:n5,hollowDiamond:n3,hollowHexagon:n4,hollowSquare:n6,hollowTriangleDown:n8,hollowTriangle:n9,hollowBowtie:n7,hollowCircle:rr,point:ri,plus:ra,diamond:ro,square:rl,triangle:rs,hexagon:rc,cross:ru,bowtie:rf,hyphen:rd,line:rh,tick:rp,triangleDown:rg,circle:rn},rb=t=>(e,n,r,i)=>{let{x:a,y:o,x1:l,y1:s,size:c,dx:u,dy:f}=r,[d,h]=i.getSize(),p=eB(n,r,t),g=t=>{let e=+((null==u?void 0:u[t])||0),n=+((null==f?void 0:f[t])||0),r=l?(+a[t]+ +l[t])/2:+a[t],i=s?(+o[t]+ +s[t])/2:+o[t];return[r+e,i+n]},m=c?Array.from(e,t=>{let[e,n]=g(t),r=+c[t],a=r/d,o=r/h;return[i.map(p([e-a,n-o],t)),i.map(p([e+a,n+o],t))]}):Array.from(e,t=>[i.map(p(g(t),t))]);return[e,m]};rb.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,shape:rv,channels:[...eP({shapes:Object.keys(rv)}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",quantitative:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[...eI(),{type:B},{type:rm}],postInference:[{type:ry},...eR()]};var rx=n(76168),rO=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let rw=eK(t=>{let e;let n=t.attributes,{className:r,class:i,transform:a,rotate:o,labelTransform:l,labelTransformOrigin:s,x:c,y:u,x0:f=c,y0:d=u,text:h,background:p,connector:g,startMarker:m,endMarker:y,coordCenter:v,innerHTML:b}=n,x=rO(n,["className","class","transform","rotate","labelTransform","labelTransformOrigin","x","y","x0","y0","text","background","connector","startMarker","endMarker","coordCenter","innerHTML"]);if(t.style.transform="translate(".concat(c,", ").concat(u,")"),[c,u,f,d].some(t=>!(0,t2.Z)(t))){t.children.forEach(t=>t.remove());return}let O=tB(x,"background"),{padding:w}=O,_=rO(O,["padding"]),k=tB(x,"connector"),{points:M=[]}=k,C=rO(k,["points"]);e=b?tW(t).maybeAppend("html","html",r).style("zIndex",0).style("innerHTML",b).call(t9,Object.assign({transform:l,transformOrigin:s},x)).node():tW(t).maybeAppend("text","text").style("zIndex",0).style("text",h).call(t9,Object.assign({textBaseline:"middle",transform:l,transformOrigin:s},x)).node();let j=tW(t).maybeAppend("background","rect").style("zIndex",-1).call(t9,function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],[n=0,r=0,i=n,a=r]=e,o=t.parentNode,l=o.getEulerAngles();o.setEulerAngles(0);let{min:s,halfExtents:c}=t.getLocalBounds(),[u,f]=s,[d,h]=c;return o.setEulerAngles(l),{x:u-a,y:f-n,width:2*d+a+r,height:2*h+n+i}}(e,w)).call(t9,p?_:{}).node(),A=+f 4)||void 0===arguments[4]||arguments[4],a=!(arguments.length>5)||void 0===arguments[5]||arguments[5],o=t=>em()(t);if(!e[0]&&!e[1])return o([function(t){let{min:[e,n],max:[r,i]}=t.getLocalBounds(),a=0,o=0;return e>0&&(a=e),r<0&&(a=r),n>0&&(o=n),i<0&&(o=i),[a,o]}(t),e]);if(!n.length)return o([[0,0],e]);let[l,s]=n,c=[...s],u=[...l];if(s[0]!==l[0]){let t=i?-4:4;c[1]=s[1],a&&!i&&(c[0]=Math.max(l[0],s[0]-t),s[1] l[1]?u[1]=c[1]:(u[1]=l[1],u[0]=Math.max(u[0],c[0]-t))),!a&&i&&(c[0]=Math.min(l[0],s[0]-t),s[1]>l[1]?u[1]=c[1]:(u[1]=l[1],u[0]=Math.min(u[0],c[0]-t))),a&&i&&(c[0]=Math.min(l[0],s[0]-t),s[1] {let{coordinate:n}=e;return(e,r,i)=>{let{color:a,text:o="",fontSize:l,rotate:s=0,transform:c=""}=r,u={text:String(o),stroke:a,fill:a,fontSize:l},[[f,d]]=e;return tW(new rw).style("x",f).style("y",d).call(t9,i).style("transform","".concat(c,"rotate(").concat(+s,")")).style("coordCenter",n.getCenter()).call(t9,u).call(t9,t).node()}};r_.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var rk=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let rM=eK(t=>{let e=t.attributes,{class:n,x:r,y:i,transform:a}=e,o=rk(e,["class","x","y","transform"]),l=tB(o,"marker"),{size:s=24}=l,c=()=>(function(t){let e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[a,o]=[0,0],[l,s]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,l,s],["L",a,o],["Z"]]})(s/2),u=tW(t).maybeAppend("marker",()=>new rx.J({})).call(t=>t.node().update(Object.assign({symbol:c},l))).node(),[f,d]=function(t){let{min:e,max:n}=t.getLocalBounds();return[(e[0]+n[0])*.5,(e[1]+n[1])*.5]}(u);tW(t).maybeAppend("text","text").style("x",f).style("y",d).call(t9,o)}),rC=(t,e)=>{let n=rk(t,[]);return(t,e,r)=>{let{color:i}=r,a=rk(r,["color"]),{color:o=i,text:l=""}=e,s={text:String(l),stroke:o,fill:o},[[c,u]]=t;return tW(new rM).call(t9,a).style("transform","translate(".concat(c,",").concat(u,")")).call(t9,s).call(t9,n).node()}};rC.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let rj=(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let{color:a,text:o="",fontSize:l,rotate:s=0,transform:c=""}=r,u={text:String(o),stroke:a,fill:a,fontSize:l,textAlign:"center",textBaseline:"middle"},[[f,d]]=e,h=tW(new tb.xv).style("x",f).style("y",d).call(t9,i).style("transformOrigin","center center").style("transform","".concat(c,"rotate(").concat(s,"deg)")).style("coordCenter",n.getCenter()).call(t9,u).call(t9,t).node();return h}};rj.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let rA=()=>(t,e)=>{let{data:n}=e;if(!Array.isArray(n)||n.some(I))return[t,e];let r=Array.isArray(n[0])?n:[n],i=r.map(t=>t[0]),a=r.map(t=>t[1]);return[t,(0,A.Z)({},e,{encode:{x:S(i),y:S(a)}})]};rA.props={};var rS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let rE=()=>(t,e)=>{let{data:n,style:r={}}=e,i=rS(e,["data","style"]),{x:a,y:o}=r,l=rS(r,["x","y"]);if(void 0==a||void 0==o)return[t,e];let s=a||0,c=o||0;return[[0],(0,A.Z)({},i,{data:[0],cartesian:!0,encode:{x:S([s]),y:S([c])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:l})]};rE.props={};let rP={text:r_,badge:rC,tag:rj},rR=t=>{let{cartesian:e=!1}=t;return e?eZ:(e,n,r,i)=>{let{x:a,y:o}=r,l=eB(n,r,t),s=Array.from(e,t=>{let e=[+a[t],+o[t]];return[i.map(l(e,t))]});return[e,s]}};rR.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,shape:rP,channels:[...eP({shapes:Object.keys(rP)}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize",scale:"identity"},{name:"rotate",scale:"identity"}],preInference:[...eI(),{type:rA},{type:rE}],postInference:[...eR()]};let rT=()=>(t,e)=>[t,(0,A.Z)({scale:{x:{padding:0},y:{padding:0}}},e)];rT.props={};let rL={cell:ec,hollow:eu},rI=()=>(t,e,n,r)=>{let{x:i,y:a}=n,o=e.x,l=e.y,s=Array.from(t,t=>{let e=o.getBandWidth(o.invert(+i[t])),n=l.getBandWidth(l.invert(+a[t])),s=+i[t],c=+a[t];return[[s,c],[s+e,c],[s+e,c+n],[s,c+n]].map(t=>r.map(t))});return[t,s]};function rN(t,e,n){var r=null,i=D(!0),a=null,o=eh,l=null,s=tn(c);function c(c){var u,f,d,h,p,g=(c=ef(c)).length,m=!1,y=Array(g),v=Array(g);for(null==a&&(l=o(p=s())),u=0;u<=g;++u){if(!(u =f;--d)l.point(y[d],v[d]);l.lineEnd(),l.areaEnd()}}m&&(y[u]=+t(h,u,c),v[u]=+e(h,u,c),l.point(r?+r(h,u,c):y[u],n?+n(h,u,c):v[u]))}if(p)return l=null,p+""||null}function u(){return em().defined(i).curve(o).context(a)}return t="function"==typeof t?t:void 0===t?ep:D(+t),e="function"==typeof e?e:void 0===e?D(0):D(+e),n="function"==typeof n?n:void 0===n?eg:D(+n),c.x=function(e){return arguments.length?(t="function"==typeof e?e:D(+e),r=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:D(+e),c):t},c.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:D(+t),c):r},c.y=function(t){return arguments.length?(e="function"==typeof t?t:D(+t),n=null,c):e},c.y0=function(t){return arguments.length?(e="function"==typeof t?t:D(+t),c):e},c.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:D(+t),c):n},c.lineX0=c.lineY0=function(){return u().x(t).y(e)},c.lineY1=function(){return u().x(t).y(n)},c.lineX1=function(){return u().x(r).y(e)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:D(!!t),c):i},c.curve=function(t){return arguments.length?(o=t,null!=a&&(l=o(a)),c):o},c.context=function(t){return arguments.length?(null==t?a=l=null:l=o(a=t),c):a},c}rI.props={defaultShape:"cell",defaultLabelShape:"label",shape:rL,composite:!1,channels:[...eP({shapes:Object.keys(rL)}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...eI(),{type:B},{type:rm},{type:rT}],postInference:[...eR()]};var rB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let rD=eK(t=>{let{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes,a=t.ownerDocument;tW(t).maybeAppend("connect-path",()=>a.createElement("path",{})).style("d",n).call(t9,i),tW(t).maybeAppend("area-path",()=>a.createElement("path",{})).style("d",e).call(t9,r)}),rZ=(t,e)=>{let{curve:n,gradient:r=!1,defined:i=t=>!Number.isNaN(t)&&null!=t,connect:a=!1}=t,o=rB(t,["curve","gradient","defined","connect"]),{coordinate:l,document:s}=e;return(t,e,c)=>{let{color:u}=c,{color:f=u,seriesColor:d,seriesX:h,seriesY:p}=e,g=tu(l),m=ei(l,e),y=r&&d?et(d,h,p,r,void 0,g):f,v=Object.assign(Object.assign(Object.assign(Object.assign({},c),{stroke:y,fill:y}),m&&{transform:m}),o),[b,x]=function(t,e){let n=[],r=[],i=[],a=!1,o=null,l=t.length/2;for(let s=0;s !e(t)))a=!0;else{if(n.push(c),r.push(u),a&&o){a=!1;let[t,e]=o;i.push([t,c,e,u])}o=[c,u]}}return[n.concat(r),i]}(t,i),O=tB(v,"connect"),w=!!x.length,_=t=>tW(s.createElement("path",{})).style("d",t||"").call(t9,v).node();if(tf(l)){let e=t=>{var e,r,a,o,s,c;let u=l.getCenter(),f=t.slice(0,t.length/2),d=t.slice(t.length/2);return(r=(e=rN().curve(eV)).curve,a=e.lineX0,o=e.lineX1,s=e.lineY0,c=e.lineY1,e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return eX(a())},delete e.lineX0,e.lineEndAngle=function(){return eX(o())},delete e.lineX1,e.lineInnerRadius=function(){return eX(s())},delete e.lineY0,e.lineOuterRadius=function(){return eX(c())},delete e.lineY1,e.curve=function(t){return arguments.length?r(eQ(t)):r()._curve},e).angle((t,e)=>tU(tG(f[e],u))).outerRadius((t,e)=>tY(f[e],u)).innerRadius((t,e)=>tY(d[e],u)).defined((t,e)=>[...f[e],...d[e]].every(i)).curve(n)(d)};return w&&(!a||Object.keys(O).length)?w&&!a?_(e(t)):tW(new rD).style("areaStyle",v).style("connectStyle",Object.assign(Object.assign({},O),o)).style("areaPath",e(t)).style("connectPath",x.map(e).join("")).node():_(e(b))}{let e=t=>{let e=t.slice(0,t.length/2),r=t.slice(t.length/2);return g?rN().y((t,n)=>e[n][1]).x1((t,n)=>e[n][0]).x0((t,e)=>r[e][0]).defined((t,n)=>[...e[n],...r[n]].every(i)).curve(n)(e):rN().x((t,n)=>e[n][0]).y1((t,n)=>e[n][1]).y0((t,e)=>r[e][1]).defined((t,n)=>[...e[n],...r[n]].every(i)).curve(n)(e)};return w&&(!a||Object.keys(O).length)?w&&!a?_(e(t)):tW(new rD).style("areaStyle",v).style("connectStyle",Object.assign(Object.assign({},O),o)).style("areaPath",e(t)).style("connectPath",x.map(e).join("")).node():_(e(b))}}};rZ.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let rz=(t,e)=>{let{coordinate:n}=e;return function(){for(var r=arguments.length,i=Array(r),a=0;a e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let r$=(t,e)=>{let n=rF(t,[]),{coordinate:r}=e;return function(){for(var t=arguments.length,i=Array(t),a=0;a function(){for(var n=arguments.length,r=Array(n),i=0;i function(){for(var n=arguments.length,r=Array(n),i=0;i function(){for(var n=arguments.length,r=Array(n),i=0;i (t,e,n,r)=>{var i,a;let{x:o,y:l,y1:s,series:c}=n,{x:u,y:f}=e,d=c?Array.from(tk(t,t=>c[t]).values()):[t],h=d.map(t=>t[0]).filter(t=>void 0!==t),p=((null===(i=null==u?void 0:u.getBandWidth)||void 0===i?void 0:i.call(u))||0)/2,g=((null===(a=null==f?void 0:f.getBandWidth)||void 0===a?void 0:a.call(f))||0)/2,m=Array.from(d,t=>{let e=t.length,n=Array(2*e);for(let i=0;i (t,e)=>{let{encode:n}=e,{y1:r}=n;if(r)return[t,e];let[i]=T(n,"y");return[t,(0,A.Z)({},e,{encode:{y1:S([...i])}})]};rV.props={};let rU=()=>(t,e)=>{let{encode:n}=e,{x1:r}=n;if(r)return[t,e];let[i]=T(n,"x");return[t,(0,A.Z)({},e,{encode:{x1:S([...i])}})]};rU.props={};var rQ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let rX=(t,e)=>{let{arrow:n=!0,arrowSize:r="40%"}=t,i=rQ(t,["arrow","arrowSize"]),{document:a}=e;return(t,e,o)=>{let{defaultColor:l}=o,s=rQ(o,["defaultColor"]),{color:c=l,transform:u}=e,[f,d]=t,h=te();if(h.moveTo(...f),h.lineTo(...d),n){let[t,e]=function(t,e,n){let{arrowSize:r}=n,i="string"==typeof r?+parseFloat(r)/100*tY(t,e):r,a=Math.PI/6,o=Math.atan2(e[1]-t[1],e[0]-t[0]),l=Math.PI/2-o-a,s=[e[0]-i*Math.sin(l),e[1]-i*Math.cos(l)],c=o-a,u=[e[0]-i*Math.cos(c),e[1]-i*Math.sin(c)];return[s,u]}(f,d,{arrowSize:r});h.moveTo(...t),h.lineTo(...d),h.lineTo(...e)}return tW(a.createElement("path",{})).call(t9,s).style("d",h.toString()).style("stroke",c).style("transform",u).call(t9,i).node()}};rX.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let rK=(t,e)=>{let{arrow:n=!1}=t;return function(){for(var r=arguments.length,i=Array(r),a=0;a e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let r0=(t,e)=>{let n=rJ(t,[]),{coordinate:r,document:i}=e;return(t,e,a)=>{let{color:o}=a,l=rJ(a,["color"]),{color:s=o,transform:c}=e,[u,f]=t,d=te();if(d.moveTo(u[0],u[1]),tf(r)){let t=r.getCenter();d.quadraticCurveTo(t[0],t[1],f[0],f[1])}else{let t=tK(u,f),e=tY(u,f)/2;t7(d,u,f,t,e)}return tW(i.createElement("path",{})).call(t9,l).style("d",d.toString()).style("stroke",s).style("transform",c).call(t9,n).node()}};r0.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var r1=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let r2=(t,e)=>{let n=r1(t,[]),{document:r}=e;return(t,e,i)=>{let{color:a}=i,o=r1(i,["color"]),{color:l=a,transform:s}=e,[c,u]=t,f=te();return f.moveTo(c[0],c[1]),f.bezierCurveTo(c[0]/2+u[0]/2,c[1],c[0]/2+u[0]/2,u[1],u[0],u[1]),tW(r.createElement("path",{})).call(t9,o).style("d",f.toString()).style("stroke",l).style("transform",s).call(t9,n).node()}};r2.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var r5=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let r3=(t,e)=>{let{cornerRatio:n=1/3}=t,r=r5(t,["cornerRatio"]),{coordinate:i,document:a}=e;return(t,e,o)=>{let{defaultColor:l}=o,s=r5(o,["defaultColor"]),{color:c=l,transform:u}=e,[f,d]=t,h=function(t,e,n,r){let i=te();if(tf(n)){let a=n.getCenter(),o=tY(t,a),l=tY(e,a),s=(l-o)*r+o;return i.moveTo(t[0],t[1]),t7(i,t,e,a,s),i.lineTo(e[0],e[1]),i}return tu(n)?(i.moveTo(t[0],t[1]),i.lineTo(t[0]+(e[0]-t[0])*r,t[1]),i.lineTo(t[0]+(e[0]-t[0])*r,e[1]),i.lineTo(e[0],e[1]),i):(i.moveTo(t[0],t[1]),i.lineTo(t[0],t[1]+(e[1]-t[1])*r),i.lineTo(e[0],t[1]+(e[1]-t[1])*r),i.lineTo(e[0],e[1]),i)}(f,d,i,n);return tW(a.createElement("path",{})).call(t9,s).style("d",h.toString()).style("stroke",c).style("transform",u).call(t9,r).node()}};r3.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let r4={link:rK,arc:r0,smooth:r2,vhv:r3},r6=t=>(e,n,r,i)=>{let{x:a,y:o,x1:l=a,y1:s=o}=r,c=eB(n,r,t),u=e.map(t=>[i.map(c([+a[t],+o[t]],t)),i.map(c([+l[t],+s[t]],t))]);return[e,u]};r6.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,shape:r4,channels:[...eP({shapes:Object.keys(r4)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...eI(),{type:rV},{type:rU}],postInference:[...eR()]};var r8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let r9=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,a)=>{let{color:o}=a,l=r8(a,["color"]),{color:s=o,src:c="",size:u=32,transform:f=""}=i,{width:d=u,height:h=u}=t,[[p,g]]=e,[m,y]=n.getSize();d="string"==typeof d?eD(d)*m:d,h="string"==typeof h?eD(h)*y:h;let v=p-Number(d)/2,b=g-Number(h)/2;return tW(r.createElement("image",{})).call(t9,l).style("x",v).style("y",b).style("src",c).style("stroke",s).style("transform",f).call(t9,t).style("width",d).style("height",h).node()}};r9.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let r7={image:r9},it=t=>{let{cartesian:e}=t;return e?eZ:(e,n,r,i)=>{let{x:a,y:o}=r,l=eB(n,r,t),s=Array.from(e,t=>{let e=[+a[t],+o[t]];return[i.map(l(e,t))]});return[e,s]}};it.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,shape:r7,channels:[...eP({shapes:Object.keys(r7)}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...eI(),{type:rA},{type:rE}],postInference:[...eR()]};var ie=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let ir=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,a)=>{let{color:o}=a,l=ie(a,["color"]),{color:s=o,transform:c}=i,u=function(t,e){let n=te();if(tf(e)){let r=e.getCenter(),i=[...t,t[0]],a=i.map(t=>tY(t,r));return i.forEach((e,i)=>{if(0===i){n.moveTo(e[0],e[1]);return}let o=a[i],l=t[i-1],s=a[i-1];void 0!==s&&1e-10>Math.abs(o-s)?t7(n,l,e,r,o):n.lineTo(e[0],e[1])}),n.closePath(),n}return t.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n}(e,n);return tW(r.createElement("path",{})).call(t9,l).style("d",u.toString()).style("stroke",s).style("fill",s).style("transform",c).call(t9,t).node()}};ir.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var ii=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let ia=(t,e)=>{let n=ii(t,[]),{coordinate:r,document:i}=e;return(t,e,a)=>{let{color:o}=a,l=ii(a,["color"]),{color:s=o,transform:c}=e,u=function(t,e){let[n,r,i,a]=t,o=te();if(tf(e)){let t=e.getCenter(),l=tY(t,n);return o.moveTo(n[0],n[1]),o.quadraticCurveTo(t[0],t[1],i[0],i[1]),t7(o,i,a,t,l),o.quadraticCurveTo(t[0],t[1],r[0],r[1]),t7(o,r,n,t,l),o.closePath(),o}return o.moveTo(n[0],n[1]),o.bezierCurveTo(n[0]/2+i[0]/2,n[1],n[0]/2+i[0]/2,i[1],i[0],i[1]),o.lineTo(a[0],a[1]),o.bezierCurveTo(a[0]/2+r[0]/2,a[1],a[0]/2+r[0]/2,r[1],r[0],r[1]),o.lineTo(n[0],n[1]),o.closePath(),o}(t,r);return tW(i.createElement("path",{})).call(t9,l).style("d",u.toString()).style("fill",s||o).style("stroke",s||o).style("transform",c).call(t9,n).node()}};ia.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let io={polygon:ir,ribbon:ia},il=()=>(t,e,n,r)=>{let i=Object.entries(n).filter(t=>{let[e]=t;return e.startsWith("x")}).map(t=>{let[,e]=t;return e}),a=Object.entries(n).filter(t=>{let[e]=t;return e.startsWith("y")}).map(t=>{let[,e]=t;return e}),o=t.map(t=>{let e=[];for(let n=0;n e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let ic=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,a)=>{let{color:o,transform:l}=i,{color:s,fill:c=s,stroke:u=s}=a,f=is(a,["color","fill","stroke"]),d=function(t,e){let n=te();if(tf(e)){let r=e.getCenter(),[i,a]=r,o=tV(tG(t[0],r)),l=tV(tG(t[1],r)),s=tY(r,t[2]),c=tY(r,t[3]),u=tY(r,t[8]),f=tY(r,t[10]),d=tY(r,t[11]);n.moveTo(...t[0]),n.arc(i,a,s,o,l),n.arc(i,a,s,l,o,!0),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.arc(i,a,c,o,l),n.lineTo(...t[6]),n.arc(i,a,f,l,o,!0),n.closePath(),n.moveTo(...t[8]),n.arc(i,a,u,o,l),n.arc(i,a,u,l,o,!0),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.arc(i,a,d,o,l),n.arc(i,a,d,l,o,!0)}else n.moveTo(...t[0]),n.lineTo(...t[1]),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.lineTo(...t[5]),n.lineTo(...t[6]),n.lineTo(...t[7]),n.closePath(),n.moveTo(...t[8]),n.lineTo(...t[9]),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.lineTo(...t[13]);return n}(e,n);return tW(r.createElement("path",{})).call(t9,f).style("d",d.toString()).style("stroke",u).style("fill",o||c).style("transform",l).call(t9,t).node()}};ic.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var iu=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let id=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,a)=>{let{color:o,transform:l}=i,{color:s,fill:c=s,stroke:u=s}=a,f=iu(a,["color","fill","stroke"]),d=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4,r=te();if(!tf(e))return r.moveTo(...t[2]),r.lineTo(...t[3]),r.lineTo(t[3][0]-n,t[3][1]),r.lineTo(t[10][0]-n,t[10][1]),r.lineTo(t[10][0]+n,t[10][1]),r.lineTo(t[3][0]+n,t[3][1]),r.lineTo(...t[3]),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]),r.moveTo(t[3][0]+n/2,t[8][1]),r.arc(t[3][0],t[8][1],n/2,0,2*Math.PI),r.closePath(),r;let i=e.getCenter(),[a,o]=i,l=tY(i,t[3]),s=tY(i,t[8]),c=tY(i,t[10]),u=tV(tG(t[2],i)),f=Math.asin(n/s),d=u-f,h=u+f;r.moveTo(...t[2]),r.lineTo(...t[3]),r.moveTo(Math.cos(d)*l+a,Math.sin(d)*l+o),r.arc(a,o,l,d,h),r.lineTo(Math.cos(h)*c+a,Math.sin(h)*c+o),r.arc(a,o,c,h,d,!0),r.lineTo(Math.cos(d)*l+a,Math.sin(d)*l+o),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]);let p=(d+h)/2;return r.moveTo(Math.cos(p)*(s+n/2)+a,Math.sin(p)*(s+n/2)+o),r.arc(Math.cos(p)*s+a,Math.sin(p)*s+o,n/2,p,2*Math.PI+p),r.closePath(),r}(e,n,4);return tW(r.createElement("path",{})).call(t9,f).style("d",d.toString()).style("stroke",u).style("fill",o||c).style("transform",l).call(t9,t).node()}};id.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let ih={box:ic,violin:id},ip=()=>(t,e,n,r)=>{let{x:i,y:a,y1:o,y2:l,y3:s,y4:c,series:u}=n,f=e.x,d=e.series,h=Array.from(t,t=>{let e=f.getBandWidth(f.invert(+i[t])),n=d?d.getBandWidth(d.invert(+(null==u?void 0:u[t]))):1,h=e*n,p=(+(null==u?void 0:u[t])||0)*e,g=+i[t]+p+h/2,[m,y,v,b,x]=[+a[t],+o[t],+l[t],+s[t],+c[t]];return[[g-h/2,x],[g+h/2,x],[g,x],[g,b],[g-h/2,b],[g+h/2,b],[g+h/2,y],[g-h/2,y],[g-h/2,v],[g+h/2,v],[g,y],[g,m],[g-h/2,m],[g+h/2,m]].map(t=>r.map(t))});return[t,h]};ip.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,shape:ih,channels:[...eP({shapes:Object.keys(ih)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...eI(),{type:B}],postInference:[...eT()],interaction:{shareTooltip:!0}};let ig={vector:rX},im=()=>(t,e,n,r)=>{let{x:i,y:a,size:o,rotate:l}=n,[s,c]=r.getSize(),u=t.map(t=>{let e=+l[t]/180*Math.PI,n=+o[t],u=n/s*Math.cos(e),f=-(n/c)*Math.sin(e);return[r.map([+i[t]-u/2,+a[t]-f/2]),r.map([+i[t]+u/2,+a[t]+f/2])]});return[t,u]};im.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,shape:ig,channels:[...eP({shapes:Object.keys(ig)}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...eI()],postInference:[...eR()]};var iy=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let iv=(t,e)=>{let{arrow:n,arrowSize:r=4}=t,i=iy(t,["arrow","arrowSize"]),{coordinate:a,document:o}=e;return(t,e,l)=>{let{color:s,lineWidth:c}=l,u=iy(l,["color","lineWidth"]),{color:f=s,size:d=c}=e,h=n?function(t,e,n){let r=t.createElement("path",{style:Object.assign({d:"M ".concat(e,",").concat(e," L -").concat(e,",0 L ").concat(e,",-").concat(e," L 0,0 Z"),transformOrigin:"center"},n)});return r}(o,r,Object.assign({fill:i.stroke||f,stroke:i.stroke||f},tB(i,"arrow"))):null,p=function(t,e){if(!tf(e))return em().x(t=>t[0]).y(t=>t[1])(t);let n=e.getCenter();return tc()({startAngle:0,endAngle:2*Math.PI,outerRadius:tY(t[0],n),innerRadius:tY(t[1],n)})}(t,a),g=function(t,e){if(!tf(t))return e;let[n,r]=t.getCenter();return"translate(".concat(n,", ").concat(r,") ").concat(e||"")}(a,e.transform);return tW(o.createElement("path",{})).call(t9,u).style("d",p).style("stroke",f).style("lineWidth",d).style("transform",g).style("markerEnd",h).call(t9,i).node()}};iv.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let ib=()=>(t,e)=>{let{data:n}=e;return!Array.isArray(n)||n.some(I)?[t,e]:[t,(0,A.Z)({},e,{encode:{x:S(n)}})]};ib.props={};let ix={line:iv},iO=t=>(e,n,r,i)=>{let{x:a}=r,o=eB(n,r,(0,A.Z)({style:{bandOffset:0}},t)),l=Array.from(e,t=>{let e=[a[t],1],n=[a[t],0];return[e,n].map(e=>i.map(o(e,t)))});return[e,l]};iO.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:ix,channels:[...eL({shapes:Object.keys(ix)}),{name:"x",required:!0}],preInference:[...eI(),{type:ib}],postInference:[]};let iw=()=>(t,e)=>{let{data:n}=e;return!Array.isArray(n)||n.some(I)?[t,e]:[t,(0,A.Z)({},e,{encode:{y:S(n)}})]};iw.props={};let i_={line:iv},ik=t=>(e,n,r,i)=>{let{y:a}=r,o=eB(n,r,(0,A.Z)({style:{bandOffset:0}},t)),l=Array.from(e,t=>{let e=[0,a[t]],n=[1,a[t]];return[e,n].map(e=>i.map(o(e,t)))});return[e,l]};ik.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:i_,channels:[...eL({shapes:Object.keys(i_)}),{name:"y",required:!0}],preInference:[...eI(),{type:iw}],postInference:[]};var iM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function iC(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}let ij=(t,e)=>{let{offset:n=0,offset1:r=n,offset2:i=n,connectLength1:a,endMarker:o=!0}=t,l=iM(t,["offset","offset1","offset2","connectLength1","endMarker"]),{coordinate:s}=e;return(t,e,n)=>{let{color:c,connectLength1:u}=n,f=iM(n,["color","connectLength1"]),{color:d,transform:h}=e,p=function(t,e,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,[[a,o],[l,s]]=e;if(tu(t)){let t=a+n,e=t+i;return[[t,o],[e,o],[e,s],[l+r,s]]}let c=o-n,u=c-i;return[[a,c],[a,u],[l,u],[l,s-r]]}(s,t,r,i,null!=a?a:u),g=tB(Object.assign(Object.assign({},l),n),"endMarker");return tW(new tb.y$).call(t9,f).style("d",em().x(t=>t[0]).y(t=>t[1])(p)).style("stroke",d||c).style("transform",h).style("markerEnd",o?new rx.J({className:"marker",style:Object.assign(Object.assign({},g),{symbol:iC})}):null).call(t9,l).node()}};ij.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let iA={connector:ij},iS=function(){for(var t=arguments.length,e=Array(t),n=0;n [0,1];let{[t]:i,["".concat(t,"1")]:a}=n;return t=>{var e;let n=(null===(e=r.getBandWidth)||void 0===e?void 0:e.call(r,r.invert(+a[t])))||0;return[i[t],a[t]+n]}}function iP(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{extendX:e=!1,extendY:n=!1}=t;return(t,r,i,a)=>{let o=iE("x",e,i,r.x),l=iE("y",n,i,r.y),s=Array.from(t,t=>{let[e,n]=o(t),[r,i]=l(t);return[[e,r],[n,r],[n,i],[e,i]].map(t=>a.map(t))});return[t,s]}}iS.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,shape:iA,channels:[...eL({shapes:Object.keys(iA)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...eI()],postInference:[]};let iR={range:ec},iT=()=>iP();iT.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:iR,channels:[...eL({shapes:Object.keys(iR)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...eI()],postInference:[]};let iL=()=>(t,e)=>{let{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(I))){let r=(t,e)=>Array.isArray(t[0])?t.map(t=>t[e]):[t[e]];return[t,(0,A.Z)({},e,{encode:{x:S(r(n,0)),x1:S(r(n,1))}})]}return[t,e]};iL.props={};let iI={range:ec},iN=()=>iP({extendY:!0});iN.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:iI,channels:[...eL({shapes:Object.keys(iI)}),{name:"x",required:!0}],preInference:[...eI(),{type:iL}],postInference:[]};let iB=()=>(t,e)=>{let{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(I))){let r=(t,e)=>Array.isArray(t[0])?t.map(t=>t[e]):[t[e]];return[t,(0,A.Z)({},e,{encode:{y:S(r(n,0)),y1:S(r(n,1))}})]}return[t,e]};iB.props={};let iD={range:ec},iZ=()=>iP({extendX:!0});iZ.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:iD,channels:[...eL({shapes:Object.keys(iD)}),{name:"y",required:!0}],preInference:[...eI(),{type:iB}],postInference:[]};var iz=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let iF=(t,e)=>{let{arrow:n,colorAttribute:r}=t,i=iz(t,["arrow","colorAttribute"]),{coordinate:a,document:o}=e;return(t,e,n)=>{let{color:l,stroke:s}=n,c=iz(n,["color","stroke"]),{d:u,color:f=l}=e,[d,h]=a.getSize();return tW(o.createElement("path",{})).call(t9,c).style("d","function"==typeof u?u({width:d,height:h}):u).style(r,f).call(t9,i).node()}};iF.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let i$=(t,e)=>iF(Object.assign({colorAttribute:"fill"},t),e);i$.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let iW=(t,e)=>iF(Object.assign({fill:"none",colorAttribute:"stroke"},t),e);iW.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let iH={path:i$,hollow:iW},iG=t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])];iG.props={defaultShape:"path",defaultLabelShape:"label",shape:iH,composite:!1,channels:[...eP({shapes:Object.keys(iH)}),{name:"d",scale:"identity"}],preInference:[...eI()],postInference:[]};var iq=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let iY=(t,e)=>{let{render:n}=t,r=iq(t,["render"]);return t=>{let[[i,a]]=t;return n(Object.assign(Object.assign({},r),{x:i,y:a}),e)}};iY.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let iV=()=>(t,e)=>{let{style:n={}}=e;return[t,(0,A.Z)({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(t=>{let[,e]=t;return"function"==typeof e}).map(t=>{let[e,n]=t;return[e,()=>n]})))})]};iV.props={};let iU=t=>{let{cartesian:e}=t;return e?eZ:(e,n,r,i)=>{let{x:a,y:o}=r,l=eB(n,r,t),s=Array.from(e,t=>{let e=[+a[t],+o[t]];return[i.map(l(e,t))]});return[e,s]}};iU.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,shape:{shape:iY},channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...eI(),{type:rA},{type:rE},{type:iV}]};var iQ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let iX=(t,e)=>{let{document:n}=e;return(e,r,i)=>{let{transform:a}=r,{color:o}=i,l=iQ(i,["color"]),{color:s=o}=r,[c,...u]=e,f=te();return f.moveTo(...c),u.forEach(t=>{let[e,n]=t;f.lineTo(e,n)}),f.closePath(),tW(n.createElement("path",{})).call(t9,l).style("d",f.toString()).style("stroke",s||o).style("fill",s||o).style("fillOpacity",.4).style("transform",a).call(t9,t).node()}};iX.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let iK={density:iX},iJ=()=>(t,e,n,r)=>{let{x:i,series:a}=n,o=Object.entries(n).filter(t=>{let[e]=t;return e.startsWith("y")}).map(t=>{let[,e]=t;return e}),l=Object.entries(n).filter(t=>{let[e]=t;return e.startsWith("size")}).map(t=>{let[,e]=t;return e});if(void 0===i||void 0===o||void 0===l)throw Error("Missing encode for x or y or size channel.");let s=e.x,c=e.series,u=Array.from(t,e=>{let n=s.getBandWidth(s.invert(+i[e])),u=c?c.getBandWidth(c.invert(+(null==a?void 0:a[e]))):1,f=(+(null==a?void 0:a[e])||0)*n,d=+i[e]+f+n*u/2,h=[...o.map((n,r)=>[d+ +l[r][e]/t.length,+o[r][e]]),...o.map((n,r)=>[d-+l[r][e]/t.length,+o[r][e]]).reverse()];return h.map(t=>r.map(t))});return[t,u]};function i0(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function i1(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n =e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n